Нема описа

block-library.js 1.0MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117
  1. this["wp"] = this["wp"] || {}; this["wp"]["blockLibrary"] =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = "K51g");
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ "1CF3":
  90. /***/ (function(module, exports) {
  91. (function() { module.exports = window["wp"]["dom"]; }());
  92. /***/ }),
  93. /***/ "1K8p":
  94. /***/ (function(module, exports, __webpack_require__) {
  95. "use strict";
  96. /**
  97. * Copyright (c) 2015, Facebook, Inc.
  98. * All rights reserved.
  99. *
  100. * This source code is licensed under the BSD-style license found in the
  101. * LICENSE file in the root directory of this source tree. An additional grant
  102. * of patent rights can be found in the PATENTS file in the same directory.
  103. *
  104. * @providesModule normalizeWheel
  105. * @typechecks
  106. */
  107. var UserAgent_DEPRECATED = __webpack_require__("jrfk");
  108. var isEventSupported = __webpack_require__("ez49");
  109. // Reasonable defaults
  110. var PIXEL_STEP = 10;
  111. var LINE_HEIGHT = 40;
  112. var PAGE_HEIGHT = 800;
  113. /**
  114. * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
  115. * complicated, thus this doc is long and (hopefully) detailed enough to answer
  116. * your questions.
  117. *
  118. * If you need to react to the mouse wheel in a predictable way, this code is
  119. * like your bestest friend. * hugs *
  120. *
  121. * As of today, there are 4 DOM event types you can listen to:
  122. *
  123. * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
  124. * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
  125. * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
  126. * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
  127. *
  128. * So what to do? The is the best:
  129. *
  130. * normalizeWheel.getEventType();
  131. *
  132. * In your event callback, use this code to get sane interpretation of the
  133. * deltas. This code will return an object with properties:
  134. *
  135. * spinX -- normalized spin speed (use for zoom) - x plane
  136. * spinY -- " - y plane
  137. * pixelX -- normalized distance (to pixels) - x plane
  138. * pixelY -- " - y plane
  139. *
  140. * Wheel values are provided by the browser assuming you are using the wheel to
  141. * scroll a web page by a number of lines or pixels (or pages). Values can vary
  142. * significantly on different platforms and browsers, forgetting that you can
  143. * scroll at different speeds. Some devices (like trackpads) emit more events
  144. * at smaller increments with fine granularity, and some emit massive jumps with
  145. * linear speed or acceleration.
  146. *
  147. * This code does its best to normalize the deltas for you:
  148. *
  149. * - spin is trying to normalize how far the wheel was spun (or trackpad
  150. * dragged). This is super useful for zoom support where you want to
  151. * throw away the chunky scroll steps on the PC and make those equal to
  152. * the slow and smooth tiny steps on the Mac. Key data: This code tries to
  153. * resolve a single slow step on a wheel to 1.
  154. *
  155. * - pixel is normalizing the desired scroll delta in pixel units. You'll
  156. * get the crazy differences between browsers, but at least it'll be in
  157. * pixels!
  158. *
  159. * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
  160. * should translate to positive value zooming IN, negative zooming OUT.
  161. * This matches the newer 'wheel' event.
  162. *
  163. * Why are there spinX, spinY (or pixels)?
  164. *
  165. * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
  166. * with a mouse. It results in side-scrolling in the browser by default.
  167. *
  168. * - spinY is what you expect -- it's the classic axis of a mouse wheel.
  169. *
  170. * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
  171. * probably is by browsers in conjunction with fancy 3D controllers .. but
  172. * you know.
  173. *
  174. * Implementation info:
  175. *
  176. * Examples of 'wheel' event if you scroll slowly (down) by one step with an
  177. * average mouse:
  178. *
  179. * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
  180. * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
  181. * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
  182. * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
  183. * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
  184. *
  185. * On the trackpad:
  186. *
  187. * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
  188. * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
  189. *
  190. * On other/older browsers.. it's more complicated as there can be multiple and
  191. * also missing delta values.
  192. *
  193. * The 'wheel' event is more standard:
  194. *
  195. * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
  196. *
  197. * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
  198. * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
  199. * backward compatibility with older events. Those other values help us
  200. * better normalize spin speed. Example of what the browsers provide:
  201. *
  202. * | event.wheelDelta | event.detail
  203. * ------------------+------------------+--------------
  204. * Safari v5/OS X | -120 | 0
  205. * Safari v5/Win7 | -120 | 0
  206. * Chrome v17/OS X | -120 | 0
  207. * Chrome v17/Win7 | -120 | 0
  208. * IE9/Win7 | -120 | undefined
  209. * Firefox v4/OS X | undefined | 1
  210. * Firefox v4/Win7 | undefined | 3
  211. *
  212. */
  213. function normalizeWheel(/*object*/ event) /*object*/ {
  214. var sX = 0, sY = 0, // spinX, spinY
  215. pX = 0, pY = 0; // pixelX, pixelY
  216. // Legacy
  217. if ('detail' in event) { sY = event.detail; }
  218. if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
  219. if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
  220. if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
  221. // side scrolling on FF with DOMMouseScroll
  222. if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
  223. sX = sY;
  224. sY = 0;
  225. }
  226. pX = sX * PIXEL_STEP;
  227. pY = sY * PIXEL_STEP;
  228. if ('deltaY' in event) { pY = event.deltaY; }
  229. if ('deltaX' in event) { pX = event.deltaX; }
  230. if ((pX || pY) && event.deltaMode) {
  231. if (event.deltaMode == 1) { // delta in LINE units
  232. pX *= LINE_HEIGHT;
  233. pY *= LINE_HEIGHT;
  234. } else { // delta in PAGE units
  235. pX *= PAGE_HEIGHT;
  236. pY *= PAGE_HEIGHT;
  237. }
  238. }
  239. // Fall-back if spin cannot be determined
  240. if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
  241. if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
  242. return { spinX : sX,
  243. spinY : sY,
  244. pixelX : pX,
  245. pixelY : pY };
  246. }
  247. /**
  248. * The best combination if you prefer spinX + spinY normalization. It favors
  249. * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
  250. * 'wheel' event, making spin speed determination impossible.
  251. */
  252. normalizeWheel.getEventType = function() /*string*/ {
  253. return (UserAgent_DEPRECATED.firefox())
  254. ? 'DOMMouseScroll'
  255. : (isEventSupported('wheel'))
  256. ? 'wheel'
  257. : 'mousewheel';
  258. };
  259. module.exports = normalizeWheel;
  260. /***/ }),
  261. /***/ "1Yn1":
  262. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  263. "use strict";
  264. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  265. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  266. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  267. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  268. /**
  269. * WordPress dependencies
  270. */
  271. const code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  272. viewBox: "0 0 24 24",
  273. xmlns: "http://www.w3.org/2000/svg"
  274. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  275. d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"
  276. }));
  277. /* harmony default export */ __webpack_exports__["a"] = (code);
  278. /***/ }),
  279. /***/ "1ZqX":
  280. /***/ (function(module, exports) {
  281. (function() { module.exports = window["wp"]["data"]; }());
  282. /***/ }),
  283. /***/ "1iEr":
  284. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  285. "use strict";
  286. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  287. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  288. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  289. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  290. /**
  291. * WordPress dependencies
  292. */
  293. const chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  294. xmlns: "http://www.w3.org/2000/svg",
  295. viewBox: "0 0 24 24"
  296. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  297. d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
  298. }));
  299. /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
  300. /***/ }),
  301. /***/ "2gm7":
  302. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  303. "use strict";
  304. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  305. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  306. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  307. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  308. /**
  309. * WordPress dependencies
  310. */
  311. const chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  312. xmlns: "http://www.w3.org/2000/svg",
  313. viewBox: "0 0 24 24"
  314. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  315. d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
  316. }));
  317. /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
  318. /***/ }),
  319. /***/ "4eJC":
  320. /***/ (function(module, exports, __webpack_require__) {
  321. /**
  322. * Memize options object.
  323. *
  324. * @typedef MemizeOptions
  325. *
  326. * @property {number} [maxSize] Maximum size of the cache.
  327. */
  328. /**
  329. * Internal cache entry.
  330. *
  331. * @typedef MemizeCacheNode
  332. *
  333. * @property {?MemizeCacheNode|undefined} [prev] Previous node.
  334. * @property {?MemizeCacheNode|undefined} [next] Next node.
  335. * @property {Array<*>} args Function arguments for cache
  336. * entry.
  337. * @property {*} val Function result.
  338. */
  339. /**
  340. * Properties of the enhanced function for controlling cache.
  341. *
  342. * @typedef MemizeMemoizedFunction
  343. *
  344. * @property {()=>void} clear Clear the cache.
  345. */
  346. /**
  347. * Accepts a function to be memoized, and returns a new memoized function, with
  348. * optional options.
  349. *
  350. * @template {Function} F
  351. *
  352. * @param {F} fn Function to memoize.
  353. * @param {MemizeOptions} [options] Options object.
  354. *
  355. * @return {F & MemizeMemoizedFunction} Memoized function.
  356. */
  357. function memize( fn, options ) {
  358. var size = 0;
  359. /** @type {?MemizeCacheNode|undefined} */
  360. var head;
  361. /** @type {?MemizeCacheNode|undefined} */
  362. var tail;
  363. options = options || {};
  364. function memoized( /* ...args */ ) {
  365. var node = head,
  366. len = arguments.length,
  367. args, i;
  368. searchCache: while ( node ) {
  369. // Perform a shallow equality test to confirm that whether the node
  370. // under test is a candidate for the arguments passed. Two arrays
  371. // are shallowly equal if their length matches and each entry is
  372. // strictly equal between the two sets. Avoid abstracting to a
  373. // function which could incur an arguments leaking deoptimization.
  374. // Check whether node arguments match arguments length
  375. if ( node.args.length !== arguments.length ) {
  376. node = node.next;
  377. continue;
  378. }
  379. // Check whether node arguments match arguments values
  380. for ( i = 0; i < len; i++ ) {
  381. if ( node.args[ i ] !== arguments[ i ] ) {
  382. node = node.next;
  383. continue searchCache;
  384. }
  385. }
  386. // At this point we can assume we've found a match
  387. // Surface matched node to head if not already
  388. if ( node !== head ) {
  389. // As tail, shift to previous. Must only shift if not also
  390. // head, since if both head and tail, there is no previous.
  391. if ( node === tail ) {
  392. tail = node.prev;
  393. }
  394. // Adjust siblings to point to each other. If node was tail,
  395. // this also handles new tail's empty `next` assignment.
  396. /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
  397. if ( node.next ) {
  398. node.next.prev = node.prev;
  399. }
  400. node.next = head;
  401. node.prev = null;
  402. /** @type {MemizeCacheNode} */ ( head ).prev = node;
  403. head = node;
  404. }
  405. // Return immediately
  406. return node.val;
  407. }
  408. // No cached value found. Continue to insertion phase:
  409. // Create a copy of arguments (avoid leaking deoptimization)
  410. args = new Array( len );
  411. for ( i = 0; i < len; i++ ) {
  412. args[ i ] = arguments[ i ];
  413. }
  414. node = {
  415. args: args,
  416. // Generate the result from original function
  417. val: fn.apply( null, args ),
  418. };
  419. // Don't need to check whether node is already head, since it would
  420. // have been returned above already if it was
  421. // Shift existing head down list
  422. if ( head ) {
  423. head.prev = node;
  424. node.next = head;
  425. } else {
  426. // If no head, follows that there's no tail (at initial or reset)
  427. tail = node;
  428. }
  429. // Trim tail if we're reached max size and are pending cache insertion
  430. if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
  431. tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
  432. /** @type {MemizeCacheNode} */ ( tail ).next = null;
  433. } else {
  434. size++;
  435. }
  436. head = node;
  437. return node.val;
  438. }
  439. memoized.clear = function() {
  440. head = null;
  441. tail = null;
  442. size = 0;
  443. };
  444. if ( false ) {}
  445. // Ignore reason: There's not a clear solution to create an intersection of
  446. // the function with additional properties, where the goal is to retain the
  447. // function signature of the incoming argument and add control properties
  448. // on the return value.
  449. // @ts-ignore
  450. return memoized;
  451. }
  452. module.exports = memize;
  453. /***/ }),
  454. /***/ "A/WM":
  455. /***/ (function(module, exports, __webpack_require__) {
  456. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  457. Copyright (c) 2018 Jed Watson.
  458. Licensed under the MIT License (MIT), see
  459. http://jedwatson.github.io/classnames
  460. */
  461. /* global define */
  462. (function () {
  463. 'use strict';
  464. var classNames = (function () {
  465. // don't inherit from Object so we can skip hasOwnProperty check later
  466. // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
  467. function StorageObject() {}
  468. StorageObject.prototype = Object.create(null);
  469. function _parseArray (resultSet, array) {
  470. var length = array.length;
  471. for (var i = 0; i < length; ++i) {
  472. _parse(resultSet, array[i]);
  473. }
  474. }
  475. var hasOwn = {}.hasOwnProperty;
  476. function _parseNumber (resultSet, num) {
  477. resultSet[num] = true;
  478. }
  479. function _parseObject (resultSet, object) {
  480. if (object.toString === Object.prototype.toString) {
  481. for (var k in object) {
  482. if (hasOwn.call(object, k)) {
  483. // set value to false instead of deleting it to avoid changing object structure
  484. // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
  485. resultSet[k] = !!object[k];
  486. }
  487. }
  488. } else {
  489. resultSet[object.toString()] = true;
  490. }
  491. }
  492. var SPACE = /\s+/;
  493. function _parseString (resultSet, str) {
  494. var array = str.split(SPACE);
  495. var length = array.length;
  496. for (var i = 0; i < length; ++i) {
  497. resultSet[array[i]] = true;
  498. }
  499. }
  500. function _parse (resultSet, arg) {
  501. if (!arg) return;
  502. var argType = typeof arg;
  503. // 'foo bar'
  504. if (argType === 'string') {
  505. _parseString(resultSet, arg);
  506. // ['foo', 'bar', ...]
  507. } else if (Array.isArray(arg)) {
  508. _parseArray(resultSet, arg);
  509. // { 'foo': true, ... }
  510. } else if (argType === 'object') {
  511. _parseObject(resultSet, arg);
  512. // '130'
  513. } else if (argType === 'number') {
  514. _parseNumber(resultSet, arg);
  515. }
  516. }
  517. function _classNames () {
  518. // don't leak arguments
  519. // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
  520. var len = arguments.length;
  521. var args = Array(len);
  522. for (var i = 0; i < len; i++) {
  523. args[i] = arguments[i];
  524. }
  525. var classSet = new StorageObject();
  526. _parseArray(classSet, args);
  527. var list = [];
  528. for (var k in classSet) {
  529. if (classSet[k]) {
  530. list.push(k)
  531. }
  532. }
  533. return list.join(' ');
  534. }
  535. return _classNames;
  536. })();
  537. if ( true && module.exports) {
  538. classNames.default = classNames;
  539. module.exports = classNames;
  540. } else if (true) {
  541. // register as 'classnames', consistent with npm package name
  542. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  543. return classNames;
  544. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  545. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  546. } else {}
  547. }());
  548. /***/ }),
  549. /***/ "B9Az":
  550. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  551. "use strict";
  552. // EXTERNAL MODULE: external ["wp","element"]
  553. var external_wp_element_ = __webpack_require__("GRId");
  554. // EXTERNAL MODULE: external ["wp","primitives"]
  555. var external_wp_primitives_ = __webpack_require__("Tqx9");
  556. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
  557. /**
  558. * WordPress dependencies
  559. */
  560. const pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  561. xmlns: "http://www.w3.org/2000/svg",
  562. viewBox: "0 0 24 24"
  563. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  564. d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"
  565. }));
  566. /* harmony default export */ var library_pencil = (pencil);
  567. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
  568. /**
  569. * Internal dependencies
  570. */
  571. /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil);
  572. /***/ }),
  573. /***/ "Bpkj":
  574. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  575. "use strict";
  576. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  577. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  578. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  579. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  580. /**
  581. * WordPress dependencies
  582. */
  583. const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  584. xmlns: "http://www.w3.org/2000/svg",
  585. viewBox: "0 0 24 24"
  586. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  587. d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"
  588. }));
  589. /* harmony default export */ __webpack_exports__["a"] = (link);
  590. /***/ }),
  591. /***/ "FEKF":
  592. /***/ (function(module, exports, __webpack_require__) {
  593. /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
  594. (function (global, factory) {
  595. true ? module.exports = factory() :
  596. undefined;
  597. }(this, (function () { 'use strict';
  598. function _classCallCheck(instance, Constructor) {
  599. if (!(instance instanceof Constructor)) {
  600. throw new TypeError("Cannot call a class as a function");
  601. }
  602. }
  603. function _defineProperties(target, props) {
  604. for (var i = 0; i < props.length; i++) {
  605. var descriptor = props[i];
  606. descriptor.enumerable = descriptor.enumerable || false;
  607. descriptor.configurable = true;
  608. if ("value" in descriptor) descriptor.writable = true;
  609. Object.defineProperty(target, descriptor.key, descriptor);
  610. }
  611. }
  612. function _createClass(Constructor, protoProps, staticProps) {
  613. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  614. if (staticProps) _defineProperties(Constructor, staticProps);
  615. return Constructor;
  616. }
  617. function _slicedToArray(arr, i) {
  618. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
  619. }
  620. function _arrayWithHoles(arr) {
  621. if (Array.isArray(arr)) return arr;
  622. }
  623. function _iterableToArrayLimit(arr, i) {
  624. var _arr = [];
  625. var _n = true;
  626. var _d = false;
  627. var _e = undefined;
  628. try {
  629. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  630. _arr.push(_s.value);
  631. if (i && _arr.length === i) break;
  632. }
  633. } catch (err) {
  634. _d = true;
  635. _e = err;
  636. } finally {
  637. try {
  638. if (!_n && _i["return"] != null) _i["return"]();
  639. } finally {
  640. if (_d) throw _e;
  641. }
  642. }
  643. return _arr;
  644. }
  645. function _nonIterableRest() {
  646. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  647. }
  648. var FastAverageColor =
  649. /*#__PURE__*/
  650. function () {
  651. function FastAverageColor() {
  652. _classCallCheck(this, FastAverageColor);
  653. }
  654. _createClass(FastAverageColor, [{
  655. key: "getColorAsync",
  656. /**
  657. * Get asynchronously the average color from not loaded image.
  658. *
  659. * @param {HTMLImageElement} resource
  660. * @param {Function} callback
  661. * @param {Object|null} [options]
  662. * @param {Array} [options.defaultColor=[255, 255, 255, 255]]
  663. * @param {*} [options.data]
  664. * @param {string} [options.mode="speed"] "precision" or "speed"
  665. * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
  666. * @param {number} [options.step=1]
  667. * @param {number} [options.left=0]
  668. * @param {number} [options.top=0]
  669. * @param {number} [options.width=width of resource]
  670. * @param {number} [options.height=height of resource]
  671. */
  672. value: function getColorAsync(resource, callback, options) {
  673. if (resource.complete) {
  674. callback.call(resource, this.getColor(resource, options), options && options.data);
  675. } else {
  676. this._bindImageEvents(resource, callback, options);
  677. }
  678. }
  679. /**
  680. * Get the average color from images, videos and canvas.
  681. *
  682. * @param {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement} resource
  683. * @param {Object|null} [options]
  684. * @param {Array} [options.defaultColor=[255, 255, 255, 255]]
  685. * @param {*} [options.data]
  686. * @param {string} [options.mode="speed"] "precision" or "speed"
  687. * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
  688. * @param {number} [options.step=1]
  689. * @param {number} [options.left=0]
  690. * @param {number} [options.top=0]
  691. * @param {number} [options.width=width of resource]
  692. * @param {number} [options.height=height of resource]
  693. *
  694. * @returns {Object}
  695. */
  696. }, {
  697. key: "getColor",
  698. value: function getColor(resource, options) {
  699. options = options || {};
  700. var defaultColor = this._getDefaultColor(options),
  701. originalSize = this._getOriginalSize(resource),
  702. size = this._prepareSizeAndPosition(originalSize, options);
  703. var error = null,
  704. value = defaultColor;
  705. if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
  706. return this._prepareResult(defaultColor, new Error('FastAverageColor: Incorrect sizes.'));
  707. }
  708. if (!this._ctx) {
  709. this._canvas = this._makeCanvas();
  710. this._ctx = this._canvas.getContext && this._canvas.getContext('2d');
  711. if (!this._ctx) {
  712. return this._prepareResult(defaultColor, new Error('FastAverageColor: Canvas Context 2D is not supported in this browser.'));
  713. }
  714. }
  715. this._canvas.width = size.destWidth;
  716. this._canvas.height = size.destHeight;
  717. try {
  718. this._ctx.clearRect(0, 0, size.destWidth, size.destHeight);
  719. this._ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
  720. var bitmapData = this._ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
  721. value = this.getColorFromArray4(bitmapData, options);
  722. } catch (e) {
  723. // Security error, CORS
  724. // https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image
  725. error = e;
  726. }
  727. return this._prepareResult(value, error);
  728. }
  729. /**
  730. * Get the average color from a array when 1 pixel is 4 bytes.
  731. *
  732. * @param {Array|Uint8Array} arr
  733. * @param {Object} [options]
  734. * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
  735. * @param {Array} [options.defaultColor=[255, 255, 255, 255]]
  736. * @param {number} [options.step=1]
  737. *
  738. * @returns {Array} [red (0-255), green (0-255), blue (0-255), alpha (0-255)]
  739. */
  740. }, {
  741. key: "getColorFromArray4",
  742. value: function getColorFromArray4(arr, options) {
  743. options = options || {};
  744. var bytesPerPixel = 4,
  745. arrLength = arr.length;
  746. if (arrLength < bytesPerPixel) {
  747. return this._getDefaultColor(options);
  748. }
  749. var len = arrLength - arrLength % bytesPerPixel,
  750. preparedStep = (options.step || 1) * bytesPerPixel,
  751. algorithm = '_' + (options.algorithm || 'sqrt') + 'Algorithm';
  752. if (typeof this[algorithm] !== 'function') {
  753. throw new Error("FastAverageColor: ".concat(options.algorithm, " is unknown algorithm."));
  754. }
  755. return this[algorithm](arr, len, preparedStep);
  756. }
  757. /**
  758. * Destroy the instance.
  759. */
  760. }, {
  761. key: "destroy",
  762. value: function destroy() {
  763. delete this._canvas;
  764. delete this._ctx;
  765. }
  766. }, {
  767. key: "_getDefaultColor",
  768. value: function _getDefaultColor(options) {
  769. return this._getOption(options, 'defaultColor', [255, 255, 255, 255]);
  770. }
  771. }, {
  772. key: "_getOption",
  773. value: function _getOption(options, name, defaultValue) {
  774. return typeof options[name] === 'undefined' ? defaultValue : options[name];
  775. }
  776. }, {
  777. key: "_prepareSizeAndPosition",
  778. value: function _prepareSizeAndPosition(originalSize, options) {
  779. var srcLeft = this._getOption(options, 'left', 0),
  780. srcTop = this._getOption(options, 'top', 0),
  781. srcWidth = this._getOption(options, 'width', originalSize.width),
  782. srcHeight = this._getOption(options, 'height', originalSize.height),
  783. destWidth = srcWidth,
  784. destHeight = srcHeight;
  785. if (options.mode === 'precision') {
  786. return {
  787. srcLeft: srcLeft,
  788. srcTop: srcTop,
  789. srcWidth: srcWidth,
  790. srcHeight: srcHeight,
  791. destWidth: destWidth,
  792. destHeight: destHeight
  793. };
  794. }
  795. var maxSize = 100,
  796. minSize = 10;
  797. var factor;
  798. if (srcWidth > srcHeight) {
  799. factor = srcWidth / srcHeight;
  800. destWidth = maxSize;
  801. destHeight = Math.round(destWidth / factor);
  802. } else {
  803. factor = srcHeight / srcWidth;
  804. destHeight = maxSize;
  805. destWidth = Math.round(destHeight / factor);
  806. }
  807. if (destWidth > srcWidth || destHeight > srcHeight || destWidth < minSize || destHeight < minSize) {
  808. destWidth = srcWidth;
  809. destHeight = srcHeight;
  810. }
  811. return {
  812. srcLeft: srcLeft,
  813. srcTop: srcTop,
  814. srcWidth: srcWidth,
  815. srcHeight: srcHeight,
  816. destWidth: destWidth,
  817. destHeight: destHeight
  818. };
  819. }
  820. }, {
  821. key: "_simpleAlgorithm",
  822. value: function _simpleAlgorithm(arr, len, preparedStep) {
  823. var redTotal = 0,
  824. greenTotal = 0,
  825. blueTotal = 0,
  826. alphaTotal = 0,
  827. count = 0;
  828. for (var i = 0; i < len; i += preparedStep) {
  829. var alpha = arr[i + 3],
  830. red = arr[i] * alpha,
  831. green = arr[i + 1] * alpha,
  832. blue = arr[i + 2] * alpha;
  833. redTotal += red;
  834. greenTotal += green;
  835. blueTotal += blue;
  836. alphaTotal += alpha;
  837. count++;
  838. }
  839. return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
  840. }
  841. }, {
  842. key: "_sqrtAlgorithm",
  843. value: function _sqrtAlgorithm(arr, len, preparedStep) {
  844. var redTotal = 0,
  845. greenTotal = 0,
  846. blueTotal = 0,
  847. alphaTotal = 0,
  848. count = 0;
  849. for (var i = 0; i < len; i += preparedStep) {
  850. var red = arr[i],
  851. green = arr[i + 1],
  852. blue = arr[i + 2],
  853. alpha = arr[i + 3];
  854. redTotal += red * red * alpha;
  855. greenTotal += green * green * alpha;
  856. blueTotal += blue * blue * alpha;
  857. alphaTotal += alpha;
  858. count++;
  859. }
  860. return alphaTotal ? [Math.round(Math.sqrt(redTotal / alphaTotal)), Math.round(Math.sqrt(greenTotal / alphaTotal)), Math.round(Math.sqrt(blueTotal / alphaTotal)), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
  861. }
  862. }, {
  863. key: "_dominantAlgorithm",
  864. value: function _dominantAlgorithm(arr, len, preparedStep) {
  865. var colorHash = {},
  866. divider = 24;
  867. for (var i = 0; i < len; i += preparedStep) {
  868. var red = arr[i],
  869. green = arr[i + 1],
  870. blue = arr[i + 2],
  871. alpha = arr[i + 3],
  872. key = Math.round(red / divider) + ',' + Math.round(green / divider) + ',' + Math.round(blue / divider);
  873. if (colorHash[key]) {
  874. colorHash[key] = [colorHash[key][0] + red * alpha, colorHash[key][1] + green * alpha, colorHash[key][2] + blue * alpha, colorHash[key][3] + alpha, colorHash[key][4] + 1];
  875. } else {
  876. colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
  877. }
  878. }
  879. var buffer = Object.keys(colorHash).map(function (key) {
  880. return colorHash[key];
  881. }).sort(function (a, b) {
  882. var countA = a[4],
  883. countB = b[4];
  884. return countA > countB ? -1 : countA === countB ? 0 : 1;
  885. });
  886. var _buffer$ = _slicedToArray(buffer[0], 5),
  887. redTotal = _buffer$[0],
  888. greenTotal = _buffer$[1],
  889. blueTotal = _buffer$[2],
  890. alphaTotal = _buffer$[3],
  891. count = _buffer$[4];
  892. return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
  893. }
  894. }, {
  895. key: "_bindImageEvents",
  896. value: function _bindImageEvents(resource, callback, options) {
  897. var _this = this;
  898. options = options || {};
  899. var data = options && options.data,
  900. defaultColor = this._getDefaultColor(options),
  901. onload = function onload() {
  902. unbindEvents();
  903. callback.call(resource, _this.getColor(resource, options), data);
  904. },
  905. onerror = function onerror() {
  906. unbindEvents();
  907. callback.call(resource, _this._prepareResult(defaultColor, new Error('Image error')), data);
  908. },
  909. onabort = function onabort() {
  910. unbindEvents();
  911. callback.call(resource, _this._prepareResult(defaultColor, new Error('Image abort')), data);
  912. },
  913. unbindEvents = function unbindEvents() {
  914. resource.removeEventListener('load', onload);
  915. resource.removeEventListener('error', onerror);
  916. resource.removeEventListener('abort', onabort);
  917. };
  918. resource.addEventListener('load', onload);
  919. resource.addEventListener('error', onerror);
  920. resource.addEventListener('abort', onabort);
  921. }
  922. }, {
  923. key: "_prepareResult",
  924. value: function _prepareResult(value, error) {
  925. var rgb = value.slice(0, 3),
  926. rgba = [].concat(rgb, value[3] / 255),
  927. isDark = this._isDark(value);
  928. return {
  929. error: error,
  930. value: value,
  931. rgb: 'rgb(' + rgb.join(',') + ')',
  932. rgba: 'rgba(' + rgba.join(',') + ')',
  933. hex: this._arrayToHex(rgb),
  934. hexa: this._arrayToHex(value),
  935. isDark: isDark,
  936. isLight: !isDark
  937. };
  938. }
  939. }, {
  940. key: "_getOriginalSize",
  941. value: function _getOriginalSize(resource) {
  942. if (resource instanceof HTMLImageElement) {
  943. return {
  944. width: resource.naturalWidth,
  945. height: resource.naturalHeight
  946. };
  947. }
  948. if (resource instanceof HTMLVideoElement) {
  949. return {
  950. width: resource.videoWidth,
  951. height: resource.videoHeight
  952. };
  953. }
  954. return {
  955. width: resource.width,
  956. height: resource.height
  957. };
  958. }
  959. }, {
  960. key: "_toHex",
  961. value: function _toHex(num) {
  962. var str = num.toString(16);
  963. return str.length === 1 ? '0' + str : str;
  964. }
  965. }, {
  966. key: "_arrayToHex",
  967. value: function _arrayToHex(arr) {
  968. return '#' + arr.map(this._toHex).join('');
  969. }
  970. }, {
  971. key: "_isDark",
  972. value: function _isDark(color) {
  973. // http://www.w3.org/TR/AERT#color-contrast
  974. var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000;
  975. return result < 128;
  976. }
  977. }, {
  978. key: "_makeCanvas",
  979. value: function _makeCanvas() {
  980. return typeof window === 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas');
  981. }
  982. }]);
  983. return FastAverageColor;
  984. }();
  985. return FastAverageColor;
  986. })));
  987. /***/ }),
  988. /***/ "FqII":
  989. /***/ (function(module, exports) {
  990. (function() { module.exports = window["wp"]["date"]; }());
  991. /***/ }),
  992. /***/ "GRId":
  993. /***/ (function(module, exports) {
  994. (function() { module.exports = window["wp"]["element"]; }());
  995. /***/ }),
  996. /***/ "HSyU":
  997. /***/ (function(module, exports) {
  998. (function() { module.exports = window["wp"]["blocks"]; }());
  999. /***/ }),
  1000. /***/ "JREk":
  1001. /***/ (function(module, exports) {
  1002. (function() { module.exports = window["wp"]["serverSideRender"]; }());
  1003. /***/ }),
  1004. /***/ "K51g":
  1005. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1006. "use strict";
  1007. // ESM COMPAT FLAG
  1008. __webpack_require__.r(__webpack_exports__);
  1009. // EXPORTS
  1010. __webpack_require__.d(__webpack_exports__, "__experimentalGetCoreBlocks", function() { return /* binding */ __experimentalGetCoreBlocks; });
  1011. __webpack_require__.d(__webpack_exports__, "registerCoreBlocks", function() { return /* binding */ registerCoreBlocks; });
  1012. __webpack_require__.d(__webpack_exports__, "__experimentalRegisterExperimentalCoreBlocks", function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; });
  1013. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
  1014. var build_module_paragraph_namespaceObject = {};
  1015. __webpack_require__.r(build_module_paragraph_namespaceObject);
  1016. __webpack_require__.d(build_module_paragraph_namespaceObject, "metadata", function() { return paragraph_metadata; });
  1017. __webpack_require__.d(build_module_paragraph_namespaceObject, "name", function() { return paragraph_name; });
  1018. __webpack_require__.d(build_module_paragraph_namespaceObject, "settings", function() { return paragraph_settings; });
  1019. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js
  1020. var build_module_image_namespaceObject = {};
  1021. __webpack_require__.r(build_module_image_namespaceObject);
  1022. __webpack_require__.d(build_module_image_namespaceObject, "metadata", function() { return image_metadata; });
  1023. __webpack_require__.d(build_module_image_namespaceObject, "name", function() { return image_name; });
  1024. __webpack_require__.d(build_module_image_namespaceObject, "settings", function() { return image_settings; });
  1025. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js
  1026. var build_module_heading_namespaceObject = {};
  1027. __webpack_require__.r(build_module_heading_namespaceObject);
  1028. __webpack_require__.d(build_module_heading_namespaceObject, "metadata", function() { return heading_metadata; });
  1029. __webpack_require__.d(build_module_heading_namespaceObject, "name", function() { return heading_name; });
  1030. __webpack_require__.d(build_module_heading_namespaceObject, "settings", function() { return heading_settings; });
  1031. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js
  1032. var build_module_quote_namespaceObject = {};
  1033. __webpack_require__.r(build_module_quote_namespaceObject);
  1034. __webpack_require__.d(build_module_quote_namespaceObject, "metadata", function() { return quote_metadata; });
  1035. __webpack_require__.d(build_module_quote_namespaceObject, "name", function() { return quote_name; });
  1036. __webpack_require__.d(build_module_quote_namespaceObject, "settings", function() { return quote_settings; });
  1037. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
  1038. var build_module_gallery_namespaceObject = {};
  1039. __webpack_require__.r(build_module_gallery_namespaceObject);
  1040. __webpack_require__.d(build_module_gallery_namespaceObject, "metadata", function() { return gallery_metadata; });
  1041. __webpack_require__.d(build_module_gallery_namespaceObject, "name", function() { return gallery_name; });
  1042. __webpack_require__.d(build_module_gallery_namespaceObject, "settings", function() { return gallery_settings; });
  1043. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js
  1044. var archives_namespaceObject = {};
  1045. __webpack_require__.r(archives_namespaceObject);
  1046. __webpack_require__.d(archives_namespaceObject, "metadata", function() { return archives_metadata; });
  1047. __webpack_require__.d(archives_namespaceObject, "name", function() { return archives_name; });
  1048. __webpack_require__.d(archives_namespaceObject, "settings", function() { return archives_settings; });
  1049. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js
  1050. var build_module_audio_namespaceObject = {};
  1051. __webpack_require__.r(build_module_audio_namespaceObject);
  1052. __webpack_require__.d(build_module_audio_namespaceObject, "metadata", function() { return audio_metadata; });
  1053. __webpack_require__.d(build_module_audio_namespaceObject, "name", function() { return audio_name; });
  1054. __webpack_require__.d(build_module_audio_namespaceObject, "settings", function() { return audio_settings; });
  1055. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js
  1056. var button_namespaceObject = {};
  1057. __webpack_require__.r(button_namespaceObject);
  1058. __webpack_require__.d(button_namespaceObject, "metadata", function() { return button_metadata; });
  1059. __webpack_require__.d(button_namespaceObject, "name", function() { return button_name; });
  1060. __webpack_require__.d(button_namespaceObject, "settings", function() { return button_settings; });
  1061. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
  1062. var build_module_buttons_namespaceObject = {};
  1063. __webpack_require__.r(build_module_buttons_namespaceObject);
  1064. __webpack_require__.d(build_module_buttons_namespaceObject, "metadata", function() { return buttons_metadata; });
  1065. __webpack_require__.d(build_module_buttons_namespaceObject, "name", function() { return buttons_name; });
  1066. __webpack_require__.d(build_module_buttons_namespaceObject, "settings", function() { return buttons_settings; });
  1067. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
  1068. var build_module_calendar_namespaceObject = {};
  1069. __webpack_require__.r(build_module_calendar_namespaceObject);
  1070. __webpack_require__.d(build_module_calendar_namespaceObject, "metadata", function() { return calendar_metadata; });
  1071. __webpack_require__.d(build_module_calendar_namespaceObject, "name", function() { return calendar_name; });
  1072. __webpack_require__.d(build_module_calendar_namespaceObject, "settings", function() { return calendar_settings; });
  1073. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js
  1074. var categories_namespaceObject = {};
  1075. __webpack_require__.r(categories_namespaceObject);
  1076. __webpack_require__.d(categories_namespaceObject, "metadata", function() { return categories_metadata; });
  1077. __webpack_require__.d(categories_namespaceObject, "name", function() { return categories_name; });
  1078. __webpack_require__.d(categories_namespaceObject, "settings", function() { return categories_settings; });
  1079. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js
  1080. var code_namespaceObject = {};
  1081. __webpack_require__.r(code_namespaceObject);
  1082. __webpack_require__.d(code_namespaceObject, "metadata", function() { return code_metadata; });
  1083. __webpack_require__.d(code_namespaceObject, "name", function() { return code_name; });
  1084. __webpack_require__.d(code_namespaceObject, "settings", function() { return code_settings; });
  1085. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js
  1086. var build_module_columns_namespaceObject = {};
  1087. __webpack_require__.r(build_module_columns_namespaceObject);
  1088. __webpack_require__.d(build_module_columns_namespaceObject, "metadata", function() { return columns_metadata; });
  1089. __webpack_require__.d(build_module_columns_namespaceObject, "name", function() { return columns_name; });
  1090. __webpack_require__.d(build_module_columns_namespaceObject, "settings", function() { return columns_settings; });
  1091. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js
  1092. var build_module_column_namespaceObject = {};
  1093. __webpack_require__.r(build_module_column_namespaceObject);
  1094. __webpack_require__.d(build_module_column_namespaceObject, "metadata", function() { return column_metadata; });
  1095. __webpack_require__.d(build_module_column_namespaceObject, "name", function() { return column_name; });
  1096. __webpack_require__.d(build_module_column_namespaceObject, "settings", function() { return column_settings; });
  1097. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js
  1098. var build_module_cover_namespaceObject = {};
  1099. __webpack_require__.r(build_module_cover_namespaceObject);
  1100. __webpack_require__.d(build_module_cover_namespaceObject, "metadata", function() { return cover_metadata; });
  1101. __webpack_require__.d(build_module_cover_namespaceObject, "name", function() { return cover_name; });
  1102. __webpack_require__.d(build_module_cover_namespaceObject, "settings", function() { return cover_settings; });
  1103. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js
  1104. var embed_namespaceObject = {};
  1105. __webpack_require__.r(embed_namespaceObject);
  1106. __webpack_require__.d(embed_namespaceObject, "metadata", function() { return embed_metadata; });
  1107. __webpack_require__.d(embed_namespaceObject, "name", function() { return embed_name; });
  1108. __webpack_require__.d(embed_namespaceObject, "settings", function() { return embed_settings; });
  1109. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js
  1110. var build_module_file_namespaceObject = {};
  1111. __webpack_require__.r(build_module_file_namespaceObject);
  1112. __webpack_require__.d(build_module_file_namespaceObject, "metadata", function() { return file_metadata; });
  1113. __webpack_require__.d(build_module_file_namespaceObject, "name", function() { return file_name; });
  1114. __webpack_require__.d(build_module_file_namespaceObject, "settings", function() { return file_settings; });
  1115. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js
  1116. var build_module_html_namespaceObject = {};
  1117. __webpack_require__.r(build_module_html_namespaceObject);
  1118. __webpack_require__.d(build_module_html_namespaceObject, "metadata", function() { return html_metadata; });
  1119. __webpack_require__.d(build_module_html_namespaceObject, "name", function() { return html_name; });
  1120. __webpack_require__.d(build_module_html_namespaceObject, "settings", function() { return html_settings; });
  1121. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
  1122. var media_text_namespaceObject = {};
  1123. __webpack_require__.r(media_text_namespaceObject);
  1124. __webpack_require__.d(media_text_namespaceObject, "metadata", function() { return media_text_metadata; });
  1125. __webpack_require__.d(media_text_namespaceObject, "name", function() { return media_text_name; });
  1126. __webpack_require__.d(media_text_namespaceObject, "settings", function() { return media_text_settings; });
  1127. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
  1128. var latest_comments_namespaceObject = {};
  1129. __webpack_require__.r(latest_comments_namespaceObject);
  1130. __webpack_require__.d(latest_comments_namespaceObject, "metadata", function() { return latest_comments_metadata; });
  1131. __webpack_require__.d(latest_comments_namespaceObject, "name", function() { return latest_comments_name; });
  1132. __webpack_require__.d(latest_comments_namespaceObject, "settings", function() { return latest_comments_settings; });
  1133. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
  1134. var latest_posts_namespaceObject = {};
  1135. __webpack_require__.r(latest_posts_namespaceObject);
  1136. __webpack_require__.d(latest_posts_namespaceObject, "metadata", function() { return latest_posts_metadata; });
  1137. __webpack_require__.d(latest_posts_namespaceObject, "name", function() { return latest_posts_name; });
  1138. __webpack_require__.d(latest_posts_namespaceObject, "settings", function() { return latest_posts_settings; });
  1139. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js
  1140. var loginout_namespaceObject = {};
  1141. __webpack_require__.r(loginout_namespaceObject);
  1142. __webpack_require__.d(loginout_namespaceObject, "metadata", function() { return loginout_metadata; });
  1143. __webpack_require__.d(loginout_namespaceObject, "name", function() { return loginout_name; });
  1144. __webpack_require__.d(loginout_namespaceObject, "settings", function() { return loginout_settings; });
  1145. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js
  1146. var build_module_list_namespaceObject = {};
  1147. __webpack_require__.r(build_module_list_namespaceObject);
  1148. __webpack_require__.d(build_module_list_namespaceObject, "metadata", function() { return list_metadata; });
  1149. __webpack_require__.d(build_module_list_namespaceObject, "name", function() { return list_name; });
  1150. __webpack_require__.d(build_module_list_namespaceObject, "settings", function() { return list_settings; });
  1151. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js
  1152. var missing_namespaceObject = {};
  1153. __webpack_require__.r(missing_namespaceObject);
  1154. __webpack_require__.d(missing_namespaceObject, "metadata", function() { return missing_metadata; });
  1155. __webpack_require__.d(missing_namespaceObject, "name", function() { return missing_name; });
  1156. __webpack_require__.d(missing_namespaceObject, "settings", function() { return missing_settings; });
  1157. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js
  1158. var build_module_more_namespaceObject = {};
  1159. __webpack_require__.r(build_module_more_namespaceObject);
  1160. __webpack_require__.d(build_module_more_namespaceObject, "metadata", function() { return more_metadata; });
  1161. __webpack_require__.d(build_module_more_namespaceObject, "name", function() { return more_name; });
  1162. __webpack_require__.d(build_module_more_namespaceObject, "settings", function() { return more_settings; });
  1163. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
  1164. var nextpage_namespaceObject = {};
  1165. __webpack_require__.r(nextpage_namespaceObject);
  1166. __webpack_require__.d(nextpage_namespaceObject, "metadata", function() { return nextpage_metadata; });
  1167. __webpack_require__.d(nextpage_namespaceObject, "name", function() { return nextpage_name; });
  1168. __webpack_require__.d(nextpage_namespaceObject, "settings", function() { return nextpage_settings; });
  1169. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js
  1170. var page_list_namespaceObject = {};
  1171. __webpack_require__.r(page_list_namespaceObject);
  1172. __webpack_require__.d(page_list_namespaceObject, "metadata", function() { return page_list_metadata; });
  1173. __webpack_require__.d(page_list_namespaceObject, "name", function() { return page_list_name; });
  1174. __webpack_require__.d(page_list_namespaceObject, "settings", function() { return page_list_settings; });
  1175. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
  1176. var build_module_preformatted_namespaceObject = {};
  1177. __webpack_require__.r(build_module_preformatted_namespaceObject);
  1178. __webpack_require__.d(build_module_preformatted_namespaceObject, "metadata", function() { return preformatted_metadata; });
  1179. __webpack_require__.d(build_module_preformatted_namespaceObject, "name", function() { return preformatted_name; });
  1180. __webpack_require__.d(build_module_preformatted_namespaceObject, "settings", function() { return preformatted_settings; });
  1181. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
  1182. var build_module_pullquote_namespaceObject = {};
  1183. __webpack_require__.r(build_module_pullquote_namespaceObject);
  1184. __webpack_require__.d(build_module_pullquote_namespaceObject, "metadata", function() { return pullquote_metadata; });
  1185. __webpack_require__.d(build_module_pullquote_namespaceObject, "name", function() { return pullquote_name; });
  1186. __webpack_require__.d(build_module_pullquote_namespaceObject, "settings", function() { return pullquote_settings; });
  1187. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js
  1188. var block_namespaceObject = {};
  1189. __webpack_require__.r(block_namespaceObject);
  1190. __webpack_require__.d(block_namespaceObject, "metadata", function() { return block_metadata; });
  1191. __webpack_require__.d(block_namespaceObject, "name", function() { return block_name; });
  1192. __webpack_require__.d(block_namespaceObject, "settings", function() { return block_settings; });
  1193. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js
  1194. var build_module_rss_namespaceObject = {};
  1195. __webpack_require__.r(build_module_rss_namespaceObject);
  1196. __webpack_require__.d(build_module_rss_namespaceObject, "metadata", function() { return rss_metadata; });
  1197. __webpack_require__.d(build_module_rss_namespaceObject, "name", function() { return rss_name; });
  1198. __webpack_require__.d(build_module_rss_namespaceObject, "settings", function() { return rss_settings; });
  1199. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js
  1200. var search_namespaceObject = {};
  1201. __webpack_require__.r(search_namespaceObject);
  1202. __webpack_require__.d(search_namespaceObject, "metadata", function() { return search_metadata; });
  1203. __webpack_require__.d(search_namespaceObject, "name", function() { return search_name; });
  1204. __webpack_require__.d(search_namespaceObject, "settings", function() { return search_settings; });
  1205. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js
  1206. var build_module_group_namespaceObject = {};
  1207. __webpack_require__.r(build_module_group_namespaceObject);
  1208. __webpack_require__.d(build_module_group_namespaceObject, "metadata", function() { return group_metadata; });
  1209. __webpack_require__.d(build_module_group_namespaceObject, "name", function() { return group_name; });
  1210. __webpack_require__.d(build_module_group_namespaceObject, "settings", function() { return group_settings; });
  1211. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js
  1212. var build_module_separator_namespaceObject = {};
  1213. __webpack_require__.r(build_module_separator_namespaceObject);
  1214. __webpack_require__.d(build_module_separator_namespaceObject, "metadata", function() { return separator_metadata; });
  1215. __webpack_require__.d(build_module_separator_namespaceObject, "name", function() { return separator_name; });
  1216. __webpack_require__.d(build_module_separator_namespaceObject, "settings", function() { return build_module_separator_settings; });
  1217. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
  1218. var build_module_shortcode_namespaceObject = {};
  1219. __webpack_require__.r(build_module_shortcode_namespaceObject);
  1220. __webpack_require__.d(build_module_shortcode_namespaceObject, "metadata", function() { return shortcode_metadata; });
  1221. __webpack_require__.d(build_module_shortcode_namespaceObject, "name", function() { return shortcode_name; });
  1222. __webpack_require__.d(build_module_shortcode_namespaceObject, "settings", function() { return shortcode_settings; });
  1223. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
  1224. var spacer_namespaceObject = {};
  1225. __webpack_require__.r(spacer_namespaceObject);
  1226. __webpack_require__.d(spacer_namespaceObject, "metadata", function() { return spacer_metadata; });
  1227. __webpack_require__.d(spacer_namespaceObject, "name", function() { return spacer_name; });
  1228. __webpack_require__.d(spacer_namespaceObject, "settings", function() { return spacer_settings; });
  1229. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js
  1230. var build_module_table_namespaceObject = {};
  1231. __webpack_require__.r(build_module_table_namespaceObject);
  1232. __webpack_require__.d(build_module_table_namespaceObject, "metadata", function() { return table_metadata; });
  1233. __webpack_require__.d(build_module_table_namespaceObject, "name", function() { return table_name; });
  1234. __webpack_require__.d(build_module_table_namespaceObject, "settings", function() { return table_settings; });
  1235. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
  1236. var text_columns_namespaceObject = {};
  1237. __webpack_require__.r(text_columns_namespaceObject);
  1238. __webpack_require__.d(text_columns_namespaceObject, "metadata", function() { return text_columns_metadata; });
  1239. __webpack_require__.d(text_columns_namespaceObject, "name", function() { return text_columns_name; });
  1240. __webpack_require__.d(text_columns_namespaceObject, "settings", function() { return text_columns_settings; });
  1241. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js
  1242. var build_module_verse_namespaceObject = {};
  1243. __webpack_require__.r(build_module_verse_namespaceObject);
  1244. __webpack_require__.d(build_module_verse_namespaceObject, "metadata", function() { return verse_metadata; });
  1245. __webpack_require__.d(build_module_verse_namespaceObject, "name", function() { return verse_name; });
  1246. __webpack_require__.d(build_module_verse_namespaceObject, "settings", function() { return verse_settings; });
  1247. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js
  1248. var build_module_video_namespaceObject = {};
  1249. __webpack_require__.r(build_module_video_namespaceObject);
  1250. __webpack_require__.d(build_module_video_namespaceObject, "metadata", function() { return video_metadata; });
  1251. __webpack_require__.d(build_module_video_namespaceObject, "name", function() { return video_name; });
  1252. __webpack_require__.d(build_module_video_namespaceObject, "settings", function() { return video_settings; });
  1253. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
  1254. var tag_cloud_namespaceObject = {};
  1255. __webpack_require__.r(tag_cloud_namespaceObject);
  1256. __webpack_require__.d(tag_cloud_namespaceObject, "metadata", function() { return tag_cloud_metadata; });
  1257. __webpack_require__.d(tag_cloud_namespaceObject, "name", function() { return tag_cloud_name; });
  1258. __webpack_require__.d(tag_cloud_namespaceObject, "settings", function() { return tag_cloud_settings; });
  1259. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js
  1260. var freeform_namespaceObject = {};
  1261. __webpack_require__.r(freeform_namespaceObject);
  1262. __webpack_require__.d(freeform_namespaceObject, "metadata", function() { return freeform_metadata; });
  1263. __webpack_require__.d(freeform_namespaceObject, "name", function() { return freeform_name; });
  1264. __webpack_require__.d(freeform_namespaceObject, "settings", function() { return freeform_settings; });
  1265. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
  1266. var social_links_namespaceObject = {};
  1267. __webpack_require__.r(social_links_namespaceObject);
  1268. __webpack_require__.d(social_links_namespaceObject, "metadata", function() { return social_links_metadata; });
  1269. __webpack_require__.d(social_links_namespaceObject, "name", function() { return social_links_name; });
  1270. __webpack_require__.d(social_links_namespaceObject, "settings", function() { return social_links_settings; });
  1271. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
  1272. var social_link_namespaceObject = {};
  1273. __webpack_require__.r(social_link_namespaceObject);
  1274. __webpack_require__.d(social_link_namespaceObject, "metadata", function() { return social_link_metadata; });
  1275. __webpack_require__.d(social_link_namespaceObject, "name", function() { return social_link_name; });
  1276. __webpack_require__.d(social_link_namespaceObject, "settings", function() { return social_link_settings; });
  1277. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
  1278. var build_module_site_logo_namespaceObject = {};
  1279. __webpack_require__.r(build_module_site_logo_namespaceObject);
  1280. __webpack_require__.d(build_module_site_logo_namespaceObject, "metadata", function() { return site_logo_metadata; });
  1281. __webpack_require__.d(build_module_site_logo_namespaceObject, "name", function() { return site_logo_name; });
  1282. __webpack_require__.d(build_module_site_logo_namespaceObject, "settings", function() { return site_logo_settings; });
  1283. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
  1284. var site_tagline_namespaceObject = {};
  1285. __webpack_require__.r(site_tagline_namespaceObject);
  1286. __webpack_require__.d(site_tagline_namespaceObject, "metadata", function() { return site_tagline_metadata; });
  1287. __webpack_require__.d(site_tagline_namespaceObject, "name", function() { return site_tagline_name; });
  1288. __webpack_require__.d(site_tagline_namespaceObject, "settings", function() { return site_tagline_settings; });
  1289. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js
  1290. var site_title_namespaceObject = {};
  1291. __webpack_require__.r(site_title_namespaceObject);
  1292. __webpack_require__.d(site_title_namespaceObject, "metadata", function() { return site_title_metadata; });
  1293. __webpack_require__.d(site_title_namespaceObject, "name", function() { return site_title_name; });
  1294. __webpack_require__.d(site_title_namespaceObject, "settings", function() { return site_title_settings; });
  1295. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js
  1296. var query_namespaceObject = {};
  1297. __webpack_require__.r(query_namespaceObject);
  1298. __webpack_require__.d(query_namespaceObject, "metadata", function() { return query_metadata; });
  1299. __webpack_require__.d(query_namespaceObject, "name", function() { return query_name; });
  1300. __webpack_require__.d(query_namespaceObject, "settings", function() { return query_settings; });
  1301. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js
  1302. var post_template_namespaceObject = {};
  1303. __webpack_require__.r(post_template_namespaceObject);
  1304. __webpack_require__.d(post_template_namespaceObject, "metadata", function() { return post_template_metadata; });
  1305. __webpack_require__.d(post_template_namespaceObject, "name", function() { return post_template_name; });
  1306. __webpack_require__.d(post_template_namespaceObject, "settings", function() { return post_template_settings; });
  1307. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js
  1308. var query_title_namespaceObject = {};
  1309. __webpack_require__.r(query_title_namespaceObject);
  1310. __webpack_require__.d(query_title_namespaceObject, "metadata", function() { return query_title_metadata; });
  1311. __webpack_require__.d(query_title_namespaceObject, "name", function() { return query_title_name; });
  1312. __webpack_require__.d(query_title_namespaceObject, "settings", function() { return query_title_settings; });
  1313. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
  1314. var build_module_query_pagination_namespaceObject = {};
  1315. __webpack_require__.r(build_module_query_pagination_namespaceObject);
  1316. __webpack_require__.d(build_module_query_pagination_namespaceObject, "metadata", function() { return query_pagination_metadata; });
  1317. __webpack_require__.d(build_module_query_pagination_namespaceObject, "name", function() { return query_pagination_name; });
  1318. __webpack_require__.d(build_module_query_pagination_namespaceObject, "settings", function() { return query_pagination_settings; });
  1319. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
  1320. var build_module_query_pagination_next_namespaceObject = {};
  1321. __webpack_require__.r(build_module_query_pagination_next_namespaceObject);
  1322. __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "metadata", function() { return query_pagination_next_metadata; });
  1323. __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "name", function() { return query_pagination_next_name; });
  1324. __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "settings", function() { return query_pagination_next_settings; });
  1325. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
  1326. var build_module_query_pagination_numbers_namespaceObject = {};
  1327. __webpack_require__.r(build_module_query_pagination_numbers_namespaceObject);
  1328. __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "metadata", function() { return query_pagination_numbers_metadata; });
  1329. __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "name", function() { return query_pagination_numbers_name; });
  1330. __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "settings", function() { return query_pagination_numbers_settings; });
  1331. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
  1332. var build_module_query_pagination_previous_namespaceObject = {};
  1333. __webpack_require__.r(build_module_query_pagination_previous_namespaceObject);
  1334. __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "metadata", function() { return query_pagination_previous_metadata; });
  1335. __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "name", function() { return query_pagination_previous_name; });
  1336. __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "settings", function() { return query_pagination_previous_settings; });
  1337. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js
  1338. var build_module_post_title_namespaceObject = {};
  1339. __webpack_require__.r(build_module_post_title_namespaceObject);
  1340. __webpack_require__.d(build_module_post_title_namespaceObject, "metadata", function() { return post_title_metadata; });
  1341. __webpack_require__.d(build_module_post_title_namespaceObject, "name", function() { return post_title_name; });
  1342. __webpack_require__.d(build_module_post_title_namespaceObject, "settings", function() { return post_title_settings; });
  1343. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js
  1344. var build_module_post_content_namespaceObject = {};
  1345. __webpack_require__.r(build_module_post_content_namespaceObject);
  1346. __webpack_require__.d(build_module_post_content_namespaceObject, "metadata", function() { return post_content_metadata; });
  1347. __webpack_require__.d(build_module_post_content_namespaceObject, "name", function() { return post_content_name; });
  1348. __webpack_require__.d(build_module_post_content_namespaceObject, "settings", function() { return post_content_settings; });
  1349. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js
  1350. var build_module_post_date_namespaceObject = {};
  1351. __webpack_require__.r(build_module_post_date_namespaceObject);
  1352. __webpack_require__.d(build_module_post_date_namespaceObject, "metadata", function() { return post_date_metadata; });
  1353. __webpack_require__.d(build_module_post_date_namespaceObject, "name", function() { return post_date_name; });
  1354. __webpack_require__.d(build_module_post_date_namespaceObject, "settings", function() { return post_date_settings; });
  1355. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
  1356. var build_module_post_excerpt_namespaceObject = {};
  1357. __webpack_require__.r(build_module_post_excerpt_namespaceObject);
  1358. __webpack_require__.d(build_module_post_excerpt_namespaceObject, "metadata", function() { return post_excerpt_metadata; });
  1359. __webpack_require__.d(build_module_post_excerpt_namespaceObject, "name", function() { return post_excerpt_name; });
  1360. __webpack_require__.d(build_module_post_excerpt_namespaceObject, "settings", function() { return post_excerpt_settings; });
  1361. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
  1362. var build_module_post_featured_image_namespaceObject = {};
  1363. __webpack_require__.r(build_module_post_featured_image_namespaceObject);
  1364. __webpack_require__.d(build_module_post_featured_image_namespaceObject, "metadata", function() { return post_featured_image_metadata; });
  1365. __webpack_require__.d(build_module_post_featured_image_namespaceObject, "name", function() { return post_featured_image_name; });
  1366. __webpack_require__.d(build_module_post_featured_image_namespaceObject, "settings", function() { return post_featured_image_settings; });
  1367. // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
  1368. var post_terms_namespaceObject = {};
  1369. __webpack_require__.r(post_terms_namespaceObject);
  1370. __webpack_require__.d(post_terms_namespaceObject, "metadata", function() { return post_terms_metadata; });
  1371. __webpack_require__.d(post_terms_namespaceObject, "name", function() { return post_terms_name; });
  1372. __webpack_require__.d(post_terms_namespaceObject, "settings", function() { return post_terms_settings; });
  1373. // EXTERNAL MODULE: external ["wp","coreData"]
  1374. var external_wp_coreData_ = __webpack_require__("jZUy");
  1375. // EXTERNAL MODULE: external ["wp","blockEditor"]
  1376. var external_wp_blockEditor_ = __webpack_require__("axFQ");
  1377. // EXTERNAL MODULE: external ["wp","blocks"]
  1378. var external_wp_blocks_ = __webpack_require__("HSyU");
  1379. // EXTERNAL MODULE: external "lodash"
  1380. var external_lodash_ = __webpack_require__("YLtl");
  1381. // EXTERNAL MODULE: external ["wp","i18n"]
  1382. var external_wp_i18n_ = __webpack_require__("l3Sj");
  1383. // EXTERNAL MODULE: external ["wp","element"]
  1384. var external_wp_element_ = __webpack_require__("GRId");
  1385. // EXTERNAL MODULE: external ["wp","primitives"]
  1386. var external_wp_primitives_ = __webpack_require__("Tqx9");
  1387. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/paragraph.js
  1388. /**
  1389. * WordPress dependencies
  1390. */
  1391. const paragraph = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  1392. xmlns: "http://www.w3.org/2000/svg",
  1393. viewBox: "0 0 24 24"
  1394. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  1395. d: "M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"
  1396. }));
  1397. /* harmony default export */ var library_paragraph = (paragraph);
  1398. // EXTERNAL MODULE: ./node_modules/classnames/index.js
  1399. var classnames = __webpack_require__("TSYQ");
  1400. var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  1401. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
  1402. /**
  1403. * External dependencies
  1404. */
  1405. /**
  1406. * WordPress dependencies
  1407. */
  1408. const supports = {
  1409. className: false
  1410. };
  1411. const deprecated_blockAttributes = {
  1412. align: {
  1413. type: 'string'
  1414. },
  1415. content: {
  1416. type: 'string',
  1417. source: 'html',
  1418. selector: 'p',
  1419. default: ''
  1420. },
  1421. dropCap: {
  1422. type: 'boolean',
  1423. default: false
  1424. },
  1425. placeholder: {
  1426. type: 'string'
  1427. },
  1428. textColor: {
  1429. type: 'string'
  1430. },
  1431. backgroundColor: {
  1432. type: 'string'
  1433. },
  1434. fontSize: {
  1435. type: 'string'
  1436. },
  1437. direction: {
  1438. type: 'string',
  1439. enum: ['ltr', 'rtl']
  1440. },
  1441. style: {
  1442. type: 'object'
  1443. }
  1444. };
  1445. const migrateCustomColorsAndFontSizes = attributes => {
  1446. if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) {
  1447. return attributes;
  1448. }
  1449. const style = {};
  1450. if (attributes.customTextColor || attributes.customBackgroundColor) {
  1451. style.color = {};
  1452. }
  1453. if (attributes.customTextColor) {
  1454. style.color.text = attributes.customTextColor;
  1455. }
  1456. if (attributes.customBackgroundColor) {
  1457. style.color.background = attributes.customBackgroundColor;
  1458. }
  1459. if (attributes.customFontSize) {
  1460. style.typography = {
  1461. fontSize: attributes.customFontSize
  1462. };
  1463. }
  1464. return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customFontSize']),
  1465. style
  1466. };
  1467. };
  1468. const deprecated = [{
  1469. supports,
  1470. attributes: { ...Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style']),
  1471. customTextColor: {
  1472. type: 'string'
  1473. },
  1474. customBackgroundColor: {
  1475. type: 'string'
  1476. },
  1477. customFontSize: {
  1478. type: 'number'
  1479. }
  1480. },
  1481. migrate: migrateCustomColorsAndFontSizes,
  1482. save({
  1483. attributes
  1484. }) {
  1485. const {
  1486. align,
  1487. content,
  1488. dropCap,
  1489. backgroundColor,
  1490. textColor,
  1491. customBackgroundColor,
  1492. customTextColor,
  1493. fontSize,
  1494. customFontSize,
  1495. direction
  1496. } = attributes;
  1497. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  1498. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  1499. const fontSizeClass = Object(external_wp_blockEditor_["getFontSizeClass"])(fontSize);
  1500. const className = classnames_default()({
  1501. 'has-text-color': textColor || customTextColor,
  1502. 'has-background': backgroundColor || customBackgroundColor,
  1503. 'has-drop-cap': dropCap,
  1504. [`has-text-align-${align}`]: align,
  1505. [fontSizeClass]: fontSizeClass,
  1506. [textClass]: textClass,
  1507. [backgroundClass]: backgroundClass
  1508. });
  1509. const styles = {
  1510. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  1511. color: textClass ? undefined : customTextColor,
  1512. fontSize: fontSizeClass ? undefined : customFontSize
  1513. };
  1514. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  1515. tagName: "p",
  1516. style: styles,
  1517. className: className ? className : undefined,
  1518. value: content,
  1519. dir: direction
  1520. });
  1521. }
  1522. }, {
  1523. supports,
  1524. attributes: { ...Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style']),
  1525. customTextColor: {
  1526. type: 'string'
  1527. },
  1528. customBackgroundColor: {
  1529. type: 'string'
  1530. },
  1531. customFontSize: {
  1532. type: 'number'
  1533. }
  1534. },
  1535. migrate: migrateCustomColorsAndFontSizes,
  1536. save({
  1537. attributes
  1538. }) {
  1539. const {
  1540. align,
  1541. content,
  1542. dropCap,
  1543. backgroundColor,
  1544. textColor,
  1545. customBackgroundColor,
  1546. customTextColor,
  1547. fontSize,
  1548. customFontSize,
  1549. direction
  1550. } = attributes;
  1551. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  1552. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  1553. const fontSizeClass = Object(external_wp_blockEditor_["getFontSizeClass"])(fontSize);
  1554. const className = classnames_default()({
  1555. 'has-text-color': textColor || customTextColor,
  1556. 'has-background': backgroundColor || customBackgroundColor,
  1557. 'has-drop-cap': dropCap,
  1558. [fontSizeClass]: fontSizeClass,
  1559. [textClass]: textClass,
  1560. [backgroundClass]: backgroundClass
  1561. });
  1562. const styles = {
  1563. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  1564. color: textClass ? undefined : customTextColor,
  1565. fontSize: fontSizeClass ? undefined : customFontSize,
  1566. textAlign: align
  1567. };
  1568. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  1569. tagName: "p",
  1570. style: styles,
  1571. className: className ? className : undefined,
  1572. value: content,
  1573. dir: direction
  1574. });
  1575. }
  1576. }, {
  1577. supports,
  1578. attributes: { ...Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style']),
  1579. customTextColor: {
  1580. type: 'string'
  1581. },
  1582. customBackgroundColor: {
  1583. type: 'string'
  1584. },
  1585. customFontSize: {
  1586. type: 'number'
  1587. },
  1588. width: {
  1589. type: 'string'
  1590. }
  1591. },
  1592. migrate: migrateCustomColorsAndFontSizes,
  1593. save({
  1594. attributes
  1595. }) {
  1596. const {
  1597. width,
  1598. align,
  1599. content,
  1600. dropCap,
  1601. backgroundColor,
  1602. textColor,
  1603. customBackgroundColor,
  1604. customTextColor,
  1605. fontSize,
  1606. customFontSize
  1607. } = attributes;
  1608. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  1609. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  1610. const fontSizeClass = fontSize && `is-${fontSize}-text`;
  1611. const className = classnames_default()({
  1612. [`align${width}`]: width,
  1613. 'has-background': backgroundColor || customBackgroundColor,
  1614. 'has-drop-cap': dropCap,
  1615. [fontSizeClass]: fontSizeClass,
  1616. [textClass]: textClass,
  1617. [backgroundClass]: backgroundClass
  1618. });
  1619. const styles = {
  1620. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  1621. color: textClass ? undefined : customTextColor,
  1622. fontSize: fontSizeClass ? undefined : customFontSize,
  1623. textAlign: align
  1624. };
  1625. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  1626. tagName: "p",
  1627. style: styles,
  1628. className: className ? className : undefined,
  1629. value: content
  1630. });
  1631. }
  1632. }, {
  1633. supports,
  1634. attributes: Object(external_lodash_["omit"])({ ...deprecated_blockAttributes,
  1635. fontSize: {
  1636. type: 'number'
  1637. }
  1638. }, ['style']),
  1639. save({
  1640. attributes
  1641. }) {
  1642. const {
  1643. width,
  1644. align,
  1645. content,
  1646. dropCap,
  1647. backgroundColor,
  1648. textColor,
  1649. fontSize
  1650. } = attributes;
  1651. const className = classnames_default()({
  1652. [`align${width}`]: width,
  1653. 'has-background': backgroundColor,
  1654. 'has-drop-cap': dropCap
  1655. });
  1656. const styles = {
  1657. backgroundColor,
  1658. color: textColor,
  1659. fontSize,
  1660. textAlign: align
  1661. };
  1662. return Object(external_wp_element_["createElement"])("p", {
  1663. style: styles,
  1664. className: className ? className : undefined
  1665. }, content);
  1666. },
  1667. migrate(attributes) {
  1668. return migrateCustomColorsAndFontSizes(Object(external_lodash_["omit"])({ ...attributes,
  1669. customFontSize: Object(external_lodash_["isFinite"])(attributes.fontSize) ? attributes.fontSize : undefined,
  1670. customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined,
  1671. customBackgroundColor: attributes.backgroundColor && '#' === attributes.backgroundColor[0] ? attributes.backgroundColor : undefined
  1672. }), ['fontSize', 'textColor', 'backgroundColor', 'style']);
  1673. }
  1674. }, {
  1675. supports,
  1676. attributes: { ...deprecated_blockAttributes,
  1677. content: {
  1678. type: 'string',
  1679. source: 'html',
  1680. default: ''
  1681. }
  1682. },
  1683. save({
  1684. attributes
  1685. }) {
  1686. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.content);
  1687. },
  1688. migrate(attributes) {
  1689. return attributes;
  1690. }
  1691. }];
  1692. /* harmony default export */ var paragraph_deprecated = (deprecated);
  1693. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  1694. var esm_extends = __webpack_require__("wx14");
  1695. // EXTERNAL MODULE: external ["wp","components"]
  1696. var external_wp_components_ = __webpack_require__("tI+e");
  1697. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
  1698. /**
  1699. * WordPress dependencies
  1700. */
  1701. const formatLtr = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  1702. xmlns: "http://www.w3.org/2000/svg",
  1703. viewBox: "-2 -2 24 24"
  1704. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  1705. d: "M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"
  1706. }));
  1707. /* harmony default export */ var format_ltr = (formatLtr);
  1708. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
  1709. /**
  1710. * External dependencies
  1711. */
  1712. /**
  1713. * WordPress dependencies
  1714. */
  1715. const edit_name = 'core/paragraph';
  1716. function ParagraphRTLControl({
  1717. direction,
  1718. setDirection
  1719. }) {
  1720. return Object(external_wp_i18n_["isRTL"])() && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarDropdownMenu"], {
  1721. controls: [{
  1722. icon: format_ltr,
  1723. title: Object(external_wp_i18n_["_x"])('Left to right', 'editor button'),
  1724. isActive: direction === 'ltr',
  1725. onClick() {
  1726. setDirection(direction === 'ltr' ? undefined : 'ltr');
  1727. }
  1728. }]
  1729. });
  1730. }
  1731. function ParagraphBlock({
  1732. attributes,
  1733. mergeBlocks,
  1734. onReplace,
  1735. onRemove,
  1736. setAttributes,
  1737. clientId
  1738. }) {
  1739. const {
  1740. align,
  1741. content,
  1742. direction,
  1743. dropCap,
  1744. placeholder
  1745. } = attributes;
  1746. const isDropCapFeatureEnabled = Object(external_wp_blockEditor_["useSetting"])('typography.dropCap');
  1747. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  1748. className: classnames_default()({
  1749. 'has-drop-cap': dropCap,
  1750. [`has-text-align-${align}`]: align
  1751. }),
  1752. style: {
  1753. direction
  1754. }
  1755. });
  1756. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  1757. group: "block"
  1758. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  1759. value: align,
  1760. onChange: newAlign => setAttributes({
  1761. align: newAlign
  1762. })
  1763. }), Object(external_wp_element_["createElement"])(ParagraphRTLControl, {
  1764. direction: direction,
  1765. setDirection: newDirection => setAttributes({
  1766. direction: newDirection
  1767. })
  1768. })), isDropCapFeatureEnabled && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  1769. title: Object(external_wp_i18n_["__"])('Text settings')
  1770. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  1771. label: Object(external_wp_i18n_["__"])('Drop cap'),
  1772. checked: !!dropCap,
  1773. onChange: () => setAttributes({
  1774. dropCap: !dropCap
  1775. }),
  1776. help: dropCap ? Object(external_wp_i18n_["__"])('Showing large initial letter.') : Object(external_wp_i18n_["__"])('Toggle to show a large initial letter.')
  1777. }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
  1778. identifier: "content",
  1779. tagName: "p"
  1780. }, blockProps, {
  1781. value: content,
  1782. onChange: newContent => setAttributes({
  1783. content: newContent
  1784. }),
  1785. onSplit: (value, isOriginal) => {
  1786. let newAttributes;
  1787. if (isOriginal || value) {
  1788. newAttributes = { ...attributes,
  1789. content: value
  1790. };
  1791. }
  1792. const block = Object(external_wp_blocks_["createBlock"])(edit_name, newAttributes);
  1793. if (isOriginal) {
  1794. block.clientId = clientId;
  1795. }
  1796. return block;
  1797. },
  1798. onMerge: mergeBlocks,
  1799. onReplace: onReplace,
  1800. onRemove: onRemove,
  1801. "aria-label": content ? Object(external_wp_i18n_["__"])('Paragraph block') : Object(external_wp_i18n_["__"])('Empty block; start writing or type forward slash to choose a block'),
  1802. "data-empty": content ? false : true,
  1803. placeholder: placeholder || Object(external_wp_i18n_["__"])('Type / to choose a block'),
  1804. __unstableEmbedURLOnPaste: true,
  1805. __unstableAllowPrefixTransformations: true
  1806. })));
  1807. }
  1808. /* harmony default export */ var edit = (ParagraphBlock);
  1809. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
  1810. /**
  1811. * External dependencies
  1812. */
  1813. /**
  1814. * WordPress dependencies
  1815. */
  1816. function save({
  1817. attributes
  1818. }) {
  1819. const {
  1820. align,
  1821. content,
  1822. dropCap,
  1823. direction
  1824. } = attributes;
  1825. const className = classnames_default()({
  1826. 'has-drop-cap': dropCap,
  1827. [`has-text-align-${align}`]: align
  1828. });
  1829. return Object(external_wp_element_["createElement"])("p", external_wp_blockEditor_["useBlockProps"].save({
  1830. className,
  1831. dir: direction
  1832. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  1833. value: content
  1834. }));
  1835. }
  1836. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
  1837. /**
  1838. * WordPress dependencies
  1839. */
  1840. /**
  1841. * Internal dependencies
  1842. */
  1843. const {
  1844. name: transforms_name
  1845. } = {
  1846. apiVersion: 2,
  1847. name: "core/paragraph",
  1848. title: "Paragraph",
  1849. category: "text",
  1850. description: "Start with the building block of all narrative.",
  1851. keywords: ["text"],
  1852. textdomain: "default",
  1853. attributes: {
  1854. align: {
  1855. type: "string"
  1856. },
  1857. content: {
  1858. type: "string",
  1859. source: "html",
  1860. selector: "p",
  1861. "default": "",
  1862. __experimentalRole: "content"
  1863. },
  1864. dropCap: {
  1865. type: "boolean",
  1866. "default": false
  1867. },
  1868. placeholder: {
  1869. type: "string"
  1870. },
  1871. direction: {
  1872. type: "string",
  1873. "enum": ["ltr", "rtl"]
  1874. }
  1875. },
  1876. supports: {
  1877. anchor: true,
  1878. className: false,
  1879. color: {
  1880. link: true
  1881. },
  1882. typography: {
  1883. fontSize: true,
  1884. lineHeight: true
  1885. },
  1886. __experimentalSelector: "p",
  1887. __unstablePasteTextInline: true
  1888. },
  1889. editorStyle: "wp-block-paragraph-editor",
  1890. style: "wp-block-paragraph"
  1891. };
  1892. const transforms = {
  1893. from: [{
  1894. type: 'raw',
  1895. // Paragraph is a fallback and should be matched last.
  1896. priority: 20,
  1897. selector: 'p',
  1898. schema: ({
  1899. phrasingContentSchema,
  1900. isPaste
  1901. }) => ({
  1902. p: {
  1903. children: phrasingContentSchema,
  1904. attributes: isPaste ? [] : ['style', 'id']
  1905. }
  1906. }),
  1907. transform(node) {
  1908. const attributes = Object(external_wp_blocks_["getBlockAttributes"])(transforms_name, node.outerHTML);
  1909. const {
  1910. textAlign
  1911. } = node.style || {};
  1912. if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
  1913. attributes.align = textAlign;
  1914. }
  1915. return Object(external_wp_blocks_["createBlock"])(transforms_name, attributes);
  1916. }
  1917. }]
  1918. };
  1919. /* harmony default export */ var paragraph_transforms = (transforms);
  1920. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
  1921. /**
  1922. * External dependencies
  1923. */
  1924. /**
  1925. * WordPress dependencies
  1926. */
  1927. /**
  1928. * Internal dependencies
  1929. */
  1930. const paragraph_metadata = {
  1931. apiVersion: 2,
  1932. name: "core/paragraph",
  1933. title: "Paragraph",
  1934. category: "text",
  1935. description: "Start with the building block of all narrative.",
  1936. keywords: ["text"],
  1937. textdomain: "default",
  1938. attributes: {
  1939. align: {
  1940. type: "string"
  1941. },
  1942. content: {
  1943. type: "string",
  1944. source: "html",
  1945. selector: "p",
  1946. "default": "",
  1947. __experimentalRole: "content"
  1948. },
  1949. dropCap: {
  1950. type: "boolean",
  1951. "default": false
  1952. },
  1953. placeholder: {
  1954. type: "string"
  1955. },
  1956. direction: {
  1957. type: "string",
  1958. "enum": ["ltr", "rtl"]
  1959. }
  1960. },
  1961. supports: {
  1962. anchor: true,
  1963. className: false,
  1964. color: {
  1965. link: true
  1966. },
  1967. typography: {
  1968. fontSize: true,
  1969. lineHeight: true
  1970. },
  1971. __experimentalSelector: "p",
  1972. __unstablePasteTextInline: true
  1973. },
  1974. editorStyle: "wp-block-paragraph-editor",
  1975. style: "wp-block-paragraph"
  1976. };
  1977. const {
  1978. name: paragraph_name
  1979. } = paragraph_metadata;
  1980. const paragraph_settings = {
  1981. icon: library_paragraph,
  1982. example: {
  1983. attributes: {
  1984. content: Object(external_wp_i18n_["__"])('In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'),
  1985. style: {
  1986. typography: {
  1987. fontSize: 28
  1988. }
  1989. },
  1990. dropCap: true
  1991. }
  1992. },
  1993. __experimentalLabel(attributes, {
  1994. context
  1995. }) {
  1996. if (context === 'accessibility') {
  1997. const {
  1998. content
  1999. } = attributes;
  2000. return Object(external_lodash_["isEmpty"])(content) ? Object(external_wp_i18n_["__"])('Empty') : content;
  2001. }
  2002. },
  2003. transforms: paragraph_transforms,
  2004. deprecated: paragraph_deprecated,
  2005. merge(attributes, attributesToMerge) {
  2006. return {
  2007. content: (attributes.content || '') + (attributesToMerge.content || '')
  2008. };
  2009. },
  2010. edit: edit,
  2011. save: save
  2012. };
  2013. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js
  2014. /**
  2015. * WordPress dependencies
  2016. */
  2017. const image_image = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  2018. viewBox: "0 0 24 24",
  2019. xmlns: "http://www.w3.org/2000/svg"
  2020. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  2021. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"
  2022. }));
  2023. /* harmony default export */ var library_image = (image_image);
  2024. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
  2025. /**
  2026. * External dependencies
  2027. */
  2028. /**
  2029. * WordPress dependencies
  2030. */
  2031. const image_deprecated_blockAttributes = {
  2032. align: {
  2033. type: 'string'
  2034. },
  2035. url: {
  2036. type: 'string',
  2037. source: 'attribute',
  2038. selector: 'img',
  2039. attribute: 'src'
  2040. },
  2041. alt: {
  2042. type: 'string',
  2043. source: 'attribute',
  2044. selector: 'img',
  2045. attribute: 'alt',
  2046. default: ''
  2047. },
  2048. caption: {
  2049. type: 'string',
  2050. source: 'html',
  2051. selector: 'figcaption'
  2052. },
  2053. href: {
  2054. type: 'string',
  2055. source: 'attribute',
  2056. selector: 'figure > a',
  2057. attribute: 'href'
  2058. },
  2059. rel: {
  2060. type: 'string',
  2061. source: 'attribute',
  2062. selector: 'figure > a',
  2063. attribute: 'rel'
  2064. },
  2065. linkClass: {
  2066. type: 'string',
  2067. source: 'attribute',
  2068. selector: 'figure > a',
  2069. attribute: 'class'
  2070. },
  2071. id: {
  2072. type: 'number'
  2073. },
  2074. width: {
  2075. type: 'number'
  2076. },
  2077. height: {
  2078. type: 'number'
  2079. },
  2080. linkDestination: {
  2081. type: 'string'
  2082. },
  2083. linkTarget: {
  2084. type: 'string',
  2085. source: 'attribute',
  2086. selector: 'figure > a',
  2087. attribute: 'target'
  2088. }
  2089. };
  2090. const deprecated_deprecated = [{
  2091. attributes: image_deprecated_blockAttributes,
  2092. save({
  2093. attributes
  2094. }) {
  2095. const {
  2096. url,
  2097. alt,
  2098. caption,
  2099. align,
  2100. href,
  2101. width,
  2102. height,
  2103. id
  2104. } = attributes;
  2105. const classes = classnames_default()({
  2106. [`align${align}`]: align,
  2107. 'is-resized': width || height
  2108. });
  2109. const image = Object(external_wp_element_["createElement"])("img", {
  2110. src: url,
  2111. alt: alt,
  2112. className: id ? `wp-image-${id}` : null,
  2113. width: width,
  2114. height: height
  2115. });
  2116. return Object(external_wp_element_["createElement"])("figure", {
  2117. className: classes
  2118. }, href ? Object(external_wp_element_["createElement"])("a", {
  2119. href: href
  2120. }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  2121. tagName: "figcaption",
  2122. value: caption
  2123. }));
  2124. }
  2125. }, {
  2126. attributes: image_deprecated_blockAttributes,
  2127. save({
  2128. attributes
  2129. }) {
  2130. const {
  2131. url,
  2132. alt,
  2133. caption,
  2134. align,
  2135. href,
  2136. width,
  2137. height,
  2138. id
  2139. } = attributes;
  2140. const image = Object(external_wp_element_["createElement"])("img", {
  2141. src: url,
  2142. alt: alt,
  2143. className: id ? `wp-image-${id}` : null,
  2144. width: width,
  2145. height: height
  2146. });
  2147. return Object(external_wp_element_["createElement"])("figure", {
  2148. className: align ? `align${align}` : null
  2149. }, href ? Object(external_wp_element_["createElement"])("a", {
  2150. href: href
  2151. }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  2152. tagName: "figcaption",
  2153. value: caption
  2154. }));
  2155. }
  2156. }, {
  2157. attributes: image_deprecated_blockAttributes,
  2158. save({
  2159. attributes
  2160. }) {
  2161. const {
  2162. url,
  2163. alt,
  2164. caption,
  2165. align,
  2166. href,
  2167. width,
  2168. height
  2169. } = attributes;
  2170. const extraImageProps = width || height ? {
  2171. width,
  2172. height
  2173. } : {};
  2174. const image = Object(external_wp_element_["createElement"])("img", Object(esm_extends["a" /* default */])({
  2175. src: url,
  2176. alt: alt
  2177. }, extraImageProps));
  2178. let figureStyle = {};
  2179. if (width) {
  2180. figureStyle = {
  2181. width
  2182. };
  2183. } else if (align === 'left' || align === 'right') {
  2184. figureStyle = {
  2185. maxWidth: '50%'
  2186. };
  2187. }
  2188. return Object(external_wp_element_["createElement"])("figure", {
  2189. className: align ? `align${align}` : null,
  2190. style: figureStyle
  2191. }, href ? Object(external_wp_element_["createElement"])("a", {
  2192. href: href
  2193. }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  2194. tagName: "figcaption",
  2195. value: caption
  2196. }));
  2197. }
  2198. }];
  2199. /* harmony default export */ var image_deprecated = (deprecated_deprecated);
  2200. // EXTERNAL MODULE: external ["wp","blob"]
  2201. var external_wp_blob_ = __webpack_require__("xTGt");
  2202. // EXTERNAL MODULE: external ["wp","data"]
  2203. var external_wp_data_ = __webpack_require__("1ZqX");
  2204. // EXTERNAL MODULE: external ["wp","compose"]
  2205. var external_wp_compose_ = __webpack_require__("K9lf");
  2206. // EXTERNAL MODULE: external ["wp","url"]
  2207. var external_wp_url_ = __webpack_require__("Mmq9");
  2208. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
  2209. /**
  2210. * WordPress dependencies
  2211. */
  2212. const crop_crop = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  2213. xmlns: "http://www.w3.org/2000/svg",
  2214. viewBox: "0 0 24 24"
  2215. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  2216. d: "M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z"
  2217. }));
  2218. /* harmony default export */ var library_crop = (crop_crop);
  2219. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
  2220. var upload = __webpack_require__("NTP4");
  2221. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/overlay-text.js
  2222. /**
  2223. * WordPress dependencies
  2224. */
  2225. const overlayText = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  2226. xmlns: "http://www.w3.org/2000/svg",
  2227. viewBox: "0 0 24 24"
  2228. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  2229. d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"
  2230. }));
  2231. /* harmony default export */ var overlay_text = (overlayText);
  2232. // EXTERNAL MODULE: external ["wp","notices"]
  2233. var external_wp_notices_ = __webpack_require__("onLe");
  2234. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/constants.js
  2235. const ASPECT_RATIOS = [// Common video resolutions.
  2236. {
  2237. ratio: '2.33',
  2238. className: 'wp-embed-aspect-21-9'
  2239. }, {
  2240. ratio: '2.00',
  2241. className: 'wp-embed-aspect-18-9'
  2242. }, {
  2243. ratio: '1.78',
  2244. className: 'wp-embed-aspect-16-9'
  2245. }, {
  2246. ratio: '1.33',
  2247. className: 'wp-embed-aspect-4-3'
  2248. }, // Vertical video and instagram square video support.
  2249. {
  2250. ratio: '1.00',
  2251. className: 'wp-embed-aspect-1-1'
  2252. }, {
  2253. ratio: '0.56',
  2254. className: 'wp-embed-aspect-9-16'
  2255. }, {
  2256. ratio: '0.50',
  2257. className: 'wp-embed-aspect-1-2'
  2258. }];
  2259. const WP_EMBED_TYPE = 'wp-embed';
  2260. // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js
  2261. var dedupe = __webpack_require__("A/WM");
  2262. var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe);
  2263. // EXTERNAL MODULE: ./node_modules/memize/index.js
  2264. var memize = __webpack_require__("4eJC");
  2265. var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
  2266. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
  2267. /**
  2268. * Internal dependencies
  2269. */
  2270. /**
  2271. * External dependencies
  2272. */
  2273. /**
  2274. * WordPress dependencies
  2275. */
  2276. /**
  2277. * Internal dependencies
  2278. */
  2279. const util_metadata = {
  2280. apiVersion: 2,
  2281. name: "core/embed",
  2282. title: "Embed",
  2283. category: "embed",
  2284. description: "Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.",
  2285. textdomain: "default",
  2286. attributes: {
  2287. url: {
  2288. type: "string"
  2289. },
  2290. caption: {
  2291. type: "string",
  2292. source: "html",
  2293. selector: "figcaption"
  2294. },
  2295. type: {
  2296. type: "string"
  2297. },
  2298. providerNameSlug: {
  2299. type: "string"
  2300. },
  2301. allowResponsive: {
  2302. type: "boolean",
  2303. "default": true
  2304. },
  2305. responsive: {
  2306. type: "boolean",
  2307. "default": false
  2308. },
  2309. previewable: {
  2310. type: "boolean",
  2311. "default": true
  2312. }
  2313. },
  2314. supports: {
  2315. align: true
  2316. },
  2317. editorStyle: "wp-block-embed-editor",
  2318. style: "wp-block-embed"
  2319. };
  2320. const {
  2321. name: DEFAULT_EMBED_BLOCK
  2322. } = util_metadata;
  2323. /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
  2324. /**
  2325. * Returns the embed block's information by matching the provided service provider
  2326. *
  2327. * @param {string} provider The embed block's provider
  2328. * @return {WPBlockVariation} The embed block's information
  2329. */
  2330. const getEmbedInfoByProvider = provider => {
  2331. var _getBlockVariations;
  2332. return (_getBlockVariations = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations === void 0 ? void 0 : _getBlockVariations.find(({
  2333. name
  2334. }) => name === provider);
  2335. };
  2336. /**
  2337. * Returns true if any of the regular expressions match the URL.
  2338. *
  2339. * @param {string} url The URL to test.
  2340. * @param {Array} patterns The list of regular expressions to test agains.
  2341. * @return {boolean} True if any of the regular expressions match the URL.
  2342. */
  2343. const matchesPatterns = (url, patterns = []) => patterns.some(pattern => url.match(pattern));
  2344. /**
  2345. * Finds the block variation that should be used for the URL,
  2346. * based on the provided URL and the variation's patterns.
  2347. *
  2348. * @param {string} url The URL to test.
  2349. * @return {WPBlockVariation} The block variation that should be used for this URL
  2350. */
  2351. const findMoreSuitableBlock = url => {
  2352. var _getBlockVariations2;
  2353. return (_getBlockVariations2 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations2 === void 0 ? void 0 : _getBlockVariations2.find(({
  2354. patterns
  2355. }) => matchesPatterns(url, patterns));
  2356. };
  2357. const isFromWordPress = html => html && html.includes('class="wp-embedded-content"');
  2358. const getPhotoHtml = photo => {
  2359. // 100% width for the preview so it fits nicely into the document, some "thumbnails" are
  2360. // actually the full size photo. If thumbnails not found, use full image.
  2361. const imageUrl = photo.thumbnail_url || photo.url;
  2362. const photoPreview = Object(external_wp_element_["createElement"])("p", null, Object(external_wp_element_["createElement"])("img", {
  2363. src: imageUrl,
  2364. alt: photo.title,
  2365. width: "100%"
  2366. }));
  2367. return Object(external_wp_element_["renderToString"])(photoPreview);
  2368. };
  2369. /**
  2370. * Creates a more suitable embed block based on the passed in props
  2371. * and attributes generated from an embed block's preview.
  2372. *
  2373. * We require `attributesFromPreview` to be generated from the latest attributes
  2374. * and preview, and because of the way the react lifecycle operates, we can't
  2375. * guarantee that the attributes contained in the block's props are the latest
  2376. * versions, so we require that these are generated separately.
  2377. * See `getAttributesFromPreview` in the generated embed edit component.
  2378. *
  2379. * @param {Object} props The block's props.
  2380. * @param {Object} [attributesFromPreview] Attributes generated from the block's most up to date preview.
  2381. * @return {Object|undefined} A more suitable embed block if one exists.
  2382. */
  2383. const createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
  2384. var _getBlockVariations3;
  2385. const {
  2386. preview,
  2387. attributes: {
  2388. url,
  2389. providerNameSlug,
  2390. type
  2391. } = {}
  2392. } = props;
  2393. if (!url || !Object(external_wp_blocks_["getBlockType"])(DEFAULT_EMBED_BLOCK)) return;
  2394. const matchedBlock = findMoreSuitableBlock(url); // WordPress blocks can work on multiple sites, and so don't have patterns,
  2395. // so if we're in a WordPress block, assume the user has chosen it for a WordPress URL.
  2396. const isCurrentBlockWP = providerNameSlug === 'wordpress' || type === WP_EMBED_TYPE; // if current block is not WordPress and a more suitable block found
  2397. // that is different from the current one, create the new matched block
  2398. const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
  2399. if (shouldCreateNewBlock) {
  2400. return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, {
  2401. url,
  2402. ...matchedBlock.attributes
  2403. });
  2404. }
  2405. const wpVariation = (_getBlockVariations3 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations3 === void 0 ? void 0 : _getBlockVariations3.find(({
  2406. name
  2407. }) => name === 'wordpress'); // We can't match the URL for WordPress embeds, we have to check the HTML instead.
  2408. if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
  2409. return;
  2410. } // This is not the WordPress embed block so transform it into one.
  2411. return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, {
  2412. url,
  2413. ...wpVariation.attributes,
  2414. // By now we have the preview, but when the new block first renders, it
  2415. // won't have had all the attributes set, and so won't get the correct
  2416. // type and it won't render correctly. So, we pass through the current attributes
  2417. // here so that the initial render works when we switch to the WordPress
  2418. // block. This only affects the WordPress block because it can't be
  2419. // rendered in the usual Sandbox (it has a sandbox of its own) and it
  2420. // relies on the preview to set the correct render type.
  2421. ...attributesFromPreview
  2422. });
  2423. };
  2424. /**
  2425. * Removes all previously set aspect ratio related classes and return the rest
  2426. * existing class names.
  2427. *
  2428. * @param {string} existingClassNames Any existing class names.
  2429. * @return {string} The class names without any aspect ratio related class.
  2430. */
  2431. const removeAspectRatioClasses = existingClassNames => {
  2432. if (!existingClassNames) {
  2433. // Avoids extraneous work and also, by returning the same value as
  2434. // received, ensures the post is not dirtied by a change of the block
  2435. // attribute from `undefined` to an emtpy string.
  2436. return existingClassNames;
  2437. }
  2438. const aspectRatioClassNames = ASPECT_RATIOS.reduce((accumulator, {
  2439. className
  2440. }) => {
  2441. accumulator[className] = false;
  2442. return accumulator;
  2443. }, {
  2444. 'wp-has-aspect-ratio': false
  2445. });
  2446. return dedupe_default()(existingClassNames, aspectRatioClassNames);
  2447. };
  2448. /**
  2449. * Returns class names with any relevant responsive aspect ratio names.
  2450. *
  2451. * @param {string} html The preview HTML that possibly contains an iframe with width and height set.
  2452. * @param {string} existingClassNames Any existing class names.
  2453. * @param {boolean} allowResponsive If the responsive class names should be added, or removed.
  2454. * @return {string} Deduped class names.
  2455. */
  2456. function getClassNames(html, existingClassNames, allowResponsive = true) {
  2457. if (!allowResponsive) {
  2458. return removeAspectRatioClasses(existingClassNames);
  2459. }
  2460. const previewDocument = document.implementation.createHTMLDocument('');
  2461. previewDocument.body.innerHTML = html;
  2462. const iframe = previewDocument.body.querySelector('iframe'); // If we have a fixed aspect iframe, and it's a responsive embed block.
  2463. if (iframe && iframe.height && iframe.width) {
  2464. const aspectRatio = (iframe.width / iframe.height).toFixed(2); // Given the actual aspect ratio, find the widest ratio to support it.
  2465. for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
  2466. const potentialRatio = ASPECT_RATIOS[ratioIndex];
  2467. if (aspectRatio >= potentialRatio.ratio) {
  2468. // Evaluate the difference between actual aspect ratio and closest match.
  2469. // If the difference is too big, do not scale the embed according to aspect ratio.
  2470. const ratioDiff = aspectRatio - potentialRatio.ratio;
  2471. if (ratioDiff > 0.1) {
  2472. // No close aspect ratio match found.
  2473. return removeAspectRatioClasses(existingClassNames);
  2474. } // Close aspect ratio match found.
  2475. return dedupe_default()(removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
  2476. }
  2477. }
  2478. }
  2479. return existingClassNames;
  2480. }
  2481. /**
  2482. * Fallback behaviour for unembeddable URLs.
  2483. * Creates a paragraph block containing a link to the URL, and calls `onReplace`.
  2484. *
  2485. * @param {string} url The URL that could not be embedded.
  2486. * @param {Function} onReplace Function to call with the created fallback block.
  2487. */
  2488. function util_fallback(url, onReplace) {
  2489. const link = Object(external_wp_element_["createElement"])("a", {
  2490. href: url
  2491. }, url);
  2492. onReplace(Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  2493. content: Object(external_wp_element_["renderToString"])(link)
  2494. }));
  2495. }
  2496. /***
  2497. * Gets block attributes based on the preview and responsive state.
  2498. *
  2499. * @param {Object} preview The preview data.
  2500. * @param {string} title The block's title, e.g. Twitter.
  2501. * @param {Object} currentClassNames The block's current class names.
  2502. * @param {boolean} isResponsive Boolean indicating if the block supports responsive content.
  2503. * @param {boolean} allowResponsive Apply responsive classes to fixed size content.
  2504. * @return {Object} Attributes and values.
  2505. */
  2506. const getAttributesFromPreview = memize_default()((preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
  2507. if (!preview) {
  2508. return {};
  2509. }
  2510. const attributes = {}; // Some plugins only return HTML with no type info, so default this to 'rich'.
  2511. let {
  2512. type = 'rich'
  2513. } = preview; // If we got a provider name from the API, use it for the slug, otherwise we use the title,
  2514. // because not all embed code gives us a provider name.
  2515. const {
  2516. html,
  2517. provider_name: providerName
  2518. } = preview;
  2519. const providerNameSlug = Object(external_lodash_["kebabCase"])((providerName || title).toLowerCase());
  2520. if (isFromWordPress(html)) {
  2521. type = WP_EMBED_TYPE;
  2522. }
  2523. if (html || 'photo' === type) {
  2524. attributes.type = type;
  2525. attributes.providerNameSlug = providerNameSlug;
  2526. }
  2527. attributes.className = getClassNames(html, currentClassNames, isResponsive && allowResponsive);
  2528. return attributes;
  2529. });
  2530. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js
  2531. /**
  2532. * WordPress dependencies
  2533. */
  2534. function useClientWidth(ref, dependencies) {
  2535. const [clientWidth, setClientWidth] = Object(external_wp_element_["useState"])();
  2536. function calculateClientWidth() {
  2537. setClientWidth(ref.current.clientWidth);
  2538. }
  2539. Object(external_wp_element_["useEffect"])(calculateClientWidth, dependencies);
  2540. Object(external_wp_element_["useEffect"])(() => {
  2541. const {
  2542. defaultView
  2543. } = ref.current.ownerDocument;
  2544. defaultView.addEventListener('resize', calculateClientWidth);
  2545. return () => {
  2546. defaultView.removeEventListener('resize', calculateClientWidth);
  2547. };
  2548. }, []);
  2549. return clientWidth;
  2550. }
  2551. // CONCATENATED MODULE: ./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js
  2552. /*! *****************************************************************************
  2553. Copyright (c) Microsoft Corporation.
  2554. Permission to use, copy, modify, and/or distribute this software for any
  2555. purpose with or without fee is hereby granted.
  2556. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  2557. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  2558. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  2559. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  2560. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  2561. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2562. PERFORMANCE OF THIS SOFTWARE.
  2563. ***************************************************************************** */
  2564. /* global Reflect, Promise */
  2565. var extendStatics = function(d, b) {
  2566. extendStatics = Object.setPrototypeOf ||
  2567. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  2568. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  2569. return extendStatics(d, b);
  2570. };
  2571. function __extends(d, b) {
  2572. extendStatics(d, b);
  2573. function __() { this.constructor = d; }
  2574. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  2575. }
  2576. var __assign = function() {
  2577. __assign = Object.assign || function __assign(t) {
  2578. for (var s, i = 1, n = arguments.length; i < n; i++) {
  2579. s = arguments[i];
  2580. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
  2581. }
  2582. return t;
  2583. }
  2584. return __assign.apply(this, arguments);
  2585. }
  2586. function __rest(s, e) {
  2587. var t = {};
  2588. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  2589. t[p] = s[p];
  2590. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  2591. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  2592. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  2593. t[p[i]] = s[p[i]];
  2594. }
  2595. return t;
  2596. }
  2597. function __decorate(decorators, target, key, desc) {
  2598. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  2599. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  2600. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  2601. return c > 3 && r && Object.defineProperty(target, key, r), r;
  2602. }
  2603. function __param(paramIndex, decorator) {
  2604. return function (target, key) { decorator(target, key, paramIndex); }
  2605. }
  2606. function __metadata(metadataKey, metadataValue) {
  2607. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
  2608. }
  2609. function __awaiter(thisArg, _arguments, P, generator) {
  2610. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  2611. return new (P || (P = Promise))(function (resolve, reject) {
  2612. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  2613. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  2614. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  2615. step((generator = generator.apply(thisArg, _arguments || [])).next());
  2616. });
  2617. }
  2618. function __generator(thisArg, body) {
  2619. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  2620. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  2621. function verb(n) { return function (v) { return step([n, v]); }; }
  2622. function step(op) {
  2623. if (f) throw new TypeError("Generator is already executing.");
  2624. while (_) try {
  2625. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  2626. if (y = 0, t) op = [op[0] & 2, t.value];
  2627. switch (op[0]) {
  2628. case 0: case 1: t = op; break;
  2629. case 4: _.label++; return { value: op[1], done: false };
  2630. case 5: _.label++; y = op[1]; op = [0]; continue;
  2631. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  2632. default:
  2633. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  2634. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  2635. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  2636. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  2637. if (t[2]) _.ops.pop();
  2638. _.trys.pop(); continue;
  2639. }
  2640. op = body.call(thisArg, _);
  2641. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  2642. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  2643. }
  2644. }
  2645. var __createBinding = Object.create ? (function(o, m, k, k2) {
  2646. if (k2 === undefined) k2 = k;
  2647. Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
  2648. }) : (function(o, m, k, k2) {
  2649. if (k2 === undefined) k2 = k;
  2650. o[k2] = m[k];
  2651. });
  2652. function __exportStar(m, o) {
  2653. for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
  2654. }
  2655. function __values(o) {
  2656. var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  2657. if (m) return m.call(o);
  2658. if (o && typeof o.length === "number") return {
  2659. next: function () {
  2660. if (o && i >= o.length) o = void 0;
  2661. return { value: o && o[i++], done: !o };
  2662. }
  2663. };
  2664. throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
  2665. }
  2666. function __read(o, n) {
  2667. var m = typeof Symbol === "function" && o[Symbol.iterator];
  2668. if (!m) return o;
  2669. var i = m.call(o), r, ar = [], e;
  2670. try {
  2671. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  2672. }
  2673. catch (error) { e = { error: error }; }
  2674. finally {
  2675. try {
  2676. if (r && !r.done && (m = i["return"])) m.call(i);
  2677. }
  2678. finally { if (e) throw e.error; }
  2679. }
  2680. return ar;
  2681. }
  2682. function __spread() {
  2683. for (var ar = [], i = 0; i < arguments.length; i++)
  2684. ar = ar.concat(__read(arguments[i]));
  2685. return ar;
  2686. }
  2687. function __spreadArrays() {
  2688. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  2689. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  2690. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  2691. r[k] = a[j];
  2692. return r;
  2693. };
  2694. function __await(v) {
  2695. return this instanceof __await ? (this.v = v, this) : new __await(v);
  2696. }
  2697. function __asyncGenerator(thisArg, _arguments, generator) {
  2698. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  2699. var g = generator.apply(thisArg, _arguments || []), i, q = [];
  2700. return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
  2701. function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
  2702. function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
  2703. function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
  2704. function fulfill(value) { resume("next", value); }
  2705. function reject(value) { resume("throw", value); }
  2706. function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
  2707. }
  2708. function __asyncDelegator(o) {
  2709. var i, p;
  2710. return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
  2711. function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
  2712. }
  2713. function __asyncValues(o) {
  2714. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  2715. var m = o[Symbol.asyncIterator], i;
  2716. return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
  2717. function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
  2718. function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
  2719. }
  2720. function __makeTemplateObject(cooked, raw) {
  2721. if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
  2722. return cooked;
  2723. };
  2724. var __setModuleDefault = Object.create ? (function(o, v) {
  2725. Object.defineProperty(o, "default", { enumerable: true, value: v });
  2726. }) : function(o, v) {
  2727. o["default"] = v;
  2728. };
  2729. function __importStar(mod) {
  2730. if (mod && mod.__esModule) return mod;
  2731. var result = {};
  2732. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  2733. __setModuleDefault(result, mod);
  2734. return result;
  2735. }
  2736. function __importDefault(mod) {
  2737. return (mod && mod.__esModule) ? mod : { default: mod };
  2738. }
  2739. function __classPrivateFieldGet(receiver, privateMap) {
  2740. if (!privateMap.has(receiver)) {
  2741. throw new TypeError("attempted to get private field on non-instance");
  2742. }
  2743. return privateMap.get(receiver);
  2744. }
  2745. function __classPrivateFieldSet(receiver, privateMap, value) {
  2746. if (!privateMap.has(receiver)) {
  2747. throw new TypeError("attempted to set private field on non-instance");
  2748. }
  2749. privateMap.set(receiver, value);
  2750. return value;
  2751. }
  2752. // EXTERNAL MODULE: external "React"
  2753. var external_React_ = __webpack_require__("cDcd");
  2754. var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
  2755. // EXTERNAL MODULE: ./node_modules/normalize-wheel/index.js
  2756. var normalize_wheel = __webpack_require__("wJiJ");
  2757. var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
  2758. // CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js
  2759. /**
  2760. * Compute the dimension of the crop area based on media size,
  2761. * aspect ratio and optionally rotation
  2762. */
  2763. function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
  2764. if (rotation === void 0) {
  2765. rotation = 0;
  2766. }
  2767. var _a = translateSize(mediaWidth, mediaHeight, rotation),
  2768. width = _a.width,
  2769. height = _a.height;
  2770. var fittingWidth = Math.min(width, containerWidth);
  2771. var fittingHeight = Math.min(height, containerHeight);
  2772. if (fittingWidth > fittingHeight * aspect) {
  2773. return {
  2774. width: fittingHeight * aspect,
  2775. height: fittingHeight
  2776. };
  2777. }
  2778. return {
  2779. width: fittingWidth,
  2780. height: fittingWidth / aspect
  2781. };
  2782. }
  2783. /**
  2784. * Ensure a new media position stays in the crop area.
  2785. */
  2786. function index_module_restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
  2787. if (rotation === void 0) {
  2788. rotation = 0;
  2789. }
  2790. var _a = translateSize(mediaSize.width, mediaSize.height, rotation),
  2791. width = _a.width,
  2792. height = _a.height;
  2793. return {
  2794. x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
  2795. y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
  2796. };
  2797. }
  2798. function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
  2799. var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
  2800. return Math.min(maxPosition, Math.max(position, -maxPosition));
  2801. }
  2802. function getDistanceBetweenPoints(pointA, pointB) {
  2803. return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
  2804. }
  2805. function getRotationBetweenPoints(pointA, pointB) {
  2806. return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
  2807. }
  2808. /**
  2809. * Compute the output cropped area of the media in percentages and pixels.
  2810. * x/y are the top-left coordinates on the src media
  2811. */
  2812. function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {
  2813. if (rotation === void 0) {
  2814. rotation = 0;
  2815. }
  2816. if (restrictPosition === void 0) {
  2817. restrictPosition = true;
  2818. } // if the media is rotated by the user, we cannot limit the position anymore
  2819. // as it might need to be negative.
  2820. var limitAreaFn = restrictPosition && rotation === 0 ? limitArea : noOp;
  2821. var croppedAreaPercentages = {
  2822. x: limitAreaFn(100, ((mediaSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaSize.width * 100),
  2823. y: limitAreaFn(100, ((mediaSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaSize.height * 100),
  2824. width: limitAreaFn(100, cropSize.width / mediaSize.width * 100 / zoom),
  2825. height: limitAreaFn(100, cropSize.height / mediaSize.height * 100 / zoom)
  2826. }; // we compute the pixels size naively
  2827. var widthInPixels = Math.round(limitAreaFn(mediaSize.naturalWidth, croppedAreaPercentages.width * mediaSize.naturalWidth / 100));
  2828. var heightInPixels = Math.round(limitAreaFn(mediaSize.naturalHeight, croppedAreaPercentages.height * mediaSize.naturalHeight / 100));
  2829. var isImgWiderThanHigh = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)
  2830. // if the media is wider than high, when zoom is 0, the crop height will be equals to iamge height
  2831. // thus we want to compute the width from the height and aspect for accuracy.
  2832. // Otherwise, we compute the height from width and aspect.
  2833. var sizePixels = isImgWiderThanHigh ? {
  2834. width: Math.round(heightInPixels * aspect),
  2835. height: heightInPixels
  2836. } : {
  2837. width: widthInPixels,
  2838. height: Math.round(widthInPixels / aspect)
  2839. };
  2840. var croppedAreaPixels = __assign(__assign({}, sizePixels), {
  2841. x: Math.round(limitAreaFn(mediaSize.naturalWidth - sizePixels.width, croppedAreaPercentages.x * mediaSize.naturalWidth / 100)),
  2842. y: Math.round(limitAreaFn(mediaSize.naturalHeight - sizePixels.height, croppedAreaPercentages.y * mediaSize.naturalHeight / 100))
  2843. });
  2844. return {
  2845. croppedAreaPercentages: croppedAreaPercentages,
  2846. croppedAreaPixels: croppedAreaPixels
  2847. };
  2848. }
  2849. /**
  2850. * Ensure the returned value is between 0 and max
  2851. */
  2852. function limitArea(max, value) {
  2853. return Math.min(max, Math.max(0, value));
  2854. }
  2855. function noOp(_max, value) {
  2856. return value;
  2857. }
  2858. /**
  2859. * Compute the crop and zoom from the croppedAreaPixels
  2860. */
  2861. function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
  2862. var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
  2863. if (cropSize) {
  2864. var isHeightMaxSize_1 = cropSize.height > cropSize.width;
  2865. return isHeightMaxSize_1 ? cropSize.height / mediaZoom / croppedAreaPixels.height : cropSize.width / mediaZoom / croppedAreaPixels.width;
  2866. }
  2867. var aspect = croppedAreaPixels.width / croppedAreaPixels.height;
  2868. var isHeightMaxSize = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect;
  2869. return isHeightMaxSize ? mediaSize.naturalHeight / croppedAreaPixels.height : mediaSize.naturalWidth / croppedAreaPixels.width;
  2870. }
  2871. /**
  2872. * Compute the crop and zoom from the croppedAreaPixels
  2873. */
  2874. function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
  2875. var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
  2876. var zoom = getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize);
  2877. var cropZoom = mediaZoom * zoom;
  2878. var crop = {
  2879. x: ((mediaSize.naturalWidth - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
  2880. y: ((mediaSize.naturalHeight - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
  2881. };
  2882. return {
  2883. crop: crop,
  2884. zoom: zoom
  2885. };
  2886. }
  2887. /**
  2888. * Return the point that is the center of point a and b
  2889. */
  2890. function getCenter(a, b) {
  2891. return {
  2892. x: (b.x + a.x) / 2,
  2893. y: (b.y + a.y) / 2
  2894. };
  2895. }
  2896. /**
  2897. *
  2898. * Returns an x,y point once rotated around xMid,yMid
  2899. */
  2900. function rotateAroundMidPoint(x, y, xMid, yMid, degrees) {
  2901. var cos = Math.cos;
  2902. var sin = Math.sin;
  2903. var radian = degrees * Math.PI / 180; // Convert to radians
  2904. // Subtract midpoints, so that midpoint is translated to origin
  2905. // and add it in the end again
  2906. var xr = (x - xMid) * cos(radian) - (y - yMid) * sin(radian) + xMid;
  2907. var yr = (x - xMid) * sin(radian) + (y - yMid) * cos(radian) + yMid;
  2908. return [xr, yr];
  2909. }
  2910. /**
  2911. * Returns the new bounding area of a rotated rectangle.
  2912. */
  2913. function translateSize(width, height, rotation) {
  2914. var centerX = width / 2;
  2915. var centerY = height / 2;
  2916. var outerBounds = [rotateAroundMidPoint(0, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, height, centerX, centerY, rotation), rotateAroundMidPoint(0, height, centerX, centerY, rotation)];
  2917. var minX = Math.min.apply(Math, outerBounds.map(function (p) {
  2918. return p[0];
  2919. }));
  2920. var maxX = Math.max.apply(Math, outerBounds.map(function (p) {
  2921. return p[0];
  2922. }));
  2923. var minY = Math.min.apply(Math, outerBounds.map(function (p) {
  2924. return p[1];
  2925. }));
  2926. var maxY = Math.max.apply(Math, outerBounds.map(function (p) {
  2927. return p[1];
  2928. }));
  2929. return {
  2930. width: maxX - minX,
  2931. height: maxY - minY
  2932. };
  2933. }
  2934. /**
  2935. * Combine multiple class names into a single string.
  2936. */
  2937. function index_module_classNames() {
  2938. var args = [];
  2939. for (var _i = 0; _i < arguments.length; _i++) {
  2940. args[_i] = arguments[_i];
  2941. }
  2942. return args.filter(function (value) {
  2943. if (typeof value === 'string' && value.length > 0) {
  2944. return true;
  2945. }
  2946. return false;
  2947. }).join(' ').trim();
  2948. }
  2949. var css_248z = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n";
  2950. var MIN_ZOOM = 1;
  2951. var MAX_ZOOM = 3;
  2952. var index_module_Cropper =
  2953. /** @class */
  2954. function (_super) {
  2955. __extends(Cropper, _super);
  2956. function Cropper() {
  2957. var _this = _super !== null && _super.apply(this, arguments) || this;
  2958. _this.imageRef = null;
  2959. _this.videoRef = null;
  2960. _this.containerRef = null;
  2961. _this.styleRef = null;
  2962. _this.containerRect = null;
  2963. _this.mediaSize = {
  2964. width: 0,
  2965. height: 0,
  2966. naturalWidth: 0,
  2967. naturalHeight: 0
  2968. };
  2969. _this.dragStartPosition = {
  2970. x: 0,
  2971. y: 0
  2972. };
  2973. _this.dragStartCrop = {
  2974. x: 0,
  2975. y: 0
  2976. };
  2977. _this.lastPinchDistance = 0;
  2978. _this.lastPinchRotation = 0;
  2979. _this.rafDragTimeout = null;
  2980. _this.rafPinchTimeout = null;
  2981. _this.wheelTimer = null;
  2982. _this.state = {
  2983. cropSize: null,
  2984. hasWheelJustStarted: false
  2985. }; // this is to prevent Safari on iOS >= 10 to zoom the page
  2986. _this.preventZoomSafari = function (e) {
  2987. return e.preventDefault();
  2988. };
  2989. _this.cleanEvents = function () {
  2990. document.removeEventListener('mousemove', _this.onMouseMove);
  2991. document.removeEventListener('mouseup', _this.onDragStopped);
  2992. document.removeEventListener('touchmove', _this.onTouchMove);
  2993. document.removeEventListener('touchend', _this.onDragStopped);
  2994. };
  2995. _this.clearScrollEvent = function () {
  2996. if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);
  2997. if (_this.wheelTimer) {
  2998. clearTimeout(_this.wheelTimer);
  2999. }
  3000. };
  3001. _this.onMediaLoad = function () {
  3002. _this.computeSizes();
  3003. _this.emitCropData();
  3004. _this.setInitialCrop();
  3005. if (_this.props.onMediaLoaded) {
  3006. _this.props.onMediaLoaded(_this.mediaSize);
  3007. }
  3008. };
  3009. _this.setInitialCrop = function () {
  3010. var _a = _this.props,
  3011. initialCroppedAreaPixels = _a.initialCroppedAreaPixels,
  3012. cropSize = _a.cropSize;
  3013. if (!initialCroppedAreaPixels) {
  3014. return;
  3015. }
  3016. var _b = getInitialCropFromCroppedAreaPixels(initialCroppedAreaPixels, _this.mediaSize, cropSize),
  3017. crop = _b.crop,
  3018. zoom = _b.zoom;
  3019. _this.props.onCropChange(crop);
  3020. _this.props.onZoomChange && _this.props.onZoomChange(zoom);
  3021. };
  3022. _this.computeSizes = function () {
  3023. var _a, _b, _c, _d, _e, _f;
  3024. var mediaRef = _this.imageRef || _this.videoRef;
  3025. if (mediaRef && _this.containerRef) {
  3026. _this.containerRect = _this.containerRef.getBoundingClientRect();
  3027. _this.mediaSize = {
  3028. width: mediaRef.offsetWidth,
  3029. height: mediaRef.offsetHeight,
  3030. naturalWidth: ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0,
  3031. naturalHeight: ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0
  3032. };
  3033. var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(mediaRef.offsetWidth, mediaRef.offsetHeight, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);
  3034. if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {
  3035. _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
  3036. }
  3037. _this.setState({
  3038. cropSize: cropSize
  3039. }, _this.recomputeCropPosition);
  3040. }
  3041. };
  3042. _this.onMouseDown = function (e) {
  3043. e.preventDefault();
  3044. document.addEventListener('mousemove', _this.onMouseMove);
  3045. document.addEventListener('mouseup', _this.onDragStopped);
  3046. _this.onDragStart(Cropper.getMousePoint(e));
  3047. };
  3048. _this.onMouseMove = function (e) {
  3049. return _this.onDrag(Cropper.getMousePoint(e));
  3050. };
  3051. _this.onTouchStart = function (e) {
  3052. e.preventDefault();
  3053. document.addEventListener('touchmove', _this.onTouchMove, {
  3054. passive: false
  3055. }); // iOS 11 now defaults to passive: true
  3056. document.addEventListener('touchend', _this.onDragStopped);
  3057. if (e.touches.length === 2) {
  3058. _this.onPinchStart(e);
  3059. } else if (e.touches.length === 1) {
  3060. _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));
  3061. }
  3062. };
  3063. _this.onTouchMove = function (e) {
  3064. // Prevent whole page from scrolling on iOS.
  3065. e.preventDefault();
  3066. if (e.touches.length === 2) {
  3067. _this.onPinchMove(e);
  3068. } else if (e.touches.length === 1) {
  3069. _this.onDrag(Cropper.getTouchPoint(e.touches[0]));
  3070. }
  3071. };
  3072. _this.onDragStart = function (_a) {
  3073. var _b, _c;
  3074. var x = _a.x,
  3075. y = _a.y;
  3076. _this.dragStartPosition = {
  3077. x: x,
  3078. y: y
  3079. };
  3080. _this.dragStartCrop = __assign({}, _this.props.crop);
  3081. (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
  3082. };
  3083. _this.onDrag = function (_a) {
  3084. var x = _a.x,
  3085. y = _a.y;
  3086. if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout);
  3087. _this.rafDragTimeout = window.requestAnimationFrame(function () {
  3088. if (!_this.state.cropSize) return;
  3089. if (x === undefined || y === undefined) return;
  3090. var offsetX = x - _this.dragStartPosition.x;
  3091. var offsetY = y - _this.dragStartPosition.y;
  3092. var requestedPosition = {
  3093. x: _this.dragStartCrop.x + offsetX,
  3094. y: _this.dragStartCrop.y + offsetY
  3095. };
  3096. var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
  3097. _this.props.onCropChange(newPosition);
  3098. });
  3099. };
  3100. _this.onDragStopped = function () {
  3101. var _a, _b;
  3102. _this.cleanEvents();
  3103. _this.emitCropData();
  3104. (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
  3105. };
  3106. _this.onWheel = function (e) {
  3107. e.preventDefault();
  3108. var point = Cropper.getMousePoint(e);
  3109. var pixelY = normalize_wheel_default()(e).pixelY;
  3110. var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;
  3111. _this.setNewZoom(newZoom, point);
  3112. if (!_this.state.hasWheelJustStarted) {
  3113. _this.setState({
  3114. hasWheelJustStarted: true
  3115. }, function () {
  3116. var _a, _b;
  3117. return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
  3118. });
  3119. }
  3120. if (_this.wheelTimer) {
  3121. clearTimeout(_this.wheelTimer);
  3122. }
  3123. _this.wheelTimer = window.setTimeout(function () {
  3124. return _this.setState({
  3125. hasWheelJustStarted: false
  3126. }, function () {
  3127. var _a, _b;
  3128. return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
  3129. });
  3130. }, 250);
  3131. };
  3132. _this.getPointOnContainer = function (_a) {
  3133. var x = _a.x,
  3134. y = _a.y;
  3135. if (!_this.containerRect) {
  3136. throw new Error('The Cropper is not mounted');
  3137. }
  3138. return {
  3139. x: _this.containerRect.width / 2 - (x - _this.containerRect.left),
  3140. y: _this.containerRect.height / 2 - (y - _this.containerRect.top)
  3141. };
  3142. };
  3143. _this.getPointOnMedia = function (_a) {
  3144. var x = _a.x,
  3145. y = _a.y;
  3146. var _b = _this.props,
  3147. crop = _b.crop,
  3148. zoom = _b.zoom;
  3149. return {
  3150. x: (x + crop.x) / zoom,
  3151. y: (y + crop.y) / zoom
  3152. };
  3153. };
  3154. _this.setNewZoom = function (zoom, point) {
  3155. if (!_this.state.cropSize || !_this.props.onZoomChange) return;
  3156. var zoomPoint = _this.getPointOnContainer(point);
  3157. var zoomTarget = _this.getPointOnMedia(zoomPoint);
  3158. var newZoom = Math.min(_this.props.maxZoom, Math.max(zoom, _this.props.minZoom));
  3159. var requestedPosition = {
  3160. x: zoomTarget.x * newZoom - zoomPoint.x,
  3161. y: zoomTarget.y * newZoom - zoomPoint.y
  3162. };
  3163. var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
  3164. _this.props.onCropChange(newPosition);
  3165. _this.props.onZoomChange(newZoom);
  3166. };
  3167. _this.getCropData = function () {
  3168. if (!_this.state.cropSize) {
  3169. return null;
  3170. } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ricardo-ch/react-easy-crop/issues/6)
  3171. var restrictedPosition = _this.props.restrictPosition ? index_module_restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
  3172. return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
  3173. };
  3174. _this.emitCropData = function () {
  3175. var cropData = _this.getCropData();
  3176. if (!cropData) return;
  3177. var croppedAreaPercentages = cropData.croppedAreaPercentages,
  3178. croppedAreaPixels = cropData.croppedAreaPixels;
  3179. if (_this.props.onCropComplete) {
  3180. _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
  3181. }
  3182. if (_this.props.onCropAreaChange) {
  3183. _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
  3184. }
  3185. };
  3186. _this.emitCropAreaChange = function () {
  3187. var cropData = _this.getCropData();
  3188. if (!cropData) return;
  3189. var croppedAreaPercentages = cropData.croppedAreaPercentages,
  3190. croppedAreaPixels = cropData.croppedAreaPixels;
  3191. if (_this.props.onCropAreaChange) {
  3192. _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
  3193. }
  3194. };
  3195. _this.recomputeCropPosition = function () {
  3196. if (!_this.state.cropSize) return;
  3197. var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
  3198. _this.props.onCropChange(newPosition);
  3199. _this.emitCropData();
  3200. };
  3201. return _this;
  3202. }
  3203. Cropper.prototype.componentDidMount = function () {
  3204. window.addEventListener('resize', this.computeSizes);
  3205. if (this.containerRef) {
  3206. this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
  3207. passive: false
  3208. });
  3209. this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);
  3210. this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);
  3211. }
  3212. if (!this.props.disableAutomaticStylesInjection) {
  3213. this.styleRef = document.createElement('style');
  3214. this.styleRef.setAttribute('type', 'text/css');
  3215. this.styleRef.innerHTML = css_248z;
  3216. document.head.appendChild(this.styleRef);
  3217. } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called
  3218. if (this.imageRef && this.imageRef.complete) {
  3219. this.onMediaLoad();
  3220. }
  3221. };
  3222. Cropper.prototype.componentWillUnmount = function () {
  3223. var _a;
  3224. window.removeEventListener('resize', this.computeSizes);
  3225. if (this.containerRef) {
  3226. this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
  3227. this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);
  3228. }
  3229. if (this.styleRef) {
  3230. (_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef);
  3231. }
  3232. this.cleanEvents();
  3233. this.props.zoomWithScroll && this.clearScrollEvent();
  3234. };
  3235. Cropper.prototype.componentDidUpdate = function (prevProps) {
  3236. var _a, _b, _c, _d, _e, _f, _g, _h, _j;
  3237. if (prevProps.rotation !== this.props.rotation) {
  3238. this.computeSizes();
  3239. this.recomputeCropPosition();
  3240. } else if (prevProps.aspect !== this.props.aspect) {
  3241. this.computeSizes();
  3242. } else if (prevProps.zoom !== this.props.zoom) {
  3243. this.recomputeCropPosition();
  3244. } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {
  3245. this.computeSizes();
  3246. } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {
  3247. this.emitCropAreaChange();
  3248. }
  3249. if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
  3250. this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {
  3251. passive: false
  3252. }) : this.clearScrollEvent();
  3253. }
  3254. if (prevProps.video !== this.props.video) {
  3255. (_j = this.videoRef) === null || _j === void 0 ? void 0 : _j.load();
  3256. }
  3257. };
  3258. Cropper.prototype.getAspect = function () {
  3259. var _a = this.props,
  3260. cropSize = _a.cropSize,
  3261. aspect = _a.aspect;
  3262. if (cropSize) {
  3263. return cropSize.width / cropSize.height;
  3264. }
  3265. return aspect;
  3266. };
  3267. Cropper.prototype.onPinchStart = function (e) {
  3268. var pointA = Cropper.getTouchPoint(e.touches[0]);
  3269. var pointB = Cropper.getTouchPoint(e.touches[1]);
  3270. this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
  3271. this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
  3272. this.onDragStart(getCenter(pointA, pointB));
  3273. };
  3274. Cropper.prototype.onPinchMove = function (e) {
  3275. var _this = this;
  3276. var pointA = Cropper.getTouchPoint(e.touches[0]);
  3277. var pointB = Cropper.getTouchPoint(e.touches[1]);
  3278. var center = getCenter(pointA, pointB);
  3279. this.onDrag(center);
  3280. if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout);
  3281. this.rafPinchTimeout = window.requestAnimationFrame(function () {
  3282. var distance = getDistanceBetweenPoints(pointA, pointB);
  3283. var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
  3284. _this.setNewZoom(newZoom, center);
  3285. _this.lastPinchDistance = distance;
  3286. var rotation = getRotationBetweenPoints(pointA, pointB);
  3287. var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
  3288. _this.props.onRotationChange && _this.props.onRotationChange(newRotation);
  3289. _this.lastPinchRotation = rotation;
  3290. });
  3291. };
  3292. Cropper.prototype.render = function () {
  3293. var _this = this;
  3294. var _a = this.props,
  3295. image = _a.image,
  3296. video = _a.video,
  3297. mediaProps = _a.mediaProps,
  3298. transform = _a.transform,
  3299. _b = _a.crop,
  3300. x = _b.x,
  3301. y = _b.y,
  3302. rotation = _a.rotation,
  3303. zoom = _a.zoom,
  3304. cropShape = _a.cropShape,
  3305. showGrid = _a.showGrid,
  3306. _c = _a.style,
  3307. containerStyle = _c.containerStyle,
  3308. cropAreaStyle = _c.cropAreaStyle,
  3309. mediaStyle = _c.mediaStyle,
  3310. _d = _a.classes,
  3311. containerClassName = _d.containerClassName,
  3312. cropAreaClassName = _d.cropAreaClassName,
  3313. mediaClassName = _d.mediaClassName,
  3314. objectFit = _a.objectFit;
  3315. return /*#__PURE__*/external_React_default.a.createElement("div", {
  3316. onMouseDown: this.onMouseDown,
  3317. onTouchStart: this.onTouchStart,
  3318. ref: function ref(el) {
  3319. return _this.containerRef = el;
  3320. },
  3321. "data-testid": "container",
  3322. style: containerStyle,
  3323. className: index_module_classNames('reactEasyCrop_Container', containerClassName)
  3324. }, image ? /*#__PURE__*/external_React_default.a.createElement("img", __assign({
  3325. alt: "",
  3326. className: index_module_classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)
  3327. }, mediaProps, {
  3328. src: image,
  3329. ref: function ref(el) {
  3330. return _this.imageRef = el;
  3331. },
  3332. style: __assign(__assign({}, mediaStyle), {
  3333. transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
  3334. }),
  3335. onLoad: this.onMediaLoad
  3336. })) : video && /*#__PURE__*/external_React_default.a.createElement("video", __assign({
  3337. autoPlay: true,
  3338. loop: true,
  3339. muted: true,
  3340. className: index_module_classNames('reactEasyCrop_Video', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)
  3341. }, mediaProps, {
  3342. ref: function ref(el) {
  3343. return _this.videoRef = el;
  3344. },
  3345. onLoadedMetadata: this.onMediaLoad,
  3346. style: __assign(__assign({}, mediaStyle), {
  3347. transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
  3348. }),
  3349. controls: false
  3350. }), (Array.isArray(video) ? video : [{
  3351. src: video
  3352. }]).map(function (item) {
  3353. return /*#__PURE__*/external_React_default.a.createElement("source", __assign({
  3354. key: item.src
  3355. }, item));
  3356. })), this.state.cropSize && /*#__PURE__*/external_React_default.a.createElement("div", {
  3357. style: __assign(__assign({}, cropAreaStyle), {
  3358. width: this.state.cropSize.width,
  3359. height: this.state.cropSize.height
  3360. }),
  3361. "data-testid": "cropper",
  3362. className: index_module_classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)
  3363. }));
  3364. };
  3365. Cropper.defaultProps = {
  3366. zoom: 1,
  3367. rotation: 0,
  3368. aspect: 4 / 3,
  3369. maxZoom: MAX_ZOOM,
  3370. minZoom: MIN_ZOOM,
  3371. cropShape: 'rect',
  3372. objectFit: 'contain',
  3373. showGrid: true,
  3374. style: {},
  3375. classes: {},
  3376. mediaProps: {},
  3377. zoomSpeed: 1,
  3378. restrictPosition: true,
  3379. zoomWithScroll: true
  3380. };
  3381. Cropper.getMousePoint = function (e) {
  3382. return {
  3383. x: Number(e.clientX),
  3384. y: Number(e.clientY)
  3385. };
  3386. };
  3387. Cropper.getTouchPoint = function (touch) {
  3388. return {
  3389. x: Number(touch.clientX),
  3390. y: Number(touch.clientY)
  3391. };
  3392. };
  3393. return Cropper;
  3394. }(external_React_default.a.Component);
  3395. /* harmony default export */ var index_module = (index_module_Cropper);
  3396. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/constants.js
  3397. const constants_MIN_ZOOM = 100;
  3398. const constants_MAX_ZOOM = 300;
  3399. const constants_POPOVER_PROPS = {
  3400. position: 'bottom right',
  3401. isAlternate: true
  3402. };
  3403. // EXTERNAL MODULE: external ["wp","apiFetch"]
  3404. var external_wp_apiFetch_ = __webpack_require__("ywyh");
  3405. var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_);
  3406. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/use-save-image.js
  3407. /**
  3408. * WordPress dependencies
  3409. */
  3410. function useSaveImage({
  3411. crop,
  3412. rotation,
  3413. height,
  3414. width,
  3415. aspect,
  3416. url,
  3417. id,
  3418. onSaveImage,
  3419. onFinishEditing
  3420. }) {
  3421. const {
  3422. createErrorNotice
  3423. } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
  3424. const [isInProgress, setIsInProgress] = Object(external_wp_element_["useState"])(false);
  3425. const cancel = Object(external_wp_element_["useCallback"])(() => {
  3426. setIsInProgress(false);
  3427. onFinishEditing();
  3428. }, [setIsInProgress, onFinishEditing]);
  3429. const apply = Object(external_wp_element_["useCallback"])(() => {
  3430. setIsInProgress(true);
  3431. let attrs = {}; // The crop script may return some very small, sub-pixel values when the image was not cropped.
  3432. // Crop only when the new size has changed by more than 0.1%.
  3433. if (crop.width < 99.9 || crop.height < 99.9) {
  3434. attrs = crop;
  3435. }
  3436. if (rotation > 0) {
  3437. attrs.rotation = rotation;
  3438. }
  3439. attrs.src = url;
  3440. external_wp_apiFetch_default()({
  3441. path: `/wp/v2/media/${id}/edit`,
  3442. method: 'POST',
  3443. data: attrs
  3444. }).then(response => {
  3445. onSaveImage({
  3446. id: response.id,
  3447. url: response.source_url,
  3448. height: height && width ? width / aspect : undefined
  3449. });
  3450. }).catch(error => {
  3451. createErrorNotice(Object(external_wp_i18n_["sprintf"])(
  3452. /* translators: 1. Error message */
  3453. Object(external_wp_i18n_["__"])('Could not edit image. %s'), error.message), {
  3454. id: 'image-editing-error',
  3455. type: 'snackbar'
  3456. });
  3457. }).finally(() => {
  3458. setIsInProgress(false);
  3459. onFinishEditing();
  3460. });
  3461. }, [setIsInProgress, crop, rotation, height, width, aspect, url, onSaveImage, createErrorNotice, setIsInProgress, onFinishEditing]);
  3462. return Object(external_wp_element_["useMemo"])(() => ({
  3463. isInProgress,
  3464. apply,
  3465. cancel
  3466. }), [isInProgress, apply, cancel]);
  3467. }
  3468. // EXTERNAL MODULE: external ["wp","hooks"]
  3469. var external_wp_hooks_ = __webpack_require__("g56x");
  3470. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/use-transform-image.js
  3471. /**
  3472. * WordPress dependencies
  3473. */
  3474. function useTransformState({
  3475. url,
  3476. naturalWidth,
  3477. naturalHeight
  3478. }) {
  3479. const [editedUrl, setEditedUrl] = Object(external_wp_element_["useState"])();
  3480. const [crop, setCrop] = Object(external_wp_element_["useState"])();
  3481. const [position, setPosition] = Object(external_wp_element_["useState"])({
  3482. x: 0,
  3483. y: 0
  3484. });
  3485. const [zoom, setZoom] = Object(external_wp_element_["useState"])();
  3486. const [rotation, setRotation] = Object(external_wp_element_["useState"])();
  3487. const [aspect, setAspect] = Object(external_wp_element_["useState"])();
  3488. const [defaultAspect, setDefaultAspect] = Object(external_wp_element_["useState"])();
  3489. const initializeTransformValues = Object(external_wp_element_["useCallback"])(() => {
  3490. setPosition({
  3491. x: 0,
  3492. y: 0
  3493. });
  3494. setZoom(100);
  3495. setRotation(0);
  3496. setAspect(naturalWidth / naturalHeight);
  3497. setDefaultAspect(naturalWidth / naturalHeight);
  3498. }, [naturalWidth, naturalHeight, setPosition, setZoom, setRotation, setAspect, setDefaultAspect]);
  3499. const rotateClockwise = Object(external_wp_element_["useCallback"])(() => {
  3500. const angle = (rotation + 90) % 360;
  3501. let naturalAspectRatio = naturalWidth / naturalHeight;
  3502. if (rotation % 180 === 90) {
  3503. naturalAspectRatio = naturalHeight / naturalWidth;
  3504. }
  3505. if (angle === 0) {
  3506. setEditedUrl();
  3507. setRotation(angle);
  3508. setAspect(1 / aspect);
  3509. setPosition({
  3510. x: -(position.y * naturalAspectRatio),
  3511. y: position.x * naturalAspectRatio
  3512. });
  3513. return;
  3514. }
  3515. function editImage(event) {
  3516. const canvas = document.createElement('canvas');
  3517. let translateX = 0;
  3518. let translateY = 0;
  3519. if (angle % 180) {
  3520. canvas.width = event.target.height;
  3521. canvas.height = event.target.width;
  3522. } else {
  3523. canvas.width = event.target.width;
  3524. canvas.height = event.target.height;
  3525. }
  3526. if (angle === 90 || angle === 180) {
  3527. translateX = canvas.width;
  3528. }
  3529. if (angle === 270 || angle === 180) {
  3530. translateY = canvas.height;
  3531. }
  3532. const context = canvas.getContext('2d');
  3533. context.translate(translateX, translateY);
  3534. context.rotate(angle * Math.PI / 180);
  3535. context.drawImage(event.target, 0, 0);
  3536. canvas.toBlob(blob => {
  3537. setEditedUrl(URL.createObjectURL(blob));
  3538. setRotation(angle);
  3539. setAspect(1 / aspect);
  3540. setPosition({
  3541. x: -(position.y * naturalAspectRatio),
  3542. y: position.x * naturalAspectRatio
  3543. });
  3544. });
  3545. }
  3546. const el = new window.Image();
  3547. el.src = url;
  3548. el.onload = editImage;
  3549. const imgCrossOrigin = Object(external_wp_hooks_["applyFilters"])('media.crossOrigin', undefined, url);
  3550. if (typeof imgCrossOrigin === 'string') {
  3551. el.crossOrigin = imgCrossOrigin;
  3552. }
  3553. }, [rotation, naturalWidth, naturalHeight, setEditedUrl, setRotation, setAspect, setPosition]);
  3554. return Object(external_wp_element_["useMemo"])(() => ({
  3555. editedUrl,
  3556. setEditedUrl,
  3557. crop,
  3558. setCrop,
  3559. position,
  3560. setPosition,
  3561. zoom,
  3562. setZoom,
  3563. rotation,
  3564. setRotation,
  3565. rotateClockwise,
  3566. aspect,
  3567. setAspect,
  3568. defaultAspect,
  3569. initializeTransformValues
  3570. }), [editedUrl, setEditedUrl, crop, setCrop, position, setPosition, zoom, setZoom, rotation, setRotation, rotateClockwise, aspect, setAspect, defaultAspect, initializeTransformValues]);
  3571. }
  3572. function useTransformImage(imageProperties, isEditing) {
  3573. const transformState = useTransformState(imageProperties);
  3574. const {
  3575. initializeTransformValues
  3576. } = transformState;
  3577. Object(external_wp_element_["useEffect"])(() => {
  3578. if (isEditing) {
  3579. initializeTransformValues();
  3580. }
  3581. }, [isEditing, initializeTransformValues]);
  3582. return transformState;
  3583. }
  3584. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/context.js
  3585. /**
  3586. * WordPress dependencies
  3587. */
  3588. /**
  3589. * Internal dependencies
  3590. */
  3591. const ImageEditingContext = Object(external_wp_element_["createContext"])({});
  3592. const useImageEditingContext = () => Object(external_wp_element_["useContext"])(ImageEditingContext);
  3593. function ImageEditingProvider({
  3594. id,
  3595. url,
  3596. naturalWidth,
  3597. naturalHeight,
  3598. isEditing,
  3599. onFinishEditing,
  3600. onSaveImage,
  3601. children
  3602. }) {
  3603. const transformImage = useTransformImage({
  3604. url,
  3605. naturalWidth,
  3606. naturalHeight
  3607. }, isEditing);
  3608. const saveImage = useSaveImage({
  3609. id,
  3610. url,
  3611. onSaveImage,
  3612. onFinishEditing,
  3613. ...transformImage
  3614. });
  3615. const providerValue = Object(external_wp_element_["useMemo"])(() => ({ ...transformImage,
  3616. ...saveImage
  3617. }), [transformImage, saveImage]);
  3618. return Object(external_wp_element_["createElement"])(ImageEditingContext.Provider, {
  3619. value: providerValue
  3620. }, children);
  3621. }
  3622. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/cropper.js
  3623. /**
  3624. * External dependencies
  3625. */
  3626. /**
  3627. * WordPress dependencies
  3628. */
  3629. /**
  3630. * Internal dependencies
  3631. */
  3632. function ImageCropper({
  3633. url,
  3634. width,
  3635. height,
  3636. clientWidth,
  3637. naturalHeight,
  3638. naturalWidth
  3639. }) {
  3640. const {
  3641. isInProgress,
  3642. editedUrl,
  3643. position,
  3644. zoom,
  3645. aspect,
  3646. setPosition,
  3647. setCrop,
  3648. setZoom,
  3649. rotation
  3650. } = useImageEditingContext();
  3651. let editedHeight = height || clientWidth * naturalHeight / naturalWidth;
  3652. if (rotation % 180 === 90) {
  3653. editedHeight = clientWidth * naturalWidth / naturalHeight;
  3654. }
  3655. return Object(external_wp_element_["createElement"])("div", {
  3656. className: classnames_default()('wp-block-image__crop-area', {
  3657. 'is-applying': isInProgress
  3658. }),
  3659. style: {
  3660. width: width || clientWidth,
  3661. height: editedHeight
  3662. }
  3663. }, Object(external_wp_element_["createElement"])(index_module, {
  3664. image: editedUrl || url,
  3665. disabled: isInProgress,
  3666. minZoom: constants_MIN_ZOOM / 100,
  3667. maxZoom: constants_MAX_ZOOM / 100,
  3668. crop: position,
  3669. zoom: zoom / 100,
  3670. aspect: aspect,
  3671. onCropChange: setPosition,
  3672. onCropComplete: newCropPercent => {
  3673. setCrop(newCropPercent);
  3674. },
  3675. onZoomChange: newZoom => {
  3676. setZoom(newZoom * 100);
  3677. }
  3678. }), isInProgress && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null));
  3679. }
  3680. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
  3681. var library_search = __webpack_require__("cGtP");
  3682. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/zoom-dropdown.js
  3683. /**
  3684. * WordPress dependencies
  3685. */
  3686. /**
  3687. * Internal dependencies
  3688. */
  3689. function ZoomDropdown() {
  3690. const {
  3691. isInProgress,
  3692. zoom,
  3693. setZoom
  3694. } = useImageEditingContext();
  3695. return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
  3696. contentClassName: "wp-block-image__zoom",
  3697. popoverProps: constants_POPOVER_PROPS,
  3698. renderToggle: ({
  3699. isOpen,
  3700. onToggle
  3701. }) => Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  3702. icon: library_search["a" /* default */],
  3703. label: Object(external_wp_i18n_["__"])('Zoom'),
  3704. onClick: onToggle,
  3705. "aria-expanded": isOpen,
  3706. disabled: isInProgress
  3707. }),
  3708. renderContent: () => Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  3709. label: Object(external_wp_i18n_["__"])('Zoom'),
  3710. min: constants_MIN_ZOOM,
  3711. max: constants_MAX_ZOOM,
  3712. value: Math.round(zoom),
  3713. onChange: setZoom
  3714. })
  3715. });
  3716. }
  3717. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
  3718. var check = __webpack_require__("RMJe");
  3719. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/aspect-ratio.js
  3720. /**
  3721. * WordPress dependencies
  3722. */
  3723. const aspect_ratio_aspectRatio = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  3724. xmlns: "http://www.w3.org/2000/svg",
  3725. viewBox: "0 0 24 24"
  3726. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  3727. d: "M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"
  3728. }));
  3729. /* harmony default export */ var aspect_ratio = (aspect_ratio_aspectRatio);
  3730. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/aspect-ratio-dropdown.js
  3731. /**
  3732. * WordPress dependencies
  3733. */
  3734. /**
  3735. * Internal dependencies
  3736. */
  3737. function AspectGroup({
  3738. aspectRatios,
  3739. isDisabled,
  3740. label,
  3741. onClick,
  3742. value
  3743. }) {
  3744. return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
  3745. label: label
  3746. }, aspectRatios.map(({
  3747. title,
  3748. aspect
  3749. }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  3750. key: aspect,
  3751. disabled: isDisabled,
  3752. onClick: () => {
  3753. onClick(aspect);
  3754. },
  3755. role: "menuitemradio",
  3756. isSelected: aspect === value,
  3757. icon: aspect === value ? check["a" /* default */] : undefined
  3758. }, title)));
  3759. }
  3760. function AspectRatioDropdown({
  3761. toggleProps
  3762. }) {
  3763. const {
  3764. isInProgress,
  3765. aspect,
  3766. setAspect,
  3767. defaultAspect
  3768. } = useImageEditingContext();
  3769. return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
  3770. icon: aspect_ratio,
  3771. label: Object(external_wp_i18n_["__"])('Aspect Ratio'),
  3772. popoverProps: constants_POPOVER_PROPS,
  3773. toggleProps: toggleProps,
  3774. className: "wp-block-image__aspect-ratio"
  3775. }, ({
  3776. onClose
  3777. }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(AspectGroup, {
  3778. isDisabled: isInProgress,
  3779. onClick: newAspect => {
  3780. setAspect(newAspect);
  3781. onClose();
  3782. },
  3783. value: aspect,
  3784. aspectRatios: [{
  3785. title: Object(external_wp_i18n_["__"])('Original'),
  3786. aspect: defaultAspect
  3787. }, {
  3788. title: Object(external_wp_i18n_["__"])('Square'),
  3789. aspect: 1
  3790. }]
  3791. }), Object(external_wp_element_["createElement"])(AspectGroup, {
  3792. label: Object(external_wp_i18n_["__"])('Landscape'),
  3793. isDisabled: isInProgress,
  3794. onClick: newAspect => {
  3795. setAspect(newAspect);
  3796. onClose();
  3797. },
  3798. value: aspect,
  3799. aspectRatios: [{
  3800. title: Object(external_wp_i18n_["__"])('16:10'),
  3801. aspect: 16 / 10
  3802. }, {
  3803. title: Object(external_wp_i18n_["__"])('16:9'),
  3804. aspect: 16 / 9
  3805. }, {
  3806. title: Object(external_wp_i18n_["__"])('4:3'),
  3807. aspect: 4 / 3
  3808. }, {
  3809. title: Object(external_wp_i18n_["__"])('3:2'),
  3810. aspect: 3 / 2
  3811. }]
  3812. }), Object(external_wp_element_["createElement"])(AspectGroup, {
  3813. label: Object(external_wp_i18n_["__"])('Portrait'),
  3814. isDisabled: isInProgress,
  3815. onClick: newAspect => {
  3816. setAspect(newAspect);
  3817. onClose();
  3818. },
  3819. value: aspect,
  3820. aspectRatios: [{
  3821. title: Object(external_wp_i18n_["__"])('10:16'),
  3822. aspect: 10 / 16
  3823. }, {
  3824. title: Object(external_wp_i18n_["__"])('9:16'),
  3825. aspect: 9 / 16
  3826. }, {
  3827. title: Object(external_wp_i18n_["__"])('3:4'),
  3828. aspect: 3 / 4
  3829. }, {
  3830. title: Object(external_wp_i18n_["__"])('2:3'),
  3831. aspect: 2 / 3
  3832. }]
  3833. })));
  3834. }
  3835. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-right.js
  3836. /**
  3837. * WordPress dependencies
  3838. */
  3839. const rotateRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  3840. xmlns: "http://www.w3.org/2000/svg",
  3841. viewBox: "0 0 24 24"
  3842. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  3843. d: "M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"
  3844. }));
  3845. /* harmony default export */ var rotate_right = (rotateRight);
  3846. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/rotation-button.js
  3847. /**
  3848. * WordPress dependencies
  3849. */
  3850. /**
  3851. * Internal dependencies
  3852. */
  3853. function RotationButton() {
  3854. const {
  3855. isInProgress,
  3856. rotateClockwise
  3857. } = useImageEditingContext();
  3858. return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  3859. icon: rotate_right,
  3860. label: Object(external_wp_i18n_["__"])('Rotate'),
  3861. onClick: rotateClockwise,
  3862. disabled: isInProgress
  3863. });
  3864. }
  3865. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/form-controls.js
  3866. /**
  3867. * WordPress dependencies
  3868. */
  3869. /**
  3870. * Internal dependencies
  3871. */
  3872. function FormControls() {
  3873. const {
  3874. isInProgress,
  3875. apply,
  3876. cancel
  3877. } = useImageEditingContext();
  3878. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  3879. onClick: apply,
  3880. disabled: isInProgress
  3881. }, Object(external_wp_i18n_["__"])('Apply')), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  3882. onClick: cancel
  3883. }, Object(external_wp_i18n_["__"])('Cancel')));
  3884. }
  3885. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/index.js
  3886. /**
  3887. * WordPress dependencies
  3888. */
  3889. /**
  3890. * Internal dependencies
  3891. */
  3892. function ImageEditor({
  3893. url,
  3894. width,
  3895. height,
  3896. clientWidth,
  3897. naturalHeight,
  3898. naturalWidth
  3899. }) {
  3900. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(ImageCropper, {
  3901. url: url,
  3902. width: width,
  3903. height: height,
  3904. clientWidth: clientWidth,
  3905. naturalHeight: naturalHeight,
  3906. naturalWidth: naturalWidth
  3907. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(ZoomDropdown, null), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, toggleProps => Object(external_wp_element_["createElement"])(AspectRatioDropdown, {
  3908. toggleProps: toggleProps
  3909. })), Object(external_wp_element_["createElement"])(RotationButton, null)), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(FormControls, null))));
  3910. }
  3911. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/constants.js
  3912. const MIN_SIZE = 20;
  3913. const LINK_DESTINATION_NONE = 'none';
  3914. const LINK_DESTINATION_MEDIA = 'media';
  3915. const LINK_DESTINATION_ATTACHMENT = 'attachment';
  3916. const LINK_DESTINATION_CUSTOM = 'custom';
  3917. const NEW_TAB_REL = ['noreferrer', 'noopener'];
  3918. const ALLOWED_MEDIA_TYPES = ['image'];
  3919. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image.js
  3920. /**
  3921. * External dependencies
  3922. */
  3923. /**
  3924. * WordPress dependencies
  3925. */
  3926. /**
  3927. * Internal dependencies
  3928. */
  3929. /**
  3930. * Module constants
  3931. */
  3932. function getFilename(url) {
  3933. const path = Object(external_wp_url_["getPath"])(url);
  3934. if (path) {
  3935. return Object(external_lodash_["last"])(path.split('/'));
  3936. }
  3937. }
  3938. function Image({
  3939. temporaryURL,
  3940. attributes: {
  3941. url = '',
  3942. alt,
  3943. caption,
  3944. align,
  3945. id,
  3946. href,
  3947. rel,
  3948. linkClass,
  3949. linkDestination,
  3950. title,
  3951. width,
  3952. height,
  3953. linkTarget,
  3954. sizeSlug
  3955. },
  3956. setAttributes,
  3957. isSelected,
  3958. insertBlocksAfter,
  3959. onReplace,
  3960. onSelectImage,
  3961. onSelectURL,
  3962. onUploadError,
  3963. containerRef,
  3964. clientId
  3965. }) {
  3966. const captionRef = Object(external_wp_element_["useRef"])();
  3967. const prevUrl = Object(external_wp_compose_["usePrevious"])(url);
  3968. const {
  3969. getBlock
  3970. } = Object(external_wp_data_["useSelect"])(external_wp_blockEditor_["store"]);
  3971. const {
  3972. image,
  3973. multiImageSelection
  3974. } = Object(external_wp_data_["useSelect"])(select => {
  3975. const {
  3976. getMedia
  3977. } = select(external_wp_coreData_["store"]);
  3978. const {
  3979. getMultiSelectedBlockClientIds,
  3980. getBlockName
  3981. } = select(external_wp_blockEditor_["store"]);
  3982. const multiSelectedClientIds = getMultiSelectedBlockClientIds();
  3983. return {
  3984. image: id && isSelected ? getMedia(id) : null,
  3985. multiImageSelection: multiSelectedClientIds.length && multiSelectedClientIds.every(_clientId => getBlockName(_clientId) === 'core/image')
  3986. };
  3987. }, [id, isSelected]);
  3988. const {
  3989. imageEditing,
  3990. imageSizes,
  3991. maxWidth,
  3992. mediaUpload
  3993. } = Object(external_wp_data_["useSelect"])(select => {
  3994. const {
  3995. getSettings
  3996. } = select(external_wp_blockEditor_["store"]);
  3997. return Object(external_lodash_["pick"])(getSettings(), ['imageEditing', 'imageSizes', 'maxWidth', 'mediaUpload']);
  3998. });
  3999. const {
  4000. replaceBlocks,
  4001. toggleSelection
  4002. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  4003. const {
  4004. createErrorNotice,
  4005. createSuccessNotice
  4006. } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
  4007. const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
  4008. const isWideAligned = Object(external_lodash_["includes"])(['wide', 'full'], align);
  4009. const [{
  4010. naturalWidth,
  4011. naturalHeight
  4012. }, setNaturalSize] = Object(external_wp_element_["useState"])({});
  4013. const [isEditingImage, setIsEditingImage] = Object(external_wp_element_["useState"])(false);
  4014. const [externalBlob, setExternalBlob] = Object(external_wp_element_["useState"])();
  4015. const clientWidth = useClientWidth(containerRef, [align]);
  4016. const isResizable = !isWideAligned && isLargeViewport;
  4017. const imageSizeOptions = Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, ({
  4018. slug
  4019. }) => Object(external_lodash_["get"])(image, ['media_details', 'sizes', slug, 'source_url'])), ({
  4020. name,
  4021. slug
  4022. }) => ({
  4023. value: slug,
  4024. label: name
  4025. })); // Check if the cover block is registered.
  4026. const coverBlockExists = !!Object(external_wp_blocks_["getBlockType"])('core/cover'); // If an image is externally hosted, try to fetch the image data. This may
  4027. // fail if the image host doesn't allow CORS with the domain. If it works,
  4028. // we can enable a button in the toolbar to upload the image.
  4029. Object(external_wp_element_["useEffect"])(() => {
  4030. if (!isExternalImage(id, url) || !isSelected || externalBlob) {
  4031. return;
  4032. }
  4033. window.fetch(url).then(response => response.blob()).then(blob => setExternalBlob(blob));
  4034. }, [id, url, isSelected, externalBlob]); // Focus the caption after inserting an image from the placeholder. This is
  4035. // done to preserve the behaviour of focussing the first tabbable element
  4036. // when a block is mounted. Previously, the image block would remount when
  4037. // the placeholder is removed. Maybe this behaviour could be removed.
  4038. Object(external_wp_element_["useEffect"])(() => {
  4039. if (url && !prevUrl && isSelected) {
  4040. captionRef.current.focus();
  4041. }
  4042. }, [url, prevUrl]);
  4043. function onResizeStart() {
  4044. toggleSelection(false);
  4045. }
  4046. function onResizeStop() {
  4047. toggleSelection(true);
  4048. }
  4049. function onImageError() {
  4050. // Check if there's an embed block that handles this URL.
  4051. const embedBlock = createUpgradedEmbedBlock({
  4052. attributes: {
  4053. url
  4054. }
  4055. });
  4056. if (undefined !== embedBlock) {
  4057. onReplace(embedBlock);
  4058. }
  4059. }
  4060. function onSetHref(props) {
  4061. setAttributes(props);
  4062. }
  4063. function onSetTitle(value) {
  4064. // This is the HTML title attribute, separate from the media object
  4065. // title.
  4066. setAttributes({
  4067. title: value
  4068. });
  4069. }
  4070. function updateAlt(newAlt) {
  4071. setAttributes({
  4072. alt: newAlt
  4073. });
  4074. }
  4075. function updateImage(newSizeSlug) {
  4076. const newUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', newSizeSlug, 'source_url']);
  4077. if (!newUrl) {
  4078. return null;
  4079. }
  4080. setAttributes({
  4081. url: newUrl,
  4082. width: undefined,
  4083. height: undefined,
  4084. sizeSlug: newSizeSlug
  4085. });
  4086. }
  4087. function uploadExternal() {
  4088. mediaUpload({
  4089. filesList: [externalBlob],
  4090. onFileChange([img]) {
  4091. onSelectImage(img);
  4092. if (Object(external_wp_blob_["isBlobURL"])(img.url)) {
  4093. return;
  4094. }
  4095. setExternalBlob();
  4096. createSuccessNotice(Object(external_wp_i18n_["__"])('Image uploaded.'), {
  4097. type: 'snackbar'
  4098. });
  4099. },
  4100. allowedTypes: ALLOWED_MEDIA_TYPES,
  4101. onError(message) {
  4102. createErrorNotice(message, {
  4103. type: 'snackbar'
  4104. });
  4105. }
  4106. });
  4107. }
  4108. function updateAlignment(nextAlign) {
  4109. const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
  4110. width: undefined,
  4111. height: undefined
  4112. } : {};
  4113. setAttributes({ ...extraUpdatedAttributes,
  4114. align: nextAlign
  4115. });
  4116. }
  4117. Object(external_wp_element_["useEffect"])(() => {
  4118. if (!isSelected) {
  4119. setIsEditingImage(false);
  4120. }
  4121. }, [isSelected]);
  4122. const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
  4123. const allowCrop = !multiImageSelection && canEditImage && !isEditingImage;
  4124. function switchToCover() {
  4125. replaceBlocks(clientId, Object(external_wp_blocks_["switchToBlockType"])(getBlock(clientId), 'core/cover'));
  4126. }
  4127. const controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  4128. group: "block"
  4129. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentControl"], {
  4130. value: align,
  4131. onChange: updateAlignment
  4132. }), !multiImageSelection && !isEditingImage && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageURLInputUI"], {
  4133. url: href || '',
  4134. onChangeUrl: onSetHref,
  4135. linkDestination: linkDestination,
  4136. mediaUrl: image && image.source_url || url,
  4137. mediaLink: image && image.link,
  4138. linkTarget: linkTarget,
  4139. linkClass: linkClass,
  4140. rel: rel
  4141. }), allowCrop && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  4142. onClick: () => setIsEditingImage(true),
  4143. icon: library_crop,
  4144. label: Object(external_wp_i18n_["__"])('Crop')
  4145. }), externalBlob && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  4146. onClick: uploadExternal,
  4147. icon: upload["a" /* default */],
  4148. label: Object(external_wp_i18n_["__"])('Upload external image')
  4149. }), !multiImageSelection && coverBlockExists && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  4150. icon: overlay_text,
  4151. label: Object(external_wp_i18n_["__"])('Add text over image'),
  4152. onClick: switchToCover
  4153. })), !multiImageSelection && !isEditingImage && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  4154. group: "other"
  4155. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  4156. mediaId: id,
  4157. mediaURL: url,
  4158. allowedTypes: ALLOWED_MEDIA_TYPES,
  4159. accept: "image/*",
  4160. onSelect: onSelectImage,
  4161. onSelectURL: onSelectURL,
  4162. onError: onUploadError
  4163. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  4164. title: Object(external_wp_i18n_["__"])('Image settings')
  4165. }, !multiImageSelection && Object(external_wp_element_["createElement"])(external_wp_components_["TextareaControl"], {
  4166. label: Object(external_wp_i18n_["__"])('Alt text (alternative text)'),
  4167. value: alt,
  4168. onChange: updateAlt,
  4169. help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
  4170. href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
  4171. }, Object(external_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_wp_i18n_["__"])('Leave empty if the image is purely decorative.'))
  4172. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageSizeControl"], {
  4173. onChangeImage: updateImage,
  4174. onChange: value => setAttributes(value),
  4175. slug: sizeSlug,
  4176. width: width,
  4177. height: height,
  4178. imageSizeOptions: imageSizeOptions,
  4179. isResizable: isResizable,
  4180. imageWidth: naturalWidth,
  4181. imageHeight: naturalHeight
  4182. }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  4183. label: Object(external_wp_i18n_["__"])('Title attribute'),
  4184. value: title || '',
  4185. onChange: onSetTitle,
  4186. help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["__"])('Describe the role of this image on the page.'), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
  4187. href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
  4188. }, Object(external_wp_i18n_["__"])('(Note: many devices and browsers do not display this text.)')))
  4189. })));
  4190. const filename = getFilename(url);
  4191. let defaultedAlt;
  4192. if (alt) {
  4193. defaultedAlt = alt;
  4194. } else if (filename) {
  4195. defaultedAlt = Object(external_wp_i18n_["sprintf"])(
  4196. /* translators: %s: file name */
  4197. Object(external_wp_i18n_["__"])('This image has an empty alt attribute; its file name is %s'), filename);
  4198. } else {
  4199. defaultedAlt = Object(external_wp_i18n_["__"])('This image has an empty alt attribute');
  4200. }
  4201. let img = // Disable reason: Image itself is not meant to be interactive, but
  4202. // should direct focus to block.
  4203. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
  4204. Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", {
  4205. src: temporaryURL || url,
  4206. alt: defaultedAlt,
  4207. onError: () => onImageError(),
  4208. onLoad: event => {
  4209. setNaturalSize(Object(external_lodash_["pick"])(event.target, ['naturalWidth', 'naturalHeight']));
  4210. }
  4211. }), temporaryURL && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))
  4212. /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
  4213. ;
  4214. let imageWidthWithinContainer;
  4215. let imageHeightWithinContainer;
  4216. if (clientWidth && naturalWidth && naturalHeight) {
  4217. const exceedMaxWidth = naturalWidth > clientWidth;
  4218. const ratio = naturalHeight / naturalWidth;
  4219. imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth;
  4220. imageHeightWithinContainer = exceedMaxWidth ? clientWidth * ratio : naturalHeight;
  4221. }
  4222. if (canEditImage && isEditingImage) {
  4223. img = Object(external_wp_element_["createElement"])(ImageEditor, {
  4224. url: url,
  4225. width: width,
  4226. height: height,
  4227. clientWidth: clientWidth,
  4228. naturalHeight: naturalHeight,
  4229. naturalWidth: naturalWidth
  4230. });
  4231. } else if (!isResizable || !imageWidthWithinContainer) {
  4232. img = Object(external_wp_element_["createElement"])("div", {
  4233. style: {
  4234. width,
  4235. height
  4236. }
  4237. }, img);
  4238. } else {
  4239. const currentWidth = width || imageWidthWithinContainer;
  4240. const currentHeight = height || imageHeightWithinContainer;
  4241. const ratio = naturalWidth / naturalHeight;
  4242. const minWidth = naturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;
  4243. const minHeight = naturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio; // With the current implementation of ResizableBox, an image needs an
  4244. // explicit pixel value for the max-width. In absence of being able to
  4245. // set the content-width, this max-width is currently dictated by the
  4246. // vanilla editor style. The following variable adds a buffer to this
  4247. // vanilla style, so 3rd party themes have some wiggleroom. This does,
  4248. // in most cases, allow you to scale the image beyond the width of the
  4249. // main column, though not infinitely.
  4250. // @todo It would be good to revisit this once a content-width variable
  4251. // becomes available.
  4252. const maxWidthBuffer = maxWidth * 2.5;
  4253. let showRightHandle = false;
  4254. let showLeftHandle = false;
  4255. /* eslint-disable no-lonely-if */
  4256. // See https://github.com/WordPress/gutenberg/issues/7584.
  4257. if (align === 'center') {
  4258. // When the image is centered, show both handles.
  4259. showRightHandle = true;
  4260. showLeftHandle = true;
  4261. } else if (Object(external_wp_i18n_["isRTL"])()) {
  4262. // In RTL mode the image is on the right by default.
  4263. // Show the right handle and hide the left handle only when it is
  4264. // aligned left. Otherwise always show the left handle.
  4265. if (align === 'left') {
  4266. showRightHandle = true;
  4267. } else {
  4268. showLeftHandle = true;
  4269. }
  4270. } else {
  4271. // Show the left handle and hide the right handle only when the
  4272. // image is aligned right. Otherwise always show the right handle.
  4273. if (align === 'right') {
  4274. showLeftHandle = true;
  4275. } else {
  4276. showRightHandle = true;
  4277. }
  4278. }
  4279. /* eslint-enable no-lonely-if */
  4280. img = Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
  4281. size: {
  4282. width: width !== null && width !== void 0 ? width : 'auto',
  4283. height: height !== null && height !== void 0 ? height : 'auto'
  4284. },
  4285. showHandle: isSelected,
  4286. minWidth: minWidth,
  4287. maxWidth: maxWidthBuffer,
  4288. minHeight: minHeight,
  4289. maxHeight: maxWidthBuffer / ratio,
  4290. lockAspectRatio: true,
  4291. enable: {
  4292. top: false,
  4293. right: showRightHandle,
  4294. bottom: true,
  4295. left: showLeftHandle
  4296. },
  4297. onResizeStart: onResizeStart,
  4298. onResizeStop: (event, direction, elt, delta) => {
  4299. onResizeStop();
  4300. setAttributes({
  4301. width: parseInt(currentWidth + delta.width, 10),
  4302. height: parseInt(currentHeight + delta.height, 10)
  4303. });
  4304. }
  4305. }, img);
  4306. }
  4307. return Object(external_wp_element_["createElement"])(ImageEditingProvider, {
  4308. id: id,
  4309. url: url,
  4310. naturalWidth: naturalWidth,
  4311. naturalHeight: naturalHeight,
  4312. clientWidth: clientWidth,
  4313. onSaveImage: imageAttributes => setAttributes(imageAttributes),
  4314. isEditing: isEditingImage,
  4315. onFinishEditing: () => setIsEditingImage(false)
  4316. }, !temporaryURL && controls, img, (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  4317. ref: captionRef,
  4318. tagName: "figcaption",
  4319. "aria-label": Object(external_wp_i18n_["__"])('Image caption text'),
  4320. placeholder: Object(external_wp_i18n_["__"])('Add caption'),
  4321. value: caption,
  4322. onChange: value => setAttributes({
  4323. caption: value
  4324. }),
  4325. inlineToolbar: true,
  4326. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  4327. }));
  4328. }
  4329. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/edit.js
  4330. /**
  4331. * External dependencies
  4332. */
  4333. /**
  4334. * WordPress dependencies
  4335. */
  4336. /* global wp */
  4337. /**
  4338. * Internal dependencies
  4339. */
  4340. /**
  4341. * Module constants
  4342. */
  4343. const pickRelevantMediaFiles = (image, size) => {
  4344. const imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
  4345. imageProps.url = Object(external_lodash_["get"])(image, ['sizes', size, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', size, 'source_url']) || image.url;
  4346. return imageProps;
  4347. };
  4348. /**
  4349. * Is the URL a temporary blob URL? A blob URL is one that is used temporarily
  4350. * while the image is being uploaded and will not have an id yet allocated.
  4351. *
  4352. * @param {number=} id The id of the image.
  4353. * @param {string=} url The url of the image.
  4354. *
  4355. * @return {boolean} Is the URL a Blob URL
  4356. */
  4357. const isTemporaryImage = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url);
  4358. /**
  4359. * Is the url for the image hosted externally. An externally hosted image has no
  4360. * id and is not a blob url.
  4361. *
  4362. * @param {number=} id The id of the image.
  4363. * @param {string=} url The url of the image.
  4364. *
  4365. * @return {boolean} Is the url an externally hosted url?
  4366. */
  4367. const isExternalImage = (id, url) => url && !id && !Object(external_wp_blob_["isBlobURL"])(url);
  4368. /**
  4369. * Checks if WP generated default image size. Size generation is skipped
  4370. * when the image is smaller than the said size.
  4371. *
  4372. * @param {Object} image
  4373. * @param {string} defaultSize
  4374. *
  4375. * @return {boolean} Whether or not it has default image size.
  4376. */
  4377. function hasDefaultSize(image, defaultSize) {
  4378. return Object(external_lodash_["has"])(image, ['sizes', defaultSize, 'url']) || Object(external_lodash_["has"])(image, ['media_details', 'sizes', defaultSize, 'source_url']);
  4379. }
  4380. function ImageEdit({
  4381. attributes,
  4382. setAttributes,
  4383. isSelected,
  4384. className,
  4385. noticeUI,
  4386. insertBlocksAfter,
  4387. noticeOperations,
  4388. onReplace,
  4389. clientId
  4390. }) {
  4391. const {
  4392. url = '',
  4393. alt,
  4394. caption,
  4395. align,
  4396. id,
  4397. width,
  4398. height,
  4399. sizeSlug
  4400. } = attributes;
  4401. const [temporaryURL, setTemporaryURL] = Object(external_wp_element_["useState"])();
  4402. const altRef = Object(external_wp_element_["useRef"])();
  4403. Object(external_wp_element_["useEffect"])(() => {
  4404. altRef.current = alt;
  4405. }, [alt]);
  4406. const captionRef = Object(external_wp_element_["useRef"])();
  4407. Object(external_wp_element_["useEffect"])(() => {
  4408. captionRef.current = caption;
  4409. }, [caption]);
  4410. const ref = Object(external_wp_element_["useRef"])();
  4411. const {
  4412. imageDefaultSize,
  4413. mediaUpload
  4414. } = Object(external_wp_data_["useSelect"])(select => {
  4415. const {
  4416. getSettings
  4417. } = select(external_wp_blockEditor_["store"]);
  4418. return Object(external_lodash_["pick"])(getSettings(), ['imageDefaultSize', 'mediaUpload']);
  4419. }, []);
  4420. function onUploadError(message) {
  4421. noticeOperations.removeAllNotices();
  4422. noticeOperations.createErrorNotice(message);
  4423. }
  4424. function onSelectImage(media) {
  4425. var _wp, _wp$media, _wp$media$view, _wp$media$view$settin, _wp$media$view$settin2;
  4426. if (!media || !media.url) {
  4427. setAttributes({
  4428. url: undefined,
  4429. alt: undefined,
  4430. id: undefined,
  4431. title: undefined,
  4432. caption: undefined
  4433. });
  4434. return;
  4435. }
  4436. if (Object(external_wp_blob_["isBlobURL"])(media.url)) {
  4437. setTemporaryURL(media.url);
  4438. return;
  4439. }
  4440. setTemporaryURL();
  4441. let mediaAttributes = pickRelevantMediaFiles(media, imageDefaultSize); // If a caption text was meanwhile written by the user,
  4442. // make sure the text is not overwritten by empty captions.
  4443. if (captionRef.current && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) {
  4444. mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']);
  4445. }
  4446. let additionalAttributes; // Reset the dimension attributes if changing to a different image.
  4447. if (!media.id || media.id !== id) {
  4448. additionalAttributes = {
  4449. width: undefined,
  4450. height: undefined,
  4451. // Fallback to size "full" if there's no default image size.
  4452. // It means the image is smaller, and the block will use a full-size URL.
  4453. sizeSlug: hasDefaultSize(media, imageDefaultSize) ? imageDefaultSize : 'full'
  4454. };
  4455. } else {
  4456. // Keep the same url when selecting the same file, so "Image Size"
  4457. // option is not changed.
  4458. additionalAttributes = {
  4459. url
  4460. };
  4461. } // Check if default link setting should be used.
  4462. let linkDestination = attributes.linkDestination;
  4463. if (!linkDestination) {
  4464. // Use the WordPress option to determine the proper default.
  4465. // The constants used in Gutenberg do not match WP options so a little more complicated than ideal.
  4466. // TODO: fix this in a follow up PR, requires updating media-text and ui component.
  4467. switch (((_wp = wp) === null || _wp === void 0 ? void 0 : (_wp$media = _wp.media) === null || _wp$media === void 0 ? void 0 : (_wp$media$view = _wp$media.view) === null || _wp$media$view === void 0 ? void 0 : (_wp$media$view$settin = _wp$media$view.settings) === null || _wp$media$view$settin === void 0 ? void 0 : (_wp$media$view$settin2 = _wp$media$view$settin.defaultProps) === null || _wp$media$view$settin2 === void 0 ? void 0 : _wp$media$view$settin2.link) || LINK_DESTINATION_NONE) {
  4468. case 'file':
  4469. case LINK_DESTINATION_MEDIA:
  4470. linkDestination = LINK_DESTINATION_MEDIA;
  4471. break;
  4472. case 'post':
  4473. case LINK_DESTINATION_ATTACHMENT:
  4474. linkDestination = LINK_DESTINATION_ATTACHMENT;
  4475. break;
  4476. case LINK_DESTINATION_CUSTOM:
  4477. linkDestination = LINK_DESTINATION_CUSTOM;
  4478. break;
  4479. case LINK_DESTINATION_NONE:
  4480. linkDestination = LINK_DESTINATION_NONE;
  4481. break;
  4482. }
  4483. } // Check if the image is linked to it's media.
  4484. let href;
  4485. switch (linkDestination) {
  4486. case LINK_DESTINATION_MEDIA:
  4487. href = media.url;
  4488. break;
  4489. case LINK_DESTINATION_ATTACHMENT:
  4490. href = media.link;
  4491. break;
  4492. }
  4493. mediaAttributes.href = href;
  4494. setAttributes({ ...mediaAttributes,
  4495. ...additionalAttributes,
  4496. linkDestination
  4497. });
  4498. }
  4499. function onSelectURL(newURL) {
  4500. if (newURL !== url) {
  4501. setAttributes({
  4502. url: newURL,
  4503. id: undefined,
  4504. width: undefined,
  4505. height: undefined,
  4506. sizeSlug: imageDefaultSize
  4507. });
  4508. }
  4509. }
  4510. function updateAlignment(nextAlign) {
  4511. const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
  4512. width: undefined,
  4513. height: undefined
  4514. } : {};
  4515. setAttributes({ ...extraUpdatedAttributes,
  4516. align: nextAlign
  4517. });
  4518. }
  4519. const isTemp = isTemporaryImage(id, url); // Upload a temporary image on mount.
  4520. Object(external_wp_element_["useEffect"])(() => {
  4521. if (!isTemp) {
  4522. return;
  4523. }
  4524. const file = Object(external_wp_blob_["getBlobByURL"])(url);
  4525. if (file) {
  4526. mediaUpload({
  4527. filesList: [file],
  4528. onFileChange: ([img]) => {
  4529. onSelectImage(img);
  4530. },
  4531. allowedTypes: ALLOWED_MEDIA_TYPES,
  4532. onError: message => {
  4533. noticeOperations.createErrorNotice(message);
  4534. setAttributes({
  4535. src: undefined,
  4536. id: undefined,
  4537. url: undefined
  4538. });
  4539. }
  4540. });
  4541. }
  4542. }, []); // If an image is temporary, revoke the Blob url when it is uploaded (and is
  4543. // no longer temporary).
  4544. Object(external_wp_element_["useEffect"])(() => {
  4545. if (!temporaryURL) {
  4546. return;
  4547. }
  4548. return () => {
  4549. Object(external_wp_blob_["revokeBlobURL"])(temporaryURL);
  4550. };
  4551. }, [temporaryURL]);
  4552. const isExternal = isExternalImage(id, url);
  4553. const src = isExternal ? url : undefined;
  4554. const mediaPreview = !!url && Object(external_wp_element_["createElement"])("img", {
  4555. alt: Object(external_wp_i18n_["__"])('Edit image'),
  4556. title: Object(external_wp_i18n_["__"])('Edit image'),
  4557. className: 'edit-image-preview',
  4558. src: url
  4559. });
  4560. const classes = classnames_default()(className, {
  4561. 'is-transient': temporaryURL,
  4562. 'is-resized': !!width || !!height,
  4563. [`size-${sizeSlug}`]: sizeSlug
  4564. });
  4565. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  4566. ref,
  4567. className: classes
  4568. });
  4569. return Object(external_wp_element_["createElement"])("figure", blockProps, (temporaryURL || url) && Object(external_wp_element_["createElement"])(Image, {
  4570. temporaryURL: temporaryURL,
  4571. attributes: attributes,
  4572. setAttributes: setAttributes,
  4573. isSelected: isSelected,
  4574. insertBlocksAfter: insertBlocksAfter,
  4575. onReplace: onReplace,
  4576. onSelectImage: onSelectImage,
  4577. onSelectURL: onSelectURL,
  4578. onUploadError: onUploadError,
  4579. containerRef: ref,
  4580. clientId: clientId
  4581. }), !url && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  4582. group: "block"
  4583. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentControl"], {
  4584. value: align,
  4585. onChange: updateAlignment
  4586. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  4587. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  4588. icon: library_image
  4589. }),
  4590. onSelect: onSelectImage,
  4591. onSelectURL: onSelectURL,
  4592. notices: noticeUI,
  4593. onError: onUploadError,
  4594. accept: "image/*",
  4595. allowedTypes: ALLOWED_MEDIA_TYPES,
  4596. value: {
  4597. id,
  4598. src
  4599. },
  4600. mediaPreview: mediaPreview,
  4601. disableMediaButtons: temporaryURL || url
  4602. }));
  4603. }
  4604. /* harmony default export */ var image_edit = (Object(external_wp_components_["withNotices"])(ImageEdit));
  4605. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js
  4606. /**
  4607. * External dependencies
  4608. */
  4609. /**
  4610. * WordPress dependencies
  4611. */
  4612. function save_save({
  4613. attributes
  4614. }) {
  4615. const {
  4616. url,
  4617. alt,
  4618. caption,
  4619. align,
  4620. href,
  4621. rel,
  4622. linkClass,
  4623. width,
  4624. height,
  4625. id,
  4626. linkTarget,
  4627. sizeSlug,
  4628. title
  4629. } = attributes;
  4630. const newRel = Object(external_lodash_["isEmpty"])(rel) ? undefined : rel;
  4631. const classes = classnames_default()({
  4632. [`align${align}`]: align,
  4633. [`size-${sizeSlug}`]: sizeSlug,
  4634. 'is-resized': width || height
  4635. });
  4636. const image = Object(external_wp_element_["createElement"])("img", {
  4637. src: url,
  4638. alt: alt,
  4639. className: id ? `wp-image-${id}` : null,
  4640. width: width,
  4641. height: height,
  4642. title: title
  4643. });
  4644. const figure = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, href ? Object(external_wp_element_["createElement"])("a", {
  4645. className: linkClass,
  4646. href: href,
  4647. target: linkTarget,
  4648. rel: newRel
  4649. }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  4650. tagName: "figcaption",
  4651. value: caption
  4652. }));
  4653. if ('left' === align || 'right' === align || 'center' === align) {
  4654. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("figure", {
  4655. className: classes
  4656. }, figure));
  4657. }
  4658. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({
  4659. className: classes
  4660. }), figure);
  4661. }
  4662. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/transforms.js
  4663. /**
  4664. * WordPress dependencies
  4665. */
  4666. function stripFirstImage(attributes, {
  4667. shortcode
  4668. }) {
  4669. const {
  4670. body
  4671. } = document.implementation.createHTMLDocument('');
  4672. body.innerHTML = shortcode.content;
  4673. let nodeToRemove = body.querySelector('img'); // if an image has parents, find the topmost node to remove
  4674. while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
  4675. nodeToRemove = nodeToRemove.parentNode;
  4676. }
  4677. if (nodeToRemove) {
  4678. nodeToRemove.parentNode.removeChild(nodeToRemove);
  4679. }
  4680. return body.innerHTML.trim();
  4681. }
  4682. function getFirstAnchorAttributeFormHTML(html, attributeName) {
  4683. const {
  4684. body
  4685. } = document.implementation.createHTMLDocument('');
  4686. body.innerHTML = html;
  4687. const {
  4688. firstElementChild
  4689. } = body;
  4690. if (firstElementChild && firstElementChild.nodeName === 'A') {
  4691. return firstElementChild.getAttribute(attributeName) || undefined;
  4692. }
  4693. }
  4694. const imageSchema = {
  4695. img: {
  4696. attributes: ['src', 'alt', 'title'],
  4697. classes: ['alignleft', 'aligncenter', 'alignright', 'alignnone', /^wp-image-\d+$/]
  4698. }
  4699. };
  4700. const schema = ({
  4701. phrasingContentSchema
  4702. }) => ({
  4703. figure: {
  4704. require: ['img'],
  4705. children: { ...imageSchema,
  4706. a: {
  4707. attributes: ['href', 'rel', 'target'],
  4708. children: imageSchema
  4709. },
  4710. figcaption: {
  4711. children: phrasingContentSchema
  4712. }
  4713. }
  4714. }
  4715. });
  4716. const transforms_transforms = {
  4717. from: [{
  4718. type: 'raw',
  4719. isMatch: node => node.nodeName === 'FIGURE' && !!node.querySelector('img'),
  4720. schema,
  4721. transform: node => {
  4722. // Search both figure and image classes. Alignment could be
  4723. // set on either. ID is set on the image.
  4724. const className = node.className + ' ' + node.querySelector('img').className;
  4725. const alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(className);
  4726. const anchor = node.id === '' ? undefined : node.id;
  4727. const align = alignMatches ? alignMatches[1] : undefined;
  4728. const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(className);
  4729. const id = idMatches ? Number(idMatches[1]) : undefined;
  4730. const anchorElement = node.querySelector('a');
  4731. const linkDestination = anchorElement && anchorElement.href ? 'custom' : undefined;
  4732. const href = anchorElement && anchorElement.href ? anchorElement.href : undefined;
  4733. const rel = anchorElement && anchorElement.rel ? anchorElement.rel : undefined;
  4734. const linkClass = anchorElement && anchorElement.className ? anchorElement.className : undefined;
  4735. const attributes = Object(external_wp_blocks_["getBlockAttributes"])('core/image', node.outerHTML, {
  4736. align,
  4737. id,
  4738. linkDestination,
  4739. href,
  4740. rel,
  4741. linkClass,
  4742. anchor
  4743. });
  4744. return Object(external_wp_blocks_["createBlock"])('core/image', attributes);
  4745. }
  4746. }, {
  4747. type: 'files',
  4748. isMatch(files) {
  4749. return files.length === 1 && files[0].type.indexOf('image/') === 0;
  4750. },
  4751. transform(files) {
  4752. const file = files[0]; // We don't need to upload the media directly here
  4753. // It's already done as part of the `componentDidMount`
  4754. // int the image block
  4755. return Object(external_wp_blocks_["createBlock"])('core/image', {
  4756. url: Object(external_wp_blob_["createBlobURL"])(file)
  4757. });
  4758. }
  4759. }, {
  4760. type: 'shortcode',
  4761. tag: 'caption',
  4762. attributes: {
  4763. url: {
  4764. type: 'string',
  4765. source: 'attribute',
  4766. attribute: 'src',
  4767. selector: 'img'
  4768. },
  4769. alt: {
  4770. type: 'string',
  4771. source: 'attribute',
  4772. attribute: 'alt',
  4773. selector: 'img'
  4774. },
  4775. caption: {
  4776. shortcode: stripFirstImage
  4777. },
  4778. href: {
  4779. shortcode: (attributes, {
  4780. shortcode
  4781. }) => {
  4782. return getFirstAnchorAttributeFormHTML(shortcode.content, 'href');
  4783. }
  4784. },
  4785. rel: {
  4786. shortcode: (attributes, {
  4787. shortcode
  4788. }) => {
  4789. return getFirstAnchorAttributeFormHTML(shortcode.content, 'rel');
  4790. }
  4791. },
  4792. linkClass: {
  4793. shortcode: (attributes, {
  4794. shortcode
  4795. }) => {
  4796. return getFirstAnchorAttributeFormHTML(shortcode.content, 'class');
  4797. }
  4798. },
  4799. id: {
  4800. type: 'number',
  4801. shortcode: ({
  4802. named: {
  4803. id
  4804. }
  4805. }) => {
  4806. if (!id) {
  4807. return;
  4808. }
  4809. return parseInt(id.replace('attachment_', ''), 10);
  4810. }
  4811. },
  4812. align: {
  4813. type: 'string',
  4814. shortcode: ({
  4815. named: {
  4816. align = 'alignnone'
  4817. }
  4818. }) => {
  4819. return align.replace('align', '');
  4820. }
  4821. }
  4822. }
  4823. }]
  4824. };
  4825. /* harmony default export */ var image_transforms = (transforms_transforms);
  4826. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/index.js
  4827. /**
  4828. * WordPress dependencies
  4829. */
  4830. /**
  4831. * Internal dependencies
  4832. */
  4833. const image_metadata = {
  4834. apiVersion: 2,
  4835. name: "core/image",
  4836. title: "Image",
  4837. category: "media",
  4838. description: "Insert an image to make a visual statement.",
  4839. keywords: ["img", "photo", "picture"],
  4840. textdomain: "default",
  4841. attributes: {
  4842. align: {
  4843. type: "string"
  4844. },
  4845. url: {
  4846. type: "string",
  4847. source: "attribute",
  4848. selector: "img",
  4849. attribute: "src"
  4850. },
  4851. alt: {
  4852. type: "string",
  4853. source: "attribute",
  4854. selector: "img",
  4855. attribute: "alt",
  4856. "default": ""
  4857. },
  4858. caption: {
  4859. type: "string",
  4860. source: "html",
  4861. selector: "figcaption"
  4862. },
  4863. title: {
  4864. type: "string",
  4865. source: "attribute",
  4866. selector: "img",
  4867. attribute: "title"
  4868. },
  4869. href: {
  4870. type: "string",
  4871. source: "attribute",
  4872. selector: "figure > a",
  4873. attribute: "href"
  4874. },
  4875. rel: {
  4876. type: "string",
  4877. source: "attribute",
  4878. selector: "figure > a",
  4879. attribute: "rel"
  4880. },
  4881. linkClass: {
  4882. type: "string",
  4883. source: "attribute",
  4884. selector: "figure > a",
  4885. attribute: "class"
  4886. },
  4887. id: {
  4888. type: "number"
  4889. },
  4890. width: {
  4891. type: "number"
  4892. },
  4893. height: {
  4894. type: "number"
  4895. },
  4896. sizeSlug: {
  4897. type: "string"
  4898. },
  4899. linkDestination: {
  4900. type: "string"
  4901. },
  4902. linkTarget: {
  4903. type: "string",
  4904. source: "attribute",
  4905. selector: "figure > a",
  4906. attribute: "target"
  4907. }
  4908. },
  4909. supports: {
  4910. anchor: true,
  4911. color: {
  4912. __experimentalDuotone: "img",
  4913. text: false,
  4914. background: false
  4915. },
  4916. __experimentalBorder: {
  4917. radius: true
  4918. }
  4919. },
  4920. styles: [{
  4921. name: "default",
  4922. label: "Default",
  4923. isDefault: true
  4924. }, {
  4925. name: "rounded",
  4926. label: "Rounded"
  4927. }],
  4928. editorStyle: "wp-block-image-editor",
  4929. style: "wp-block-image"
  4930. };
  4931. const {
  4932. name: image_name
  4933. } = image_metadata;
  4934. const image_settings = {
  4935. icon: library_image,
  4936. example: {
  4937. attributes: {
  4938. sizeSlug: 'large',
  4939. url: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',
  4940. // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
  4941. caption: Object(external_wp_i18n_["__"])('Mont Blanc appears—still, snowy, and serene.')
  4942. }
  4943. },
  4944. __experimentalLabel(attributes, {
  4945. context
  4946. }) {
  4947. if (context === 'accessibility') {
  4948. const {
  4949. caption,
  4950. alt,
  4951. url
  4952. } = attributes;
  4953. if (!url) {
  4954. return Object(external_wp_i18n_["__"])('Empty');
  4955. }
  4956. if (!alt) {
  4957. return caption || '';
  4958. } // This is intended to be read by a screen reader.
  4959. // A period simply means a pause, no need to translate it.
  4960. return alt + (caption ? '. ' + caption : '');
  4961. }
  4962. },
  4963. getEditWrapperProps(attributes) {
  4964. return {
  4965. 'data-align': attributes.align
  4966. };
  4967. },
  4968. transforms: image_transforms,
  4969. edit: image_edit,
  4970. save: save_save,
  4971. deprecated: image_deprecated
  4972. };
  4973. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/heading.js
  4974. /**
  4975. * WordPress dependencies
  4976. */
  4977. const heading = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  4978. xmlns: "http://www.w3.org/2000/svg",
  4979. viewBox: "0 0 24 24"
  4980. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  4981. d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"
  4982. }));
  4983. /* harmony default export */ var library_heading = (heading);
  4984. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
  4985. /**
  4986. * External dependencies
  4987. */
  4988. /**
  4989. * WordPress dependencies
  4990. */
  4991. const blockSupports = {
  4992. className: false,
  4993. anchor: true
  4994. };
  4995. const heading_deprecated_blockAttributes = {
  4996. align: {
  4997. type: 'string'
  4998. },
  4999. content: {
  5000. type: 'string',
  5001. source: 'html',
  5002. selector: 'h1,h2,h3,h4,h5,h6',
  5003. default: ''
  5004. },
  5005. level: {
  5006. type: 'number',
  5007. default: 2
  5008. },
  5009. placeholder: {
  5010. type: 'string'
  5011. }
  5012. };
  5013. const migrateCustomColors = attributes => {
  5014. if (!attributes.customTextColor) {
  5015. return attributes;
  5016. }
  5017. const style = {
  5018. color: {
  5019. text: attributes.customTextColor
  5020. }
  5021. };
  5022. return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor']),
  5023. style
  5024. };
  5025. };
  5026. const TEXT_ALIGN_OPTIONS = ['left', 'right', 'center'];
  5027. const migrateTextAlign = attributes => {
  5028. const {
  5029. align,
  5030. ...rest
  5031. } = attributes;
  5032. return TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest,
  5033. textAlign: align
  5034. } : attributes;
  5035. };
  5036. const heading_deprecated_deprecated = [{
  5037. supports: {
  5038. align: ['wide', 'full'],
  5039. anchor: true,
  5040. className: false,
  5041. color: {
  5042. link: true
  5043. },
  5044. fontSize: true,
  5045. lineHeight: true,
  5046. __experimentalSelector: {
  5047. 'core/heading/h1': 'h1',
  5048. 'core/heading/h2': 'h2',
  5049. 'core/heading/h3': 'h3',
  5050. 'core/heading/h4': 'h4',
  5051. 'core/heading/h5': 'h5',
  5052. 'core/heading/h6': 'h6'
  5053. },
  5054. __unstablePasteTextInline: true
  5055. },
  5056. attributes: heading_deprecated_blockAttributes,
  5057. isEligible: ({
  5058. align
  5059. }) => TEXT_ALIGN_OPTIONS.includes(align),
  5060. migrate: migrateTextAlign,
  5061. save({
  5062. attributes
  5063. }) {
  5064. const {
  5065. align,
  5066. content,
  5067. level
  5068. } = attributes;
  5069. const TagName = 'h' + level;
  5070. const className = classnames_default()({
  5071. [`has-text-align-${align}`]: align
  5072. });
  5073. return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({
  5074. className
  5075. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5076. value: content
  5077. }));
  5078. }
  5079. }, {
  5080. supports: blockSupports,
  5081. attributes: { ...heading_deprecated_blockAttributes,
  5082. customTextColor: {
  5083. type: 'string'
  5084. },
  5085. textColor: {
  5086. type: 'string'
  5087. }
  5088. },
  5089. migrate: attributes => migrateCustomColors(migrateTextAlign(attributes)),
  5090. save({
  5091. attributes
  5092. }) {
  5093. const {
  5094. align,
  5095. content,
  5096. customTextColor,
  5097. level,
  5098. textColor
  5099. } = attributes;
  5100. const tagName = 'h' + level;
  5101. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  5102. const className = classnames_default()({
  5103. [textClass]: textClass,
  5104. 'has-text-color': textColor || customTextColor,
  5105. [`has-text-align-${align}`]: align
  5106. });
  5107. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5108. className: className ? className : undefined,
  5109. tagName: tagName,
  5110. style: {
  5111. color: textClass ? undefined : customTextColor
  5112. },
  5113. value: content
  5114. });
  5115. }
  5116. }, {
  5117. attributes: { ...heading_deprecated_blockAttributes,
  5118. customTextColor: {
  5119. type: 'string'
  5120. },
  5121. textColor: {
  5122. type: 'string'
  5123. }
  5124. },
  5125. migrate: attributes => migrateCustomColors(migrateTextAlign(attributes)),
  5126. save({
  5127. attributes
  5128. }) {
  5129. const {
  5130. align,
  5131. content,
  5132. customTextColor,
  5133. level,
  5134. textColor
  5135. } = attributes;
  5136. const tagName = 'h' + level;
  5137. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  5138. const className = classnames_default()({
  5139. [textClass]: textClass,
  5140. [`has-text-align-${align}`]: align
  5141. });
  5142. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5143. className: className ? className : undefined,
  5144. tagName: tagName,
  5145. style: {
  5146. color: textClass ? undefined : customTextColor
  5147. },
  5148. value: content
  5149. });
  5150. },
  5151. supports: blockSupports
  5152. }, {
  5153. supports: blockSupports,
  5154. attributes: { ...heading_deprecated_blockAttributes,
  5155. customTextColor: {
  5156. type: 'string'
  5157. },
  5158. textColor: {
  5159. type: 'string'
  5160. }
  5161. },
  5162. migrate: attributes => migrateCustomColors(migrateTextAlign(attributes)),
  5163. save({
  5164. attributes
  5165. }) {
  5166. const {
  5167. align,
  5168. level,
  5169. content,
  5170. textColor,
  5171. customTextColor
  5172. } = attributes;
  5173. const tagName = 'h' + level;
  5174. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  5175. const className = classnames_default()({
  5176. [textClass]: textClass
  5177. });
  5178. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5179. className: className ? className : undefined,
  5180. tagName: tagName,
  5181. style: {
  5182. textAlign: align,
  5183. color: textClass ? undefined : customTextColor
  5184. },
  5185. value: content
  5186. });
  5187. }
  5188. }];
  5189. /* harmony default export */ var heading_deprecated = (heading_deprecated_deprecated);
  5190. // EXTERNAL MODULE: external ["wp","keycodes"]
  5191. var external_wp_keycodes_ = __webpack_require__("RxS6");
  5192. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-icon.js
  5193. /**
  5194. * WordPress dependencies
  5195. */
  5196. /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
  5197. /**
  5198. * HeadingLevelIcon props.
  5199. *
  5200. * @typedef WPHeadingLevelIconProps
  5201. *
  5202. * @property {number} level The heading level to show an icon for.
  5203. * @property {?boolean} isPressed Whether or not the icon should appear pressed; default: false.
  5204. */
  5205. /**
  5206. * Heading level icon.
  5207. *
  5208. * @param {WPHeadingLevelIconProps} props Component props.
  5209. *
  5210. * @return {?WPComponent} The icon.
  5211. */
  5212. function HeadingLevelIcon({
  5213. level,
  5214. isPressed = false
  5215. }) {
  5216. const levelToPath = {
  5217. 1: 'M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z',
  5218. 2: 'M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z',
  5219. 3: 'M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z',
  5220. 4: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z',
  5221. 5: 'M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z',
  5222. 6: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z'
  5223. };
  5224. if (!levelToPath.hasOwnProperty(level)) {
  5225. return null;
  5226. }
  5227. return Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  5228. width: "24",
  5229. height: "24",
  5230. viewBox: "0 0 20 20",
  5231. xmlns: "http://www.w3.org/2000/svg",
  5232. isPressed: isPressed
  5233. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  5234. d: levelToPath[level]
  5235. }));
  5236. }
  5237. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-dropdown.js
  5238. /**
  5239. * WordPress dependencies
  5240. */
  5241. /**
  5242. * Internal dependencies
  5243. */
  5244. const HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
  5245. const heading_level_dropdown_POPOVER_PROPS = {
  5246. className: 'block-library-heading-level-dropdown',
  5247. isAlternate: true
  5248. };
  5249. /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
  5250. /**
  5251. * HeadingLevelDropdown props.
  5252. *
  5253. * @typedef WPHeadingLevelDropdownProps
  5254. *
  5255. * @property {number} selectedLevel The chosen heading level.
  5256. * @property {(newValue:number)=>any} onChange Callback to run when
  5257. * toolbar value is changed.
  5258. */
  5259. /**
  5260. * Dropdown for selecting a heading level (1 through 6).
  5261. *
  5262. * @param {WPHeadingLevelDropdownProps} props Component props.
  5263. *
  5264. * @return {WPComponent} The toolbar.
  5265. */
  5266. function HeadingLevelDropdown({
  5267. selectedLevel,
  5268. onChange
  5269. }) {
  5270. return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
  5271. popoverProps: heading_level_dropdown_POPOVER_PROPS,
  5272. renderToggle: ({
  5273. onToggle,
  5274. isOpen
  5275. }) => {
  5276. const openOnArrowDown = event => {
  5277. if (!isOpen && event.keyCode === external_wp_keycodes_["DOWN"]) {
  5278. event.preventDefault();
  5279. event.stopPropagation();
  5280. onToggle();
  5281. }
  5282. };
  5283. return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  5284. "aria-expanded": isOpen,
  5285. "aria-haspopup": "true",
  5286. icon: Object(external_wp_element_["createElement"])(HeadingLevelIcon, {
  5287. level: selectedLevel
  5288. }),
  5289. label: Object(external_wp_i18n_["__"])('Change heading level'),
  5290. onClick: onToggle,
  5291. onKeyDown: openOnArrowDown,
  5292. showTooltip: true
  5293. });
  5294. },
  5295. renderContent: () => Object(external_wp_element_["createElement"])(external_wp_components_["Toolbar"], {
  5296. className: "block-library-heading-level-toolbar",
  5297. label: Object(external_wp_i18n_["__"])('Change heading level')
  5298. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
  5299. isCollapsed: false,
  5300. controls: HEADING_LEVELS.map(targetLevel => {
  5301. const isActive = targetLevel === selectedLevel;
  5302. return {
  5303. icon: Object(external_wp_element_["createElement"])(HeadingLevelIcon, {
  5304. level: targetLevel,
  5305. isPressed: isActive
  5306. }),
  5307. title: Object(external_wp_i18n_["sprintf"])( // translators: %s: heading level e.g: "1", "2", "3"
  5308. Object(external_wp_i18n_["__"])('Heading %d'), targetLevel),
  5309. isActive,
  5310. onClick() {
  5311. onChange(targetLevel);
  5312. }
  5313. };
  5314. })
  5315. }))
  5316. });
  5317. }
  5318. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/edit.js
  5319. /**
  5320. * External dependencies
  5321. */
  5322. /**
  5323. * WordPress dependencies
  5324. */
  5325. /**
  5326. * Internal dependencies
  5327. */
  5328. function HeadingEdit({
  5329. attributes,
  5330. setAttributes,
  5331. mergeBlocks,
  5332. onReplace,
  5333. mergedStyle,
  5334. clientId
  5335. }) {
  5336. const {
  5337. textAlign,
  5338. content,
  5339. level,
  5340. placeholder
  5341. } = attributes;
  5342. const tagName = 'h' + level;
  5343. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  5344. className: classnames_default()({
  5345. [`has-text-align-${textAlign}`]: textAlign
  5346. }),
  5347. style: mergedStyle
  5348. });
  5349. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  5350. group: "block"
  5351. }, Object(external_wp_element_["createElement"])(HeadingLevelDropdown, {
  5352. selectedLevel: level,
  5353. onChange: newLevel => setAttributes({
  5354. level: newLevel
  5355. })
  5356. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  5357. value: textAlign,
  5358. onChange: nextAlign => {
  5359. setAttributes({
  5360. textAlign: nextAlign
  5361. });
  5362. }
  5363. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
  5364. identifier: "content",
  5365. tagName: tagName,
  5366. value: content,
  5367. onChange: value => setAttributes({
  5368. content: value
  5369. }),
  5370. onMerge: mergeBlocks,
  5371. onSplit: (value, isOriginal) => {
  5372. let block;
  5373. if (isOriginal || value) {
  5374. block = Object(external_wp_blocks_["createBlock"])('core/heading', { ...attributes,
  5375. content: value
  5376. });
  5377. } else {
  5378. block = Object(external_wp_blocks_["createBlock"])('core/paragraph');
  5379. }
  5380. if (isOriginal) {
  5381. block.clientId = clientId;
  5382. }
  5383. return block;
  5384. },
  5385. onReplace: onReplace,
  5386. onRemove: () => onReplace([]),
  5387. "aria-label": Object(external_wp_i18n_["__"])('Heading text'),
  5388. placeholder: placeholder || Object(external_wp_i18n_["__"])('Heading'),
  5389. textAlign: textAlign
  5390. }, blockProps)));
  5391. }
  5392. /* harmony default export */ var heading_edit = (HeadingEdit);
  5393. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js
  5394. /**
  5395. * External dependencies
  5396. */
  5397. /**
  5398. * WordPress dependencies
  5399. */
  5400. function heading_save_save({
  5401. attributes
  5402. }) {
  5403. const {
  5404. textAlign,
  5405. content,
  5406. level
  5407. } = attributes;
  5408. const TagName = 'h' + level;
  5409. const className = classnames_default()({
  5410. [`has-text-align-${textAlign}`]: textAlign
  5411. });
  5412. return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({
  5413. className
  5414. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5415. value: content
  5416. }));
  5417. }
  5418. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/shared.js
  5419. /**
  5420. * Given a node name string for a heading node, returns its numeric level.
  5421. *
  5422. * @param {string} nodeName Heading node name.
  5423. *
  5424. * @return {number} Heading level.
  5425. */
  5426. function getLevelFromHeadingNodeName(nodeName) {
  5427. return Number(nodeName.substr(1));
  5428. }
  5429. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/transforms.js
  5430. /**
  5431. * WordPress dependencies
  5432. */
  5433. /**
  5434. * Internal dependencies
  5435. */
  5436. const {
  5437. name: heading_transforms_name
  5438. } = {
  5439. apiVersion: 2,
  5440. name: "core/heading",
  5441. title: "Heading",
  5442. category: "text",
  5443. description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
  5444. keywords: ["title", "subtitle"],
  5445. textdomain: "default",
  5446. attributes: {
  5447. textAlign: {
  5448. type: "string"
  5449. },
  5450. content: {
  5451. type: "string",
  5452. source: "html",
  5453. selector: "h1,h2,h3,h4,h5,h6",
  5454. "default": "",
  5455. __experimentalRole: "content"
  5456. },
  5457. level: {
  5458. type: "number",
  5459. "default": 2
  5460. },
  5461. placeholder: {
  5462. type: "string"
  5463. }
  5464. },
  5465. supports: {
  5466. align: ["wide", "full"],
  5467. anchor: true,
  5468. className: false,
  5469. color: {
  5470. link: true
  5471. },
  5472. typography: {
  5473. fontSize: true,
  5474. lineHeight: true,
  5475. __experimentalFontWeight: true
  5476. },
  5477. __experimentalSelector: "h1,h2,h3,h4,h5,h6",
  5478. __unstablePasteTextInline: true
  5479. },
  5480. editorStyle: "wp-block-heading-editor",
  5481. style: "wp-block-heading"
  5482. };
  5483. const heading_transforms_transforms = {
  5484. from: [{
  5485. type: 'block',
  5486. isMultiBlock: true,
  5487. blocks: ['core/paragraph'],
  5488. transform: attributes => attributes.map(({
  5489. content,
  5490. anchor
  5491. }) => Object(external_wp_blocks_["createBlock"])(heading_transforms_name, {
  5492. content,
  5493. anchor
  5494. }))
  5495. }, {
  5496. type: 'raw',
  5497. selector: 'h1,h2,h3,h4,h5,h6',
  5498. schema: ({
  5499. phrasingContentSchema,
  5500. isPaste
  5501. }) => {
  5502. const schema = {
  5503. children: phrasingContentSchema,
  5504. attributes: isPaste ? [] : ['style', 'id']
  5505. };
  5506. return {
  5507. h1: schema,
  5508. h2: schema,
  5509. h3: schema,
  5510. h4: schema,
  5511. h5: schema,
  5512. h6: schema
  5513. };
  5514. },
  5515. transform(node) {
  5516. const attributes = Object(external_wp_blocks_["getBlockAttributes"])(heading_transforms_name, node.outerHTML);
  5517. const {
  5518. textAlign
  5519. } = node.style || {};
  5520. attributes.level = getLevelFromHeadingNodeName(node.nodeName);
  5521. if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
  5522. attributes.align = textAlign;
  5523. }
  5524. return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, attributes);
  5525. }
  5526. }, ...[1, 2, 3, 4, 5, 6].map(level => ({
  5527. type: 'prefix',
  5528. prefix: Array(level + 1).join('#'),
  5529. transform(content) {
  5530. return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, {
  5531. level,
  5532. content
  5533. });
  5534. }
  5535. })), ...[1, 2, 3, 4, 5, 6].map(level => ({
  5536. type: 'enter',
  5537. regExp: new RegExp(`^/(h|H)${level}$`),
  5538. transform(content) {
  5539. return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, {
  5540. level,
  5541. content
  5542. });
  5543. }
  5544. }))],
  5545. to: [{
  5546. type: 'block',
  5547. isMultiBlock: true,
  5548. blocks: ['core/paragraph'],
  5549. transform: attributes => attributes.map(({
  5550. content,
  5551. anchor
  5552. }) => Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  5553. content,
  5554. anchor
  5555. }))
  5556. }]
  5557. };
  5558. /* harmony default export */ var heading_transforms = (heading_transforms_transforms);
  5559. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/index.js
  5560. /**
  5561. * External dependencies
  5562. */
  5563. /**
  5564. * WordPress dependencies
  5565. */
  5566. /**
  5567. * Internal dependencies
  5568. */
  5569. const heading_metadata = {
  5570. apiVersion: 2,
  5571. name: "core/heading",
  5572. title: "Heading",
  5573. category: "text",
  5574. description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
  5575. keywords: ["title", "subtitle"],
  5576. textdomain: "default",
  5577. attributes: {
  5578. textAlign: {
  5579. type: "string"
  5580. },
  5581. content: {
  5582. type: "string",
  5583. source: "html",
  5584. selector: "h1,h2,h3,h4,h5,h6",
  5585. "default": "",
  5586. __experimentalRole: "content"
  5587. },
  5588. level: {
  5589. type: "number",
  5590. "default": 2
  5591. },
  5592. placeholder: {
  5593. type: "string"
  5594. }
  5595. },
  5596. supports: {
  5597. align: ["wide", "full"],
  5598. anchor: true,
  5599. className: false,
  5600. color: {
  5601. link: true
  5602. },
  5603. typography: {
  5604. fontSize: true,
  5605. lineHeight: true,
  5606. __experimentalFontWeight: true
  5607. },
  5608. __experimentalSelector: "h1,h2,h3,h4,h5,h6",
  5609. __unstablePasteTextInline: true
  5610. },
  5611. editorStyle: "wp-block-heading-editor",
  5612. style: "wp-block-heading"
  5613. };
  5614. const {
  5615. name: heading_name
  5616. } = heading_metadata;
  5617. const heading_settings = {
  5618. icon: library_heading,
  5619. example: {
  5620. attributes: {
  5621. content: Object(external_wp_i18n_["__"])('Code is Poetry'),
  5622. level: 2
  5623. }
  5624. },
  5625. __experimentalLabel(attributes, {
  5626. context
  5627. }) {
  5628. if (context === 'accessibility') {
  5629. const {
  5630. content,
  5631. level
  5632. } = attributes;
  5633. return Object(external_lodash_["isEmpty"])(content) ? Object(external_wp_i18n_["sprintf"])(
  5634. /* translators: accessibility text. %s: heading level. */
  5635. Object(external_wp_i18n_["__"])('Level %s. Empty.'), level) : Object(external_wp_i18n_["sprintf"])(
  5636. /* translators: accessibility text. 1: heading level. 2: heading content. */
  5637. Object(external_wp_i18n_["__"])('Level %1$s. %2$s'), level, content);
  5638. }
  5639. },
  5640. transforms: heading_transforms,
  5641. deprecated: heading_deprecated,
  5642. merge(attributes, attributesToMerge) {
  5643. return {
  5644. content: (attributes.content || '') + (attributesToMerge.content || '')
  5645. };
  5646. },
  5647. edit: heading_edit,
  5648. save: heading_save_save
  5649. };
  5650. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/quote.js
  5651. /**
  5652. * WordPress dependencies
  5653. */
  5654. const quote = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  5655. viewBox: "0 0 24 24",
  5656. xmlns: "http://www.w3.org/2000/svg"
  5657. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  5658. d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"
  5659. }));
  5660. /* harmony default export */ var library_quote = (quote);
  5661. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
  5662. /**
  5663. * External dependencies
  5664. */
  5665. /**
  5666. * WordPress dependencies
  5667. */
  5668. const quote_deprecated_blockAttributes = {
  5669. value: {
  5670. type: 'string',
  5671. source: 'html',
  5672. selector: 'blockquote',
  5673. multiline: 'p',
  5674. default: ''
  5675. },
  5676. citation: {
  5677. type: 'string',
  5678. source: 'html',
  5679. selector: 'cite',
  5680. default: ''
  5681. },
  5682. align: {
  5683. type: 'string'
  5684. }
  5685. };
  5686. const quote_deprecated_deprecated = [{
  5687. attributes: quote_deprecated_blockAttributes,
  5688. save({
  5689. attributes
  5690. }) {
  5691. const {
  5692. align,
  5693. value,
  5694. citation
  5695. } = attributes;
  5696. return Object(external_wp_element_["createElement"])("blockquote", {
  5697. style: {
  5698. textAlign: align ? align : null
  5699. }
  5700. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5701. multiline: true,
  5702. value: value
  5703. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5704. tagName: "cite",
  5705. value: citation
  5706. }));
  5707. }
  5708. }, {
  5709. attributes: { ...quote_deprecated_blockAttributes,
  5710. style: {
  5711. type: 'number',
  5712. default: 1
  5713. }
  5714. },
  5715. migrate(attributes) {
  5716. if (attributes.style === 2) {
  5717. return { ...Object(external_lodash_["omit"])(attributes, ['style']),
  5718. className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large'
  5719. };
  5720. }
  5721. return attributes;
  5722. },
  5723. save({
  5724. attributes
  5725. }) {
  5726. const {
  5727. align,
  5728. value,
  5729. citation,
  5730. style
  5731. } = attributes;
  5732. return Object(external_wp_element_["createElement"])("blockquote", {
  5733. className: style === 2 ? 'is-large' : '',
  5734. style: {
  5735. textAlign: align ? align : null
  5736. }
  5737. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5738. multiline: true,
  5739. value: value
  5740. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5741. tagName: "cite",
  5742. value: citation
  5743. }));
  5744. }
  5745. }, {
  5746. attributes: { ...quote_deprecated_blockAttributes,
  5747. citation: {
  5748. type: 'string',
  5749. source: 'html',
  5750. selector: 'footer',
  5751. default: ''
  5752. },
  5753. style: {
  5754. type: 'number',
  5755. default: 1
  5756. }
  5757. },
  5758. save({
  5759. attributes
  5760. }) {
  5761. const {
  5762. align,
  5763. value,
  5764. citation,
  5765. style
  5766. } = attributes;
  5767. return Object(external_wp_element_["createElement"])("blockquote", {
  5768. className: `blocks-quote-style-${style}`,
  5769. style: {
  5770. textAlign: align ? align : null
  5771. }
  5772. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5773. multiline: true,
  5774. value: value
  5775. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5776. tagName: "footer",
  5777. value: citation
  5778. }));
  5779. }
  5780. }];
  5781. /* harmony default export */ var quote_deprecated = (quote_deprecated_deprecated);
  5782. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js
  5783. /**
  5784. * External dependencies
  5785. */
  5786. /**
  5787. * WordPress dependencies
  5788. */
  5789. const isWebPlatform = external_wp_element_["Platform"].OS === 'web';
  5790. function QuoteEdit({
  5791. attributes,
  5792. setAttributes,
  5793. isSelected,
  5794. mergeBlocks,
  5795. onReplace,
  5796. className,
  5797. insertBlocksAfter,
  5798. mergedStyle
  5799. }) {
  5800. const {
  5801. align,
  5802. value,
  5803. citation
  5804. } = attributes;
  5805. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  5806. className: classnames_default()(className, {
  5807. [`has-text-align-${align}`]: align
  5808. }),
  5809. style: mergedStyle
  5810. });
  5811. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  5812. group: "block"
  5813. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  5814. value: align,
  5815. onChange: nextAlign => {
  5816. setAttributes({
  5817. align: nextAlign
  5818. });
  5819. }
  5820. })), Object(external_wp_element_["createElement"])(external_wp_components_["BlockQuotation"], blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  5821. identifier: "value",
  5822. multiline: true,
  5823. value: value,
  5824. onChange: nextValue => setAttributes({
  5825. value: nextValue
  5826. }),
  5827. onMerge: mergeBlocks,
  5828. onRemove: forward => {
  5829. const hasEmptyCitation = !citation || citation.length === 0;
  5830. if (!forward && hasEmptyCitation) {
  5831. onReplace([]);
  5832. }
  5833. },
  5834. "aria-label": Object(external_wp_i18n_["__"])('Quote text'),
  5835. placeholder: // translators: placeholder text used for the quote
  5836. Object(external_wp_i18n_["__"])('Add quote'),
  5837. onReplace: onReplace,
  5838. onSplit: piece => Object(external_wp_blocks_["createBlock"])('core/quote', { ...attributes,
  5839. value: piece
  5840. }),
  5841. __unstableOnSplitMiddle: () => Object(external_wp_blocks_["createBlock"])('core/paragraph'),
  5842. textAlign: align
  5843. }), (!external_wp_blockEditor_["RichText"].isEmpty(citation) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  5844. identifier: "citation",
  5845. tagName: isWebPlatform ? 'cite' : undefined,
  5846. style: {
  5847. display: 'block'
  5848. },
  5849. value: citation,
  5850. onChange: nextCitation => setAttributes({
  5851. citation: nextCitation
  5852. }),
  5853. __unstableMobileNoFocusOnMount: true,
  5854. "aria-label": Object(external_wp_i18n_["__"])('Quote citation text'),
  5855. placeholder: // translators: placeholder text used for the citation
  5856. Object(external_wp_i18n_["__"])('Add citation'),
  5857. className: "wp-block-quote__citation",
  5858. textAlign: align,
  5859. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  5860. })));
  5861. }
  5862. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/save.js
  5863. /**
  5864. * External dependencies
  5865. */
  5866. /**
  5867. * WordPress dependencies
  5868. */
  5869. function quote_save_save({
  5870. attributes
  5871. }) {
  5872. const {
  5873. align,
  5874. value,
  5875. citation
  5876. } = attributes;
  5877. const className = classnames_default()({
  5878. [`has-text-align-${align}`]: align
  5879. });
  5880. return Object(external_wp_element_["createElement"])("blockquote", external_wp_blockEditor_["useBlockProps"].save({
  5881. className
  5882. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5883. multiline: true,
  5884. value: value
  5885. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  5886. tagName: "cite",
  5887. value: citation
  5888. }));
  5889. }
  5890. // EXTERNAL MODULE: external ["wp","richText"]
  5891. var external_wp_richText_ = __webpack_require__("qRz9");
  5892. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
  5893. /**
  5894. * WordPress dependencies
  5895. */
  5896. const quote_transforms_transforms = {
  5897. from: [{
  5898. type: 'block',
  5899. isMultiBlock: true,
  5900. blocks: ['core/paragraph'],
  5901. transform: attributes => {
  5902. return Object(external_wp_blocks_["createBlock"])('core/quote', {
  5903. value: Object(external_wp_richText_["toHTMLString"])({
  5904. value: Object(external_wp_richText_["join"])(attributes.map(({
  5905. content
  5906. }) => Object(external_wp_richText_["create"])({
  5907. html: content
  5908. })), '\u2028'),
  5909. multilineTag: 'p'
  5910. }),
  5911. anchor: attributes.anchor
  5912. });
  5913. }
  5914. }, {
  5915. type: 'block',
  5916. blocks: ['core/heading'],
  5917. transform: ({
  5918. content,
  5919. anchor
  5920. }) => {
  5921. return Object(external_wp_blocks_["createBlock"])('core/quote', {
  5922. value: `<p>${content}</p>`,
  5923. anchor
  5924. });
  5925. }
  5926. }, {
  5927. type: 'block',
  5928. blocks: ['core/pullquote'],
  5929. transform: ({
  5930. value,
  5931. citation,
  5932. anchor
  5933. }) => Object(external_wp_blocks_["createBlock"])('core/quote', {
  5934. value,
  5935. citation,
  5936. anchor
  5937. })
  5938. }, {
  5939. type: 'prefix',
  5940. prefix: '>',
  5941. transform: content => {
  5942. return Object(external_wp_blocks_["createBlock"])('core/quote', {
  5943. value: `<p>${content}</p>`
  5944. });
  5945. }
  5946. }, {
  5947. type: 'raw',
  5948. isMatch: node => {
  5949. const isParagraphOrSingleCite = (() => {
  5950. let hasCitation = false;
  5951. return child => {
  5952. // Child is a paragraph.
  5953. if (child.nodeName === 'P') {
  5954. return true;
  5955. } // Child is a cite and no other cite child exists before it.
  5956. if (!hasCitation && child.nodeName === 'CITE') {
  5957. hasCitation = true;
  5958. return true;
  5959. }
  5960. };
  5961. })();
  5962. return node.nodeName === 'BLOCKQUOTE' && // The quote block can only handle multiline paragraph
  5963. // content with an optional cite child.
  5964. Array.from(node.childNodes).every(isParagraphOrSingleCite);
  5965. },
  5966. schema: ({
  5967. phrasingContentSchema
  5968. }) => ({
  5969. blockquote: {
  5970. children: {
  5971. p: {
  5972. children: phrasingContentSchema
  5973. },
  5974. cite: {
  5975. children: phrasingContentSchema
  5976. }
  5977. }
  5978. }
  5979. })
  5980. }],
  5981. to: [{
  5982. type: 'block',
  5983. blocks: ['core/paragraph'],
  5984. transform: ({
  5985. value,
  5986. citation
  5987. }) => {
  5988. const paragraphs = [];
  5989. if (value && value !== '<p></p>') {
  5990. paragraphs.push(...Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
  5991. html: value,
  5992. multilineTag: 'p'
  5993. }), '\u2028').map(piece => Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  5994. content: Object(external_wp_richText_["toHTMLString"])({
  5995. value: piece
  5996. })
  5997. })));
  5998. }
  5999. if (citation && citation !== '<p></p>') {
  6000. paragraphs.push(Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  6001. content: citation
  6002. }));
  6003. }
  6004. if (paragraphs.length === 0) {
  6005. return Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  6006. content: ''
  6007. });
  6008. }
  6009. return paragraphs;
  6010. }
  6011. }, {
  6012. type: 'block',
  6013. blocks: ['core/heading'],
  6014. transform: ({
  6015. value,
  6016. citation,
  6017. ...attrs
  6018. }) => {
  6019. // If there is no quote content, use the citation as the
  6020. // content of the resulting heading. A nonexistent citation
  6021. // will result in an empty heading.
  6022. if (value === '<p></p>') {
  6023. return Object(external_wp_blocks_["createBlock"])('core/heading', {
  6024. content: citation
  6025. });
  6026. }
  6027. const pieces = Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
  6028. html: value,
  6029. multilineTag: 'p'
  6030. }), '\u2028');
  6031. const headingBlock = Object(external_wp_blocks_["createBlock"])('core/heading', {
  6032. content: Object(external_wp_richText_["toHTMLString"])({
  6033. value: pieces[0]
  6034. })
  6035. });
  6036. if (!citation && pieces.length === 1) {
  6037. return headingBlock;
  6038. }
  6039. const quotePieces = pieces.slice(1);
  6040. const quoteBlock = Object(external_wp_blocks_["createBlock"])('core/quote', { ...attrs,
  6041. citation,
  6042. value: Object(external_wp_richText_["toHTMLString"])({
  6043. value: quotePieces.length ? Object(external_wp_richText_["join"])(pieces.slice(1), '\u2028') : Object(external_wp_richText_["create"])(),
  6044. multilineTag: 'p'
  6045. })
  6046. });
  6047. return [headingBlock, quoteBlock];
  6048. }
  6049. }, {
  6050. type: 'block',
  6051. blocks: ['core/pullquote'],
  6052. transform: ({
  6053. value,
  6054. citation,
  6055. anchor
  6056. }) => {
  6057. return Object(external_wp_blocks_["createBlock"])('core/pullquote', {
  6058. value,
  6059. citation,
  6060. anchor
  6061. });
  6062. }
  6063. }]
  6064. };
  6065. /* harmony default export */ var quote_transforms = (quote_transforms_transforms);
  6066. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/index.js
  6067. /**
  6068. * WordPress dependencies
  6069. */
  6070. /**
  6071. * Internal dependencies
  6072. */
  6073. const quote_metadata = {
  6074. apiVersion: 2,
  6075. name: "core/quote",
  6076. title: "Quote",
  6077. category: "text",
  6078. description: "Give quoted text visual emphasis. \"In quoting others, we cite ourselves.\" \u2014 Julio Cort\xE1zar",
  6079. keywords: ["blockquote", "cite"],
  6080. textdomain: "default",
  6081. attributes: {
  6082. value: {
  6083. type: "string",
  6084. source: "html",
  6085. selector: "blockquote",
  6086. multiline: "p",
  6087. "default": "",
  6088. __experimentalRole: "content"
  6089. },
  6090. citation: {
  6091. type: "string",
  6092. source: "html",
  6093. selector: "cite",
  6094. "default": "",
  6095. __experimentalRole: "content"
  6096. },
  6097. align: {
  6098. type: "string"
  6099. }
  6100. },
  6101. supports: {
  6102. anchor: true
  6103. },
  6104. styles: [{
  6105. name: "default",
  6106. label: "Default",
  6107. isDefault: true
  6108. }, {
  6109. name: "large",
  6110. label: "Large"
  6111. }],
  6112. editorStyle: "wp-block-quote-editor",
  6113. style: "wp-block-quote"
  6114. };
  6115. const {
  6116. name: quote_name
  6117. } = quote_metadata;
  6118. const quote_settings = {
  6119. icon: library_quote,
  6120. example: {
  6121. attributes: {
  6122. value: '<p>' + Object(external_wp_i18n_["__"])('In quoting others, we cite ourselves.') + '</p>',
  6123. citation: 'Julio Cortázar',
  6124. className: 'is-style-large'
  6125. }
  6126. },
  6127. transforms: quote_transforms,
  6128. edit: QuoteEdit,
  6129. save: quote_save_save,
  6130. merge(attributes, {
  6131. value,
  6132. citation
  6133. }) {
  6134. // Quote citations cannot be merged. Pick the second one unless it's
  6135. // empty.
  6136. if (!citation) {
  6137. citation = attributes.citation;
  6138. }
  6139. if (!value || value === '<p></p>') {
  6140. return { ...attributes,
  6141. citation
  6142. };
  6143. }
  6144. return { ...attributes,
  6145. value: attributes.value + value,
  6146. citation
  6147. };
  6148. },
  6149. deprecated: quote_deprecated
  6150. };
  6151. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js
  6152. /**
  6153. * WordPress dependencies
  6154. */
  6155. const gallery = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  6156. viewBox: "0 0 24 24",
  6157. xmlns: "http://www.w3.org/2000/svg"
  6158. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  6159. d: "M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"
  6160. }));
  6161. /* harmony default export */ var library_gallery = (gallery);
  6162. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared.js
  6163. /**
  6164. * External dependencies
  6165. */
  6166. function defaultColumnsNumber(attributes) {
  6167. return Math.min(3, attributes.images.length);
  6168. }
  6169. const shared_pickRelevantMediaFiles = (image, sizeSlug = 'large') => {
  6170. const imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
  6171. imageProps.url = Object(external_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url;
  6172. const fullUrl = Object(external_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']);
  6173. if (fullUrl) {
  6174. imageProps.fullUrl = fullUrl;
  6175. }
  6176. return imageProps;
  6177. };
  6178. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
  6179. /**
  6180. * External dependencies
  6181. */
  6182. /**
  6183. * WordPress dependencies
  6184. */
  6185. /**
  6186. * Internal dependencies
  6187. */
  6188. const gallery_deprecated_deprecated = [{
  6189. attributes: {
  6190. images: {
  6191. type: 'array',
  6192. default: [],
  6193. source: 'query',
  6194. selector: '.blocks-gallery-item',
  6195. query: {
  6196. url: {
  6197. type: 'string',
  6198. source: 'attribute',
  6199. selector: 'img',
  6200. attribute: 'src'
  6201. },
  6202. fullUrl: {
  6203. type: 'string',
  6204. source: 'attribute',
  6205. selector: 'img',
  6206. attribute: 'data-full-url'
  6207. },
  6208. link: {
  6209. type: 'string',
  6210. source: 'attribute',
  6211. selector: 'img',
  6212. attribute: 'data-link'
  6213. },
  6214. alt: {
  6215. type: 'string',
  6216. source: 'attribute',
  6217. selector: 'img',
  6218. attribute: 'alt',
  6219. default: ''
  6220. },
  6221. id: {
  6222. type: 'string',
  6223. source: 'attribute',
  6224. selector: 'img',
  6225. attribute: 'data-id'
  6226. },
  6227. caption: {
  6228. type: 'string',
  6229. source: 'html',
  6230. selector: '.blocks-gallery-item__caption'
  6231. }
  6232. }
  6233. },
  6234. ids: {
  6235. type: 'array',
  6236. items: {
  6237. type: 'number'
  6238. },
  6239. default: []
  6240. },
  6241. columns: {
  6242. type: 'number',
  6243. minimum: 1,
  6244. maximum: 8
  6245. },
  6246. caption: {
  6247. type: 'string',
  6248. source: 'html',
  6249. selector: '.blocks-gallery-caption'
  6250. },
  6251. imageCrop: {
  6252. type: 'boolean',
  6253. default: true
  6254. },
  6255. linkTo: {
  6256. type: 'string',
  6257. default: 'none'
  6258. },
  6259. sizeSlug: {
  6260. type: 'string',
  6261. default: 'large'
  6262. }
  6263. },
  6264. supports: {
  6265. align: true
  6266. },
  6267. isEligible({
  6268. linkTo
  6269. }) {
  6270. return !linkTo || linkTo === 'attachment' || linkTo === 'media';
  6271. },
  6272. migrate(attributes) {
  6273. let linkTo = attributes.linkTo;
  6274. if (!attributes.linkTo) {
  6275. linkTo = 'none';
  6276. } else if (attributes.linkTo === 'attachment') {
  6277. linkTo = 'post';
  6278. } else if (attributes.linkTo === 'media') {
  6279. linkTo = 'file';
  6280. }
  6281. return { ...attributes,
  6282. linkTo
  6283. };
  6284. },
  6285. save({
  6286. attributes
  6287. }) {
  6288. const {
  6289. images,
  6290. columns = defaultColumnsNumber(attributes),
  6291. imageCrop,
  6292. caption,
  6293. linkTo
  6294. } = attributes;
  6295. return Object(external_wp_element_["createElement"])("figure", {
  6296. className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
  6297. }, Object(external_wp_element_["createElement"])("ul", {
  6298. className: "blocks-gallery-grid"
  6299. }, images.map(image => {
  6300. let href;
  6301. switch (linkTo) {
  6302. case 'media':
  6303. href = image.fullUrl || image.url;
  6304. break;
  6305. case 'attachment':
  6306. href = image.link;
  6307. break;
  6308. }
  6309. const img = Object(external_wp_element_["createElement"])("img", {
  6310. src: image.url,
  6311. alt: image.alt,
  6312. "data-id": image.id,
  6313. "data-full-url": image.fullUrl,
  6314. "data-link": image.link,
  6315. className: image.id ? `wp-image-${image.id}` : null
  6316. });
  6317. return Object(external_wp_element_["createElement"])("li", {
  6318. key: image.id || image.url,
  6319. className: "blocks-gallery-item"
  6320. }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
  6321. href: href
  6322. }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  6323. tagName: "figcaption",
  6324. className: "blocks-gallery-item__caption",
  6325. value: image.caption
  6326. })));
  6327. })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  6328. tagName: "figcaption",
  6329. className: "blocks-gallery-caption",
  6330. value: caption
  6331. }));
  6332. }
  6333. }, {
  6334. attributes: {
  6335. images: {
  6336. type: 'array',
  6337. default: [],
  6338. source: 'query',
  6339. selector: '.blocks-gallery-item',
  6340. query: {
  6341. url: {
  6342. source: 'attribute',
  6343. selector: 'img',
  6344. attribute: 'src'
  6345. },
  6346. fullUrl: {
  6347. source: 'attribute',
  6348. selector: 'img',
  6349. attribute: 'data-full-url'
  6350. },
  6351. link: {
  6352. source: 'attribute',
  6353. selector: 'img',
  6354. attribute: 'data-link'
  6355. },
  6356. alt: {
  6357. source: 'attribute',
  6358. selector: 'img',
  6359. attribute: 'alt',
  6360. default: ''
  6361. },
  6362. id: {
  6363. source: 'attribute',
  6364. selector: 'img',
  6365. attribute: 'data-id'
  6366. },
  6367. caption: {
  6368. type: 'string',
  6369. source: 'html',
  6370. selector: '.blocks-gallery-item__caption'
  6371. }
  6372. }
  6373. },
  6374. ids: {
  6375. type: 'array',
  6376. default: []
  6377. },
  6378. columns: {
  6379. type: 'number'
  6380. },
  6381. caption: {
  6382. type: 'string',
  6383. source: 'html',
  6384. selector: '.blocks-gallery-caption'
  6385. },
  6386. imageCrop: {
  6387. type: 'boolean',
  6388. default: true
  6389. },
  6390. linkTo: {
  6391. type: 'string',
  6392. default: 'none'
  6393. }
  6394. },
  6395. supports: {
  6396. align: true
  6397. },
  6398. isEligible({
  6399. ids
  6400. }) {
  6401. return ids && ids.some(id => typeof id === 'string');
  6402. },
  6403. migrate(attributes) {
  6404. return { ...attributes,
  6405. ids: Object(external_lodash_["map"])(attributes.ids, id => {
  6406. const parsedId = parseInt(id, 10);
  6407. return Number.isInteger(parsedId) ? parsedId : null;
  6408. })
  6409. };
  6410. },
  6411. save({
  6412. attributes
  6413. }) {
  6414. const {
  6415. images,
  6416. columns = defaultColumnsNumber(attributes),
  6417. imageCrop,
  6418. caption,
  6419. linkTo
  6420. } = attributes;
  6421. return Object(external_wp_element_["createElement"])("figure", {
  6422. className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
  6423. }, Object(external_wp_element_["createElement"])("ul", {
  6424. className: "blocks-gallery-grid"
  6425. }, images.map(image => {
  6426. let href;
  6427. switch (linkTo) {
  6428. case 'media':
  6429. href = image.fullUrl || image.url;
  6430. break;
  6431. case 'attachment':
  6432. href = image.link;
  6433. break;
  6434. }
  6435. const img = Object(external_wp_element_["createElement"])("img", {
  6436. src: image.url,
  6437. alt: image.alt,
  6438. "data-id": image.id,
  6439. "data-full-url": image.fullUrl,
  6440. "data-link": image.link,
  6441. className: image.id ? `wp-image-${image.id}` : null
  6442. });
  6443. return Object(external_wp_element_["createElement"])("li", {
  6444. key: image.id || image.url,
  6445. className: "blocks-gallery-item"
  6446. }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
  6447. href: href
  6448. }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  6449. tagName: "figcaption",
  6450. className: "blocks-gallery-item__caption",
  6451. value: image.caption
  6452. })));
  6453. })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  6454. tagName: "figcaption",
  6455. className: "blocks-gallery-caption",
  6456. value: caption
  6457. }));
  6458. }
  6459. }, {
  6460. attributes: {
  6461. images: {
  6462. type: 'array',
  6463. default: [],
  6464. source: 'query',
  6465. selector: 'ul.wp-block-gallery .blocks-gallery-item',
  6466. query: {
  6467. url: {
  6468. source: 'attribute',
  6469. selector: 'img',
  6470. attribute: 'src'
  6471. },
  6472. fullUrl: {
  6473. source: 'attribute',
  6474. selector: 'img',
  6475. attribute: 'data-full-url'
  6476. },
  6477. alt: {
  6478. source: 'attribute',
  6479. selector: 'img',
  6480. attribute: 'alt',
  6481. default: ''
  6482. },
  6483. id: {
  6484. source: 'attribute',
  6485. selector: 'img',
  6486. attribute: 'data-id'
  6487. },
  6488. link: {
  6489. source: 'attribute',
  6490. selector: 'img',
  6491. attribute: 'data-link'
  6492. },
  6493. caption: {
  6494. type: 'array',
  6495. source: 'children',
  6496. selector: 'figcaption'
  6497. }
  6498. }
  6499. },
  6500. ids: {
  6501. type: 'array',
  6502. default: []
  6503. },
  6504. columns: {
  6505. type: 'number'
  6506. },
  6507. imageCrop: {
  6508. type: 'boolean',
  6509. default: true
  6510. },
  6511. linkTo: {
  6512. type: 'string',
  6513. default: 'none'
  6514. }
  6515. },
  6516. supports: {
  6517. align: true
  6518. },
  6519. save({
  6520. attributes
  6521. }) {
  6522. const {
  6523. images,
  6524. columns = defaultColumnsNumber(attributes),
  6525. imageCrop,
  6526. linkTo
  6527. } = attributes;
  6528. return Object(external_wp_element_["createElement"])("ul", {
  6529. className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
  6530. }, images.map(image => {
  6531. let href;
  6532. switch (linkTo) {
  6533. case 'media':
  6534. href = image.fullUrl || image.url;
  6535. break;
  6536. case 'attachment':
  6537. href = image.link;
  6538. break;
  6539. }
  6540. const img = Object(external_wp_element_["createElement"])("img", {
  6541. src: image.url,
  6542. alt: image.alt,
  6543. "data-id": image.id,
  6544. "data-full-url": image.fullUrl,
  6545. "data-link": image.link,
  6546. className: image.id ? `wp-image-${image.id}` : null
  6547. });
  6548. return Object(external_wp_element_["createElement"])("li", {
  6549. key: image.id || image.url,
  6550. className: "blocks-gallery-item"
  6551. }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
  6552. href: href
  6553. }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  6554. tagName: "figcaption",
  6555. value: image.caption
  6556. })));
  6557. }));
  6558. }
  6559. }, {
  6560. attributes: {
  6561. images: {
  6562. type: 'array',
  6563. default: [],
  6564. source: 'query',
  6565. selector: 'ul.wp-block-gallery .blocks-gallery-item',
  6566. query: {
  6567. url: {
  6568. source: 'attribute',
  6569. selector: 'img',
  6570. attribute: 'src'
  6571. },
  6572. alt: {
  6573. source: 'attribute',
  6574. selector: 'img',
  6575. attribute: 'alt',
  6576. default: ''
  6577. },
  6578. id: {
  6579. source: 'attribute',
  6580. selector: 'img',
  6581. attribute: 'data-id'
  6582. },
  6583. link: {
  6584. source: 'attribute',
  6585. selector: 'img',
  6586. attribute: 'data-link'
  6587. },
  6588. caption: {
  6589. type: 'array',
  6590. source: 'children',
  6591. selector: 'figcaption'
  6592. }
  6593. }
  6594. },
  6595. columns: {
  6596. type: 'number'
  6597. },
  6598. imageCrop: {
  6599. type: 'boolean',
  6600. default: true
  6601. },
  6602. linkTo: {
  6603. type: 'string',
  6604. default: 'none'
  6605. }
  6606. },
  6607. isEligible({
  6608. images,
  6609. ids
  6610. }) {
  6611. return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || Object(external_lodash_["some"])(images, (id, index) => {
  6612. if (!id && ids[index] !== null) {
  6613. return true;
  6614. }
  6615. return parseInt(id, 10) !== ids[index];
  6616. }));
  6617. },
  6618. migrate(attributes) {
  6619. return { ...attributes,
  6620. ids: Object(external_lodash_["map"])(attributes.images, ({
  6621. id
  6622. }) => {
  6623. if (!id) {
  6624. return null;
  6625. }
  6626. return parseInt(id, 10);
  6627. })
  6628. };
  6629. },
  6630. supports: {
  6631. align: true
  6632. },
  6633. save({
  6634. attributes
  6635. }) {
  6636. const {
  6637. images,
  6638. columns = defaultColumnsNumber(attributes),
  6639. imageCrop,
  6640. linkTo
  6641. } = attributes;
  6642. return Object(external_wp_element_["createElement"])("ul", {
  6643. className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
  6644. }, images.map(image => {
  6645. let href;
  6646. switch (linkTo) {
  6647. case 'media':
  6648. href = image.url;
  6649. break;
  6650. case 'attachment':
  6651. href = image.link;
  6652. break;
  6653. }
  6654. const img = Object(external_wp_element_["createElement"])("img", {
  6655. src: image.url,
  6656. alt: image.alt,
  6657. "data-id": image.id,
  6658. "data-link": image.link,
  6659. className: image.id ? `wp-image-${image.id}` : null
  6660. });
  6661. return Object(external_wp_element_["createElement"])("li", {
  6662. key: image.id || image.url,
  6663. className: "blocks-gallery-item"
  6664. }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
  6665. href: href
  6666. }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  6667. tagName: "figcaption",
  6668. value: image.caption
  6669. })));
  6670. }));
  6671. }
  6672. }, {
  6673. attributes: {
  6674. images: {
  6675. type: 'array',
  6676. default: [],
  6677. source: 'query',
  6678. selector: 'div.wp-block-gallery figure.blocks-gallery-image img',
  6679. query: {
  6680. url: {
  6681. source: 'attribute',
  6682. attribute: 'src'
  6683. },
  6684. alt: {
  6685. source: 'attribute',
  6686. attribute: 'alt',
  6687. default: ''
  6688. },
  6689. id: {
  6690. source: 'attribute',
  6691. attribute: 'data-id'
  6692. }
  6693. }
  6694. },
  6695. columns: {
  6696. type: 'number'
  6697. },
  6698. imageCrop: {
  6699. type: 'boolean',
  6700. default: true
  6701. },
  6702. linkTo: {
  6703. type: 'string',
  6704. default: 'none'
  6705. },
  6706. align: {
  6707. type: 'string',
  6708. default: 'none'
  6709. }
  6710. },
  6711. supports: {
  6712. align: true
  6713. },
  6714. save({
  6715. attributes
  6716. }) {
  6717. const {
  6718. images,
  6719. columns = defaultColumnsNumber(attributes),
  6720. align,
  6721. imageCrop,
  6722. linkTo
  6723. } = attributes;
  6724. const className = classnames_default()(`columns-${columns}`, {
  6725. alignnone: align === 'none',
  6726. 'is-cropped': imageCrop
  6727. });
  6728. return Object(external_wp_element_["createElement"])("div", {
  6729. className: className
  6730. }, images.map(image => {
  6731. let href;
  6732. switch (linkTo) {
  6733. case 'media':
  6734. href = image.url;
  6735. break;
  6736. case 'attachment':
  6737. href = image.link;
  6738. break;
  6739. }
  6740. const img = Object(external_wp_element_["createElement"])("img", {
  6741. src: image.url,
  6742. alt: image.alt,
  6743. "data-id": image.id
  6744. });
  6745. return Object(external_wp_element_["createElement"])("figure", {
  6746. key: image.id || image.url,
  6747. className: "blocks-gallery-image"
  6748. }, href ? Object(external_wp_element_["createElement"])("a", {
  6749. href: href
  6750. }, img) : img);
  6751. }));
  6752. }
  6753. }];
  6754. /* harmony default export */ var gallery_deprecated = (gallery_deprecated_deprecated);
  6755. // EXTERNAL MODULE: external ["wp","viewport"]
  6756. var external_wp_viewport_ = __webpack_require__("KEfo");
  6757. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
  6758. /**
  6759. * WordPress dependencies
  6760. */
  6761. const sharedIcon = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  6762. icon: library_gallery
  6763. });
  6764. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
  6765. var chevron_left = __webpack_require__("2gm7");
  6766. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
  6767. var chevron_right = __webpack_require__("1iEr");
  6768. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
  6769. var library_edit = __webpack_require__("B9Az");
  6770. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
  6771. var close_small = __webpack_require__("bWcr");
  6772. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
  6773. const constants_LINK_DESTINATION_NONE = 'none';
  6774. const constants_LINK_DESTINATION_MEDIA = 'file';
  6775. const constants_LINK_DESTINATION_ATTACHMENT = 'post';
  6776. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery-image.js
  6777. /**
  6778. * External dependencies
  6779. */
  6780. /**
  6781. * WordPress dependencies
  6782. */
  6783. /**
  6784. * Internal dependencies
  6785. */
  6786. const gallery_image_isTemporaryImage = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url);
  6787. class gallery_image_GalleryImage extends external_wp_element_["Component"] {
  6788. constructor() {
  6789. super(...arguments);
  6790. this.onSelectImage = this.onSelectImage.bind(this);
  6791. this.onRemoveImage = this.onRemoveImage.bind(this);
  6792. this.bindContainer = this.bindContainer.bind(this);
  6793. this.onEdit = this.onEdit.bind(this);
  6794. this.onSelectImageFromLibrary = this.onSelectImageFromLibrary.bind(this);
  6795. this.onSelectCustomURL = this.onSelectCustomURL.bind(this);
  6796. this.state = {
  6797. isEditing: false
  6798. };
  6799. }
  6800. bindContainer(ref) {
  6801. this.container = ref;
  6802. }
  6803. onSelectImage() {
  6804. if (!this.props.isSelected) {
  6805. this.props.onSelect();
  6806. }
  6807. }
  6808. onRemoveImage(event) {
  6809. if (this.container === this.container.ownerDocument.activeElement && this.props.isSelected && [external_wp_keycodes_["BACKSPACE"], external_wp_keycodes_["DELETE"]].indexOf(event.keyCode) !== -1) {
  6810. event.stopPropagation();
  6811. event.preventDefault();
  6812. this.props.onRemove();
  6813. }
  6814. }
  6815. onEdit() {
  6816. this.setState({
  6817. isEditing: true
  6818. });
  6819. }
  6820. componentDidUpdate() {
  6821. const {
  6822. image,
  6823. url,
  6824. __unstableMarkNextChangeAsNotPersistent
  6825. } = this.props;
  6826. if (image && !url) {
  6827. __unstableMarkNextChangeAsNotPersistent();
  6828. this.props.setAttributes({
  6829. url: image.source_url,
  6830. alt: image.alt_text
  6831. });
  6832. }
  6833. }
  6834. deselectOnBlur() {
  6835. this.props.onDeselect();
  6836. }
  6837. onSelectImageFromLibrary(media) {
  6838. const {
  6839. setAttributes,
  6840. id,
  6841. url,
  6842. alt,
  6843. caption,
  6844. sizeSlug
  6845. } = this.props;
  6846. if (!media || !media.url) {
  6847. return;
  6848. }
  6849. let mediaAttributes = shared_pickRelevantMediaFiles(media, sizeSlug); // If the current image is temporary but an alt text was meanwhile
  6850. // written by the user, make sure the text is not overwritten.
  6851. if (gallery_image_isTemporaryImage(id, url)) {
  6852. if (alt) {
  6853. mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['alt']);
  6854. }
  6855. } // If a caption text was meanwhile written by the user,
  6856. // make sure the text is not overwritten by empty captions.
  6857. if (caption && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) {
  6858. mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']);
  6859. }
  6860. setAttributes(mediaAttributes);
  6861. this.setState({
  6862. isEditing: false
  6863. });
  6864. }
  6865. onSelectCustomURL(newURL) {
  6866. const {
  6867. setAttributes,
  6868. url
  6869. } = this.props;
  6870. if (newURL !== url) {
  6871. setAttributes({
  6872. url: newURL,
  6873. id: undefined
  6874. });
  6875. this.setState({
  6876. isEditing: false
  6877. });
  6878. }
  6879. }
  6880. render() {
  6881. const {
  6882. url,
  6883. alt,
  6884. id,
  6885. linkTo,
  6886. link,
  6887. isFirstItem,
  6888. isLastItem,
  6889. isSelected,
  6890. caption,
  6891. onRemove,
  6892. onMoveForward,
  6893. onMoveBackward,
  6894. setAttributes,
  6895. 'aria-label': ariaLabel
  6896. } = this.props;
  6897. const {
  6898. isEditing
  6899. } = this.state;
  6900. let href;
  6901. switch (linkTo) {
  6902. case constants_LINK_DESTINATION_MEDIA:
  6903. href = url;
  6904. break;
  6905. case constants_LINK_DESTINATION_ATTACHMENT:
  6906. href = link;
  6907. break;
  6908. }
  6909. const img = // Disable reason: Image itself is not meant to be interactive, but should
  6910. // direct image selection and unfocus caption fields.
  6911. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
  6912. Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", {
  6913. src: url,
  6914. alt: alt,
  6915. "data-id": id,
  6916. onKeyDown: this.onRemoveImage,
  6917. tabIndex: "0",
  6918. "aria-label": ariaLabel,
  6919. ref: this.bindContainer
  6920. }), Object(external_wp_blob_["isBlobURL"])(url) && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))
  6921. /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */
  6922. ;
  6923. const className = classnames_default()({
  6924. 'is-selected': isSelected,
  6925. 'is-transient': Object(external_wp_blob_["isBlobURL"])(url)
  6926. });
  6927. return (// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
  6928. Object(external_wp_element_["createElement"])("figure", {
  6929. className: className,
  6930. onClick: this.onSelectImage,
  6931. onFocus: this.onSelectImage
  6932. }, !isEditing && (href ? Object(external_wp_element_["createElement"])("a", {
  6933. href: href
  6934. }, img) : img), isEditing && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  6935. labels: {
  6936. title: Object(external_wp_i18n_["__"])('Edit gallery image')
  6937. },
  6938. icon: library_image,
  6939. onSelect: this.onSelectImageFromLibrary,
  6940. onSelectURL: this.onSelectCustomURL,
  6941. accept: "image/*",
  6942. allowedTypes: ['image'],
  6943. value: {
  6944. id,
  6945. src: url
  6946. }
  6947. }), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
  6948. className: "block-library-gallery-item__inline-menu is-left"
  6949. }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  6950. icon: chevron_left["a" /* default */],
  6951. onClick: isFirstItem ? undefined : onMoveBackward,
  6952. label: Object(external_wp_i18n_["__"])('Move image backward'),
  6953. "aria-disabled": isFirstItem,
  6954. disabled: !isSelected
  6955. }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  6956. icon: chevron_right["a" /* default */],
  6957. onClick: isLastItem ? undefined : onMoveForward,
  6958. label: Object(external_wp_i18n_["__"])('Move image forward'),
  6959. "aria-disabled": isLastItem,
  6960. disabled: !isSelected
  6961. })), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
  6962. className: "block-library-gallery-item__inline-menu is-right"
  6963. }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  6964. icon: library_edit["a" /* default */],
  6965. onClick: this.onEdit,
  6966. label: Object(external_wp_i18n_["__"])('Replace image'),
  6967. disabled: !isSelected
  6968. }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  6969. icon: close_small["a" /* default */],
  6970. onClick: onRemove,
  6971. label: Object(external_wp_i18n_["__"])('Remove image'),
  6972. disabled: !isSelected
  6973. })), !isEditing && (isSelected || caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  6974. tagName: "figcaption",
  6975. "aria-label": Object(external_wp_i18n_["__"])('Image caption text'),
  6976. placeholder: isSelected ? Object(external_wp_i18n_["__"])('Add caption') : null,
  6977. value: caption,
  6978. onChange: newCaption => setAttributes({
  6979. caption: newCaption
  6980. }),
  6981. inlineToolbar: true
  6982. }))
  6983. );
  6984. }
  6985. }
  6986. /* harmony default export */ var gallery_image = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, ownProps) => {
  6987. const {
  6988. getMedia
  6989. } = select(external_wp_coreData_["store"]);
  6990. const {
  6991. id
  6992. } = ownProps;
  6993. return {
  6994. image: id ? getMedia(parseInt(id, 10)) : null
  6995. };
  6996. }), Object(external_wp_data_["withDispatch"])(dispatch => {
  6997. const {
  6998. __unstableMarkNextChangeAsNotPersistent
  6999. } = dispatch(external_wp_blockEditor_["store"]);
  7000. return {
  7001. __unstableMarkNextChangeAsNotPersistent
  7002. };
  7003. })])(gallery_image_GalleryImage));
  7004. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js
  7005. /**
  7006. * External dependencies
  7007. */
  7008. /**
  7009. * WordPress dependencies
  7010. */
  7011. /**
  7012. * Internal dependencies
  7013. */
  7014. const Gallery = props => {
  7015. const {
  7016. attributes,
  7017. isSelected,
  7018. setAttributes,
  7019. selectedImage,
  7020. mediaPlaceholder,
  7021. onMoveBackward,
  7022. onMoveForward,
  7023. onRemoveImage,
  7024. onSelectImage,
  7025. onDeselectImage,
  7026. onSetImageAttributes,
  7027. insertBlocksAfter,
  7028. blockProps
  7029. } = props;
  7030. const {
  7031. align,
  7032. columns = defaultColumnsNumber(attributes),
  7033. caption,
  7034. imageCrop,
  7035. images
  7036. } = attributes;
  7037. return Object(external_wp_element_["createElement"])("figure", Object(esm_extends["a" /* default */])({}, blockProps, {
  7038. className: classnames_default()(blockProps.className, {
  7039. [`align${align}`]: align,
  7040. [`columns-${columns}`]: columns,
  7041. 'is-cropped': imageCrop
  7042. })
  7043. }), Object(external_wp_element_["createElement"])("ul", {
  7044. className: "blocks-gallery-grid"
  7045. }, images.map((img, index) => {
  7046. const ariaLabel = Object(external_wp_i18n_["sprintf"])(
  7047. /* translators: 1: the order number of the image. 2: the total number of images. */
  7048. Object(external_wp_i18n_["__"])('image %1$d of %2$d in gallery'), index + 1, images.length);
  7049. return Object(external_wp_element_["createElement"])("li", {
  7050. className: "blocks-gallery-item",
  7051. key: img.id ? `${img.id}-${index}` : img.url
  7052. }, Object(external_wp_element_["createElement"])(gallery_image, {
  7053. url: img.url,
  7054. alt: img.alt,
  7055. id: img.id,
  7056. isFirstItem: index === 0,
  7057. isLastItem: index + 1 === images.length,
  7058. isSelected: isSelected && selectedImage === index,
  7059. onMoveBackward: onMoveBackward(index),
  7060. onMoveForward: onMoveForward(index),
  7061. onRemove: onRemoveImage(index),
  7062. onSelect: onSelectImage(index),
  7063. onDeselect: onDeselectImage(index),
  7064. setAttributes: attrs => onSetImageAttributes(index, attrs),
  7065. caption: img.caption,
  7066. "aria-label": ariaLabel,
  7067. sizeSlug: attributes.sizeSlug
  7068. }));
  7069. })), mediaPlaceholder, Object(external_wp_element_["createElement"])(RichTextVisibilityHelper, {
  7070. isHidden: !isSelected && external_wp_blockEditor_["RichText"].isEmpty(caption),
  7071. tagName: "figcaption",
  7072. className: "blocks-gallery-caption",
  7073. "aria-label": Object(external_wp_i18n_["__"])('Gallery caption text'),
  7074. placeholder: Object(external_wp_i18n_["__"])('Write gallery caption…'),
  7075. value: caption,
  7076. onChange: value => setAttributes({
  7077. caption: value
  7078. }),
  7079. inlineToolbar: true,
  7080. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  7081. }));
  7082. };
  7083. function RichTextVisibilityHelper({
  7084. isHidden,
  7085. ...richTextProps
  7086. }) {
  7087. return isHidden ? Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], Object(esm_extends["a" /* default */])({
  7088. as: external_wp_blockEditor_["RichText"]
  7089. }, richTextProps)) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], richTextProps);
  7090. }
  7091. /* harmony default export */ var gallery_gallery = (Gallery);
  7092. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit.js
  7093. /**
  7094. * External dependencies
  7095. */
  7096. /**
  7097. * WordPress dependencies
  7098. */
  7099. /**
  7100. * Internal dependencies
  7101. */
  7102. const MAX_COLUMNS = 8;
  7103. const linkOptions = [{
  7104. value: constants_LINK_DESTINATION_ATTACHMENT,
  7105. label: Object(external_wp_i18n_["__"])('Attachment Page')
  7106. }, {
  7107. value: constants_LINK_DESTINATION_MEDIA,
  7108. label: Object(external_wp_i18n_["__"])('Media File')
  7109. }, {
  7110. value: constants_LINK_DESTINATION_NONE,
  7111. label: Object(external_wp_i18n_["__"])('None')
  7112. }];
  7113. const edit_ALLOWED_MEDIA_TYPES = ['image'];
  7114. const PLACEHOLDER_TEXT = external_wp_element_["Platform"].select({
  7115. web: Object(external_wp_i18n_["__"])('Drag images, upload new ones or select files from your library.'),
  7116. native: Object(external_wp_i18n_["__"])('ADD MEDIA')
  7117. });
  7118. const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_["Platform"].select({
  7119. web: {},
  7120. native: {
  7121. type: 'stepper'
  7122. }
  7123. });
  7124. function GalleryEdit(props) {
  7125. const {
  7126. attributes,
  7127. clientId,
  7128. isSelected,
  7129. noticeUI,
  7130. noticeOperations,
  7131. onFocus
  7132. } = props;
  7133. const {
  7134. columns = defaultColumnsNumber(attributes),
  7135. imageCrop,
  7136. images,
  7137. linkTo,
  7138. sizeSlug
  7139. } = attributes;
  7140. const [selectedImage, setSelectedImage] = Object(external_wp_element_["useState"])();
  7141. const [attachmentCaptions, setAttachmentCaptions] = Object(external_wp_element_["useState"])();
  7142. const {
  7143. __unstableMarkNextChangeAsNotPersistent
  7144. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  7145. const {
  7146. imageSizes,
  7147. mediaUpload,
  7148. getMedia,
  7149. wasBlockJustInserted
  7150. } = Object(external_wp_data_["useSelect"])(select => {
  7151. const settings = select(external_wp_blockEditor_["store"]).getSettings();
  7152. return {
  7153. imageSizes: settings.imageSizes,
  7154. mediaUpload: settings.mediaUpload,
  7155. getMedia: select(external_wp_coreData_["store"]).getMedia,
  7156. wasBlockJustInserted: select(external_wp_blockEditor_["store"]).wasBlockJustInserted(clientId, 'inserter_menu')
  7157. };
  7158. });
  7159. const resizedImages = Object(external_wp_element_["useMemo"])(() => {
  7160. if (isSelected) {
  7161. return Object(external_lodash_["reduce"])(attributes.ids, (currentResizedImages, id) => {
  7162. if (!id) {
  7163. return currentResizedImages;
  7164. }
  7165. const image = getMedia(id);
  7166. const sizes = Object(external_lodash_["reduce"])(imageSizes, (currentSizes, size) => {
  7167. const defaultUrl = Object(external_lodash_["get"])(image, ['sizes', size.slug, 'url']);
  7168. const mediaDetailsUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', size.slug, 'source_url']);
  7169. return { ...currentSizes,
  7170. [size.slug]: defaultUrl || mediaDetailsUrl
  7171. };
  7172. }, {});
  7173. return { ...currentResizedImages,
  7174. [parseInt(id, 10)]: sizes
  7175. };
  7176. }, {});
  7177. }
  7178. return {};
  7179. }, [isSelected, attributes.ids, imageSizes]);
  7180. function onFocusGalleryCaption() {
  7181. setSelectedImage();
  7182. }
  7183. function setAttributes(newAttrs) {
  7184. if (newAttrs.ids) {
  7185. throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');
  7186. }
  7187. if (newAttrs.images) {
  7188. newAttrs = { ...newAttrs,
  7189. // Unlike images[ n ].id which is a string, always ensure the
  7190. // ids array contains numbers as per its attribute type.
  7191. ids: Object(external_lodash_["map"])(newAttrs.images, ({
  7192. id
  7193. }) => parseInt(id, 10))
  7194. };
  7195. }
  7196. props.setAttributes(newAttrs);
  7197. }
  7198. function onSelectImage(index) {
  7199. return () => {
  7200. setSelectedImage(index);
  7201. };
  7202. }
  7203. function onDeselectImage() {
  7204. return () => {
  7205. setSelectedImage();
  7206. };
  7207. }
  7208. function onMove(oldIndex, newIndex) {
  7209. const newImages = [...images];
  7210. newImages.splice(newIndex, 1, images[oldIndex]);
  7211. newImages.splice(oldIndex, 1, images[newIndex]);
  7212. setSelectedImage(newIndex);
  7213. setAttributes({
  7214. images: newImages
  7215. });
  7216. }
  7217. function onMoveForward(oldIndex) {
  7218. return () => {
  7219. if (oldIndex === images.length - 1) {
  7220. return;
  7221. }
  7222. onMove(oldIndex, oldIndex + 1);
  7223. };
  7224. }
  7225. function onMoveBackward(oldIndex) {
  7226. return () => {
  7227. if (oldIndex === 0) {
  7228. return;
  7229. }
  7230. onMove(oldIndex, oldIndex - 1);
  7231. };
  7232. }
  7233. function onRemoveImage(index) {
  7234. return () => {
  7235. const newImages = Object(external_lodash_["filter"])(images, (img, i) => index !== i);
  7236. setSelectedImage();
  7237. setAttributes({
  7238. images: newImages,
  7239. columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns
  7240. });
  7241. };
  7242. }
  7243. function selectCaption(newImage) {
  7244. // The image id in both the images and attachmentCaptions arrays is a
  7245. // string, so ensure comparison works correctly by converting the
  7246. // newImage.id to a string.
  7247. const newImageId = Object(external_lodash_["toString"])(newImage.id);
  7248. const currentImage = Object(external_lodash_["find"])(images, {
  7249. id: newImageId
  7250. });
  7251. const currentImageCaption = currentImage ? currentImage.caption : newImage.caption;
  7252. if (!attachmentCaptions) {
  7253. return currentImageCaption;
  7254. }
  7255. const attachment = Object(external_lodash_["find"])(attachmentCaptions, {
  7256. id: newImageId
  7257. }); // if the attachment caption is updated
  7258. if (attachment && attachment.caption !== newImage.caption) {
  7259. return newImage.caption;
  7260. }
  7261. return currentImageCaption;
  7262. }
  7263. function onSelectImages(newImages) {
  7264. setAttachmentCaptions(newImages.map(newImage => ({
  7265. // Store the attachmentCaption id as a string for consistency
  7266. // with the type of the id in the images attribute.
  7267. id: Object(external_lodash_["toString"])(newImage.id),
  7268. caption: newImage.caption
  7269. })));
  7270. setAttributes({
  7271. images: newImages.map(newImage => ({ ...shared_pickRelevantMediaFiles(newImage, sizeSlug),
  7272. caption: selectCaption(newImage, images, attachmentCaptions),
  7273. // The id value is stored in a data attribute, so when the
  7274. // block is parsed it's converted to a string. Converting
  7275. // to a string here ensures it's type is consistent.
  7276. id: Object(external_lodash_["toString"])(newImage.id)
  7277. })),
  7278. columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns
  7279. });
  7280. }
  7281. function onUploadError(message) {
  7282. noticeOperations.removeAllNotices();
  7283. noticeOperations.createErrorNotice(message);
  7284. }
  7285. function setLinkTo(value) {
  7286. setAttributes({
  7287. linkTo: value
  7288. });
  7289. }
  7290. function setColumnsNumber(value) {
  7291. setAttributes({
  7292. columns: value
  7293. });
  7294. }
  7295. function toggleImageCrop() {
  7296. setAttributes({
  7297. imageCrop: !imageCrop
  7298. });
  7299. }
  7300. function getImageCropHelp(checked) {
  7301. return checked ? Object(external_wp_i18n_["__"])('Thumbnails are cropped to align.') : Object(external_wp_i18n_["__"])('Thumbnails are not cropped.');
  7302. }
  7303. function setImageAttributes(index, newAttributes) {
  7304. if (!images[index]) {
  7305. return;
  7306. }
  7307. setAttributes({
  7308. images: [...images.slice(0, index), { ...images[index],
  7309. ...newAttributes
  7310. }, ...images.slice(index + 1)]
  7311. });
  7312. }
  7313. function getImagesSizeOptions() {
  7314. return Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, ({
  7315. slug
  7316. }) => Object(external_lodash_["some"])(resizedImages, sizes => sizes[slug])), ({
  7317. name,
  7318. slug
  7319. }) => ({
  7320. value: slug,
  7321. label: name
  7322. }));
  7323. }
  7324. function updateImagesSize(newSizeSlug) {
  7325. const updatedImages = Object(external_lodash_["map"])(images, image => {
  7326. if (!image.id) {
  7327. return image;
  7328. }
  7329. const url = Object(external_lodash_["get"])(resizedImages, [parseInt(image.id, 10), newSizeSlug]);
  7330. return { ...image,
  7331. ...(url && {
  7332. url
  7333. })
  7334. };
  7335. });
  7336. setAttributes({
  7337. images: updatedImages,
  7338. sizeSlug: newSizeSlug
  7339. });
  7340. }
  7341. Object(external_wp_element_["useEffect"])(() => {
  7342. if (external_wp_element_["Platform"].OS === 'web' && images && images.length > 0 && Object(external_lodash_["every"])(images, ({
  7343. url
  7344. }) => Object(external_wp_blob_["isBlobURL"])(url))) {
  7345. const filesList = Object(external_lodash_["map"])(images, ({
  7346. url
  7347. }) => Object(external_wp_blob_["getBlobByURL"])(url));
  7348. Object(external_lodash_["forEach"])(images, ({
  7349. url
  7350. }) => Object(external_wp_blob_["revokeBlobURL"])(url));
  7351. mediaUpload({
  7352. filesList,
  7353. onFileChange: onSelectImages,
  7354. allowedTypes: ['image']
  7355. });
  7356. }
  7357. }, []);
  7358. Object(external_wp_element_["useEffect"])(() => {
  7359. // Deselect images when deselecting the block
  7360. if (!isSelected) {
  7361. setSelectedImage();
  7362. }
  7363. }, [isSelected]);
  7364. Object(external_wp_element_["useEffect"])(() => {
  7365. // linkTo attribute must be saved so blocks don't break when changing
  7366. // image_default_link_type in options.php
  7367. if (!linkTo) {
  7368. var _window, _window$wp, _window$wp$media, _window$wp$media$view, _window$wp$media$view2, _window$wp$media$view3;
  7369. __unstableMarkNextChangeAsNotPersistent();
  7370. setAttributes({
  7371. linkTo: ((_window = window) === null || _window === void 0 ? void 0 : (_window$wp = _window.wp) === null || _window$wp === void 0 ? void 0 : (_window$wp$media = _window$wp.media) === null || _window$wp$media === void 0 ? void 0 : (_window$wp$media$view = _window$wp$media.view) === null || _window$wp$media$view === void 0 ? void 0 : (_window$wp$media$view2 = _window$wp$media$view.settings) === null || _window$wp$media$view2 === void 0 ? void 0 : (_window$wp$media$view3 = _window$wp$media$view2.defaultProps) === null || _window$wp$media$view3 === void 0 ? void 0 : _window$wp$media$view3.link) || constants_LINK_DESTINATION_NONE
  7372. });
  7373. }
  7374. }, [linkTo]);
  7375. const hasImages = !!images.length;
  7376. const hasImageIds = hasImages && images.some(image => !!image.id);
  7377. const mediaPlaceholder = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  7378. addToGallery: hasImageIds,
  7379. isAppender: hasImages,
  7380. disableMediaButtons: hasImages && !isSelected,
  7381. icon: !hasImages && sharedIcon,
  7382. labels: {
  7383. title: !hasImages && Object(external_wp_i18n_["__"])('Gallery'),
  7384. instructions: !hasImages && PLACEHOLDER_TEXT
  7385. },
  7386. onSelect: onSelectImages,
  7387. accept: "image/*",
  7388. allowedTypes: edit_ALLOWED_MEDIA_TYPES,
  7389. multiple: true,
  7390. value: hasImageIds ? images : {},
  7391. onError: onUploadError,
  7392. notices: hasImages ? undefined : noticeUI,
  7393. onFocus: onFocus,
  7394. autoOpenMediaUpload: !hasImages && isSelected && wasBlockJustInserted
  7395. });
  7396. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  7397. if (!hasImages) {
  7398. return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, mediaPlaceholder);
  7399. }
  7400. const imageSizeOptions = getImagesSizeOptions();
  7401. const shouldShowSizeOptions = hasImages && !Object(external_lodash_["isEmpty"])(imageSizeOptions);
  7402. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  7403. title: Object(external_wp_i18n_["__"])('Gallery settings')
  7404. }, images.length > 1 && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], Object(esm_extends["a" /* default */])({
  7405. label: Object(external_wp_i18n_["__"])('Columns'),
  7406. value: columns,
  7407. onChange: setColumnsNumber,
  7408. min: 1,
  7409. max: Math.min(MAX_COLUMNS, images.length)
  7410. }, MOBILE_CONTROL_PROPS_RANGE_CONTROL, {
  7411. required: true
  7412. })), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  7413. label: Object(external_wp_i18n_["__"])('Crop images'),
  7414. checked: !!imageCrop,
  7415. onChange: toggleImageCrop,
  7416. help: getImageCropHelp
  7417. }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  7418. label: Object(external_wp_i18n_["__"])('Link to'),
  7419. value: linkTo,
  7420. onChange: setLinkTo,
  7421. options: linkOptions,
  7422. hideCancelButton: true
  7423. }), shouldShowSizeOptions && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  7424. label: Object(external_wp_i18n_["__"])('Image size'),
  7425. value: sizeSlug,
  7426. options: imageSizeOptions,
  7427. onChange: updateImagesSize,
  7428. hideCancelButton: true
  7429. }))), noticeUI, Object(external_wp_element_["createElement"])(gallery_gallery, Object(esm_extends["a" /* default */])({}, props, {
  7430. selectedImage: selectedImage,
  7431. mediaPlaceholder: mediaPlaceholder,
  7432. onMoveBackward: onMoveBackward,
  7433. onMoveForward: onMoveForward,
  7434. onRemoveImage: onRemoveImage,
  7435. onSelectImage: onSelectImage,
  7436. onDeselectImage: onDeselectImage,
  7437. onSetImageAttributes: setImageAttributes,
  7438. blockProps: blockProps // This prop is used by gallery.native.js.
  7439. ,
  7440. onFocusGalleryCaption: onFocusGalleryCaption
  7441. })));
  7442. }
  7443. /* harmony default export */ var gallery_edit = (Object(external_wp_compose_["compose"])([external_wp_components_["withNotices"], Object(external_wp_viewport_["withViewportMatch"])({
  7444. isNarrow: '< small'
  7445. })])(GalleryEdit));
  7446. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/save.js
  7447. /**
  7448. * WordPress dependencies
  7449. */
  7450. /**
  7451. * Internal dependencies
  7452. */
  7453. function gallery_save_save({
  7454. attributes
  7455. }) {
  7456. const {
  7457. images,
  7458. columns = defaultColumnsNumber(attributes),
  7459. imageCrop,
  7460. caption,
  7461. linkTo
  7462. } = attributes;
  7463. const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`;
  7464. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({
  7465. className
  7466. }), Object(external_wp_element_["createElement"])("ul", {
  7467. className: "blocks-gallery-grid"
  7468. }, images.map(image => {
  7469. let href;
  7470. switch (linkTo) {
  7471. case constants_LINK_DESTINATION_MEDIA:
  7472. href = image.fullUrl || image.url;
  7473. break;
  7474. case constants_LINK_DESTINATION_ATTACHMENT:
  7475. href = image.link;
  7476. break;
  7477. }
  7478. const img = Object(external_wp_element_["createElement"])("img", {
  7479. src: image.url,
  7480. alt: image.alt,
  7481. "data-id": image.id,
  7482. "data-full-url": image.fullUrl,
  7483. "data-link": image.link,
  7484. className: image.id ? `wp-image-${image.id}` : null
  7485. });
  7486. return Object(external_wp_element_["createElement"])("li", {
  7487. key: image.id || image.url,
  7488. className: "blocks-gallery-item"
  7489. }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
  7490. href: href
  7491. }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  7492. tagName: "figcaption",
  7493. className: "blocks-gallery-item__caption",
  7494. value: image.caption
  7495. })));
  7496. })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  7497. tagName: "figcaption",
  7498. className: "blocks-gallery-caption",
  7499. value: caption
  7500. }));
  7501. }
  7502. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js
  7503. /**
  7504. * External dependencies
  7505. */
  7506. /**
  7507. * WordPress dependencies
  7508. */
  7509. /**
  7510. * Internal dependencies
  7511. */
  7512. const parseShortcodeIds = ids => {
  7513. if (!ids) {
  7514. return [];
  7515. }
  7516. return ids.split(',').map(id => parseInt(id, 10));
  7517. };
  7518. const gallery_transforms_transforms = {
  7519. from: [{
  7520. type: 'block',
  7521. isMultiBlock: true,
  7522. blocks: ['core/image'],
  7523. transform: attributes => {
  7524. // Init the align and size from the first item which may be either the placeholder or an image.
  7525. let {
  7526. align,
  7527. sizeSlug
  7528. } = attributes[0]; // Loop through all the images and check if they have the same align and size.
  7529. align = Object(external_lodash_["every"])(attributes, ['align', align]) ? align : undefined;
  7530. sizeSlug = Object(external_lodash_["every"])(attributes, ['sizeSlug', sizeSlug]) ? sizeSlug : undefined;
  7531. const validImages = Object(external_lodash_["filter"])(attributes, ({
  7532. url
  7533. }) => url);
  7534. return Object(external_wp_blocks_["createBlock"])('core/gallery', {
  7535. images: validImages.map(({
  7536. id,
  7537. url,
  7538. alt,
  7539. caption
  7540. }) => ({
  7541. id: Object(external_lodash_["toString"])(id),
  7542. url,
  7543. alt,
  7544. caption
  7545. })),
  7546. ids: validImages.map(({
  7547. id
  7548. }) => parseInt(id, 10)),
  7549. align,
  7550. sizeSlug
  7551. });
  7552. }
  7553. }, {
  7554. type: 'shortcode',
  7555. tag: 'gallery',
  7556. attributes: {
  7557. images: {
  7558. type: 'array',
  7559. shortcode: ({
  7560. named: {
  7561. ids
  7562. }
  7563. }) => {
  7564. return parseShortcodeIds(ids).map(id => ({
  7565. id: Object(external_lodash_["toString"])(id)
  7566. }));
  7567. }
  7568. },
  7569. ids: {
  7570. type: 'array',
  7571. shortcode: ({
  7572. named: {
  7573. ids
  7574. }
  7575. }) => {
  7576. return parseShortcodeIds(ids);
  7577. }
  7578. },
  7579. columns: {
  7580. type: 'number',
  7581. shortcode: ({
  7582. named: {
  7583. columns = '3'
  7584. }
  7585. }) => {
  7586. return parseInt(columns, 10);
  7587. }
  7588. },
  7589. linkTo: {
  7590. type: 'string',
  7591. shortcode: ({
  7592. named: {
  7593. link = constants_LINK_DESTINATION_ATTACHMENT
  7594. }
  7595. }) => {
  7596. return link;
  7597. }
  7598. }
  7599. },
  7600. isMatch({
  7601. named
  7602. }) {
  7603. return undefined !== named.ids;
  7604. }
  7605. }, {
  7606. // When created by drag and dropping multiple files on an insertion point
  7607. type: 'files',
  7608. isMatch(files) {
  7609. return files.length !== 1 && Object(external_lodash_["every"])(files, file => file.type.indexOf('image/') === 0);
  7610. },
  7611. transform(files) {
  7612. const block = Object(external_wp_blocks_["createBlock"])('core/gallery', {
  7613. images: files.map(file => shared_pickRelevantMediaFiles({
  7614. url: Object(external_wp_blob_["createBlobURL"])(file)
  7615. }))
  7616. });
  7617. return block;
  7618. }
  7619. }],
  7620. to: [{
  7621. type: 'block',
  7622. blocks: ['core/image'],
  7623. transform: ({
  7624. images,
  7625. align,
  7626. sizeSlug,
  7627. ids
  7628. }) => {
  7629. if (images.length > 0) {
  7630. return images.map(({
  7631. url,
  7632. alt,
  7633. caption
  7634. }, index) => Object(external_wp_blocks_["createBlock"])('core/image', {
  7635. id: ids[index],
  7636. url,
  7637. alt,
  7638. caption,
  7639. align,
  7640. sizeSlug
  7641. }));
  7642. }
  7643. return Object(external_wp_blocks_["createBlock"])('core/image', {
  7644. align
  7645. });
  7646. }
  7647. }]
  7648. };
  7649. /* harmony default export */ var gallery_transforms = (gallery_transforms_transforms);
  7650. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
  7651. /**
  7652. * WordPress dependencies
  7653. */
  7654. /**
  7655. * Internal dependencies
  7656. */
  7657. const gallery_metadata = {
  7658. apiVersion: 2,
  7659. name: "core/gallery",
  7660. title: "Gallery",
  7661. category: "media",
  7662. description: "Display multiple images in a rich gallery.",
  7663. keywords: ["images", "photos"],
  7664. textdomain: "default",
  7665. attributes: {
  7666. images: {
  7667. type: "array",
  7668. "default": [],
  7669. source: "query",
  7670. selector: ".blocks-gallery-item",
  7671. query: {
  7672. url: {
  7673. type: "string",
  7674. source: "attribute",
  7675. selector: "img",
  7676. attribute: "src"
  7677. },
  7678. fullUrl: {
  7679. type: "string",
  7680. source: "attribute",
  7681. selector: "img",
  7682. attribute: "data-full-url"
  7683. },
  7684. link: {
  7685. type: "string",
  7686. source: "attribute",
  7687. selector: "img",
  7688. attribute: "data-link"
  7689. },
  7690. alt: {
  7691. type: "string",
  7692. source: "attribute",
  7693. selector: "img",
  7694. attribute: "alt",
  7695. "default": ""
  7696. },
  7697. id: {
  7698. type: "string",
  7699. source: "attribute",
  7700. selector: "img",
  7701. attribute: "data-id"
  7702. },
  7703. caption: {
  7704. type: "string",
  7705. source: "html",
  7706. selector: ".blocks-gallery-item__caption"
  7707. }
  7708. }
  7709. },
  7710. ids: {
  7711. type: "array",
  7712. items: {
  7713. type: "number"
  7714. },
  7715. "default": []
  7716. },
  7717. columns: {
  7718. type: "number",
  7719. minimum: 1,
  7720. maximum: 8
  7721. },
  7722. caption: {
  7723. type: "string",
  7724. source: "html",
  7725. selector: ".blocks-gallery-caption"
  7726. },
  7727. imageCrop: {
  7728. type: "boolean",
  7729. "default": true
  7730. },
  7731. linkTo: {
  7732. type: "string"
  7733. },
  7734. sizeSlug: {
  7735. type: "string",
  7736. "default": "large"
  7737. }
  7738. },
  7739. supports: {
  7740. anchor: true,
  7741. align: true
  7742. },
  7743. editorStyle: "wp-block-gallery-editor",
  7744. style: "wp-block-gallery"
  7745. };
  7746. const {
  7747. name: gallery_name
  7748. } = gallery_metadata;
  7749. const gallery_settings = {
  7750. icon: library_gallery,
  7751. example: {
  7752. attributes: {
  7753. columns: 2,
  7754. images: [{
  7755. url: 'https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg'
  7756. }, {
  7757. url: 'https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg'
  7758. }]
  7759. }
  7760. },
  7761. transforms: gallery_transforms,
  7762. edit: gallery_edit,
  7763. save: gallery_save_save,
  7764. deprecated: gallery_deprecated
  7765. };
  7766. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js
  7767. /**
  7768. * WordPress dependencies
  7769. */
  7770. const archive = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  7771. viewBox: "0 0 24 24",
  7772. xmlns: "http://www.w3.org/2000/svg"
  7773. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  7774. d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"
  7775. }));
  7776. /* harmony default export */ var library_archive = (archive);
  7777. // EXTERNAL MODULE: external ["wp","serverSideRender"]
  7778. var external_wp_serverSideRender_ = __webpack_require__("JREk");
  7779. var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_);
  7780. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/edit.js
  7781. /**
  7782. * WordPress dependencies
  7783. */
  7784. function ArchivesEdit({
  7785. attributes,
  7786. setAttributes
  7787. }) {
  7788. const {
  7789. showPostCounts,
  7790. displayAsDropdown
  7791. } = attributes;
  7792. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  7793. title: Object(external_wp_i18n_["__"])('Archives settings')
  7794. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  7795. label: Object(external_wp_i18n_["__"])('Display as dropdown'),
  7796. checked: displayAsDropdown,
  7797. onChange: () => setAttributes({
  7798. displayAsDropdown: !displayAsDropdown
  7799. })
  7800. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  7801. label: Object(external_wp_i18n_["__"])('Show post counts'),
  7802. checked: showPostCounts,
  7803. onChange: () => setAttributes({
  7804. showPostCounts: !showPostCounts
  7805. })
  7806. }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
  7807. block: "core/archives",
  7808. attributes: attributes
  7809. }))));
  7810. }
  7811. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/index.js
  7812. /**
  7813. * WordPress dependencies
  7814. */
  7815. /**
  7816. * Internal dependencies
  7817. */
  7818. const archives_metadata = {
  7819. apiVersion: 2,
  7820. name: "core/archives",
  7821. title: "Archives",
  7822. category: "widgets",
  7823. description: "Display a monthly archive of your posts.",
  7824. textdomain: "default",
  7825. attributes: {
  7826. displayAsDropdown: {
  7827. type: "boolean",
  7828. "default": false
  7829. },
  7830. showPostCounts: {
  7831. type: "boolean",
  7832. "default": false
  7833. }
  7834. },
  7835. supports: {
  7836. align: true,
  7837. html: false
  7838. },
  7839. editorStyle: "wp-block-archives-editor"
  7840. };
  7841. const {
  7842. name: archives_name
  7843. } = archives_metadata;
  7844. const archives_settings = {
  7845. icon: library_archive,
  7846. example: {},
  7847. edit: ArchivesEdit
  7848. };
  7849. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/audio.js
  7850. /**
  7851. * WordPress dependencies
  7852. */
  7853. const audio = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  7854. viewBox: "0 0 24 24",
  7855. xmlns: "http://www.w3.org/2000/svg"
  7856. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  7857. d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"
  7858. }));
  7859. /* harmony default export */ var library_audio = (audio);
  7860. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js
  7861. /**
  7862. * WordPress dependencies
  7863. */
  7864. /* harmony default export */ var audio_deprecated = ([{
  7865. attributes: {
  7866. src: {
  7867. type: 'string',
  7868. source: 'attribute',
  7869. selector: 'audio',
  7870. attribute: 'src'
  7871. },
  7872. caption: {
  7873. type: 'string',
  7874. source: 'html',
  7875. selector: 'figcaption'
  7876. },
  7877. id: {
  7878. type: 'number'
  7879. },
  7880. autoplay: {
  7881. type: 'boolean',
  7882. source: 'attribute',
  7883. selector: 'audio',
  7884. attribute: 'autoplay'
  7885. },
  7886. loop: {
  7887. type: 'boolean',
  7888. source: 'attribute',
  7889. selector: 'audio',
  7890. attribute: 'loop'
  7891. },
  7892. preload: {
  7893. type: 'string',
  7894. source: 'attribute',
  7895. selector: 'audio',
  7896. attribute: 'preload'
  7897. }
  7898. },
  7899. supports: {
  7900. align: true
  7901. },
  7902. save({
  7903. attributes
  7904. }) {
  7905. const {
  7906. autoplay,
  7907. caption,
  7908. loop,
  7909. preload,
  7910. src
  7911. } = attributes;
  7912. return Object(external_wp_element_["createElement"])("figure", null, Object(external_wp_element_["createElement"])("audio", {
  7913. controls: "controls",
  7914. src: src,
  7915. autoPlay: autoplay,
  7916. loop: loop,
  7917. preload: preload
  7918. }), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  7919. tagName: "figcaption",
  7920. value: caption
  7921. }));
  7922. }
  7923. }]);
  7924. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/edit.js
  7925. /**
  7926. * WordPress dependencies
  7927. */
  7928. /**
  7929. * Internal dependencies
  7930. */
  7931. const audio_edit_ALLOWED_MEDIA_TYPES = ['audio'];
  7932. function AudioEdit({
  7933. attributes,
  7934. noticeOperations,
  7935. setAttributes,
  7936. onReplace,
  7937. isSelected,
  7938. noticeUI,
  7939. insertBlocksAfter
  7940. }) {
  7941. const {
  7942. id,
  7943. autoplay,
  7944. caption,
  7945. loop,
  7946. preload,
  7947. src
  7948. } = attributes;
  7949. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  7950. const mediaUpload = Object(external_wp_data_["useSelect"])(select => {
  7951. const {
  7952. getSettings
  7953. } = select(external_wp_blockEditor_["store"]);
  7954. return getSettings().mediaUpload;
  7955. }, []);
  7956. Object(external_wp_element_["useEffect"])(() => {
  7957. if (!id && Object(external_wp_blob_["isBlobURL"])(src)) {
  7958. const file = Object(external_wp_blob_["getBlobByURL"])(src);
  7959. if (file) {
  7960. mediaUpload({
  7961. filesList: [file],
  7962. onFileChange: ([{
  7963. id: mediaId,
  7964. url
  7965. }]) => {
  7966. setAttributes({
  7967. id: mediaId,
  7968. src: url
  7969. });
  7970. },
  7971. onError: e => {
  7972. setAttributes({
  7973. src: undefined,
  7974. id: undefined
  7975. });
  7976. noticeOperations.createErrorNotice(e);
  7977. },
  7978. allowedTypes: audio_edit_ALLOWED_MEDIA_TYPES
  7979. });
  7980. }
  7981. }
  7982. }, []);
  7983. function toggleAttribute(attribute) {
  7984. return newValue => {
  7985. setAttributes({
  7986. [attribute]: newValue
  7987. });
  7988. };
  7989. }
  7990. function onSelectURL(newSrc) {
  7991. // Set the block's src from the edit component's state, and switch off
  7992. // the editing UI.
  7993. if (newSrc !== src) {
  7994. // Check if there's an embed block that handles this URL.
  7995. const embedBlock = createUpgradedEmbedBlock({
  7996. attributes: {
  7997. url: newSrc
  7998. }
  7999. });
  8000. if (undefined !== embedBlock) {
  8001. onReplace(embedBlock);
  8002. return;
  8003. }
  8004. setAttributes({
  8005. src: newSrc,
  8006. id: undefined
  8007. });
  8008. }
  8009. }
  8010. function onUploadError(message) {
  8011. noticeOperations.removeAllNotices();
  8012. noticeOperations.createErrorNotice(message);
  8013. }
  8014. function getAutoplayHelp(checked) {
  8015. return checked ? Object(external_wp_i18n_["__"])('Autoplay may cause usability issues for some users.') : null;
  8016. } // const { setAttributes, isSelected, noticeUI } = this.props;
  8017. function onSelectAudio(media) {
  8018. if (!media || !media.url) {
  8019. // in this case there was an error and we should continue in the editing state
  8020. // previous attributes should be removed because they may be temporary blob urls
  8021. setAttributes({
  8022. src: undefined,
  8023. id: undefined
  8024. });
  8025. return;
  8026. } // sets the block's attribute and updates the edit component from the
  8027. // selected media, then switches off the editing UI
  8028. setAttributes({
  8029. src: media.url,
  8030. id: media.id
  8031. });
  8032. }
  8033. if (!src) {
  8034. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  8035. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  8036. icon: library_audio
  8037. }),
  8038. onSelect: onSelectAudio,
  8039. onSelectURL: onSelectURL,
  8040. accept: "audio/*",
  8041. allowedTypes: audio_edit_ALLOWED_MEDIA_TYPES,
  8042. value: attributes,
  8043. notices: noticeUI,
  8044. onError: onUploadError
  8045. }));
  8046. }
  8047. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  8048. group: "other"
  8049. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  8050. mediaId: id,
  8051. mediaURL: src,
  8052. allowedTypes: audio_edit_ALLOWED_MEDIA_TYPES,
  8053. accept: "audio/*",
  8054. onSelect: onSelectAudio,
  8055. onSelectURL: onSelectURL,
  8056. onError: onUploadError
  8057. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  8058. title: Object(external_wp_i18n_["__"])('Audio settings')
  8059. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  8060. label: Object(external_wp_i18n_["__"])('Autoplay'),
  8061. onChange: toggleAttribute('autoplay'),
  8062. checked: autoplay,
  8063. help: getAutoplayHelp
  8064. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  8065. label: Object(external_wp_i18n_["__"])('Loop'),
  8066. onChange: toggleAttribute('loop'),
  8067. checked: loop
  8068. }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  8069. label: Object(external_wp_i18n_["__"])('Preload'),
  8070. value: preload || '' // `undefined` is required for the preload attribute to be unset.
  8071. ,
  8072. onChange: value => setAttributes({
  8073. preload: value || undefined
  8074. }),
  8075. options: [{
  8076. value: '',
  8077. label: Object(external_wp_i18n_["__"])('Browser default')
  8078. }, {
  8079. value: 'auto',
  8080. label: Object(external_wp_i18n_["__"])('Auto')
  8081. }, {
  8082. value: 'metadata',
  8083. label: Object(external_wp_i18n_["__"])('Metadata')
  8084. }, {
  8085. value: 'none',
  8086. label: Object(external_wp_i18n_["__"])('None')
  8087. }]
  8088. }))), Object(external_wp_element_["createElement"])("figure", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], {
  8089. isDisabled: !isSelected
  8090. }, Object(external_wp_element_["createElement"])("audio", {
  8091. controls: "controls",
  8092. src: src
  8093. })), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  8094. tagName: "figcaption",
  8095. "aria-label": Object(external_wp_i18n_["__"])('Audio caption text'),
  8096. placeholder: Object(external_wp_i18n_["__"])('Add caption'),
  8097. value: caption,
  8098. onChange: value => setAttributes({
  8099. caption: value
  8100. }),
  8101. inlineToolbar: true,
  8102. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  8103. })));
  8104. }
  8105. /* harmony default export */ var audio_edit = (Object(external_wp_components_["withNotices"])(AudioEdit));
  8106. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/save.js
  8107. /**
  8108. * WordPress dependencies
  8109. */
  8110. function audio_save_save({
  8111. attributes
  8112. }) {
  8113. const {
  8114. autoplay,
  8115. caption,
  8116. loop,
  8117. preload,
  8118. src
  8119. } = attributes;
  8120. return src && Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("audio", {
  8121. controls: "controls",
  8122. src: src,
  8123. autoPlay: autoplay,
  8124. loop: loop,
  8125. preload: preload
  8126. }), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8127. tagName: "figcaption",
  8128. value: caption
  8129. }));
  8130. }
  8131. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/transforms.js
  8132. /**
  8133. * WordPress dependencies
  8134. */
  8135. const audio_transforms_transforms = {
  8136. from: [{
  8137. type: 'files',
  8138. isMatch(files) {
  8139. return files.length === 1 && files[0].type.indexOf('audio/') === 0;
  8140. },
  8141. transform(files) {
  8142. const file = files[0]; // We don't need to upload the media directly here
  8143. // It's already done as part of the `componentDidMount`
  8144. // in the audio block
  8145. const block = Object(external_wp_blocks_["createBlock"])('core/audio', {
  8146. src: Object(external_wp_blob_["createBlobURL"])(file)
  8147. });
  8148. return block;
  8149. }
  8150. }, {
  8151. type: 'shortcode',
  8152. tag: 'audio',
  8153. attributes: {
  8154. src: {
  8155. type: 'string',
  8156. shortcode: ({
  8157. named: {
  8158. src,
  8159. mp3,
  8160. m4a,
  8161. ogg,
  8162. wav,
  8163. wma
  8164. }
  8165. }) => {
  8166. return src || mp3 || m4a || ogg || wav || wma;
  8167. }
  8168. },
  8169. loop: {
  8170. type: 'string',
  8171. shortcode: ({
  8172. named: {
  8173. loop
  8174. }
  8175. }) => {
  8176. return loop;
  8177. }
  8178. },
  8179. autoplay: {
  8180. type: 'string',
  8181. shortcode: ({
  8182. named: {
  8183. autoplay
  8184. }
  8185. }) => {
  8186. return autoplay;
  8187. }
  8188. },
  8189. preload: {
  8190. type: 'string',
  8191. shortcode: ({
  8192. named: {
  8193. preload
  8194. }
  8195. }) => {
  8196. return preload;
  8197. }
  8198. }
  8199. }
  8200. }]
  8201. };
  8202. /* harmony default export */ var audio_transforms = (audio_transforms_transforms);
  8203. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/index.js
  8204. /**
  8205. * WordPress dependencies
  8206. */
  8207. /**
  8208. * Internal dependencies
  8209. */
  8210. const audio_metadata = {
  8211. apiVersion: 2,
  8212. name: "core/audio",
  8213. title: "Audio",
  8214. category: "media",
  8215. description: "Embed a simple audio player.",
  8216. keywords: ["music", "sound", "podcast", "recording"],
  8217. textdomain: "default",
  8218. attributes: {
  8219. src: {
  8220. type: "string",
  8221. source: "attribute",
  8222. selector: "audio",
  8223. attribute: "src"
  8224. },
  8225. caption: {
  8226. type: "string",
  8227. source: "html",
  8228. selector: "figcaption"
  8229. },
  8230. id: {
  8231. type: "number"
  8232. },
  8233. autoplay: {
  8234. type: "boolean",
  8235. source: "attribute",
  8236. selector: "audio",
  8237. attribute: "autoplay"
  8238. },
  8239. loop: {
  8240. type: "boolean",
  8241. source: "attribute",
  8242. selector: "audio",
  8243. attribute: "loop"
  8244. },
  8245. preload: {
  8246. type: "string",
  8247. source: "attribute",
  8248. selector: "audio",
  8249. attribute: "preload"
  8250. }
  8251. },
  8252. supports: {
  8253. anchor: true,
  8254. align: true
  8255. },
  8256. editorStyle: "wp-block-audio-editor",
  8257. style: "wp-block-audio"
  8258. };
  8259. const {
  8260. name: audio_name
  8261. } = audio_metadata;
  8262. const audio_settings = {
  8263. icon: library_audio,
  8264. transforms: audio_transforms,
  8265. deprecated: audio_deprecated,
  8266. edit: audio_edit,
  8267. save: audio_save_save
  8268. };
  8269. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/buttons.js
  8270. /**
  8271. * WordPress dependencies
  8272. */
  8273. const buttons_buttons = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  8274. viewBox: "0 0 24 24",
  8275. xmlns: "http://www.w3.org/2000/svg"
  8276. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  8277. d: "M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"
  8278. }));
  8279. /* harmony default export */ var library_buttons = (buttons_buttons);
  8280. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js
  8281. /**
  8282. * WordPress dependencies
  8283. */
  8284. const buttons_deprecated_deprecated = [{
  8285. supports: {
  8286. align: ['center', 'left', 'right'],
  8287. anchor: true
  8288. },
  8289. save() {
  8290. return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  8291. },
  8292. isEligible({
  8293. align
  8294. }) {
  8295. return align && ['center', 'left', 'right'].includes(align);
  8296. },
  8297. migrate(attributes) {
  8298. return { ...attributes,
  8299. align: undefined,
  8300. // Floating Buttons blocks shouldn't have been supported in the
  8301. // first place. Most users using them probably expected them to
  8302. // act like content justification controls, so these blocks are
  8303. // migrated to use content justification.
  8304. // As for center-aligned Buttons blocks, the content justification
  8305. // equivalent will create an identical end result in most cases.
  8306. contentJustification: attributes.align
  8307. };
  8308. }
  8309. }];
  8310. /* harmony default export */ var buttons_deprecated = (buttons_deprecated_deprecated);
  8311. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js
  8312. /**
  8313. * WordPress dependencies
  8314. */
  8315. /**
  8316. * Internal dependencies
  8317. */
  8318. const {
  8319. name: buttons_transforms_name
  8320. } = {
  8321. apiVersion: 2,
  8322. name: "core/buttons",
  8323. title: "Buttons",
  8324. category: "design",
  8325. description: "Prompt visitors to take action with a group of button-style links.",
  8326. keywords: ["link"],
  8327. textdomain: "default",
  8328. attributes: {
  8329. contentJustification: {
  8330. type: "string"
  8331. },
  8332. orientation: {
  8333. type: "string",
  8334. "default": "horizontal"
  8335. }
  8336. },
  8337. supports: {
  8338. anchor: true,
  8339. align: ["wide", "full"]
  8340. },
  8341. editorStyle: "wp-block-buttons-editor",
  8342. style: "wp-block-buttons"
  8343. };
  8344. const buttons_transforms_transforms = {
  8345. from: [{
  8346. type: 'block',
  8347. isMultiBlock: true,
  8348. blocks: ['core/button'],
  8349. transform: buttons => // Creates the buttons block
  8350. Object(external_wp_blocks_["createBlock"])(buttons_transforms_name, {}, // Loop the selected buttons
  8351. buttons.map(attributes => // Create singular button in the buttons block
  8352. Object(external_wp_blocks_["createBlock"])('core/button', attributes)))
  8353. }, {
  8354. type: 'block',
  8355. isMultiBlock: true,
  8356. blocks: ['core/paragraph'],
  8357. transform: buttons => // Creates the buttons block
  8358. Object(external_wp_blocks_["createBlock"])(buttons_transforms_name, {}, // Loop the selected buttons
  8359. buttons.map(attributes => {
  8360. const element = Object(external_wp_richText_["__unstableCreateElement"])(document, attributes.content); // Remove any HTML tags
  8361. const text = element.innerText || ''; // Get first url
  8362. const link = element.querySelector('a');
  8363. const url = link === null || link === void 0 ? void 0 : link.getAttribute('href'); // Create singular button in the buttons block
  8364. return Object(external_wp_blocks_["createBlock"])('core/button', {
  8365. text,
  8366. url
  8367. });
  8368. })),
  8369. isMatch: paragraphs => {
  8370. return paragraphs.every(attributes => {
  8371. const element = Object(external_wp_richText_["__unstableCreateElement"])(document, attributes.content);
  8372. const text = element.innerText || '';
  8373. const links = element.querySelectorAll('a');
  8374. return text.length <= 30 && links.length <= 1;
  8375. });
  8376. }
  8377. }]
  8378. };
  8379. /* harmony default export */ var buttons_transforms = (buttons_transforms_transforms);
  8380. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js
  8381. var library_button = __webpack_require__("oMoS");
  8382. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/deprecated.js
  8383. /**
  8384. * External dependencies
  8385. */
  8386. /**
  8387. * WordPress dependencies
  8388. */
  8389. const migrateBorderRadius = attributes => {
  8390. const {
  8391. borderRadius,
  8392. ...newAttributes
  8393. } = attributes;
  8394. if (!borderRadius && borderRadius !== 0) {
  8395. return newAttributes;
  8396. }
  8397. return { ...newAttributes,
  8398. style: { ...newAttributes.style,
  8399. border: {
  8400. radius: borderRadius
  8401. }
  8402. }
  8403. };
  8404. };
  8405. const migrateCustomColorsAndGradients = attributes => {
  8406. if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customGradient) {
  8407. return attributes;
  8408. }
  8409. const style = {
  8410. color: {}
  8411. };
  8412. if (attributes.customTextColor) {
  8413. style.color.text = attributes.customTextColor;
  8414. }
  8415. if (attributes.customBackgroundColor) {
  8416. style.color.background = attributes.customBackgroundColor;
  8417. }
  8418. if (attributes.customGradient) {
  8419. style.color.gradient = attributes.customGradient;
  8420. }
  8421. return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customGradient']),
  8422. style
  8423. };
  8424. };
  8425. const oldColorsMigration = attributes => {
  8426. return migrateCustomColorsAndGradients(Object(external_lodash_["omit"])({ ...attributes,
  8427. customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined,
  8428. customBackgroundColor: attributes.color && '#' === attributes.color[0] ? attributes.color : undefined
  8429. }, ['color', 'textColor']));
  8430. };
  8431. const button_deprecated_blockAttributes = {
  8432. url: {
  8433. type: 'string',
  8434. source: 'attribute',
  8435. selector: 'a',
  8436. attribute: 'href'
  8437. },
  8438. title: {
  8439. type: 'string',
  8440. source: 'attribute',
  8441. selector: 'a',
  8442. attribute: 'title'
  8443. },
  8444. text: {
  8445. type: 'string',
  8446. source: 'html',
  8447. selector: 'a'
  8448. }
  8449. };
  8450. const button_deprecated_deprecated = [{
  8451. supports: {
  8452. anchor: true,
  8453. align: true,
  8454. alignWide: false,
  8455. color: {
  8456. __experimentalSkipSerialization: true
  8457. },
  8458. reusable: false,
  8459. __experimentalSelector: '.wp-block-button__link'
  8460. },
  8461. attributes: { ...button_deprecated_blockAttributes,
  8462. linkTarget: {
  8463. type: 'string',
  8464. source: 'attribute',
  8465. selector: 'a',
  8466. attribute: 'target'
  8467. },
  8468. rel: {
  8469. type: 'string',
  8470. source: 'attribute',
  8471. selector: 'a',
  8472. attribute: 'rel'
  8473. },
  8474. placeholder: {
  8475. type: 'string'
  8476. },
  8477. borderRadius: {
  8478. type: 'number'
  8479. },
  8480. backgroundColor: {
  8481. type: 'string'
  8482. },
  8483. textColor: {
  8484. type: 'string'
  8485. },
  8486. gradient: {
  8487. type: 'string'
  8488. },
  8489. style: {
  8490. type: 'object'
  8491. },
  8492. width: {
  8493. type: 'number'
  8494. }
  8495. },
  8496. save({
  8497. attributes,
  8498. className
  8499. }) {
  8500. const {
  8501. borderRadius,
  8502. linkTarget,
  8503. rel,
  8504. text,
  8505. title,
  8506. url,
  8507. width
  8508. } = attributes;
  8509. const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes);
  8510. const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, {
  8511. 'no-border-radius': borderRadius === 0
  8512. });
  8513. const buttonStyle = {
  8514. borderRadius: borderRadius ? borderRadius + 'px' : undefined,
  8515. ...colorProps.style
  8516. }; // The use of a `title` attribute here is soft-deprecated, but still applied
  8517. // if it had already been assigned, for the sake of backward-compatibility.
  8518. // A title will no longer be assigned for new or updated button block links.
  8519. const wrapperClasses = classnames_default()(className, {
  8520. [`has-custom-width wp-block-button__width-${width}`]: width
  8521. });
  8522. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  8523. className: wrapperClasses
  8524. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8525. tagName: "a",
  8526. className: buttonClasses,
  8527. href: url,
  8528. title: title,
  8529. style: buttonStyle,
  8530. value: text,
  8531. target: linkTarget,
  8532. rel: rel
  8533. }));
  8534. },
  8535. migrate: migrateBorderRadius
  8536. }, {
  8537. supports: {
  8538. anchor: true,
  8539. align: true,
  8540. alignWide: false,
  8541. color: {
  8542. __experimentalSkipSerialization: true
  8543. },
  8544. reusable: false,
  8545. __experimentalSelector: '.wp-block-button__link'
  8546. },
  8547. attributes: { ...button_deprecated_blockAttributes,
  8548. linkTarget: {
  8549. type: 'string',
  8550. source: 'attribute',
  8551. selector: 'a',
  8552. attribute: 'target'
  8553. },
  8554. rel: {
  8555. type: 'string',
  8556. source: 'attribute',
  8557. selector: 'a',
  8558. attribute: 'rel'
  8559. },
  8560. placeholder: {
  8561. type: 'string'
  8562. },
  8563. borderRadius: {
  8564. type: 'number'
  8565. },
  8566. backgroundColor: {
  8567. type: 'string'
  8568. },
  8569. textColor: {
  8570. type: 'string'
  8571. },
  8572. gradient: {
  8573. type: 'string'
  8574. },
  8575. style: {
  8576. type: 'object'
  8577. },
  8578. width: {
  8579. type: 'number'
  8580. }
  8581. },
  8582. save({
  8583. attributes,
  8584. className
  8585. }) {
  8586. const {
  8587. borderRadius,
  8588. linkTarget,
  8589. rel,
  8590. text,
  8591. title,
  8592. url,
  8593. width
  8594. } = attributes;
  8595. const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes);
  8596. const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, {
  8597. 'no-border-radius': borderRadius === 0
  8598. });
  8599. const buttonStyle = {
  8600. borderRadius: borderRadius ? borderRadius + 'px' : undefined,
  8601. ...colorProps.style
  8602. }; // The use of a `title` attribute here is soft-deprecated, but still applied
  8603. // if it had already been assigned, for the sake of backward-compatibility.
  8604. // A title will no longer be assigned for new or updated button block links.
  8605. const wrapperClasses = classnames_default()(className, {
  8606. [`has-custom-width wp-block-button__width-${width}`]: width
  8607. });
  8608. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  8609. className: wrapperClasses
  8610. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8611. tagName: "a",
  8612. className: buttonClasses,
  8613. href: url,
  8614. title: title,
  8615. style: buttonStyle,
  8616. value: text,
  8617. target: linkTarget,
  8618. rel: rel
  8619. }));
  8620. },
  8621. migrate: migrateBorderRadius
  8622. }, {
  8623. supports: {
  8624. align: true,
  8625. alignWide: false,
  8626. color: {
  8627. gradients: true
  8628. }
  8629. },
  8630. attributes: { ...button_deprecated_blockAttributes,
  8631. linkTarget: {
  8632. type: 'string',
  8633. source: 'attribute',
  8634. selector: 'a',
  8635. attribute: 'target'
  8636. },
  8637. rel: {
  8638. type: 'string',
  8639. source: 'attribute',
  8640. selector: 'a',
  8641. attribute: 'rel'
  8642. },
  8643. placeholder: {
  8644. type: 'string'
  8645. },
  8646. borderRadius: {
  8647. type: 'number'
  8648. },
  8649. backgroundColor: {
  8650. type: 'string'
  8651. },
  8652. textColor: {
  8653. type: 'string'
  8654. },
  8655. gradient: {
  8656. type: 'string'
  8657. },
  8658. style: {
  8659. type: 'object'
  8660. }
  8661. },
  8662. save({
  8663. attributes
  8664. }) {
  8665. const {
  8666. borderRadius,
  8667. linkTarget,
  8668. rel,
  8669. text,
  8670. title,
  8671. url
  8672. } = attributes;
  8673. const buttonClasses = classnames_default()('wp-block-button__link', {
  8674. 'no-border-radius': borderRadius === 0
  8675. });
  8676. const buttonStyle = {
  8677. borderRadius: borderRadius ? borderRadius + 'px' : undefined
  8678. };
  8679. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8680. tagName: "a",
  8681. className: buttonClasses,
  8682. href: url,
  8683. title: title,
  8684. style: buttonStyle,
  8685. value: text,
  8686. target: linkTarget,
  8687. rel: rel
  8688. });
  8689. },
  8690. migrate: migrateBorderRadius
  8691. }, {
  8692. supports: {
  8693. align: true,
  8694. alignWide: false
  8695. },
  8696. attributes: { ...button_deprecated_blockAttributes,
  8697. linkTarget: {
  8698. type: 'string',
  8699. source: 'attribute',
  8700. selector: 'a',
  8701. attribute: 'target'
  8702. },
  8703. rel: {
  8704. type: 'string',
  8705. source: 'attribute',
  8706. selector: 'a',
  8707. attribute: 'rel'
  8708. },
  8709. placeholder: {
  8710. type: 'string'
  8711. },
  8712. borderRadius: {
  8713. type: 'number'
  8714. },
  8715. backgroundColor: {
  8716. type: 'string'
  8717. },
  8718. textColor: {
  8719. type: 'string'
  8720. },
  8721. customBackgroundColor: {
  8722. type: 'string'
  8723. },
  8724. customTextColor: {
  8725. type: 'string'
  8726. },
  8727. customGradient: {
  8728. type: 'string'
  8729. },
  8730. gradient: {
  8731. type: 'string'
  8732. }
  8733. },
  8734. isEligible: attributes => !!attributes.customTextColor || !!attributes.customBackgroundColor || !!attributes.customGradient,
  8735. migrate: Object(external_wp_compose_["compose"])(migrateBorderRadius, migrateCustomColorsAndGradients),
  8736. save({
  8737. attributes
  8738. }) {
  8739. const {
  8740. backgroundColor,
  8741. borderRadius,
  8742. customBackgroundColor,
  8743. customTextColor,
  8744. customGradient,
  8745. linkTarget,
  8746. gradient,
  8747. rel,
  8748. text,
  8749. textColor,
  8750. title,
  8751. url
  8752. } = attributes;
  8753. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  8754. const backgroundClass = !customGradient && Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  8755. const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient);
  8756. const buttonClasses = classnames_default()('wp-block-button__link', {
  8757. 'has-text-color': textColor || customTextColor,
  8758. [textClass]: textClass,
  8759. 'has-background': backgroundColor || customBackgroundColor || customGradient || gradient,
  8760. [backgroundClass]: backgroundClass,
  8761. 'no-border-radius': borderRadius === 0,
  8762. [gradientClass]: gradientClass
  8763. });
  8764. const buttonStyle = {
  8765. background: customGradient ? customGradient : undefined,
  8766. backgroundColor: backgroundClass || customGradient || gradient ? undefined : customBackgroundColor,
  8767. color: textClass ? undefined : customTextColor,
  8768. borderRadius: borderRadius ? borderRadius + 'px' : undefined
  8769. }; // The use of a `title` attribute here is soft-deprecated, but still applied
  8770. // if it had already been assigned, for the sake of backward-compatibility.
  8771. // A title will no longer be assigned for new or updated button block links.
  8772. return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8773. tagName: "a",
  8774. className: buttonClasses,
  8775. href: url,
  8776. title: title,
  8777. style: buttonStyle,
  8778. value: text,
  8779. target: linkTarget,
  8780. rel: rel
  8781. }));
  8782. }
  8783. }, {
  8784. attributes: { ...button_deprecated_blockAttributes,
  8785. align: {
  8786. type: 'string',
  8787. default: 'none'
  8788. },
  8789. backgroundColor: {
  8790. type: 'string'
  8791. },
  8792. textColor: {
  8793. type: 'string'
  8794. },
  8795. customBackgroundColor: {
  8796. type: 'string'
  8797. },
  8798. customTextColor: {
  8799. type: 'string'
  8800. },
  8801. linkTarget: {
  8802. type: 'string',
  8803. source: 'attribute',
  8804. selector: 'a',
  8805. attribute: 'target'
  8806. },
  8807. rel: {
  8808. type: 'string',
  8809. source: 'attribute',
  8810. selector: 'a',
  8811. attribute: 'rel'
  8812. },
  8813. placeholder: {
  8814. type: 'string'
  8815. }
  8816. },
  8817. isEligible(attribute) {
  8818. return attribute.className && attribute.className.includes('is-style-squared');
  8819. },
  8820. migrate(attributes) {
  8821. let newClassName = attributes.className;
  8822. if (newClassName) {
  8823. newClassName = newClassName.replace(/is-style-squared[\s]?/, '').trim();
  8824. }
  8825. return migrateBorderRadius(migrateCustomColorsAndGradients({ ...attributes,
  8826. className: newClassName ? newClassName : undefined,
  8827. borderRadius: 0
  8828. }));
  8829. },
  8830. save({
  8831. attributes
  8832. }) {
  8833. const {
  8834. backgroundColor,
  8835. customBackgroundColor,
  8836. customTextColor,
  8837. linkTarget,
  8838. rel,
  8839. text,
  8840. textColor,
  8841. title,
  8842. url
  8843. } = attributes;
  8844. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  8845. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  8846. const buttonClasses = classnames_default()('wp-block-button__link', {
  8847. 'has-text-color': textColor || customTextColor,
  8848. [textClass]: textClass,
  8849. 'has-background': backgroundColor || customBackgroundColor,
  8850. [backgroundClass]: backgroundClass
  8851. });
  8852. const buttonStyle = {
  8853. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  8854. color: textClass ? undefined : customTextColor
  8855. };
  8856. return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8857. tagName: "a",
  8858. className: buttonClasses,
  8859. href: url,
  8860. title: title,
  8861. style: buttonStyle,
  8862. value: text,
  8863. target: linkTarget,
  8864. rel: rel
  8865. }));
  8866. }
  8867. }, {
  8868. attributes: { ...button_deprecated_blockAttributes,
  8869. align: {
  8870. type: 'string',
  8871. default: 'none'
  8872. },
  8873. backgroundColor: {
  8874. type: 'string'
  8875. },
  8876. textColor: {
  8877. type: 'string'
  8878. },
  8879. customBackgroundColor: {
  8880. type: 'string'
  8881. },
  8882. customTextColor: {
  8883. type: 'string'
  8884. }
  8885. },
  8886. migrate: oldColorsMigration,
  8887. save({
  8888. attributes
  8889. }) {
  8890. const {
  8891. url,
  8892. text,
  8893. title,
  8894. backgroundColor,
  8895. textColor,
  8896. customBackgroundColor,
  8897. customTextColor
  8898. } = attributes;
  8899. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  8900. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  8901. const buttonClasses = classnames_default()('wp-block-button__link', {
  8902. 'has-text-color': textColor || customTextColor,
  8903. [textClass]: textClass,
  8904. 'has-background': backgroundColor || customBackgroundColor,
  8905. [backgroundClass]: backgroundClass
  8906. });
  8907. const buttonStyle = {
  8908. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  8909. color: textClass ? undefined : customTextColor
  8910. };
  8911. return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8912. tagName: "a",
  8913. className: buttonClasses,
  8914. href: url,
  8915. title: title,
  8916. style: buttonStyle,
  8917. value: text
  8918. }));
  8919. }
  8920. }, {
  8921. attributes: { ...button_deprecated_blockAttributes,
  8922. color: {
  8923. type: 'string'
  8924. },
  8925. textColor: {
  8926. type: 'string'
  8927. },
  8928. align: {
  8929. type: 'string',
  8930. default: 'none'
  8931. }
  8932. },
  8933. save({
  8934. attributes
  8935. }) {
  8936. const {
  8937. url,
  8938. text,
  8939. title,
  8940. align,
  8941. color,
  8942. textColor
  8943. } = attributes;
  8944. const buttonStyle = {
  8945. backgroundColor: color,
  8946. color: textColor
  8947. };
  8948. const linkClass = 'wp-block-button__link';
  8949. return Object(external_wp_element_["createElement"])("div", {
  8950. className: `align${align}`
  8951. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8952. tagName: "a",
  8953. className: linkClass,
  8954. href: url,
  8955. title: title,
  8956. style: buttonStyle,
  8957. value: text
  8958. }));
  8959. },
  8960. migrate: oldColorsMigration
  8961. }, {
  8962. attributes: { ...button_deprecated_blockAttributes,
  8963. color: {
  8964. type: 'string'
  8965. },
  8966. textColor: {
  8967. type: 'string'
  8968. },
  8969. align: {
  8970. type: 'string',
  8971. default: 'none'
  8972. }
  8973. },
  8974. save({
  8975. attributes
  8976. }) {
  8977. const {
  8978. url,
  8979. text,
  8980. title,
  8981. align,
  8982. color,
  8983. textColor
  8984. } = attributes;
  8985. return Object(external_wp_element_["createElement"])("div", {
  8986. className: `align${align}`,
  8987. style: {
  8988. backgroundColor: color
  8989. }
  8990. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  8991. tagName: "a",
  8992. href: url,
  8993. title: title,
  8994. style: {
  8995. color: textColor
  8996. },
  8997. value: text
  8998. }));
  8999. },
  9000. migrate: oldColorsMigration
  9001. }];
  9002. /* harmony default export */ var button_deprecated = (button_deprecated_deprecated);
  9003. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
  9004. var library_link = __webpack_require__("Bpkj");
  9005. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js
  9006. var link_off = __webpack_require__("Mp0b");
  9007. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/edit.js
  9008. /**
  9009. * External dependencies
  9010. */
  9011. /**
  9012. * WordPress dependencies
  9013. */
  9014. const edit_NEW_TAB_REL = 'noreferrer noopener';
  9015. function WidthPanel({
  9016. selectedWidth,
  9017. setAttributes
  9018. }) {
  9019. function handleChange(newWidth) {
  9020. // Check if we are toggling the width off
  9021. const width = selectedWidth === newWidth ? undefined : newWidth; // Update attributes
  9022. setAttributes({
  9023. width
  9024. });
  9025. }
  9026. return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  9027. title: Object(external_wp_i18n_["__"])('Width settings')
  9028. }, Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
  9029. "aria-label": Object(external_wp_i18n_["__"])('Button width')
  9030. }, [25, 50, 75, 100].map(widthValue => {
  9031. return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9032. key: widthValue,
  9033. isSmall: true,
  9034. isPrimary: widthValue === selectedWidth,
  9035. onClick: () => handleChange(widthValue)
  9036. }, widthValue, "%");
  9037. })));
  9038. }
  9039. function URLPicker({
  9040. isSelected,
  9041. url,
  9042. setAttributes,
  9043. opensInNewTab,
  9044. onToggleOpenInNewTab,
  9045. anchorRef,
  9046. richTextRef
  9047. }) {
  9048. const [isEditingURL, setIsEditingURL] = Object(external_wp_element_["useState"])(false);
  9049. const isURLSet = !!url;
  9050. const startEditing = event => {
  9051. event.preventDefault();
  9052. setIsEditingURL(true);
  9053. };
  9054. const unlink = () => {
  9055. setAttributes({
  9056. url: undefined,
  9057. linkTarget: undefined,
  9058. rel: undefined
  9059. });
  9060. setIsEditingURL(false);
  9061. };
  9062. Object(external_wp_element_["useEffect"])(() => {
  9063. if (!isSelected) {
  9064. setIsEditingURL(false);
  9065. }
  9066. }, [isSelected]);
  9067. const isLinkControlVisible = isSelected && (isEditingURL || isURLSet);
  9068. const linkControl = isLinkControlVisible && Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
  9069. position: "bottom center",
  9070. onClose: () => {
  9071. var _richTextRef$current;
  9072. setIsEditingURL(false);
  9073. (_richTextRef$current = richTextRef.current) === null || _richTextRef$current === void 0 ? void 0 : _richTextRef$current.focus();
  9074. },
  9075. anchorRef: anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current,
  9076. focusOnMount: isEditingURL ? 'firstElement' : false
  9077. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"], {
  9078. className: "wp-block-navigation-link__inline-link-input",
  9079. value: {
  9080. url,
  9081. opensInNewTab
  9082. },
  9083. onChange: ({
  9084. url: newURL = '',
  9085. opensInNewTab: newOpensInNewTab
  9086. }) => {
  9087. setAttributes({
  9088. url: newURL
  9089. });
  9090. if (opensInNewTab !== newOpensInNewTab) {
  9091. onToggleOpenInNewTab(newOpensInNewTab);
  9092. }
  9093. },
  9094. onRemove: () => {
  9095. var _richTextRef$current2;
  9096. unlink();
  9097. (_richTextRef$current2 = richTextRef.current) === null || _richTextRef$current2 === void 0 ? void 0 : _richTextRef$current2.focus();
  9098. },
  9099. forceIsEditingLink: isEditingURL
  9100. }));
  9101. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  9102. group: "block"
  9103. }, !isURLSet && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  9104. name: "link",
  9105. icon: library_link["a" /* default */],
  9106. title: Object(external_wp_i18n_["__"])('Link'),
  9107. shortcut: external_wp_keycodes_["displayShortcut"].primary('k'),
  9108. onClick: startEditing
  9109. }), isURLSet && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  9110. name: "link",
  9111. icon: link_off["a" /* default */],
  9112. title: Object(external_wp_i18n_["__"])('Unlink'),
  9113. shortcut: external_wp_keycodes_["displayShortcut"].primaryShift('k'),
  9114. onClick: unlink,
  9115. isActive: true
  9116. })), isSelected && Object(external_wp_element_["createElement"])(external_wp_components_["KeyboardShortcuts"], {
  9117. bindGlobal: true,
  9118. shortcuts: {
  9119. [external_wp_keycodes_["rawShortcut"].primary('k')]: startEditing,
  9120. [external_wp_keycodes_["rawShortcut"].primaryShift('k')]: () => {
  9121. var _richTextRef$current3;
  9122. unlink();
  9123. (_richTextRef$current3 = richTextRef.current) === null || _richTextRef$current3 === void 0 ? void 0 : _richTextRef$current3.focus();
  9124. }
  9125. }
  9126. }), linkControl);
  9127. }
  9128. function ButtonEdit(props) {
  9129. var _style$border;
  9130. const {
  9131. attributes,
  9132. setAttributes,
  9133. className,
  9134. isSelected,
  9135. onReplace,
  9136. mergeBlocks
  9137. } = props;
  9138. const {
  9139. linkTarget,
  9140. placeholder,
  9141. rel,
  9142. style,
  9143. text,
  9144. url,
  9145. width
  9146. } = attributes;
  9147. const onSetLinkRel = Object(external_wp_element_["useCallback"])(value => {
  9148. setAttributes({
  9149. rel: value
  9150. });
  9151. }, [setAttributes]);
  9152. const onToggleOpenInNewTab = Object(external_wp_element_["useCallback"])(value => {
  9153. const newLinkTarget = value ? '_blank' : undefined;
  9154. let updatedRel = rel;
  9155. if (newLinkTarget && !rel) {
  9156. updatedRel = edit_NEW_TAB_REL;
  9157. } else if (!newLinkTarget && rel === edit_NEW_TAB_REL) {
  9158. updatedRel = undefined;
  9159. }
  9160. setAttributes({
  9161. linkTarget: newLinkTarget,
  9162. rel: updatedRel
  9163. });
  9164. }, [rel, setAttributes]);
  9165. const setButtonText = newText => {
  9166. // Remove anchor tags from button text content.
  9167. setAttributes({
  9168. text: newText.replace(/<\/?a[^>]*>/g, '')
  9169. });
  9170. };
  9171. const borderRadius = style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius;
  9172. const colorProps = Object(external_wp_blockEditor_["__experimentalUseColorProps"])(attributes);
  9173. const ref = Object(external_wp_element_["useRef"])();
  9174. const richTextRef = Object(external_wp_element_["useRef"])();
  9175. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  9176. ref
  9177. });
  9178. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, {
  9179. className: classnames_default()(blockProps.className, {
  9180. [`has-custom-width wp-block-button__width-${width}`]: width,
  9181. [`has-custom-font-size`]: blockProps.style.fontSize
  9182. })
  9183. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  9184. ref: richTextRef,
  9185. "aria-label": Object(external_wp_i18n_["__"])('Button text'),
  9186. placeholder: placeholder || Object(external_wp_i18n_["__"])('Add text…'),
  9187. value: text,
  9188. onChange: value => setButtonText(value),
  9189. withoutInteractiveFormatting: true,
  9190. className: classnames_default()(className, 'wp-block-button__link', colorProps.className, {
  9191. 'no-border-radius': borderRadius === 0
  9192. }),
  9193. style: {
  9194. borderRadius: borderRadius ? borderRadius + 'px' : undefined,
  9195. ...colorProps.style
  9196. },
  9197. onSplit: value => Object(external_wp_blocks_["createBlock"])('core/button', { ...attributes,
  9198. text: value
  9199. }),
  9200. onReplace: onReplace,
  9201. onMerge: mergeBlocks,
  9202. identifier: "text"
  9203. })), Object(external_wp_element_["createElement"])(URLPicker, {
  9204. url: url,
  9205. setAttributes: setAttributes,
  9206. isSelected: isSelected,
  9207. opensInNewTab: linkTarget === '_blank',
  9208. onToggleOpenInNewTab: onToggleOpenInNewTab,
  9209. anchorRef: ref,
  9210. richTextRef: richTextRef
  9211. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(WidthPanel, {
  9212. selectedWidth: width,
  9213. setAttributes: setAttributes
  9214. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  9215. label: Object(external_wp_i18n_["__"])('Link rel'),
  9216. value: rel || '',
  9217. onChange: onSetLinkRel
  9218. })));
  9219. }
  9220. /* harmony default export */ var button_edit = (ButtonEdit);
  9221. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/save.js
  9222. /**
  9223. * External dependencies
  9224. */
  9225. /**
  9226. * WordPress dependencies
  9227. */
  9228. function button_save_save({
  9229. attributes,
  9230. className
  9231. }) {
  9232. var _style$border, _style$typography;
  9233. const {
  9234. fontSize,
  9235. linkTarget,
  9236. rel,
  9237. style,
  9238. text,
  9239. title,
  9240. url,
  9241. width
  9242. } = attributes;
  9243. if (!text) {
  9244. return null;
  9245. }
  9246. const borderRadius = style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius;
  9247. const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes);
  9248. const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, {
  9249. 'no-border-radius': borderRadius === 0
  9250. });
  9251. const buttonStyle = {
  9252. borderRadius: borderRadius ? borderRadius + 'px' : undefined,
  9253. ...colorProps.style
  9254. }; // The use of a `title` attribute here is soft-deprecated, but still applied
  9255. // if it had already been assigned, for the sake of backward-compatibility.
  9256. // A title will no longer be assigned for new or updated button block links.
  9257. const wrapperClasses = classnames_default()(className, {
  9258. [`has-custom-width wp-block-button__width-${width}`]: width,
  9259. [`has-custom-font-size`]: fontSize || (style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize)
  9260. });
  9261. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  9262. className: wrapperClasses
  9263. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  9264. tagName: "a",
  9265. className: buttonClasses,
  9266. href: url,
  9267. title: title,
  9268. style: buttonStyle,
  9269. value: text,
  9270. target: linkTarget,
  9271. rel: rel
  9272. }));
  9273. }
  9274. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/index.js
  9275. /**
  9276. * WordPress dependencies
  9277. */
  9278. /**
  9279. * Internal dependencies
  9280. */
  9281. const button_metadata = {
  9282. apiVersion: 2,
  9283. name: "core/button",
  9284. title: "Button",
  9285. category: "design",
  9286. parent: ["core/buttons"],
  9287. description: "Prompt visitors to take action with a button-style link.",
  9288. keywords: ["link"],
  9289. textdomain: "default",
  9290. attributes: {
  9291. url: {
  9292. type: "string",
  9293. source: "attribute",
  9294. selector: "a",
  9295. attribute: "href"
  9296. },
  9297. title: {
  9298. type: "string",
  9299. source: "attribute",
  9300. selector: "a",
  9301. attribute: "title"
  9302. },
  9303. text: {
  9304. type: "string",
  9305. source: "html",
  9306. selector: "a"
  9307. },
  9308. linkTarget: {
  9309. type: "string",
  9310. source: "attribute",
  9311. selector: "a",
  9312. attribute: "target"
  9313. },
  9314. rel: {
  9315. type: "string",
  9316. source: "attribute",
  9317. selector: "a",
  9318. attribute: "rel"
  9319. },
  9320. placeholder: {
  9321. type: "string"
  9322. },
  9323. backgroundColor: {
  9324. type: "string"
  9325. },
  9326. textColor: {
  9327. type: "string"
  9328. },
  9329. gradient: {
  9330. type: "string"
  9331. },
  9332. width: {
  9333. type: "number"
  9334. }
  9335. },
  9336. supports: {
  9337. anchor: true,
  9338. align: true,
  9339. alignWide: false,
  9340. color: {
  9341. __experimentalSkipSerialization: true,
  9342. gradients: true
  9343. },
  9344. typography: {
  9345. fontSize: true,
  9346. __experimentalFontFamily: true
  9347. },
  9348. reusable: false,
  9349. __experimentalBorder: {
  9350. radius: true,
  9351. __experimentalSkipSerialization: true
  9352. },
  9353. __experimentalSelector: ".wp-block-button__link"
  9354. },
  9355. styles: [{
  9356. name: "fill",
  9357. label: "Fill",
  9358. isDefault: true
  9359. }, {
  9360. name: "outline",
  9361. label: "Outline"
  9362. }],
  9363. editorStyle: "wp-block-button-editor",
  9364. style: "wp-block-button"
  9365. };
  9366. const {
  9367. name: button_name
  9368. } = button_metadata;
  9369. const button_settings = {
  9370. icon: library_button["a" /* default */],
  9371. example: {
  9372. attributes: {
  9373. className: 'is-style-fill',
  9374. backgroundColor: 'vivid-green-cyan',
  9375. text: Object(external_wp_i18n_["__"])('Call to Action')
  9376. }
  9377. },
  9378. edit: button_edit,
  9379. save: button_save_save,
  9380. deprecated: button_deprecated,
  9381. merge: (a, {
  9382. text = ''
  9383. }) => ({ ...a,
  9384. text: (a.text || '') + text
  9385. })
  9386. };
  9387. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/edit.js
  9388. /**
  9389. * External dependencies
  9390. */
  9391. /**
  9392. * WordPress dependencies
  9393. */
  9394. /**
  9395. * Internal dependencies
  9396. */
  9397. const ALLOWED_BLOCKS = [button_name];
  9398. const BUTTONS_TEMPLATE = [['core/button']];
  9399. const LAYOUT = {
  9400. type: 'default',
  9401. alignments: []
  9402. };
  9403. const VERTICAL_JUSTIFY_CONTROLS = ['left', 'center', 'right'];
  9404. const HORIZONTAL_JUSTIFY_CONTROLS = ['left', 'center', 'right', 'space-between'];
  9405. function ButtonsEdit({
  9406. attributes: {
  9407. contentJustification,
  9408. orientation
  9409. },
  9410. setAttributes
  9411. }) {
  9412. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  9413. className: classnames_default()({
  9414. [`is-content-justification-${contentJustification}`]: contentJustification,
  9415. 'is-vertical': orientation === 'vertical'
  9416. })
  9417. });
  9418. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
  9419. allowedBlocks: ALLOWED_BLOCKS,
  9420. template: BUTTONS_TEMPLATE,
  9421. orientation,
  9422. __experimentalLayout: LAYOUT,
  9423. templateInsertUpdatesSelection: true
  9424. });
  9425. const justifyControls = orientation === 'vertical' ? VERTICAL_JUSTIFY_CONTROLS : HORIZONTAL_JUSTIFY_CONTROLS;
  9426. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  9427. group: "block"
  9428. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["JustifyContentControl"], {
  9429. allowedControls: justifyControls,
  9430. value: contentJustification,
  9431. onChange: value => setAttributes({
  9432. contentJustification: value
  9433. }),
  9434. popoverProps: {
  9435. position: 'bottom right',
  9436. isAlternate: true
  9437. }
  9438. })), Object(external_wp_element_["createElement"])("div", innerBlocksProps));
  9439. }
  9440. /* harmony default export */ var buttons_edit = (ButtonsEdit);
  9441. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/save.js
  9442. /**
  9443. * External dependencies
  9444. */
  9445. /**
  9446. * WordPress dependencies
  9447. */
  9448. function buttons_save_save({
  9449. attributes: {
  9450. contentJustification,
  9451. orientation
  9452. }
  9453. }) {
  9454. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  9455. className: classnames_default()({
  9456. [`is-content-justification-${contentJustification}`]: contentJustification,
  9457. 'is-vertical': orientation === 'vertical'
  9458. })
  9459. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  9460. }
  9461. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/variations.js
  9462. /**
  9463. * WordPress dependencies
  9464. */
  9465. const variations_variations = [{
  9466. name: 'buttons-horizontal',
  9467. isDefault: true,
  9468. title: Object(external_wp_i18n_["__"])('Horizontal'),
  9469. description: Object(external_wp_i18n_["__"])('Buttons shown in a row.'),
  9470. attributes: {
  9471. orientation: 'horizontal'
  9472. },
  9473. scope: ['transform']
  9474. }, {
  9475. name: 'buttons-vertical',
  9476. title: Object(external_wp_i18n_["__"])('Vertical'),
  9477. description: Object(external_wp_i18n_["__"])('Buttons shown in a column.'),
  9478. attributes: {
  9479. orientation: 'vertical'
  9480. },
  9481. scope: ['transform']
  9482. }];
  9483. /* harmony default export */ var buttons_variations = (variations_variations);
  9484. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
  9485. /**
  9486. * WordPress dependencies
  9487. */
  9488. /**
  9489. * Internal dependencies
  9490. */
  9491. const buttons_metadata = {
  9492. apiVersion: 2,
  9493. name: "core/buttons",
  9494. title: "Buttons",
  9495. category: "design",
  9496. description: "Prompt visitors to take action with a group of button-style links.",
  9497. keywords: ["link"],
  9498. textdomain: "default",
  9499. attributes: {
  9500. contentJustification: {
  9501. type: "string"
  9502. },
  9503. orientation: {
  9504. type: "string",
  9505. "default": "horizontal"
  9506. }
  9507. },
  9508. supports: {
  9509. anchor: true,
  9510. align: ["wide", "full"]
  9511. },
  9512. editorStyle: "wp-block-buttons-editor",
  9513. style: "wp-block-buttons"
  9514. };
  9515. const {
  9516. name: buttons_name
  9517. } = buttons_metadata;
  9518. const buttons_settings = {
  9519. icon: library_buttons,
  9520. example: {
  9521. innerBlocks: [{
  9522. name: 'core/button',
  9523. attributes: {
  9524. text: Object(external_wp_i18n_["__"])('Find out more')
  9525. }
  9526. }, {
  9527. name: 'core/button',
  9528. attributes: {
  9529. text: Object(external_wp_i18n_["__"])('Contact us')
  9530. }
  9531. }]
  9532. },
  9533. deprecated: buttons_deprecated,
  9534. transforms: buttons_transforms,
  9535. edit: buttons_edit,
  9536. save: buttons_save_save,
  9537. variations: buttons_variations
  9538. };
  9539. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/calendar.js
  9540. /**
  9541. * WordPress dependencies
  9542. */
  9543. const calendar = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  9544. viewBox: "0 0 24 24",
  9545. xmlns: "http://www.w3.org/2000/svg"
  9546. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  9547. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"
  9548. }));
  9549. /* harmony default export */ var library_calendar = (calendar);
  9550. // EXTERNAL MODULE: external "moment"
  9551. var external_moment_ = __webpack_require__("wy2R");
  9552. var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_);
  9553. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/edit.js
  9554. /**
  9555. * External dependencies
  9556. */
  9557. /**
  9558. * WordPress dependencies
  9559. */
  9560. const getYearMonth = memize_default()(date => {
  9561. if (!date) {
  9562. return {};
  9563. }
  9564. const momentDate = external_moment_default()(date);
  9565. return {
  9566. year: momentDate.year(),
  9567. month: momentDate.month() + 1
  9568. };
  9569. });
  9570. function CalendarEdit({
  9571. attributes
  9572. }) {
  9573. const date = Object(external_wp_data_["useSelect"])(select => {
  9574. // FIXME: @wordpress/block-library should not depend on @wordpress/editor.
  9575. // Blocks can be loaded into a *non-post* block editor.
  9576. // eslint-disable-next-line @wordpress/data-no-store-string-literals
  9577. const editorSelectors = select('core/editor');
  9578. let _date;
  9579. if (editorSelectors) {
  9580. const postType = editorSelectors.getEditedPostAttribute('type'); // Dates are used to overwrite year and month used on the calendar.
  9581. // This overwrite should only happen for 'post' post types.
  9582. // For other post types the calendar always displays the current month.
  9583. if (postType === 'post') {
  9584. _date = editorSelectors.getEditedPostAttribute('date');
  9585. }
  9586. }
  9587. return _date;
  9588. }, []);
  9589. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
  9590. block: "core/calendar",
  9591. attributes: { ...attributes,
  9592. ...getYearMonth(date)
  9593. }
  9594. })));
  9595. }
  9596. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
  9597. /**
  9598. * WordPress dependencies
  9599. */
  9600. /**
  9601. * Internal dependencies
  9602. */
  9603. const calendar_metadata = {
  9604. apiVersion: 2,
  9605. name: "core/calendar",
  9606. title: "Calendar",
  9607. category: "widgets",
  9608. description: "A calendar of your site\u2019s posts.",
  9609. keywords: ["posts", "archive"],
  9610. textdomain: "default",
  9611. attributes: {
  9612. month: {
  9613. type: "integer"
  9614. },
  9615. year: {
  9616. type: "integer"
  9617. }
  9618. },
  9619. supports: {
  9620. align: true
  9621. },
  9622. style: "wp-block-calendar"
  9623. };
  9624. const {
  9625. name: calendar_name
  9626. } = calendar_metadata;
  9627. const calendar_settings = {
  9628. icon: library_calendar,
  9629. example: {},
  9630. edit: CalendarEdit
  9631. };
  9632. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/category.js
  9633. /**
  9634. * WordPress dependencies
  9635. */
  9636. const category_category = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  9637. viewBox: "0 0 24 24",
  9638. xmlns: "http://www.w3.org/2000/svg"
  9639. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  9640. d: "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",
  9641. fillRule: "evenodd",
  9642. clipRule: "evenodd"
  9643. }));
  9644. /* harmony default export */ var library_category = (category_category);
  9645. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pin.js
  9646. /**
  9647. * WordPress dependencies
  9648. */
  9649. const pin = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  9650. xmlns: "http://www.w3.org/2000/svg",
  9651. viewBox: "-2 -2 24 24"
  9652. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  9653. d: "M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z"
  9654. }));
  9655. /* harmony default export */ var library_pin = (pin);
  9656. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/edit.js
  9657. /**
  9658. * External dependencies
  9659. */
  9660. /**
  9661. * WordPress dependencies
  9662. */
  9663. function CategoriesEdit({
  9664. attributes: {
  9665. displayAsDropdown,
  9666. showHierarchy,
  9667. showPostCounts
  9668. },
  9669. setAttributes
  9670. }) {
  9671. const selectId = Object(external_wp_compose_["useInstanceId"])(CategoriesEdit, 'blocks-category-select');
  9672. const {
  9673. categories,
  9674. isRequesting
  9675. } = Object(external_wp_data_["useSelect"])(select => {
  9676. const {
  9677. getEntityRecords
  9678. } = select(external_wp_coreData_["store"]);
  9679. const {
  9680. isResolving
  9681. } = select('core/data');
  9682. const query = {
  9683. per_page: -1,
  9684. hide_empty: true,
  9685. context: 'view'
  9686. };
  9687. return {
  9688. categories: getEntityRecords('taxonomy', 'category', query),
  9689. isRequesting: isResolving('core', 'getEntityRecords', ['taxonomy', 'category', query])
  9690. };
  9691. }, []);
  9692. const getCategoriesList = parentId => {
  9693. if (!(categories !== null && categories !== void 0 && categories.length)) {
  9694. return [];
  9695. }
  9696. if (parentId === null) {
  9697. return categories;
  9698. }
  9699. return categories.filter(({
  9700. parent
  9701. }) => parent === parentId);
  9702. };
  9703. const getCategoryListClassName = level => {
  9704. return `wp-block-categories__list wp-block-categories__list-level-${level}`;
  9705. };
  9706. const toggleAttribute = attributeName => newValue => setAttributes({
  9707. [attributeName]: newValue
  9708. });
  9709. const renderCategoryName = name => !name ? Object(external_wp_i18n_["__"])('(Untitled)') : Object(external_lodash_["unescape"])(name).trim();
  9710. const renderCategoryList = () => {
  9711. const parentId = showHierarchy ? 0 : null;
  9712. const categoriesList = getCategoriesList(parentId);
  9713. return Object(external_wp_element_["createElement"])("ul", {
  9714. className: getCategoryListClassName(0)
  9715. }, categoriesList.map(category => renderCategoryListItem(category, 0)));
  9716. };
  9717. const renderCategoryListItem = (category, level) => {
  9718. const childCategories = getCategoriesList(category.id);
  9719. const {
  9720. id,
  9721. link,
  9722. count,
  9723. name
  9724. } = category;
  9725. return Object(external_wp_element_["createElement"])("li", {
  9726. key: id
  9727. }, Object(external_wp_element_["createElement"])("a", {
  9728. href: link,
  9729. target: "_blank",
  9730. rel: "noreferrer noopener"
  9731. }, renderCategoryName(name)), showPostCounts && Object(external_wp_element_["createElement"])("span", {
  9732. className: "wp-block-categories__post-count"
  9733. }, ` (${count})`), showHierarchy && !!childCategories.length && Object(external_wp_element_["createElement"])("ul", {
  9734. className: getCategoryListClassName(level + 1)
  9735. }, childCategories.map(childCategory => renderCategoryListItem(childCategory, level + 1))));
  9736. };
  9737. const renderCategoryDropdown = () => {
  9738. const parentId = showHierarchy ? 0 : null;
  9739. const categoriesList = getCategoriesList(parentId);
  9740. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
  9741. as: "label",
  9742. htmlFor: selectId
  9743. }, Object(external_wp_i18n_["__"])('Categories')), Object(external_wp_element_["createElement"])("select", {
  9744. id: selectId,
  9745. className: "wp-block-categories__dropdown"
  9746. }, categoriesList.map(category => renderCategoryDropdownItem(category, 0))));
  9747. };
  9748. const renderCategoryDropdownItem = (category, level) => {
  9749. const {
  9750. id,
  9751. count,
  9752. name
  9753. } = category;
  9754. const childCategories = getCategoriesList(id);
  9755. return [Object(external_wp_element_["createElement"])("option", {
  9756. key: id
  9757. }, Object(external_lodash_["times"])(level * 3, () => '\xa0'), renderCategoryName(name), showPostCounts && ` (${count})`), showHierarchy && !!childCategories.length && childCategories.map(childCategory => renderCategoryDropdownItem(childCategory, level + 1))];
  9758. };
  9759. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  9760. title: Object(external_wp_i18n_["__"])('Categories settings')
  9761. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  9762. label: Object(external_wp_i18n_["__"])('Display as dropdown'),
  9763. checked: displayAsDropdown,
  9764. onChange: toggleAttribute('displayAsDropdown')
  9765. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  9766. label: Object(external_wp_i18n_["__"])('Show hierarchy'),
  9767. checked: showHierarchy,
  9768. onChange: toggleAttribute('showHierarchy')
  9769. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  9770. label: Object(external_wp_i18n_["__"])('Show post counts'),
  9771. checked: showPostCounts,
  9772. onChange: toggleAttribute('showPostCounts')
  9773. }))), isRequesting && Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  9774. icon: library_pin,
  9775. label: Object(external_wp_i18n_["__"])('Categories')
  9776. }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)), !isRequesting && (categories === null || categories === void 0 ? void 0 : categories.length) === 0 && Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Your site does not have any posts, so there is nothing to display here at the moment.')), !isRequesting && (categories === null || categories === void 0 ? void 0 : categories.length) > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList()));
  9777. }
  9778. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/index.js
  9779. /**
  9780. * WordPress dependencies
  9781. */
  9782. /**
  9783. * Internal dependencies
  9784. */
  9785. const categories_metadata = {
  9786. apiVersion: 2,
  9787. name: "core/categories",
  9788. title: "Categories",
  9789. category: "widgets",
  9790. description: "Display a list of all categories.",
  9791. textdomain: "default",
  9792. attributes: {
  9793. displayAsDropdown: {
  9794. type: "boolean",
  9795. "default": false
  9796. },
  9797. showHierarchy: {
  9798. type: "boolean",
  9799. "default": false
  9800. },
  9801. showPostCounts: {
  9802. type: "boolean",
  9803. "default": false
  9804. }
  9805. },
  9806. supports: {
  9807. align: true,
  9808. html: false
  9809. },
  9810. editorStyle: "wp-block-categories-editor",
  9811. style: "wp-block-categories"
  9812. };
  9813. const {
  9814. name: categories_name
  9815. } = categories_metadata;
  9816. const categories_settings = {
  9817. icon: library_category,
  9818. example: {},
  9819. edit: CategoriesEdit
  9820. };
  9821. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
  9822. var code = __webpack_require__("1Yn1");
  9823. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/edit.js
  9824. /**
  9825. * WordPress dependencies
  9826. */
  9827. function CodeEdit({
  9828. attributes,
  9829. setAttributes,
  9830. onRemove
  9831. }) {
  9832. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  9833. return Object(external_wp_element_["createElement"])("pre", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  9834. tagName: "code",
  9835. value: attributes.content,
  9836. onChange: content => setAttributes({
  9837. content
  9838. }),
  9839. onRemove: onRemove,
  9840. placeholder: Object(external_wp_i18n_["__"])('Write code…'),
  9841. "aria-label": Object(external_wp_i18n_["__"])('Code'),
  9842. preserveWhiteSpace: true,
  9843. __unstablePastePlainText: true
  9844. }));
  9845. }
  9846. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/utils.js
  9847. /**
  9848. * External dependencies
  9849. */
  9850. /**
  9851. * Escapes ampersands, shortcodes, and links.
  9852. *
  9853. * @param {string} content The content of a code block.
  9854. * @return {string} The given content with some characters escaped.
  9855. */
  9856. function utils_escape(content) {
  9857. return Object(external_lodash_["flow"])(escapeOpeningSquareBrackets, escapeProtocolInIsolatedUrls)(content || '');
  9858. }
  9859. /**
  9860. * Returns the given content with all opening shortcode characters converted
  9861. * into their HTML entity counterpart (i.e. [ => &#91;). For instance, a
  9862. * shortcode like [embed] becomes &#91;embed]
  9863. *
  9864. * This function replicates the escaping of HTML tags, where a tag like
  9865. * <strong> becomes &lt;strong>.
  9866. *
  9867. * @param {string} content The content of a code block.
  9868. * @return {string} The given content with its opening shortcode characters
  9869. * converted into their HTML entity counterpart
  9870. * (i.e. [ => &#91;)
  9871. */
  9872. function escapeOpeningSquareBrackets(content) {
  9873. return content.replace(/\[/g, '&#91;');
  9874. }
  9875. /**
  9876. * Converts the first two forward slashes of any isolated URL into their HTML
  9877. * counterparts (i.e. // => &#47;&#47;). For instance, https://youtube.com/watch?x
  9878. * becomes https:&#47;&#47;youtube.com/watch?x.
  9879. *
  9880. * An isolated URL is a URL that sits in its own line, surrounded only by spacing
  9881. * characters.
  9882. *
  9883. * See https://github.com/WordPress/wordpress-develop/blob/5.1.1/src/wp-includes/class-wp-embed.php#L403
  9884. *
  9885. * @param {string} content The content of a code block.
  9886. * @return {string} The given content with its ampersands converted into
  9887. * their HTML entity counterpart (i.e. & => &amp;)
  9888. */
  9889. function escapeProtocolInIsolatedUrls(content) {
  9890. return content.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m, '$1&#47;&#47;$2');
  9891. }
  9892. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/save.js
  9893. /**
  9894. * WordPress dependencies
  9895. */
  9896. /**
  9897. * Internal dependencies
  9898. */
  9899. function code_save_save({
  9900. attributes
  9901. }) {
  9902. return Object(external_wp_element_["createElement"])("pre", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  9903. tagName: "code",
  9904. value: utils_escape(attributes.content)
  9905. }));
  9906. }
  9907. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/transforms.js
  9908. /**
  9909. * WordPress dependencies
  9910. */
  9911. const code_transforms_transforms = {
  9912. from: [{
  9913. type: 'enter',
  9914. regExp: /^```$/,
  9915. transform: () => Object(external_wp_blocks_["createBlock"])('core/code')
  9916. }, {
  9917. type: 'block',
  9918. blocks: ['core/html'],
  9919. transform: ({
  9920. content
  9921. }) => {
  9922. return Object(external_wp_blocks_["createBlock"])('core/code', {
  9923. content
  9924. });
  9925. }
  9926. }, {
  9927. type: 'raw',
  9928. isMatch: node => node.nodeName === 'PRE' && node.children.length === 1 && node.firstChild.nodeName === 'CODE',
  9929. schema: {
  9930. pre: {
  9931. children: {
  9932. code: {
  9933. children: {
  9934. '#text': {}
  9935. }
  9936. }
  9937. }
  9938. }
  9939. }
  9940. }]
  9941. };
  9942. /* harmony default export */ var code_transforms = (code_transforms_transforms);
  9943. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/index.js
  9944. /**
  9945. * WordPress dependencies
  9946. */
  9947. /**
  9948. * Internal dependencies
  9949. */
  9950. const code_metadata = {
  9951. apiVersion: 2,
  9952. name: "core/code",
  9953. title: "Code",
  9954. category: "text",
  9955. description: "Display code snippets that respect your spacing and tabs.",
  9956. textdomain: "default",
  9957. attributes: {
  9958. content: {
  9959. type: "string",
  9960. source: "html",
  9961. selector: "code"
  9962. }
  9963. },
  9964. supports: {
  9965. anchor: true,
  9966. typography: {
  9967. fontSize: true
  9968. }
  9969. },
  9970. style: "wp-block-code"
  9971. };
  9972. const {
  9973. name: code_name
  9974. } = code_metadata;
  9975. const code_settings = {
  9976. icon: code["a" /* default */],
  9977. example: {
  9978. attributes: {
  9979. /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
  9980. // translators: Preserve \n markers for line breaks
  9981. content: Object(external_wp_i18n_["__"])('// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );')
  9982. /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
  9983. }
  9984. },
  9985. transforms: code_transforms,
  9986. edit: CodeEdit,
  9987. save: code_save_save
  9988. };
  9989. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/columns.js
  9990. /**
  9991. * WordPress dependencies
  9992. */
  9993. const columns_columns = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  9994. viewBox: "0 0 24 24",
  9995. xmlns: "http://www.w3.org/2000/svg"
  9996. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  9997. d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"
  9998. }));
  9999. /* harmony default export */ var library_columns = (columns_columns);
  10000. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js
  10001. /**
  10002. * External dependencies
  10003. */
  10004. /**
  10005. * WordPress dependencies
  10006. */
  10007. /**
  10008. * Given an HTML string for a deprecated columns inner block, returns the
  10009. * column index to which the migrated inner block should be assigned. Returns
  10010. * undefined if the inner block was not assigned to a column.
  10011. *
  10012. * @param {string} originalContent Deprecated Columns inner block HTML.
  10013. *
  10014. * @return {?number} Column to which inner block is to be assigned.
  10015. */
  10016. function getDeprecatedLayoutColumn(originalContent) {
  10017. let {
  10018. doc
  10019. } = getDeprecatedLayoutColumn;
  10020. if (!doc) {
  10021. doc = document.implementation.createHTMLDocument('');
  10022. getDeprecatedLayoutColumn.doc = doc;
  10023. }
  10024. let columnMatch;
  10025. doc.body.innerHTML = originalContent;
  10026. for (const classListItem of doc.body.firstChild.classList) {
  10027. if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) {
  10028. return Number(columnMatch[1]) - 1;
  10029. }
  10030. }
  10031. }
  10032. const deprecated_migrateCustomColors = attributes => {
  10033. if (!attributes.customTextColor && !attributes.customBackgroundColor) {
  10034. return attributes;
  10035. }
  10036. const style = {
  10037. color: {}
  10038. };
  10039. if (attributes.customTextColor) {
  10040. style.color.text = attributes.customTextColor;
  10041. }
  10042. if (attributes.customBackgroundColor) {
  10043. style.color.background = attributes.customBackgroundColor;
  10044. }
  10045. return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor']),
  10046. style
  10047. };
  10048. };
  10049. /* harmony default export */ var columns_deprecated = ([{
  10050. attributes: {
  10051. verticalAlignment: {
  10052. type: 'string'
  10053. },
  10054. backgroundColor: {
  10055. type: 'string'
  10056. },
  10057. customBackgroundColor: {
  10058. type: 'string'
  10059. },
  10060. customTextColor: {
  10061. type: 'string'
  10062. },
  10063. textColor: {
  10064. type: 'string'
  10065. }
  10066. },
  10067. migrate: deprecated_migrateCustomColors,
  10068. save({
  10069. attributes
  10070. }) {
  10071. const {
  10072. verticalAlignment,
  10073. backgroundColor,
  10074. customBackgroundColor,
  10075. textColor,
  10076. customTextColor
  10077. } = attributes;
  10078. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  10079. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  10080. const className = classnames_default()({
  10081. 'has-background': backgroundColor || customBackgroundColor,
  10082. 'has-text-color': textColor || customTextColor,
  10083. [backgroundClass]: backgroundClass,
  10084. [textClass]: textClass,
  10085. [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10086. });
  10087. const style = {
  10088. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  10089. color: textClass ? undefined : customTextColor
  10090. };
  10091. return Object(external_wp_element_["createElement"])("div", {
  10092. className: className ? className : undefined,
  10093. style: style
  10094. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  10095. }
  10096. }, {
  10097. attributes: {
  10098. columns: {
  10099. type: 'number',
  10100. default: 2
  10101. }
  10102. },
  10103. isEligible(attributes, innerBlocks) {
  10104. // Since isEligible is called on every valid instance of the
  10105. // Columns block and a deprecation is the unlikely case due to
  10106. // its subsequent migration, optimize for the `false` condition
  10107. // by performing a naive, inaccurate pass at inner blocks.
  10108. const isFastPassEligible = innerBlocks.some(innerBlock => /layout-column-\d+/.test(innerBlock.originalContent));
  10109. if (!isFastPassEligible) {
  10110. return false;
  10111. } // Only if the fast pass is considered eligible is the more
  10112. // accurate, durable, slower condition performed.
  10113. return innerBlocks.some(innerBlock => getDeprecatedLayoutColumn(innerBlock.originalContent) !== undefined);
  10114. },
  10115. migrate(attributes, innerBlocks) {
  10116. const columns = innerBlocks.reduce((accumulator, innerBlock) => {
  10117. const {
  10118. originalContent
  10119. } = innerBlock;
  10120. let columnIndex = getDeprecatedLayoutColumn(originalContent);
  10121. if (columnIndex === undefined) {
  10122. columnIndex = 0;
  10123. }
  10124. if (!accumulator[columnIndex]) {
  10125. accumulator[columnIndex] = [];
  10126. }
  10127. accumulator[columnIndex].push(innerBlock);
  10128. return accumulator;
  10129. }, []);
  10130. const migratedInnerBlocks = columns.map(columnBlocks => Object(external_wp_blocks_["createBlock"])('core/column', {}, columnBlocks));
  10131. return [Object(external_lodash_["omit"])(attributes, ['columns']), migratedInnerBlocks];
  10132. },
  10133. save({
  10134. attributes
  10135. }) {
  10136. const {
  10137. columns
  10138. } = attributes;
  10139. return Object(external_wp_element_["createElement"])("div", {
  10140. className: `has-${columns}-columns`
  10141. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  10142. }
  10143. }, {
  10144. attributes: {
  10145. columns: {
  10146. type: 'number',
  10147. default: 2
  10148. }
  10149. },
  10150. migrate(attributes, innerBlocks) {
  10151. attributes = Object(external_lodash_["omit"])(attributes, ['columns']);
  10152. return [attributes, innerBlocks];
  10153. },
  10154. save({
  10155. attributes
  10156. }) {
  10157. const {
  10158. verticalAlignment,
  10159. columns
  10160. } = attributes;
  10161. const wrapperClasses = classnames_default()(`has-${columns}-columns`, {
  10162. [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10163. });
  10164. return Object(external_wp_element_["createElement"])("div", {
  10165. className: wrapperClasses
  10166. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  10167. }
  10168. }]);
  10169. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/utils.js
  10170. /**
  10171. * External dependencies
  10172. */
  10173. /**
  10174. * Returns a column width attribute value rounded to standard precision.
  10175. * Returns `undefined` if the value is not a valid finite number.
  10176. *
  10177. * @param {?number} value Raw value.
  10178. *
  10179. * @return {number} Value rounded to standard precision.
  10180. */
  10181. const toWidthPrecision = value => {
  10182. const unitlessValue = parseFloat(value);
  10183. return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : undefined;
  10184. };
  10185. /**
  10186. * Returns an effective width for a given block. An effective width is equal to
  10187. * its attribute value if set, or a computed value assuming equal distribution.
  10188. *
  10189. * @param {WPBlock} block Block object.
  10190. * @param {number} totalBlockCount Total number of blocks in Columns.
  10191. *
  10192. * @return {number} Effective column width.
  10193. */
  10194. function getEffectiveColumnWidth(block, totalBlockCount) {
  10195. const {
  10196. width = 100 / totalBlockCount
  10197. } = block.attributes;
  10198. return toWidthPrecision(width);
  10199. }
  10200. /**
  10201. * Returns the total width occupied by the given set of column blocks.
  10202. *
  10203. * @param {WPBlock[]} blocks Block objects.
  10204. * @param {?number} totalBlockCount Total number of blocks in Columns.
  10205. * Defaults to number of blocks passed.
  10206. *
  10207. * @return {number} Total width occupied by blocks.
  10208. */
  10209. function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
  10210. return Object(external_lodash_["sumBy"])(blocks, block => getEffectiveColumnWidth(block, totalBlockCount));
  10211. }
  10212. /**
  10213. * Returns an object of `clientId` → `width` of effective column widths.
  10214. *
  10215. * @param {WPBlock[]} blocks Block objects.
  10216. * @param {?number} totalBlockCount Total number of blocks in Columns.
  10217. * Defaults to number of blocks passed.
  10218. *
  10219. * @return {Object<string,number>} Column widths.
  10220. */
  10221. function getColumnWidths(blocks, totalBlockCount = blocks.length) {
  10222. return blocks.reduce((accumulator, block) => {
  10223. const width = getEffectiveColumnWidth(block, totalBlockCount);
  10224. return Object.assign(accumulator, {
  10225. [block.clientId]: width
  10226. });
  10227. }, {});
  10228. }
  10229. /**
  10230. * Returns an object of `clientId` → `width` of column widths as redistributed
  10231. * proportional to their current widths, constrained or expanded to fit within
  10232. * the given available width.
  10233. *
  10234. * @param {WPBlock[]} blocks Block objects.
  10235. * @param {number} availableWidth Maximum width to fit within.
  10236. * @param {?number} totalBlockCount Total number of blocks in Columns.
  10237. * Defaults to number of blocks passed.
  10238. *
  10239. * @return {Object<string,number>} Redistributed column widths.
  10240. */
  10241. function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
  10242. const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
  10243. return Object(external_lodash_["mapValues"])(getColumnWidths(blocks, totalBlockCount), width => {
  10244. const newWidth = availableWidth * width / totalWidth;
  10245. return toWidthPrecision(newWidth);
  10246. });
  10247. }
  10248. /**
  10249. * Returns true if column blocks within the provided set are assigned with
  10250. * explicit widths, or false otherwise.
  10251. *
  10252. * @param {WPBlock[]} blocks Block objects.
  10253. *
  10254. * @return {boolean} Whether columns have explicit widths.
  10255. */
  10256. function hasExplicitPercentColumnWidths(blocks) {
  10257. return blocks.every(block => {
  10258. var _blockWidth$endsWith;
  10259. const blockWidth = block.attributes.width;
  10260. return Number.isFinite(blockWidth !== null && blockWidth !== void 0 && (_blockWidth$endsWith = blockWidth.endsWith) !== null && _blockWidth$endsWith !== void 0 && _blockWidth$endsWith.call(blockWidth, '%') ? parseFloat(blockWidth) : blockWidth);
  10261. });
  10262. }
  10263. /**
  10264. * Returns a copy of the given set of blocks with new widths assigned from the
  10265. * provided object of redistributed column widths.
  10266. *
  10267. * @param {WPBlock[]} blocks Block objects.
  10268. * @param {Object<string,number>} widths Redistributed column widths.
  10269. *
  10270. * @return {WPBlock[]} blocks Mapped block objects.
  10271. */
  10272. function getMappedColumnWidths(blocks, widths) {
  10273. return blocks.map(block => Object(external_lodash_["merge"])({}, block, {
  10274. attributes: {
  10275. width: widths[block.clientId]
  10276. }
  10277. }));
  10278. }
  10279. /**
  10280. * Returns an array with columns widths values, parsed or no depends on `withParsing` flag.
  10281. *
  10282. * @param {WPBlock[]} blocks Block objects.
  10283. * @param {?boolean} withParsing Whether value has to be parsed.
  10284. *
  10285. * @return {Array<number,string>} Column widths.
  10286. */
  10287. function getWidths(blocks, withParsing = true) {
  10288. return blocks.map(innerColumn => {
  10289. const innerColumnWidth = innerColumn.attributes.width || 100 / blocks.length;
  10290. return withParsing ? parseFloat(innerColumnWidth) : innerColumnWidth;
  10291. });
  10292. }
  10293. /**
  10294. * Returns a column width with unit.
  10295. *
  10296. * @param {string} width Column width.
  10297. * @param {string} unit Column width unit.
  10298. *
  10299. * @return {string} Column width with unit.
  10300. */
  10301. function getWidthWithUnit(width, unit) {
  10302. width = 0 > parseFloat(width) ? '0' : width;
  10303. if (isPercentageUnit(unit)) {
  10304. width = Math.min(width, 100);
  10305. }
  10306. return `${width}${unit}`;
  10307. }
  10308. /**
  10309. * Returns a boolean whether passed unit is percentage
  10310. *
  10311. * @param {string} unit Column width unit.
  10312. *
  10313. * @return {boolean} Whether unit is '%'.
  10314. */
  10315. function isPercentageUnit(unit) {
  10316. return unit === '%';
  10317. }
  10318. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/edit.js
  10319. /**
  10320. * External dependencies
  10321. */
  10322. /**
  10323. * WordPress dependencies
  10324. */
  10325. /**
  10326. * Internal dependencies
  10327. */
  10328. /**
  10329. * Allowed blocks constant is passed to InnerBlocks precisely as specified here.
  10330. * The contents of the array should never change.
  10331. * The array should contain the name of each block that is allowed.
  10332. * In columns block, the only block we allow is 'core/column'.
  10333. *
  10334. * @constant
  10335. * @type {string[]}
  10336. */
  10337. const edit_ALLOWED_BLOCKS = ['core/column'];
  10338. function ColumnsEditContainer({
  10339. attributes,
  10340. updateAlignment,
  10341. updateColumns,
  10342. clientId
  10343. }) {
  10344. const {
  10345. verticalAlignment
  10346. } = attributes;
  10347. const {
  10348. count
  10349. } = Object(external_wp_data_["useSelect"])(select => {
  10350. return {
  10351. count: select(external_wp_blockEditor_["store"]).getBlockCount(clientId)
  10352. };
  10353. }, [clientId]);
  10354. const classes = classnames_default()({
  10355. [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10356. });
  10357. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  10358. className: classes
  10359. });
  10360. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
  10361. allowedBlocks: edit_ALLOWED_BLOCKS,
  10362. orientation: 'horizontal',
  10363. renderAppender: false
  10364. });
  10365. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockVerticalAlignmentToolbar"], {
  10366. onChange: updateAlignment,
  10367. value: verticalAlignment
  10368. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  10369. label: Object(external_wp_i18n_["__"])('Columns'),
  10370. value: count,
  10371. onChange: value => updateColumns(count, value),
  10372. min: 1,
  10373. max: Math.max(6, count)
  10374. }), count > 6 && Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
  10375. status: "warning",
  10376. isDismissible: false
  10377. }, Object(external_wp_i18n_["__"])('This column count exceeds the recommended amount and may cause visual breakage.')))), Object(external_wp_element_["createElement"])("div", innerBlocksProps));
  10378. }
  10379. const ColumnsEditContainerWrapper = Object(external_wp_data_["withDispatch"])((dispatch, ownProps, registry) => ({
  10380. /**
  10381. * Update all child Column blocks with a new vertical alignment setting
  10382. * based on whatever alignment is passed in. This allows change to parent
  10383. * to overide anything set on a individual column basis.
  10384. *
  10385. * @param {string} verticalAlignment the vertical alignment setting
  10386. */
  10387. updateAlignment(verticalAlignment) {
  10388. const {
  10389. clientId,
  10390. setAttributes
  10391. } = ownProps;
  10392. const {
  10393. updateBlockAttributes
  10394. } = dispatch(external_wp_blockEditor_["store"]);
  10395. const {
  10396. getBlockOrder
  10397. } = registry.select(external_wp_blockEditor_["store"]); // Update own alignment.
  10398. setAttributes({
  10399. verticalAlignment
  10400. }); // Update all child Column Blocks to match
  10401. const innerBlockClientIds = getBlockOrder(clientId);
  10402. innerBlockClientIds.forEach(innerBlockClientId => {
  10403. updateBlockAttributes(innerBlockClientId, {
  10404. verticalAlignment
  10405. });
  10406. });
  10407. },
  10408. /**
  10409. * Updates the column count, including necessary revisions to child Column
  10410. * blocks to grant required or redistribute available space.
  10411. *
  10412. * @param {number} previousColumns Previous column count.
  10413. * @param {number} newColumns New column count.
  10414. */
  10415. updateColumns(previousColumns, newColumns) {
  10416. const {
  10417. clientId
  10418. } = ownProps;
  10419. const {
  10420. replaceInnerBlocks
  10421. } = dispatch(external_wp_blockEditor_["store"]);
  10422. const {
  10423. getBlocks
  10424. } = registry.select(external_wp_blockEditor_["store"]);
  10425. let innerBlocks = getBlocks(clientId);
  10426. const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks); // Redistribute available width for existing inner blocks.
  10427. const isAddingColumn = newColumns > previousColumns;
  10428. if (isAddingColumn && hasExplicitWidths) {
  10429. // If adding a new column, assign width to the new column equal to
  10430. // as if it were `1 / columns` of the total available space.
  10431. const newColumnWidth = toWidthPrecision(100 / newColumns); // Redistribute in consideration of pending block insertion as
  10432. // constraining the available working width.
  10433. const widths = getRedistributedColumnWidths(innerBlocks, 100 - newColumnWidth);
  10434. innerBlocks = [...getMappedColumnWidths(innerBlocks, widths), ...Object(external_lodash_["times"])(newColumns - previousColumns, () => {
  10435. return Object(external_wp_blocks_["createBlock"])('core/column', {
  10436. width: newColumnWidth
  10437. });
  10438. })];
  10439. } else if (isAddingColumn) {
  10440. innerBlocks = [...innerBlocks, ...Object(external_lodash_["times"])(newColumns - previousColumns, () => {
  10441. return Object(external_wp_blocks_["createBlock"])('core/column');
  10442. })];
  10443. } else {
  10444. // The removed column will be the last of the inner blocks.
  10445. innerBlocks = Object(external_lodash_["dropRight"])(innerBlocks, previousColumns - newColumns);
  10446. if (hasExplicitWidths) {
  10447. // Redistribute as if block is already removed.
  10448. const widths = getRedistributedColumnWidths(innerBlocks, 100);
  10449. innerBlocks = getMappedColumnWidths(innerBlocks, widths);
  10450. }
  10451. }
  10452. replaceInnerBlocks(clientId, innerBlocks);
  10453. }
  10454. }))(ColumnsEditContainer);
  10455. function Placeholder({
  10456. clientId,
  10457. name,
  10458. setAttributes
  10459. }) {
  10460. const {
  10461. blockType,
  10462. defaultVariation,
  10463. variations
  10464. } = Object(external_wp_data_["useSelect"])(select => {
  10465. const {
  10466. getBlockVariations,
  10467. getBlockType,
  10468. getDefaultBlockVariation
  10469. } = select(external_wp_blocks_["store"]);
  10470. return {
  10471. blockType: getBlockType(name),
  10472. defaultVariation: getDefaultBlockVariation(name, 'block'),
  10473. variations: getBlockVariations(name, 'block')
  10474. };
  10475. }, [name]);
  10476. const {
  10477. replaceInnerBlocks
  10478. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  10479. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  10480. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockVariationPicker"], {
  10481. icon: Object(external_lodash_["get"])(blockType, ['icon', 'src']),
  10482. label: Object(external_lodash_["get"])(blockType, ['title']),
  10483. variations: variations,
  10484. onSelect: (nextVariation = defaultVariation) => {
  10485. if (nextVariation.attributes) {
  10486. setAttributes(nextVariation.attributes);
  10487. }
  10488. if (nextVariation.innerBlocks) {
  10489. replaceInnerBlocks(clientId, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(nextVariation.innerBlocks), true);
  10490. }
  10491. },
  10492. allowSkip: true
  10493. }));
  10494. }
  10495. const ColumnsEdit = props => {
  10496. const {
  10497. clientId
  10498. } = props;
  10499. const hasInnerBlocks = Object(external_wp_data_["useSelect"])(select => select(external_wp_blockEditor_["store"]).getBlocks(clientId).length > 0, [clientId]);
  10500. const Component = hasInnerBlocks ? ColumnsEditContainerWrapper : Placeholder;
  10501. return Object(external_wp_element_["createElement"])(Component, props);
  10502. };
  10503. /* harmony default export */ var columns_edit = (ColumnsEdit);
  10504. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/save.js
  10505. /**
  10506. * External dependencies
  10507. */
  10508. /**
  10509. * WordPress dependencies
  10510. */
  10511. function columns_save_save({
  10512. attributes
  10513. }) {
  10514. const {
  10515. verticalAlignment
  10516. } = attributes;
  10517. const className = classnames_default()({
  10518. [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10519. });
  10520. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  10521. className
  10522. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  10523. }
  10524. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/variations.js
  10525. /**
  10526. * WordPress dependencies
  10527. */
  10528. /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
  10529. /**
  10530. * Template option choices for predefined columns layouts.
  10531. *
  10532. * @type {WPBlockVariation[]}
  10533. */
  10534. const columns_variations_variations = [{
  10535. name: 'one-column-full',
  10536. title: Object(external_wp_i18n_["__"])('100'),
  10537. description: Object(external_wp_i18n_["__"])('One column'),
  10538. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  10539. width: "48",
  10540. height: "48",
  10541. viewBox: "0 0 48 48",
  10542. xmlns: "http://www.w3.org/2000/svg"
  10543. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  10544. fillRule: "evenodd",
  10545. clipRule: "evenodd",
  10546. d: "m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"
  10547. })),
  10548. innerBlocks: [['core/column']],
  10549. scope: ['block']
  10550. }, {
  10551. name: 'two-columns-equal',
  10552. title: Object(external_wp_i18n_["__"])('50 / 50'),
  10553. description: Object(external_wp_i18n_["__"])('Two columns; equal split'),
  10554. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  10555. width: "48",
  10556. height: "48",
  10557. viewBox: "0 0 48 48",
  10558. xmlns: "http://www.w3.org/2000/svg"
  10559. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  10560. fillRule: "evenodd",
  10561. clipRule: "evenodd",
  10562. d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"
  10563. })),
  10564. isDefault: true,
  10565. innerBlocks: [['core/column'], ['core/column']],
  10566. scope: ['block']
  10567. }, {
  10568. name: 'two-columns-one-third-two-thirds',
  10569. title: Object(external_wp_i18n_["__"])('30 / 70'),
  10570. description: Object(external_wp_i18n_["__"])('Two columns; one-third, two-thirds split'),
  10571. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  10572. width: "48",
  10573. height: "48",
  10574. viewBox: "0 0 48 48",
  10575. xmlns: "http://www.w3.org/2000/svg"
  10576. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  10577. fillRule: "evenodd",
  10578. clipRule: "evenodd",
  10579. d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"
  10580. })),
  10581. innerBlocks: [['core/column', {
  10582. width: '33.33%'
  10583. }], ['core/column', {
  10584. width: '66.66%'
  10585. }]],
  10586. scope: ['block']
  10587. }, {
  10588. name: 'two-columns-two-thirds-one-third',
  10589. title: Object(external_wp_i18n_["__"])('70 / 30'),
  10590. description: Object(external_wp_i18n_["__"])('Two columns; two-thirds, one-third split'),
  10591. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  10592. width: "48",
  10593. height: "48",
  10594. viewBox: "0 0 48 48",
  10595. xmlns: "http://www.w3.org/2000/svg"
  10596. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  10597. fillRule: "evenodd",
  10598. clipRule: "evenodd",
  10599. d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"
  10600. })),
  10601. innerBlocks: [['core/column', {
  10602. width: '66.66%'
  10603. }], ['core/column', {
  10604. width: '33.33%'
  10605. }]],
  10606. scope: ['block']
  10607. }, {
  10608. name: 'three-columns-equal',
  10609. title: Object(external_wp_i18n_["__"])('33 / 33 / 33'),
  10610. description: Object(external_wp_i18n_["__"])('Three columns; equal split'),
  10611. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  10612. width: "48",
  10613. height: "48",
  10614. viewBox: "0 0 48 48",
  10615. xmlns: "http://www.w3.org/2000/svg"
  10616. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  10617. fillRule: "evenodd",
  10618. d: "M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"
  10619. })),
  10620. innerBlocks: [['core/column'], ['core/column'], ['core/column']],
  10621. scope: ['block']
  10622. }, {
  10623. name: 'three-columns-wider-center',
  10624. title: Object(external_wp_i18n_["__"])('25 / 50 / 25'),
  10625. description: Object(external_wp_i18n_["__"])('Three columns; wide center column'),
  10626. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  10627. width: "48",
  10628. height: "48",
  10629. viewBox: "0 0 48 48",
  10630. xmlns: "http://www.w3.org/2000/svg"
  10631. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  10632. fillRule: "evenodd",
  10633. d: "M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"
  10634. })),
  10635. innerBlocks: [['core/column', {
  10636. width: '25%'
  10637. }], ['core/column', {
  10638. width: '50%'
  10639. }], ['core/column', {
  10640. width: '25%'
  10641. }]],
  10642. scope: ['block']
  10643. }];
  10644. /* harmony default export */ var columns_variations = (columns_variations_variations);
  10645. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/transforms.js
  10646. /**
  10647. * WordPress dependencies
  10648. */
  10649. const MAXIMUM_SELECTED_BLOCKS = 6;
  10650. const columns_transforms_transforms = {
  10651. from: [{
  10652. type: 'block',
  10653. isMultiBlock: true,
  10654. blocks: ['*'],
  10655. __experimentalConvert: blocks => {
  10656. const columnWidth = +(100 / blocks.length).toFixed(2);
  10657. const innerBlocksTemplate = blocks.map(({
  10658. name,
  10659. attributes,
  10660. innerBlocks
  10661. }) => ['core/column', {
  10662. width: `${columnWidth}%`
  10663. }, [[name, { ...attributes
  10664. }, innerBlocks]]]);
  10665. return Object(external_wp_blocks_["createBlock"])('core/columns', {}, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(innerBlocksTemplate));
  10666. },
  10667. isMatch: ({
  10668. length: selectedBlocksLength
  10669. }) => selectedBlocksLength && selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS
  10670. }, {
  10671. type: 'block',
  10672. blocks: ['core/media-text'],
  10673. priority: 1,
  10674. transform: (attributes, innerBlocks) => {
  10675. const {
  10676. align,
  10677. backgroundColor,
  10678. textColor,
  10679. style,
  10680. mediaAlt: alt,
  10681. mediaId: id,
  10682. mediaPosition,
  10683. mediaSizeSlug: sizeSlug,
  10684. mediaType,
  10685. mediaUrl: url,
  10686. mediaWidth,
  10687. verticalAlignment
  10688. } = attributes;
  10689. let media;
  10690. if (mediaType === 'image' || !mediaType) {
  10691. const imageAttrs = {
  10692. id,
  10693. alt,
  10694. url,
  10695. sizeSlug
  10696. };
  10697. const linkAttrs = {
  10698. href: attributes.href,
  10699. linkClass: attributes.linkClass,
  10700. linkDestination: attributes.linkDestination,
  10701. linkTarget: attributes.linkTarget,
  10702. rel: attributes.rel
  10703. };
  10704. media = ['core/image', { ...imageAttrs,
  10705. ...linkAttrs
  10706. }];
  10707. } else {
  10708. media = ['core/video', {
  10709. id,
  10710. src: url
  10711. }];
  10712. }
  10713. const innerBlocksTemplate = [['core/column', {
  10714. width: `${mediaWidth}%`
  10715. }, [media]], ['core/column', {
  10716. width: `${100 - mediaWidth}%`
  10717. }, innerBlocks]];
  10718. if (mediaPosition === 'right') {
  10719. innerBlocksTemplate.reverse();
  10720. }
  10721. return Object(external_wp_blocks_["createBlock"])('core/columns', {
  10722. align,
  10723. backgroundColor,
  10724. textColor,
  10725. style,
  10726. verticalAlignment
  10727. }, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(innerBlocksTemplate));
  10728. }
  10729. }]
  10730. };
  10731. /* harmony default export */ var columns_transforms = (columns_transforms_transforms);
  10732. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/index.js
  10733. /**
  10734. * WordPress dependencies
  10735. */
  10736. /**
  10737. * Internal dependencies
  10738. */
  10739. const columns_metadata = {
  10740. apiVersion: 2,
  10741. name: "core/columns",
  10742. title: "Columns",
  10743. category: "design",
  10744. description: "Add a block that displays content in multiple columns, then add whatever content blocks you\u2019d like.",
  10745. textdomain: "default",
  10746. attributes: {
  10747. verticalAlignment: {
  10748. type: "string"
  10749. }
  10750. },
  10751. supports: {
  10752. anchor: true,
  10753. align: ["wide", "full"],
  10754. html: false,
  10755. color: {
  10756. gradients: true,
  10757. link: true
  10758. }
  10759. },
  10760. editorStyle: "wp-block-columns-editor",
  10761. style: "wp-block-columns"
  10762. };
  10763. const {
  10764. name: columns_name
  10765. } = columns_metadata;
  10766. const columns_settings = {
  10767. icon: library_columns,
  10768. variations: columns_variations,
  10769. example: {
  10770. innerBlocks: [{
  10771. name: 'core/column',
  10772. innerBlocks: [{
  10773. name: 'core/paragraph',
  10774. attributes: {
  10775. /* translators: example text. */
  10776. content: Object(external_wp_i18n_["__"])('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.')
  10777. }
  10778. }, {
  10779. name: 'core/image',
  10780. attributes: {
  10781. url: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg'
  10782. }
  10783. }, {
  10784. name: 'core/paragraph',
  10785. attributes: {
  10786. /* translators: example text. */
  10787. content: Object(external_wp_i18n_["__"])('Suspendisse commodo neque lacus, a dictum orci interdum et.')
  10788. }
  10789. }]
  10790. }, {
  10791. name: 'core/column',
  10792. innerBlocks: [{
  10793. name: 'core/paragraph',
  10794. attributes: {
  10795. /* translators: example text. */
  10796. content: Object(external_wp_i18n_["__"])('Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.')
  10797. }
  10798. }, {
  10799. name: 'core/paragraph',
  10800. attributes: {
  10801. /* translators: example text. */
  10802. content: Object(external_wp_i18n_["__"])('Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.')
  10803. }
  10804. }]
  10805. }]
  10806. },
  10807. deprecated: columns_deprecated,
  10808. edit: columns_edit,
  10809. save: columns_save_save,
  10810. transforms: columns_transforms
  10811. };
  10812. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/column.js
  10813. /**
  10814. * WordPress dependencies
  10815. */
  10816. const column = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  10817. xmlns: "http://www.w3.org/2000/svg",
  10818. viewBox: "0 0 24 24"
  10819. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  10820. d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"
  10821. }));
  10822. /* harmony default export */ var library_column = (column);
  10823. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/deprecated.js
  10824. /**
  10825. * External dependencies
  10826. */
  10827. /**
  10828. * WordPress dependencies
  10829. */
  10830. const column_deprecated_deprecated = [{
  10831. attributes: {
  10832. verticalAlignment: {
  10833. type: 'string'
  10834. },
  10835. width: {
  10836. type: 'number',
  10837. min: 0,
  10838. max: 100
  10839. }
  10840. },
  10841. isEligible({
  10842. width
  10843. }) {
  10844. return isFinite(width);
  10845. },
  10846. migrate(attributes) {
  10847. return { ...attributes,
  10848. width: `${attributes.width}%`
  10849. };
  10850. },
  10851. save({
  10852. attributes
  10853. }) {
  10854. const {
  10855. verticalAlignment,
  10856. width
  10857. } = attributes;
  10858. const wrapperClasses = classnames_default()({
  10859. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10860. });
  10861. const style = {
  10862. flexBasis: width + '%'
  10863. };
  10864. return Object(external_wp_element_["createElement"])("div", {
  10865. className: wrapperClasses,
  10866. style: style
  10867. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  10868. }
  10869. }];
  10870. /* harmony default export */ var column_deprecated = (column_deprecated_deprecated);
  10871. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/edit.js
  10872. /**
  10873. * External dependencies
  10874. */
  10875. /**
  10876. * WordPress dependencies
  10877. */
  10878. function ColumnEdit({
  10879. attributes: {
  10880. verticalAlignment,
  10881. width,
  10882. templateLock = false
  10883. },
  10884. setAttributes,
  10885. clientId
  10886. }) {
  10887. const classes = classnames_default()('block-core-columns', {
  10888. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10889. });
  10890. const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
  10891. availableUnits: Object(external_wp_blockEditor_["useSetting"])('spacing.units') || ['%', 'px', 'em', 'rem', 'vw']
  10892. });
  10893. const {
  10894. columnsIds,
  10895. hasChildBlocks,
  10896. rootClientId
  10897. } = Object(external_wp_data_["useSelect"])(select => {
  10898. const {
  10899. getBlockOrder,
  10900. getBlockRootClientId
  10901. } = select(external_wp_blockEditor_["store"]);
  10902. const rootId = getBlockRootClientId(clientId);
  10903. return {
  10904. hasChildBlocks: getBlockOrder(clientId).length > 0,
  10905. rootClientId: rootId,
  10906. columnsIds: getBlockOrder(rootId)
  10907. };
  10908. }, [clientId]);
  10909. const {
  10910. updateBlockAttributes
  10911. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  10912. const updateAlignment = value => {
  10913. // Update own alignment.
  10914. setAttributes({
  10915. verticalAlignment: value
  10916. }); // Reset parent Columns block.
  10917. updateBlockAttributes(rootClientId, {
  10918. verticalAlignment: null
  10919. });
  10920. };
  10921. const widthWithUnit = Number.isFinite(width) ? width + '%' : width;
  10922. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  10923. className: classes,
  10924. style: widthWithUnit ? {
  10925. flexBasis: widthWithUnit
  10926. } : undefined
  10927. });
  10928. const columnsCount = columnsIds.length;
  10929. const currentColumnPosition = columnsIds.indexOf(clientId) + 1;
  10930. const label = Object(external_wp_i18n_["sprintf"])(
  10931. /* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */
  10932. Object(external_wp_i18n_["__"])('%1$s (%2$d of %3$d)'), blockProps['aria-label'], currentColumnPosition, columnsCount);
  10933. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({ ...blockProps,
  10934. 'aria-label': label
  10935. }, {
  10936. templateLock,
  10937. renderAppender: hasChildBlocks ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender
  10938. });
  10939. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockVerticalAlignmentToolbar"], {
  10940. onChange: updateAlignment,
  10941. value: verticalAlignment
  10942. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  10943. title: Object(external_wp_i18n_["__"])('Column settings')
  10944. }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], {
  10945. label: Object(external_wp_i18n_["__"])('Width'),
  10946. labelPosition: "edge",
  10947. __unstableInputWidth: "80px",
  10948. value: width || '',
  10949. onChange: nextWidth => {
  10950. nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
  10951. setAttributes({
  10952. width: nextWidth
  10953. });
  10954. },
  10955. units: units
  10956. }))), Object(external_wp_element_["createElement"])("div", innerBlocksProps));
  10957. }
  10958. /* harmony default export */ var column_edit = (ColumnEdit);
  10959. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/save.js
  10960. /**
  10961. * External dependencies
  10962. */
  10963. /**
  10964. * WordPress dependencies
  10965. */
  10966. function column_save_save({
  10967. attributes
  10968. }) {
  10969. const {
  10970. verticalAlignment,
  10971. width
  10972. } = attributes;
  10973. const wrapperClasses = classnames_default()({
  10974. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  10975. });
  10976. let style;
  10977. if (width) {
  10978. // Numbers are handled for backward compatibility as they can be still provided with templates.
  10979. style = {
  10980. flexBasis: Number.isFinite(width) ? width + '%' : width
  10981. };
  10982. }
  10983. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  10984. className: wrapperClasses,
  10985. style
  10986. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  10987. }
  10988. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/index.js
  10989. /**
  10990. * WordPress dependencies
  10991. */
  10992. /**
  10993. * Internal dependencies
  10994. */
  10995. const column_metadata = {
  10996. apiVersion: 2,
  10997. name: "core/column",
  10998. title: "Column",
  10999. category: "text",
  11000. parent: ["core/columns"],
  11001. description: "A single column within a columns block.",
  11002. textdomain: "default",
  11003. attributes: {
  11004. verticalAlignment: {
  11005. type: "string"
  11006. },
  11007. width: {
  11008. type: "string"
  11009. },
  11010. templateLock: {
  11011. "enum": ["all", "insert", false]
  11012. }
  11013. },
  11014. supports: {
  11015. anchor: true,
  11016. reusable: false,
  11017. html: false,
  11018. color: {
  11019. gradients: true,
  11020. link: true
  11021. },
  11022. spacing: {
  11023. padding: true
  11024. }
  11025. }
  11026. };
  11027. const {
  11028. name: column_name
  11029. } = column_metadata;
  11030. const column_settings = {
  11031. icon: library_column,
  11032. edit: column_edit,
  11033. save: column_save_save,
  11034. deprecated: column_deprecated
  11035. };
  11036. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cover.js
  11037. /**
  11038. * WordPress dependencies
  11039. */
  11040. const cover = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  11041. xmlns: "http://www.w3.org/2000/svg",
  11042. viewBox: "0 0 24 24"
  11043. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  11044. d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"
  11045. }));
  11046. /* harmony default export */ var library_cover = (cover);
  11047. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/shared.js
  11048. /**
  11049. * WordPress dependencies
  11050. */
  11051. const POSITION_CLASSNAMES = {
  11052. 'top left': 'is-position-top-left',
  11053. 'top center': 'is-position-top-center',
  11054. 'top right': 'is-position-top-right',
  11055. 'center left': 'is-position-center-left',
  11056. 'center center': 'is-position-center-center',
  11057. center: 'is-position-center-center',
  11058. 'center right': 'is-position-center-right',
  11059. 'bottom left': 'is-position-bottom-left',
  11060. 'bottom center': 'is-position-bottom-center',
  11061. 'bottom right': 'is-position-bottom-right'
  11062. };
  11063. const IMAGE_BACKGROUND_TYPE = 'image';
  11064. const VIDEO_BACKGROUND_TYPE = 'video';
  11065. const COVER_MIN_HEIGHT = 50;
  11066. const COVER_MAX_HEIGHT = 1000;
  11067. const COVER_DEFAULT_HEIGHT = 300;
  11068. function backgroundImageStyles(url) {
  11069. return url ? {
  11070. backgroundImage: `url(${url})`
  11071. } : {};
  11072. }
  11073. const shared_ALLOWED_MEDIA_TYPES = ['image', 'video'];
  11074. function dimRatioToClass(ratio) {
  11075. return ratio === 0 || ratio === 50 || !ratio ? null : 'has-background-dim-' + 10 * Math.round(ratio / 10);
  11076. }
  11077. function attributesFromMedia(setAttributes) {
  11078. return media => {
  11079. if (!media || !media.url) {
  11080. setAttributes({
  11081. url: undefined,
  11082. id: undefined
  11083. });
  11084. return;
  11085. }
  11086. if (Object(external_wp_blob_["isBlobURL"])(media.url)) {
  11087. media.type = Object(external_wp_blob_["getBlobTypeByURL"])(media.url);
  11088. }
  11089. let mediaType; // for media selections originated from a file upload.
  11090. if (media.media_type) {
  11091. if (media.media_type === IMAGE_BACKGROUND_TYPE) {
  11092. mediaType = IMAGE_BACKGROUND_TYPE;
  11093. } else {
  11094. // only images and videos are accepted so if the media_type is not an image we can assume it is a video.
  11095. // Videos contain the media type of 'file' in the object returned from the rest api.
  11096. mediaType = VIDEO_BACKGROUND_TYPE;
  11097. }
  11098. } else {
  11099. // for media selections originated from existing files in the media library.
  11100. if (media.type !== IMAGE_BACKGROUND_TYPE && media.type !== VIDEO_BACKGROUND_TYPE) {
  11101. return;
  11102. }
  11103. mediaType = media.type;
  11104. }
  11105. setAttributes({
  11106. url: media.url,
  11107. id: media.id,
  11108. backgroundType: mediaType,
  11109. ...(mediaType === VIDEO_BACKGROUND_TYPE ? {
  11110. focalPoint: undefined,
  11111. hasParallax: undefined
  11112. } : {})
  11113. });
  11114. };
  11115. }
  11116. /**
  11117. * Checks of the contentPosition is the center (default) position.
  11118. *
  11119. * @param {string} contentPosition The current content position.
  11120. * @return {boolean} Whether the contentPosition is center.
  11121. */
  11122. function isContentPositionCenter(contentPosition) {
  11123. return !contentPosition || contentPosition === 'center center' || contentPosition === 'center';
  11124. }
  11125. /**
  11126. * Retrieves the className for the current contentPosition.
  11127. * The default position (center) will not have a className.
  11128. *
  11129. * @param {string} contentPosition The current content position.
  11130. * @return {string} The className assigned to the contentPosition.
  11131. */
  11132. function getPositionClassName(contentPosition) {
  11133. /*
  11134. * Only render a className if the contentPosition is not center (the default).
  11135. */
  11136. if (isContentPositionCenter(contentPosition)) return '';
  11137. return POSITION_CLASSNAMES[contentPosition];
  11138. }
  11139. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/deprecated.js
  11140. /**
  11141. * External dependencies
  11142. */
  11143. /**
  11144. * WordPress dependencies
  11145. */
  11146. /**
  11147. * Internal dependencies
  11148. */
  11149. const cover_deprecated_blockAttributes = {
  11150. url: {
  11151. type: 'string'
  11152. },
  11153. id: {
  11154. type: 'number'
  11155. },
  11156. hasParallax: {
  11157. type: 'boolean',
  11158. default: false
  11159. },
  11160. dimRatio: {
  11161. type: 'number',
  11162. default: 50
  11163. },
  11164. overlayColor: {
  11165. type: 'string'
  11166. },
  11167. customOverlayColor: {
  11168. type: 'string'
  11169. },
  11170. backgroundType: {
  11171. type: 'string',
  11172. default: 'image'
  11173. },
  11174. focalPoint: {
  11175. type: 'object'
  11176. }
  11177. };
  11178. const cover_deprecated_deprecated = [{
  11179. attributes: { ...cover_deprecated_blockAttributes,
  11180. title: {
  11181. type: 'string',
  11182. source: 'html',
  11183. selector: 'p'
  11184. },
  11185. contentAlign: {
  11186. type: 'string',
  11187. default: 'center'
  11188. },
  11189. isRepeated: {
  11190. type: 'boolean',
  11191. default: false
  11192. },
  11193. minHeight: {
  11194. type: 'number'
  11195. },
  11196. minHeightUnit: {
  11197. type: 'string'
  11198. },
  11199. gradient: {
  11200. type: 'string'
  11201. },
  11202. customGradient: {
  11203. type: 'string'
  11204. },
  11205. contentPosition: {
  11206. type: 'string'
  11207. }
  11208. },
  11209. supports: {
  11210. align: true
  11211. },
  11212. save({
  11213. attributes
  11214. }) {
  11215. const {
  11216. backgroundType,
  11217. gradient,
  11218. contentPosition,
  11219. customGradient,
  11220. customOverlayColor,
  11221. dimRatio,
  11222. focalPoint,
  11223. hasParallax,
  11224. isRepeated,
  11225. overlayColor,
  11226. url,
  11227. minHeight: minHeightProp,
  11228. minHeightUnit
  11229. } = attributes;
  11230. const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor);
  11231. const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient);
  11232. const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
  11233. const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
  11234. const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
  11235. const style = isImageBackground ? backgroundImageStyles(url) : {};
  11236. const videoStyle = {};
  11237. if (!overlayColorClass) {
  11238. style.backgroundColor = customOverlayColor;
  11239. }
  11240. if (customGradient && !url) {
  11241. style.background = customGradient;
  11242. }
  11243. style.minHeight = minHeight || undefined;
  11244. let positionValue;
  11245. if (focalPoint) {
  11246. positionValue = `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%`;
  11247. if (isImageBackground && !hasParallax) {
  11248. style.backgroundPosition = positionValue;
  11249. }
  11250. if (isVideoBackground) {
  11251. videoStyle.objectPosition = positionValue;
  11252. }
  11253. }
  11254. const classes = classnames_default()(dimRatioToClass(dimRatio), overlayColorClass, {
  11255. 'has-background-dim': dimRatio !== 0,
  11256. 'has-parallax': hasParallax,
  11257. 'is-repeated': isRepeated,
  11258. 'has-background-gradient': gradient || customGradient,
  11259. [gradientClass]: !url && gradientClass,
  11260. 'has-custom-content-position': !isContentPositionCenter(contentPosition)
  11261. }, getPositionClassName(contentPosition));
  11262. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  11263. className: classes,
  11264. style
  11265. }), url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", {
  11266. "aria-hidden": "true",
  11267. className: classnames_default()('wp-block-cover__gradient-background', gradientClass),
  11268. style: customGradient ? {
  11269. background: customGradient
  11270. } : undefined
  11271. }), isVideoBackground && url && Object(external_wp_element_["createElement"])("video", {
  11272. className: "wp-block-cover__video-background",
  11273. autoPlay: true,
  11274. muted: true,
  11275. loop: true,
  11276. playsInline: true,
  11277. src: url,
  11278. style: videoStyle
  11279. }), Object(external_wp_element_["createElement"])("div", {
  11280. className: "wp-block-cover__inner-container"
  11281. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  11282. }
  11283. }, {
  11284. attributes: { ...cover_deprecated_blockAttributes,
  11285. title: {
  11286. type: 'string',
  11287. source: 'html',
  11288. selector: 'p'
  11289. },
  11290. contentAlign: {
  11291. type: 'string',
  11292. default: 'center'
  11293. },
  11294. minHeight: {
  11295. type: 'number'
  11296. },
  11297. gradient: {
  11298. type: 'string'
  11299. },
  11300. customGradient: {
  11301. type: 'string'
  11302. }
  11303. },
  11304. supports: {
  11305. align: true
  11306. },
  11307. save({
  11308. attributes
  11309. }) {
  11310. const {
  11311. backgroundType,
  11312. gradient,
  11313. customGradient,
  11314. customOverlayColor,
  11315. dimRatio,
  11316. focalPoint,
  11317. hasParallax,
  11318. overlayColor,
  11319. url,
  11320. minHeight
  11321. } = attributes;
  11322. const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor);
  11323. const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient);
  11324. const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
  11325. if (!overlayColorClass) {
  11326. style.backgroundColor = customOverlayColor;
  11327. }
  11328. if (focalPoint && !hasParallax) {
  11329. style.backgroundPosition = `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%`;
  11330. }
  11331. if (customGradient && !url) {
  11332. style.background = customGradient;
  11333. }
  11334. style.minHeight = minHeight || undefined;
  11335. const classes = classnames_default()(dimRatioToClass(dimRatio), overlayColorClass, {
  11336. 'has-background-dim': dimRatio !== 0,
  11337. 'has-parallax': hasParallax,
  11338. 'has-background-gradient': customGradient,
  11339. [gradientClass]: !url && gradientClass
  11340. });
  11341. return Object(external_wp_element_["createElement"])("div", {
  11342. className: classes,
  11343. style: style
  11344. }, url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", {
  11345. "aria-hidden": "true",
  11346. className: classnames_default()('wp-block-cover__gradient-background', gradientClass),
  11347. style: customGradient ? {
  11348. background: customGradient
  11349. } : undefined
  11350. }), VIDEO_BACKGROUND_TYPE === backgroundType && url && Object(external_wp_element_["createElement"])("video", {
  11351. className: "wp-block-cover__video-background",
  11352. autoPlay: true,
  11353. muted: true,
  11354. loop: true,
  11355. src: url
  11356. }), Object(external_wp_element_["createElement"])("div", {
  11357. className: "wp-block-cover__inner-container"
  11358. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  11359. }
  11360. }, {
  11361. attributes: { ...cover_deprecated_blockAttributes,
  11362. title: {
  11363. type: 'string',
  11364. source: 'html',
  11365. selector: 'p'
  11366. },
  11367. contentAlign: {
  11368. type: 'string',
  11369. default: 'center'
  11370. },
  11371. minHeight: {
  11372. type: 'number'
  11373. },
  11374. gradient: {
  11375. type: 'string'
  11376. },
  11377. customGradient: {
  11378. type: 'string'
  11379. }
  11380. },
  11381. supports: {
  11382. align: true
  11383. },
  11384. save({
  11385. attributes
  11386. }) {
  11387. const {
  11388. backgroundType,
  11389. gradient,
  11390. customGradient,
  11391. customOverlayColor,
  11392. dimRatio,
  11393. focalPoint,
  11394. hasParallax,
  11395. overlayColor,
  11396. url,
  11397. minHeight
  11398. } = attributes;
  11399. const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor);
  11400. const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient);
  11401. const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
  11402. if (!overlayColorClass) {
  11403. style.backgroundColor = customOverlayColor;
  11404. }
  11405. if (focalPoint && !hasParallax) {
  11406. style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
  11407. }
  11408. if (customGradient && !url) {
  11409. style.background = customGradient;
  11410. }
  11411. style.minHeight = minHeight || undefined;
  11412. const classes = classnames_default()(dimRatioToClass(dimRatio), overlayColorClass, {
  11413. 'has-background-dim': dimRatio !== 0,
  11414. 'has-parallax': hasParallax,
  11415. 'has-background-gradient': customGradient,
  11416. [gradientClass]: !url && gradientClass
  11417. });
  11418. return Object(external_wp_element_["createElement"])("div", {
  11419. className: classes,
  11420. style: style
  11421. }, url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", {
  11422. "aria-hidden": "true",
  11423. className: classnames_default()('wp-block-cover__gradient-background', gradientClass),
  11424. style: customGradient ? {
  11425. background: customGradient
  11426. } : undefined
  11427. }), VIDEO_BACKGROUND_TYPE === backgroundType && url && Object(external_wp_element_["createElement"])("video", {
  11428. className: "wp-block-cover__video-background",
  11429. autoPlay: true,
  11430. muted: true,
  11431. loop: true,
  11432. src: url
  11433. }), Object(external_wp_element_["createElement"])("div", {
  11434. className: "wp-block-cover__inner-container"
  11435. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  11436. }
  11437. }, {
  11438. attributes: { ...cover_deprecated_blockAttributes,
  11439. title: {
  11440. type: 'string',
  11441. source: 'html',
  11442. selector: 'p'
  11443. },
  11444. contentAlign: {
  11445. type: 'string',
  11446. default: 'center'
  11447. }
  11448. },
  11449. supports: {
  11450. align: true
  11451. },
  11452. save({
  11453. attributes
  11454. }) {
  11455. const {
  11456. backgroundType,
  11457. contentAlign,
  11458. customOverlayColor,
  11459. dimRatio,
  11460. focalPoint,
  11461. hasParallax,
  11462. overlayColor,
  11463. title,
  11464. url
  11465. } = attributes;
  11466. const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor);
  11467. const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
  11468. if (!overlayColorClass) {
  11469. style.backgroundColor = customOverlayColor;
  11470. }
  11471. if (focalPoint && !hasParallax) {
  11472. style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
  11473. }
  11474. const classes = classnames_default()(dimRatioToClass(dimRatio), overlayColorClass, {
  11475. 'has-background-dim': dimRatio !== 0,
  11476. 'has-parallax': hasParallax,
  11477. [`has-${contentAlign}-content`]: contentAlign !== 'center'
  11478. });
  11479. return Object(external_wp_element_["createElement"])("div", {
  11480. className: classes,
  11481. style: style
  11482. }, VIDEO_BACKGROUND_TYPE === backgroundType && url && Object(external_wp_element_["createElement"])("video", {
  11483. className: "wp-block-cover__video-background",
  11484. autoPlay: true,
  11485. muted: true,
  11486. loop: true,
  11487. src: url
  11488. }), !external_wp_blockEditor_["RichText"].isEmpty(title) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  11489. tagName: "p",
  11490. className: "wp-block-cover-text",
  11491. value: title
  11492. }));
  11493. },
  11494. migrate(attributes) {
  11495. return [Object(external_lodash_["omit"])(attributes, ['title', 'contentAlign']), [Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  11496. content: attributes.title,
  11497. align: attributes.contentAlign,
  11498. fontSize: 'large',
  11499. placeholder: Object(external_wp_i18n_["__"])('Write title…')
  11500. })]];
  11501. }
  11502. }, {
  11503. attributes: { ...cover_deprecated_blockAttributes,
  11504. title: {
  11505. type: 'string',
  11506. source: 'html',
  11507. selector: 'p'
  11508. },
  11509. contentAlign: {
  11510. type: 'string',
  11511. default: 'center'
  11512. },
  11513. align: {
  11514. type: 'string'
  11515. }
  11516. },
  11517. supports: {
  11518. className: false
  11519. },
  11520. save({
  11521. attributes
  11522. }) {
  11523. const {
  11524. url,
  11525. title,
  11526. hasParallax,
  11527. dimRatio,
  11528. align,
  11529. contentAlign,
  11530. overlayColor,
  11531. customOverlayColor
  11532. } = attributes;
  11533. const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor);
  11534. const style = backgroundImageStyles(url);
  11535. if (!overlayColorClass) {
  11536. style.backgroundColor = customOverlayColor;
  11537. }
  11538. const classes = classnames_default()('wp-block-cover-image', dimRatioToClass(dimRatio), overlayColorClass, {
  11539. 'has-background-dim': dimRatio !== 0,
  11540. 'has-parallax': hasParallax,
  11541. [`has-${contentAlign}-content`]: contentAlign !== 'center'
  11542. }, align ? `align${align}` : null);
  11543. return Object(external_wp_element_["createElement"])("div", {
  11544. className: classes,
  11545. style: style
  11546. }, !external_wp_blockEditor_["RichText"].isEmpty(title) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  11547. tagName: "p",
  11548. className: "wp-block-cover-image-text",
  11549. value: title
  11550. }));
  11551. },
  11552. migrate(attributes) {
  11553. return [Object(external_lodash_["omit"])(attributes, ['title', 'contentAlign', 'align']), [Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  11554. content: attributes.title,
  11555. align: attributes.contentAlign,
  11556. fontSize: 'large',
  11557. placeholder: Object(external_wp_i18n_["__"])('Write title…')
  11558. })]];
  11559. }
  11560. }, {
  11561. attributes: { ...cover_deprecated_blockAttributes,
  11562. title: {
  11563. type: 'string',
  11564. source: 'html',
  11565. selector: 'h2'
  11566. },
  11567. align: {
  11568. type: 'string'
  11569. },
  11570. contentAlign: {
  11571. type: 'string',
  11572. default: 'center'
  11573. }
  11574. },
  11575. supports: {
  11576. className: false
  11577. },
  11578. save({
  11579. attributes
  11580. }) {
  11581. const {
  11582. url,
  11583. title,
  11584. hasParallax,
  11585. dimRatio,
  11586. align
  11587. } = attributes;
  11588. const style = backgroundImageStyles(url);
  11589. const classes = classnames_default()('wp-block-cover-image', dimRatioToClass(dimRatio), {
  11590. 'has-background-dim': dimRatio !== 0,
  11591. 'has-parallax': hasParallax
  11592. }, align ? `align${align}` : null);
  11593. return Object(external_wp_element_["createElement"])("section", {
  11594. className: classes,
  11595. style: style
  11596. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  11597. tagName: "h2",
  11598. value: title
  11599. }));
  11600. },
  11601. migrate(attributes) {
  11602. return [Object(external_lodash_["omit"])(attributes, ['title', 'contentAlign', 'align']), [Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  11603. content: attributes.title,
  11604. align: attributes.contentAlign,
  11605. fontSize: 'large',
  11606. placeholder: Object(external_wp_i18n_["__"])('Write title…')
  11607. })]];
  11608. }
  11609. }];
  11610. /* harmony default export */ var cover_deprecated = (cover_deprecated_deprecated);
  11611. // EXTERNAL MODULE: ./node_modules/fast-average-color/dist/index.js
  11612. var dist = __webpack_require__("FEKF");
  11613. var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
  11614. // EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
  11615. var tinycolor = __webpack_require__("Zss7");
  11616. var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
  11617. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit.js
  11618. /**
  11619. * External dependencies
  11620. */
  11621. /**
  11622. * WordPress dependencies
  11623. */
  11624. /**
  11625. * Internal dependencies
  11626. */
  11627. /**
  11628. * Module Constants
  11629. */
  11630. const INNER_BLOCKS_TEMPLATE = [['core/paragraph', {
  11631. align: 'center',
  11632. fontSize: 'large',
  11633. placeholder: Object(external_wp_i18n_["__"])('Write title…')
  11634. }]];
  11635. const {
  11636. __Visualizer: BoxControlVisualizer
  11637. } = external_wp_components_["__experimentalBoxControl"];
  11638. function retrieveFastAverageColor() {
  11639. if (!retrieveFastAverageColor.fastAverageColor) {
  11640. retrieveFastAverageColor.fastAverageColor = new dist_default.a();
  11641. }
  11642. return retrieveFastAverageColor.fastAverageColor;
  11643. }
  11644. function CoverHeightInput({
  11645. onChange,
  11646. onUnitChange,
  11647. unit = 'px',
  11648. value = ''
  11649. }) {
  11650. const [temporaryInput, setTemporaryInput] = Object(external_wp_element_["useState"])(null);
  11651. const instanceId = Object(external_wp_compose_["useInstanceId"])(external_wp_blockEditor_["__experimentalUnitControl"]);
  11652. const inputId = `block-cover-height-input-${instanceId}`;
  11653. const isPx = unit === 'px';
  11654. const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
  11655. availableUnits: Object(external_wp_blockEditor_["useSetting"])('spacing.units') || ['px', 'em', 'rem', 'vw', 'vh'],
  11656. defaultValues: {
  11657. px: '430',
  11658. em: '20',
  11659. rem: '20',
  11660. vw: '20',
  11661. vh: '50'
  11662. }
  11663. });
  11664. const handleOnChange = unprocessedValue => {
  11665. const inputValue = unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : undefined;
  11666. if (isNaN(inputValue) && inputValue !== undefined) {
  11667. setTemporaryInput(unprocessedValue);
  11668. return;
  11669. }
  11670. setTemporaryInput(null);
  11671. onChange(inputValue);
  11672. if (inputValue === undefined) {
  11673. onUnitChange();
  11674. }
  11675. };
  11676. const handleOnBlur = () => {
  11677. if (temporaryInput !== null) {
  11678. setTemporaryInput(null);
  11679. }
  11680. };
  11681. const inputValue = temporaryInput !== null ? temporaryInput : value;
  11682. const min = isPx ? COVER_MIN_HEIGHT : 0;
  11683. return Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
  11684. label: Object(external_wp_i18n_["__"])('Minimum height of cover'),
  11685. id: inputId
  11686. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalUnitControl"], {
  11687. id: inputId,
  11688. isResetValueOnUnitChange: true,
  11689. min: min,
  11690. onBlur: handleOnBlur,
  11691. onChange: handleOnChange,
  11692. onUnitChange: onUnitChange,
  11693. step: "1",
  11694. style: {
  11695. maxWidth: 80
  11696. },
  11697. unit: unit,
  11698. units: units,
  11699. value: inputValue
  11700. }));
  11701. }
  11702. const RESIZABLE_BOX_ENABLE_OPTION = {
  11703. top: false,
  11704. right: false,
  11705. bottom: true,
  11706. left: false,
  11707. topRight: false,
  11708. bottomRight: false,
  11709. bottomLeft: false,
  11710. topLeft: false
  11711. };
  11712. function ResizableCover({
  11713. className,
  11714. onResizeStart,
  11715. onResize,
  11716. onResizeStop,
  11717. ...props
  11718. }) {
  11719. const [isResizing, setIsResizing] = Object(external_wp_element_["useState"])(false);
  11720. return Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], Object(esm_extends["a" /* default */])({
  11721. className: classnames_default()(className, {
  11722. 'is-resizing': isResizing
  11723. }),
  11724. enable: RESIZABLE_BOX_ENABLE_OPTION,
  11725. onResizeStart: (_event, _direction, elt) => {
  11726. onResizeStart(elt.clientHeight);
  11727. onResize(elt.clientHeight);
  11728. },
  11729. onResize: (_event, _direction, elt) => {
  11730. onResize(elt.clientHeight);
  11731. if (!isResizing) {
  11732. setIsResizing(true);
  11733. }
  11734. },
  11735. onResizeStop: (_event, _direction, elt) => {
  11736. onResizeStop(elt.clientHeight);
  11737. setIsResizing(false);
  11738. },
  11739. minHeight: COVER_MIN_HEIGHT
  11740. }, props));
  11741. }
  11742. /**
  11743. * useCoverIsDark is a hook that returns a boolean variable specifying if the cover
  11744. * background is dark or not.
  11745. *
  11746. * @param {?string} url Url of the media background.
  11747. * @param {?number} dimRatio Transparency of the overlay color. If an image and
  11748. * color are set, dimRatio is used to decide what is used
  11749. * for background darkness checking purposes.
  11750. * @param {?string} overlayColor String containing the overlay color value if one exists.
  11751. * @param {?Object} elementRef If a media background is set, elementRef should contain a reference to a
  11752. * dom element that renders that media.
  11753. *
  11754. * @return {boolean} True if the cover background is considered "dark" and false otherwise.
  11755. */
  11756. function useCoverIsDark(url, dimRatio = 50, overlayColor, elementRef) {
  11757. const [isDark, setIsDark] = Object(external_wp_element_["useState"])(false);
  11758. Object(external_wp_element_["useEffect"])(() => {
  11759. // If opacity is lower than 50 the dominant color is the image or video color,
  11760. // so use that color for the dark mode computation.
  11761. if (url && dimRatio <= 50 && elementRef.current) {
  11762. retrieveFastAverageColor().getColorAsync(elementRef.current, color => {
  11763. setIsDark(color.isDark);
  11764. });
  11765. }
  11766. }, [url, url && dimRatio <= 50 && elementRef.current, setIsDark]);
  11767. Object(external_wp_element_["useEffect"])(() => {
  11768. // If opacity is greater than 50 the dominant color is the overlay color,
  11769. // so use that color for the dark mode computation.
  11770. if (dimRatio > 50 || !url) {
  11771. if (!overlayColor) {
  11772. // If no overlay color exists the overlay color is black (isDark )
  11773. setIsDark(true);
  11774. return;
  11775. }
  11776. setIsDark(tinycolor_default()(overlayColor).isDark());
  11777. }
  11778. }, [overlayColor, dimRatio > 50 || !url, setIsDark]);
  11779. Object(external_wp_element_["useEffect"])(() => {
  11780. if (!url && !overlayColor) {
  11781. // Reset isDark
  11782. setIsDark(false);
  11783. }
  11784. }, [!url && !overlayColor, setIsDark]);
  11785. return isDark;
  11786. }
  11787. function edit_mediaPosition({
  11788. x,
  11789. y
  11790. }) {
  11791. return `${Math.round(x * 100)}% ${Math.round(y * 100)}%`;
  11792. }
  11793. /**
  11794. * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while
  11795. * the media (image or video) is being uploaded and will not have an id allocated yet.
  11796. *
  11797. * @param {number} id The id of the media.
  11798. * @param {string} url The url of the media.
  11799. *
  11800. * @return {boolean} Is the URL a Blob URL.
  11801. */
  11802. const isTemporaryMedia = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url);
  11803. function CoverPlaceholder({
  11804. disableMediaButtons = false,
  11805. children,
  11806. noticeUI,
  11807. noticeOperations,
  11808. onSelectMedia
  11809. }) {
  11810. const {
  11811. removeAllNotices,
  11812. createErrorNotice
  11813. } = noticeOperations;
  11814. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  11815. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  11816. icon: library_cover
  11817. }),
  11818. labels: {
  11819. title: Object(external_wp_i18n_["__"])('Cover'),
  11820. instructions: Object(external_wp_i18n_["__"])('Upload an image or video file, or pick one from your media library.')
  11821. },
  11822. onSelect: onSelectMedia,
  11823. accept: "image/*,video/*",
  11824. allowedTypes: shared_ALLOWED_MEDIA_TYPES,
  11825. notices: noticeUI,
  11826. disableMediaButtons: disableMediaButtons,
  11827. onError: message => {
  11828. removeAllNotices();
  11829. createErrorNotice(message);
  11830. }
  11831. }, children);
  11832. }
  11833. function CoverEdit({
  11834. attributes,
  11835. clientId,
  11836. isSelected,
  11837. noticeUI,
  11838. noticeOperations,
  11839. overlayColor,
  11840. setAttributes,
  11841. setOverlayColor,
  11842. toggleSelection
  11843. }) {
  11844. var _styleAttribute$spaci, _styleAttribute$visua;
  11845. const {
  11846. contentPosition,
  11847. id,
  11848. backgroundType,
  11849. dimRatio,
  11850. focalPoint,
  11851. hasParallax,
  11852. isRepeated,
  11853. minHeight,
  11854. minHeightUnit,
  11855. style: styleAttribute,
  11856. url
  11857. } = attributes;
  11858. const {
  11859. gradientClass,
  11860. gradientValue,
  11861. setGradient
  11862. } = Object(external_wp_blockEditor_["__experimentalUseGradient"])();
  11863. const onSelectMedia = attributesFromMedia(setAttributes);
  11864. const isUploadingMedia = isTemporaryMedia(id, url);
  11865. const [prevMinHeightValue, setPrevMinHeightValue] = Object(external_wp_element_["useState"])(minHeight);
  11866. const [prevMinHeightUnit, setPrevMinHeightUnit] = Object(external_wp_element_["useState"])(minHeightUnit);
  11867. const isMinFullHeight = minHeightUnit === 'vh' && minHeight === 100;
  11868. const toggleMinFullHeight = () => {
  11869. if (isMinFullHeight) {
  11870. // If there aren't previous values, take the default ones.
  11871. if (prevMinHeightUnit === 'vh' && prevMinHeightValue === 100) {
  11872. return setAttributes({
  11873. minHeight: undefined,
  11874. minHeightUnit: undefined
  11875. });
  11876. } // Set the previous values of height.
  11877. return setAttributes({
  11878. minHeight: prevMinHeightValue,
  11879. minHeightUnit: prevMinHeightUnit
  11880. });
  11881. }
  11882. setPrevMinHeightValue(minHeight);
  11883. setPrevMinHeightUnit(minHeightUnit); // Set full height.
  11884. return setAttributes({
  11885. minHeight: 100,
  11886. minHeightUnit: 'vh'
  11887. });
  11888. };
  11889. const toggleParallax = () => {
  11890. setAttributes({
  11891. hasParallax: !hasParallax,
  11892. ...(!hasParallax ? {
  11893. focalPoint: undefined
  11894. } : {})
  11895. });
  11896. };
  11897. const toggleIsRepeated = () => {
  11898. setAttributes({
  11899. isRepeated: !isRepeated
  11900. });
  11901. };
  11902. const isDarkElement = Object(external_wp_element_["useRef"])();
  11903. const isDark = useCoverIsDark(url, dimRatio, overlayColor.color, isDarkElement);
  11904. const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
  11905. const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
  11906. const [temporaryMinHeight, setTemporaryMinHeight] = Object(external_wp_element_["useState"])(null);
  11907. const minHeightWithUnit = minHeightUnit ? `${minHeight}${minHeightUnit}` : minHeight;
  11908. const isImgElement = !(hasParallax || isRepeated);
  11909. const style = { ...(isImageBackground && !isImgElement ? backgroundImageStyles(url) : {
  11910. backgroundImage: gradientValue ? gradientValue : undefined
  11911. }),
  11912. backgroundColor: overlayColor.color,
  11913. minHeight: temporaryMinHeight || minHeightWithUnit || undefined
  11914. };
  11915. const mediaStyle = {
  11916. objectPosition: focalPoint && isImgElement ? edit_mediaPosition(focalPoint) : undefined
  11917. };
  11918. const hasBackground = !!(url || overlayColor.color || gradientValue);
  11919. const showFocalPointPicker = isVideoBackground || isImageBackground && (!hasParallax || isRepeated);
  11920. const imperativeFocalPointPreview = value => {
  11921. const [styleOfRef, property] = isDarkElement.current ? [isDarkElement.current.style, 'objectPosition'] : [ref.current.style, 'backgroundPosition'];
  11922. styleOfRef[property] = edit_mediaPosition(value);
  11923. };
  11924. const hasInnerBlocks = Object(external_wp_data_["useSelect"])(select => select(external_wp_blockEditor_["store"]).getBlock(clientId).innerBlocks.length > 0, [clientId]);
  11925. const controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  11926. group: "block"
  11927. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockAlignmentMatrixControl"], {
  11928. label: Object(external_wp_i18n_["__"])('Change content position'),
  11929. value: contentPosition,
  11930. onChange: nextPosition => setAttributes({
  11931. contentPosition: nextPosition
  11932. }),
  11933. isDisabled: !hasInnerBlocks
  11934. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockFullHeightAligmentControl"], {
  11935. isActive: isMinFullHeight,
  11936. onToggle: toggleMinFullHeight,
  11937. isDisabled: !hasInnerBlocks
  11938. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  11939. group: "other"
  11940. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  11941. mediaId: id,
  11942. mediaURL: url,
  11943. allowedTypes: shared_ALLOWED_MEDIA_TYPES,
  11944. accept: "image/*,video/*",
  11945. onSelect: onSelectMedia,
  11946. name: !url ? Object(external_wp_i18n_["__"])('Add Media') : Object(external_wp_i18n_["__"])('Replace')
  11947. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, !!url && Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  11948. title: Object(external_wp_i18n_["__"])('Media settings')
  11949. }, isImageBackground && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  11950. label: Object(external_wp_i18n_["__"])('Fixed background'),
  11951. checked: hasParallax,
  11952. onChange: toggleParallax
  11953. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  11954. label: Object(external_wp_i18n_["__"])('Repeated background'),
  11955. checked: isRepeated,
  11956. onChange: toggleIsRepeated
  11957. })), showFocalPointPicker && Object(external_wp_element_["createElement"])(external_wp_components_["FocalPointPicker"], {
  11958. label: Object(external_wp_i18n_["__"])('Focal point picker'),
  11959. url: url,
  11960. value: focalPoint,
  11961. onDragStart: imperativeFocalPointPreview,
  11962. onDrag: imperativeFocalPointPreview,
  11963. onChange: newFocalPoint => setAttributes({
  11964. focalPoint: newFocalPoint
  11965. })
  11966. }), Object(external_wp_element_["createElement"])(external_wp_components_["PanelRow"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  11967. isSecondary: true,
  11968. isSmall: true,
  11969. className: "block-library-cover__reset-button",
  11970. onClick: () => setAttributes({
  11971. url: undefined,
  11972. id: undefined,
  11973. backgroundType: undefined,
  11974. dimRatio: undefined,
  11975. focalPoint: undefined,
  11976. hasParallax: undefined,
  11977. isRepeated: undefined
  11978. })
  11979. }, Object(external_wp_i18n_["__"])('Clear Media')))), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  11980. title: Object(external_wp_i18n_["__"])('Dimensions')
  11981. }, Object(external_wp_element_["createElement"])(CoverHeightInput, {
  11982. value: temporaryMinHeight || minHeight,
  11983. unit: minHeightUnit,
  11984. onChange: newMinHeight => setAttributes({
  11985. minHeight: newMinHeight
  11986. }),
  11987. onUnitChange: nextUnit => setAttributes({
  11988. minHeightUnit: nextUnit
  11989. })
  11990. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPanelColorGradientSettings"], {
  11991. title: Object(external_wp_i18n_["__"])('Overlay'),
  11992. initialOpen: true,
  11993. settings: [{
  11994. colorValue: overlayColor.color,
  11995. gradientValue,
  11996. onColorChange: setOverlayColor,
  11997. onGradientChange: setGradient,
  11998. label: Object(external_wp_i18n_["__"])('Color')
  11999. }]
  12000. }, !!url && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  12001. label: Object(external_wp_i18n_["__"])('Opacity'),
  12002. value: dimRatio,
  12003. onChange: newDimRation => setAttributes({
  12004. dimRatio: newDimRation
  12005. }),
  12006. min: 0,
  12007. max: 100,
  12008. step: 10,
  12009. required: true
  12010. }))));
  12011. const ref = Object(external_wp_element_["useRef"])();
  12012. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  12013. ref
  12014. });
  12015. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({
  12016. className: 'wp-block-cover__inner-container'
  12017. }, {
  12018. template: INNER_BLOCKS_TEMPLATE,
  12019. templateInsertUpdatesSelection: true
  12020. });
  12021. if (!hasInnerBlocks && !hasBackground) {
  12022. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, controls, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, {
  12023. className: classnames_default()('is-placeholder', blockProps.className)
  12024. }), Object(external_wp_element_["createElement"])(CoverPlaceholder, {
  12025. noticeUI: noticeUI,
  12026. onSelectMedia: onSelectMedia,
  12027. noticeOperations: noticeOperations
  12028. }, Object(external_wp_element_["createElement"])("div", {
  12029. className: "wp-block-cover__placeholder-background-options"
  12030. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ColorPalette"], {
  12031. disableCustomColors: true,
  12032. value: overlayColor.color,
  12033. onChange: setOverlayColor,
  12034. clearable: false
  12035. })))));
  12036. }
  12037. const classes = classnames_default()(dimRatioToClass(dimRatio), {
  12038. 'is-dark-theme': isDark,
  12039. 'has-background-dim': dimRatio !== 0,
  12040. 'is-transient': isUploadingMedia,
  12041. 'has-parallax': hasParallax,
  12042. 'is-repeated': isRepeated,
  12043. [overlayColor.class]: overlayColor.class,
  12044. 'has-background-gradient': gradientValue,
  12045. [gradientClass]: !url && gradientClass,
  12046. 'has-custom-content-position': !isContentPositionCenter(contentPosition)
  12047. }, getPositionClassName(contentPosition));
  12048. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, controls, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, {
  12049. className: classnames_default()(classes, blockProps.className),
  12050. style: { ...style,
  12051. ...blockProps.style
  12052. },
  12053. "data-url": url
  12054. }), Object(external_wp_element_["createElement"])(BoxControlVisualizer, {
  12055. values: styleAttribute === null || styleAttribute === void 0 ? void 0 : (_styleAttribute$spaci = styleAttribute.spacing) === null || _styleAttribute$spaci === void 0 ? void 0 : _styleAttribute$spaci.padding,
  12056. showValues: styleAttribute === null || styleAttribute === void 0 ? void 0 : (_styleAttribute$visua = styleAttribute.visualizers) === null || _styleAttribute$visua === void 0 ? void 0 : _styleAttribute$visua.padding
  12057. }), Object(external_wp_element_["createElement"])(ResizableCover, {
  12058. className: "block-library-cover__resize-container",
  12059. onResizeStart: () => {
  12060. setAttributes({
  12061. minHeightUnit: 'px'
  12062. });
  12063. toggleSelection(false);
  12064. },
  12065. onResize: setTemporaryMinHeight,
  12066. onResizeStop: newMinHeight => {
  12067. toggleSelection(true);
  12068. setAttributes({
  12069. minHeight: newMinHeight
  12070. });
  12071. setTemporaryMinHeight(null);
  12072. },
  12073. showHandle: isSelected
  12074. }), url && gradientValue && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", {
  12075. "aria-hidden": "true",
  12076. className: classnames_default()('wp-block-cover__gradient-background', gradientClass),
  12077. style: {
  12078. backgroundImage: gradientValue
  12079. }
  12080. }), url && isImageBackground && isImgElement && Object(external_wp_element_["createElement"])("img", {
  12081. ref: isDarkElement,
  12082. className: "wp-block-cover__image-background",
  12083. alt: "",
  12084. src: url,
  12085. style: mediaStyle
  12086. }), url && isVideoBackground && Object(external_wp_element_["createElement"])("video", {
  12087. ref: isDarkElement,
  12088. className: "wp-block-cover__video-background",
  12089. autoPlay: true,
  12090. muted: true,
  12091. loop: true,
  12092. src: url,
  12093. style: mediaStyle
  12094. }), isUploadingMedia && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), Object(external_wp_element_["createElement"])(CoverPlaceholder, {
  12095. disableMediaButtons: true,
  12096. noticeUI: noticeUI,
  12097. onSelectMedia: onSelectMedia,
  12098. noticeOperations: noticeOperations
  12099. }), Object(external_wp_element_["createElement"])("div", innerBlocksProps)));
  12100. }
  12101. /* harmony default export */ var cover_edit = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withDispatch"])(dispatch => {
  12102. const {
  12103. toggleSelection
  12104. } = dispatch(external_wp_blockEditor_["store"]);
  12105. return {
  12106. toggleSelection
  12107. };
  12108. }), Object(external_wp_blockEditor_["withColors"])({
  12109. overlayColor: 'background-color'
  12110. }), external_wp_components_["withNotices"], external_wp_compose_["withInstanceId"]])(CoverEdit));
  12111. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/save.js
  12112. /**
  12113. * External dependencies
  12114. */
  12115. /**
  12116. * WordPress dependencies
  12117. */
  12118. /**
  12119. * Internal dependencies
  12120. */
  12121. function cover_save_save({
  12122. attributes
  12123. }) {
  12124. const {
  12125. backgroundType,
  12126. gradient,
  12127. contentPosition,
  12128. customGradient,
  12129. customOverlayColor,
  12130. dimRatio,
  12131. focalPoint,
  12132. hasParallax,
  12133. isRepeated,
  12134. overlayColor,
  12135. url,
  12136. id,
  12137. minHeight: minHeightProp,
  12138. minHeightUnit
  12139. } = attributes;
  12140. const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor);
  12141. const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient);
  12142. const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
  12143. const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
  12144. const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
  12145. const isImgElement = !(hasParallax || isRepeated);
  12146. const style = { ...(isImageBackground && !isImgElement ? backgroundImageStyles(url) : {}),
  12147. backgroundColor: !overlayColorClass ? customOverlayColor : undefined,
  12148. background: customGradient && !url ? customGradient : undefined,
  12149. minHeight: minHeight || undefined
  12150. };
  12151. const objectPosition = // prettier-ignore
  12152. focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined;
  12153. const classes = classnames_default()(dimRatioToClass(dimRatio), overlayColorClass, {
  12154. 'has-background-dim': dimRatio !== 0,
  12155. 'has-parallax': hasParallax,
  12156. 'is-repeated': isRepeated,
  12157. 'has-background-gradient': gradient || customGradient,
  12158. [gradientClass]: !url && gradientClass,
  12159. 'has-custom-content-position': !isContentPositionCenter(contentPosition)
  12160. }, getPositionClassName(contentPosition));
  12161. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  12162. className: classes,
  12163. style
  12164. }), url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", {
  12165. "aria-hidden": "true",
  12166. className: classnames_default()('wp-block-cover__gradient-background', gradientClass),
  12167. style: customGradient ? {
  12168. background: customGradient
  12169. } : undefined
  12170. }), isImageBackground && isImgElement && url && Object(external_wp_element_["createElement"])("img", {
  12171. className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null),
  12172. alt: "",
  12173. src: url,
  12174. style: {
  12175. objectPosition
  12176. },
  12177. "data-object-fit": "cover",
  12178. "data-object-position": objectPosition
  12179. }), isVideoBackground && url && Object(external_wp_element_["createElement"])("video", {
  12180. className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'),
  12181. autoPlay: true,
  12182. muted: true,
  12183. loop: true,
  12184. playsInline: true,
  12185. src: url,
  12186. style: {
  12187. objectPosition
  12188. },
  12189. "data-object-fit": "cover",
  12190. "data-object-position": objectPosition
  12191. }), Object(external_wp_element_["createElement"])("div", {
  12192. className: "wp-block-cover__inner-container"
  12193. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  12194. }
  12195. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/transforms.js
  12196. /**
  12197. * WordPress dependencies
  12198. */
  12199. /**
  12200. * Internal dependencies
  12201. */
  12202. const cover_transforms_transforms = {
  12203. from: [{
  12204. type: 'block',
  12205. blocks: ['core/image'],
  12206. transform: ({
  12207. caption,
  12208. url,
  12209. align,
  12210. id,
  12211. anchor,
  12212. style
  12213. }) => {
  12214. var _style$color;
  12215. return Object(external_wp_blocks_["createBlock"])('core/cover', {
  12216. url,
  12217. align,
  12218. id,
  12219. anchor,
  12220. style: {
  12221. color: {
  12222. duotone: style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.duotone
  12223. }
  12224. }
  12225. }, [Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  12226. content: caption,
  12227. fontSize: 'large'
  12228. })]);
  12229. }
  12230. }, {
  12231. type: 'block',
  12232. blocks: ['core/video'],
  12233. transform: ({
  12234. caption,
  12235. src,
  12236. align,
  12237. id,
  12238. anchor
  12239. }) => Object(external_wp_blocks_["createBlock"])('core/cover', {
  12240. url: src,
  12241. align,
  12242. id,
  12243. backgroundType: VIDEO_BACKGROUND_TYPE,
  12244. anchor
  12245. }, [Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  12246. content: caption,
  12247. fontSize: 'large'
  12248. })])
  12249. }, {
  12250. type: 'block',
  12251. blocks: ['core/group'],
  12252. isMatch: ({
  12253. backgroundColor,
  12254. gradient,
  12255. style
  12256. }) => {
  12257. var _style$color2, _style$color3;
  12258. /*
  12259. * Make this transformation available only if the Group has background
  12260. * or gradient set, because otherwise `Cover` block displays a Placeholder.
  12261. *
  12262. * This helps avoid arbitrary decisions about the Cover block's background
  12263. * and user confusion about the existence of previous content.
  12264. */
  12265. return backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.background) || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.gradient) || gradient;
  12266. },
  12267. transform: ({
  12268. align,
  12269. anchor,
  12270. backgroundColor,
  12271. gradient,
  12272. style
  12273. }, innerBlocks) => {
  12274. var _style$color4, _style$color5;
  12275. return Object(external_wp_blocks_["createBlock"])('core/cover', {
  12276. align,
  12277. anchor,
  12278. overlayColor: backgroundColor,
  12279. customOverlayColor: style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.background,
  12280. gradient,
  12281. customGradient: style === null || style === void 0 ? void 0 : (_style$color5 = style.color) === null || _style$color5 === void 0 ? void 0 : _style$color5.gradient
  12282. }, innerBlocks);
  12283. }
  12284. }],
  12285. to: [{
  12286. type: 'block',
  12287. blocks: ['core/image'],
  12288. isMatch: ({
  12289. backgroundType,
  12290. url,
  12291. overlayColor,
  12292. customOverlayColor,
  12293. gradient,
  12294. customGradient
  12295. }) => {
  12296. if (url) {
  12297. // If a url exists the transform could happen if that URL represents an image background.
  12298. return backgroundType === IMAGE_BACKGROUND_TYPE;
  12299. } // If a url is not set the transform could happen if the cover has no background color or gradient;
  12300. return !overlayColor && !customOverlayColor && !gradient && !customGradient;
  12301. },
  12302. transform: ({
  12303. title,
  12304. url,
  12305. align,
  12306. id,
  12307. anchor,
  12308. style
  12309. }) => {
  12310. var _style$color6;
  12311. return Object(external_wp_blocks_["createBlock"])('core/image', {
  12312. caption: title,
  12313. url,
  12314. align,
  12315. id,
  12316. anchor,
  12317. style: {
  12318. color: {
  12319. duotone: style === null || style === void 0 ? void 0 : (_style$color6 = style.color) === null || _style$color6 === void 0 ? void 0 : _style$color6.duotone
  12320. }
  12321. }
  12322. });
  12323. }
  12324. }, {
  12325. type: 'block',
  12326. blocks: ['core/video'],
  12327. isMatch: ({
  12328. backgroundType,
  12329. url,
  12330. overlayColor,
  12331. customOverlayColor,
  12332. gradient,
  12333. customGradient
  12334. }) => {
  12335. if (url) {
  12336. // If a url exists the transform could happen if that URL represents a video background.
  12337. return backgroundType === VIDEO_BACKGROUND_TYPE;
  12338. } // If a url is not set the transform could happen if the cover has no background color or gradient;
  12339. return !overlayColor && !customOverlayColor && !gradient && !customGradient;
  12340. },
  12341. transform: ({
  12342. title,
  12343. url,
  12344. align,
  12345. id,
  12346. anchor
  12347. }) => Object(external_wp_blocks_["createBlock"])('core/video', {
  12348. caption: title,
  12349. src: url,
  12350. id,
  12351. align,
  12352. anchor
  12353. })
  12354. }]
  12355. };
  12356. /* harmony default export */ var cover_transforms = (cover_transforms_transforms);
  12357. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/index.js
  12358. /**
  12359. * WordPress dependencies
  12360. */
  12361. /**
  12362. * Internal dependencies
  12363. */
  12364. const cover_metadata = {
  12365. apiVersion: 2,
  12366. name: "core/cover",
  12367. title: "Cover",
  12368. category: "media",
  12369. description: "Add an image or video with a text overlay \u2014 great for headers.",
  12370. textdomain: "default",
  12371. attributes: {
  12372. url: {
  12373. type: "string"
  12374. },
  12375. id: {
  12376. type: "number"
  12377. },
  12378. hasParallax: {
  12379. type: "boolean",
  12380. "default": false
  12381. },
  12382. isRepeated: {
  12383. type: "boolean",
  12384. "default": false
  12385. },
  12386. dimRatio: {
  12387. type: "number",
  12388. "default": 50
  12389. },
  12390. overlayColor: {
  12391. type: "string"
  12392. },
  12393. customOverlayColor: {
  12394. type: "string"
  12395. },
  12396. backgroundType: {
  12397. type: "string",
  12398. "default": "image"
  12399. },
  12400. focalPoint: {
  12401. type: "object"
  12402. },
  12403. minHeight: {
  12404. type: "number"
  12405. },
  12406. minHeightUnit: {
  12407. type: "string"
  12408. },
  12409. gradient: {
  12410. type: "string"
  12411. },
  12412. customGradient: {
  12413. type: "string"
  12414. },
  12415. contentPosition: {
  12416. type: "string"
  12417. }
  12418. },
  12419. supports: {
  12420. anchor: true,
  12421. align: true,
  12422. html: false,
  12423. spacing: {
  12424. padding: true
  12425. },
  12426. color: {
  12427. __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
  12428. text: false,
  12429. background: false
  12430. }
  12431. },
  12432. editorStyle: "wp-block-cover-editor",
  12433. style: "wp-block-cover"
  12434. };
  12435. const {
  12436. name: cover_name
  12437. } = cover_metadata;
  12438. const cover_settings = {
  12439. icon: library_cover,
  12440. example: {
  12441. attributes: {
  12442. customOverlayColor: '#065174',
  12443. dimRatio: 40,
  12444. url: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg'
  12445. },
  12446. innerBlocks: [{
  12447. name: 'core/paragraph',
  12448. attributes: {
  12449. customFontSize: 48,
  12450. content: Object(external_wp_i18n_["__"])('<strong>Snow Patrol</strong>'),
  12451. align: 'center'
  12452. }
  12453. }]
  12454. },
  12455. transforms: cover_transforms,
  12456. save: cover_save_save,
  12457. edit: cover_edit,
  12458. deprecated: cover_deprecated
  12459. };
  12460. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-controls.js
  12461. /**
  12462. * WordPress dependencies
  12463. */
  12464. const EmbedControls = ({
  12465. blockSupportsResponsive,
  12466. showEditButton,
  12467. themeSupportsResponsive,
  12468. allowResponsive,
  12469. getResponsiveHelp,
  12470. toggleResponsive,
  12471. switchBackToURLInput
  12472. }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, showEditButton && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  12473. className: "components-toolbar__control",
  12474. label: Object(external_wp_i18n_["__"])('Edit URL'),
  12475. icon: library_edit["a" /* default */],
  12476. onClick: switchBackToURLInput
  12477. }))), themeSupportsResponsive && blockSupportsResponsive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  12478. title: Object(external_wp_i18n_["__"])('Media settings'),
  12479. className: "blocks-responsive"
  12480. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  12481. label: Object(external_wp_i18n_["__"])('Resize for smaller devices'),
  12482. checked: allowResponsive,
  12483. help: getResponsiveHelp,
  12484. onChange: toggleResponsive
  12485. }))));
  12486. /* harmony default export */ var embed_controls = (EmbedControls);
  12487. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/icons.js
  12488. /**
  12489. * WordPress dependencies
  12490. */
  12491. const embedContentIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12492. viewBox: "0 0 24 24",
  12493. xmlns: "http://www.w3.org/2000/svg"
  12494. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12495. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"
  12496. }));
  12497. const embedAudioIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12498. viewBox: "0 0 24 24",
  12499. xmlns: "http://www.w3.org/2000/svg"
  12500. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12501. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"
  12502. }));
  12503. const embedPhotoIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12504. viewBox: "0 0 24 24",
  12505. xmlns: "http://www.w3.org/2000/svg"
  12506. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12507. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"
  12508. }));
  12509. const embedVideoIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12510. viewBox: "0 0 24 24",
  12511. xmlns: "http://www.w3.org/2000/svg"
  12512. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12513. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"
  12514. }));
  12515. const embedTwitterIcon = {
  12516. foreground: '#1da1f2',
  12517. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12518. xmlns: "http://www.w3.org/2000/svg",
  12519. viewBox: "0 0 24 24"
  12520. }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12521. d: "M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"
  12522. })))
  12523. };
  12524. const embedYouTubeIcon = {
  12525. foreground: '#ff0000',
  12526. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12527. viewBox: "0 0 24 24"
  12528. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12529. d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"
  12530. }))
  12531. };
  12532. const embedFacebookIcon = {
  12533. foreground: '#3b5998',
  12534. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12535. viewBox: "0 0 24 24"
  12536. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12537. d: "M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"
  12538. }))
  12539. };
  12540. const embedInstagramIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12541. viewBox: "0 0 24 24"
  12542. }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12543. d: "M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"
  12544. })));
  12545. const embedWordPressIcon = {
  12546. foreground: '#0073AA',
  12547. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12548. viewBox: "0 0 24 24"
  12549. }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12550. d: "M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"
  12551. })))
  12552. };
  12553. const embedSpotifyIcon = {
  12554. foreground: '#1db954',
  12555. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12556. viewBox: "0 0 24 24"
  12557. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12558. d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"
  12559. }))
  12560. };
  12561. const embedFlickrIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12562. viewBox: "0 0 24 24"
  12563. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12564. d: "m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"
  12565. }));
  12566. const embedVimeoIcon = {
  12567. foreground: '#1ab7ea',
  12568. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12569. xmlns: "http://www.w3.org/2000/svg",
  12570. viewBox: "0 0 24 24"
  12571. }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12572. d: "M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"
  12573. })))
  12574. };
  12575. const embedRedditIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12576. viewBox: "0 0 24 24"
  12577. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12578. d: "M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"
  12579. }));
  12580. const embedTumblrIcon = {
  12581. foreground: '#35465c',
  12582. src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12583. viewBox: "0 0 24 24"
  12584. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12585. d: "M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"
  12586. }))
  12587. };
  12588. const embedAmazonIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12589. viewBox: "0 0 24 24"
  12590. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12591. d: "M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"
  12592. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12593. d: "M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"
  12594. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12595. d: "M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"
  12596. }));
  12597. const embedAnimotoIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12598. viewBox: "0 0 24 24"
  12599. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12600. d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",
  12601. fill: "#4bc7ee"
  12602. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12603. d: "m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",
  12604. fill: "#d4cdcb"
  12605. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12606. d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
  12607. fill: "#c3d82e"
  12608. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12609. d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",
  12610. fill: "#e4ecb0"
  12611. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12612. d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z",
  12613. fill: "#209dbd"
  12614. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12615. d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",
  12616. fill: "#7cb3c9"
  12617. }));
  12618. const embedDailymotionIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  12619. viewBox: "0 0 24 24"
  12620. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  12621. d: "m12.1479 18.5957c-2.4949 0-4.28131-1.7558-4.28131-4.0658 0-2.2176 1.78641-4.0965 4.09651-4.0965 2.2793 0 4.0349 1.7864 4.0349 4.1581 0 2.2794-1.7556 4.0042-3.8501 4.0042zm8.3521-18.5957-4.5329 1v7c-1.1088-1.41691-2.8028-1.8787-4.8049-1.8787-2.09443 0-3.97329.76993-5.5133 2.27917-1.72483 1.66323-2.6489 3.78863-2.6489 6.16033 0 2.5873.98562 4.8049 2.89526 6.499 1.44763 1.2936 3.17251 1.9402 5.17454 1.9402 1.9713 0 3.4498-.5236 4.8973-1.9402v1.9402h4.5329c0-7.6359 0-15.3641 0-23z",
  12622. fill: "#333436"
  12623. }));
  12624. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-loading.js
  12625. /**
  12626. * WordPress dependencies
  12627. */
  12628. const EmbedLoading = () => Object(external_wp_element_["createElement"])("div", {
  12629. className: "wp-block-embed is-loading"
  12630. }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Embedding…')));
  12631. /* harmony default export */ var embed_loading = (EmbedLoading);
  12632. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-placeholder.js
  12633. /**
  12634. * WordPress dependencies
  12635. */
  12636. const EmbedPlaceholder = ({
  12637. icon,
  12638. label,
  12639. value,
  12640. onSubmit,
  12641. onChange,
  12642. cannotEmbed,
  12643. fallback,
  12644. tryAgain
  12645. }) => {
  12646. return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  12647. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  12648. icon: icon,
  12649. showColors: true
  12650. }),
  12651. label: label,
  12652. className: "wp-block-embed",
  12653. instructions: Object(external_wp_i18n_["__"])('Paste a link to the content you want to display on your site.')
  12654. }, Object(external_wp_element_["createElement"])("form", {
  12655. onSubmit: onSubmit
  12656. }, Object(external_wp_element_["createElement"])("input", {
  12657. type: "url",
  12658. value: value || '',
  12659. className: "components-placeholder__input",
  12660. "aria-label": label,
  12661. placeholder: Object(external_wp_i18n_["__"])('Enter URL to embed here…'),
  12662. onChange: onChange
  12663. }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  12664. isPrimary: true,
  12665. type: "submit"
  12666. }, Object(external_wp_i18n_["_x"])('Embed', 'button label'))), Object(external_wp_element_["createElement"])("div", {
  12667. className: "components-placeholder__learn-more"
  12668. }, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
  12669. href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/embeds/')
  12670. }, Object(external_wp_i18n_["__"])('Learn more about embeds'))), cannotEmbed && Object(external_wp_element_["createElement"])("div", {
  12671. className: "components-placeholder__error"
  12672. }, Object(external_wp_element_["createElement"])("div", {
  12673. className: "components-placeholder__instructions"
  12674. }, Object(external_wp_i18n_["__"])('Sorry, this content could not be embedded.')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  12675. isSecondary: true,
  12676. onClick: tryAgain
  12677. }, Object(external_wp_i18n_["_x"])('Try again', 'button label')), ' ', Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  12678. isSecondary: true,
  12679. onClick: fallback
  12680. }, Object(external_wp_i18n_["_x"])('Convert to link', 'button label'))));
  12681. };
  12682. /* harmony default export */ var embed_placeholder = (EmbedPlaceholder);
  12683. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/wp-embed-preview.js
  12684. /**
  12685. * WordPress dependencies
  12686. */
  12687. /** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */
  12688. function WpEmbedPreview({
  12689. html
  12690. }) {
  12691. const ref = Object(external_wp_element_["useRef"])();
  12692. Object(external_wp_element_["useEffect"])(() => {
  12693. const {
  12694. ownerDocument
  12695. } = ref.current;
  12696. const {
  12697. defaultView
  12698. } = ownerDocument;
  12699. /**
  12700. * Checks for WordPress embed events signaling the height change when iframe
  12701. * content loads or iframe's window is resized. The event is sent from
  12702. * WordPress core via the window.postMessage API.
  12703. *
  12704. * References:
  12705. * window.postMessage: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
  12706. * WordPress core embed-template on load: https://github.com/WordPress/WordPress/blob/HEAD/wp-includes/js/wp-embed-template.js#L143
  12707. * WordPress core embed-template on resize: https://github.com/WordPress/WordPress/blob/HEAD/wp-includes/js/wp-embed-template.js#L187
  12708. *
  12709. * @param {WPSyntheticEvent} event Message event.
  12710. */
  12711. function resizeWPembeds({
  12712. data: {
  12713. secret,
  12714. message,
  12715. value
  12716. } = {}
  12717. }) {
  12718. if ([secret, message, value].some(attribute => !attribute) || message !== 'height') {
  12719. return;
  12720. }
  12721. ownerDocument.querySelectorAll(`iframe[data-secret="${secret}"`).forEach(iframe => {
  12722. if (+iframe.height !== value) {
  12723. iframe.height = value;
  12724. }
  12725. });
  12726. }
  12727. /**
  12728. * Checks whether the wp embed iframe is the activeElement,
  12729. * if it is dispatch a focus event.
  12730. */
  12731. function checkFocus() {
  12732. const {
  12733. activeElement
  12734. } = ownerDocument;
  12735. if (activeElement.tagName !== 'IFRAME' || activeElement.parentNode !== ref.current) {
  12736. return;
  12737. }
  12738. activeElement.focus();
  12739. }
  12740. defaultView.addEventListener('message', resizeWPembeds);
  12741. defaultView.addEventListener('blur', checkFocus);
  12742. return () => {
  12743. defaultView.removeEventListener('message', resizeWPembeds);
  12744. defaultView.removeEventListener('blur', checkFocus);
  12745. };
  12746. }, []);
  12747. const __html = Object(external_wp_element_["useMemo"])(() => {
  12748. const doc = new window.DOMParser().parseFromString(html, 'text/html');
  12749. const iframe = doc.querySelector('iframe');
  12750. if (iframe) {
  12751. iframe.removeAttribute('style');
  12752. }
  12753. const blockQuote = doc.querySelector('blockquote');
  12754. if (blockQuote) {
  12755. blockQuote.style.display = 'none';
  12756. }
  12757. return doc.body.innerHTML;
  12758. }, [html]);
  12759. return Object(external_wp_element_["createElement"])("div", {
  12760. ref: ref,
  12761. className: "wp-block-embed__wrapper",
  12762. dangerouslySetInnerHTML: {
  12763. __html
  12764. }
  12765. });
  12766. }
  12767. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-preview.js
  12768. /**
  12769. * Internal dependencies
  12770. */
  12771. /**
  12772. * External dependencies
  12773. */
  12774. /**
  12775. * WordPress dependencies
  12776. */
  12777. /**
  12778. * Internal dependencies
  12779. */
  12780. class embed_preview_EmbedPreview extends external_wp_element_["Component"] {
  12781. constructor() {
  12782. super(...arguments);
  12783. this.hideOverlay = this.hideOverlay.bind(this);
  12784. this.state = {
  12785. interactive: false
  12786. };
  12787. }
  12788. static getDerivedStateFromProps(nextProps, state) {
  12789. if (!nextProps.isSelected && state.interactive) {
  12790. // We only want to change this when the block is not selected, because changing it when
  12791. // the block becomes selected makes the overlap disappear too early. Hiding the overlay
  12792. // happens on mouseup when the overlay is clicked.
  12793. return {
  12794. interactive: false
  12795. };
  12796. }
  12797. return null;
  12798. }
  12799. hideOverlay() {
  12800. // This is called onMouseUp on the overlay. We can't respond to the `isSelected` prop
  12801. // changing, because that happens on mouse down, and the overlay immediately disappears,
  12802. // and the mouse event can end up in the preview content. We can't use onClick on
  12803. // the overlay to hide it either, because then the editor misses the mouseup event, and
  12804. // thinks we're multi-selecting blocks.
  12805. this.setState({
  12806. interactive: true
  12807. });
  12808. }
  12809. render() {
  12810. const {
  12811. preview,
  12812. previewable,
  12813. url,
  12814. type,
  12815. caption,
  12816. onCaptionChange,
  12817. isSelected,
  12818. className,
  12819. icon,
  12820. label,
  12821. insertBlocksAfter
  12822. } = this.props;
  12823. const {
  12824. scripts
  12825. } = preview;
  12826. const {
  12827. interactive
  12828. } = this.state;
  12829. const html = 'photo' === type ? getPhotoHtml(preview) : preview.html;
  12830. const parsedHost = new URL(url).host.split('.');
  12831. const parsedHostBaseUrl = parsedHost.splice(parsedHost.length - 2, parsedHost.length - 1).join('.');
  12832. const iframeTitle = Object(external_wp_i18n_["sprintf"])( // translators: %s: host providing embed content e.g: www.youtube.com
  12833. Object(external_wp_i18n_["__"])('Embedded content from %s'), parsedHostBaseUrl);
  12834. const sandboxClassnames = dedupe_default()(type, className, 'wp-block-embed__wrapper'); // Disabled because the overlay div doesn't actually have a role or functionality
  12835. // as far as the user is concerned. We're just catching the first click so that
  12836. // the block can be selected without interacting with the embed preview that the overlay covers.
  12837. /* eslint-disable jsx-a11y/no-static-element-interactions */
  12838. const embedWrapper = 'wp-embed' === type ? Object(external_wp_element_["createElement"])(WpEmbedPreview, {
  12839. html: html
  12840. }) : Object(external_wp_element_["createElement"])("div", {
  12841. className: "wp-block-embed__wrapper"
  12842. }, Object(external_wp_element_["createElement"])(external_wp_components_["SandBox"], {
  12843. html: html,
  12844. scripts: scripts,
  12845. title: iframeTitle,
  12846. type: sandboxClassnames,
  12847. onFocus: this.hideOverlay
  12848. }), !interactive && Object(external_wp_element_["createElement"])("div", {
  12849. className: "block-library-embed__interactive-overlay",
  12850. onMouseUp: this.hideOverlay
  12851. }));
  12852. /* eslint-enable jsx-a11y/no-static-element-interactions */
  12853. return Object(external_wp_element_["createElement"])("figure", {
  12854. className: dedupe_default()(className, 'wp-block-embed', {
  12855. 'is-type-video': 'video' === type
  12856. })
  12857. }, previewable ? embedWrapper : Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  12858. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  12859. icon: icon,
  12860. showColors: true
  12861. }),
  12862. label: label
  12863. }, Object(external_wp_element_["createElement"])("p", {
  12864. className: "components-placeholder__error"
  12865. }, Object(external_wp_element_["createElement"])("a", {
  12866. href: url
  12867. }, url)), Object(external_wp_element_["createElement"])("p", {
  12868. className: "components-placeholder__error"
  12869. }, Object(external_wp_i18n_["sprintf"])(
  12870. /* translators: %s: host providing embed content e.g: www.youtube.com */
  12871. Object(external_wp_i18n_["__"])("Embedded content from %s can't be previewed in the editor."), parsedHostBaseUrl))), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  12872. tagName: "figcaption",
  12873. placeholder: Object(external_wp_i18n_["__"])('Add caption'),
  12874. value: caption,
  12875. onChange: onCaptionChange,
  12876. inlineToolbar: true,
  12877. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  12878. }));
  12879. }
  12880. }
  12881. /* harmony default export */ var embed_preview = (embed_preview_EmbedPreview);
  12882. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/edit.js
  12883. /**
  12884. * Internal dependencies
  12885. */
  12886. /**
  12887. * External dependencies
  12888. */
  12889. /**
  12890. * WordPress dependencies
  12891. */
  12892. function edit_getResponsiveHelp(checked) {
  12893. return checked ? Object(external_wp_i18n_["__"])('This embed will preserve its aspect ratio when the browser is resized.') : Object(external_wp_i18n_["__"])('This embed may not preserve its aspect ratio when the browser is resized.');
  12894. }
  12895. const EmbedEdit = props => {
  12896. const {
  12897. attributes: {
  12898. providerNameSlug,
  12899. previewable,
  12900. responsive,
  12901. url: attributesUrl
  12902. },
  12903. attributes,
  12904. isSelected,
  12905. onReplace,
  12906. setAttributes,
  12907. insertBlocksAfter,
  12908. onFocus
  12909. } = props;
  12910. const defaultEmbedInfo = {
  12911. title: Object(external_wp_i18n_["_x"])('Embed', 'block title'),
  12912. icon: embedContentIcon
  12913. };
  12914. const {
  12915. icon,
  12916. title
  12917. } = getEmbedInfoByProvider(providerNameSlug) || defaultEmbedInfo;
  12918. const [url, setURL] = Object(external_wp_element_["useState"])(attributesUrl);
  12919. const [isEditingURL, setIsEditingURL] = Object(external_wp_element_["useState"])(false);
  12920. const {
  12921. invalidateResolution
  12922. } = Object(external_wp_data_["useDispatch"])('core/data');
  12923. const {
  12924. preview,
  12925. fetching,
  12926. themeSupportsResponsive,
  12927. cannotEmbed
  12928. } = Object(external_wp_data_["useSelect"])(select => {
  12929. var _embedPreview$data;
  12930. const {
  12931. getEmbedPreview,
  12932. isPreviewEmbedFallback,
  12933. isRequestingEmbedPreview,
  12934. getThemeSupports
  12935. } = select(external_wp_coreData_["store"]);
  12936. if (!attributesUrl) {
  12937. return {
  12938. fetching: false,
  12939. cannotEmbed: false
  12940. };
  12941. }
  12942. const embedPreview = getEmbedPreview(attributesUrl);
  12943. const previewIsFallback = isPreviewEmbedFallback(attributesUrl); // The external oEmbed provider does not exist. We got no type info and no html.
  12944. const badEmbedProvider = (embedPreview === null || embedPreview === void 0 ? void 0 : embedPreview.html) === false && (embedPreview === null || embedPreview === void 0 ? void 0 : embedPreview.type) === undefined; // Some WordPress URLs that can't be embedded will cause the API to return
  12945. // a valid JSON response with no HTML and `data.status` set to 404, rather
  12946. // than generating a fallback response as other embeds do.
  12947. const wordpressCantEmbed = (embedPreview === null || embedPreview === void 0 ? void 0 : (_embedPreview$data = embedPreview.data) === null || _embedPreview$data === void 0 ? void 0 : _embedPreview$data.status) === 404;
  12948. const validPreview = !!embedPreview && !badEmbedProvider && !wordpressCantEmbed;
  12949. return {
  12950. preview: validPreview ? embedPreview : undefined,
  12951. fetching: isRequestingEmbedPreview(attributesUrl),
  12952. themeSupportsResponsive: getThemeSupports()['responsive-embeds'],
  12953. cannotEmbed: !validPreview || previewIsFallback
  12954. };
  12955. }, [attributesUrl]);
  12956. /**
  12957. * @return {Object} Attributes derived from the preview, merged with the current attributes.
  12958. */
  12959. const getMergedAttributes = () => {
  12960. const {
  12961. allowResponsive,
  12962. className
  12963. } = attributes;
  12964. return { ...attributes,
  12965. ...getAttributesFromPreview(preview, title, className, responsive, allowResponsive)
  12966. };
  12967. };
  12968. const toggleResponsive = () => {
  12969. const {
  12970. allowResponsive,
  12971. className
  12972. } = attributes;
  12973. const {
  12974. html
  12975. } = preview;
  12976. const newAllowResponsive = !allowResponsive;
  12977. setAttributes({
  12978. allowResponsive: newAllowResponsive,
  12979. className: getClassNames(html, className, responsive && newAllowResponsive)
  12980. });
  12981. };
  12982. Object(external_wp_element_["useEffect"])(() => {
  12983. if (!(preview !== null && preview !== void 0 && preview.html) || !cannotEmbed || fetching) {
  12984. return;
  12985. } // At this stage, we're not fetching the preview and know it can't be embedded,
  12986. // so try removing any trailing slash, and resubmit.
  12987. const newURL = attributesUrl.replace(/\/$/, '');
  12988. setURL(newURL);
  12989. setIsEditingURL(false);
  12990. setAttributes({
  12991. url: newURL
  12992. });
  12993. }, [preview === null || preview === void 0 ? void 0 : preview.html, attributesUrl]); // Handle incoming preview
  12994. Object(external_wp_element_["useEffect"])(() => {
  12995. if (preview && !isEditingURL) {
  12996. // Even though we set attributes that get derived from the preview,
  12997. // we don't access them directly because for the initial render,
  12998. // the `setAttributes` call will not have taken effect. If we're
  12999. // rendering responsive content, setting the responsive classes
  13000. // after the preview has been rendered can result in unwanted
  13001. // clipping or scrollbars. The `getAttributesFromPreview` function
  13002. // that `getMergedAttributes` uses is memoized so that we're not
  13003. // calculating them on every render.
  13004. setAttributes(getMergedAttributes());
  13005. if (onReplace) {
  13006. const upgradedBlock = createUpgradedEmbedBlock(props, getMergedAttributes());
  13007. if (upgradedBlock) {
  13008. onReplace(upgradedBlock);
  13009. }
  13010. }
  13011. }
  13012. }, [preview, isEditingURL]);
  13013. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  13014. if (fetching) {
  13015. return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, Object(external_wp_element_["createElement"])(embed_loading, null));
  13016. }
  13017. const label = external_wp_element_["Platform"].select({
  13018. // translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists
  13019. web: Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('%s URL'), title),
  13020. native: title
  13021. }); // No preview, or we can't embed the current URL, or we've clicked the edit button.
  13022. const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL;
  13023. if (showEmbedPlaceholder) {
  13024. return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, Object(external_wp_element_["createElement"])(embed_placeholder, {
  13025. icon: icon,
  13026. label: label,
  13027. onFocus: onFocus,
  13028. onSubmit: event => {
  13029. if (event) {
  13030. event.preventDefault();
  13031. }
  13032. setIsEditingURL(false);
  13033. setAttributes({
  13034. url
  13035. });
  13036. },
  13037. value: url,
  13038. cannotEmbed: cannotEmbed,
  13039. onChange: event => setURL(event.target.value),
  13040. fallback: () => util_fallback(url, onReplace),
  13041. tryAgain: () => {
  13042. invalidateResolution('core', 'getEmbedPreview', [url]);
  13043. }
  13044. }));
  13045. } // Even though we set attributes that get derived from the preview,
  13046. // we don't access them directly because for the initial render,
  13047. // the `setAttributes` call will not have taken effect. If we're
  13048. // rendering responsive content, setting the responsive classes
  13049. // after the preview has been rendered can result in unwanted
  13050. // clipping or scrollbars. The `getAttributesFromPreview` function
  13051. // that `getMergedAttributes` uses is memoized so that we're not
  13052. const {
  13053. caption,
  13054. type,
  13055. allowResponsive,
  13056. className: classFromPreview
  13057. } = getMergedAttributes();
  13058. const className = classnames_default()(classFromPreview, props.className);
  13059. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(embed_controls, {
  13060. showEditButton: preview && !cannotEmbed,
  13061. themeSupportsResponsive: themeSupportsResponsive,
  13062. blockSupportsResponsive: responsive,
  13063. allowResponsive: allowResponsive,
  13064. getResponsiveHelp: edit_getResponsiveHelp,
  13065. toggleResponsive: toggleResponsive,
  13066. switchBackToURLInput: () => setIsEditingURL(true)
  13067. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, Object(external_wp_element_["createElement"])(embed_preview, {
  13068. preview: preview,
  13069. previewable: previewable,
  13070. className: className,
  13071. url: url,
  13072. type: type,
  13073. caption: caption,
  13074. onCaptionChange: value => setAttributes({
  13075. caption: value
  13076. }),
  13077. isSelected: isSelected,
  13078. icon: icon,
  13079. label: label,
  13080. insertBlocksAfter: insertBlocksAfter
  13081. })));
  13082. };
  13083. /* harmony default export */ var embed_edit = (EmbedEdit);
  13084. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/save.js
  13085. /**
  13086. * External dependencies
  13087. */
  13088. /**
  13089. * WordPress dependencies
  13090. */
  13091. function embed_save_save({
  13092. attributes
  13093. }) {
  13094. const {
  13095. url,
  13096. caption,
  13097. type,
  13098. providerNameSlug
  13099. } = attributes;
  13100. if (!url) {
  13101. return null;
  13102. }
  13103. const className = dedupe_default()('wp-block-embed', {
  13104. [`is-type-${type}`]: type,
  13105. [`is-provider-${providerNameSlug}`]: providerNameSlug,
  13106. [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
  13107. });
  13108. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({
  13109. className
  13110. }), Object(external_wp_element_["createElement"])("div", {
  13111. className: "wp-block-embed__wrapper"
  13112. }, `\n${url}\n`
  13113. /* URL needs to be on its own line. */
  13114. ), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  13115. tagName: "figcaption",
  13116. value: caption
  13117. }));
  13118. }
  13119. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/transforms.js
  13120. /**
  13121. * WordPress dependencies
  13122. */
  13123. /**
  13124. * Internal dependencies
  13125. */
  13126. const transforms_metadata = {
  13127. apiVersion: 2,
  13128. name: "core/embed",
  13129. title: "Embed",
  13130. category: "embed",
  13131. description: "Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.",
  13132. textdomain: "default",
  13133. attributes: {
  13134. url: {
  13135. type: "string"
  13136. },
  13137. caption: {
  13138. type: "string",
  13139. source: "html",
  13140. selector: "figcaption"
  13141. },
  13142. type: {
  13143. type: "string"
  13144. },
  13145. providerNameSlug: {
  13146. type: "string"
  13147. },
  13148. allowResponsive: {
  13149. type: "boolean",
  13150. "default": true
  13151. },
  13152. responsive: {
  13153. type: "boolean",
  13154. "default": false
  13155. },
  13156. previewable: {
  13157. type: "boolean",
  13158. "default": true
  13159. }
  13160. },
  13161. supports: {
  13162. align: true
  13163. },
  13164. editorStyle: "wp-block-embed-editor",
  13165. style: "wp-block-embed"
  13166. };
  13167. const {
  13168. name: EMBED_BLOCK
  13169. } = transforms_metadata;
  13170. /**
  13171. * Default transforms for generic embeds.
  13172. */
  13173. const embed_transforms_transforms = {
  13174. from: [{
  13175. type: 'raw',
  13176. isMatch: node => {
  13177. var _node$textContent, _node$textContent$mat;
  13178. return node.nodeName === 'P' && /^\s*(https?:\/\/\S+)\s*$/i.test(node.textContent) && ((_node$textContent = node.textContent) === null || _node$textContent === void 0 ? void 0 : (_node$textContent$mat = _node$textContent.match(/https/gi)) === null || _node$textContent$mat === void 0 ? void 0 : _node$textContent$mat.length) === 1;
  13179. },
  13180. transform: node => {
  13181. return Object(external_wp_blocks_["createBlock"])(EMBED_BLOCK, {
  13182. url: node.textContent.trim()
  13183. });
  13184. }
  13185. }],
  13186. to: [{
  13187. type: 'block',
  13188. blocks: ['core/paragraph'],
  13189. transform: ({
  13190. url,
  13191. caption
  13192. }) => {
  13193. const link = Object(external_wp_element_["createElement"])("a", {
  13194. href: url
  13195. }, caption || url);
  13196. return Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  13197. content: Object(external_wp_element_["renderToString"])(link)
  13198. });
  13199. }
  13200. }]
  13201. };
  13202. /* harmony default export */ var embed_transforms = (embed_transforms_transforms);
  13203. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/variations.js
  13204. /**
  13205. * WordPress dependencies
  13206. */
  13207. /**
  13208. * Internal dependencies
  13209. */
  13210. /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
  13211. /**
  13212. * Template option choices for predefined columns layouts.
  13213. *
  13214. * @type {WPBlockVariation[]}
  13215. */
  13216. const embed_variations_variations = [{
  13217. name: 'twitter',
  13218. title: 'Twitter',
  13219. icon: embedTwitterIcon,
  13220. keywords: ['tweet', Object(external_wp_i18n_["__"])('social')],
  13221. description: Object(external_wp_i18n_["__"])('Embed a tweet.'),
  13222. patterns: [/^https?:\/\/(www\.)?twitter\.com\/.+/i],
  13223. attributes: {
  13224. providerNameSlug: 'twitter',
  13225. responsive: true
  13226. }
  13227. }, {
  13228. name: 'youtube',
  13229. title: 'YouTube',
  13230. icon: embedYouTubeIcon,
  13231. keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('video')],
  13232. description: Object(external_wp_i18n_["__"])('Embed a YouTube video.'),
  13233. patterns: [/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i, /^https?:\/\/youtu\.be\/.+/i],
  13234. attributes: {
  13235. providerNameSlug: 'youtube',
  13236. responsive: true
  13237. }
  13238. }, {
  13239. // Deprecate Facebook Embed per FB policy
  13240. // See: https://developers.facebook.com/docs/plugins/oembed-legacy
  13241. name: 'facebook',
  13242. title: 'Facebook',
  13243. icon: embedFacebookIcon,
  13244. keywords: [Object(external_wp_i18n_["__"])('social')],
  13245. description: Object(external_wp_i18n_["__"])('Embed a Facebook post.'),
  13246. scope: ['block'],
  13247. patterns: [],
  13248. attributes: {
  13249. providerNameSlug: 'facebook',
  13250. previewable: false,
  13251. responsive: true
  13252. }
  13253. }, {
  13254. // Deprecate Instagram per FB policy
  13255. // See: https://developers.facebook.com/docs/instagram/oembed-legacy
  13256. name: 'instagram',
  13257. title: 'Instagram',
  13258. icon: embedInstagramIcon,
  13259. keywords: [Object(external_wp_i18n_["__"])('image'), Object(external_wp_i18n_["__"])('social')],
  13260. description: Object(external_wp_i18n_["__"])('Embed an Instagram post.'),
  13261. scope: ['block'],
  13262. patterns: [],
  13263. attributes: {
  13264. providerNameSlug: 'instagram',
  13265. responsive: true
  13266. }
  13267. }, {
  13268. name: 'wordpress',
  13269. title: 'WordPress',
  13270. icon: embedWordPressIcon,
  13271. keywords: [Object(external_wp_i18n_["__"])('post'), Object(external_wp_i18n_["__"])('blog')],
  13272. description: Object(external_wp_i18n_["__"])('Embed a WordPress post.'),
  13273. attributes: {
  13274. providerNameSlug: 'wordpress'
  13275. }
  13276. }, {
  13277. name: 'soundcloud',
  13278. title: 'SoundCloud',
  13279. icon: embedAudioIcon,
  13280. keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('audio')],
  13281. description: Object(external_wp_i18n_["__"])('Embed SoundCloud content.'),
  13282. patterns: [/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],
  13283. attributes: {
  13284. providerNameSlug: 'soundcloud',
  13285. responsive: true
  13286. }
  13287. }, {
  13288. name: 'spotify',
  13289. title: 'Spotify',
  13290. icon: embedSpotifyIcon,
  13291. keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('audio')],
  13292. description: Object(external_wp_i18n_["__"])('Embed Spotify content.'),
  13293. patterns: [/^https?:\/\/(open|play)\.spotify\.com\/.+/i],
  13294. attributes: {
  13295. providerNameSlug: 'spotify',
  13296. responsive: true
  13297. }
  13298. }, {
  13299. name: 'flickr',
  13300. title: 'Flickr',
  13301. icon: embedFlickrIcon,
  13302. keywords: [Object(external_wp_i18n_["__"])('image')],
  13303. description: Object(external_wp_i18n_["__"])('Embed Flickr content.'),
  13304. patterns: [/^https?:\/\/(www\.)?flickr\.com\/.+/i, /^https?:\/\/flic\.kr\/.+/i],
  13305. attributes: {
  13306. providerNameSlug: 'flickr',
  13307. responsive: true
  13308. }
  13309. }, {
  13310. name: 'vimeo',
  13311. title: 'Vimeo',
  13312. icon: embedVimeoIcon,
  13313. keywords: [Object(external_wp_i18n_["__"])('video')],
  13314. description: Object(external_wp_i18n_["__"])('Embed a Vimeo video.'),
  13315. patterns: [/^https?:\/\/(www\.)?vimeo\.com\/.+/i],
  13316. attributes: {
  13317. providerNameSlug: 'vimeo',
  13318. responsive: true
  13319. }
  13320. }, {
  13321. name: 'animoto',
  13322. title: 'Animoto',
  13323. icon: embedAnimotoIcon,
  13324. description: Object(external_wp_i18n_["__"])('Embed an Animoto video.'),
  13325. patterns: [/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],
  13326. attributes: {
  13327. providerNameSlug: 'animoto',
  13328. responsive: true
  13329. }
  13330. }, {
  13331. name: 'cloudup',
  13332. title: 'Cloudup',
  13333. icon: embedContentIcon,
  13334. description: Object(external_wp_i18n_["__"])('Embed Cloudup content.'),
  13335. patterns: [/^https?:\/\/cloudup\.com\/.+/i],
  13336. attributes: {
  13337. providerNameSlug: 'cloudup',
  13338. responsive: true
  13339. }
  13340. }, {
  13341. // Deprecated since CollegeHumor content is now powered by YouTube
  13342. name: 'collegehumor',
  13343. title: 'CollegeHumor',
  13344. icon: embedVideoIcon,
  13345. description: Object(external_wp_i18n_["__"])('Embed CollegeHumor content.'),
  13346. scope: ['block'],
  13347. patterns: [],
  13348. attributes: {
  13349. providerNameSlug: 'collegehumor',
  13350. responsive: true
  13351. }
  13352. }, {
  13353. name: 'crowdsignal',
  13354. title: 'Crowdsignal',
  13355. icon: embedContentIcon,
  13356. keywords: ['polldaddy', Object(external_wp_i18n_["__"])('survey')],
  13357. description: Object(external_wp_i18n_["__"])('Embed Crowdsignal (formerly Polldaddy) content.'),
  13358. patterns: [/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i],
  13359. attributes: {
  13360. providerNameSlug: 'crowdsignal',
  13361. responsive: true
  13362. }
  13363. }, {
  13364. name: 'dailymotion',
  13365. title: 'Dailymotion',
  13366. icon: embedDailymotionIcon,
  13367. keywords: [Object(external_wp_i18n_["__"])('video')],
  13368. description: Object(external_wp_i18n_["__"])('Embed a Dailymotion video.'),
  13369. patterns: [/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],
  13370. attributes: {
  13371. providerNameSlug: 'dailymotion',
  13372. responsive: true
  13373. }
  13374. }, {
  13375. name: 'imgur',
  13376. title: 'Imgur',
  13377. icon: embedPhotoIcon,
  13378. description: Object(external_wp_i18n_["__"])('Embed Imgur content.'),
  13379. patterns: [/^https?:\/\/(.+\.)?imgur\.com\/.+/i],
  13380. attributes: {
  13381. providerNameSlug: 'imgur',
  13382. responsive: true
  13383. }
  13384. }, {
  13385. name: 'issuu',
  13386. title: 'Issuu',
  13387. icon: embedContentIcon,
  13388. description: Object(external_wp_i18n_["__"])('Embed Issuu content.'),
  13389. patterns: [/^https?:\/\/(www\.)?issuu\.com\/.+/i],
  13390. attributes: {
  13391. providerNameSlug: 'issuu',
  13392. responsive: true
  13393. }
  13394. }, {
  13395. name: 'kickstarter',
  13396. title: 'Kickstarter',
  13397. icon: embedContentIcon,
  13398. description: Object(external_wp_i18n_["__"])('Embed Kickstarter content.'),
  13399. patterns: [/^https?:\/\/(www\.)?kickstarter\.com\/.+/i, /^https?:\/\/kck\.st\/.+/i],
  13400. attributes: {
  13401. providerNameSlug: 'kickstarter',
  13402. responsive: true
  13403. }
  13404. }, {
  13405. name: 'meetup-com',
  13406. title: 'Meetup.com',
  13407. icon: embedContentIcon,
  13408. description: Object(external_wp_i18n_["__"])('Embed Meetup.com content.'),
  13409. patterns: [/^https?:\/\/(www\.)?meetu(\.ps|p\.com)\/.+/i],
  13410. attributes: {
  13411. providerNameSlug: 'meetup-com',
  13412. responsive: true
  13413. }
  13414. }, {
  13415. name: 'mixcloud',
  13416. title: 'Mixcloud',
  13417. icon: embedAudioIcon,
  13418. keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('audio')],
  13419. description: Object(external_wp_i18n_["__"])('Embed Mixcloud content.'),
  13420. patterns: [/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],
  13421. attributes: {
  13422. providerNameSlug: 'mixcloud',
  13423. responsive: true
  13424. }
  13425. }, {
  13426. name: 'reddit',
  13427. title: 'Reddit',
  13428. icon: embedRedditIcon,
  13429. description: Object(external_wp_i18n_["__"])('Embed a Reddit thread.'),
  13430. patterns: [/^https?:\/\/(www\.)?reddit\.com\/.+/i],
  13431. attributes: {
  13432. providerNameSlug: 'reddit',
  13433. responsive: true
  13434. }
  13435. }, {
  13436. name: 'reverbnation',
  13437. title: 'ReverbNation',
  13438. icon: embedAudioIcon,
  13439. description: Object(external_wp_i18n_["__"])('Embed ReverbNation content.'),
  13440. patterns: [/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],
  13441. attributes: {
  13442. providerNameSlug: 'reverbnation',
  13443. responsive: true
  13444. }
  13445. }, {
  13446. name: 'screencast',
  13447. title: 'Screencast',
  13448. icon: embedVideoIcon,
  13449. description: Object(external_wp_i18n_["__"])('Embed Screencast content.'),
  13450. patterns: [/^https?:\/\/(www\.)?screencast\.com\/.+/i],
  13451. attributes: {
  13452. providerNameSlug: 'screencast',
  13453. responsive: true
  13454. }
  13455. }, {
  13456. name: 'scribd',
  13457. title: 'Scribd',
  13458. icon: embedContentIcon,
  13459. description: Object(external_wp_i18n_["__"])('Embed Scribd content.'),
  13460. patterns: [/^https?:\/\/(www\.)?scribd\.com\/.+/i],
  13461. attributes: {
  13462. providerNameSlug: 'scribd',
  13463. responsive: true
  13464. }
  13465. }, {
  13466. name: 'slideshare',
  13467. title: 'Slideshare',
  13468. icon: embedContentIcon,
  13469. description: Object(external_wp_i18n_["__"])('Embed Slideshare content.'),
  13470. patterns: [/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],
  13471. attributes: {
  13472. providerNameSlug: 'slideshare',
  13473. responsive: true
  13474. }
  13475. }, {
  13476. name: 'smugmug',
  13477. title: 'SmugMug',
  13478. icon: embedPhotoIcon,
  13479. description: Object(external_wp_i18n_["__"])('Embed SmugMug content.'),
  13480. patterns: [/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],
  13481. attributes: {
  13482. providerNameSlug: 'smugmug',
  13483. previewable: false,
  13484. responsive: true
  13485. }
  13486. }, {
  13487. name: 'speaker-deck',
  13488. title: 'Speaker Deck',
  13489. icon: embedContentIcon,
  13490. description: Object(external_wp_i18n_["__"])('Embed Speaker Deck content.'),
  13491. patterns: [/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],
  13492. attributes: {
  13493. providerNameSlug: 'speaker-deck',
  13494. responsive: true
  13495. }
  13496. }, {
  13497. name: 'tiktok',
  13498. title: 'TikTok',
  13499. icon: embedVideoIcon,
  13500. keywords: [Object(external_wp_i18n_["__"])('video')],
  13501. description: Object(external_wp_i18n_["__"])('Embed a TikTok video.'),
  13502. patterns: [/^https?:\/\/(www\.)?tiktok\.com\/.+/i],
  13503. attributes: {
  13504. providerNameSlug: 'tiktok',
  13505. responsive: true
  13506. }
  13507. }, {
  13508. name: 'ted',
  13509. title: 'TED',
  13510. icon: embedVideoIcon,
  13511. description: Object(external_wp_i18n_["__"])('Embed a TED video.'),
  13512. patterns: [/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],
  13513. attributes: {
  13514. providerNameSlug: 'ted',
  13515. responsive: true
  13516. }
  13517. }, {
  13518. name: 'tumblr',
  13519. title: 'Tumblr',
  13520. icon: embedTumblrIcon,
  13521. keywords: [Object(external_wp_i18n_["__"])('social')],
  13522. description: Object(external_wp_i18n_["__"])('Embed a Tumblr post.'),
  13523. patterns: [/^https?:\/\/(www\.)?tumblr\.com\/.+/i],
  13524. attributes: {
  13525. providerNameSlug: 'tumblr',
  13526. responsive: true
  13527. }
  13528. }, {
  13529. name: 'videopress',
  13530. title: 'VideoPress',
  13531. icon: embedVideoIcon,
  13532. keywords: [Object(external_wp_i18n_["__"])('video')],
  13533. description: Object(external_wp_i18n_["__"])('Embed a VideoPress video.'),
  13534. patterns: [/^https?:\/\/videopress\.com\/.+/i],
  13535. attributes: {
  13536. providerNameSlug: 'videopress',
  13537. responsive: true
  13538. }
  13539. }, {
  13540. name: 'wordpress-tv',
  13541. title: 'WordPress.tv',
  13542. icon: embedVideoIcon,
  13543. description: Object(external_wp_i18n_["__"])('Embed a WordPress.tv video.'),
  13544. patterns: [/^https?:\/\/wordpress\.tv\/.+/i],
  13545. attributes: {
  13546. providerNameSlug: 'wordpress-tv',
  13547. responsive: true
  13548. }
  13549. }, {
  13550. name: 'amazon-kindle',
  13551. title: 'Amazon Kindle',
  13552. icon: embedAmazonIcon,
  13553. keywords: [Object(external_wp_i18n_["__"])('ebook')],
  13554. description: Object(external_wp_i18n_["__"])('Embed Amazon Kindle content.'),
  13555. patterns: [/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i, /^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],
  13556. attributes: {
  13557. providerNameSlug: 'amazon-kindle'
  13558. }
  13559. }];
  13560. /**
  13561. * Add `isActive` function to all `embed` variations, if not defined.
  13562. * `isActive` function is used to find a variation match from a created
  13563. * Block by providing its attributes.
  13564. */
  13565. embed_variations_variations.forEach(variation => {
  13566. if (variation.isActive) return;
  13567. variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.providerNameSlug === variationAttributes.providerNameSlug;
  13568. });
  13569. /* harmony default export */ var embed_variations = (embed_variations_variations);
  13570. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/deprecated.js
  13571. /**
  13572. * External dependencies
  13573. */
  13574. /**
  13575. * Internal dependencies
  13576. */
  13577. const deprecated_metadata = {
  13578. apiVersion: 2,
  13579. name: "core/embed",
  13580. title: "Embed",
  13581. category: "embed",
  13582. description: "Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.",
  13583. textdomain: "default",
  13584. attributes: {
  13585. url: {
  13586. type: "string"
  13587. },
  13588. caption: {
  13589. type: "string",
  13590. source: "html",
  13591. selector: "figcaption"
  13592. },
  13593. type: {
  13594. type: "string"
  13595. },
  13596. providerNameSlug: {
  13597. type: "string"
  13598. },
  13599. allowResponsive: {
  13600. type: "boolean",
  13601. "default": true
  13602. },
  13603. responsive: {
  13604. type: "boolean",
  13605. "default": false
  13606. },
  13607. previewable: {
  13608. type: "boolean",
  13609. "default": true
  13610. }
  13611. },
  13612. supports: {
  13613. align: true
  13614. },
  13615. editorStyle: "wp-block-embed-editor",
  13616. style: "wp-block-embed"
  13617. };
  13618. /**
  13619. * WordPress dependencies
  13620. */
  13621. const {
  13622. attributes: embed_deprecated_blockAttributes
  13623. } = deprecated_metadata;
  13624. const embed_deprecated_deprecated = [{
  13625. attributes: embed_deprecated_blockAttributes,
  13626. save({
  13627. attributes: {
  13628. url,
  13629. caption,
  13630. type,
  13631. providerNameSlug
  13632. }
  13633. }) {
  13634. if (!url) {
  13635. return null;
  13636. }
  13637. const embedClassName = classnames_default()('wp-block-embed', {
  13638. [`is-type-${type}`]: type,
  13639. [`is-provider-${providerNameSlug}`]: providerNameSlug
  13640. });
  13641. return Object(external_wp_element_["createElement"])("figure", {
  13642. className: embedClassName
  13643. }, `\n${url}\n`
  13644. /* URL needs to be on its own line. */
  13645. , !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  13646. tagName: "figcaption",
  13647. value: caption
  13648. }));
  13649. }
  13650. }];
  13651. /* harmony default export */ var embed_deprecated = (embed_deprecated_deprecated);
  13652. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/index.js
  13653. /**
  13654. * Internal dependencies
  13655. */
  13656. const embed_metadata = {
  13657. apiVersion: 2,
  13658. name: "core/embed",
  13659. title: "Embed",
  13660. category: "embed",
  13661. description: "Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.",
  13662. textdomain: "default",
  13663. attributes: {
  13664. url: {
  13665. type: "string"
  13666. },
  13667. caption: {
  13668. type: "string",
  13669. source: "html",
  13670. selector: "figcaption"
  13671. },
  13672. type: {
  13673. type: "string"
  13674. },
  13675. providerNameSlug: {
  13676. type: "string"
  13677. },
  13678. allowResponsive: {
  13679. type: "boolean",
  13680. "default": true
  13681. },
  13682. responsive: {
  13683. type: "boolean",
  13684. "default": false
  13685. },
  13686. previewable: {
  13687. type: "boolean",
  13688. "default": true
  13689. }
  13690. },
  13691. supports: {
  13692. align: true
  13693. },
  13694. editorStyle: "wp-block-embed-editor",
  13695. style: "wp-block-embed"
  13696. };
  13697. const {
  13698. name: embed_name
  13699. } = embed_metadata;
  13700. const embed_settings = {
  13701. icon: embedContentIcon,
  13702. edit: embed_edit,
  13703. save: embed_save_save,
  13704. transforms: embed_transforms,
  13705. variations: embed_variations,
  13706. deprecated: embed_deprecated
  13707. };
  13708. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/file.js
  13709. /**
  13710. * WordPress dependencies
  13711. */
  13712. const file_file = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  13713. viewBox: "0 0 24 24",
  13714. xmlns: "http://www.w3.org/2000/svg"
  13715. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  13716. d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"
  13717. }));
  13718. /* harmony default export */ var library_file = (file_file);
  13719. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/inspector.js
  13720. /**
  13721. * WordPress dependencies
  13722. */
  13723. /**
  13724. * Internal dependencies
  13725. */
  13726. function FileBlockInspector({
  13727. hrefs,
  13728. openInNewWindow,
  13729. showDownloadButton,
  13730. changeLinkDestinationOption,
  13731. changeOpenInNewWindow,
  13732. changeShowDownloadButton,
  13733. displayPreview,
  13734. changeDisplayPreview,
  13735. previewHeight,
  13736. changePreviewHeight
  13737. }) {
  13738. const {
  13739. href,
  13740. textLinkHref,
  13741. attachmentPage
  13742. } = hrefs;
  13743. let linkDestinationOptions = [{
  13744. value: href,
  13745. label: Object(external_wp_i18n_["__"])('URL')
  13746. }];
  13747. if (attachmentPage) {
  13748. linkDestinationOptions = [{
  13749. value: href,
  13750. label: Object(external_wp_i18n_["__"])('Media file')
  13751. }, {
  13752. value: attachmentPage,
  13753. label: Object(external_wp_i18n_["__"])('Attachment page')
  13754. }];
  13755. }
  13756. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, href.endsWith('.pdf') && Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  13757. title: Object(external_wp_i18n_["__"])('PDF settings')
  13758. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  13759. label: Object(external_wp_i18n_["__"])('Show inline embed'),
  13760. help: displayPreview ? Object(external_wp_i18n_["__"])("Note: Most phone and tablet browsers won't display embedded PDFs.") : null,
  13761. checked: !!displayPreview,
  13762. onChange: changeDisplayPreview
  13763. }), Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  13764. label: Object(external_wp_i18n_["__"])('Height in pixels'),
  13765. min: MIN_PREVIEW_HEIGHT,
  13766. max: Math.max(MAX_PREVIEW_HEIGHT, previewHeight),
  13767. value: previewHeight,
  13768. onChange: changePreviewHeight
  13769. })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  13770. title: Object(external_wp_i18n_["__"])('Text link settings')
  13771. }, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  13772. label: Object(external_wp_i18n_["__"])('Link to'),
  13773. value: textLinkHref,
  13774. options: linkDestinationOptions,
  13775. onChange: changeLinkDestinationOption
  13776. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  13777. label: Object(external_wp_i18n_["__"])('Open in new tab'),
  13778. checked: openInNewWindow,
  13779. onChange: changeOpenInNewWindow
  13780. })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  13781. title: Object(external_wp_i18n_["__"])('Download button settings')
  13782. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  13783. label: Object(external_wp_i18n_["__"])('Show download button'),
  13784. checked: showDownloadButton,
  13785. onChange: changeShowDownloadButton
  13786. }))));
  13787. }
  13788. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/utils.js
  13789. /**
  13790. * Uses a combination of user agent matching and feature detection to determine whether
  13791. * the current browser supports rendering PDFs inline.
  13792. *
  13793. * @return {boolean} Whether or not the browser supports inline PDFs.
  13794. */
  13795. const browserSupportsPdfs = () => {
  13796. // Most mobile devices include "Mobi" in their UA.
  13797. if (window.navigator.userAgent.indexOf('Mobi') > -1) {
  13798. return false;
  13799. } // Android tablets are the noteable exception.
  13800. if (window.navigator.userAgent.indexOf('Android') > -1) {
  13801. return false;
  13802. } // iPad pretends to be a Mac.
  13803. if (window.navigator.userAgent.indexOf('Macintosh') > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
  13804. return false;
  13805. } // IE only supports PDFs when there's an ActiveX object available for it.
  13806. if (!!(window.ActiveXObject || 'ActiveXObject' in window) && !(createActiveXObject('AcroPDF.PDF') || createActiveXObject('PDF.PdfCtrl'))) {
  13807. return false;
  13808. }
  13809. return true;
  13810. };
  13811. /**
  13812. * Helper function for creating ActiveX objects, catching any errors that are thrown
  13813. * when it's generated.
  13814. *
  13815. * @param {string} type The name of the ActiveX object to create.
  13816. * @return {window.ActiveXObject|undefined} The generated ActiveXObject, or null if it failed.
  13817. */
  13818. const createActiveXObject = type => {
  13819. let ax;
  13820. try {
  13821. ax = new window.ActiveXObject(type);
  13822. } catch (e) {
  13823. ax = undefined;
  13824. }
  13825. return ax;
  13826. };
  13827. /**
  13828. * Hides all .wp-block-file__embed elements on the document. This function is only intended
  13829. * to be run on the front-end, it may have weird side effects running in the block editor.
  13830. */
  13831. const hidePdfEmbedsOnUnsupportedBrowsers = () => {
  13832. if (!browserSupportsPdfs()) {
  13833. const embeds = document.getElementsByClassName('wp-block-file__embed');
  13834. Array.from(embeds).forEach(embed => {
  13835. embed.style.display = 'none';
  13836. });
  13837. }
  13838. };
  13839. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/edit.js
  13840. /**
  13841. * External dependencies
  13842. */
  13843. /**
  13844. * WordPress dependencies
  13845. */
  13846. /**
  13847. * Internal dependencies
  13848. */
  13849. const MIN_PREVIEW_HEIGHT = 200;
  13850. const MAX_PREVIEW_HEIGHT = 2000;
  13851. function ClipboardToolbarButton({
  13852. text,
  13853. disabled
  13854. }) {
  13855. const {
  13856. createNotice
  13857. } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
  13858. const ref = Object(external_wp_compose_["useCopyToClipboard"])(text, () => {
  13859. createNotice('info', Object(external_wp_i18n_["__"])('Copied URL to clipboard.'), {
  13860. isDismissible: true,
  13861. type: 'snackbar'
  13862. });
  13863. });
  13864. return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  13865. className: "components-clipboard-toolbar-button",
  13866. ref: ref,
  13867. disabled: disabled
  13868. }, Object(external_wp_i18n_["__"])('Copy URL'));
  13869. }
  13870. function FileEdit({
  13871. attributes,
  13872. isSelected,
  13873. setAttributes,
  13874. noticeUI,
  13875. noticeOperations
  13876. }) {
  13877. const {
  13878. id,
  13879. fileName,
  13880. href,
  13881. textLinkHref,
  13882. textLinkTarget,
  13883. showDownloadButton,
  13884. downloadButtonText,
  13885. displayPreview,
  13886. previewHeight
  13887. } = attributes;
  13888. const [hasError, setHasError] = Object(external_wp_element_["useState"])(false);
  13889. const {
  13890. media,
  13891. mediaUpload
  13892. } = Object(external_wp_data_["useSelect"])(select => ({
  13893. media: id === undefined ? undefined : select(external_wp_coreData_["store"]).getMedia(id),
  13894. mediaUpload: select(external_wp_blockEditor_["store"]).getSettings().mediaUpload
  13895. }), [id]);
  13896. const {
  13897. toggleSelection
  13898. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  13899. Object(external_wp_element_["useEffect"])(() => {
  13900. // Upload a file drag-and-dropped into the editor
  13901. if (Object(external_wp_blob_["isBlobURL"])(href)) {
  13902. const file = Object(external_wp_blob_["getBlobByURL"])(href);
  13903. mediaUpload({
  13904. filesList: [file],
  13905. onFileChange: ([newMedia]) => onSelectFile(newMedia),
  13906. onError: message => {
  13907. setHasError(true);
  13908. noticeOperations.createErrorNotice(message);
  13909. }
  13910. });
  13911. Object(external_wp_blob_["revokeBlobURL"])(href);
  13912. }
  13913. if (downloadButtonText === undefined) {
  13914. changeDownloadButtonText(Object(external_wp_i18n_["_x"])('Download', 'button label'));
  13915. }
  13916. }, []);
  13917. function onSelectFile(newMedia) {
  13918. if (newMedia && newMedia.url) {
  13919. setHasError(false);
  13920. const isPdf = newMedia.url.endsWith('.pdf');
  13921. setAttributes({
  13922. href: newMedia.url,
  13923. fileName: newMedia.title,
  13924. textLinkHref: newMedia.url,
  13925. id: newMedia.id,
  13926. displayPreview: isPdf ? true : undefined,
  13927. previewHeight: isPdf ? 600 : undefined
  13928. });
  13929. }
  13930. }
  13931. function onUploadError(message) {
  13932. setHasError(true);
  13933. noticeOperations.removeAllNotices();
  13934. noticeOperations.createErrorNotice(message);
  13935. }
  13936. function changeLinkDestinationOption(newHref) {
  13937. // Choose Media File or Attachment Page (when file is in Media Library)
  13938. setAttributes({
  13939. textLinkHref: newHref
  13940. });
  13941. }
  13942. function changeOpenInNewWindow(newValue) {
  13943. setAttributes({
  13944. textLinkTarget: newValue ? '_blank' : false
  13945. });
  13946. }
  13947. function changeShowDownloadButton(newValue) {
  13948. setAttributes({
  13949. showDownloadButton: newValue
  13950. });
  13951. }
  13952. function changeDownloadButtonText(newValue) {
  13953. // Remove anchor tags from button text content.
  13954. setAttributes({
  13955. downloadButtonText: newValue.replace(/<\/?a[^>]*>/g, '')
  13956. });
  13957. }
  13958. function changeDisplayPreview(newValue) {
  13959. setAttributes({
  13960. displayPreview: newValue
  13961. });
  13962. }
  13963. function handleOnResizeStop(event, direction, elt, delta) {
  13964. toggleSelection(true);
  13965. const newHeight = parseInt(previewHeight + delta.height, 10);
  13966. setAttributes({
  13967. previewHeight: newHeight
  13968. });
  13969. }
  13970. function changePreviewHeight(newValue) {
  13971. const newHeight = Math.max(parseInt(newValue, 10), MIN_PREVIEW_HEIGHT);
  13972. setAttributes({
  13973. previewHeight: newHeight
  13974. });
  13975. }
  13976. const attachmentPage = media && media.link;
  13977. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  13978. className: classnames_default()(Object(external_wp_blob_["isBlobURL"])(href) && Object(external_wp_components_["__unstableGetAnimateClassName"])({
  13979. type: 'loading'
  13980. }), {
  13981. 'is-transient': Object(external_wp_blob_["isBlobURL"])(href)
  13982. })
  13983. });
  13984. const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
  13985. if (!href || hasError) {
  13986. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  13987. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  13988. icon: library_file
  13989. }),
  13990. labels: {
  13991. title: Object(external_wp_i18n_["__"])('File'),
  13992. instructions: Object(external_wp_i18n_["__"])('Upload a file or pick one from your media library.')
  13993. },
  13994. onSelect: onSelectFile,
  13995. notices: noticeUI,
  13996. onError: onUploadError,
  13997. accept: "*"
  13998. }));
  13999. }
  14000. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(FileBlockInspector, {
  14001. hrefs: {
  14002. href,
  14003. textLinkHref,
  14004. attachmentPage
  14005. },
  14006. openInNewWindow: !!textLinkTarget,
  14007. showDownloadButton,
  14008. changeLinkDestinationOption,
  14009. changeOpenInNewWindow,
  14010. changeShowDownloadButton,
  14011. displayPreview,
  14012. changeDisplayPreview,
  14013. previewHeight,
  14014. changePreviewHeight
  14015. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  14016. group: "other"
  14017. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  14018. mediaId: id,
  14019. mediaURL: href,
  14020. accept: "*",
  14021. onSelect: onSelectFile,
  14022. onError: onUploadError
  14023. }), Object(external_wp_element_["createElement"])(ClipboardToolbarButton, {
  14024. text: href,
  14025. disabled: Object(external_wp_blob_["isBlobURL"])(href)
  14026. })), Object(external_wp_element_["createElement"])("div", blockProps, displayPreviewInEditor && Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
  14027. size: {
  14028. height: previewHeight
  14029. },
  14030. minHeight: MIN_PREVIEW_HEIGHT,
  14031. maxHeight: MAX_PREVIEW_HEIGHT,
  14032. minWidth: "100%",
  14033. grid: [10, 10],
  14034. enable: {
  14035. top: false,
  14036. right: false,
  14037. bottom: true,
  14038. left: false,
  14039. topRight: false,
  14040. bottomRight: false,
  14041. bottomLeft: false,
  14042. topLeft: false
  14043. },
  14044. onResizeStart: () => toggleSelection(false),
  14045. onResizeStop: handleOnResizeStop,
  14046. showHandle: isSelected
  14047. }, Object(external_wp_element_["createElement"])("object", {
  14048. className: "wp-block-file__preview",
  14049. data: href,
  14050. type: "application/pdf",
  14051. "aria-label": Object(external_wp_i18n_["__"])('Embed of the selected PDF file.')
  14052. }), !isSelected && Object(external_wp_element_["createElement"])("div", {
  14053. className: "wp-block-file__preview-overlay"
  14054. })), Object(external_wp_element_["createElement"])("div", {
  14055. className: 'wp-block-file__content-wrapper'
  14056. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  14057. style: {
  14058. display: 'inline-block'
  14059. },
  14060. tagName: "a" // must be block-level or else cursor disappears
  14061. ,
  14062. value: fileName,
  14063. placeholder: Object(external_wp_i18n_["__"])('Write file name…'),
  14064. withoutInteractiveFormatting: true,
  14065. onChange: text => setAttributes({
  14066. fileName: text
  14067. }),
  14068. href: textLinkHref
  14069. }), showDownloadButton && Object(external_wp_element_["createElement"])("div", {
  14070. className: 'wp-block-file__button-richtext-wrapper'
  14071. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  14072. tagName: "div" // must be block-level or else cursor disappears
  14073. ,
  14074. "aria-label": Object(external_wp_i18n_["__"])('Download button text'),
  14075. className: 'wp-block-file__button',
  14076. value: downloadButtonText,
  14077. withoutInteractiveFormatting: true,
  14078. placeholder: Object(external_wp_i18n_["__"])('Add text…'),
  14079. onChange: text => changeDownloadButtonText(text)
  14080. })))));
  14081. }
  14082. /* harmony default export */ var file_edit = (Object(external_wp_components_["withNotices"])(FileEdit));
  14083. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/save.js
  14084. /**
  14085. * WordPress dependencies
  14086. */
  14087. function file_save_save({
  14088. attributes
  14089. }) {
  14090. const {
  14091. href,
  14092. fileName,
  14093. textLinkHref,
  14094. textLinkTarget,
  14095. showDownloadButton,
  14096. downloadButtonText,
  14097. displayPreview,
  14098. previewHeight
  14099. } = attributes;
  14100. const pdfEmbedLabel = external_wp_blockEditor_["RichText"].isEmpty(fileName) ? Object(external_wp_i18n_["__"])('PDF embed') : Object(external_wp_i18n_["sprintf"])(
  14101. /* translators: %s: filename. */
  14102. Object(external_wp_i18n_["__"])('Embed of %s.'), fileName);
  14103. return href && Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), displayPreview && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("object", {
  14104. className: "wp-block-file__embed",
  14105. data: href,
  14106. type: "application/pdf",
  14107. style: {
  14108. width: '100%',
  14109. height: `${previewHeight}px`
  14110. },
  14111. "aria-label": pdfEmbedLabel
  14112. })), !external_wp_blockEditor_["RichText"].isEmpty(fileName) && Object(external_wp_element_["createElement"])("a", {
  14113. href: textLinkHref,
  14114. target: textLinkTarget,
  14115. rel: textLinkTarget ? 'noreferrer noopener' : undefined
  14116. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  14117. value: fileName
  14118. })), showDownloadButton && Object(external_wp_element_["createElement"])("a", {
  14119. href: href,
  14120. className: "wp-block-file__button",
  14121. download: true
  14122. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  14123. value: downloadButtonText
  14124. })));
  14125. }
  14126. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/transforms.js
  14127. /**
  14128. * External dependencies
  14129. */
  14130. /**
  14131. * WordPress dependencies
  14132. */
  14133. const file_transforms_transforms = {
  14134. from: [{
  14135. type: 'files',
  14136. isMatch(files) {
  14137. return files.length > 0;
  14138. },
  14139. // We define a lower priorty (higher number) than the default of 10. This
  14140. // ensures that the File block is only created as a fallback.
  14141. priority: 15,
  14142. transform: files => {
  14143. const blocks = [];
  14144. files.forEach(file => {
  14145. const blobURL = Object(external_wp_blob_["createBlobURL"])(file); // File will be uploaded in componentDidMount()
  14146. blocks.push(Object(external_wp_blocks_["createBlock"])('core/file', {
  14147. href: blobURL,
  14148. fileName: file.name,
  14149. textLinkHref: blobURL
  14150. }));
  14151. });
  14152. return blocks;
  14153. }
  14154. }, {
  14155. type: 'block',
  14156. blocks: ['core/audio'],
  14157. transform: attributes => {
  14158. return Object(external_wp_blocks_["createBlock"])('core/file', {
  14159. href: attributes.src,
  14160. fileName: attributes.caption,
  14161. textLinkHref: attributes.src,
  14162. id: attributes.id,
  14163. anchor: attributes.anchor
  14164. });
  14165. }
  14166. }, {
  14167. type: 'block',
  14168. blocks: ['core/video'],
  14169. transform: attributes => {
  14170. return Object(external_wp_blocks_["createBlock"])('core/file', {
  14171. href: attributes.src,
  14172. fileName: attributes.caption,
  14173. textLinkHref: attributes.src,
  14174. id: attributes.id,
  14175. anchor: attributes.anchor
  14176. });
  14177. }
  14178. }, {
  14179. type: 'block',
  14180. blocks: ['core/image'],
  14181. transform: attributes => {
  14182. return Object(external_wp_blocks_["createBlock"])('core/file', {
  14183. href: attributes.url,
  14184. fileName: attributes.caption,
  14185. textLinkHref: attributes.url,
  14186. id: attributes.id,
  14187. anchor: attributes.anchor
  14188. });
  14189. }
  14190. }],
  14191. to: [{
  14192. type: 'block',
  14193. blocks: ['core/audio'],
  14194. isMatch: ({
  14195. id
  14196. }) => {
  14197. if (!id) {
  14198. return false;
  14199. }
  14200. const {
  14201. getMedia
  14202. } = Object(external_wp_data_["select"])(external_wp_coreData_["store"]);
  14203. const media = getMedia(id);
  14204. return !!media && Object(external_lodash_["includes"])(media.mime_type, 'audio');
  14205. },
  14206. transform: attributes => {
  14207. return Object(external_wp_blocks_["createBlock"])('core/audio', {
  14208. src: attributes.href,
  14209. caption: attributes.fileName,
  14210. id: attributes.id,
  14211. anchor: attributes.anchor
  14212. });
  14213. }
  14214. }, {
  14215. type: 'block',
  14216. blocks: ['core/video'],
  14217. isMatch: ({
  14218. id
  14219. }) => {
  14220. if (!id) {
  14221. return false;
  14222. }
  14223. const {
  14224. getMedia
  14225. } = Object(external_wp_data_["select"])(external_wp_coreData_["store"]);
  14226. const media = getMedia(id);
  14227. return !!media && Object(external_lodash_["includes"])(media.mime_type, 'video');
  14228. },
  14229. transform: attributes => {
  14230. return Object(external_wp_blocks_["createBlock"])('core/video', {
  14231. src: attributes.href,
  14232. caption: attributes.fileName,
  14233. id: attributes.id,
  14234. anchor: attributes.anchor
  14235. });
  14236. }
  14237. }, {
  14238. type: 'block',
  14239. blocks: ['core/image'],
  14240. isMatch: ({
  14241. id
  14242. }) => {
  14243. if (!id) {
  14244. return false;
  14245. }
  14246. const {
  14247. getMedia
  14248. } = Object(external_wp_data_["select"])(external_wp_coreData_["store"]);
  14249. const media = getMedia(id);
  14250. return !!media && Object(external_lodash_["includes"])(media.mime_type, 'image');
  14251. },
  14252. transform: attributes => {
  14253. return Object(external_wp_blocks_["createBlock"])('core/image', {
  14254. url: attributes.href,
  14255. caption: attributes.fileName,
  14256. id: attributes.id,
  14257. anchor: attributes.anchor
  14258. });
  14259. }
  14260. }]
  14261. };
  14262. /* harmony default export */ var file_transforms = (file_transforms_transforms);
  14263. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/index.js
  14264. /**
  14265. * WordPress dependencies
  14266. */
  14267. /**
  14268. * Internal dependencies
  14269. */
  14270. const file_metadata = {
  14271. apiVersion: 2,
  14272. name: "core/file",
  14273. title: "File",
  14274. category: "media",
  14275. description: "Add a link to a downloadable file.",
  14276. keywords: ["document", "pdf", "download"],
  14277. textdomain: "default",
  14278. attributes: {
  14279. id: {
  14280. type: "number"
  14281. },
  14282. href: {
  14283. type: "string"
  14284. },
  14285. fileName: {
  14286. type: "string",
  14287. source: "html",
  14288. selector: "a:not([download])"
  14289. },
  14290. textLinkHref: {
  14291. type: "string",
  14292. source: "attribute",
  14293. selector: "a:not([download])",
  14294. attribute: "href"
  14295. },
  14296. textLinkTarget: {
  14297. type: "string",
  14298. source: "attribute",
  14299. selector: "a:not([download])",
  14300. attribute: "target"
  14301. },
  14302. showDownloadButton: {
  14303. type: "boolean",
  14304. "default": true
  14305. },
  14306. downloadButtonText: {
  14307. type: "string",
  14308. source: "html",
  14309. selector: "a[download]"
  14310. },
  14311. displayPreview: {
  14312. type: "boolean"
  14313. },
  14314. previewHeight: {
  14315. type: "number",
  14316. "default": 600
  14317. }
  14318. },
  14319. supports: {
  14320. anchor: true,
  14321. align: true
  14322. },
  14323. viewScript: "file:./view.min.js",
  14324. editorStyle: "wp-block-file-editor",
  14325. style: "wp-block-file"
  14326. };
  14327. const {
  14328. name: file_name
  14329. } = file_metadata;
  14330. const file_settings = {
  14331. icon: library_file,
  14332. transforms: file_transforms,
  14333. edit: file_edit,
  14334. save: file_save_save
  14335. };
  14336. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/html.js
  14337. /**
  14338. * WordPress dependencies
  14339. */
  14340. const html_html = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  14341. viewBox: "0 0 24 24",
  14342. xmlns: "http://www.w3.org/2000/svg"
  14343. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  14344. d: "M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"
  14345. }));
  14346. /* harmony default export */ var library_html = (html_html);
  14347. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/edit.js
  14348. /**
  14349. * WordPress dependencies
  14350. */
  14351. function HTMLEdit({
  14352. attributes,
  14353. setAttributes,
  14354. isSelected
  14355. }) {
  14356. const [isPreview, setIsPreview] = Object(external_wp_element_["useState"])();
  14357. const styles = Object(external_wp_data_["useSelect"])(select => {
  14358. // Default styles used to unset some of the styles
  14359. // that might be inherited from the editor style.
  14360. const defaultStyles = `
  14361. html,body,:root {
  14362. margin: 0 !important;
  14363. padding: 0 !important;
  14364. overflow: visible !important;
  14365. min-height: auto !important;
  14366. }
  14367. `;
  14368. return [defaultStyles, ...Object(external_wp_blockEditor_["transformStyles"])(select(external_wp_blockEditor_["store"]).getSettings().styles)];
  14369. }, []);
  14370. function switchToPreview() {
  14371. setIsPreview(true);
  14372. }
  14373. function switchToHTML() {
  14374. setIsPreview(false);
  14375. }
  14376. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({
  14377. className: 'block-library-html__edit'
  14378. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  14379. className: "components-tab-button",
  14380. isPressed: !isPreview,
  14381. onClick: switchToHTML
  14382. }, Object(external_wp_element_["createElement"])("span", null, "HTML")), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  14383. className: "components-tab-button",
  14384. isPressed: isPreview,
  14385. onClick: switchToPreview
  14386. }, Object(external_wp_element_["createElement"])("span", null, Object(external_wp_i18n_["__"])('Preview'))))), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"].Consumer, null, isDisabled => isPreview || isDisabled ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["SandBox"], {
  14387. html: attributes.content,
  14388. styles: styles
  14389. }), !isSelected && Object(external_wp_element_["createElement"])("div", {
  14390. className: "block-library-html__preview-overlay"
  14391. })) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], {
  14392. value: attributes.content,
  14393. onChange: content => setAttributes({
  14394. content
  14395. }),
  14396. placeholder: Object(external_wp_i18n_["__"])('Write HTML…'),
  14397. "aria-label": Object(external_wp_i18n_["__"])('HTML')
  14398. })));
  14399. }
  14400. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/save.js
  14401. /**
  14402. * WordPress dependencies
  14403. */
  14404. function html_save_save({
  14405. attributes
  14406. }) {
  14407. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.content);
  14408. }
  14409. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/transforms.js
  14410. /**
  14411. * WordPress dependencies
  14412. */
  14413. const html_transforms_transforms = {
  14414. from: [{
  14415. type: 'block',
  14416. blocks: ['core/code'],
  14417. transform: ({
  14418. content
  14419. }) => {
  14420. return Object(external_wp_blocks_["createBlock"])('core/html', {
  14421. content
  14422. });
  14423. }
  14424. }]
  14425. };
  14426. /* harmony default export */ var html_transforms = (html_transforms_transforms);
  14427. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/index.js
  14428. /**
  14429. * WordPress dependencies
  14430. */
  14431. /**
  14432. * Internal dependencies
  14433. */
  14434. const html_metadata = {
  14435. apiVersion: 2,
  14436. name: "core/html",
  14437. title: "Custom HTML",
  14438. category: "widgets",
  14439. description: "Add custom HTML code and preview it as you edit.",
  14440. keywords: ["embed"],
  14441. textdomain: "default",
  14442. attributes: {
  14443. content: {
  14444. type: "string",
  14445. source: "html"
  14446. }
  14447. },
  14448. supports: {
  14449. customClassName: false,
  14450. className: false,
  14451. html: false
  14452. },
  14453. editorStyle: "wp-block-html-editor"
  14454. };
  14455. const {
  14456. name: html_name
  14457. } = html_metadata;
  14458. const html_settings = {
  14459. icon: library_html,
  14460. example: {
  14461. attributes: {
  14462. content: '<marquee>' + Object(external_wp_i18n_["__"])('Welcome to the wonderful world of blocks…') + '</marquee>'
  14463. }
  14464. },
  14465. edit: HTMLEdit,
  14466. save: html_save_save,
  14467. transforms: html_transforms
  14468. };
  14469. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media-and-text.js
  14470. /**
  14471. * WordPress dependencies
  14472. */
  14473. const mediaAndText = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  14474. xmlns: "http://www.w3.org/2000/svg",
  14475. viewBox: "0 0 24 24"
  14476. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  14477. d: "M3 18h8V6H3v12zM14 7.5V9h7V7.5h-7zm0 5.3h7v-1.5h-7v1.5zm0 3.7h7V15h-7v1.5z"
  14478. }));
  14479. /* harmony default export */ var media_and_text = (mediaAndText);
  14480. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/media-container-icon.js
  14481. /**
  14482. * WordPress dependencies
  14483. */
  14484. /* harmony default export */ var media_container_icon = (Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  14485. xmlns: "http://www.w3.org/2000/svg",
  14486. viewBox: "0 0 24 24"
  14487. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  14488. d: "M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"
  14489. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  14490. d: "M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"
  14491. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  14492. d: "M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"
  14493. })));
  14494. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/media-container.js
  14495. /**
  14496. * External dependencies
  14497. */
  14498. /**
  14499. * WordPress dependencies
  14500. */
  14501. /**
  14502. * Internal dependencies
  14503. */
  14504. /**
  14505. * Constants
  14506. */
  14507. const media_container_ALLOWED_MEDIA_TYPES = ['image', 'video'];
  14508. function imageFillStyles(url, focalPoint) {
  14509. return url ? {
  14510. backgroundImage: `url(${url})`,
  14511. backgroundPosition: focalPoint ? `${focalPoint.x * 100}% ${focalPoint.y * 100}%` : `50% 50%`
  14512. } : {};
  14513. }
  14514. const ResizableBoxContainer = Object(external_wp_element_["forwardRef"])(({
  14515. isSelected,
  14516. isStackedOnMobile,
  14517. ...props
  14518. }, ref) => {
  14519. const isMobile = Object(external_wp_compose_["useViewportMatch"])('small', '<');
  14520. return Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], Object(esm_extends["a" /* default */])({
  14521. ref: ref,
  14522. showHandle: isSelected && (!isMobile || !isStackedOnMobile)
  14523. }, props));
  14524. });
  14525. function ToolbarEditButton({
  14526. mediaId,
  14527. mediaUrl,
  14528. onSelectMedia
  14529. }) {
  14530. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  14531. group: "other"
  14532. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  14533. mediaId: mediaId,
  14534. mediaURL: mediaUrl,
  14535. allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
  14536. accept: "image/*,video/*",
  14537. onSelect: onSelectMedia
  14538. }));
  14539. }
  14540. function PlaceholderContainer({
  14541. className,
  14542. noticeOperations,
  14543. noticeUI,
  14544. onSelectMedia
  14545. }) {
  14546. const onUploadError = message => {
  14547. noticeOperations.removeAllNotices();
  14548. noticeOperations.createErrorNotice(message);
  14549. };
  14550. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  14551. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  14552. icon: media_container_icon
  14553. }),
  14554. labels: {
  14555. title: Object(external_wp_i18n_["__"])('Media area')
  14556. },
  14557. className: className,
  14558. onSelect: onSelectMedia,
  14559. accept: "image/*,video/*",
  14560. allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
  14561. notices: noticeUI,
  14562. onError: onUploadError
  14563. });
  14564. }
  14565. function MediaContainer(props, ref) {
  14566. const {
  14567. className,
  14568. commitWidthChange,
  14569. focalPoint,
  14570. imageFill,
  14571. isSelected,
  14572. isStackedOnMobile,
  14573. mediaAlt,
  14574. mediaId,
  14575. mediaPosition,
  14576. mediaType,
  14577. mediaUrl,
  14578. mediaWidth,
  14579. onSelectMedia,
  14580. onWidthChange
  14581. } = props;
  14582. const {
  14583. toggleSelection
  14584. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  14585. if (mediaType && mediaUrl) {
  14586. const onResizeStart = () => {
  14587. toggleSelection(false);
  14588. };
  14589. const onResize = (event, direction, elt) => {
  14590. onWidthChange(parseInt(elt.style.width));
  14591. };
  14592. const onResizeStop = (event, direction, elt) => {
  14593. toggleSelection(true);
  14594. commitWidthChange(parseInt(elt.style.width));
  14595. };
  14596. const enablePositions = {
  14597. right: mediaPosition === 'left',
  14598. left: mediaPosition === 'right'
  14599. };
  14600. const backgroundStyles = mediaType === 'image' && imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
  14601. const mediaTypeRenderers = {
  14602. image: () => Object(external_wp_element_["createElement"])("img", {
  14603. src: mediaUrl,
  14604. alt: mediaAlt
  14605. }),
  14606. video: () => Object(external_wp_element_["createElement"])("video", {
  14607. controls: true,
  14608. src: mediaUrl
  14609. })
  14610. };
  14611. return Object(external_wp_element_["createElement"])(ResizableBoxContainer, {
  14612. as: "figure",
  14613. className: classnames_default()(className, 'editor-media-container__resizer'),
  14614. style: backgroundStyles,
  14615. size: {
  14616. width: mediaWidth + '%'
  14617. },
  14618. minWidth: "10%",
  14619. maxWidth: "100%",
  14620. enable: enablePositions,
  14621. onResizeStart: onResizeStart,
  14622. onResize: onResize,
  14623. onResizeStop: onResizeStop,
  14624. axis: "x",
  14625. isSelected: isSelected,
  14626. isStackedOnMobile: isStackedOnMobile,
  14627. ref: ref
  14628. }, Object(external_wp_element_["createElement"])(ToolbarEditButton, {
  14629. onSelectMedia: onSelectMedia,
  14630. mediaUrl: mediaUrl,
  14631. mediaId: mediaId
  14632. }), (mediaTypeRenderers[mediaType] || external_lodash_["noop"])());
  14633. }
  14634. return Object(external_wp_element_["createElement"])(PlaceholderContainer, props);
  14635. }
  14636. /* harmony default export */ var media_container = (Object(external_wp_components_["withNotices"])(Object(external_wp_element_["forwardRef"])(MediaContainer)));
  14637. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/deprecated.js
  14638. /**
  14639. * External dependencies
  14640. */
  14641. /**
  14642. * WordPress dependencies
  14643. */
  14644. /**
  14645. * Internal dependencies
  14646. */
  14647. const DEFAULT_MEDIA_WIDTH = 50;
  14648. const media_text_deprecated_migrateCustomColors = attributes => {
  14649. if (!attributes.customBackgroundColor) {
  14650. return attributes;
  14651. }
  14652. const style = {
  14653. color: {
  14654. background: attributes.customBackgroundColor
  14655. }
  14656. };
  14657. return { ...Object(external_lodash_["omit"])(attributes, ['customBackgroundColor']),
  14658. style
  14659. };
  14660. };
  14661. const baseAttributes = {
  14662. align: {
  14663. type: 'string',
  14664. default: 'wide'
  14665. },
  14666. backgroundColor: {
  14667. type: 'string'
  14668. },
  14669. mediaAlt: {
  14670. type: 'string',
  14671. source: 'attribute',
  14672. selector: 'figure img',
  14673. attribute: 'alt',
  14674. default: ''
  14675. },
  14676. mediaPosition: {
  14677. type: 'string',
  14678. default: 'left'
  14679. },
  14680. mediaId: {
  14681. type: 'number'
  14682. },
  14683. mediaType: {
  14684. type: 'string'
  14685. },
  14686. mediaWidth: {
  14687. type: 'number',
  14688. default: 50
  14689. },
  14690. isStackedOnMobile: {
  14691. type: 'boolean',
  14692. default: true
  14693. }
  14694. };
  14695. /* harmony default export */ var media_text_deprecated = ([{
  14696. attributes: { ...baseAttributes,
  14697. customBackgroundColor: {
  14698. type: 'string'
  14699. },
  14700. mediaLink: {
  14701. type: 'string'
  14702. },
  14703. linkDestination: {
  14704. type: 'string'
  14705. },
  14706. linkTarget: {
  14707. type: 'string',
  14708. source: 'attribute',
  14709. selector: 'figure a',
  14710. attribute: 'target'
  14711. },
  14712. href: {
  14713. type: 'string',
  14714. source: 'attribute',
  14715. selector: 'figure a',
  14716. attribute: 'href'
  14717. },
  14718. rel: {
  14719. type: 'string',
  14720. source: 'attribute',
  14721. selector: 'figure a',
  14722. attribute: 'rel'
  14723. },
  14724. linkClass: {
  14725. type: 'string',
  14726. source: 'attribute',
  14727. selector: 'figure a',
  14728. attribute: 'class'
  14729. },
  14730. verticalAlignment: {
  14731. type: 'string'
  14732. },
  14733. imageFill: {
  14734. type: 'boolean'
  14735. },
  14736. focalPoint: {
  14737. type: 'object'
  14738. }
  14739. },
  14740. migrate: media_text_deprecated_migrateCustomColors,
  14741. save({
  14742. attributes
  14743. }) {
  14744. const {
  14745. backgroundColor,
  14746. customBackgroundColor,
  14747. isStackedOnMobile,
  14748. mediaAlt,
  14749. mediaPosition,
  14750. mediaType,
  14751. mediaUrl,
  14752. mediaWidth,
  14753. mediaId,
  14754. verticalAlignment,
  14755. imageFill,
  14756. focalPoint,
  14757. linkClass,
  14758. href,
  14759. linkTarget,
  14760. rel
  14761. } = attributes;
  14762. const newRel = Object(external_lodash_["isEmpty"])(rel) ? undefined : rel;
  14763. let image = Object(external_wp_element_["createElement"])("img", {
  14764. src: mediaUrl,
  14765. alt: mediaAlt,
  14766. className: mediaId && mediaType === 'image' ? `wp-image-${mediaId}` : null
  14767. });
  14768. if (href) {
  14769. image = Object(external_wp_element_["createElement"])("a", {
  14770. className: linkClass,
  14771. href: href,
  14772. target: linkTarget,
  14773. rel: newRel
  14774. }, image);
  14775. }
  14776. const mediaTypeRenders = {
  14777. image: () => image,
  14778. video: () => Object(external_wp_element_["createElement"])("video", {
  14779. controls: true,
  14780. src: mediaUrl
  14781. })
  14782. };
  14783. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  14784. const className = classnames_default()({
  14785. 'has-media-on-the-right': 'right' === mediaPosition,
  14786. 'has-background': backgroundClass || customBackgroundColor,
  14787. [backgroundClass]: backgroundClass,
  14788. 'is-stacked-on-mobile': isStackedOnMobile,
  14789. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
  14790. 'is-image-fill': imageFill
  14791. });
  14792. const backgroundStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
  14793. let gridTemplateColumns;
  14794. if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
  14795. gridTemplateColumns = 'right' === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
  14796. }
  14797. const style = {
  14798. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  14799. gridTemplateColumns
  14800. };
  14801. return Object(external_wp_element_["createElement"])("div", {
  14802. className: className,
  14803. style: style
  14804. }, Object(external_wp_element_["createElement"])("figure", {
  14805. className: "wp-block-media-text__media",
  14806. style: backgroundStyles
  14807. }, (mediaTypeRenders[mediaType] || external_lodash_["noop"])()), Object(external_wp_element_["createElement"])("div", {
  14808. className: "wp-block-media-text__content"
  14809. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  14810. }
  14811. }, {
  14812. attributes: { ...baseAttributes,
  14813. customBackgroundColor: {
  14814. type: 'string'
  14815. },
  14816. mediaUrl: {
  14817. type: 'string',
  14818. source: 'attribute',
  14819. selector: 'figure video,figure img',
  14820. attribute: 'src'
  14821. },
  14822. verticalAlignment: {
  14823. type: 'string'
  14824. },
  14825. imageFill: {
  14826. type: 'boolean'
  14827. },
  14828. focalPoint: {
  14829. type: 'object'
  14830. }
  14831. },
  14832. migrate: media_text_deprecated_migrateCustomColors,
  14833. save({
  14834. attributes
  14835. }) {
  14836. const {
  14837. backgroundColor,
  14838. customBackgroundColor,
  14839. isStackedOnMobile,
  14840. mediaAlt,
  14841. mediaPosition,
  14842. mediaType,
  14843. mediaUrl,
  14844. mediaWidth,
  14845. mediaId,
  14846. verticalAlignment,
  14847. imageFill,
  14848. focalPoint
  14849. } = attributes;
  14850. const mediaTypeRenders = {
  14851. image: () => Object(external_wp_element_["createElement"])("img", {
  14852. src: mediaUrl,
  14853. alt: mediaAlt,
  14854. className: mediaId && mediaType === 'image' ? `wp-image-${mediaId}` : null
  14855. }),
  14856. video: () => Object(external_wp_element_["createElement"])("video", {
  14857. controls: true,
  14858. src: mediaUrl
  14859. })
  14860. };
  14861. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  14862. const className = classnames_default()({
  14863. 'has-media-on-the-right': 'right' === mediaPosition,
  14864. [backgroundClass]: backgroundClass,
  14865. 'is-stacked-on-mobile': isStackedOnMobile,
  14866. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
  14867. 'is-image-fill': imageFill
  14868. });
  14869. const backgroundStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
  14870. let gridTemplateColumns;
  14871. if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
  14872. gridTemplateColumns = 'right' === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
  14873. }
  14874. const style = {
  14875. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  14876. gridTemplateColumns
  14877. };
  14878. return Object(external_wp_element_["createElement"])("div", {
  14879. className: className,
  14880. style: style
  14881. }, Object(external_wp_element_["createElement"])("figure", {
  14882. className: "wp-block-media-text__media",
  14883. style: backgroundStyles
  14884. }, (mediaTypeRenders[mediaType] || external_lodash_["noop"])()), Object(external_wp_element_["createElement"])("div", {
  14885. className: "wp-block-media-text__content"
  14886. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  14887. }
  14888. }, {
  14889. attributes: { ...baseAttributes,
  14890. customBackgroundColor: {
  14891. type: 'string'
  14892. },
  14893. mediaUrl: {
  14894. type: 'string',
  14895. source: 'attribute',
  14896. selector: 'figure video,figure img',
  14897. attribute: 'src'
  14898. }
  14899. },
  14900. save({
  14901. attributes
  14902. }) {
  14903. const {
  14904. backgroundColor,
  14905. customBackgroundColor,
  14906. isStackedOnMobile,
  14907. mediaAlt,
  14908. mediaPosition,
  14909. mediaType,
  14910. mediaUrl,
  14911. mediaWidth
  14912. } = attributes;
  14913. const mediaTypeRenders = {
  14914. image: () => Object(external_wp_element_["createElement"])("img", {
  14915. src: mediaUrl,
  14916. alt: mediaAlt
  14917. }),
  14918. video: () => Object(external_wp_element_["createElement"])("video", {
  14919. controls: true,
  14920. src: mediaUrl
  14921. })
  14922. };
  14923. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  14924. const className = classnames_default()({
  14925. 'has-media-on-the-right': 'right' === mediaPosition,
  14926. [backgroundClass]: backgroundClass,
  14927. 'is-stacked-on-mobile': isStackedOnMobile
  14928. });
  14929. let gridTemplateColumns;
  14930. if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
  14931. gridTemplateColumns = 'right' === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
  14932. }
  14933. const style = {
  14934. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  14935. gridTemplateColumns
  14936. };
  14937. return Object(external_wp_element_["createElement"])("div", {
  14938. className: className,
  14939. style: style
  14940. }, Object(external_wp_element_["createElement"])("figure", {
  14941. className: "wp-block-media-text__media"
  14942. }, (mediaTypeRenders[mediaType] || external_lodash_["noop"])()), Object(external_wp_element_["createElement"])("div", {
  14943. className: "wp-block-media-text__content"
  14944. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  14945. }
  14946. }]);
  14947. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pull-left.js
  14948. /**
  14949. * WordPress dependencies
  14950. */
  14951. const pullLeft = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  14952. xmlns: "http://www.w3.org/2000/svg",
  14953. viewBox: "0 0 24 24"
  14954. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  14955. d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"
  14956. }));
  14957. /* harmony default export */ var pull_left = (pullLeft);
  14958. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pull-right.js
  14959. /**
  14960. * WordPress dependencies
  14961. */
  14962. const pullRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  14963. xmlns: "http://www.w3.org/2000/svg",
  14964. viewBox: "0 0 24 24"
  14965. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  14966. d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"
  14967. }));
  14968. /* harmony default export */ var pull_right = (pullRight);
  14969. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/constants.js
  14970. const DEFAULT_MEDIA_SIZE_SLUG = 'full';
  14971. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/edit.js
  14972. /**
  14973. * External dependencies
  14974. */
  14975. /**
  14976. * WordPress dependencies
  14977. */
  14978. /**
  14979. * Internal dependencies
  14980. */
  14981. /**
  14982. * Constants
  14983. */
  14984. const TEMPLATE = [['core/paragraph', {
  14985. fontSize: 'large',
  14986. placeholder: Object(external_wp_i18n_["_x"])('Content…', 'content placeholder')
  14987. }]]; // this limits the resize to a safe zone to avoid making broken layouts
  14988. const WIDTH_CONSTRAINT_PERCENTAGE = 15;
  14989. const applyWidthConstraints = width => Math.max(WIDTH_CONSTRAINT_PERCENTAGE, Math.min(width, 100 - WIDTH_CONSTRAINT_PERCENTAGE));
  14990. const edit_LINK_DESTINATION_MEDIA = 'media';
  14991. const edit_LINK_DESTINATION_ATTACHMENT = 'attachment';
  14992. function getImageSourceUrlBySizeSlug(image, slug) {
  14993. var _image$media_details, _image$media_details$, _image$media_details$2;
  14994. // eslint-disable-next-line camelcase
  14995. return image === null || image === void 0 ? void 0 : (_image$media_details = image.media_details) === null || _image$media_details === void 0 ? void 0 : (_image$media_details$ = _image$media_details.sizes) === null || _image$media_details$ === void 0 ? void 0 : (_image$media_details$2 = _image$media_details$[slug]) === null || _image$media_details$2 === void 0 ? void 0 : _image$media_details$2.source_url;
  14996. }
  14997. function edit_attributesFromMedia({
  14998. attributes: {
  14999. linkDestination,
  15000. href
  15001. },
  15002. setAttributes
  15003. }) {
  15004. return media => {
  15005. let mediaType;
  15006. let src; // for media selections originated from a file upload.
  15007. if (media.media_type) {
  15008. if (media.media_type === 'image') {
  15009. mediaType = 'image';
  15010. } else {
  15011. // only images and videos are accepted so if the media_type is not an image we can assume it is a video.
  15012. // video contain the media type of 'file' in the object returned from the rest api.
  15013. mediaType = 'video';
  15014. }
  15015. } else {
  15016. // for media selections originated from existing files in the media library.
  15017. mediaType = media.type;
  15018. }
  15019. if (mediaType === 'image') {
  15020. var _media$sizes, _media$sizes$large, _media$media_details, _media$media_details$, _media$media_details$2;
  15021. // Try the "large" size URL, falling back to the "full" size URL below.
  15022. src = ((_media$sizes = media.sizes) === null || _media$sizes === void 0 ? void 0 : (_media$sizes$large = _media$sizes.large) === null || _media$sizes$large === void 0 ? void 0 : _media$sizes$large.url) || ( // eslint-disable-next-line camelcase
  15023. (_media$media_details = media.media_details) === null || _media$media_details === void 0 ? void 0 : (_media$media_details$ = _media$media_details.sizes) === null || _media$media_details$ === void 0 ? void 0 : (_media$media_details$2 = _media$media_details$.large) === null || _media$media_details$2 === void 0 ? void 0 : _media$media_details$2.source_url);
  15024. }
  15025. let newHref = href;
  15026. if (linkDestination === edit_LINK_DESTINATION_MEDIA) {
  15027. // Update the media link.
  15028. newHref = media.url;
  15029. } // Check if the image is linked to the attachment page.
  15030. if (linkDestination === edit_LINK_DESTINATION_ATTACHMENT) {
  15031. // Update the media link.
  15032. newHref = media.link;
  15033. }
  15034. setAttributes({
  15035. mediaAlt: media.alt,
  15036. mediaId: media.id,
  15037. mediaType,
  15038. mediaUrl: src || media.url,
  15039. mediaLink: media.link || undefined,
  15040. href: newHref,
  15041. focalPoint: undefined
  15042. });
  15043. };
  15044. }
  15045. function MediaTextEdit({
  15046. attributes,
  15047. isSelected,
  15048. setAttributes
  15049. }) {
  15050. const {
  15051. focalPoint,
  15052. href,
  15053. imageFill,
  15054. isStackedOnMobile,
  15055. linkClass,
  15056. linkDestination,
  15057. linkTarget,
  15058. mediaAlt,
  15059. mediaId,
  15060. mediaPosition,
  15061. mediaType,
  15062. mediaUrl,
  15063. mediaWidth,
  15064. rel,
  15065. verticalAlignment
  15066. } = attributes;
  15067. const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
  15068. const image = Object(external_wp_data_["useSelect"])(select => mediaId && isSelected ? select(external_wp_coreData_["store"]).getMedia(mediaId) : null, [isSelected, mediaId]);
  15069. const refMediaContainer = Object(external_wp_element_["useRef"])();
  15070. const imperativeFocalPointPreview = value => {
  15071. const {
  15072. style
  15073. } = refMediaContainer.current.resizable;
  15074. const {
  15075. x,
  15076. y
  15077. } = value;
  15078. style.backgroundPosition = `${x * 100}% ${y * 100}%`;
  15079. };
  15080. const [temporaryMediaWidth, setTemporaryMediaWidth] = Object(external_wp_element_["useState"])(null);
  15081. const onSelectMedia = edit_attributesFromMedia({
  15082. attributes,
  15083. setAttributes
  15084. });
  15085. const onSetHref = props => {
  15086. setAttributes(props);
  15087. };
  15088. const onWidthChange = width => {
  15089. setTemporaryMediaWidth(applyWidthConstraints(width));
  15090. };
  15091. const commitWidthChange = width => {
  15092. setAttributes({
  15093. mediaWidth: applyWidthConstraints(width)
  15094. });
  15095. setTemporaryMediaWidth(applyWidthConstraints(width));
  15096. };
  15097. const classNames = classnames_default()({
  15098. 'has-media-on-the-right': 'right' === mediaPosition,
  15099. 'is-selected': isSelected,
  15100. 'is-stacked-on-mobile': isStackedOnMobile,
  15101. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
  15102. 'is-image-fill': imageFill
  15103. });
  15104. const widthString = `${temporaryMediaWidth || mediaWidth}%`;
  15105. const gridTemplateColumns = 'right' === mediaPosition ? `1fr ${widthString}` : `${widthString} 1fr`;
  15106. const style = {
  15107. gridTemplateColumns,
  15108. msGridColumns: gridTemplateColumns
  15109. };
  15110. const onMediaAltChange = newMediaAlt => {
  15111. setAttributes({
  15112. mediaAlt: newMediaAlt
  15113. });
  15114. };
  15115. const onVerticalAlignmentChange = alignment => {
  15116. setAttributes({
  15117. verticalAlignment: alignment
  15118. });
  15119. };
  15120. const imageSizes = Object(external_wp_data_["useSelect"])(select => {
  15121. const settings = select(external_wp_blockEditor_["store"]).getSettings();
  15122. return settings === null || settings === void 0 ? void 0 : settings.imageSizes;
  15123. });
  15124. const imageSizeOptions = Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, ({
  15125. slug
  15126. }) => getImageSourceUrlBySizeSlug(image, slug)), ({
  15127. name,
  15128. slug
  15129. }) => ({
  15130. value: slug,
  15131. label: name
  15132. }));
  15133. const updateImage = newMediaSizeSlug => {
  15134. const newUrl = getImageSourceUrlBySizeSlug(image, newMediaSizeSlug);
  15135. if (!newUrl) {
  15136. return null;
  15137. }
  15138. setAttributes({
  15139. mediaUrl: newUrl,
  15140. mediaSizeSlug: newMediaSizeSlug
  15141. });
  15142. };
  15143. const mediaTextGeneralSettings = Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  15144. title: Object(external_wp_i18n_["__"])('Media & Text settings')
  15145. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15146. label: Object(external_wp_i18n_["__"])('Stack on mobile'),
  15147. checked: isStackedOnMobile,
  15148. onChange: () => setAttributes({
  15149. isStackedOnMobile: !isStackedOnMobile
  15150. })
  15151. }), mediaType === 'image' && Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15152. label: Object(external_wp_i18n_["__"])('Crop image to fill entire column'),
  15153. checked: imageFill,
  15154. onChange: () => setAttributes({
  15155. imageFill: !imageFill
  15156. })
  15157. }), imageFill && mediaUrl && mediaType === 'image' && Object(external_wp_element_["createElement"])(external_wp_components_["FocalPointPicker"], {
  15158. label: Object(external_wp_i18n_["__"])('Focal point picker'),
  15159. url: mediaUrl,
  15160. value: focalPoint,
  15161. onChange: value => setAttributes({
  15162. focalPoint: value
  15163. }),
  15164. onDragStart: imperativeFocalPointPreview,
  15165. onDrag: imperativeFocalPointPreview
  15166. }), mediaType === 'image' && Object(external_wp_element_["createElement"])(external_wp_components_["TextareaControl"], {
  15167. label: Object(external_wp_i18n_["__"])('Alt text (alternative text)'),
  15168. value: mediaAlt,
  15169. onChange: onMediaAltChange,
  15170. help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
  15171. href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
  15172. }, Object(external_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_wp_i18n_["__"])('Leave empty if the image is purely decorative.'))
  15173. }), mediaType === 'image' && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageSizeControl"], {
  15174. onChangeImage: updateImage,
  15175. slug: mediaSizeSlug,
  15176. imageSizeOptions: imageSizeOptions,
  15177. isResizable: false
  15178. }), mediaUrl && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  15179. label: Object(external_wp_i18n_["__"])('Media width'),
  15180. value: temporaryMediaWidth || mediaWidth,
  15181. onChange: commitWidthChange,
  15182. min: WIDTH_CONSTRAINT_PERCENTAGE,
  15183. max: 100 - WIDTH_CONSTRAINT_PERCENTAGE
  15184. }));
  15185. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  15186. className: classNames,
  15187. style
  15188. });
  15189. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({
  15190. className: 'wp-block-media-text__content'
  15191. }, {
  15192. template: TEMPLATE
  15193. });
  15194. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, mediaTextGeneralSettings), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  15195. group: "block"
  15196. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockVerticalAlignmentControl"], {
  15197. onChange: onVerticalAlignmentChange,
  15198. value: verticalAlignment
  15199. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  15200. icon: pull_left,
  15201. title: Object(external_wp_i18n_["__"])('Show media on left'),
  15202. isActive: mediaPosition === 'left',
  15203. onClick: () => setAttributes({
  15204. mediaPosition: 'left'
  15205. })
  15206. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  15207. icon: pull_right,
  15208. title: Object(external_wp_i18n_["__"])('Show media on right'),
  15209. isActive: mediaPosition === 'right',
  15210. onClick: () => setAttributes({
  15211. mediaPosition: 'right'
  15212. })
  15213. }), mediaType === 'image' && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageURLInputUI"], {
  15214. url: href || '',
  15215. onChangeUrl: onSetHref,
  15216. linkDestination: linkDestination,
  15217. mediaType: mediaType,
  15218. mediaUrl: image && image.source_url,
  15219. mediaLink: image && image.link,
  15220. linkTarget: linkTarget,
  15221. linkClass: linkClass,
  15222. rel: rel
  15223. })), Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(media_container, {
  15224. className: "wp-block-media-text__media",
  15225. onSelectMedia: onSelectMedia,
  15226. onWidthChange: onWidthChange,
  15227. commitWidthChange: commitWidthChange,
  15228. ref: refMediaContainer,
  15229. focalPoint,
  15230. imageFill,
  15231. isSelected,
  15232. isStackedOnMobile,
  15233. mediaAlt,
  15234. mediaId,
  15235. mediaPosition,
  15236. mediaType,
  15237. mediaUrl,
  15238. mediaWidth
  15239. }), Object(external_wp_element_["createElement"])("div", innerBlocksProps)));
  15240. }
  15241. /* harmony default export */ var media_text_edit = (MediaTextEdit);
  15242. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/save.js
  15243. /**
  15244. * External dependencies
  15245. */
  15246. /**
  15247. * WordPress dependencies
  15248. */
  15249. /**
  15250. * Internal dependencies
  15251. */
  15252. const save_DEFAULT_MEDIA_WIDTH = 50;
  15253. function media_text_save_save({
  15254. attributes
  15255. }) {
  15256. const {
  15257. isStackedOnMobile,
  15258. mediaAlt,
  15259. mediaPosition,
  15260. mediaType,
  15261. mediaUrl,
  15262. mediaWidth,
  15263. mediaId,
  15264. verticalAlignment,
  15265. imageFill,
  15266. focalPoint,
  15267. linkClass,
  15268. href,
  15269. linkTarget,
  15270. rel
  15271. } = attributes;
  15272. const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
  15273. const newRel = Object(external_lodash_["isEmpty"])(rel) ? undefined : rel;
  15274. const imageClasses = classnames_default()({
  15275. [`wp-image-${mediaId}`]: mediaId && mediaType === 'image',
  15276. [`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image'
  15277. });
  15278. let image = Object(external_wp_element_["createElement"])("img", {
  15279. src: mediaUrl,
  15280. alt: mediaAlt,
  15281. className: imageClasses || null
  15282. });
  15283. if (href) {
  15284. image = Object(external_wp_element_["createElement"])("a", {
  15285. className: linkClass,
  15286. href: href,
  15287. target: linkTarget,
  15288. rel: newRel
  15289. }, image);
  15290. }
  15291. const mediaTypeRenders = {
  15292. image: () => image,
  15293. video: () => Object(external_wp_element_["createElement"])("video", {
  15294. controls: true,
  15295. src: mediaUrl
  15296. })
  15297. };
  15298. const className = classnames_default()({
  15299. 'has-media-on-the-right': 'right' === mediaPosition,
  15300. 'is-stacked-on-mobile': isStackedOnMobile,
  15301. [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
  15302. 'is-image-fill': imageFill
  15303. });
  15304. const backgroundStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
  15305. let gridTemplateColumns;
  15306. if (mediaWidth !== save_DEFAULT_MEDIA_WIDTH) {
  15307. gridTemplateColumns = 'right' === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
  15308. }
  15309. const style = {
  15310. gridTemplateColumns
  15311. };
  15312. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  15313. className,
  15314. style
  15315. }), Object(external_wp_element_["createElement"])("figure", {
  15316. className: "wp-block-media-text__media",
  15317. style: backgroundStyles
  15318. }, (mediaTypeRenders[mediaType] || external_lodash_["noop"])()), Object(external_wp_element_["createElement"])("div", {
  15319. className: "wp-block-media-text__content"
  15320. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  15321. }
  15322. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/transforms.js
  15323. /**
  15324. * WordPress dependencies
  15325. */
  15326. const media_text_transforms_transforms = {
  15327. from: [{
  15328. type: 'block',
  15329. blocks: ['core/image'],
  15330. transform: ({
  15331. alt,
  15332. url,
  15333. id,
  15334. anchor
  15335. }) => Object(external_wp_blocks_["createBlock"])('core/media-text', {
  15336. mediaAlt: alt,
  15337. mediaId: id,
  15338. mediaUrl: url,
  15339. mediaType: 'image',
  15340. anchor
  15341. })
  15342. }, {
  15343. type: 'block',
  15344. blocks: ['core/video'],
  15345. transform: ({
  15346. src,
  15347. id,
  15348. anchor
  15349. }) => Object(external_wp_blocks_["createBlock"])('core/media-text', {
  15350. mediaId: id,
  15351. mediaUrl: src,
  15352. mediaType: 'video',
  15353. anchor
  15354. })
  15355. }],
  15356. to: [{
  15357. type: 'block',
  15358. blocks: ['core/image'],
  15359. isMatch: ({
  15360. mediaType,
  15361. mediaUrl
  15362. }) => {
  15363. return !mediaUrl || mediaType === 'image';
  15364. },
  15365. transform: ({
  15366. mediaAlt,
  15367. mediaId,
  15368. mediaUrl,
  15369. anchor
  15370. }) => {
  15371. return Object(external_wp_blocks_["createBlock"])('core/image', {
  15372. alt: mediaAlt,
  15373. id: mediaId,
  15374. url: mediaUrl,
  15375. anchor
  15376. });
  15377. }
  15378. }, {
  15379. type: 'block',
  15380. blocks: ['core/video'],
  15381. isMatch: ({
  15382. mediaType,
  15383. mediaUrl
  15384. }) => {
  15385. return !mediaUrl || mediaType === 'video';
  15386. },
  15387. transform: ({
  15388. mediaId,
  15389. mediaUrl,
  15390. anchor
  15391. }) => {
  15392. return Object(external_wp_blocks_["createBlock"])('core/video', {
  15393. id: mediaId,
  15394. src: mediaUrl,
  15395. anchor
  15396. });
  15397. }
  15398. }]
  15399. };
  15400. /* harmony default export */ var media_text_transforms = (media_text_transforms_transforms);
  15401. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
  15402. /**
  15403. * WordPress dependencies
  15404. */
  15405. /**
  15406. * Internal dependencies
  15407. */
  15408. const media_text_metadata = {
  15409. apiVersion: 2,
  15410. name: "core/media-text",
  15411. title: "Media & Text",
  15412. category: "media",
  15413. description: "Set media and words side-by-side for a richer layout.",
  15414. keywords: ["image", "video"],
  15415. textdomain: "default",
  15416. attributes: {
  15417. align: {
  15418. type: "string",
  15419. "default": "wide"
  15420. },
  15421. mediaAlt: {
  15422. type: "string",
  15423. source: "attribute",
  15424. selector: "figure img",
  15425. attribute: "alt",
  15426. "default": ""
  15427. },
  15428. mediaPosition: {
  15429. type: "string",
  15430. "default": "left"
  15431. },
  15432. mediaId: {
  15433. type: "number"
  15434. },
  15435. mediaUrl: {
  15436. type: "string",
  15437. source: "attribute",
  15438. selector: "figure video,figure img",
  15439. attribute: "src"
  15440. },
  15441. mediaLink: {
  15442. type: "string"
  15443. },
  15444. linkDestination: {
  15445. type: "string"
  15446. },
  15447. linkTarget: {
  15448. type: "string",
  15449. source: "attribute",
  15450. selector: "figure a",
  15451. attribute: "target"
  15452. },
  15453. href: {
  15454. type: "string",
  15455. source: "attribute",
  15456. selector: "figure a",
  15457. attribute: "href"
  15458. },
  15459. rel: {
  15460. type: "string",
  15461. source: "attribute",
  15462. selector: "figure a",
  15463. attribute: "rel"
  15464. },
  15465. linkClass: {
  15466. type: "string",
  15467. source: "attribute",
  15468. selector: "figure a",
  15469. attribute: "class"
  15470. },
  15471. mediaType: {
  15472. type: "string"
  15473. },
  15474. mediaWidth: {
  15475. type: "number",
  15476. "default": 50
  15477. },
  15478. mediaSizeSlug: {
  15479. type: "string"
  15480. },
  15481. isStackedOnMobile: {
  15482. type: "boolean",
  15483. "default": true
  15484. },
  15485. verticalAlignment: {
  15486. type: "string"
  15487. },
  15488. imageFill: {
  15489. type: "boolean"
  15490. },
  15491. focalPoint: {
  15492. type: "object"
  15493. }
  15494. },
  15495. supports: {
  15496. anchor: true,
  15497. align: ["wide", "full"],
  15498. html: false,
  15499. color: {
  15500. gradients: true,
  15501. link: true
  15502. }
  15503. },
  15504. editorStyle: "wp-block-media-text-editor",
  15505. style: "wp-block-media-text"
  15506. };
  15507. const {
  15508. name: media_text_name
  15509. } = media_text_metadata;
  15510. const media_text_settings = {
  15511. icon: media_and_text,
  15512. example: {
  15513. attributes: {
  15514. mediaType: 'image',
  15515. mediaUrl: 'https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg'
  15516. },
  15517. innerBlocks: [{
  15518. name: 'core/paragraph',
  15519. attributes: {
  15520. content: Object(external_wp_i18n_["__"])('The wren<br>Earns his living<br>Noiselessly.')
  15521. }
  15522. }, {
  15523. name: 'core/paragraph',
  15524. attributes: {
  15525. content: Object(external_wp_i18n_["__"])('— Kobayashi Issa (一茶)')
  15526. }
  15527. }]
  15528. },
  15529. transforms: media_text_transforms,
  15530. edit: media_text_edit,
  15531. save: media_text_save_save,
  15532. deprecated: media_text_deprecated
  15533. };
  15534. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment.js
  15535. /**
  15536. * WordPress dependencies
  15537. */
  15538. const comment = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  15539. viewBox: "0 0 24 24",
  15540. xmlns: "http://www.w3.org/2000/svg"
  15541. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  15542. d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"
  15543. }));
  15544. /* harmony default export */ var library_comment = (comment);
  15545. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-comments/edit.js
  15546. /**
  15547. * WordPress dependencies
  15548. */
  15549. /**
  15550. * Minimum number of comments a user can show using this block.
  15551. *
  15552. * @type {number}
  15553. */
  15554. const MIN_COMMENTS = 1;
  15555. /**
  15556. * Maximum number of comments a user can show using this block.
  15557. *
  15558. * @type {number}
  15559. */
  15560. const MAX_COMMENTS = 100;
  15561. function LatestComments({
  15562. attributes,
  15563. setAttributes
  15564. }) {
  15565. const {
  15566. commentsToShow,
  15567. displayAvatar,
  15568. displayDate,
  15569. displayExcerpt
  15570. } = attributes;
  15571. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  15572. title: Object(external_wp_i18n_["__"])('Latest comments settings')
  15573. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15574. label: Object(external_wp_i18n_["__"])('Display avatar'),
  15575. checked: displayAvatar,
  15576. onChange: () => setAttributes({
  15577. displayAvatar: !displayAvatar
  15578. })
  15579. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15580. label: Object(external_wp_i18n_["__"])('Display date'),
  15581. checked: displayDate,
  15582. onChange: () => setAttributes({
  15583. displayDate: !displayDate
  15584. })
  15585. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15586. label: Object(external_wp_i18n_["__"])('Display excerpt'),
  15587. checked: displayExcerpt,
  15588. onChange: () => setAttributes({
  15589. displayExcerpt: !displayExcerpt
  15590. })
  15591. }), Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  15592. label: Object(external_wp_i18n_["__"])('Number of comments'),
  15593. value: commentsToShow,
  15594. onChange: value => setAttributes({
  15595. commentsToShow: value
  15596. }),
  15597. min: MIN_COMMENTS,
  15598. max: MAX_COMMENTS,
  15599. required: true
  15600. }))), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
  15601. block: "core/latest-comments",
  15602. attributes: attributes
  15603. })));
  15604. }
  15605. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
  15606. /**
  15607. * WordPress dependencies
  15608. */
  15609. /**
  15610. * Internal dependencies
  15611. */
  15612. const latest_comments_metadata = {
  15613. apiVersion: 2,
  15614. name: "core/latest-comments",
  15615. title: "Latest Comments",
  15616. category: "widgets",
  15617. description: "Display a list of your most recent comments.",
  15618. keywords: ["recent comments"],
  15619. textdomain: "default",
  15620. attributes: {
  15621. commentsToShow: {
  15622. type: "number",
  15623. "default": 5,
  15624. minimum: 1,
  15625. maximum: 100
  15626. },
  15627. displayAvatar: {
  15628. type: "boolean",
  15629. "default": true
  15630. },
  15631. displayDate: {
  15632. type: "boolean",
  15633. "default": true
  15634. },
  15635. displayExcerpt: {
  15636. type: "boolean",
  15637. "default": true
  15638. }
  15639. },
  15640. supports: {
  15641. align: true,
  15642. html: false
  15643. },
  15644. editorStyle: "wp-block-latest-comments-editor",
  15645. style: "wp-block-latest-comments"
  15646. };
  15647. const {
  15648. name: latest_comments_name
  15649. } = latest_comments_metadata;
  15650. const latest_comments_settings = {
  15651. icon: library_comment,
  15652. example: {},
  15653. edit: LatestComments
  15654. };
  15655. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-list.js
  15656. /**
  15657. * WordPress dependencies
  15658. */
  15659. const postList = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  15660. viewBox: "0 0 24 24",
  15661. xmlns: "http://www.w3.org/2000/svg"
  15662. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  15663. d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"
  15664. }));
  15665. /* harmony default export */ var post_list = (postList);
  15666. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/deprecated.js
  15667. /**
  15668. * Internal dependencies
  15669. */
  15670. const latest_posts_deprecated_metadata = {
  15671. apiVersion: 2,
  15672. name: "core/latest-posts",
  15673. title: "Latest Posts",
  15674. category: "widgets",
  15675. description: "Display a list of your most recent posts.",
  15676. keywords: ["recent posts"],
  15677. textdomain: "default",
  15678. attributes: {
  15679. categories: {
  15680. type: "array",
  15681. items: {
  15682. type: "object"
  15683. }
  15684. },
  15685. selectedAuthor: {
  15686. type: "number"
  15687. },
  15688. postsToShow: {
  15689. type: "number",
  15690. "default": 5
  15691. },
  15692. displayPostContent: {
  15693. type: "boolean",
  15694. "default": false
  15695. },
  15696. displayPostContentRadio: {
  15697. type: "string",
  15698. "default": "excerpt"
  15699. },
  15700. excerptLength: {
  15701. type: "number",
  15702. "default": 55
  15703. },
  15704. displayAuthor: {
  15705. type: "boolean",
  15706. "default": false
  15707. },
  15708. displayPostDate: {
  15709. type: "boolean",
  15710. "default": false
  15711. },
  15712. postLayout: {
  15713. type: "string",
  15714. "default": "list"
  15715. },
  15716. columns: {
  15717. type: "number",
  15718. "default": 3
  15719. },
  15720. order: {
  15721. type: "string",
  15722. "default": "desc"
  15723. },
  15724. orderBy: {
  15725. type: "string",
  15726. "default": "date"
  15727. },
  15728. displayFeaturedImage: {
  15729. type: "boolean",
  15730. "default": false
  15731. },
  15732. featuredImageAlign: {
  15733. type: "string",
  15734. "enum": ["left", "center", "right"]
  15735. },
  15736. featuredImageSizeSlug: {
  15737. type: "string",
  15738. "default": "thumbnail"
  15739. },
  15740. featuredImageSizeWidth: {
  15741. type: "number",
  15742. "default": null
  15743. },
  15744. featuredImageSizeHeight: {
  15745. type: "number",
  15746. "default": null
  15747. },
  15748. addLinkToFeaturedImage: {
  15749. type: "boolean",
  15750. "default": false
  15751. }
  15752. },
  15753. supports: {
  15754. align: true,
  15755. html: false
  15756. },
  15757. editorStyle: "wp-block-latest-posts-editor",
  15758. style: "wp-block-latest-posts"
  15759. };
  15760. const {
  15761. attributes: deprecated_attributes
  15762. } = latest_posts_deprecated_metadata;
  15763. /* harmony default export */ var latest_posts_deprecated = ([{
  15764. attributes: { ...deprecated_attributes,
  15765. categories: {
  15766. type: 'string'
  15767. }
  15768. },
  15769. supports: {
  15770. align: true,
  15771. html: false
  15772. },
  15773. migrate: oldAttributes => {
  15774. // This needs the full category object, not just the ID.
  15775. return { ...oldAttributes,
  15776. categories: [{
  15777. id: Number(oldAttributes.categories)
  15778. }]
  15779. };
  15780. },
  15781. isEligible: ({
  15782. categories
  15783. }) => categories && 'string' === typeof categories,
  15784. save: () => null
  15785. }]);
  15786. // EXTERNAL MODULE: external ["wp","date"]
  15787. var external_wp_date_ = __webpack_require__("FqII");
  15788. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list.js
  15789. /**
  15790. * WordPress dependencies
  15791. */
  15792. const list = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  15793. viewBox: "0 0 24 24",
  15794. xmlns: "http://www.w3.org/2000/svg"
  15795. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  15796. d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"
  15797. }));
  15798. /* harmony default export */ var library_list = (list);
  15799. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js
  15800. var grid = __webpack_require__("b2RC");
  15801. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/constants.js
  15802. const MIN_EXCERPT_LENGTH = 10;
  15803. const MAX_EXCERPT_LENGTH = 100;
  15804. const MAX_POSTS_COLUMNS = 6;
  15805. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/edit.js
  15806. /**
  15807. * External dependencies
  15808. */
  15809. /**
  15810. * WordPress dependencies
  15811. */
  15812. /**
  15813. * Internal dependencies
  15814. */
  15815. /**
  15816. * Module Constants
  15817. */
  15818. const CATEGORIES_LIST_QUERY = {
  15819. per_page: -1
  15820. };
  15821. const USERS_LIST_QUERY = {
  15822. per_page: -1
  15823. };
  15824. function LatestPostsEdit({
  15825. attributes,
  15826. setAttributes
  15827. }) {
  15828. const {
  15829. postsToShow,
  15830. order,
  15831. orderBy,
  15832. categories,
  15833. selectedAuthor,
  15834. displayFeaturedImage,
  15835. displayPostContentRadio,
  15836. displayPostContent,
  15837. displayPostDate,
  15838. displayAuthor,
  15839. postLayout,
  15840. columns,
  15841. excerptLength,
  15842. featuredImageAlign,
  15843. featuredImageSizeSlug,
  15844. featuredImageSizeWidth,
  15845. featuredImageSizeHeight,
  15846. addLinkToFeaturedImage
  15847. } = attributes;
  15848. const {
  15849. imageSizeOptions,
  15850. latestPosts,
  15851. defaultImageWidth,
  15852. defaultImageHeight
  15853. } = Object(external_wp_data_["useSelect"])(select => {
  15854. const {
  15855. getEntityRecords,
  15856. getMedia
  15857. } = select(external_wp_coreData_["store"]);
  15858. const {
  15859. getSettings
  15860. } = select(external_wp_blockEditor_["store"]);
  15861. const {
  15862. imageSizes,
  15863. imageDimensions
  15864. } = getSettings();
  15865. const catIds = categories && categories.length > 0 ? categories.map(cat => cat.id) : [];
  15866. const latestPostsQuery = Object(external_lodash_["pickBy"])({
  15867. categories: catIds,
  15868. author: selectedAuthor,
  15869. order,
  15870. orderby: orderBy,
  15871. per_page: postsToShow
  15872. }, value => !Object(external_lodash_["isUndefined"])(value));
  15873. const posts = getEntityRecords('postType', 'post', latestPostsQuery);
  15874. return {
  15875. defaultImageWidth: Object(external_lodash_["get"])(imageDimensions, [featuredImageSizeSlug, 'width'], 0),
  15876. defaultImageHeight: Object(external_lodash_["get"])(imageDimensions, [featuredImageSizeSlug, 'height'], 0),
  15877. imageSizeOptions: imageSizes.filter(({
  15878. slug
  15879. }) => slug !== 'full').map(({
  15880. name,
  15881. slug
  15882. }) => ({
  15883. value: slug,
  15884. label: name
  15885. })),
  15886. latestPosts: !Array.isArray(posts) ? posts : posts.map(post => {
  15887. if (!post.featured_media) return post;
  15888. const image = getMedia(post.featured_media);
  15889. let url = Object(external_lodash_["get"])(image, ['media_details', 'sizes', featuredImageSizeSlug, 'source_url'], null);
  15890. if (!url) {
  15891. url = Object(external_lodash_["get"])(image, 'source_url', null);
  15892. }
  15893. const featuredImageInfo = {
  15894. url,
  15895. // eslint-disable-next-line camelcase
  15896. alt: image === null || image === void 0 ? void 0 : image.alt_text
  15897. };
  15898. return { ...post,
  15899. featuredImageInfo
  15900. };
  15901. })
  15902. };
  15903. }, [featuredImageSizeSlug, postsToShow, order, orderBy, categories, selectedAuthor]);
  15904. const [categoriesList, setCategoriesList] = Object(external_wp_element_["useState"])([]);
  15905. const [authorList, setAuthorList] = Object(external_wp_element_["useState"])([]);
  15906. const categorySuggestions = categoriesList.reduce((accumulator, category) => ({ ...accumulator,
  15907. [category.name]: category
  15908. }), {});
  15909. const selectCategories = tokens => {
  15910. const hasNoSuggestion = tokens.some(token => typeof token === 'string' && !categorySuggestions[token]);
  15911. if (hasNoSuggestion) {
  15912. return;
  15913. } // Categories that are already will be objects, while new additions will be strings (the name).
  15914. // allCategories nomalizes the array so that they are all objects.
  15915. const allCategories = tokens.map(token => {
  15916. return typeof token === 'string' ? categorySuggestions[token] : token;
  15917. }); // We do nothing if the category is not selected
  15918. // from suggestions.
  15919. if (Object(external_lodash_["includes"])(allCategories, null)) {
  15920. return false;
  15921. }
  15922. setAttributes({
  15923. categories: allCategories
  15924. });
  15925. };
  15926. const isStillMounted = Object(external_wp_element_["useRef"])();
  15927. Object(external_wp_element_["useEffect"])(() => {
  15928. isStillMounted.current = true;
  15929. external_wp_apiFetch_default()({
  15930. path: Object(external_wp_url_["addQueryArgs"])(`/wp/v2/categories`, CATEGORIES_LIST_QUERY)
  15931. }).then(data => {
  15932. if (isStillMounted.current) {
  15933. setCategoriesList(data);
  15934. }
  15935. }).catch(() => {
  15936. if (isStillMounted.current) {
  15937. setCategoriesList([]);
  15938. }
  15939. });
  15940. external_wp_apiFetch_default()({
  15941. path: Object(external_wp_url_["addQueryArgs"])(`/wp/v2/users`, USERS_LIST_QUERY)
  15942. }).then(data => {
  15943. if (isStillMounted.current) {
  15944. setAuthorList(data);
  15945. }
  15946. }).catch(() => {
  15947. if (isStillMounted.current) {
  15948. setAuthorList([]);
  15949. }
  15950. });
  15951. return () => {
  15952. isStillMounted.current = false;
  15953. };
  15954. }, []);
  15955. const hasPosts = !!(latestPosts !== null && latestPosts !== void 0 && latestPosts.length);
  15956. const inspectorControls = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  15957. title: Object(external_wp_i18n_["__"])('Post content settings')
  15958. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15959. label: Object(external_wp_i18n_["__"])('Post content'),
  15960. checked: displayPostContent,
  15961. onChange: value => setAttributes({
  15962. displayPostContent: value
  15963. })
  15964. }), displayPostContent && Object(external_wp_element_["createElement"])(external_wp_components_["RadioControl"], {
  15965. label: Object(external_wp_i18n_["__"])('Show:'),
  15966. selected: displayPostContentRadio,
  15967. options: [{
  15968. label: Object(external_wp_i18n_["__"])('Excerpt'),
  15969. value: 'excerpt'
  15970. }, {
  15971. label: Object(external_wp_i18n_["__"])('Full post'),
  15972. value: 'full_post'
  15973. }],
  15974. onChange: value => setAttributes({
  15975. displayPostContentRadio: value
  15976. })
  15977. }), displayPostContent && displayPostContentRadio === 'excerpt' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  15978. label: Object(external_wp_i18n_["__"])('Max number of words in excerpt'),
  15979. value: excerptLength,
  15980. onChange: value => setAttributes({
  15981. excerptLength: value
  15982. }),
  15983. min: MIN_EXCERPT_LENGTH,
  15984. max: MAX_EXCERPT_LENGTH
  15985. })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  15986. title: Object(external_wp_i18n_["__"])('Post meta settings')
  15987. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15988. label: Object(external_wp_i18n_["__"])('Display author name'),
  15989. checked: displayAuthor,
  15990. onChange: value => setAttributes({
  15991. displayAuthor: value
  15992. })
  15993. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  15994. label: Object(external_wp_i18n_["__"])('Display post date'),
  15995. checked: displayPostDate,
  15996. onChange: value => setAttributes({
  15997. displayPostDate: value
  15998. })
  15999. })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  16000. title: Object(external_wp_i18n_["__"])('Featured image settings')
  16001. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  16002. label: Object(external_wp_i18n_["__"])('Display featured image'),
  16003. checked: displayFeaturedImage,
  16004. onChange: value => setAttributes({
  16005. displayFeaturedImage: value
  16006. })
  16007. }), displayFeaturedImage && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageSizeControl"], {
  16008. onChange: value => {
  16009. const newAttrs = {};
  16010. if (value.hasOwnProperty('width')) {
  16011. newAttrs.featuredImageSizeWidth = value.width;
  16012. }
  16013. if (value.hasOwnProperty('height')) {
  16014. newAttrs.featuredImageSizeHeight = value.height;
  16015. }
  16016. setAttributes(newAttrs);
  16017. },
  16018. slug: featuredImageSizeSlug,
  16019. width: featuredImageSizeWidth,
  16020. height: featuredImageSizeHeight,
  16021. imageWidth: defaultImageWidth,
  16022. imageHeight: defaultImageHeight,
  16023. imageSizeOptions: imageSizeOptions,
  16024. onChangeImage: value => setAttributes({
  16025. featuredImageSizeSlug: value,
  16026. featuredImageSizeWidth: undefined,
  16027. featuredImageSizeHeight: undefined
  16028. })
  16029. }), Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
  16030. className: "block-editor-image-alignment-control__row"
  16031. }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, Object(external_wp_i18n_["__"])('Image alignment')), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentToolbar"], {
  16032. value: featuredImageAlign,
  16033. onChange: value => setAttributes({
  16034. featuredImageAlign: value
  16035. }),
  16036. controls: ['left', 'center', 'right'],
  16037. isCollapsed: false
  16038. })), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  16039. label: Object(external_wp_i18n_["__"])('Add link to featured image'),
  16040. checked: addLinkToFeaturedImage,
  16041. onChange: value => setAttributes({
  16042. addLinkToFeaturedImage: value
  16043. })
  16044. }))), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  16045. title: Object(external_wp_i18n_["__"])('Sorting and filtering')
  16046. }, Object(external_wp_element_["createElement"])(external_wp_components_["QueryControls"], {
  16047. order,
  16048. orderBy,
  16049. numberOfItems: postsToShow,
  16050. onOrderChange: value => setAttributes({
  16051. order: value
  16052. }),
  16053. onOrderByChange: value => setAttributes({
  16054. orderBy: value
  16055. }),
  16056. onNumberOfItemsChange: value => setAttributes({
  16057. postsToShow: value
  16058. }),
  16059. categorySuggestions: categorySuggestions,
  16060. onCategoryChange: selectCategories,
  16061. selectedCategories: categories,
  16062. onAuthorChange: value => setAttributes({
  16063. selectedAuthor: '' !== value ? Number(value) : undefined
  16064. }),
  16065. authorList: authorList,
  16066. selectedAuthorId: selectedAuthor
  16067. }), postLayout === 'grid' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  16068. label: Object(external_wp_i18n_["__"])('Columns'),
  16069. value: columns,
  16070. onChange: value => setAttributes({
  16071. columns: value
  16072. }),
  16073. min: 2,
  16074. max: !hasPosts ? MAX_POSTS_COLUMNS : Math.min(MAX_POSTS_COLUMNS, latestPosts.length),
  16075. required: true
  16076. })));
  16077. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  16078. className: classnames_default()({
  16079. 'wp-block-latest-posts__list': true,
  16080. 'is-grid': postLayout === 'grid',
  16081. 'has-dates': displayPostDate,
  16082. 'has-author': displayAuthor,
  16083. [`columns-${columns}`]: postLayout === 'grid'
  16084. })
  16085. });
  16086. if (!hasPosts) {
  16087. return Object(external_wp_element_["createElement"])("div", blockProps, inspectorControls, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  16088. icon: library_pin,
  16089. label: Object(external_wp_i18n_["__"])('Latest Posts')
  16090. }, !Array.isArray(latestPosts) ? Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null) : Object(external_wp_i18n_["__"])('No posts found.')));
  16091. } // Removing posts from display should be instant.
  16092. const displayPosts = latestPosts.length > postsToShow ? latestPosts.slice(0, postsToShow) : latestPosts;
  16093. const layoutControls = [{
  16094. icon: library_list,
  16095. title: Object(external_wp_i18n_["__"])('List view'),
  16096. onClick: () => setAttributes({
  16097. postLayout: 'list'
  16098. }),
  16099. isActive: postLayout === 'list'
  16100. }, {
  16101. icon: grid["a" /* default */],
  16102. title: Object(external_wp_i18n_["__"])('Grid view'),
  16103. onClick: () => setAttributes({
  16104. postLayout: 'grid'
  16105. }),
  16106. isActive: postLayout === 'grid'
  16107. }];
  16108. const dateFormat = Object(external_wp_date_["__experimentalGetSettings"])().formats.date;
  16109. return Object(external_wp_element_["createElement"])("div", null, inspectorControls, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
  16110. controls: layoutControls
  16111. })), Object(external_wp_element_["createElement"])("ul", blockProps, displayPosts.map((post, i) => {
  16112. const titleTrimmed = Object(external_lodash_["invoke"])(post, ['title', 'rendered', 'trim']);
  16113. let excerpt = post.excerpt.rendered;
  16114. const currentAuthor = authorList.find(author => author.id === post.author);
  16115. const excerptElement = document.createElement('div');
  16116. excerptElement.innerHTML = excerpt;
  16117. excerpt = excerptElement.textContent || excerptElement.innerText || '';
  16118. const {
  16119. featuredImageInfo: {
  16120. url: imageSourceUrl,
  16121. alt: featuredImageAlt
  16122. } = {}
  16123. } = post;
  16124. const imageClasses = classnames_default()({
  16125. 'wp-block-latest-posts__featured-image': true,
  16126. [`align${featuredImageAlign}`]: !!featuredImageAlign
  16127. });
  16128. const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
  16129. const featuredImage = renderFeaturedImage && Object(external_wp_element_["createElement"])("img", {
  16130. src: imageSourceUrl,
  16131. alt: featuredImageAlt,
  16132. style: {
  16133. maxWidth: featuredImageSizeWidth,
  16134. maxHeight: featuredImageSizeHeight
  16135. }
  16136. });
  16137. const needsReadMore = excerptLength < excerpt.trim().split(' ').length && post.excerpt.raw === '';
  16138. const postExcerpt = needsReadMore ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, excerpt.trim().split(' ', excerptLength).join(' '), Object(external_wp_i18n_["__"])(' … '), Object(external_wp_element_["createElement"])("a", {
  16139. href: post.link,
  16140. rel: "noopener noreferrer"
  16141. }, Object(external_wp_i18n_["__"])('Read more'))) : excerpt;
  16142. return Object(external_wp_element_["createElement"])("li", {
  16143. key: i
  16144. }, renderFeaturedImage && Object(external_wp_element_["createElement"])("div", {
  16145. className: imageClasses
  16146. }, addLinkToFeaturedImage ? Object(external_wp_element_["createElement"])("a", {
  16147. href: post.link,
  16148. rel: "noreferrer noopener"
  16149. }, featuredImage) : featuredImage), Object(external_wp_element_["createElement"])("a", {
  16150. href: post.link,
  16151. rel: "noreferrer noopener"
  16152. }, titleTrimmed ? Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, titleTrimmed) : Object(external_wp_i18n_["__"])('(no title)')), displayAuthor && currentAuthor && Object(external_wp_element_["createElement"])("div", {
  16153. className: "wp-block-latest-posts__post-author"
  16154. }, Object(external_wp_i18n_["sprintf"])(
  16155. /* translators: byline. %s: current author. */
  16156. Object(external_wp_i18n_["__"])('by %s'), currentAuthor.name)), displayPostDate && post.date_gmt && Object(external_wp_element_["createElement"])("time", {
  16157. dateTime: Object(external_wp_date_["format"])('c', post.date_gmt),
  16158. className: "wp-block-latest-posts__post-date"
  16159. }, Object(external_wp_date_["dateI18n"])(dateFormat, post.date_gmt)), displayPostContent && displayPostContentRadio === 'excerpt' && Object(external_wp_element_["createElement"])("div", {
  16160. className: "wp-block-latest-posts__post-excerpt"
  16161. }, postExcerpt), displayPostContent && displayPostContentRadio === 'full_post' && Object(external_wp_element_["createElement"])("div", {
  16162. className: "wp-block-latest-posts__post-full-content"
  16163. }, Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], {
  16164. key: "html"
  16165. }, post.content.raw.trim())));
  16166. })));
  16167. }
  16168. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
  16169. /**
  16170. * WordPress dependencies
  16171. */
  16172. /**
  16173. * Internal dependencies
  16174. */
  16175. const latest_posts_metadata = {
  16176. apiVersion: 2,
  16177. name: "core/latest-posts",
  16178. title: "Latest Posts",
  16179. category: "widgets",
  16180. description: "Display a list of your most recent posts.",
  16181. keywords: ["recent posts"],
  16182. textdomain: "default",
  16183. attributes: {
  16184. categories: {
  16185. type: "array",
  16186. items: {
  16187. type: "object"
  16188. }
  16189. },
  16190. selectedAuthor: {
  16191. type: "number"
  16192. },
  16193. postsToShow: {
  16194. type: "number",
  16195. "default": 5
  16196. },
  16197. displayPostContent: {
  16198. type: "boolean",
  16199. "default": false
  16200. },
  16201. displayPostContentRadio: {
  16202. type: "string",
  16203. "default": "excerpt"
  16204. },
  16205. excerptLength: {
  16206. type: "number",
  16207. "default": 55
  16208. },
  16209. displayAuthor: {
  16210. type: "boolean",
  16211. "default": false
  16212. },
  16213. displayPostDate: {
  16214. type: "boolean",
  16215. "default": false
  16216. },
  16217. postLayout: {
  16218. type: "string",
  16219. "default": "list"
  16220. },
  16221. columns: {
  16222. type: "number",
  16223. "default": 3
  16224. },
  16225. order: {
  16226. type: "string",
  16227. "default": "desc"
  16228. },
  16229. orderBy: {
  16230. type: "string",
  16231. "default": "date"
  16232. },
  16233. displayFeaturedImage: {
  16234. type: "boolean",
  16235. "default": false
  16236. },
  16237. featuredImageAlign: {
  16238. type: "string",
  16239. "enum": ["left", "center", "right"]
  16240. },
  16241. featuredImageSizeSlug: {
  16242. type: "string",
  16243. "default": "thumbnail"
  16244. },
  16245. featuredImageSizeWidth: {
  16246. type: "number",
  16247. "default": null
  16248. },
  16249. featuredImageSizeHeight: {
  16250. type: "number",
  16251. "default": null
  16252. },
  16253. addLinkToFeaturedImage: {
  16254. type: "boolean",
  16255. "default": false
  16256. }
  16257. },
  16258. supports: {
  16259. align: true,
  16260. html: false
  16261. },
  16262. editorStyle: "wp-block-latest-posts-editor",
  16263. style: "wp-block-latest-posts"
  16264. };
  16265. const {
  16266. name: latest_posts_name
  16267. } = latest_posts_metadata;
  16268. const latest_posts_settings = {
  16269. icon: post_list,
  16270. example: {},
  16271. edit: LatestPostsEdit,
  16272. deprecated: latest_posts_deprecated
  16273. };
  16274. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/login.js
  16275. /**
  16276. * WordPress dependencies
  16277. */
  16278. const login = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16279. xmlns: "http://www.w3.org/2000/svg",
  16280. viewBox: "0 0 24 24"
  16281. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16282. d: "M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"
  16283. }));
  16284. /* harmony default export */ var library_login = (login);
  16285. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/loginout/edit.js
  16286. /**
  16287. * WordPress dependencies
  16288. */
  16289. function LoginOutEdit({
  16290. attributes,
  16291. setAttributes
  16292. }) {
  16293. const {
  16294. displayLoginAsForm,
  16295. redirectToCurrent
  16296. } = attributes;
  16297. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  16298. title: Object(external_wp_i18n_["__"])('Login/out settings')
  16299. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  16300. label: Object(external_wp_i18n_["__"])('Display login as form'),
  16301. checked: displayLoginAsForm,
  16302. onChange: () => setAttributes({
  16303. displayLoginAsForm: !displayLoginAsForm
  16304. })
  16305. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  16306. label: Object(external_wp_i18n_["__"])('Redirect to current URL'),
  16307. checked: redirectToCurrent,
  16308. onChange: () => setAttributes({
  16309. redirectToCurrent: !redirectToCurrent
  16310. })
  16311. }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({
  16312. className: 'logged-in'
  16313. }), Object(external_wp_element_["createElement"])("a", {
  16314. href: "#login-pseudo-link"
  16315. }, Object(external_wp_i18n_["__"])('Log out'))));
  16316. }
  16317. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/loginout/index.js
  16318. /**
  16319. * WordPress dependencies
  16320. */
  16321. /**
  16322. * Internal dependencies
  16323. */
  16324. const loginout_metadata = {
  16325. apiVersion: 2,
  16326. name: "core/loginout",
  16327. title: "Login/out",
  16328. category: "theme",
  16329. description: "Show login & logout links.",
  16330. keywords: ["login", "logout", "form"],
  16331. textdomain: "default",
  16332. attributes: {
  16333. displayLoginAsForm: {
  16334. type: "boolean",
  16335. "default": false
  16336. },
  16337. redirectToCurrent: {
  16338. type: "boolean",
  16339. "default": true
  16340. }
  16341. },
  16342. supports: {
  16343. className: true,
  16344. typography: {
  16345. fontSize: false
  16346. }
  16347. }
  16348. };
  16349. const {
  16350. name: loginout_name
  16351. } = loginout_metadata;
  16352. const loginout_settings = {
  16353. icon: library_login,
  16354. edit: LoginOutEdit
  16355. };
  16356. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets-rtl.js
  16357. /**
  16358. * WordPress dependencies
  16359. */
  16360. const formatListBulletsRTL = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16361. xmlns: "http://www.w3.org/2000/svg",
  16362. viewBox: "0 0 24 24"
  16363. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16364. d: "M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"
  16365. }));
  16366. /* harmony default export */ var format_list_bullets_rtl = (formatListBulletsRTL);
  16367. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js
  16368. /**
  16369. * WordPress dependencies
  16370. */
  16371. const formatListBullets = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16372. xmlns: "http://www.w3.org/2000/svg",
  16373. viewBox: "0 0 24 24"
  16374. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16375. d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
  16376. }));
  16377. /* harmony default export */ var format_list_bullets = (formatListBullets);
  16378. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-numbered-rtl.js
  16379. /**
  16380. * WordPress dependencies
  16381. */
  16382. const formatListNumberedRTL = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16383. xmlns: "http://www.w3.org/2000/svg",
  16384. viewBox: "0 0 24 24"
  16385. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16386. d: "M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"
  16387. }));
  16388. /* harmony default export */ var format_list_numbered_rtl = (formatListNumberedRTL);
  16389. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-numbered.js
  16390. /**
  16391. * WordPress dependencies
  16392. */
  16393. const formatListNumbered = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16394. xmlns: "http://www.w3.org/2000/svg",
  16395. viewBox: "0 0 24 24"
  16396. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16397. d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"
  16398. }));
  16399. /* harmony default export */ var format_list_numbered = (formatListNumbered);
  16400. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-outdent-rtl.js
  16401. /**
  16402. * WordPress dependencies
  16403. */
  16404. const formatOutdentRTL = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16405. xmlns: "http://www.w3.org/2000/svg",
  16406. viewBox: "0 0 24 24"
  16407. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16408. d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"
  16409. }));
  16410. /* harmony default export */ var format_outdent_rtl = (formatOutdentRTL);
  16411. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-outdent.js
  16412. /**
  16413. * WordPress dependencies
  16414. */
  16415. const formatOutdent = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16416. xmlns: "http://www.w3.org/2000/svg",
  16417. viewBox: "0 0 24 24"
  16418. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16419. d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"
  16420. }));
  16421. /* harmony default export */ var format_outdent = (formatOutdent);
  16422. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-indent-rtl.js
  16423. /**
  16424. * WordPress dependencies
  16425. */
  16426. const formatIndentRTL = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16427. xmlns: "http://www.w3.org/2000/svg",
  16428. viewBox: "0 0 24 24"
  16429. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16430. d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"
  16431. }));
  16432. /* harmony default export */ var format_indent_rtl = (formatIndentRTL);
  16433. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-indent.js
  16434. /**
  16435. * WordPress dependencies
  16436. */
  16437. const formatIndent = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  16438. xmlns: "http://www.w3.org/2000/svg",
  16439. viewBox: "0 0 24 24"
  16440. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  16441. d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"
  16442. }));
  16443. /* harmony default export */ var format_indent = (formatIndent);
  16444. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/ordered-list-settings.js
  16445. /**
  16446. * WordPress dependencies
  16447. */
  16448. const OrderedListSettings = ({
  16449. setAttributes,
  16450. reversed,
  16451. start
  16452. }) => Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  16453. title: Object(external_wp_i18n_["__"])('Ordered list settings')
  16454. }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  16455. label: Object(external_wp_i18n_["__"])('Start value'),
  16456. type: "number",
  16457. onChange: value => {
  16458. const int = parseInt(value, 10);
  16459. setAttributes({
  16460. // It should be possible to unset the value,
  16461. // e.g. with an empty string.
  16462. start: isNaN(int) ? undefined : int
  16463. });
  16464. },
  16465. value: Number.isInteger(start) ? start.toString(10) : '',
  16466. step: "1"
  16467. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  16468. label: Object(external_wp_i18n_["__"])('Reverse list numbering'),
  16469. checked: reversed || false,
  16470. onChange: value => {
  16471. setAttributes({
  16472. // Unset the attribute if not reversed.
  16473. reversed: value || undefined
  16474. });
  16475. }
  16476. })));
  16477. /* harmony default export */ var ordered_list_settings = (OrderedListSettings);
  16478. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/edit.js
  16479. /**
  16480. * WordPress dependencies
  16481. */
  16482. /**
  16483. * Internal dependencies
  16484. */
  16485. function ListEdit({
  16486. attributes,
  16487. setAttributes,
  16488. mergeBlocks,
  16489. onReplace
  16490. }) {
  16491. const {
  16492. ordered,
  16493. values,
  16494. type,
  16495. reversed,
  16496. start,
  16497. placeholder
  16498. } = attributes;
  16499. const tagName = ordered ? 'ol' : 'ul';
  16500. const controls = ({
  16501. value,
  16502. onChange,
  16503. onFocus
  16504. }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  16505. type: "primary",
  16506. character: "[",
  16507. onUse: () => {
  16508. onChange(Object(external_wp_richText_["__unstableOutdentListItems"])(value));
  16509. }
  16510. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  16511. type: "primary",
  16512. character: "]",
  16513. onUse: () => {
  16514. onChange(Object(external_wp_richText_["__unstableIndentListItems"])(value, {
  16515. type: tagName
  16516. }));
  16517. }
  16518. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  16519. type: "primary",
  16520. character: "m",
  16521. onUse: () => {
  16522. onChange(Object(external_wp_richText_["__unstableIndentListItems"])(value, {
  16523. type: tagName
  16524. }));
  16525. }
  16526. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  16527. type: "primaryShift",
  16528. character: "m",
  16529. onUse: () => {
  16530. onChange(Object(external_wp_richText_["__unstableOutdentListItems"])(value));
  16531. }
  16532. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  16533. group: "block"
  16534. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  16535. icon: Object(external_wp_i18n_["isRTL"])() ? format_list_bullets_rtl : format_list_bullets,
  16536. title: Object(external_wp_i18n_["__"])('Unordered'),
  16537. describedBy: Object(external_wp_i18n_["__"])('Convert to unordered list'),
  16538. isActive: Object(external_wp_richText_["__unstableIsActiveListType"])(value, 'ul', tagName),
  16539. onClick: () => {
  16540. onChange(Object(external_wp_richText_["__unstableChangeListType"])(value, {
  16541. type: 'ul'
  16542. }));
  16543. onFocus();
  16544. if (Object(external_wp_richText_["__unstableIsListRootSelected"])(value)) {
  16545. setAttributes({
  16546. ordered: false
  16547. });
  16548. }
  16549. }
  16550. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  16551. icon: Object(external_wp_i18n_["isRTL"])() ? format_list_numbered_rtl : format_list_numbered,
  16552. title: Object(external_wp_i18n_["__"])('Ordered'),
  16553. describedBy: Object(external_wp_i18n_["__"])('Convert to ordered list'),
  16554. isActive: Object(external_wp_richText_["__unstableIsActiveListType"])(value, 'ol', tagName),
  16555. onClick: () => {
  16556. onChange(Object(external_wp_richText_["__unstableChangeListType"])(value, {
  16557. type: 'ol'
  16558. }));
  16559. onFocus();
  16560. if (Object(external_wp_richText_["__unstableIsListRootSelected"])(value)) {
  16561. setAttributes({
  16562. ordered: true
  16563. });
  16564. }
  16565. }
  16566. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  16567. icon: Object(external_wp_i18n_["isRTL"])() ? format_outdent_rtl : format_outdent,
  16568. title: Object(external_wp_i18n_["__"])('Outdent'),
  16569. describedBy: Object(external_wp_i18n_["__"])('Outdent list item'),
  16570. shortcut: Object(external_wp_i18n_["_x"])('Backspace', 'keyboard key'),
  16571. isDisabled: !Object(external_wp_richText_["__unstableCanOutdentListItems"])(value),
  16572. onClick: () => {
  16573. onChange(Object(external_wp_richText_["__unstableOutdentListItems"])(value));
  16574. onFocus();
  16575. }
  16576. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  16577. icon: Object(external_wp_i18n_["isRTL"])() ? format_indent_rtl : format_indent,
  16578. title: Object(external_wp_i18n_["__"])('Indent'),
  16579. describedBy: Object(external_wp_i18n_["__"])('Indent list item'),
  16580. shortcut: Object(external_wp_i18n_["_x"])('Space', 'keyboard key'),
  16581. isDisabled: !Object(external_wp_richText_["__unstableCanIndentListItems"])(value),
  16582. onClick: () => {
  16583. onChange(Object(external_wp_richText_["__unstableIndentListItems"])(value, {
  16584. type: tagName
  16585. }));
  16586. onFocus();
  16587. }
  16588. })));
  16589. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  16590. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
  16591. identifier: "values",
  16592. multiline: "li",
  16593. tagName: tagName,
  16594. onChange: nextValues => setAttributes({
  16595. values: nextValues
  16596. }),
  16597. value: values,
  16598. "aria-label": Object(external_wp_i18n_["__"])('List text'),
  16599. placeholder: placeholder || Object(external_wp_i18n_["__"])('List'),
  16600. onMerge: mergeBlocks,
  16601. onSplit: value => Object(external_wp_blocks_["createBlock"])(list_name, { ...attributes,
  16602. values: value
  16603. }),
  16604. __unstableOnSplitMiddle: () => Object(external_wp_blocks_["createBlock"])('core/paragraph'),
  16605. onReplace: onReplace,
  16606. onRemove: () => onReplace([]),
  16607. start: start,
  16608. reversed: reversed,
  16609. type: type
  16610. }, blockProps), controls), ordered && Object(external_wp_element_["createElement"])(ordered_list_settings, {
  16611. setAttributes: setAttributes,
  16612. ordered: ordered,
  16613. reversed: reversed,
  16614. start: start,
  16615. placeholder: placeholder
  16616. }));
  16617. }
  16618. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/save.js
  16619. /**
  16620. * WordPress dependencies
  16621. */
  16622. function list_save_save({
  16623. attributes
  16624. }) {
  16625. const {
  16626. ordered,
  16627. values,
  16628. type,
  16629. reversed,
  16630. start
  16631. } = attributes;
  16632. const TagName = ordered ? 'ol' : 'ul';
  16633. return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({
  16634. type,
  16635. reversed,
  16636. start
  16637. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  16638. value: values,
  16639. multiline: "li"
  16640. }));
  16641. }
  16642. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/transforms.js
  16643. /**
  16644. * WordPress dependencies
  16645. */
  16646. function getListContentSchema({
  16647. phrasingContentSchema
  16648. }) {
  16649. const listContentSchema = { ...phrasingContentSchema,
  16650. ul: {},
  16651. ol: {
  16652. attributes: ['type', 'start', 'reversed']
  16653. }
  16654. }; // Recursion is needed.
  16655. // Possible: ul > li > ul.
  16656. // Impossible: ul > ul.
  16657. ['ul', 'ol'].forEach(tag => {
  16658. listContentSchema[tag].children = {
  16659. li: {
  16660. children: listContentSchema
  16661. }
  16662. };
  16663. });
  16664. return listContentSchema;
  16665. }
  16666. const list_transforms_transforms = {
  16667. from: [{
  16668. type: 'block',
  16669. isMultiBlock: true,
  16670. blocks: ['core/paragraph', 'core/heading'],
  16671. transform: blockAttributes => {
  16672. return Object(external_wp_blocks_["createBlock"])('core/list', {
  16673. values: Object(external_wp_richText_["toHTMLString"])({
  16674. value: Object(external_wp_richText_["join"])(blockAttributes.map(({
  16675. content
  16676. }) => {
  16677. const value = Object(external_wp_richText_["create"])({
  16678. html: content
  16679. });
  16680. if (blockAttributes.length > 1) {
  16681. return value;
  16682. } // When converting only one block, transform
  16683. // every line to a list item.
  16684. return Object(external_wp_richText_["replace"])(value, /\n/g, external_wp_richText_["__UNSTABLE_LINE_SEPARATOR"]);
  16685. }), external_wp_richText_["__UNSTABLE_LINE_SEPARATOR"]),
  16686. multilineTag: 'li'
  16687. }),
  16688. anchor: blockAttributes.anchor
  16689. });
  16690. }
  16691. }, {
  16692. type: 'block',
  16693. blocks: ['core/quote', 'core/pullquote'],
  16694. transform: ({
  16695. value,
  16696. anchor
  16697. }) => {
  16698. return Object(external_wp_blocks_["createBlock"])('core/list', {
  16699. values: Object(external_wp_richText_["toHTMLString"])({
  16700. value: Object(external_wp_richText_["create"])({
  16701. html: value,
  16702. multilineTag: 'p'
  16703. }),
  16704. multilineTag: 'li'
  16705. }),
  16706. anchor
  16707. });
  16708. }
  16709. }, {
  16710. type: 'raw',
  16711. selector: 'ol,ul',
  16712. schema: args => ({
  16713. ol: getListContentSchema(args).ol,
  16714. ul: getListContentSchema(args).ul
  16715. }),
  16716. transform(node) {
  16717. const attributes = {
  16718. ordered: node.nodeName === 'OL',
  16719. anchor: node.id === '' ? undefined : node.id
  16720. };
  16721. if (attributes.ordered) {
  16722. const type = node.getAttribute('type');
  16723. if (type) {
  16724. attributes.type = type;
  16725. }
  16726. if (node.getAttribute('reversed') !== null) {
  16727. attributes.reversed = true;
  16728. }
  16729. const start = parseInt(node.getAttribute('start'), 10);
  16730. if (!isNaN(start) && ( // start=1 only makes sense if the list is reversed.
  16731. start !== 1 || attributes.reversed)) {
  16732. attributes.start = start;
  16733. }
  16734. }
  16735. return Object(external_wp_blocks_["createBlock"])('core/list', { ...Object(external_wp_blocks_["getBlockAttributes"])('core/list', node.outerHTML),
  16736. ...attributes
  16737. });
  16738. }
  16739. }, ...['*', '-'].map(prefix => ({
  16740. type: 'prefix',
  16741. prefix,
  16742. transform(content) {
  16743. return Object(external_wp_blocks_["createBlock"])('core/list', {
  16744. values: `<li>${content}</li>`
  16745. });
  16746. }
  16747. })), ...['1.', '1)'].map(prefix => ({
  16748. type: 'prefix',
  16749. prefix,
  16750. transform(content) {
  16751. return Object(external_wp_blocks_["createBlock"])('core/list', {
  16752. ordered: true,
  16753. values: `<li>${content}</li>`
  16754. });
  16755. }
  16756. }))],
  16757. to: [{
  16758. type: 'block',
  16759. blocks: ['core/paragraph'],
  16760. transform: ({
  16761. values
  16762. }) => Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
  16763. html: values,
  16764. multilineTag: 'li',
  16765. multilineWrapperTags: ['ul', 'ol']
  16766. }), external_wp_richText_["__UNSTABLE_LINE_SEPARATOR"]).map(piece => Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  16767. content: Object(external_wp_richText_["toHTMLString"])({
  16768. value: piece
  16769. })
  16770. }))
  16771. }, {
  16772. type: 'block',
  16773. blocks: ['core/heading'],
  16774. transform: ({
  16775. values
  16776. }) => Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
  16777. html: values,
  16778. multilineTag: 'li',
  16779. multilineWrapperTags: ['ul', 'ol']
  16780. }), external_wp_richText_["__UNSTABLE_LINE_SEPARATOR"]).map(piece => Object(external_wp_blocks_["createBlock"])('core/heading', {
  16781. content: Object(external_wp_richText_["toHTMLString"])({
  16782. value: piece
  16783. })
  16784. }))
  16785. }, {
  16786. type: 'block',
  16787. blocks: ['core/quote'],
  16788. transform: ({
  16789. values,
  16790. anchor
  16791. }) => {
  16792. return Object(external_wp_blocks_["createBlock"])('core/quote', {
  16793. value: Object(external_wp_richText_["toHTMLString"])({
  16794. value: Object(external_wp_richText_["create"])({
  16795. html: values,
  16796. multilineTag: 'li',
  16797. multilineWrapperTags: ['ul', 'ol']
  16798. }),
  16799. multilineTag: 'p'
  16800. }),
  16801. anchor
  16802. });
  16803. }
  16804. }, {
  16805. type: 'block',
  16806. blocks: ['core/pullquote'],
  16807. transform: ({
  16808. values,
  16809. anchor
  16810. }) => {
  16811. return Object(external_wp_blocks_["createBlock"])('core/pullquote', {
  16812. value: Object(external_wp_richText_["toHTMLString"])({
  16813. value: Object(external_wp_richText_["create"])({
  16814. html: values,
  16815. multilineTag: 'li',
  16816. multilineWrapperTags: ['ul', 'ol']
  16817. }),
  16818. multilineTag: 'p'
  16819. }),
  16820. anchor
  16821. });
  16822. }
  16823. }]
  16824. };
  16825. /* harmony default export */ var list_transforms = (list_transforms_transforms);
  16826. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/index.js
  16827. /**
  16828. * WordPress dependencies
  16829. */
  16830. /**
  16831. * Internal dependencies
  16832. */
  16833. const list_metadata = {
  16834. apiVersion: 2,
  16835. name: "core/list",
  16836. title: "List",
  16837. category: "text",
  16838. description: "Create a bulleted or numbered list.",
  16839. keywords: ["bullet list", "ordered list", "numbered list"],
  16840. textdomain: "default",
  16841. attributes: {
  16842. ordered: {
  16843. type: "boolean",
  16844. "default": false,
  16845. __experimentalRole: "content"
  16846. },
  16847. values: {
  16848. type: "string",
  16849. source: "html",
  16850. selector: "ol,ul",
  16851. multiline: "li",
  16852. __unstableMultilineWrapperTags: ["ol", "ul"],
  16853. "default": "",
  16854. __experimentalRole: "content"
  16855. },
  16856. type: {
  16857. type: "string"
  16858. },
  16859. start: {
  16860. type: "number"
  16861. },
  16862. reversed: {
  16863. type: "boolean"
  16864. },
  16865. placeholder: {
  16866. type: "string"
  16867. }
  16868. },
  16869. supports: {
  16870. anchor: true,
  16871. className: false,
  16872. typography: {
  16873. fontSize: true,
  16874. __experimentalFontFamily: true
  16875. },
  16876. color: {
  16877. gradients: true
  16878. },
  16879. __unstablePasteTextInline: true,
  16880. __experimentalSelector: "ol,ul"
  16881. },
  16882. editorStyle: "wp-block-list-editor",
  16883. style: "wp-block-list"
  16884. };
  16885. const {
  16886. name: list_name
  16887. } = list_metadata;
  16888. const list_settings = {
  16889. icon: library_list,
  16890. example: {
  16891. attributes: {
  16892. values: '<li>Alice.</li><li>The White Rabbit.</li><li>The Cheshire Cat.</li><li>The Mad Hatter.</li><li>The Queen of Hearts.</li>'
  16893. }
  16894. },
  16895. transforms: list_transforms,
  16896. merge(attributes, attributesToMerge) {
  16897. const {
  16898. values
  16899. } = attributesToMerge;
  16900. if (!values || values === '<li></li>') {
  16901. return attributes;
  16902. }
  16903. return { ...attributes,
  16904. values: attributes.values + values
  16905. };
  16906. },
  16907. edit: ListEdit,
  16908. save: list_save_save
  16909. };
  16910. // EXTERNAL MODULE: external ["wp","dom"]
  16911. var external_wp_dom_ = __webpack_require__("1CF3");
  16912. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/edit.js
  16913. /**
  16914. * WordPress dependencies
  16915. */
  16916. function MissingBlockWarning({
  16917. attributes,
  16918. convertToHTML
  16919. }) {
  16920. const {
  16921. originalName,
  16922. originalUndelimitedContent
  16923. } = attributes;
  16924. const hasContent = !!originalUndelimitedContent;
  16925. const hasHTMLBlock = Object(external_wp_blocks_["getBlockType"])('core/html');
  16926. const actions = [];
  16927. let messageHTML;
  16928. if (hasContent && hasHTMLBlock) {
  16929. messageHTML = Object(external_wp_i18n_["sprintf"])(
  16930. /* translators: %s: block name */
  16931. Object(external_wp_i18n_["__"])('Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'), originalName);
  16932. actions.push(Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  16933. key: "convert",
  16934. onClick: convertToHTML,
  16935. isPrimary: true
  16936. }, Object(external_wp_i18n_["__"])('Keep as HTML')));
  16937. } else {
  16938. messageHTML = Object(external_wp_i18n_["sprintf"])(
  16939. /* translators: %s: block name */
  16940. Object(external_wp_i18n_["__"])('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'), originalName);
  16941. }
  16942. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({
  16943. className: 'has-warning'
  16944. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], {
  16945. actions: actions
  16946. }, messageHTML), Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, Object(external_wp_dom_["safeHTML"])(originalUndelimitedContent)));
  16947. }
  16948. const MissingEdit = Object(external_wp_data_["withDispatch"])((dispatch, {
  16949. clientId,
  16950. attributes
  16951. }) => {
  16952. const {
  16953. replaceBlock
  16954. } = dispatch(external_wp_blockEditor_["store"]);
  16955. return {
  16956. convertToHTML() {
  16957. replaceBlock(clientId, Object(external_wp_blocks_["createBlock"])('core/html', {
  16958. content: attributes.originalUndelimitedContent
  16959. }));
  16960. }
  16961. };
  16962. })(MissingBlockWarning);
  16963. /* harmony default export */ var missing_edit = (MissingEdit);
  16964. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/save.js
  16965. /**
  16966. * WordPress dependencies
  16967. */
  16968. function missing_save_save({
  16969. attributes
  16970. }) {
  16971. // Preserve the missing block's content.
  16972. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.originalContent);
  16973. }
  16974. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/index.js
  16975. /**
  16976. * WordPress dependencies
  16977. */
  16978. /**
  16979. * Internal dependencies
  16980. */
  16981. const missing_metadata = {
  16982. apiVersion: 2,
  16983. name: "core/missing",
  16984. title: "Unsupported",
  16985. category: "text",
  16986. description: "Your site doesn\u2019t include support for this block.",
  16987. textdomain: "default",
  16988. attributes: {
  16989. originalName: {
  16990. type: "string"
  16991. },
  16992. originalUndelimitedContent: {
  16993. type: "string"
  16994. },
  16995. originalContent: {
  16996. type: "string",
  16997. source: "html"
  16998. }
  16999. },
  17000. supports: {
  17001. className: false,
  17002. customClassName: false,
  17003. inserter: false,
  17004. html: false,
  17005. reusable: false
  17006. }
  17007. };
  17008. const {
  17009. name: missing_name
  17010. } = missing_metadata;
  17011. const missing_settings = {
  17012. name: missing_name,
  17013. __experimentalLabel(attributes, {
  17014. context
  17015. }) {
  17016. if (context === 'accessibility') {
  17017. const {
  17018. originalName
  17019. } = attributes;
  17020. const originalBlockType = originalName ? Object(external_wp_blocks_["getBlockType"])(originalName) : undefined;
  17021. if (originalBlockType) {
  17022. return originalBlockType.settings.title || originalName;
  17023. }
  17024. return '';
  17025. }
  17026. },
  17027. edit: missing_edit,
  17028. save: missing_save_save
  17029. };
  17030. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more.js
  17031. /**
  17032. * WordPress dependencies
  17033. */
  17034. const more = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  17035. viewBox: "0 0 24 24",
  17036. xmlns: "http://www.w3.org/2000/svg"
  17037. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  17038. d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"
  17039. }));
  17040. /* harmony default export */ var library_more = (more);
  17041. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/edit.js
  17042. /**
  17043. * WordPress dependencies
  17044. */
  17045. const DEFAULT_TEXT = Object(external_wp_i18n_["__"])('Read more');
  17046. function MoreEdit({
  17047. attributes: {
  17048. customText,
  17049. noTeaser
  17050. },
  17051. insertBlocksAfter,
  17052. setAttributes
  17053. }) {
  17054. const onChangeInput = event => {
  17055. setAttributes({
  17056. customText: event.target.value !== '' ? event.target.value : undefined
  17057. });
  17058. };
  17059. const onKeyDown = ({
  17060. keyCode
  17061. }) => {
  17062. if (keyCode === external_wp_keycodes_["ENTER"]) {
  17063. insertBlocksAfter([Object(external_wp_blocks_["createBlock"])(Object(external_wp_blocks_["getDefaultBlockName"])())]);
  17064. }
  17065. };
  17066. const getHideExcerptHelp = checked => checked ? Object(external_wp_i18n_["__"])('The excerpt is hidden.') : Object(external_wp_i18n_["__"])('The excerpt is visible.');
  17067. const toggleHideExcerpt = () => setAttributes({
  17068. noTeaser: !noTeaser
  17069. });
  17070. const style = {
  17071. width: `${(customText ? customText : DEFAULT_TEXT).length + 1.2}em`
  17072. };
  17073. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  17074. label: Object(external_wp_i18n_["__"])('Hide the excerpt on the full content page'),
  17075. checked: !!noTeaser,
  17076. onChange: toggleHideExcerpt,
  17077. help: getHideExcerptHelp
  17078. }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])("div", {
  17079. className: "wp-block-more"
  17080. }, Object(external_wp_element_["createElement"])("input", {
  17081. "aria-label": Object(external_wp_i18n_["__"])('Read more link text'),
  17082. type: "text",
  17083. value: customText,
  17084. placeholder: DEFAULT_TEXT,
  17085. onChange: onChangeInput,
  17086. onKeyDown: onKeyDown,
  17087. style: style
  17088. }))));
  17089. }
  17090. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/save.js
  17091. /**
  17092. * External dependencies
  17093. */
  17094. /**
  17095. * WordPress dependencies
  17096. */
  17097. function more_save_save({
  17098. attributes: {
  17099. customText,
  17100. noTeaser
  17101. }
  17102. }) {
  17103. const moreTag = customText ? `<!--more ${customText}-->` : '<!--more-->';
  17104. const noTeaserTag = noTeaser ? '<!--noteaser-->' : '';
  17105. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, Object(external_lodash_["compact"])([moreTag, noTeaserTag]).join('\n'));
  17106. }
  17107. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/transforms.js
  17108. /**
  17109. * WordPress dependencies
  17110. */
  17111. const more_transforms_transforms = {
  17112. from: [{
  17113. type: 'raw',
  17114. schema: {
  17115. 'wp-block': {
  17116. attributes: ['data-block']
  17117. }
  17118. },
  17119. isMatch: node => node.dataset && node.dataset.block === 'core/more',
  17120. transform(node) {
  17121. const {
  17122. customText,
  17123. noTeaser
  17124. } = node.dataset;
  17125. const attrs = {}; // Don't copy unless defined and not an empty string
  17126. if (customText) {
  17127. attrs.customText = customText;
  17128. } // Special handling for boolean
  17129. if (noTeaser === '') {
  17130. attrs.noTeaser = true;
  17131. }
  17132. return Object(external_wp_blocks_["createBlock"])('core/more', attrs);
  17133. }
  17134. }]
  17135. };
  17136. /* harmony default export */ var more_transforms = (more_transforms_transforms);
  17137. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/index.js
  17138. /**
  17139. * WordPress dependencies
  17140. */
  17141. /**
  17142. * Internal dependencies
  17143. */
  17144. const more_metadata = {
  17145. apiVersion: 2,
  17146. name: "core/more",
  17147. title: "More",
  17148. category: "design",
  17149. description: "Content before this block will be shown in the excerpt on your archives page.",
  17150. keywords: ["read more"],
  17151. textdomain: "default",
  17152. attributes: {
  17153. customText: {
  17154. type: "string"
  17155. },
  17156. noTeaser: {
  17157. type: "boolean",
  17158. "default": false
  17159. }
  17160. },
  17161. supports: {
  17162. customClassName: false,
  17163. className: false,
  17164. html: false,
  17165. multiple: false
  17166. },
  17167. editorStyle: "wp-block-more-editor"
  17168. };
  17169. const {
  17170. name: more_name
  17171. } = more_metadata;
  17172. const more_settings = {
  17173. icon: library_more,
  17174. example: {},
  17175. __experimentalLabel(attributes, {
  17176. context
  17177. }) {
  17178. if (context === 'accessibility') {
  17179. return attributes.customText;
  17180. }
  17181. },
  17182. transforms: more_transforms,
  17183. edit: MoreEdit,
  17184. save: more_save_save
  17185. };
  17186. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page-break.js
  17187. /**
  17188. * WordPress dependencies
  17189. */
  17190. const pageBreak = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  17191. xmlns: "http://www.w3.org/2000/svg",
  17192. viewBox: "0 0 24 24"
  17193. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  17194. d: "M7.8 6c0-.7.6-1.2 1.2-1.2h6c.7 0 1.2.6 1.2 1.2v3h1.5V6c0-1.5-1.2-2.8-2.8-2.8H9C7.5 3.2 6.2 4.5 6.2 6v3h1.5V6zm8.4 11c0 .7-.6 1.2-1.2 1.2H9c-.7 0-1.2-.6-1.2-1.2v-3H6.2v3c0 1.5 1.2 2.8 2.8 2.8h6c1.5 0 2.8-1.2 2.8-2.8v-3h-1.5v3zM4 11v1h16v-1H4z"
  17195. }));
  17196. /* harmony default export */ var page_break = (pageBreak);
  17197. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/edit.js
  17198. /**
  17199. * WordPress dependencies
  17200. */
  17201. function NextPageEdit() {
  17202. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])("div", {
  17203. className: "wp-block-nextpage"
  17204. }, Object(external_wp_element_["createElement"])("span", null, Object(external_wp_i18n_["__"])('Page break'))));
  17205. }
  17206. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/save.js
  17207. /**
  17208. * WordPress dependencies
  17209. */
  17210. function nextpage_save_save() {
  17211. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, '<!--nextpage-->');
  17212. }
  17213. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/transforms.js
  17214. /**
  17215. * WordPress dependencies
  17216. */
  17217. const nextpage_transforms_transforms = {
  17218. from: [{
  17219. type: 'raw',
  17220. schema: {
  17221. 'wp-block': {
  17222. attributes: ['data-block']
  17223. }
  17224. },
  17225. isMatch: node => node.dataset && node.dataset.block === 'core/nextpage',
  17226. transform() {
  17227. return Object(external_wp_blocks_["createBlock"])('core/nextpage', {});
  17228. }
  17229. }]
  17230. };
  17231. /* harmony default export */ var nextpage_transforms = (nextpage_transforms_transforms);
  17232. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
  17233. /**
  17234. * WordPress dependencies
  17235. */
  17236. /**
  17237. * Internal dependencies
  17238. */
  17239. const nextpage_metadata = {
  17240. apiVersion: 2,
  17241. name: "core/nextpage",
  17242. title: "Page Break",
  17243. category: "design",
  17244. description: "Separate your content into a multi-page experience.",
  17245. keywords: ["next page", "pagination"],
  17246. parent: ["core/post-content"],
  17247. textdomain: "default",
  17248. supports: {
  17249. customClassName: false,
  17250. className: false,
  17251. html: false
  17252. },
  17253. editorStyle: "wp-block-nextpage-editor"
  17254. };
  17255. const {
  17256. name: nextpage_name
  17257. } = nextpage_metadata;
  17258. const nextpage_settings = {
  17259. icon: page_break,
  17260. example: {},
  17261. transforms: nextpage_transforms,
  17262. edit: NextPageEdit,
  17263. save: nextpage_save_save
  17264. };
  17265. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pages.js
  17266. /**
  17267. * WordPress dependencies
  17268. */
  17269. const pages_pages = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  17270. xmlns: "http://www.w3.org/2000/svg",
  17271. viewBox: "0 0 24 24"
  17272. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  17273. d: "M7 13.8h6v-1.5H7v1.5zM18 16V4c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2zM5.5 16V4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zM7 10.5h8V9H7v1.5zm0-3.3h8V5.8H7v1.4zM20.2 6v13c0 .7-.6 1.2-1.2 1.2H8v1.5h11c1.5 0 2.7-1.2 2.7-2.8V6h-1.5z"
  17274. }));
  17275. /* harmony default export */ var library_pages = (pages_pages);
  17276. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/convert-to-links-modal.js
  17277. /**
  17278. * WordPress dependencies
  17279. */
  17280. const PAGE_FIELDS = ['id', 'title', 'link', 'type', 'parent'];
  17281. const MAX_PAGE_COUNT = 100;
  17282. const convertSelectedBlockToNavigationLinks = ({
  17283. pages,
  17284. clientId,
  17285. replaceBlock,
  17286. createBlock
  17287. }) => () => {
  17288. if (!pages) {
  17289. return;
  17290. }
  17291. const linkMap = {};
  17292. const navigationLinks = [];
  17293. pages.forEach(({
  17294. id,
  17295. title,
  17296. link: url,
  17297. type,
  17298. parent
  17299. }) => {
  17300. var _linkMap$id$innerBloc, _linkMap$id;
  17301. // See if a placeholder exists. This is created if children appear before parents in list
  17302. const innerBlocks = (_linkMap$id$innerBloc = (_linkMap$id = linkMap[id]) === null || _linkMap$id === void 0 ? void 0 : _linkMap$id.innerBlocks) !== null && _linkMap$id$innerBloc !== void 0 ? _linkMap$id$innerBloc : [];
  17303. linkMap[id] = createBlock('core/navigation-link', {
  17304. id,
  17305. label: title.rendered,
  17306. url,
  17307. type,
  17308. kind: 'post-type'
  17309. }, innerBlocks);
  17310. if (!parent) {
  17311. navigationLinks.push(linkMap[id]);
  17312. } else {
  17313. if (!linkMap[parent]) {
  17314. // Use a placeholder if the child appears before parent in list
  17315. linkMap[parent] = {
  17316. innerBlocks: []
  17317. };
  17318. }
  17319. const parentLinkInnerBlocks = linkMap[parent].innerBlocks;
  17320. parentLinkInnerBlocks.push(linkMap[id]);
  17321. }
  17322. });
  17323. replaceBlock(clientId, navigationLinks);
  17324. };
  17325. function ConvertToLinksModal({
  17326. onClose,
  17327. clientId
  17328. }) {
  17329. const {
  17330. pages,
  17331. pagesFinished
  17332. } = Object(external_wp_data_["useSelect"])(select => {
  17333. const {
  17334. getEntityRecords,
  17335. hasFinishedResolution
  17336. } = select(external_wp_coreData_["store"]);
  17337. const query = ['postType', 'page', {
  17338. per_page: MAX_PAGE_COUNT,
  17339. _fields: PAGE_FIELDS,
  17340. // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
  17341. // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
  17342. // sort.
  17343. orderby: 'menu_order',
  17344. order: 'asc'
  17345. }];
  17346. return {
  17347. pages: getEntityRecords(...query),
  17348. pagesFinished: hasFinishedResolution('getEntityRecords', query)
  17349. };
  17350. }, [clientId]);
  17351. const {
  17352. replaceBlock
  17353. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  17354. return Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], {
  17355. closeLabel: Object(external_wp_i18n_["__"])('Close'),
  17356. onRequestClose: onClose,
  17357. title: Object(external_wp_i18n_["__"])('Convert to links'),
  17358. className: 'wp-block-page-list-modal',
  17359. aria: {
  17360. describedby: 'wp-block-page-list-modal__description'
  17361. }
  17362. }, Object(external_wp_element_["createElement"])("p", {
  17363. id: 'wp-block-page-list-modal__description'
  17364. }, Object(external_wp_i18n_["__"])('To edit this navigation menu, convert it to single page links. This allows you to add, re-order, remove items, or edit their labels.')), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])("Note: if you add new pages to your site, you'll need to add them to your navigation menu.")), Object(external_wp_element_["createElement"])("div", {
  17365. className: "wp-block-page-list-modal-buttons"
  17366. }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  17367. isTertiary: true,
  17368. onClick: onClose
  17369. }, Object(external_wp_i18n_["__"])('Cancel')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  17370. isPrimary: true,
  17371. disabled: !pagesFinished,
  17372. onClick: convertSelectedBlockToNavigationLinks({
  17373. pages,
  17374. replaceBlock,
  17375. clientId,
  17376. createBlock: external_wp_blocks_["createBlock"]
  17377. })
  17378. }, Object(external_wp_i18n_["__"])('Convert'))));
  17379. }
  17380. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/edit.js
  17381. /**
  17382. * External dependencies
  17383. */
  17384. /**
  17385. * WordPress dependencies
  17386. */
  17387. /**
  17388. * Internal dependencies
  17389. */
  17390. // We only show the edit option when page count is <= MAX_PAGE_COUNT
  17391. // Performance of Navigation Links is not good past this value.
  17392. const edit_MAX_PAGE_COUNT = 100;
  17393. function PageListEdit({
  17394. context,
  17395. clientId
  17396. }) {
  17397. const {
  17398. textColor,
  17399. backgroundColor,
  17400. showSubmenuIcon,
  17401. style
  17402. } = context || {};
  17403. const [allowConvertToLinks, setAllowConvertToLinks] = Object(external_wp_element_["useState"])(false);
  17404. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  17405. className: classnames_default()({
  17406. 'has-text-color': !!textColor,
  17407. [`has-${textColor}-color`]: !!textColor,
  17408. 'has-background': !!backgroundColor,
  17409. [`has-${backgroundColor}-background-color`]: !!backgroundColor,
  17410. 'show-submenu-icons': !!showSubmenuIcon
  17411. }),
  17412. style: { ...(style === null || style === void 0 ? void 0 : style.color)
  17413. }
  17414. });
  17415. const isParentNavigation = Object(external_wp_data_["useSelect"])(select => {
  17416. const {
  17417. getBlockParentsByBlockName
  17418. } = select(external_wp_blockEditor_["store"]);
  17419. return getBlockParentsByBlockName(clientId, 'core/navigation').length > 0;
  17420. }, [clientId]);
  17421. Object(external_wp_element_["useEffect"])(() => {
  17422. if (isParentNavigation) {
  17423. external_wp_apiFetch_default()({
  17424. path: Object(external_wp_url_["addQueryArgs"])('/wp/v2/pages', {
  17425. per_page: 1,
  17426. _fields: ['id']
  17427. }),
  17428. parse: false
  17429. }).then(res => {
  17430. setAllowConvertToLinks(res.headers.get('X-WP-Total') <= edit_MAX_PAGE_COUNT);
  17431. });
  17432. } else {
  17433. setAllowConvertToLinks(false);
  17434. }
  17435. }, [isParentNavigation]);
  17436. const [isOpen, setOpen] = Object(external_wp_element_["useState"])(false);
  17437. const openModal = () => setOpen(true);
  17438. const closeModal = () => setOpen(false);
  17439. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, allowConvertToLinks && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  17440. group: "other"
  17441. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  17442. title: Object(external_wp_i18n_["__"])('Edit'),
  17443. onClick: openModal
  17444. }, Object(external_wp_i18n_["__"])('Edit'))), allowConvertToLinks && isOpen && Object(external_wp_element_["createElement"])(ConvertToLinksModal, {
  17445. onClose: closeModal,
  17446. clientId: clientId
  17447. }), Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
  17448. block: "core/page-list"
  17449. })));
  17450. }
  17451. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/index.js
  17452. /**
  17453. * WordPress dependencies
  17454. */
  17455. /**
  17456. * Internal dependencies
  17457. */
  17458. const page_list_metadata = {
  17459. apiVersion: 2,
  17460. name: "core/page-list",
  17461. title: "Page List",
  17462. category: "widgets",
  17463. description: "Display a list of all pages.",
  17464. keywords: ["menu", "navigation"],
  17465. textdomain: "default",
  17466. usesContext: ["textColor", "customTextColor", "backgroundColor", "customBackgroundColor", "fontSize", "customFontSize", "showSubmenuIcon", "style"],
  17467. supports: {
  17468. reusable: false,
  17469. html: false
  17470. },
  17471. editorStyle: "wp-block-page-list-editor",
  17472. style: "wp-block-page-list"
  17473. };
  17474. const {
  17475. name: page_list_name
  17476. } = page_list_metadata;
  17477. const page_list_settings = {
  17478. icon: library_pages,
  17479. example: {},
  17480. edit: PageListEdit
  17481. };
  17482. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/preformatted.js
  17483. /**
  17484. * WordPress dependencies
  17485. */
  17486. const preformatted = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  17487. viewBox: "0 0 24 24",
  17488. xmlns: "http://www.w3.org/2000/svg"
  17489. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  17490. d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"
  17491. }));
  17492. /* harmony default export */ var library_preformatted = (preformatted);
  17493. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/edit.js
  17494. /**
  17495. * WordPress dependencies
  17496. */
  17497. function PreformattedEdit({
  17498. attributes,
  17499. mergeBlocks,
  17500. setAttributes,
  17501. onRemove
  17502. }) {
  17503. const {
  17504. content
  17505. } = attributes;
  17506. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  17507. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
  17508. tagName: "pre",
  17509. identifier: "content",
  17510. preserveWhiteSpace: true,
  17511. value: content,
  17512. onChange: nextContent => {
  17513. setAttributes({
  17514. content: nextContent
  17515. });
  17516. },
  17517. onRemove: onRemove,
  17518. "aria-label": Object(external_wp_i18n_["__"])('Preformatted text'),
  17519. placeholder: Object(external_wp_i18n_["__"])('Write preformatted text…'),
  17520. onMerge: mergeBlocks
  17521. }, blockProps, {
  17522. __unstablePastePlainText: true
  17523. }));
  17524. }
  17525. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/save.js
  17526. /**
  17527. * WordPress dependencies
  17528. */
  17529. function preformatted_save_save({
  17530. attributes
  17531. }) {
  17532. const {
  17533. content
  17534. } = attributes;
  17535. return Object(external_wp_element_["createElement"])("pre", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17536. value: content
  17537. }));
  17538. }
  17539. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/transforms.js
  17540. /**
  17541. * WordPress dependencies
  17542. */
  17543. const preformatted_transforms_transforms = {
  17544. from: [{
  17545. type: 'block',
  17546. blocks: ['core/code', 'core/paragraph'],
  17547. transform: ({
  17548. content,
  17549. anchor
  17550. }) => Object(external_wp_blocks_["createBlock"])('core/preformatted', {
  17551. content,
  17552. anchor
  17553. })
  17554. }, {
  17555. type: 'raw',
  17556. isMatch: node => node.nodeName === 'PRE' && !(node.children.length === 1 && node.firstChild.nodeName === 'CODE'),
  17557. schema: ({
  17558. phrasingContentSchema
  17559. }) => ({
  17560. pre: {
  17561. children: phrasingContentSchema
  17562. }
  17563. })
  17564. }],
  17565. to: [{
  17566. type: 'block',
  17567. blocks: ['core/paragraph'],
  17568. transform: attributes => Object(external_wp_blocks_["createBlock"])('core/paragraph', attributes)
  17569. }, {
  17570. type: 'block',
  17571. blocks: ['core/code'],
  17572. transform: attributes => Object(external_wp_blocks_["createBlock"])('core/code', attributes)
  17573. }]
  17574. };
  17575. /* harmony default export */ var preformatted_transforms = (preformatted_transforms_transforms);
  17576. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
  17577. /**
  17578. * WordPress dependencies
  17579. */
  17580. /**
  17581. * Internal dependencies
  17582. */
  17583. const preformatted_metadata = {
  17584. apiVersion: 2,
  17585. name: "core/preformatted",
  17586. title: "Preformatted",
  17587. category: "text",
  17588. description: "Add text that respects your spacing and tabs, and also allows styling.",
  17589. textdomain: "default",
  17590. attributes: {
  17591. content: {
  17592. type: "string",
  17593. source: "html",
  17594. selector: "pre",
  17595. "default": "",
  17596. __unstablePreserveWhiteSpace: true,
  17597. __experimentalRole: "content"
  17598. }
  17599. },
  17600. supports: {
  17601. anchor: true,
  17602. color: {
  17603. gradients: true
  17604. },
  17605. typography: {
  17606. fontSize: true
  17607. }
  17608. },
  17609. style: "wp-block-preformatted"
  17610. };
  17611. const {
  17612. name: preformatted_name
  17613. } = preformatted_metadata;
  17614. const preformatted_settings = {
  17615. icon: library_preformatted,
  17616. example: {
  17617. attributes: {
  17618. /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
  17619. // translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.
  17620. content: Object(external_wp_i18n_["__"])('EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;')
  17621. /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
  17622. }
  17623. },
  17624. transforms: preformatted_transforms,
  17625. edit: PreformattedEdit,
  17626. save: preformatted_save_save,
  17627. merge(attributes, attributesToMerge) {
  17628. return {
  17629. content: attributes.content + attributesToMerge.content
  17630. };
  17631. }
  17632. };
  17633. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pullquote.js
  17634. /**
  17635. * WordPress dependencies
  17636. */
  17637. const pullquote = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  17638. viewBox: "0 0 24 24",
  17639. xmlns: "http://www.w3.org/2000/svg"
  17640. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  17641. d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"
  17642. }));
  17643. /* harmony default export */ var library_pullquote = (pullquote);
  17644. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/shared.js
  17645. const SOLID_COLOR_CLASS = `is-style-solid-color`;
  17646. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/deprecated.js
  17647. /**
  17648. * External dependencies
  17649. */
  17650. /**
  17651. * WordPress dependencies
  17652. */
  17653. /**
  17654. * Internal dependencies
  17655. */
  17656. const pullquote_deprecated_blockAttributes = {
  17657. value: {
  17658. type: 'string',
  17659. source: 'html',
  17660. selector: 'blockquote',
  17661. multiline: 'p'
  17662. },
  17663. citation: {
  17664. type: 'string',
  17665. source: 'html',
  17666. selector: 'cite',
  17667. default: ''
  17668. },
  17669. mainColor: {
  17670. type: 'string'
  17671. },
  17672. customMainColor: {
  17673. type: 'string'
  17674. },
  17675. textColor: {
  17676. type: 'string'
  17677. },
  17678. customTextColor: {
  17679. type: 'string'
  17680. }
  17681. };
  17682. function parseBorderColor(styleString) {
  17683. if (!styleString) {
  17684. return;
  17685. }
  17686. const matches = styleString.match(/border-color:([^;]+)[;]?/);
  17687. if (matches && matches[1]) {
  17688. return matches[1];
  17689. }
  17690. }
  17691. const pullquote_deprecated_deprecated = [{
  17692. attributes: { ...pullquote_deprecated_blockAttributes,
  17693. // figureStyle is an attribute that never existed.
  17694. // We are using it as a way to access the styles previously applied to the figure.
  17695. figureStyle: {
  17696. source: 'attribute',
  17697. selector: 'figure',
  17698. attribute: 'style'
  17699. }
  17700. },
  17701. save({
  17702. attributes
  17703. }) {
  17704. const {
  17705. mainColor,
  17706. customMainColor,
  17707. textColor,
  17708. customTextColor,
  17709. value,
  17710. citation,
  17711. className,
  17712. figureStyle
  17713. } = attributes;
  17714. const isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
  17715. let figureClasses, figureStyles; // Is solid color style
  17716. if (isSolidColorStyle) {
  17717. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', mainColor);
  17718. figureClasses = classnames_default()({
  17719. 'has-background': backgroundClass || customMainColor,
  17720. [backgroundClass]: backgroundClass
  17721. });
  17722. figureStyles = {
  17723. backgroundColor: backgroundClass ? undefined : customMainColor
  17724. }; // Is normal style and a custom color is being used ( we can set a style directly with its value)
  17725. } else if (customMainColor) {
  17726. figureStyles = {
  17727. borderColor: customMainColor
  17728. }; // If normal style and a named color are being used, we need to retrieve the color value to set the style,
  17729. // as there is no expectation that themes create classes that set border colors.
  17730. } else if (mainColor) {
  17731. // Previously here we queried the color settings to know the color value
  17732. // of a named color. This made the save function impure and the block was refactored,
  17733. // because meanwhile a change in the editor made it impossible to query color settings in the save function.
  17734. // Here instead of querying the color settings to know the color value, we retrieve the value
  17735. // directly from the style previously serialized.
  17736. const borderColor = parseBorderColor(figureStyle);
  17737. figureStyles = {
  17738. borderColor
  17739. };
  17740. }
  17741. const blockquoteTextColorClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  17742. const blockquoteClasses = (textColor || customTextColor) && classnames_default()('has-text-color', {
  17743. [blockquoteTextColorClass]: blockquoteTextColorClass
  17744. });
  17745. const blockquoteStyles = blockquoteTextColorClass ? undefined : {
  17746. color: customTextColor
  17747. };
  17748. return Object(external_wp_element_["createElement"])("figure", {
  17749. className: figureClasses,
  17750. style: figureStyles
  17751. }, Object(external_wp_element_["createElement"])("blockquote", {
  17752. className: blockquoteClasses,
  17753. style: blockquoteStyles
  17754. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17755. value: value,
  17756. multiline: true
  17757. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17758. tagName: "cite",
  17759. value: citation
  17760. })));
  17761. },
  17762. migrate({
  17763. className,
  17764. figureStyle,
  17765. mainColor,
  17766. ...attributes
  17767. }) {
  17768. const isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS); // If is the default style, and a main color is set,
  17769. // migrate the main color value into a custom color.
  17770. // The custom color value is retrived by parsing the figure styles.
  17771. if (!isSolidColorStyle && mainColor && figureStyle) {
  17772. const borderColor = parseBorderColor(figureStyle);
  17773. if (borderColor) {
  17774. return { ...attributes,
  17775. className,
  17776. customMainColor: borderColor
  17777. };
  17778. }
  17779. }
  17780. return {
  17781. className,
  17782. mainColor,
  17783. ...attributes
  17784. };
  17785. }
  17786. }, {
  17787. attributes: pullquote_deprecated_blockAttributes,
  17788. save({
  17789. attributes
  17790. }) {
  17791. const {
  17792. mainColor,
  17793. customMainColor,
  17794. textColor,
  17795. customTextColor,
  17796. value,
  17797. citation,
  17798. className
  17799. } = attributes;
  17800. const isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
  17801. let figureClass, figureStyles; // Is solid color style
  17802. if (isSolidColorStyle) {
  17803. figureClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', mainColor);
  17804. if (!figureClass) {
  17805. figureStyles = {
  17806. backgroundColor: customMainColor
  17807. };
  17808. } // Is normal style and a custom color is being used ( we can set a style directly with its value)
  17809. } else if (customMainColor) {
  17810. figureStyles = {
  17811. borderColor: customMainColor
  17812. }; // Is normal style and a named color is being used, we need to retrieve the color value to set the style,
  17813. // as there is no expectation that themes create classes that set border colors.
  17814. } else if (mainColor) {
  17815. const colors = Object(external_lodash_["get"])(Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(), ['colors'], []);
  17816. const colorObject = Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, mainColor);
  17817. figureStyles = {
  17818. borderColor: colorObject.color
  17819. };
  17820. }
  17821. const blockquoteTextColorClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  17822. const blockquoteClasses = textColor || customTextColor ? classnames_default()('has-text-color', {
  17823. [blockquoteTextColorClass]: blockquoteTextColorClass
  17824. }) : undefined;
  17825. const blockquoteStyle = blockquoteTextColorClass ? undefined : {
  17826. color: customTextColor
  17827. };
  17828. return Object(external_wp_element_["createElement"])("figure", {
  17829. className: figureClass,
  17830. style: figureStyles
  17831. }, Object(external_wp_element_["createElement"])("blockquote", {
  17832. className: blockquoteClasses,
  17833. style: blockquoteStyle
  17834. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17835. value: value,
  17836. multiline: true
  17837. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17838. tagName: "cite",
  17839. value: citation
  17840. })));
  17841. }
  17842. }, {
  17843. attributes: { ...pullquote_deprecated_blockAttributes
  17844. },
  17845. save({
  17846. attributes
  17847. }) {
  17848. const {
  17849. value,
  17850. citation
  17851. } = attributes;
  17852. return Object(external_wp_element_["createElement"])("blockquote", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17853. value: value,
  17854. multiline: true
  17855. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17856. tagName: "cite",
  17857. value: citation
  17858. }));
  17859. }
  17860. }, {
  17861. attributes: { ...pullquote_deprecated_blockAttributes,
  17862. citation: {
  17863. type: 'string',
  17864. source: 'html',
  17865. selector: 'footer'
  17866. },
  17867. align: {
  17868. type: 'string',
  17869. default: 'none'
  17870. }
  17871. },
  17872. save({
  17873. attributes
  17874. }) {
  17875. const {
  17876. value,
  17877. citation,
  17878. align
  17879. } = attributes;
  17880. return Object(external_wp_element_["createElement"])("blockquote", {
  17881. className: `align${align}`
  17882. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17883. value: value,
  17884. multiline: true
  17885. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  17886. tagName: "footer",
  17887. value: citation
  17888. }));
  17889. }
  17890. }];
  17891. /* harmony default export */ var pullquote_deprecated = (pullquote_deprecated_deprecated);
  17892. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/figure.js
  17893. const Figure = 'figure';
  17894. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/blockquote.js
  17895. const BlockQuote = 'blockquote';
  17896. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/edit.js
  17897. /**
  17898. * External dependencies
  17899. */
  17900. /**
  17901. * WordPress dependencies
  17902. */
  17903. /**
  17904. * Internal dependencies
  17905. */
  17906. /**
  17907. * Internal dependencies
  17908. */
  17909. function PullQuoteEdit({
  17910. colorUtils,
  17911. textColor,
  17912. attributes: {
  17913. value,
  17914. citation
  17915. },
  17916. setAttributes,
  17917. setTextColor,
  17918. setMainColor,
  17919. mainColor,
  17920. isSelected,
  17921. insertBlocksAfter
  17922. }) {
  17923. const wasTextColorAutomaticallyComputed = Object(external_wp_element_["useRef"])(false);
  17924. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  17925. const {
  17926. style = {},
  17927. className
  17928. } = blockProps;
  17929. const isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
  17930. const newBlockProps = { ...blockProps,
  17931. className: classnames_default()(className, {
  17932. 'has-background': isSolidColorStyle && mainColor.color,
  17933. [mainColor.class]: isSolidColorStyle && mainColor.class
  17934. }),
  17935. style: isSolidColorStyle ? { ...style,
  17936. backgroundColor: mainColor.color
  17937. } : { ...style,
  17938. borderColor: mainColor.color
  17939. }
  17940. };
  17941. function pullQuoteMainColorSetter(colorValue) {
  17942. const needTextColor = !textColor.color || wasTextColorAutomaticallyComputed.current;
  17943. const shouldSetTextColor = isSolidColorStyle && needTextColor;
  17944. if (isSolidColorStyle) {
  17945. // If we use the solid color style, set the color using the normal mechanism.
  17946. setMainColor(colorValue);
  17947. } else {
  17948. // If we use the default style, set the color as a custom color to force the usage of an inline style.
  17949. // Default style uses a border color for which classes are not available.
  17950. setAttributes({
  17951. customMainColor: colorValue
  17952. });
  17953. }
  17954. if (shouldSetTextColor) {
  17955. if (colorValue) {
  17956. wasTextColorAutomaticallyComputed.current = true;
  17957. setTextColor(colorUtils.getMostReadableColor(colorValue));
  17958. } else if (wasTextColorAutomaticallyComputed.current) {
  17959. // We have to unset our previously computed text color on unsetting the main color.
  17960. wasTextColorAutomaticallyComputed.current = false;
  17961. setTextColor();
  17962. }
  17963. }
  17964. }
  17965. function pullQuoteTextColorSetter(colorValue) {
  17966. setTextColor(colorValue);
  17967. wasTextColorAutomaticallyComputed.current = false;
  17968. }
  17969. Object(external_wp_element_["useEffect"])(() => {
  17970. // If the block includes a named color and we switched from the
  17971. // solid color style to the default style.
  17972. if (mainColor && !isSolidColorStyle) {
  17973. // Remove the named color, and set the color as a custom color.
  17974. // This is done because named colors use classes, in the default style we use a border color,
  17975. // and themes don't set classes for border colors.
  17976. setAttributes({
  17977. mainColor: undefined,
  17978. customMainColor: mainColor.color
  17979. });
  17980. }
  17981. }, [isSolidColorStyle, mainColor]);
  17982. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(Figure, newBlockProps, Object(external_wp_element_["createElement"])(BlockQuote, {
  17983. style: {
  17984. color: textColor.color
  17985. },
  17986. className: textColor.color && classnames_default()('has-text-color', {
  17987. [textColor.class]: textColor.class
  17988. })
  17989. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  17990. identifier: "value",
  17991. multiline: true,
  17992. value: value,
  17993. onChange: nextValue => setAttributes({
  17994. value: nextValue
  17995. }),
  17996. "aria-label": Object(external_wp_i18n_["__"])('Pullquote text'),
  17997. placeholder: // translators: placeholder text used for the quote
  17998. Object(external_wp_i18n_["__"])('Add quote'),
  17999. textAlign: "center"
  18000. }), (!external_wp_blockEditor_["RichText"].isEmpty(citation) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  18001. identifier: "citation",
  18002. value: citation,
  18003. "aria-label": Object(external_wp_i18n_["__"])('Pullquote citation text'),
  18004. placeholder: // translators: placeholder text used for the citation
  18005. Object(external_wp_i18n_["__"])('Add citation'),
  18006. onChange: nextCitation => setAttributes({
  18007. citation: nextCitation
  18008. }),
  18009. className: "wp-block-pullquote__citation",
  18010. __unstableMobileNoFocusOnMount: true,
  18011. textAlign: "center",
  18012. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  18013. }))), external_wp_element_["Platform"].OS === 'web' && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PanelColorSettings"], {
  18014. title: Object(external_wp_i18n_["__"])('Color'),
  18015. colorSettings: [{
  18016. value: mainColor.color,
  18017. onChange: pullQuoteMainColorSetter,
  18018. label: Object(external_wp_i18n_["__"])('Main color')
  18019. }, {
  18020. value: textColor.color,
  18021. onChange: pullQuoteTextColorSetter,
  18022. label: Object(external_wp_i18n_["__"])('Text color')
  18023. }]
  18024. }, isSolidColorStyle && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ContrastChecker"], {
  18025. textColor: textColor.color,
  18026. backgroundColor: mainColor.color,
  18027. isLargeText: false
  18028. }))));
  18029. }
  18030. /* harmony default export */ var pullquote_edit = (Object(external_wp_blockEditor_["withColors"])({
  18031. mainColor: 'background-color',
  18032. textColor: 'color'
  18033. })(PullQuoteEdit));
  18034. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/save.js
  18035. /**
  18036. * External dependencies
  18037. */
  18038. /**
  18039. * WordPress dependencies
  18040. */
  18041. /**
  18042. * Internal dependencies
  18043. */
  18044. function pullquote_save_save({
  18045. attributes
  18046. }) {
  18047. const {
  18048. mainColor,
  18049. customMainColor,
  18050. textColor,
  18051. customTextColor,
  18052. value,
  18053. citation,
  18054. className
  18055. } = attributes;
  18056. const isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
  18057. let figureClasses, figureStyles; // Is solid color style
  18058. if (isSolidColorStyle) {
  18059. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', mainColor);
  18060. figureClasses = classnames_default()({
  18061. 'has-background': backgroundClass || customMainColor,
  18062. [backgroundClass]: backgroundClass
  18063. });
  18064. figureStyles = {
  18065. backgroundColor: backgroundClass ? undefined : customMainColor
  18066. }; // Is normal style and a custom color is being used ( we can set a style directly with its value)
  18067. } else if (customMainColor) {
  18068. figureStyles = {
  18069. borderColor: customMainColor
  18070. };
  18071. }
  18072. const blockquoteTextColorClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  18073. const blockquoteClasses = (textColor || customTextColor) && classnames_default()('has-text-color', {
  18074. [blockquoteTextColorClass]: blockquoteTextColorClass
  18075. });
  18076. const blockquoteStyles = blockquoteTextColorClass ? undefined : {
  18077. color: customTextColor
  18078. };
  18079. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({
  18080. className: figureClasses,
  18081. style: figureStyles
  18082. }), Object(external_wp_element_["createElement"])("blockquote", {
  18083. className: blockquoteClasses,
  18084. style: blockquoteStyles
  18085. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  18086. value: value,
  18087. multiline: true
  18088. }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  18089. tagName: "cite",
  18090. value: citation
  18091. })));
  18092. }
  18093. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/transforms.js
  18094. /**
  18095. * WordPress dependencies
  18096. */
  18097. const pullquote_transforms_transforms = {
  18098. from: [{
  18099. type: 'block',
  18100. isMultiBlock: true,
  18101. blocks: ['core/paragraph'],
  18102. transform: attributes => {
  18103. return Object(external_wp_blocks_["createBlock"])('core/pullquote', {
  18104. value: Object(external_wp_richText_["toHTMLString"])({
  18105. value: Object(external_wp_richText_["join"])(attributes.map(({
  18106. content
  18107. }) => Object(external_wp_richText_["create"])({
  18108. html: content
  18109. })), '\u2028'),
  18110. multilineTag: 'p'
  18111. }),
  18112. anchor: attributes.anchor
  18113. });
  18114. }
  18115. }, {
  18116. type: 'block',
  18117. blocks: ['core/heading'],
  18118. transform: ({
  18119. content,
  18120. anchor
  18121. }) => {
  18122. return Object(external_wp_blocks_["createBlock"])('core/pullquote', {
  18123. value: `<p>${content}</p>`,
  18124. anchor
  18125. });
  18126. }
  18127. }],
  18128. to: [{
  18129. type: 'block',
  18130. blocks: ['core/paragraph'],
  18131. transform: ({
  18132. value,
  18133. citation
  18134. }) => {
  18135. const paragraphs = [];
  18136. if (value && value !== '<p></p>') {
  18137. paragraphs.push(...Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
  18138. html: value,
  18139. multilineTag: 'p'
  18140. }), '\u2028').map(piece => Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  18141. content: Object(external_wp_richText_["toHTMLString"])({
  18142. value: piece
  18143. })
  18144. })));
  18145. }
  18146. if (citation && citation !== '<p></p>') {
  18147. paragraphs.push(Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  18148. content: citation
  18149. }));
  18150. }
  18151. if (paragraphs.length === 0) {
  18152. return Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  18153. content: ''
  18154. });
  18155. }
  18156. return paragraphs;
  18157. }
  18158. }, {
  18159. type: 'block',
  18160. blocks: ['core/heading'],
  18161. transform: ({
  18162. value,
  18163. citation,
  18164. ...attrs
  18165. }) => {
  18166. // If there is no pullquote content, use the citation as the
  18167. // content of the resulting heading. A nonexistent citation
  18168. // will result in an empty heading.
  18169. if (value === '<p></p>') {
  18170. return Object(external_wp_blocks_["createBlock"])('core/heading', {
  18171. content: citation
  18172. });
  18173. }
  18174. const pieces = Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
  18175. html: value,
  18176. multilineTag: 'p'
  18177. }), '\u2028');
  18178. const headingBlock = Object(external_wp_blocks_["createBlock"])('core/heading', {
  18179. content: Object(external_wp_richText_["toHTMLString"])({
  18180. value: pieces[0]
  18181. })
  18182. });
  18183. if (!citation && pieces.length === 1) {
  18184. return headingBlock;
  18185. }
  18186. const quotePieces = pieces.slice(1);
  18187. const pullquoteBlock = Object(external_wp_blocks_["createBlock"])('core/pullquote', { ...attrs,
  18188. citation,
  18189. value: Object(external_wp_richText_["toHTMLString"])({
  18190. value: quotePieces.length ? Object(external_wp_richText_["join"])(pieces.slice(1), '\u2028') : Object(external_wp_richText_["create"])(),
  18191. multilineTag: 'p'
  18192. })
  18193. });
  18194. return [headingBlock, pullquoteBlock];
  18195. }
  18196. }]
  18197. };
  18198. /* harmony default export */ var pullquote_transforms = (pullquote_transforms_transforms);
  18199. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
  18200. /**
  18201. * WordPress dependencies
  18202. */
  18203. /**
  18204. * Internal dependencies
  18205. */
  18206. const pullquote_metadata = {
  18207. apiVersion: 2,
  18208. name: "core/pullquote",
  18209. title: "Pullquote",
  18210. category: "text",
  18211. description: "Give special visual emphasis to a quote from your text.",
  18212. textdomain: "default",
  18213. attributes: {
  18214. value: {
  18215. type: "string",
  18216. source: "html",
  18217. selector: "blockquote",
  18218. multiline: "p",
  18219. __experimentalRole: "content"
  18220. },
  18221. citation: {
  18222. type: "string",
  18223. source: "html",
  18224. selector: "cite",
  18225. "default": "",
  18226. __experimentalRole: "content"
  18227. },
  18228. mainColor: {
  18229. type: "string"
  18230. },
  18231. customMainColor: {
  18232. type: "string"
  18233. },
  18234. textColor: {
  18235. type: "string"
  18236. },
  18237. customTextColor: {
  18238. type: "string"
  18239. }
  18240. },
  18241. supports: {
  18242. anchor: true,
  18243. align: ["left", "right", "wide", "full"]
  18244. },
  18245. styles: [{
  18246. name: "default",
  18247. label: "Default",
  18248. isDefault: true
  18249. }, {
  18250. name: "solid-color",
  18251. label: "Solid color"
  18252. }],
  18253. editorStyle: "wp-block-pullquote-editor",
  18254. style: "wp-block-pullquote"
  18255. };
  18256. const {
  18257. name: pullquote_name
  18258. } = pullquote_metadata;
  18259. const pullquote_settings = {
  18260. icon: library_pullquote,
  18261. example: {
  18262. attributes: {
  18263. value: '<p>' + // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
  18264. Object(external_wp_i18n_["__"])('One of the hardest things to do in technology is disrupt yourself.') + '</p>',
  18265. citation: Object(external_wp_i18n_["__"])('Matt Mullenweg')
  18266. }
  18267. },
  18268. transforms: pullquote_transforms,
  18269. edit: pullquote_edit,
  18270. save: pullquote_save_save,
  18271. deprecated: pullquote_deprecated
  18272. };
  18273. // EXTERNAL MODULE: external ["wp","reusableBlocks"]
  18274. var external_wp_reusableBlocks_ = __webpack_require__("diJD");
  18275. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/ungroup.js
  18276. /**
  18277. * WordPress dependencies
  18278. */
  18279. const ungroup = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  18280. xmlns: "http://www.w3.org/2000/svg",
  18281. viewBox: "0 0 24 24"
  18282. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  18283. d: "M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"
  18284. }));
  18285. /* harmony default export */ var library_ungroup = (ungroup);
  18286. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/edit.js
  18287. /**
  18288. * WordPress dependencies
  18289. */
  18290. function ReusableBlockEdit({
  18291. attributes: {
  18292. ref
  18293. },
  18294. clientId
  18295. }) {
  18296. const [hasAlreadyRendered, RecursionProvider] = Object(external_wp_blockEditor_["__experimentalUseNoRecursiveRenders"])(ref);
  18297. const {
  18298. isMissing,
  18299. hasResolved
  18300. } = Object(external_wp_data_["useSelect"])(select => {
  18301. const persistedBlock = select(external_wp_coreData_["store"]).getEntityRecord('postType', 'wp_block', ref);
  18302. const hasResolvedBlock = select(external_wp_coreData_["store"]).hasFinishedResolution('getEntityRecord', ['postType', 'wp_block', ref]);
  18303. return {
  18304. hasResolved: hasResolvedBlock,
  18305. isMissing: hasResolvedBlock && !persistedBlock
  18306. };
  18307. }, [ref, clientId]);
  18308. const {
  18309. __experimentalConvertBlockToStatic: convertBlockToStatic
  18310. } = Object(external_wp_data_["useDispatch"])(external_wp_reusableBlocks_["store"]);
  18311. const [blocks, onInput, onChange] = Object(external_wp_coreData_["useEntityBlockEditor"])('postType', 'wp_block', {
  18312. id: ref
  18313. });
  18314. const [title, setTitle] = Object(external_wp_coreData_["useEntityProp"])('postType', 'wp_block', 'title', ref);
  18315. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({}, {
  18316. value: blocks,
  18317. onInput,
  18318. onChange,
  18319. renderAppender: blocks !== null && blocks !== void 0 && blocks.length ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender
  18320. });
  18321. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  18322. if (hasAlreadyRendered) {
  18323. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block cannot be rendered inside itself.')));
  18324. }
  18325. if (isMissing) {
  18326. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block has been deleted or is unavailable.')));
  18327. }
  18328. if (!hasResolved) {
  18329. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)));
  18330. }
  18331. return Object(external_wp_element_["createElement"])(RecursionProvider, null, Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  18332. onClick: () => convertBlockToStatic(clientId),
  18333. label: Object(external_wp_i18n_["__"])('Convert to regular blocks'),
  18334. icon: library_ungroup,
  18335. showTooltip: true
  18336. }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  18337. label: Object(external_wp_i18n_["__"])('Name'),
  18338. value: title,
  18339. onChange: setTitle
  18340. }))), Object(external_wp_element_["createElement"])("div", {
  18341. className: "block-library-block__reusable-block-container"
  18342. }, Object(external_wp_element_["createElement"])("div", innerBlocksProps))));
  18343. }
  18344. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/index.js
  18345. /**
  18346. * Internal dependencies
  18347. */
  18348. const block_metadata = {
  18349. apiVersion: 2,
  18350. name: "core/block",
  18351. title: "Reusable block",
  18352. category: "reusable",
  18353. description: "Create and save content to reuse across your site. Update the block, and the changes apply everywhere it\u2019s used.",
  18354. textdomain: "default",
  18355. attributes: {
  18356. ref: {
  18357. type: "number"
  18358. }
  18359. },
  18360. supports: {
  18361. customClassName: false,
  18362. html: false,
  18363. inserter: false
  18364. },
  18365. editorStyle: "wp-block-editor"
  18366. };
  18367. const {
  18368. name: block_name
  18369. } = block_metadata;
  18370. const block_settings = {
  18371. edit: ReusableBlockEdit
  18372. };
  18373. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rss.js
  18374. /**
  18375. * WordPress dependencies
  18376. */
  18377. const rss = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  18378. xmlns: "http://www.w3.org/2000/svg",
  18379. viewBox: "0 0 24 24"
  18380. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  18381. d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"
  18382. }));
  18383. /* harmony default export */ var library_rss = (rss);
  18384. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/edit.js
  18385. /**
  18386. * WordPress dependencies
  18387. */
  18388. const DEFAULT_MIN_ITEMS = 1;
  18389. const DEFAULT_MAX_ITEMS = 10;
  18390. function RSSEdit({
  18391. attributes,
  18392. setAttributes
  18393. }) {
  18394. const [isEditing, setIsEditing] = Object(external_wp_element_["useState"])(!attributes.feedURL);
  18395. const {
  18396. blockLayout,
  18397. columns,
  18398. displayAuthor,
  18399. displayDate,
  18400. displayExcerpt,
  18401. excerptLength,
  18402. feedURL,
  18403. itemsToShow
  18404. } = attributes;
  18405. function toggleAttribute(propName) {
  18406. return () => {
  18407. const value = attributes[propName];
  18408. setAttributes({
  18409. [propName]: !value
  18410. });
  18411. };
  18412. }
  18413. function onSubmitURL(event) {
  18414. event.preventDefault();
  18415. if (feedURL) {
  18416. setIsEditing(false);
  18417. }
  18418. }
  18419. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  18420. if (isEditing) {
  18421. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  18422. icon: library_rss,
  18423. label: "RSS"
  18424. }, Object(external_wp_element_["createElement"])("form", {
  18425. onSubmit: onSubmitURL,
  18426. className: "wp-block-rss__placeholder-form"
  18427. }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  18428. placeholder: Object(external_wp_i18n_["__"])('Enter URL here…'),
  18429. value: feedURL,
  18430. onChange: value => setAttributes({
  18431. feedURL: value
  18432. }),
  18433. className: "wp-block-rss__placeholder-input"
  18434. }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  18435. isPrimary: true,
  18436. type: "submit"
  18437. }, Object(external_wp_i18n_["__"])('Use URL')))));
  18438. }
  18439. const toolbarControls = [{
  18440. icon: library_edit["a" /* default */],
  18441. title: Object(external_wp_i18n_["__"])('Edit RSS URL'),
  18442. onClick: () => setIsEditing(true)
  18443. }, {
  18444. icon: library_list,
  18445. title: Object(external_wp_i18n_["__"])('List view'),
  18446. onClick: () => setAttributes({
  18447. blockLayout: 'list'
  18448. }),
  18449. isActive: blockLayout === 'list'
  18450. }, {
  18451. icon: grid["a" /* default */],
  18452. title: Object(external_wp_i18n_["__"])('Grid view'),
  18453. onClick: () => setAttributes({
  18454. blockLayout: 'grid'
  18455. }),
  18456. isActive: blockLayout === 'grid'
  18457. }];
  18458. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
  18459. controls: toolbarControls
  18460. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  18461. title: Object(external_wp_i18n_["__"])('RSS settings')
  18462. }, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  18463. label: Object(external_wp_i18n_["__"])('Number of items'),
  18464. value: itemsToShow,
  18465. onChange: value => setAttributes({
  18466. itemsToShow: value
  18467. }),
  18468. min: DEFAULT_MIN_ITEMS,
  18469. max: DEFAULT_MAX_ITEMS,
  18470. required: true
  18471. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  18472. label: Object(external_wp_i18n_["__"])('Display author'),
  18473. checked: displayAuthor,
  18474. onChange: toggleAttribute('displayAuthor')
  18475. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  18476. label: Object(external_wp_i18n_["__"])('Display date'),
  18477. checked: displayDate,
  18478. onChange: toggleAttribute('displayDate')
  18479. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  18480. label: Object(external_wp_i18n_["__"])('Display excerpt'),
  18481. checked: displayExcerpt,
  18482. onChange: toggleAttribute('displayExcerpt')
  18483. }), displayExcerpt && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  18484. label: Object(external_wp_i18n_["__"])('Max number of words in excerpt'),
  18485. value: excerptLength,
  18486. onChange: value => setAttributes({
  18487. excerptLength: value
  18488. }),
  18489. min: 10,
  18490. max: 100,
  18491. required: true
  18492. }), blockLayout === 'grid' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  18493. label: Object(external_wp_i18n_["__"])('Columns'),
  18494. value: columns,
  18495. onChange: value => setAttributes({
  18496. columns: value
  18497. }),
  18498. min: 2,
  18499. max: 6,
  18500. required: true
  18501. }))), Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
  18502. block: "core/rss",
  18503. attributes: attributes
  18504. }))));
  18505. }
  18506. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/index.js
  18507. /**
  18508. * WordPress dependencies
  18509. */
  18510. /**
  18511. * Internal dependencies
  18512. */
  18513. const rss_metadata = {
  18514. apiVersion: 2,
  18515. name: "core/rss",
  18516. title: "RSS",
  18517. category: "widgets",
  18518. description: "Display entries from any RSS or Atom feed.",
  18519. keywords: ["atom", "feed"],
  18520. textdomain: "default",
  18521. attributes: {
  18522. columns: {
  18523. type: "number",
  18524. "default": 2
  18525. },
  18526. blockLayout: {
  18527. type: "string",
  18528. "default": "list"
  18529. },
  18530. feedURL: {
  18531. type: "string",
  18532. "default": ""
  18533. },
  18534. itemsToShow: {
  18535. type: "number",
  18536. "default": 5
  18537. },
  18538. displayExcerpt: {
  18539. type: "boolean",
  18540. "default": false
  18541. },
  18542. displayAuthor: {
  18543. type: "boolean",
  18544. "default": false
  18545. },
  18546. displayDate: {
  18547. type: "boolean",
  18548. "default": false
  18549. },
  18550. excerptLength: {
  18551. type: "number",
  18552. "default": 55
  18553. }
  18554. },
  18555. supports: {
  18556. align: true,
  18557. html: false
  18558. },
  18559. editorStyle: "wp-block-rss-editor",
  18560. style: "wp-block-rss"
  18561. };
  18562. const {
  18563. name: rss_name
  18564. } = rss_metadata;
  18565. const rss_settings = {
  18566. icon: library_rss,
  18567. example: {
  18568. attributes: {
  18569. feedURL: 'https://wordpress.org'
  18570. }
  18571. },
  18572. edit: RSSEdit
  18573. };
  18574. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/icons.js
  18575. /**
  18576. * WordPress dependencies
  18577. */
  18578. const buttonOnly = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  18579. xmlns: "http://www.w3.org/2000/svg",
  18580. viewBox: "0 0 24 24"
  18581. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18582. x: "7",
  18583. y: "10",
  18584. width: "10",
  18585. height: "4",
  18586. rx: "1",
  18587. fill: "currentColor"
  18588. }));
  18589. const buttonOutside = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  18590. xmlns: "http://www.w3.org/2000/svg",
  18591. viewBox: "0 0 24 24"
  18592. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18593. x: "4.75",
  18594. y: "15.25",
  18595. width: "6.5",
  18596. height: "9.5",
  18597. transform: "rotate(-90 4.75 15.25)",
  18598. stroke: "currentColor",
  18599. strokeWidth: "1.5",
  18600. fill: "none"
  18601. }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18602. x: "16",
  18603. y: "10",
  18604. width: "4",
  18605. height: "4",
  18606. rx: "1",
  18607. fill: "currentColor"
  18608. }));
  18609. const buttonInside = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  18610. xmlns: "http://www.w3.org/2000/svg",
  18611. viewBox: "0 0 24 24"
  18612. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18613. x: "4.75",
  18614. y: "15.25",
  18615. width: "6.5",
  18616. height: "14.5",
  18617. transform: "rotate(-90 4.75 15.25)",
  18618. stroke: "currentColor",
  18619. strokeWidth: "1.5",
  18620. fill: "none"
  18621. }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18622. x: "14",
  18623. y: "10",
  18624. width: "4",
  18625. height: "4",
  18626. rx: "1",
  18627. fill: "currentColor"
  18628. }));
  18629. const noButton = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  18630. xmlns: "http://www.w3.org/2000/svg",
  18631. viewBox: "0 0 24 24"
  18632. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18633. x: "4.75",
  18634. y: "15.25",
  18635. width: "6.5",
  18636. height: "14.5",
  18637. transform: "rotate(-90 4.75 15.25)",
  18638. stroke: "currentColor",
  18639. fill: "none",
  18640. strokeWidth: "1.5"
  18641. }));
  18642. const buttonWithIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  18643. xmlns: "http://www.w3.org/2000/svg",
  18644. viewBox: "0 0 24 24"
  18645. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18646. x: "4.75",
  18647. y: "7.75",
  18648. width: "14.5",
  18649. height: "8.5",
  18650. rx: "1.25",
  18651. stroke: "currentColor",
  18652. fill: "none",
  18653. strokeWidth: "1.5"
  18654. }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18655. x: "8",
  18656. y: "11",
  18657. width: "8",
  18658. height: "2",
  18659. fill: "currentColor"
  18660. }));
  18661. const toggleLabel = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  18662. xmlns: "http://www.w3.org/2000/svg",
  18663. viewBox: "0 0 24 24"
  18664. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18665. x: "4.75",
  18666. y: "17.25",
  18667. width: "5.5",
  18668. height: "14.5",
  18669. transform: "rotate(-90 4.75 17.25)",
  18670. stroke: "currentColor",
  18671. fill: "none",
  18672. strokeWidth: "1.5"
  18673. }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  18674. x: "4",
  18675. y: "7",
  18676. width: "10",
  18677. height: "2",
  18678. fill: "currentColor"
  18679. }));
  18680. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/utils.js
  18681. /**
  18682. * Constants
  18683. */
  18684. const PC_WIDTH_DEFAULT = 50;
  18685. const PX_WIDTH_DEFAULT = 350;
  18686. const MIN_WIDTH = 220;
  18687. const MIN_WIDTH_UNIT = 'px';
  18688. /**
  18689. * Returns a boolean whether passed unit is percentage
  18690. *
  18691. * @param {string} unit Block width unit.
  18692. *
  18693. * @return {boolean} Whether unit is '%'.
  18694. */
  18695. function utils_isPercentageUnit(unit) {
  18696. return unit === '%';
  18697. }
  18698. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/edit.js
  18699. /**
  18700. * External dependencies
  18701. */
  18702. /**
  18703. * WordPress dependencies
  18704. */
  18705. /**
  18706. * Internal dependencies
  18707. */
  18708. // Used to calculate border radius adjustment to avoid "fat" corners when
  18709. // button is placed inside wrapper.
  18710. const DEFAULT_INNER_PADDING = 4;
  18711. function SearchEdit({
  18712. className,
  18713. attributes,
  18714. setAttributes,
  18715. toggleSelection,
  18716. isSelected
  18717. }) {
  18718. var _style$border;
  18719. const {
  18720. label,
  18721. showLabel,
  18722. placeholder,
  18723. width,
  18724. widthUnit,
  18725. align,
  18726. buttonText,
  18727. buttonPosition,
  18728. buttonUseIcon,
  18729. style
  18730. } = attributes;
  18731. const borderRadius = style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius;
  18732. const unitControlInstanceId = Object(external_wp_compose_["useInstanceId"])(external_wp_blockEditor_["__experimentalUnitControl"]);
  18733. const unitControlInputId = `wp-block-search__width-${unitControlInstanceId}`;
  18734. const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
  18735. availableUnits: ['%', 'px'],
  18736. defaultValues: {
  18737. '%': PC_WIDTH_DEFAULT,
  18738. px: PX_WIDTH_DEFAULT
  18739. }
  18740. });
  18741. const getBlockClassNames = () => {
  18742. return classnames_default()(className, 'button-inside' === buttonPosition ? 'wp-block-search__button-inside' : undefined, 'button-outside' === buttonPosition ? 'wp-block-search__button-outside' : undefined, 'no-button' === buttonPosition ? 'wp-block-search__no-button' : undefined, 'button-only' === buttonPosition ? 'wp-block-search__button-only' : undefined, !buttonUseIcon && 'no-button' !== buttonPosition ? 'wp-block-search__text-button' : undefined, buttonUseIcon && 'no-button' !== buttonPosition ? 'wp-block-search__icon-button' : undefined);
  18743. };
  18744. const getButtonPositionIcon = () => {
  18745. switch (buttonPosition) {
  18746. case 'button-inside':
  18747. return buttonInside;
  18748. case 'button-outside':
  18749. return buttonOutside;
  18750. case 'no-button':
  18751. return noButton;
  18752. case 'button-only':
  18753. return buttonOnly;
  18754. }
  18755. };
  18756. const getResizableSides = () => {
  18757. if ('button-only' === buttonPosition) {
  18758. return {};
  18759. }
  18760. return {
  18761. right: align === 'right' ? false : true,
  18762. left: align === 'right' ? true : false
  18763. };
  18764. };
  18765. const renderTextField = () => {
  18766. return Object(external_wp_element_["createElement"])("input", {
  18767. className: "wp-block-search__input",
  18768. style: {
  18769. borderRadius
  18770. },
  18771. "aria-label": Object(external_wp_i18n_["__"])('Optional placeholder text') // We hide the placeholder field's placeholder when there is a value. This
  18772. // stops screen readers from reading the placeholder field's placeholder
  18773. // which is confusing.
  18774. ,
  18775. placeholder: placeholder ? undefined : Object(external_wp_i18n_["__"])('Optional placeholder…'),
  18776. value: placeholder,
  18777. onChange: event => setAttributes({
  18778. placeholder: event.target.value
  18779. })
  18780. });
  18781. };
  18782. const renderButton = () => {
  18783. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, buttonUseIcon && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  18784. icon: library_search["a" /* default */],
  18785. className: "wp-block-search__button",
  18786. style: {
  18787. borderRadius
  18788. }
  18789. }), !buttonUseIcon && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  18790. className: "wp-block-search__button",
  18791. style: {
  18792. borderRadius
  18793. },
  18794. "aria-label": Object(external_wp_i18n_["__"])('Button text'),
  18795. placeholder: Object(external_wp_i18n_["__"])('Add button text…'),
  18796. withoutInteractiveFormatting: true,
  18797. value: buttonText,
  18798. onChange: html => setAttributes({
  18799. buttonText: html
  18800. })
  18801. }));
  18802. };
  18803. const controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  18804. title: Object(external_wp_i18n_["__"])('Toggle search label'),
  18805. icon: toggleLabel,
  18806. onClick: () => {
  18807. setAttributes({
  18808. showLabel: !showLabel
  18809. });
  18810. },
  18811. className: showLabel ? 'is-pressed' : undefined
  18812. }), Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
  18813. icon: getButtonPositionIcon(),
  18814. label: Object(external_wp_i18n_["__"])('Change button position')
  18815. }, ({
  18816. onClose
  18817. }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
  18818. className: "wp-block-search__button-position-menu"
  18819. }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  18820. icon: noButton,
  18821. onClick: () => {
  18822. setAttributes({
  18823. buttonPosition: 'no-button'
  18824. });
  18825. onClose();
  18826. }
  18827. }, Object(external_wp_i18n_["__"])('No Button')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  18828. icon: buttonOutside,
  18829. onClick: () => {
  18830. setAttributes({
  18831. buttonPosition: 'button-outside'
  18832. });
  18833. onClose();
  18834. }
  18835. }, Object(external_wp_i18n_["__"])('Button Outside')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  18836. icon: buttonInside,
  18837. onClick: () => {
  18838. setAttributes({
  18839. buttonPosition: 'button-inside'
  18840. });
  18841. onClose();
  18842. }
  18843. }, Object(external_wp_i18n_["__"])('Button Inside')))), 'no-button' !== buttonPosition && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  18844. title: Object(external_wp_i18n_["__"])('Use button with icon'),
  18845. icon: buttonWithIcon,
  18846. onClick: () => {
  18847. setAttributes({
  18848. buttonUseIcon: !buttonUseIcon
  18849. });
  18850. },
  18851. className: buttonUseIcon ? 'is-pressed' : undefined
  18852. }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  18853. title: Object(external_wp_i18n_["__"])('Display Settings')
  18854. }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
  18855. label: Object(external_wp_i18n_["__"])('Width'),
  18856. id: unitControlInputId
  18857. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalUnitControl"], {
  18858. id: unitControlInputId,
  18859. min: `${MIN_WIDTH}${MIN_WIDTH_UNIT}`,
  18860. onChange: newWidth => {
  18861. const filteredWidth = widthUnit === '%' && parseInt(newWidth, 10) > 100 ? 100 : newWidth;
  18862. setAttributes({
  18863. width: parseInt(filteredWidth, 10)
  18864. });
  18865. },
  18866. onUnitChange: newUnit => {
  18867. setAttributes({
  18868. width: '%' === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
  18869. widthUnit: newUnit
  18870. });
  18871. },
  18872. style: {
  18873. maxWidth: 80
  18874. },
  18875. value: `${width}${widthUnit}`,
  18876. unit: widthUnit,
  18877. units: units
  18878. }), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
  18879. className: "wp-block-search__components-button-group",
  18880. "aria-label": Object(external_wp_i18n_["__"])('Percentage Width')
  18881. }, [25, 50, 75, 100].map(widthValue => {
  18882. return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  18883. key: widthValue,
  18884. isSmall: true,
  18885. isPrimary: `${widthValue}%` === `${width}${widthUnit}`,
  18886. onClick: () => setAttributes({
  18887. width: widthValue,
  18888. widthUnit: '%'
  18889. })
  18890. }, widthValue, "%");
  18891. }))))));
  18892. const getWrapperStyles = () => {
  18893. var _style$border2;
  18894. if ('button-inside' === buttonPosition && style !== null && style !== void 0 && (_style$border2 = style.border) !== null && _style$border2 !== void 0 && _style$border2.radius) {
  18895. var _style$border3;
  18896. // We have button inside wrapper and a border radius value to apply.
  18897. // Add default padding so we don't get "fat" corners.
  18898. const outerRadius = parseInt(style === null || style === void 0 ? void 0 : (_style$border3 = style.border) === null || _style$border3 === void 0 ? void 0 : _style$border3.radius, 10) + DEFAULT_INNER_PADDING;
  18899. return {
  18900. borderRadius: `${outerRadius}px`
  18901. };
  18902. }
  18903. return undefined;
  18904. };
  18905. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  18906. className: getBlockClassNames()
  18907. });
  18908. return Object(external_wp_element_["createElement"])("div", blockProps, controls, showLabel && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  18909. className: "wp-block-search__label",
  18910. "aria-label": Object(external_wp_i18n_["__"])('Label text'),
  18911. placeholder: Object(external_wp_i18n_["__"])('Add label…'),
  18912. withoutInteractiveFormatting: true,
  18913. value: label,
  18914. onChange: html => setAttributes({
  18915. label: html
  18916. })
  18917. }), Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
  18918. size: {
  18919. width: `${width}${widthUnit}`
  18920. },
  18921. className: "wp-block-search__inside-wrapper",
  18922. style: getWrapperStyles(),
  18923. minWidth: MIN_WIDTH,
  18924. enable: getResizableSides(),
  18925. onResizeStart: (event, direction, elt) => {
  18926. setAttributes({
  18927. width: parseInt(elt.offsetWidth, 10),
  18928. widthUnit: 'px'
  18929. });
  18930. toggleSelection(false);
  18931. },
  18932. onResizeStop: (event, direction, elt, delta) => {
  18933. setAttributes({
  18934. width: parseInt(width + delta.width, 10)
  18935. });
  18936. toggleSelection(true);
  18937. },
  18938. showHandle: isSelected
  18939. }, ('button-inside' === buttonPosition || 'button-outside' === buttonPosition) && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, renderTextField(), renderButton()), 'button-only' === buttonPosition && renderButton(), 'no-button' === buttonPosition && renderTextField()));
  18940. }
  18941. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/variations.js
  18942. /**
  18943. * WordPress dependencies
  18944. */
  18945. const search_variations_variations = [{
  18946. name: 'default',
  18947. isDefault: true,
  18948. attributes: {
  18949. buttonText: Object(external_wp_i18n_["__"])('Search'),
  18950. label: Object(external_wp_i18n_["__"])('Search')
  18951. }
  18952. }];
  18953. /* harmony default export */ var search_variations = (search_variations_variations);
  18954. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/index.js
  18955. /**
  18956. * WordPress dependencies
  18957. */
  18958. /**
  18959. * Internal dependencies
  18960. */
  18961. const search_metadata = {
  18962. apiVersion: 2,
  18963. name: "core/search",
  18964. title: "Search",
  18965. category: "widgets",
  18966. description: "Help visitors find your content.",
  18967. keywords: ["find"],
  18968. textdomain: "default",
  18969. attributes: {
  18970. label: {
  18971. type: "string",
  18972. __experimentalRole: "content"
  18973. },
  18974. showLabel: {
  18975. type: "boolean",
  18976. "default": true
  18977. },
  18978. placeholder: {
  18979. type: "string",
  18980. "default": "",
  18981. __experimentalRole: "content"
  18982. },
  18983. width: {
  18984. type: "number"
  18985. },
  18986. widthUnit: {
  18987. type: "string"
  18988. },
  18989. buttonText: {
  18990. type: "string",
  18991. __experimentalRole: "content"
  18992. },
  18993. buttonPosition: {
  18994. type: "string",
  18995. "default": "button-outside"
  18996. },
  18997. buttonUseIcon: {
  18998. type: "boolean",
  18999. "default": false
  19000. }
  19001. },
  19002. supports: {
  19003. align: ["left", "center", "right"],
  19004. __experimentalBorder: {
  19005. radius: true,
  19006. __experimentalSkipSerialization: true
  19007. },
  19008. html: false
  19009. },
  19010. editorStyle: "wp-block-search-editor",
  19011. style: "wp-block-search"
  19012. };
  19013. const {
  19014. name: search_name
  19015. } = search_metadata;
  19016. const search_settings = {
  19017. icon: library_search["a" /* default */],
  19018. example: {},
  19019. variations: search_variations,
  19020. edit: SearchEdit
  19021. };
  19022. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/group.js
  19023. /**
  19024. * WordPress dependencies
  19025. */
  19026. const group = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  19027. viewBox: "0 0 24 24",
  19028. xmlns: "http://www.w3.org/2000/svg"
  19029. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  19030. d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"
  19031. }));
  19032. /* harmony default export */ var library_group = (group);
  19033. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/deprecated.js
  19034. /**
  19035. * External dependencies
  19036. */
  19037. /**
  19038. * WordPress dependencies
  19039. */
  19040. const migrateAttributes = attributes => {
  19041. if (!attributes.tagName) {
  19042. attributes = { ...attributes,
  19043. tagName: 'div'
  19044. };
  19045. }
  19046. if (!attributes.customTextColor && !attributes.customBackgroundColor) {
  19047. return attributes;
  19048. }
  19049. const style = {
  19050. color: {}
  19051. };
  19052. if (attributes.customTextColor) {
  19053. style.color.text = attributes.customTextColor;
  19054. }
  19055. if (attributes.customBackgroundColor) {
  19056. style.color.background = attributes.customBackgroundColor;
  19057. }
  19058. return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor']),
  19059. style
  19060. };
  19061. };
  19062. const group_deprecated_deprecated = [// Version of the block with the double div.
  19063. {
  19064. attributes: {
  19065. tagName: {
  19066. type: 'string',
  19067. default: 'div'
  19068. },
  19069. templateLock: {
  19070. type: 'string'
  19071. }
  19072. },
  19073. supports: {
  19074. align: ['wide', 'full'],
  19075. anchor: true,
  19076. color: {
  19077. gradients: true,
  19078. link: true
  19079. },
  19080. spacing: {
  19081. padding: true
  19082. },
  19083. __experimentalBorder: {
  19084. radius: true
  19085. }
  19086. },
  19087. save({
  19088. attributes
  19089. }) {
  19090. const {
  19091. tagName: Tag
  19092. } = attributes;
  19093. return Object(external_wp_element_["createElement"])(Tag, external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("div", {
  19094. className: "wp-block-group__inner-container"
  19095. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  19096. }
  19097. }, // Version of the block without global styles support
  19098. {
  19099. attributes: {
  19100. backgroundColor: {
  19101. type: 'string'
  19102. },
  19103. customBackgroundColor: {
  19104. type: 'string'
  19105. },
  19106. textColor: {
  19107. type: 'string'
  19108. },
  19109. customTextColor: {
  19110. type: 'string'
  19111. }
  19112. },
  19113. supports: {
  19114. align: ['wide', 'full'],
  19115. anchor: true,
  19116. html: false
  19117. },
  19118. migrate: migrateAttributes,
  19119. save({
  19120. attributes
  19121. }) {
  19122. const {
  19123. backgroundColor,
  19124. customBackgroundColor,
  19125. textColor,
  19126. customTextColor
  19127. } = attributes;
  19128. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  19129. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  19130. const className = classnames_default()(backgroundClass, textClass, {
  19131. 'has-text-color': textColor || customTextColor,
  19132. 'has-background': backgroundColor || customBackgroundColor
  19133. });
  19134. const styles = {
  19135. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  19136. color: textClass ? undefined : customTextColor
  19137. };
  19138. return Object(external_wp_element_["createElement"])("div", {
  19139. className: className,
  19140. style: styles
  19141. }, Object(external_wp_element_["createElement"])("div", {
  19142. className: "wp-block-group__inner-container"
  19143. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  19144. }
  19145. }, // Version of the group block with a bug that made text color class not applied.
  19146. {
  19147. attributes: {
  19148. backgroundColor: {
  19149. type: 'string'
  19150. },
  19151. customBackgroundColor: {
  19152. type: 'string'
  19153. },
  19154. textColor: {
  19155. type: 'string'
  19156. },
  19157. customTextColor: {
  19158. type: 'string'
  19159. }
  19160. },
  19161. migrate: migrateAttributes,
  19162. supports: {
  19163. align: ['wide', 'full'],
  19164. anchor: true,
  19165. html: false
  19166. },
  19167. save({
  19168. attributes
  19169. }) {
  19170. const {
  19171. backgroundColor,
  19172. customBackgroundColor,
  19173. textColor,
  19174. customTextColor
  19175. } = attributes;
  19176. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  19177. const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
  19178. const className = classnames_default()(backgroundClass, {
  19179. 'has-text-color': textColor || customTextColor,
  19180. 'has-background': backgroundColor || customBackgroundColor
  19181. });
  19182. const styles = {
  19183. backgroundColor: backgroundClass ? undefined : customBackgroundColor,
  19184. color: textClass ? undefined : customTextColor
  19185. };
  19186. return Object(external_wp_element_["createElement"])("div", {
  19187. className: className,
  19188. style: styles
  19189. }, Object(external_wp_element_["createElement"])("div", {
  19190. className: "wp-block-group__inner-container"
  19191. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
  19192. }
  19193. }, // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
  19194. {
  19195. attributes: {
  19196. backgroundColor: {
  19197. type: 'string'
  19198. },
  19199. customBackgroundColor: {
  19200. type: 'string'
  19201. }
  19202. },
  19203. supports: {
  19204. align: ['wide', 'full'],
  19205. anchor: true,
  19206. html: false
  19207. },
  19208. migrate: migrateAttributes,
  19209. save({
  19210. attributes
  19211. }) {
  19212. const {
  19213. backgroundColor,
  19214. customBackgroundColor
  19215. } = attributes;
  19216. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  19217. const className = classnames_default()(backgroundClass, {
  19218. 'has-background': backgroundColor || customBackgroundColor
  19219. });
  19220. const styles = {
  19221. backgroundColor: backgroundClass ? undefined : customBackgroundColor
  19222. };
  19223. return Object(external_wp_element_["createElement"])("div", {
  19224. className: className,
  19225. style: styles
  19226. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  19227. }
  19228. }];
  19229. /* harmony default export */ var group_deprecated = (group_deprecated_deprecated);
  19230. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/edit.js
  19231. /**
  19232. * WordPress dependencies
  19233. */
  19234. function GroupEdit({
  19235. attributes,
  19236. setAttributes,
  19237. clientId
  19238. }) {
  19239. const {
  19240. hasInnerBlocks,
  19241. themeSupportsLayout
  19242. } = Object(external_wp_data_["useSelect"])(select => {
  19243. var _getSettings;
  19244. const {
  19245. getBlock,
  19246. getSettings
  19247. } = select(external_wp_blockEditor_["store"]);
  19248. const block = getBlock(clientId);
  19249. return {
  19250. hasInnerBlocks: !!(block && block.innerBlocks.length),
  19251. themeSupportsLayout: (_getSettings = getSettings()) === null || _getSettings === void 0 ? void 0 : _getSettings.supportsLayout
  19252. };
  19253. }, [clientId]);
  19254. const defaultLayout = Object(external_wp_blockEditor_["useSetting"])('layout') || {};
  19255. const {
  19256. tagName: TagName = 'div',
  19257. templateLock,
  19258. layout = {}
  19259. } = attributes;
  19260. const usedLayout = !!layout && layout.inherit ? defaultLayout : layout;
  19261. const {
  19262. contentSize,
  19263. wideSize
  19264. } = usedLayout;
  19265. const _layout = Object(external_wp_element_["useMemo"])(() => {
  19266. if (themeSupportsLayout) {
  19267. const alignments = contentSize || wideSize ? ['wide', 'full', 'left', 'center', 'right'] : ['left', 'center', 'right'];
  19268. return {
  19269. type: 'default',
  19270. // Find a way to inject this in the support flag code (hooks).
  19271. alignments
  19272. };
  19273. }
  19274. return undefined;
  19275. }, [themeSupportsLayout, contentSize, wideSize]);
  19276. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  19277. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(themeSupportsLayout ? blockProps : {
  19278. className: 'wp-block-group__inner-container'
  19279. }, {
  19280. templateLock,
  19281. renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender,
  19282. __experimentalLayout: _layout
  19283. });
  19284. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  19285. label: Object(external_wp_i18n_["__"])('HTML element'),
  19286. options: [{
  19287. label: Object(external_wp_i18n_["__"])('Default (<div>)'),
  19288. value: 'div'
  19289. }, {
  19290. label: '<header>',
  19291. value: 'header'
  19292. }, {
  19293. label: '<main>',
  19294. value: 'main'
  19295. }, {
  19296. label: '<section>',
  19297. value: 'section'
  19298. }, {
  19299. label: '<article>',
  19300. value: 'article'
  19301. }, {
  19302. label: '<aside>',
  19303. value: 'aside'
  19304. }, {
  19305. label: '<footer>',
  19306. value: 'footer'
  19307. }],
  19308. value: TagName,
  19309. onChange: value => setAttributes({
  19310. tagName: value
  19311. })
  19312. })), themeSupportsLayout && Object(external_wp_element_["createElement"])(TagName, innerBlocksProps), !themeSupportsLayout && Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_element_["createElement"])("div", innerBlocksProps)));
  19313. }
  19314. /* harmony default export */ var group_edit = (GroupEdit);
  19315. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/save.js
  19316. /**
  19317. * WordPress dependencies
  19318. */
  19319. function group_save_save({
  19320. attributes
  19321. }) {
  19322. const {
  19323. tagName: Tag
  19324. } = attributes;
  19325. return Object(external_wp_element_["createElement"])(Tag, external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  19326. }
  19327. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/index.js
  19328. /**
  19329. * WordPress dependencies
  19330. */
  19331. /**
  19332. * Internal dependencies
  19333. */
  19334. const group_metadata = {
  19335. apiVersion: 2,
  19336. name: "core/group",
  19337. title: "Group",
  19338. category: "design",
  19339. description: "Combine blocks into a group.",
  19340. keywords: ["container", "wrapper", "row", "section"],
  19341. textdomain: "default",
  19342. attributes: {
  19343. tagName: {
  19344. type: "string",
  19345. "default": "div"
  19346. },
  19347. templateLock: {
  19348. "enum": ["all", "insert", false]
  19349. }
  19350. },
  19351. supports: {
  19352. align: ["wide", "full"],
  19353. anchor: true,
  19354. html: false,
  19355. color: {
  19356. gradients: true,
  19357. link: true
  19358. },
  19359. spacing: {
  19360. padding: true
  19361. },
  19362. __experimentalBorder: {
  19363. color: true,
  19364. radius: true,
  19365. style: true,
  19366. width: true
  19367. },
  19368. __experimentalLayout: true
  19369. },
  19370. editorStyle: "wp-block-group-editor",
  19371. style: "wp-block-group"
  19372. };
  19373. const {
  19374. name: group_name
  19375. } = group_metadata;
  19376. const group_settings = {
  19377. icon: library_group,
  19378. example: {
  19379. attributes: {
  19380. style: {
  19381. color: {
  19382. text: '#000000',
  19383. background: '#ffffff'
  19384. }
  19385. }
  19386. },
  19387. innerBlocks: [{
  19388. name: 'core/paragraph',
  19389. attributes: {
  19390. customTextColor: '#cf2e2e',
  19391. fontSize: 'large',
  19392. content: Object(external_wp_i18n_["__"])('One.')
  19393. }
  19394. }, {
  19395. name: 'core/paragraph',
  19396. attributes: {
  19397. customTextColor: '#ff6900',
  19398. fontSize: 'large',
  19399. content: Object(external_wp_i18n_["__"])('Two.')
  19400. }
  19401. }, {
  19402. name: 'core/paragraph',
  19403. attributes: {
  19404. customTextColor: '#fcb900',
  19405. fontSize: 'large',
  19406. content: Object(external_wp_i18n_["__"])('Three.')
  19407. }
  19408. }, {
  19409. name: 'core/paragraph',
  19410. attributes: {
  19411. customTextColor: '#00d084',
  19412. fontSize: 'large',
  19413. content: Object(external_wp_i18n_["__"])('Four.')
  19414. }
  19415. }, {
  19416. name: 'core/paragraph',
  19417. attributes: {
  19418. customTextColor: '#0693e3',
  19419. fontSize: 'large',
  19420. content: Object(external_wp_i18n_["__"])('Five.')
  19421. }
  19422. }, {
  19423. name: 'core/paragraph',
  19424. attributes: {
  19425. customTextColor: '#9b51e0',
  19426. fontSize: 'large',
  19427. content: Object(external_wp_i18n_["__"])('Six.')
  19428. }
  19429. }]
  19430. },
  19431. transforms: {
  19432. from: [{
  19433. type: 'block',
  19434. isMultiBlock: true,
  19435. blocks: ['*'],
  19436. __experimentalConvert(blocks) {
  19437. // Avoid transforming a single `core/group` Block
  19438. if (blocks.length === 1 && blocks[0].name === 'core/group') {
  19439. return;
  19440. }
  19441. const alignments = ['wide', 'full']; // Determine the widest setting of all the blocks to be grouped
  19442. const widestAlignment = blocks.reduce((accumulator, block) => {
  19443. const {
  19444. align
  19445. } = block.attributes;
  19446. return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator;
  19447. }, undefined); // Clone the Blocks to be Grouped
  19448. // Failing to create new block references causes the original blocks
  19449. // to be replaced in the switchToBlockType call thereby meaning they
  19450. // are removed both from their original location and within the
  19451. // new group block.
  19452. const groupInnerBlocks = blocks.map(block => {
  19453. return Object(external_wp_blocks_["createBlock"])(block.name, block.attributes, block.innerBlocks);
  19454. });
  19455. return Object(external_wp_blocks_["createBlock"])('core/group', {
  19456. align: widestAlignment
  19457. }, groupInnerBlocks);
  19458. }
  19459. }]
  19460. },
  19461. edit: group_edit,
  19462. save: group_save_save,
  19463. deprecated: group_deprecated
  19464. };
  19465. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/separator.js
  19466. /**
  19467. * WordPress dependencies
  19468. */
  19469. const separator = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  19470. viewBox: "0 0 24 24",
  19471. xmlns: "http://www.w3.org/2000/svg"
  19472. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  19473. d: "M20.2 7v4H3.8V7H2.2v9h1.6v-3.5h16.4V16h1.6V7z"
  19474. }));
  19475. /* harmony default export */ var library_separator = (separator);
  19476. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/separator-settings.js
  19477. /**
  19478. * WordPress dependencies
  19479. */
  19480. const SeparatorSettings = ({
  19481. color,
  19482. setColor
  19483. }) => Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PanelColorSettings"], {
  19484. title: Object(external_wp_i18n_["__"])('Color'),
  19485. colorSettings: [{
  19486. value: color.color,
  19487. onChange: setColor,
  19488. label: Object(external_wp_i18n_["__"])('Color')
  19489. }]
  19490. }));
  19491. /* harmony default export */ var separator_settings = (SeparatorSettings);
  19492. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/edit.js
  19493. /**
  19494. * External dependencies
  19495. */
  19496. /**
  19497. * WordPress dependencies
  19498. */
  19499. /**
  19500. * Internal dependencies
  19501. */
  19502. function SeparatorEdit({
  19503. color,
  19504. setColor,
  19505. className
  19506. }) {
  19507. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["HorizontalRule"], Object(external_wp_blockEditor_["useBlockProps"])({
  19508. className: classnames_default()(className, {
  19509. 'has-background': color.color,
  19510. [color.class]: color.class
  19511. }),
  19512. style: {
  19513. backgroundColor: color.color,
  19514. color: color.color
  19515. }
  19516. })), Object(external_wp_element_["createElement"])(separator_settings, {
  19517. color: color,
  19518. setColor: setColor
  19519. }));
  19520. }
  19521. /* harmony default export */ var separator_edit = (Object(external_wp_blockEditor_["withColors"])('color', {
  19522. textColor: 'color'
  19523. })(SeparatorEdit));
  19524. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/save.js
  19525. /**
  19526. * External dependencies
  19527. */
  19528. /**
  19529. * WordPress dependencies
  19530. */
  19531. function separatorSave({
  19532. attributes
  19533. }) {
  19534. const {
  19535. color,
  19536. customColor
  19537. } = attributes; // the hr support changing color using border-color, since border-color
  19538. // is not yet supported in the color palette, we use background-color
  19539. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', color); // the dots styles uses text for the dots, to change those dots color is
  19540. // using color, not backgroundColor
  19541. const colorClass = Object(external_wp_blockEditor_["getColorClassName"])('color', color);
  19542. const className = classnames_default()({
  19543. 'has-text-color has-background': color || customColor,
  19544. [backgroundClass]: backgroundClass,
  19545. [colorClass]: colorClass
  19546. });
  19547. const style = {
  19548. backgroundColor: backgroundClass ? undefined : customColor,
  19549. color: colorClass ? undefined : customColor
  19550. };
  19551. return Object(external_wp_element_["createElement"])("hr", external_wp_blockEditor_["useBlockProps"].save({
  19552. className,
  19553. style
  19554. }));
  19555. }
  19556. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/transforms.js
  19557. /**
  19558. * WordPress dependencies
  19559. */
  19560. const separator_transforms_transforms = {
  19561. from: [{
  19562. type: 'enter',
  19563. regExp: /^-{3,}$/,
  19564. transform: () => Object(external_wp_blocks_["createBlock"])('core/separator')
  19565. }, {
  19566. type: 'raw',
  19567. selector: 'hr',
  19568. schema: {
  19569. hr: {}
  19570. }
  19571. }]
  19572. };
  19573. /* harmony default export */ var separator_transforms = (separator_transforms_transforms);
  19574. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/index.js
  19575. /**
  19576. * WordPress dependencies
  19577. */
  19578. /**
  19579. * Internal dependencies
  19580. */
  19581. const separator_metadata = {
  19582. apiVersion: 2,
  19583. name: "core/separator",
  19584. title: "Separator",
  19585. category: "design",
  19586. description: "Create a break between ideas or sections with a horizontal separator.",
  19587. keywords: ["horizontal-line", "hr", "divider"],
  19588. textdomain: "default",
  19589. attributes: {
  19590. color: {
  19591. type: "string"
  19592. },
  19593. customColor: {
  19594. type: "string"
  19595. }
  19596. },
  19597. supports: {
  19598. anchor: true,
  19599. align: ["center", "wide", "full"]
  19600. },
  19601. styles: [{
  19602. name: "default",
  19603. label: "Default",
  19604. isDefault: true
  19605. }, {
  19606. name: "wide",
  19607. label: "Wide Line"
  19608. }, {
  19609. name: "dots",
  19610. label: "Dots"
  19611. }],
  19612. editorStyle: "wp-block-separator-editor",
  19613. style: "wp-block-separator"
  19614. };
  19615. const {
  19616. name: separator_name
  19617. } = separator_metadata;
  19618. const build_module_separator_settings = {
  19619. icon: library_separator,
  19620. example: {
  19621. attributes: {
  19622. customColor: '#065174',
  19623. className: 'is-style-wide'
  19624. }
  19625. },
  19626. transforms: separator_transforms,
  19627. edit: separator_edit,
  19628. save: separatorSave
  19629. };
  19630. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/shortcode.js
  19631. /**
  19632. * WordPress dependencies
  19633. */
  19634. const shortcode = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  19635. viewBox: "0 0 24 24",
  19636. xmlns: "http://www.w3.org/2000/svg"
  19637. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  19638. d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"
  19639. }));
  19640. /* harmony default export */ var library_shortcode = (shortcode);
  19641. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
  19642. var build_module_icon = __webpack_require__("iClF");
  19643. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/edit.js
  19644. /**
  19645. * WordPress dependencies
  19646. */
  19647. function ShortcodeEdit({
  19648. attributes,
  19649. setAttributes
  19650. }) {
  19651. const instanceId = Object(external_wp_compose_["useInstanceId"])(ShortcodeEdit);
  19652. const inputId = `blocks-shortcode-input-${instanceId}`;
  19653. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({
  19654. className: 'components-placeholder'
  19655. }), Object(external_wp_element_["createElement"])("label", {
  19656. htmlFor: inputId,
  19657. className: "components-placeholder__label"
  19658. }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
  19659. icon: library_shortcode
  19660. }), Object(external_wp_i18n_["__"])('Shortcode')), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], {
  19661. className: "blocks-shortcode__textarea",
  19662. id: inputId,
  19663. value: attributes.text,
  19664. "aria-label": Object(external_wp_i18n_["__"])('Shortcode text'),
  19665. placeholder: Object(external_wp_i18n_["__"])('Write shortcode here…'),
  19666. onChange: text => setAttributes({
  19667. text
  19668. })
  19669. }));
  19670. }
  19671. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/save.js
  19672. /**
  19673. * WordPress dependencies
  19674. */
  19675. function shortcode_save_save({
  19676. attributes
  19677. }) {
  19678. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.text);
  19679. }
  19680. // EXTERNAL MODULE: external ["wp","autop"]
  19681. var external_wp_autop_ = __webpack_require__("UuzZ");
  19682. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/transforms.js
  19683. /**
  19684. * WordPress dependencies
  19685. */
  19686. const shortcode_transforms_transforms = {
  19687. from: [{
  19688. type: 'shortcode',
  19689. // Per "Shortcode names should be all lowercase and use all
  19690. // letters, but numbers and underscores should work fine too.
  19691. // Be wary of using hyphens (dashes), you'll be better off not
  19692. // using them." in https://codex.wordpress.org/Shortcode_API
  19693. // Require that the first character be a letter. This notably
  19694. // prevents footnote markings ([1]) from being caught as
  19695. // shortcodes.
  19696. tag: '[a-z][a-z0-9_-]*',
  19697. attributes: {
  19698. text: {
  19699. type: 'string',
  19700. shortcode: (attrs, {
  19701. content
  19702. }) => {
  19703. return Object(external_wp_autop_["removep"])(Object(external_wp_autop_["autop"])(content));
  19704. }
  19705. }
  19706. },
  19707. priority: 20
  19708. }]
  19709. };
  19710. /* harmony default export */ var shortcode_transforms = (shortcode_transforms_transforms);
  19711. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
  19712. /**
  19713. * WordPress dependencies
  19714. */
  19715. /**
  19716. * Internal dependencies
  19717. */
  19718. const shortcode_metadata = {
  19719. apiVersion: 2,
  19720. name: "core/shortcode",
  19721. title: "Shortcode",
  19722. category: "widgets",
  19723. description: "Insert additional custom elements with a WordPress shortcode.",
  19724. textdomain: "default",
  19725. attributes: {
  19726. text: {
  19727. type: "string",
  19728. source: "html"
  19729. }
  19730. },
  19731. supports: {
  19732. className: false,
  19733. customClassName: false,
  19734. html: false
  19735. },
  19736. editorStyle: "wp-block-shortcode-editor"
  19737. };
  19738. const {
  19739. name: shortcode_name
  19740. } = shortcode_metadata;
  19741. const shortcode_settings = {
  19742. icon: library_shortcode,
  19743. transforms: shortcode_transforms,
  19744. edit: ShortcodeEdit,
  19745. save: shortcode_save_save
  19746. };
  19747. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/resize-corner-n-e.js
  19748. /**
  19749. * WordPress dependencies
  19750. */
  19751. const resizeCornerNE = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  19752. viewBox: "0 0 24 24",
  19753. xmlns: "http://www.w3.org/2000/svg"
  19754. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  19755. d: "M12.5 4.2v1.6h4.7L5.8 17.2V12H4.2v7.8H12v-1.6H6.8L18.2 6.8v4.7h1.6V4.2z"
  19756. }));
  19757. /* harmony default export */ var resize_corner_n_e = (resizeCornerNE);
  19758. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/edit.js
  19759. /**
  19760. * External dependencies
  19761. */
  19762. /**
  19763. * WordPress dependencies
  19764. */
  19765. const MIN_SPACER_HEIGHT = 1;
  19766. const MAX_SPACER_HEIGHT = 500;
  19767. const MIN_SPACER_WIDTH = 1;
  19768. const MAX_SPACER_WIDTH = 500;
  19769. const SpacerEdit = ({
  19770. attributes,
  19771. isSelected,
  19772. setAttributes,
  19773. onResizeStart,
  19774. onResizeStop,
  19775. context
  19776. }) => {
  19777. const {
  19778. orientation
  19779. } = context;
  19780. const [isResizing, setIsResizing] = Object(external_wp_element_["useState"])(false);
  19781. const {
  19782. height,
  19783. width
  19784. } = attributes;
  19785. const updateHeight = value => {
  19786. setAttributes({
  19787. height: value
  19788. });
  19789. };
  19790. const updateWidth = value => {
  19791. setAttributes({
  19792. width: value
  19793. });
  19794. };
  19795. const handleOnResizeStart = (...args) => {
  19796. onResizeStart(...args);
  19797. setIsResizing(true);
  19798. };
  19799. const handleOnVerticalResizeStop = (event, direction, elt, delta) => {
  19800. onResizeStop();
  19801. const spacerHeight = Math.min(parseInt(height + delta.height, 10), MAX_SPACER_HEIGHT);
  19802. updateHeight(spacerHeight);
  19803. setIsResizing(false);
  19804. };
  19805. const handleOnHorizontalResizeStop = (event, direction, elt, delta) => {
  19806. onResizeStop();
  19807. const spacerWidth = Math.min(parseInt(width + delta.width, 10), MAX_SPACER_WIDTH);
  19808. updateWidth(spacerWidth);
  19809. setIsResizing(false);
  19810. };
  19811. const resizableBoxWithOrientation = blockOrientation => {
  19812. if (blockOrientation === 'horizontal') {
  19813. return Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
  19814. className: classnames_default()('block-library-spacer__resize-container', 'resize-horizontal', {
  19815. 'is-selected': isSelected
  19816. }),
  19817. size: {
  19818. width,
  19819. height: 24
  19820. },
  19821. minWidth: MIN_SPACER_WIDTH,
  19822. enable: {
  19823. top: false,
  19824. right: true,
  19825. bottom: false,
  19826. left: false,
  19827. topRight: false,
  19828. bottomRight: false,
  19829. bottomLeft: false,
  19830. topLeft: false
  19831. },
  19832. onResizeStart: handleOnResizeStart,
  19833. onResizeStop: handleOnHorizontalResizeStop,
  19834. showHandle: isSelected,
  19835. __experimentalShowTooltip: true,
  19836. __experimentalTooltipProps: {
  19837. axis: 'x',
  19838. position: 'corner',
  19839. isVisible: isResizing
  19840. }
  19841. });
  19842. }
  19843. return Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
  19844. className: classnames_default()('block-library-spacer__resize-container', {
  19845. 'is-selected': isSelected
  19846. }),
  19847. size: {
  19848. height
  19849. },
  19850. minHeight: MIN_SPACER_HEIGHT,
  19851. enable: {
  19852. top: false,
  19853. right: false,
  19854. bottom: true,
  19855. left: false,
  19856. topRight: false,
  19857. bottomRight: false,
  19858. bottomLeft: false,
  19859. topLeft: false
  19860. },
  19861. onResizeStart: handleOnResizeStart,
  19862. onResizeStop: handleOnVerticalResizeStop,
  19863. showHandle: isSelected,
  19864. __experimentalShowTooltip: true,
  19865. __experimentalTooltipProps: {
  19866. axis: 'y',
  19867. position: 'bottom',
  19868. isVisible: isResizing
  19869. }
  19870. });
  19871. };
  19872. Object(external_wp_element_["useEffect"])(() => {
  19873. if (orientation === 'horizontal' && !width) {
  19874. updateWidth(72);
  19875. updateHeight(0);
  19876. }
  19877. }, []);
  19878. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], Object(external_wp_blockEditor_["useBlockProps"])(), resizableBoxWithOrientation(orientation)), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  19879. title: Object(external_wp_i18n_["__"])('Spacer settings')
  19880. }, orientation === 'horizontal' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  19881. label: Object(external_wp_i18n_["__"])('Width in pixels'),
  19882. min: MIN_SPACER_WIDTH,
  19883. max: Math.max(MAX_SPACER_WIDTH, width),
  19884. value: width,
  19885. onChange: updateWidth
  19886. }), orientation !== 'horizontal' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  19887. label: Object(external_wp_i18n_["__"])('Height in pixels'),
  19888. min: MIN_SPACER_HEIGHT,
  19889. max: Math.max(MAX_SPACER_HEIGHT, height),
  19890. value: height,
  19891. onChange: updateHeight
  19892. }))));
  19893. };
  19894. /* harmony default export */ var spacer_edit = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withDispatch"])(dispatch => {
  19895. const {
  19896. toggleSelection
  19897. } = dispatch(external_wp_blockEditor_["store"]);
  19898. return {
  19899. onResizeStart: () => toggleSelection(false),
  19900. onResizeStop: () => toggleSelection(true)
  19901. };
  19902. }), external_wp_compose_["withInstanceId"]])(SpacerEdit));
  19903. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/save.js
  19904. /**
  19905. * WordPress dependencies
  19906. */
  19907. function spacer_save_save({
  19908. attributes
  19909. }) {
  19910. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  19911. style: {
  19912. height: attributes.height,
  19913. width: attributes.width
  19914. },
  19915. 'aria-hidden': true
  19916. }));
  19917. }
  19918. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
  19919. /**
  19920. * WordPress dependencies
  19921. */
  19922. /**
  19923. * Internal dependencies
  19924. */
  19925. const spacer_metadata = {
  19926. apiVersion: 2,
  19927. name: "core/spacer",
  19928. title: "Spacer",
  19929. category: "design",
  19930. description: "Add white space between blocks and customize its height.",
  19931. textdomain: "default",
  19932. attributes: {
  19933. height: {
  19934. type: "number",
  19935. "default": 100
  19936. },
  19937. width: {
  19938. type: "number"
  19939. }
  19940. },
  19941. usesContext: ["orientation"],
  19942. supports: {
  19943. anchor: true
  19944. },
  19945. editorStyle: "wp-block-spacer-editor",
  19946. style: "wp-block-spacer"
  19947. };
  19948. const {
  19949. name: spacer_name
  19950. } = spacer_metadata;
  19951. const spacer_settings = {
  19952. icon: resize_corner_n_e,
  19953. edit: spacer_edit,
  19954. save: spacer_save_save
  19955. };
  19956. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-table.js
  19957. /**
  19958. * WordPress dependencies
  19959. */
  19960. const blockTable = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  19961. viewBox: "0 0 24 24",
  19962. xmlns: "http://www.w3.org/2000/svg"
  19963. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  19964. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"
  19965. }));
  19966. /* harmony default export */ var block_table = (blockTable);
  19967. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/deprecated.js
  19968. /**
  19969. * External dependencies
  19970. */
  19971. /**
  19972. * WordPress dependencies
  19973. */
  19974. const deprecated_supports = {
  19975. align: true
  19976. }; // As the previous arbitrary colors won't match theme color palettes, the hex
  19977. // value will be mapped to the style.color.background attribute as if it was
  19978. // a custom color selection.
  19979. const oldColors = {
  19980. 'subtle-light-gray': '#f3f4f5',
  19981. 'subtle-pale-green': '#e9fbe5',
  19982. 'subtle-pale-blue': '#e7f5fe',
  19983. 'subtle-pale-pink': '#fcf0ef'
  19984. };
  19985. const table_deprecated_deprecated = [// Deprecation migrating table block to use colors block support feature.
  19986. {
  19987. attributes: {
  19988. hasFixedLayout: {
  19989. type: 'boolean',
  19990. default: false
  19991. },
  19992. backgroundColor: {
  19993. type: 'string'
  19994. },
  19995. caption: {
  19996. type: 'string',
  19997. source: 'html',
  19998. selector: 'figcaption',
  19999. default: ''
  20000. },
  20001. head: {
  20002. type: 'array',
  20003. default: [],
  20004. source: 'query',
  20005. selector: 'thead tr',
  20006. query: {
  20007. cells: {
  20008. type: 'array',
  20009. default: [],
  20010. source: 'query',
  20011. selector: 'td,th',
  20012. query: {
  20013. content: {
  20014. type: 'string',
  20015. source: 'html'
  20016. },
  20017. tag: {
  20018. type: 'string',
  20019. default: 'td',
  20020. source: 'tag'
  20021. },
  20022. scope: {
  20023. type: 'string',
  20024. source: 'attribute',
  20025. attribute: 'scope'
  20026. },
  20027. align: {
  20028. type: 'string',
  20029. source: 'attribute',
  20030. attribute: 'data-align'
  20031. }
  20032. }
  20033. }
  20034. }
  20035. },
  20036. body: {
  20037. type: 'array',
  20038. default: [],
  20039. source: 'query',
  20040. selector: 'tbody tr',
  20041. query: {
  20042. cells: {
  20043. type: 'array',
  20044. default: [],
  20045. source: 'query',
  20046. selector: 'td,th',
  20047. query: {
  20048. content: {
  20049. type: 'string',
  20050. source: 'html'
  20051. },
  20052. tag: {
  20053. type: 'string',
  20054. default: 'td',
  20055. source: 'tag'
  20056. },
  20057. scope: {
  20058. type: 'string',
  20059. source: 'attribute',
  20060. attribute: 'scope'
  20061. },
  20062. align: {
  20063. type: 'string',
  20064. source: 'attribute',
  20065. attribute: 'data-align'
  20066. }
  20067. }
  20068. }
  20069. }
  20070. },
  20071. foot: {
  20072. type: 'array',
  20073. default: [],
  20074. source: 'query',
  20075. selector: 'tfoot tr',
  20076. query: {
  20077. cells: {
  20078. type: 'array',
  20079. default: [],
  20080. source: 'query',
  20081. selector: 'td,th',
  20082. query: {
  20083. content: {
  20084. type: 'string',
  20085. source: 'html'
  20086. },
  20087. tag: {
  20088. type: 'string',
  20089. default: 'td',
  20090. source: 'tag'
  20091. },
  20092. scope: {
  20093. type: 'string',
  20094. source: 'attribute',
  20095. attribute: 'scope'
  20096. },
  20097. align: {
  20098. type: 'string',
  20099. source: 'attribute',
  20100. attribute: 'data-align'
  20101. }
  20102. }
  20103. }
  20104. }
  20105. }
  20106. },
  20107. supports: {
  20108. anchor: true,
  20109. align: true,
  20110. __experimentalSelector: '.wp-block-table > table'
  20111. },
  20112. save: ({
  20113. attributes
  20114. }) => {
  20115. const {
  20116. hasFixedLayout,
  20117. head,
  20118. body,
  20119. foot,
  20120. backgroundColor,
  20121. caption
  20122. } = attributes;
  20123. const isEmpty = !head.length && !body.length && !foot.length;
  20124. if (isEmpty) {
  20125. return null;
  20126. }
  20127. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  20128. const classes = classnames_default()(backgroundClass, {
  20129. 'has-fixed-layout': hasFixedLayout,
  20130. 'has-background': !!backgroundClass
  20131. });
  20132. const hasCaption = !external_wp_blockEditor_["RichText"].isEmpty(caption);
  20133. const Section = ({
  20134. type,
  20135. rows
  20136. }) => {
  20137. if (!rows.length) {
  20138. return null;
  20139. }
  20140. const Tag = `t${type}`;
  20141. return Object(external_wp_element_["createElement"])(Tag, null, rows.map(({
  20142. cells
  20143. }, rowIndex) => Object(external_wp_element_["createElement"])("tr", {
  20144. key: rowIndex
  20145. }, cells.map(({
  20146. content,
  20147. tag,
  20148. scope,
  20149. align
  20150. }, cellIndex) => {
  20151. const cellClasses = classnames_default()({
  20152. [`has-text-align-${align}`]: align
  20153. });
  20154. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  20155. className: cellClasses ? cellClasses : undefined,
  20156. "data-align": align,
  20157. tagName: tag,
  20158. value: content,
  20159. key: cellIndex,
  20160. scope: tag === 'th' ? scope : undefined
  20161. });
  20162. }))));
  20163. };
  20164. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("table", {
  20165. className: classes === '' ? undefined : classes
  20166. }, Object(external_wp_element_["createElement"])(Section, {
  20167. type: "head",
  20168. rows: head
  20169. }), Object(external_wp_element_["createElement"])(Section, {
  20170. type: "body",
  20171. rows: body
  20172. }), Object(external_wp_element_["createElement"])(Section, {
  20173. type: "foot",
  20174. rows: foot
  20175. })), hasCaption && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  20176. tagName: "figcaption",
  20177. value: caption
  20178. }));
  20179. },
  20180. isEligible: attributes => {
  20181. return attributes.backgroundColor && !attributes.style;
  20182. },
  20183. // This version is the first to introduce the style attribute to the
  20184. // table block. As a result, we'll explicitly override that.
  20185. migrate: attributes => {
  20186. return { ...attributes,
  20187. backgroundColor: undefined,
  20188. style: {
  20189. color: {
  20190. background: oldColors[attributes.backgroundColor]
  20191. }
  20192. }
  20193. };
  20194. }
  20195. }, {
  20196. attributes: {
  20197. hasFixedLayout: {
  20198. type: 'boolean',
  20199. default: false
  20200. },
  20201. backgroundColor: {
  20202. type: 'string'
  20203. },
  20204. head: {
  20205. type: 'array',
  20206. default: [],
  20207. source: 'query',
  20208. selector: 'thead tr',
  20209. query: {
  20210. cells: {
  20211. type: 'array',
  20212. default: [],
  20213. source: 'query',
  20214. selector: 'td,th',
  20215. query: {
  20216. content: {
  20217. type: 'string',
  20218. source: 'html'
  20219. },
  20220. tag: {
  20221. type: 'string',
  20222. default: 'td',
  20223. source: 'tag'
  20224. },
  20225. scope: {
  20226. type: 'string',
  20227. source: 'attribute',
  20228. attribute: 'scope'
  20229. }
  20230. }
  20231. }
  20232. }
  20233. },
  20234. body: {
  20235. type: 'array',
  20236. default: [],
  20237. source: 'query',
  20238. selector: 'tbody tr',
  20239. query: {
  20240. cells: {
  20241. type: 'array',
  20242. default: [],
  20243. source: 'query',
  20244. selector: 'td,th',
  20245. query: {
  20246. content: {
  20247. type: 'string',
  20248. source: 'html'
  20249. },
  20250. tag: {
  20251. type: 'string',
  20252. default: 'td',
  20253. source: 'tag'
  20254. },
  20255. scope: {
  20256. type: 'string',
  20257. source: 'attribute',
  20258. attribute: 'scope'
  20259. }
  20260. }
  20261. }
  20262. }
  20263. },
  20264. foot: {
  20265. type: 'array',
  20266. default: [],
  20267. source: 'query',
  20268. selector: 'tfoot tr',
  20269. query: {
  20270. cells: {
  20271. type: 'array',
  20272. default: [],
  20273. source: 'query',
  20274. selector: 'td,th',
  20275. query: {
  20276. content: {
  20277. type: 'string',
  20278. source: 'html'
  20279. },
  20280. tag: {
  20281. type: 'string',
  20282. default: 'td',
  20283. source: 'tag'
  20284. },
  20285. scope: {
  20286. type: 'string',
  20287. source: 'attribute',
  20288. attribute: 'scope'
  20289. }
  20290. }
  20291. }
  20292. }
  20293. }
  20294. },
  20295. supports: deprecated_supports,
  20296. save({
  20297. attributes
  20298. }) {
  20299. const {
  20300. hasFixedLayout,
  20301. head,
  20302. body,
  20303. foot,
  20304. backgroundColor
  20305. } = attributes;
  20306. const isEmpty = !head.length && !body.length && !foot.length;
  20307. if (isEmpty) {
  20308. return null;
  20309. }
  20310. const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
  20311. const classes = classnames_default()(backgroundClass, {
  20312. 'has-fixed-layout': hasFixedLayout,
  20313. 'has-background': !!backgroundClass
  20314. });
  20315. const Section = ({
  20316. type,
  20317. rows
  20318. }) => {
  20319. if (!rows.length) {
  20320. return null;
  20321. }
  20322. const Tag = `t${type}`;
  20323. return Object(external_wp_element_["createElement"])(Tag, null, rows.map(({
  20324. cells
  20325. }, rowIndex) => Object(external_wp_element_["createElement"])("tr", {
  20326. key: rowIndex
  20327. }, cells.map(({
  20328. content,
  20329. tag,
  20330. scope
  20331. }, cellIndex) => Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  20332. tagName: tag,
  20333. value: content,
  20334. key: cellIndex,
  20335. scope: tag === 'th' ? scope : undefined
  20336. })))));
  20337. };
  20338. return Object(external_wp_element_["createElement"])("table", {
  20339. className: classes
  20340. }, Object(external_wp_element_["createElement"])(Section, {
  20341. type: "head",
  20342. rows: head
  20343. }), Object(external_wp_element_["createElement"])(Section, {
  20344. type: "body",
  20345. rows: body
  20346. }), Object(external_wp_element_["createElement"])(Section, {
  20347. type: "foot",
  20348. rows: foot
  20349. }));
  20350. }
  20351. }];
  20352. /* harmony default export */ var table_deprecated = (table_deprecated_deprecated);
  20353. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-left.js
  20354. var align_left = __webpack_require__("fPbg");
  20355. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-center.js
  20356. var align_center = __webpack_require__("plpT");
  20357. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-right.js
  20358. var align_right = __webpack_require__("ziDm");
  20359. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-before.js
  20360. /**
  20361. * WordPress dependencies
  20362. */
  20363. const tableRowBefore = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20364. xmlns: "http://www.w3.org/2000/svg",
  20365. viewBox: "-2 -2 24 24"
  20366. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20367. d: "M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84zM6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z"
  20368. }));
  20369. /* harmony default export */ var table_row_before = (tableRowBefore);
  20370. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-after.js
  20371. /**
  20372. * WordPress dependencies
  20373. */
  20374. const tableRowAfter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20375. xmlns: "http://www.w3.org/2000/svg",
  20376. viewBox: "-2 -2 24 24"
  20377. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20378. d: "M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z"
  20379. }));
  20380. /* harmony default export */ var table_row_after = (tableRowAfter);
  20381. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-delete.js
  20382. /**
  20383. * WordPress dependencies
  20384. */
  20385. const tableRowDelete = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20386. xmlns: "http://www.w3.org/2000/svg",
  20387. viewBox: "-2 -2 24 24"
  20388. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20389. d: "M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z"
  20390. }));
  20391. /* harmony default export */ var table_row_delete = (tableRowDelete);
  20392. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-before.js
  20393. /**
  20394. * WordPress dependencies
  20395. */
  20396. const tableColumnBefore = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20397. xmlns: "http://www.w3.org/2000/svg",
  20398. viewBox: "-2 -2 24 24"
  20399. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20400. d: "M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z"
  20401. }));
  20402. /* harmony default export */ var table_column_before = (tableColumnBefore);
  20403. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-after.js
  20404. /**
  20405. * WordPress dependencies
  20406. */
  20407. const tableColumnAfter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20408. xmlns: "http://www.w3.org/2000/svg",
  20409. viewBox: "-2 -2 24 24"
  20410. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20411. d: "M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z"
  20412. }));
  20413. /* harmony default export */ var table_column_after = (tableColumnAfter);
  20414. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-delete.js
  20415. /**
  20416. * WordPress dependencies
  20417. */
  20418. const tableColumnDelete = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20419. xmlns: "http://www.w3.org/2000/svg",
  20420. viewBox: "-2 -2 24 24"
  20421. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20422. d: "M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z"
  20423. }));
  20424. /* harmony default export */ var table_column_delete = (tableColumnDelete);
  20425. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table.js
  20426. /**
  20427. * WordPress dependencies
  20428. */
  20429. const table = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  20430. xmlns: "http://www.w3.org/2000/svg",
  20431. viewBox: "0 0 24 24"
  20432. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  20433. d: "M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z"
  20434. }));
  20435. /* harmony default export */ var library_table = (table);
  20436. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/state.js
  20437. /**
  20438. * External dependencies
  20439. */
  20440. const INHERITED_COLUMN_ATTRIBUTES = ['align'];
  20441. /**
  20442. * Creates a table state.
  20443. *
  20444. * @param {Object} options
  20445. * @param {number} options.rowCount Row count for the table to create.
  20446. * @param {number} options.columnCount Column count for the table to create.
  20447. *
  20448. * @return {Object} New table state.
  20449. */
  20450. function createTable({
  20451. rowCount,
  20452. columnCount
  20453. }) {
  20454. return {
  20455. body: Object(external_lodash_["times"])(rowCount, () => ({
  20456. cells: Object(external_lodash_["times"])(columnCount, () => ({
  20457. content: '',
  20458. tag: 'td'
  20459. }))
  20460. }))
  20461. };
  20462. }
  20463. /**
  20464. * Returns the first row in the table.
  20465. *
  20466. * @param {Object} state Current table state.
  20467. *
  20468. * @return {Object} The first table row.
  20469. */
  20470. function getFirstRow(state) {
  20471. if (!isEmptyTableSection(state.head)) {
  20472. return state.head[0];
  20473. }
  20474. if (!isEmptyTableSection(state.body)) {
  20475. return state.body[0];
  20476. }
  20477. if (!isEmptyTableSection(state.foot)) {
  20478. return state.foot[0];
  20479. }
  20480. }
  20481. /**
  20482. * Gets an attribute for a cell.
  20483. *
  20484. * @param {Object} state Current table state.
  20485. * @param {Object} cellLocation The location of the cell
  20486. * @param {string} attributeName The name of the attribute to get the value of.
  20487. *
  20488. * @return {*} The attribute value.
  20489. */
  20490. function getCellAttribute(state, cellLocation, attributeName) {
  20491. const {
  20492. sectionName,
  20493. rowIndex,
  20494. columnIndex
  20495. } = cellLocation;
  20496. return Object(external_lodash_["get"])(state, [sectionName, rowIndex, 'cells', columnIndex, attributeName]);
  20497. }
  20498. /**
  20499. * Returns updated cell attributes after applying the `updateCell` function to the selection.
  20500. *
  20501. * @param {Object} state The block attributes.
  20502. * @param {Object} selection The selection of cells to update.
  20503. * @param {Function} updateCell A function to update the selected cell attributes.
  20504. *
  20505. * @return {Object} New table state including the updated cells.
  20506. */
  20507. function updateSelectedCell(state, selection, updateCell) {
  20508. if (!selection) {
  20509. return state;
  20510. }
  20511. const tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']);
  20512. const {
  20513. sectionName: selectionSectionName,
  20514. rowIndex: selectionRowIndex
  20515. } = selection;
  20516. return Object(external_lodash_["mapValues"])(tableSections, (section, sectionName) => {
  20517. if (selectionSectionName && selectionSectionName !== sectionName) {
  20518. return section;
  20519. }
  20520. return section.map((row, rowIndex) => {
  20521. if (selectionRowIndex && selectionRowIndex !== rowIndex) {
  20522. return row;
  20523. }
  20524. return {
  20525. cells: row.cells.map((cellAttributes, columnIndex) => {
  20526. const cellLocation = {
  20527. sectionName,
  20528. columnIndex,
  20529. rowIndex
  20530. };
  20531. if (!isCellSelected(cellLocation, selection)) {
  20532. return cellAttributes;
  20533. }
  20534. return updateCell(cellAttributes);
  20535. })
  20536. };
  20537. });
  20538. });
  20539. }
  20540. /**
  20541. * Returns whether the cell at `cellLocation` is included in the selection `selection`.
  20542. *
  20543. * @param {Object} cellLocation An object containing cell location properties.
  20544. * @param {Object} selection An object containing selection properties.
  20545. *
  20546. * @return {boolean} True if the cell is selected, false otherwise.
  20547. */
  20548. function isCellSelected(cellLocation, selection) {
  20549. if (!cellLocation || !selection) {
  20550. return false;
  20551. }
  20552. switch (selection.type) {
  20553. case 'column':
  20554. return selection.type === 'column' && cellLocation.columnIndex === selection.columnIndex;
  20555. case 'cell':
  20556. return selection.type === 'cell' && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
  20557. }
  20558. }
  20559. /**
  20560. * Inserts a row in the table state.
  20561. *
  20562. * @param {Object} state Current table state.
  20563. * @param {Object} options
  20564. * @param {string} options.sectionName Section in which to insert the row.
  20565. * @param {number} options.rowIndex Row index at which to insert the row.
  20566. * @param {number} options.columnCount Column count for the table to create.
  20567. *
  20568. * @return {Object} New table state.
  20569. */
  20570. function insertRow(state, {
  20571. sectionName,
  20572. rowIndex,
  20573. columnCount
  20574. }) {
  20575. const firstRow = getFirstRow(state);
  20576. const cellCount = columnCount === undefined ? Object(external_lodash_["get"])(firstRow, ['cells', 'length']) : columnCount; // Bail early if the function cannot determine how many cells to add.
  20577. if (!cellCount) {
  20578. return state;
  20579. }
  20580. return {
  20581. [sectionName]: [...state[sectionName].slice(0, rowIndex), {
  20582. cells: Object(external_lodash_["times"])(cellCount, index => {
  20583. const firstCellInColumn = Object(external_lodash_["get"])(firstRow, ['cells', index], {});
  20584. const inheritedAttributes = Object(external_lodash_["pick"])(firstCellInColumn, INHERITED_COLUMN_ATTRIBUTES);
  20585. return { ...inheritedAttributes,
  20586. content: '',
  20587. tag: sectionName === 'head' ? 'th' : 'td'
  20588. };
  20589. })
  20590. }, ...state[sectionName].slice(rowIndex)]
  20591. };
  20592. }
  20593. /**
  20594. * Deletes a row from the table state.
  20595. *
  20596. * @param {Object} state Current table state.
  20597. * @param {Object} options
  20598. * @param {string} options.sectionName Section in which to delete the row.
  20599. * @param {number} options.rowIndex Row index to delete.
  20600. *
  20601. * @return {Object} New table state.
  20602. */
  20603. function deleteRow(state, {
  20604. sectionName,
  20605. rowIndex
  20606. }) {
  20607. return {
  20608. [sectionName]: state[sectionName].filter((row, index) => index !== rowIndex)
  20609. };
  20610. }
  20611. /**
  20612. * Inserts a column in the table state.
  20613. *
  20614. * @param {Object} state Current table state.
  20615. * @param {Object} options
  20616. * @param {number} options.columnIndex Column index at which to insert the column.
  20617. *
  20618. * @return {Object} New table state.
  20619. */
  20620. function insertColumn(state, {
  20621. columnIndex
  20622. }) {
  20623. const tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']);
  20624. return Object(external_lodash_["mapValues"])(tableSections, (section, sectionName) => {
  20625. // Bail early if the table section is empty.
  20626. if (isEmptyTableSection(section)) {
  20627. return section;
  20628. }
  20629. return section.map(row => {
  20630. // Bail early if the row is empty or it's an attempt to insert past
  20631. // the last possible index of the array.
  20632. if (isEmptyRow(row) || row.cells.length < columnIndex) {
  20633. return row;
  20634. }
  20635. return {
  20636. cells: [...row.cells.slice(0, columnIndex), {
  20637. content: '',
  20638. tag: sectionName === 'head' ? 'th' : 'td'
  20639. }, ...row.cells.slice(columnIndex)]
  20640. };
  20641. });
  20642. });
  20643. }
  20644. /**
  20645. * Deletes a column from the table state.
  20646. *
  20647. * @param {Object} state Current table state.
  20648. * @param {Object} options
  20649. * @param {number} options.columnIndex Column index to delete.
  20650. *
  20651. * @return {Object} New table state.
  20652. */
  20653. function deleteColumn(state, {
  20654. columnIndex
  20655. }) {
  20656. const tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']);
  20657. return Object(external_lodash_["mapValues"])(tableSections, section => {
  20658. // Bail early if the table section is empty.
  20659. if (isEmptyTableSection(section)) {
  20660. return section;
  20661. }
  20662. return section.map(row => ({
  20663. cells: row.cells.length >= columnIndex ? row.cells.filter((cell, index) => index !== columnIndex) : row.cells
  20664. })).filter(row => row.cells.length);
  20665. });
  20666. }
  20667. /**
  20668. * Toggles the existance of a section.
  20669. *
  20670. * @param {Object} state Current table state.
  20671. * @param {string} sectionName Name of the section to toggle.
  20672. *
  20673. * @return {Object} New table state.
  20674. */
  20675. function toggleSection(state, sectionName) {
  20676. // Section exists, replace it with an empty row to remove it.
  20677. if (!isEmptyTableSection(state[sectionName])) {
  20678. return {
  20679. [sectionName]: []
  20680. };
  20681. } // Get the length of the first row of the body to use when creating the header.
  20682. const columnCount = Object(external_lodash_["get"])(state, ['body', 0, 'cells', 'length'], 1); // Section doesn't exist, insert an empty row to create the section.
  20683. return insertRow(state, {
  20684. sectionName,
  20685. rowIndex: 0,
  20686. columnCount
  20687. });
  20688. }
  20689. /**
  20690. * Determines whether a table section is empty.
  20691. *
  20692. * @param {Object} section Table section state.
  20693. *
  20694. * @return {boolean} True if the table section is empty, false otherwise.
  20695. */
  20696. function isEmptyTableSection(section) {
  20697. return !section || !section.length || Object(external_lodash_["every"])(section, isEmptyRow);
  20698. }
  20699. /**
  20700. * Determines whether a table row is empty.
  20701. *
  20702. * @param {Object} row Table row state.
  20703. *
  20704. * @return {boolean} True if the table section is empty, false otherwise.
  20705. */
  20706. function isEmptyRow(row) {
  20707. return !(row.cells && row.cells.length);
  20708. }
  20709. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/edit.js
  20710. /**
  20711. * External dependencies
  20712. */
  20713. /**
  20714. * WordPress dependencies
  20715. */
  20716. /**
  20717. * Internal dependencies
  20718. */
  20719. const ALIGNMENT_CONTROLS = [{
  20720. icon: align_left["a" /* default */],
  20721. title: Object(external_wp_i18n_["__"])('Align column left'),
  20722. align: 'left'
  20723. }, {
  20724. icon: align_center["a" /* default */],
  20725. title: Object(external_wp_i18n_["__"])('Align column center'),
  20726. align: 'center'
  20727. }, {
  20728. icon: align_right["a" /* default */],
  20729. title: Object(external_wp_i18n_["__"])('Align column right'),
  20730. align: 'right'
  20731. }];
  20732. const cellAriaLabel = {
  20733. head: Object(external_wp_i18n_["__"])('Header cell text'),
  20734. body: Object(external_wp_i18n_["__"])('Body cell text'),
  20735. foot: Object(external_wp_i18n_["__"])('Footer cell text')
  20736. };
  20737. const edit_placeholder = {
  20738. head: Object(external_wp_i18n_["__"])('Header label'),
  20739. foot: Object(external_wp_i18n_["__"])('Footer label')
  20740. };
  20741. function TSection({
  20742. name,
  20743. ...props
  20744. }) {
  20745. const TagName = `t${name}`;
  20746. return Object(external_wp_element_["createElement"])(TagName, props);
  20747. }
  20748. function TableEdit({
  20749. attributes,
  20750. setAttributes,
  20751. insertBlocksAfter,
  20752. isSelected
  20753. }) {
  20754. const {
  20755. hasFixedLayout,
  20756. caption,
  20757. head,
  20758. foot
  20759. } = attributes;
  20760. const [initialRowCount, setInitialRowCount] = Object(external_wp_element_["useState"])(2);
  20761. const [initialColumnCount, setInitialColumnCount] = Object(external_wp_element_["useState"])(2);
  20762. const [selectedCell, setSelectedCell] = Object(external_wp_element_["useState"])();
  20763. const colorProps = Object(external_wp_blockEditor_["__experimentalUseColorProps"])(attributes);
  20764. const borderProps = Object(external_wp_blockEditor_["__experimentalUseBorderProps"])(attributes);
  20765. /**
  20766. * Updates the initial column count used for table creation.
  20767. *
  20768. * @param {number} count New initial column count.
  20769. */
  20770. function onChangeInitialColumnCount(count) {
  20771. setInitialColumnCount(count);
  20772. }
  20773. /**
  20774. * Updates the initial row count used for table creation.
  20775. *
  20776. * @param {number} count New initial row count.
  20777. */
  20778. function onChangeInitialRowCount(count) {
  20779. setInitialRowCount(count);
  20780. }
  20781. /**
  20782. * Creates a table based on dimensions in local state.
  20783. *
  20784. * @param {Object} event Form submit event.
  20785. */
  20786. function onCreateTable(event) {
  20787. event.preventDefault();
  20788. setAttributes(createTable({
  20789. rowCount: parseInt(initialRowCount, 10) || 2,
  20790. columnCount: parseInt(initialColumnCount, 10) || 2
  20791. }));
  20792. }
  20793. /**
  20794. * Toggles whether the table has a fixed layout or not.
  20795. */
  20796. function onChangeFixedLayout() {
  20797. setAttributes({
  20798. hasFixedLayout: !hasFixedLayout
  20799. });
  20800. }
  20801. /**
  20802. * Changes the content of the currently selected cell.
  20803. *
  20804. * @param {Array} content A RichText content value.
  20805. */
  20806. function onChange(content) {
  20807. if (!selectedCell) {
  20808. return;
  20809. }
  20810. setAttributes(updateSelectedCell(attributes, selectedCell, cellAttributes => ({ ...cellAttributes,
  20811. content
  20812. })));
  20813. }
  20814. /**
  20815. * Align text within the a column.
  20816. *
  20817. * @param {string} align The new alignment to apply to the column.
  20818. */
  20819. function onChangeColumnAlignment(align) {
  20820. if (!selectedCell) {
  20821. return;
  20822. } // Convert the cell selection to a column selection so that alignment
  20823. // is applied to the entire column.
  20824. const columnSelection = {
  20825. type: 'column',
  20826. columnIndex: selectedCell.columnIndex
  20827. };
  20828. const newAttributes = updateSelectedCell(attributes, columnSelection, cellAttributes => ({ ...cellAttributes,
  20829. align
  20830. }));
  20831. setAttributes(newAttributes);
  20832. }
  20833. /**
  20834. * Get the alignment of the currently selected cell.
  20835. *
  20836. * @return {string} The new alignment to apply to the column.
  20837. */
  20838. function getCellAlignment() {
  20839. if (!selectedCell) {
  20840. return;
  20841. }
  20842. return getCellAttribute(attributes, selectedCell, 'align');
  20843. }
  20844. /**
  20845. * Add or remove a `head` table section.
  20846. */
  20847. function onToggleHeaderSection() {
  20848. setAttributes(toggleSection(attributes, 'head'));
  20849. }
  20850. /**
  20851. * Add or remove a `foot` table section.
  20852. */
  20853. function onToggleFooterSection() {
  20854. setAttributes(toggleSection(attributes, 'foot'));
  20855. }
  20856. /**
  20857. * Inserts a row at the currently selected row index, plus `delta`.
  20858. *
  20859. * @param {number} delta Offset for selected row index at which to insert.
  20860. */
  20861. function onInsertRow(delta) {
  20862. if (!selectedCell) {
  20863. return;
  20864. }
  20865. const {
  20866. sectionName,
  20867. rowIndex
  20868. } = selectedCell;
  20869. const newRowIndex = rowIndex + delta;
  20870. setAttributes(insertRow(attributes, {
  20871. sectionName,
  20872. rowIndex: newRowIndex
  20873. })); // Select the first cell of the new row
  20874. setSelectedCell({
  20875. sectionName,
  20876. rowIndex: newRowIndex,
  20877. columnIndex: 0,
  20878. type: 'cell'
  20879. });
  20880. }
  20881. /**
  20882. * Inserts a row before the currently selected row.
  20883. */
  20884. function onInsertRowBefore() {
  20885. onInsertRow(0);
  20886. }
  20887. /**
  20888. * Inserts a row after the currently selected row.
  20889. */
  20890. function onInsertRowAfter() {
  20891. onInsertRow(1);
  20892. }
  20893. /**
  20894. * Deletes the currently selected row.
  20895. */
  20896. function onDeleteRow() {
  20897. if (!selectedCell) {
  20898. return;
  20899. }
  20900. const {
  20901. sectionName,
  20902. rowIndex
  20903. } = selectedCell;
  20904. setSelectedCell();
  20905. setAttributes(deleteRow(attributes, {
  20906. sectionName,
  20907. rowIndex
  20908. }));
  20909. }
  20910. /**
  20911. * Inserts a column at the currently selected column index, plus `delta`.
  20912. *
  20913. * @param {number} delta Offset for selected column index at which to insert.
  20914. */
  20915. function onInsertColumn(delta = 0) {
  20916. if (!selectedCell) {
  20917. return;
  20918. }
  20919. const {
  20920. columnIndex
  20921. } = selectedCell;
  20922. const newColumnIndex = columnIndex + delta;
  20923. setAttributes(insertColumn(attributes, {
  20924. columnIndex: newColumnIndex
  20925. })); // Select the first cell of the new column
  20926. setSelectedCell({
  20927. rowIndex: 0,
  20928. columnIndex: newColumnIndex,
  20929. type: 'cell'
  20930. });
  20931. }
  20932. /**
  20933. * Inserts a column before the currently selected column.
  20934. */
  20935. function onInsertColumnBefore() {
  20936. onInsertColumn(0);
  20937. }
  20938. /**
  20939. * Inserts a column after the currently selected column.
  20940. */
  20941. function onInsertColumnAfter() {
  20942. onInsertColumn(1);
  20943. }
  20944. /**
  20945. * Deletes the currently selected column.
  20946. */
  20947. function onDeleteColumn() {
  20948. if (!selectedCell) {
  20949. return;
  20950. }
  20951. const {
  20952. sectionName,
  20953. columnIndex
  20954. } = selectedCell;
  20955. setSelectedCell();
  20956. setAttributes(deleteColumn(attributes, {
  20957. sectionName,
  20958. columnIndex
  20959. }));
  20960. }
  20961. Object(external_wp_element_["useEffect"])(() => {
  20962. if (!isSelected) {
  20963. setSelectedCell();
  20964. }
  20965. }, [isSelected]);
  20966. const sections = ['head', 'body', 'foot'].filter(name => !isEmptyTableSection(attributes[name]));
  20967. const tableControls = [{
  20968. icon: table_row_before,
  20969. title: Object(external_wp_i18n_["__"])('Insert row before'),
  20970. isDisabled: !selectedCell,
  20971. onClick: onInsertRowBefore
  20972. }, {
  20973. icon: table_row_after,
  20974. title: Object(external_wp_i18n_["__"])('Insert row after'),
  20975. isDisabled: !selectedCell,
  20976. onClick: onInsertRowAfter
  20977. }, {
  20978. icon: table_row_delete,
  20979. title: Object(external_wp_i18n_["__"])('Delete row'),
  20980. isDisabled: !selectedCell,
  20981. onClick: onDeleteRow
  20982. }, {
  20983. icon: table_column_before,
  20984. title: Object(external_wp_i18n_["__"])('Insert column before'),
  20985. isDisabled: !selectedCell,
  20986. onClick: onInsertColumnBefore
  20987. }, {
  20988. icon: table_column_after,
  20989. title: Object(external_wp_i18n_["__"])('Insert column after'),
  20990. isDisabled: !selectedCell,
  20991. onClick: onInsertColumnAfter
  20992. }, {
  20993. icon: table_column_delete,
  20994. title: Object(external_wp_i18n_["__"])('Delete column'),
  20995. isDisabled: !selectedCell,
  20996. onClick: onDeleteColumn
  20997. }];
  20998. const renderedSections = ['head', 'body', 'foot'].map(name => Object(external_wp_element_["createElement"])(TSection, {
  20999. name: name,
  21000. key: name
  21001. }, attributes[name].map(({
  21002. cells
  21003. }, rowIndex) => Object(external_wp_element_["createElement"])("tr", {
  21004. key: rowIndex
  21005. }, cells.map(({
  21006. content,
  21007. tag: CellTag,
  21008. scope,
  21009. align
  21010. }, columnIndex) => Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  21011. tagName: CellTag,
  21012. key: columnIndex,
  21013. className: classnames_default()({
  21014. [`has-text-align-${align}`]: align
  21015. }, 'wp-block-table__cell-content'),
  21016. scope: CellTag === 'th' ? scope : undefined,
  21017. value: content,
  21018. onChange: onChange,
  21019. unstableOnFocus: () => {
  21020. setSelectedCell({
  21021. sectionName: name,
  21022. rowIndex,
  21023. columnIndex,
  21024. type: 'cell'
  21025. });
  21026. },
  21027. "aria-label": cellAriaLabel[name],
  21028. placeholder: edit_placeholder[name]
  21029. }))))));
  21030. const isEmpty = !sections.length;
  21031. return Object(external_wp_element_["createElement"])("figure", Object(external_wp_blockEditor_["useBlockProps"])(), !isEmpty && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  21032. group: "block"
  21033. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  21034. label: Object(external_wp_i18n_["__"])('Change column alignment'),
  21035. alignmentControls: ALIGNMENT_CONTROLS,
  21036. value: getCellAlignment(),
  21037. onChange: nextAlign => onChangeColumnAlignment(nextAlign)
  21038. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  21039. group: "other"
  21040. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarDropdownMenu"], {
  21041. hasArrowIndicator: true,
  21042. icon: library_table,
  21043. label: Object(external_wp_i18n_["__"])('Edit table'),
  21044. controls: tableControls
  21045. }))), !isEmpty && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  21046. title: Object(external_wp_i18n_["__"])('Table settings'),
  21047. className: "blocks-table-settings"
  21048. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21049. label: Object(external_wp_i18n_["__"])('Fixed width table cells'),
  21050. checked: !!hasFixedLayout,
  21051. onChange: onChangeFixedLayout
  21052. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21053. label: Object(external_wp_i18n_["__"])('Header section'),
  21054. checked: !!(head && head.length),
  21055. onChange: onToggleHeaderSection
  21056. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21057. label: Object(external_wp_i18n_["__"])('Footer section'),
  21058. checked: !!(foot && foot.length),
  21059. onChange: onToggleFooterSection
  21060. }))), !isEmpty && Object(external_wp_element_["createElement"])("table", {
  21061. className: classnames_default()(colorProps.className, borderProps.className, {
  21062. 'has-fixed-layout': hasFixedLayout
  21063. }),
  21064. style: { ...colorProps.style,
  21065. ...borderProps.style
  21066. }
  21067. }, renderedSections), !isEmpty && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  21068. tagName: "figcaption",
  21069. "aria-label": Object(external_wp_i18n_["__"])('Table caption text'),
  21070. placeholder: Object(external_wp_i18n_["__"])('Add caption'),
  21071. value: caption,
  21072. onChange: value => setAttributes({
  21073. caption: value
  21074. }) // Deselect the selected table cell when the caption is focused.
  21075. ,
  21076. unstableOnFocus: () => setSelectedCell(),
  21077. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  21078. }), isEmpty && Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  21079. label: Object(external_wp_i18n_["__"])('Table'),
  21080. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  21081. icon: block_table,
  21082. showColors: true
  21083. }),
  21084. instructions: Object(external_wp_i18n_["__"])('Insert a table for sharing data.')
  21085. }, Object(external_wp_element_["createElement"])("form", {
  21086. className: "blocks-table__placeholder-form",
  21087. onSubmit: onCreateTable
  21088. }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  21089. type: "number",
  21090. label: Object(external_wp_i18n_["__"])('Column count'),
  21091. value: initialColumnCount,
  21092. onChange: onChangeInitialColumnCount,
  21093. min: "1",
  21094. className: "blocks-table__placeholder-input"
  21095. }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  21096. type: "number",
  21097. label: Object(external_wp_i18n_["__"])('Row count'),
  21098. value: initialRowCount,
  21099. onChange: onChangeInitialRowCount,
  21100. min: "1",
  21101. className: "blocks-table__placeholder-input"
  21102. }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  21103. className: "blocks-table__placeholder-button",
  21104. isPrimary: true,
  21105. type: "submit"
  21106. }, Object(external_wp_i18n_["__"])('Create Table')))));
  21107. }
  21108. /* harmony default export */ var table_edit = (TableEdit);
  21109. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/save.js
  21110. /**
  21111. * External dependencies
  21112. */
  21113. /**
  21114. * WordPress dependencies
  21115. */
  21116. function table_save_save({
  21117. attributes
  21118. }) {
  21119. const {
  21120. hasFixedLayout,
  21121. head,
  21122. body,
  21123. foot,
  21124. caption
  21125. } = attributes;
  21126. const isEmpty = !head.length && !body.length && !foot.length;
  21127. if (isEmpty) {
  21128. return null;
  21129. }
  21130. const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes);
  21131. const borderProps = Object(external_wp_blockEditor_["__experimentalGetBorderClassesAndStyles"])(attributes);
  21132. const classes = classnames_default()(colorProps.className, borderProps.className, {
  21133. 'has-fixed-layout': hasFixedLayout
  21134. });
  21135. const hasCaption = !external_wp_blockEditor_["RichText"].isEmpty(caption);
  21136. const Section = ({
  21137. type,
  21138. rows
  21139. }) => {
  21140. if (!rows.length) {
  21141. return null;
  21142. }
  21143. const Tag = `t${type}`;
  21144. return Object(external_wp_element_["createElement"])(Tag, null, rows.map(({
  21145. cells
  21146. }, rowIndex) => Object(external_wp_element_["createElement"])("tr", {
  21147. key: rowIndex
  21148. }, cells.map(({
  21149. content,
  21150. tag,
  21151. scope,
  21152. align
  21153. }, cellIndex) => {
  21154. const cellClasses = classnames_default()({
  21155. [`has-text-align-${align}`]: align
  21156. });
  21157. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  21158. className: cellClasses ? cellClasses : undefined,
  21159. "data-align": align,
  21160. tagName: tag,
  21161. value: content,
  21162. key: cellIndex,
  21163. scope: tag === 'th' ? scope : undefined
  21164. });
  21165. }))));
  21166. };
  21167. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("table", {
  21168. className: classes === '' ? undefined : classes,
  21169. style: { ...colorProps.style,
  21170. ...borderProps.style
  21171. }
  21172. }, Object(external_wp_element_["createElement"])(Section, {
  21173. type: "head",
  21174. rows: head
  21175. }), Object(external_wp_element_["createElement"])(Section, {
  21176. type: "body",
  21177. rows: body
  21178. }), Object(external_wp_element_["createElement"])(Section, {
  21179. type: "foot",
  21180. rows: foot
  21181. })), hasCaption && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  21182. tagName: "figcaption",
  21183. value: caption
  21184. }));
  21185. }
  21186. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/transforms.js
  21187. const tableContentPasteSchema = ({
  21188. phrasingContentSchema
  21189. }) => ({
  21190. tr: {
  21191. allowEmpty: true,
  21192. children: {
  21193. th: {
  21194. allowEmpty: true,
  21195. children: phrasingContentSchema,
  21196. attributes: ['scope']
  21197. },
  21198. td: {
  21199. allowEmpty: true,
  21200. children: phrasingContentSchema
  21201. }
  21202. }
  21203. }
  21204. });
  21205. const tablePasteSchema = args => ({
  21206. table: {
  21207. children: {
  21208. thead: {
  21209. allowEmpty: true,
  21210. children: tableContentPasteSchema(args)
  21211. },
  21212. tfoot: {
  21213. allowEmpty: true,
  21214. children: tableContentPasteSchema(args)
  21215. },
  21216. tbody: {
  21217. allowEmpty: true,
  21218. children: tableContentPasteSchema(args)
  21219. }
  21220. }
  21221. }
  21222. });
  21223. const table_transforms_transforms = {
  21224. from: [{
  21225. type: 'raw',
  21226. selector: 'table',
  21227. schema: tablePasteSchema
  21228. }]
  21229. };
  21230. /* harmony default export */ var table_transforms = (table_transforms_transforms);
  21231. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/index.js
  21232. /**
  21233. * WordPress dependencies
  21234. */
  21235. /**
  21236. * Internal dependencies
  21237. */
  21238. const table_metadata = {
  21239. apiVersion: 2,
  21240. name: "core/table",
  21241. title: "Table",
  21242. category: "text",
  21243. description: "Insert a table \u2014 perfect for sharing charts and data.",
  21244. textdomain: "default",
  21245. attributes: {
  21246. hasFixedLayout: {
  21247. type: "boolean",
  21248. "default": false
  21249. },
  21250. caption: {
  21251. type: "string",
  21252. source: "html",
  21253. selector: "figcaption",
  21254. "default": ""
  21255. },
  21256. head: {
  21257. type: "array",
  21258. "default": [],
  21259. source: "query",
  21260. selector: "thead tr",
  21261. query: {
  21262. cells: {
  21263. type: "array",
  21264. "default": [],
  21265. source: "query",
  21266. selector: "td,th",
  21267. query: {
  21268. content: {
  21269. type: "string",
  21270. source: "html"
  21271. },
  21272. tag: {
  21273. type: "string",
  21274. "default": "td",
  21275. source: "tag"
  21276. },
  21277. scope: {
  21278. type: "string",
  21279. source: "attribute",
  21280. attribute: "scope"
  21281. },
  21282. align: {
  21283. type: "string",
  21284. source: "attribute",
  21285. attribute: "data-align"
  21286. }
  21287. }
  21288. }
  21289. }
  21290. },
  21291. body: {
  21292. type: "array",
  21293. "default": [],
  21294. source: "query",
  21295. selector: "tbody tr",
  21296. query: {
  21297. cells: {
  21298. type: "array",
  21299. "default": [],
  21300. source: "query",
  21301. selector: "td,th",
  21302. query: {
  21303. content: {
  21304. type: "string",
  21305. source: "html"
  21306. },
  21307. tag: {
  21308. type: "string",
  21309. "default": "td",
  21310. source: "tag"
  21311. },
  21312. scope: {
  21313. type: "string",
  21314. source: "attribute",
  21315. attribute: "scope"
  21316. },
  21317. align: {
  21318. type: "string",
  21319. source: "attribute",
  21320. attribute: "data-align"
  21321. }
  21322. }
  21323. }
  21324. }
  21325. },
  21326. foot: {
  21327. type: "array",
  21328. "default": [],
  21329. source: "query",
  21330. selector: "tfoot tr",
  21331. query: {
  21332. cells: {
  21333. type: "array",
  21334. "default": [],
  21335. source: "query",
  21336. selector: "td,th",
  21337. query: {
  21338. content: {
  21339. type: "string",
  21340. source: "html"
  21341. },
  21342. tag: {
  21343. type: "string",
  21344. "default": "td",
  21345. source: "tag"
  21346. },
  21347. scope: {
  21348. type: "string",
  21349. source: "attribute",
  21350. attribute: "scope"
  21351. },
  21352. align: {
  21353. type: "string",
  21354. source: "attribute",
  21355. attribute: "data-align"
  21356. }
  21357. }
  21358. }
  21359. }
  21360. }
  21361. },
  21362. supports: {
  21363. anchor: true,
  21364. align: true,
  21365. color: {
  21366. __experimentalSkipSerialization: true,
  21367. gradients: true
  21368. },
  21369. __experimentalBorder: {
  21370. __experimentalSkipSerialization: true,
  21371. color: true,
  21372. style: true,
  21373. width: true
  21374. },
  21375. __experimentalSelector: ".wp-block-table > table"
  21376. },
  21377. styles: [{
  21378. name: "regular",
  21379. label: "Default",
  21380. isDefault: true
  21381. }, {
  21382. name: "stripes",
  21383. label: "Stripes"
  21384. }],
  21385. editorStyle: "wp-block-table-editor",
  21386. style: "wp-block-table"
  21387. };
  21388. const {
  21389. name: table_name
  21390. } = table_metadata;
  21391. const table_settings = {
  21392. icon: block_table,
  21393. example: {
  21394. attributes: {
  21395. head: [{
  21396. cells: [{
  21397. content: Object(external_wp_i18n_["__"])('Version'),
  21398. tag: 'th'
  21399. }, {
  21400. content: Object(external_wp_i18n_["__"])('Jazz Musician'),
  21401. tag: 'th'
  21402. }, {
  21403. content: Object(external_wp_i18n_["__"])('Release Date'),
  21404. tag: 'th'
  21405. }]
  21406. }],
  21407. body: [{
  21408. cells: [{
  21409. content: '5.2',
  21410. tag: 'td'
  21411. }, {
  21412. content: 'Jaco Pastorius',
  21413. tag: 'td'
  21414. }, {
  21415. content: Object(external_wp_i18n_["__"])('May 7, 2019'),
  21416. tag: 'td'
  21417. }]
  21418. }, {
  21419. cells: [{
  21420. content: '5.1',
  21421. tag: 'td'
  21422. }, {
  21423. content: 'Betty Carter',
  21424. tag: 'td'
  21425. }, {
  21426. content: Object(external_wp_i18n_["__"])('February 21, 2019'),
  21427. tag: 'td'
  21428. }]
  21429. }, {
  21430. cells: [{
  21431. content: '5.0',
  21432. tag: 'td'
  21433. }, {
  21434. content: 'Bebo Valdés',
  21435. tag: 'td'
  21436. }, {
  21437. content: Object(external_wp_i18n_["__"])('December 6, 2018'),
  21438. tag: 'td'
  21439. }]
  21440. }]
  21441. }
  21442. },
  21443. transforms: table_transforms,
  21444. edit: table_edit,
  21445. save: table_save_save,
  21446. deprecated: table_deprecated
  21447. };
  21448. // EXTERNAL MODULE: external ["wp","deprecated"]
  21449. var external_wp_deprecated_ = __webpack_require__("NMb1");
  21450. var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
  21451. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/edit.js
  21452. /**
  21453. * External dependencies
  21454. */
  21455. /**
  21456. * WordPress dependencies
  21457. */
  21458. function TextColumnsEdit({
  21459. attributes,
  21460. setAttributes
  21461. }) {
  21462. const {
  21463. width,
  21464. content,
  21465. columns
  21466. } = attributes;
  21467. external_wp_deprecated_default()('The Text Columns block', {
  21468. since: '5.3',
  21469. alternative: 'the Columns block'
  21470. });
  21471. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentToolbar"], {
  21472. value: width,
  21473. onChange: nextWidth => setAttributes({
  21474. width: nextWidth
  21475. }),
  21476. controls: ['center', 'wide', 'full']
  21477. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  21478. label: Object(external_wp_i18n_["__"])('Columns'),
  21479. value: columns,
  21480. onChange: value => setAttributes({
  21481. columns: value
  21482. }),
  21483. min: 2,
  21484. max: 4,
  21485. required: true
  21486. }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({
  21487. className: `align${width} columns-${columns}`
  21488. }), Object(external_lodash_["times"])(columns, index => {
  21489. return Object(external_wp_element_["createElement"])("div", {
  21490. className: "wp-block-column",
  21491. key: `column-${index}`
  21492. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  21493. tagName: "p",
  21494. value: Object(external_lodash_["get"])(content, [index, 'children']),
  21495. onChange: nextContent => {
  21496. setAttributes({
  21497. content: [...content.slice(0, index), {
  21498. children: nextContent
  21499. }, ...content.slice(index + 1)]
  21500. });
  21501. },
  21502. "aria-label": Object(external_wp_i18n_["sprintf"])( // translators: %d: column index (starting with 1)
  21503. Object(external_wp_i18n_["__"])('Column %d text'), index + 1),
  21504. placeholder: Object(external_wp_i18n_["__"])('New Column')
  21505. }));
  21506. })));
  21507. }
  21508. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/save.js
  21509. /**
  21510. * External dependencies
  21511. */
  21512. /**
  21513. * WordPress dependencies
  21514. */
  21515. function text_columns_save_save({
  21516. attributes
  21517. }) {
  21518. const {
  21519. width,
  21520. content,
  21521. columns
  21522. } = attributes;
  21523. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({
  21524. className: `align${width} columns-${columns}`
  21525. }), Object(external_lodash_["times"])(columns, index => Object(external_wp_element_["createElement"])("div", {
  21526. className: "wp-block-column",
  21527. key: `column-${index}`
  21528. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  21529. tagName: "p",
  21530. value: Object(external_lodash_["get"])(content, [index, 'children'])
  21531. }))));
  21532. }
  21533. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/transforms.js
  21534. /**
  21535. * WordPress dependencies
  21536. */
  21537. const text_columns_transforms_transforms = {
  21538. to: [{
  21539. type: 'block',
  21540. blocks: ['core/columns'],
  21541. transform: ({
  21542. className,
  21543. columns,
  21544. content,
  21545. width
  21546. }) => Object(external_wp_blocks_["createBlock"])('core/columns', {
  21547. align: 'wide' === width || 'full' === width ? width : undefined,
  21548. className,
  21549. columns
  21550. }, content.map(({
  21551. children
  21552. }) => Object(external_wp_blocks_["createBlock"])('core/column', {}, [Object(external_wp_blocks_["createBlock"])('core/paragraph', {
  21553. content: children
  21554. })])))
  21555. }]
  21556. };
  21557. /* harmony default export */ var text_columns_transforms = (text_columns_transforms_transforms);
  21558. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
  21559. /**
  21560. * Internal dependencies
  21561. */
  21562. const text_columns_metadata = {
  21563. apiVersion: 2,
  21564. name: "core/text-columns",
  21565. title: "Text Columns (deprecated)",
  21566. icon: "columns",
  21567. category: "design",
  21568. description: "This block is deprecated. Please use the Columns block instead.",
  21569. textdomain: "default",
  21570. attributes: {
  21571. content: {
  21572. type: "array",
  21573. source: "query",
  21574. selector: "p",
  21575. query: {
  21576. children: {
  21577. type: "string",
  21578. source: "html"
  21579. }
  21580. },
  21581. "default": [{}, {}]
  21582. },
  21583. columns: {
  21584. type: "number",
  21585. "default": 2
  21586. },
  21587. width: {
  21588. type: "string"
  21589. }
  21590. },
  21591. supports: {
  21592. inserter: false
  21593. },
  21594. editorStyle: "wp-block-text-columns-editor",
  21595. style: "wp-block-text-columns"
  21596. };
  21597. const {
  21598. name: text_columns_name
  21599. } = text_columns_metadata;
  21600. const text_columns_settings = {
  21601. transforms: text_columns_transforms,
  21602. getEditWrapperProps(attributes) {
  21603. const {
  21604. width
  21605. } = attributes;
  21606. if ('wide' === width || 'full' === width) {
  21607. return {
  21608. 'data-align': width
  21609. };
  21610. }
  21611. },
  21612. edit: TextColumnsEdit,
  21613. save: text_columns_save_save
  21614. };
  21615. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/verse.js
  21616. /**
  21617. * WordPress dependencies
  21618. */
  21619. const verse = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  21620. viewBox: "0 0 24 24",
  21621. xmlns: "http://www.w3.org/2000/svg"
  21622. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  21623. d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"
  21624. }));
  21625. /* harmony default export */ var library_verse = (verse);
  21626. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/deprecated.js
  21627. /**
  21628. * WordPress dependencies
  21629. */
  21630. const verse_deprecated_blockAttributes = {
  21631. content: {
  21632. type: 'string',
  21633. source: 'html',
  21634. selector: 'pre',
  21635. default: ''
  21636. },
  21637. textAlign: {
  21638. type: 'string'
  21639. }
  21640. };
  21641. const verse_deprecated_deprecated = [{
  21642. attributes: verse_deprecated_blockAttributes,
  21643. save({
  21644. attributes
  21645. }) {
  21646. const {
  21647. textAlign,
  21648. content
  21649. } = attributes;
  21650. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  21651. tagName: "pre",
  21652. style: {
  21653. textAlign
  21654. },
  21655. value: content
  21656. });
  21657. }
  21658. }];
  21659. /* harmony default export */ var verse_deprecated = (verse_deprecated_deprecated);
  21660. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/edit.js
  21661. /**
  21662. * External dependencies
  21663. */
  21664. /**
  21665. * WordPress dependencies
  21666. */
  21667. function VerseEdit({
  21668. attributes,
  21669. setAttributes,
  21670. mergeBlocks,
  21671. onRemove
  21672. }) {
  21673. const {
  21674. textAlign,
  21675. content
  21676. } = attributes;
  21677. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  21678. className: classnames_default()({
  21679. [`has-text-align-${textAlign}`]: textAlign
  21680. })
  21681. });
  21682. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], {
  21683. value: textAlign,
  21684. onChange: nextAlign => {
  21685. setAttributes({
  21686. textAlign: nextAlign
  21687. });
  21688. }
  21689. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
  21690. tagName: "pre",
  21691. identifier: "content",
  21692. preserveWhiteSpace: true,
  21693. value: content,
  21694. onChange: nextContent => {
  21695. setAttributes({
  21696. content: nextContent
  21697. });
  21698. },
  21699. "aria-label": Object(external_wp_i18n_["__"])('Verse text'),
  21700. placeholder: Object(external_wp_i18n_["__"])('Write verse…'),
  21701. onRemove: onRemove,
  21702. onMerge: mergeBlocks,
  21703. textAlign: textAlign
  21704. }, blockProps, {
  21705. __unstablePastePlainText: true
  21706. })));
  21707. }
  21708. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/save.js
  21709. /**
  21710. * External dependencies
  21711. */
  21712. /**
  21713. * WordPress dependencies
  21714. */
  21715. function verse_save_save({
  21716. attributes
  21717. }) {
  21718. const {
  21719. textAlign,
  21720. content
  21721. } = attributes;
  21722. const className = classnames_default()({
  21723. [`has-text-align-${textAlign}`]: textAlign
  21724. });
  21725. return Object(external_wp_element_["createElement"])("pre", external_wp_blockEditor_["useBlockProps"].save({
  21726. className
  21727. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  21728. value: content
  21729. }));
  21730. }
  21731. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/transforms.js
  21732. /**
  21733. * WordPress dependencies
  21734. */
  21735. const verse_transforms_transforms = {
  21736. from: [{
  21737. type: 'block',
  21738. blocks: ['core/paragraph'],
  21739. transform: attributes => Object(external_wp_blocks_["createBlock"])('core/verse', attributes)
  21740. }],
  21741. to: [{
  21742. type: 'block',
  21743. blocks: ['core/paragraph'],
  21744. transform: attributes => Object(external_wp_blocks_["createBlock"])('core/paragraph', attributes)
  21745. }]
  21746. };
  21747. /* harmony default export */ var verse_transforms = (verse_transforms_transforms);
  21748. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/index.js
  21749. /**
  21750. * WordPress dependencies
  21751. */
  21752. /**
  21753. * Internal dependencies
  21754. */
  21755. const verse_metadata = {
  21756. apiVersion: 2,
  21757. name: "core/verse",
  21758. title: "Verse",
  21759. category: "text",
  21760. description: "Insert poetry. Use special spacing formats. Or quote song lyrics.",
  21761. keywords: ["poetry", "poem"],
  21762. textdomain: "default",
  21763. attributes: {
  21764. content: {
  21765. type: "string",
  21766. source: "html",
  21767. selector: "pre",
  21768. "default": "",
  21769. __unstablePreserveWhiteSpace: true,
  21770. __experimentalRole: "content"
  21771. },
  21772. textAlign: {
  21773. type: "string"
  21774. }
  21775. },
  21776. supports: {
  21777. anchor: true,
  21778. color: {
  21779. gradients: true,
  21780. link: true
  21781. },
  21782. typography: {
  21783. fontSize: true,
  21784. __experimentalFontFamily: true
  21785. },
  21786. spacing: {
  21787. padding: true
  21788. }
  21789. },
  21790. style: "wp-block-verse",
  21791. editorStyle: "wp-block-verse-editor"
  21792. };
  21793. const {
  21794. name: verse_name
  21795. } = verse_metadata;
  21796. const verse_settings = {
  21797. icon: library_verse,
  21798. example: {
  21799. attributes: {
  21800. /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
  21801. // translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.
  21802. content: Object(external_wp_i18n_["__"])('WHAT was he doing, the great god Pan,\n Down in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river.')
  21803. /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
  21804. }
  21805. },
  21806. transforms: verse_transforms,
  21807. deprecated: verse_deprecated,
  21808. merge(attributes, attributesToMerge) {
  21809. return {
  21810. content: attributes.content + attributesToMerge.content
  21811. };
  21812. },
  21813. edit: VerseEdit,
  21814. save: verse_save_save
  21815. };
  21816. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/video.js
  21817. /**
  21818. * WordPress dependencies
  21819. */
  21820. const video_video = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  21821. viewBox: "0 0 24 24",
  21822. xmlns: "http://www.w3.org/2000/svg"
  21823. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  21824. d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"
  21825. }));
  21826. /* harmony default export */ var library_video = (video_video);
  21827. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit-common-settings.js
  21828. /**
  21829. * WordPress dependencies
  21830. */
  21831. const options = [{
  21832. value: 'auto',
  21833. label: Object(external_wp_i18n_["__"])('Auto')
  21834. }, {
  21835. value: 'metadata',
  21836. label: Object(external_wp_i18n_["__"])('Metadata')
  21837. }, {
  21838. value: 'none',
  21839. label: Object(external_wp_i18n_["__"])('None')
  21840. }];
  21841. const VideoSettings = ({
  21842. setAttributes,
  21843. attributes
  21844. }) => {
  21845. const {
  21846. autoplay,
  21847. controls,
  21848. loop,
  21849. muted,
  21850. playsInline,
  21851. preload
  21852. } = attributes;
  21853. const autoPlayHelpText = Object(external_wp_i18n_["__"])('Autoplay may cause usability issues for some users.');
  21854. const getAutoplayHelp = external_wp_element_["Platform"].select({
  21855. web: Object(external_wp_element_["useCallback"])(checked => {
  21856. return checked ? autoPlayHelpText : null;
  21857. }, []),
  21858. native: autoPlayHelpText
  21859. });
  21860. const toggleFactory = Object(external_wp_element_["useMemo"])(() => {
  21861. const toggleAttribute = attribute => {
  21862. return newValue => {
  21863. setAttributes({
  21864. [attribute]: newValue
  21865. });
  21866. };
  21867. };
  21868. return {
  21869. autoplay: toggleAttribute('autoplay'),
  21870. loop: toggleAttribute('loop'),
  21871. muted: toggleAttribute('muted'),
  21872. controls: toggleAttribute('controls'),
  21873. playsInline: toggleAttribute('playsInline')
  21874. };
  21875. }, []);
  21876. const onChangePreload = Object(external_wp_element_["useCallback"])(value => {
  21877. setAttributes({
  21878. preload: value
  21879. });
  21880. }, []);
  21881. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21882. label: Object(external_wp_i18n_["__"])('Autoplay'),
  21883. onChange: toggleFactory.autoplay,
  21884. checked: autoplay,
  21885. help: getAutoplayHelp
  21886. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21887. label: Object(external_wp_i18n_["__"])('Loop'),
  21888. onChange: toggleFactory.loop,
  21889. checked: loop
  21890. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21891. label: Object(external_wp_i18n_["__"])('Muted'),
  21892. onChange: toggleFactory.muted,
  21893. checked: muted
  21894. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21895. label: Object(external_wp_i18n_["__"])('Playback controls'),
  21896. onChange: toggleFactory.controls,
  21897. checked: controls
  21898. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  21899. label: Object(external_wp_i18n_["__"])('Play inline'),
  21900. onChange: toggleFactory.playsInline,
  21901. checked: playsInline
  21902. }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  21903. label: Object(external_wp_i18n_["__"])('Preload'),
  21904. value: preload,
  21905. onChange: onChangePreload,
  21906. options: options,
  21907. hideCancelButton: true
  21908. }));
  21909. };
  21910. /* harmony default export */ var edit_common_settings = (VideoSettings);
  21911. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js
  21912. var library_media = __webpack_require__("rH4q");
  21913. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks-editor.js
  21914. /**
  21915. * WordPress dependencies
  21916. */
  21917. const ALLOWED_TYPES = ['text/vtt'];
  21918. const DEFAULT_KIND = 'subtitles';
  21919. const KIND_OPTIONS = [{
  21920. label: Object(external_wp_i18n_["__"])('Subtitles'),
  21921. value: 'subtitles'
  21922. }, {
  21923. label: Object(external_wp_i18n_["__"])('Captions'),
  21924. value: 'captions'
  21925. }, {
  21926. label: Object(external_wp_i18n_["__"])('Descriptions'),
  21927. value: 'descriptions'
  21928. }, {
  21929. label: Object(external_wp_i18n_["__"])('Chapters'),
  21930. value: 'chapters'
  21931. }, {
  21932. label: Object(external_wp_i18n_["__"])('Metadata'),
  21933. value: 'metadata'
  21934. }];
  21935. const captionIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  21936. width: "18",
  21937. height: "14",
  21938. viewBox: "0 0 18 14",
  21939. role: "img",
  21940. fill: "none"
  21941. }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
  21942. x: "0.75",
  21943. y: "0.75",
  21944. width: "16.5",
  21945. height: "12.5",
  21946. rx: "1.25",
  21947. stroke: "black",
  21948. strokeWidth: "1.5",
  21949. fill: "none"
  21950. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  21951. d: "M3 7H15",
  21952. stroke: "black",
  21953. strokeWidth: "1.5"
  21954. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  21955. d: "M3 10L15 10",
  21956. stroke: "black",
  21957. strokeWidth: "1.5"
  21958. }));
  21959. function TrackList({
  21960. tracks,
  21961. onEditPress
  21962. }) {
  21963. let content;
  21964. if (tracks.length === 0) {
  21965. content = Object(external_wp_element_["createElement"])("p", {
  21966. className: "block-library-video-tracks-editor__tracks-informative-message"
  21967. }, Object(external_wp_i18n_["__"])('Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.'));
  21968. } else {
  21969. content = tracks.map((track, index) => {
  21970. return Object(external_wp_element_["createElement"])("div", {
  21971. key: index,
  21972. className: "block-library-video-tracks-editor__track-list-track"
  21973. }, Object(external_wp_element_["createElement"])("span", null, track.label, " "), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  21974. isTertiary: true,
  21975. onClick: () => onEditPress(index),
  21976. "aria-label": Object(external_wp_i18n_["sprintf"])(
  21977. /* translators: %s: Label of the video text track e.g: "French subtitles" */
  21978. Object(external_wp_i18n_["__"])('Edit %s'), track.label)
  21979. }, Object(external_wp_i18n_["__"])('Edit')));
  21980. });
  21981. }
  21982. return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
  21983. label: Object(external_wp_i18n_["__"])('Text tracks'),
  21984. className: "block-library-video-tracks-editor__track-list"
  21985. }, content);
  21986. }
  21987. function SingleTrackEditor({
  21988. track,
  21989. onChange,
  21990. onClose,
  21991. onRemove
  21992. }) {
  21993. const {
  21994. src = '',
  21995. label = '',
  21996. srcLang = '',
  21997. kind = DEFAULT_KIND
  21998. } = track;
  21999. const fileName = src.startsWith('blob:') ? '' : src.substring(src.lastIndexOf('/') + 1);
  22000. return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], null, Object(external_wp_element_["createElement"])("div", {
  22001. className: "block-library-video-tracks-editor__single-track-editor"
  22002. }, Object(external_wp_element_["createElement"])("span", {
  22003. className: "block-library-video-tracks-editor__single-track-editor-edit-track-label"
  22004. }, Object(external_wp_i18n_["__"])('Edit track')), Object(external_wp_element_["createElement"])("span", null, Object(external_wp_i18n_["__"])('File'), ": ", Object(external_wp_element_["createElement"])("b", null, fileName)), Object(external_wp_element_["createElement"])("div", {
  22005. className: "block-library-video-tracks-editor__single-track-editor-label-language"
  22006. }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"]
  22007. /* eslint-disable jsx-a11y/no-autofocus */
  22008. , {
  22009. autoFocus: true
  22010. /* eslint-enable jsx-a11y/no-autofocus */
  22011. ,
  22012. onChange: newLabel => onChange({ ...track,
  22013. label: newLabel
  22014. }),
  22015. label: Object(external_wp_i18n_["__"])('Label'),
  22016. value: label,
  22017. help: Object(external_wp_i18n_["__"])('Title of track')
  22018. }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  22019. onChange: newSrcLang => onChange({ ...track,
  22020. srcLang: newSrcLang
  22021. }),
  22022. label: Object(external_wp_i18n_["__"])('Source language'),
  22023. value: srcLang,
  22024. help: Object(external_wp_i18n_["__"])('Language tag (en, fr, etc.)')
  22025. })), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  22026. className: "block-library-video-tracks-editor__single-track-editor-kind-select",
  22027. options: KIND_OPTIONS,
  22028. value: kind,
  22029. label: Object(external_wp_i18n_["__"])('Kind'),
  22030. onChange: newKind => {
  22031. onChange({ ...track,
  22032. kind: newKind
  22033. });
  22034. }
  22035. }), Object(external_wp_element_["createElement"])("div", {
  22036. className: "block-library-video-tracks-editor__single-track-editor-buttons-container"
  22037. }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  22038. isSecondary: true,
  22039. onClick: () => {
  22040. const changes = {};
  22041. let hasChanges = false;
  22042. if (label === '') {
  22043. changes.label = Object(external_wp_i18n_["__"])('English');
  22044. hasChanges = true;
  22045. }
  22046. if (srcLang === '') {
  22047. changes.srcLang = 'en';
  22048. hasChanges = true;
  22049. }
  22050. if (track.kind === undefined) {
  22051. changes.kind = DEFAULT_KIND;
  22052. hasChanges = true;
  22053. }
  22054. if (hasChanges) {
  22055. onChange({ ...track,
  22056. ...changes
  22057. });
  22058. }
  22059. onClose();
  22060. }
  22061. }, Object(external_wp_i18n_["__"])('Close')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  22062. isDestructive: true,
  22063. isLink: true,
  22064. onClick: onRemove
  22065. }, Object(external_wp_i18n_["__"])('Remove track')))));
  22066. }
  22067. function TracksEditor({
  22068. tracks = [],
  22069. onChange
  22070. }) {
  22071. const mediaUpload = Object(external_wp_data_["useSelect"])(select => {
  22072. return select(external_wp_blockEditor_["store"]).getSettings().mediaUpload;
  22073. }, []);
  22074. const [trackBeingEdited, setTrackBeingEdited] = Object(external_wp_element_["useState"])(null);
  22075. if (!mediaUpload) {
  22076. return null;
  22077. }
  22078. return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
  22079. contentClassName: "block-library-video-tracks-editor",
  22080. renderToggle: ({
  22081. isOpen,
  22082. onToggle
  22083. }) => Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  22084. label: Object(external_wp_i18n_["__"])('Text tracks'),
  22085. showTooltip: true,
  22086. "aria-expanded": isOpen,
  22087. "aria-haspopup": "true",
  22088. onClick: onToggle,
  22089. icon: captionIcon
  22090. }),
  22091. renderContent: ({}) => {
  22092. if (trackBeingEdited !== null) {
  22093. return Object(external_wp_element_["createElement"])(SingleTrackEditor, {
  22094. track: tracks[trackBeingEdited],
  22095. onChange: newTrack => {
  22096. const newTracks = [...tracks];
  22097. newTracks[trackBeingEdited] = newTrack;
  22098. onChange(newTracks);
  22099. },
  22100. onClose: () => setTrackBeingEdited(null),
  22101. onRemove: () => {
  22102. onChange(tracks.filter((_track, index) => index !== trackBeingEdited));
  22103. setTrackBeingEdited(null);
  22104. }
  22105. });
  22106. }
  22107. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], null, Object(external_wp_element_["createElement"])(TrackList, {
  22108. tracks: tracks,
  22109. onEditPress: setTrackBeingEdited
  22110. }), Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
  22111. className: "block-library-video-tracks-editor__add-tracks-container",
  22112. label: Object(external_wp_i18n_["__"])('Add tracks')
  22113. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], {
  22114. onSelect: ({
  22115. url
  22116. }) => {
  22117. const trackIndex = tracks.length;
  22118. onChange([...tracks, {
  22119. src: url
  22120. }]);
  22121. setTrackBeingEdited(trackIndex);
  22122. },
  22123. allowedTypes: ALLOWED_TYPES,
  22124. render: ({
  22125. open
  22126. }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  22127. icon: library_media["a" /* default */],
  22128. onClick: open
  22129. }, Object(external_wp_i18n_["__"])('Open Media Library'))
  22130. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_components_["FormFileUpload"], {
  22131. onChange: event => {
  22132. const files = event.target.files;
  22133. const trackIndex = tracks.length;
  22134. mediaUpload({
  22135. allowedTypes: ALLOWED_TYPES,
  22136. filesList: files,
  22137. onFileChange: ([{
  22138. url
  22139. }]) => {
  22140. const newTracks = [...tracks];
  22141. if (!newTracks[trackIndex]) {
  22142. newTracks[trackIndex] = {};
  22143. }
  22144. newTracks[trackIndex] = { ...tracks[trackIndex],
  22145. src: url
  22146. };
  22147. onChange(newTracks);
  22148. setTrackBeingEdited(trackIndex);
  22149. }
  22150. });
  22151. },
  22152. accept: ".vtt,text/vtt",
  22153. render: ({
  22154. openFileDialog
  22155. }) => {
  22156. return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  22157. icon: upload["a" /* default */],
  22158. onClick: () => {
  22159. openFileDialog();
  22160. }
  22161. }, Object(external_wp_i18n_["__"])('Upload'));
  22162. }
  22163. })))));
  22164. }
  22165. });
  22166. }
  22167. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks.js
  22168. function Tracks({
  22169. tracks = []
  22170. }) {
  22171. return tracks.map(track => {
  22172. return Object(external_wp_element_["createElement"])("track", Object(esm_extends["a" /* default */])({
  22173. key: track.src
  22174. }, track));
  22175. });
  22176. }
  22177. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit.js
  22178. /**
  22179. * External dependencies
  22180. */
  22181. /**
  22182. * WordPress dependencies
  22183. */
  22184. /**
  22185. * Internal dependencies
  22186. */
  22187. const video_edit_ALLOWED_MEDIA_TYPES = ['video'];
  22188. const VIDEO_POSTER_ALLOWED_MEDIA_TYPES = ['image'];
  22189. function VideoEdit({
  22190. isSelected,
  22191. noticeUI,
  22192. attributes,
  22193. className,
  22194. setAttributes,
  22195. insertBlocksAfter,
  22196. onReplace,
  22197. noticeOperations
  22198. }) {
  22199. const instanceId = Object(external_wp_compose_["useInstanceId"])(VideoEdit);
  22200. const videoPlayer = Object(external_wp_element_["useRef"])();
  22201. const posterImageButton = Object(external_wp_element_["useRef"])();
  22202. const {
  22203. id,
  22204. caption,
  22205. controls,
  22206. poster,
  22207. src,
  22208. tracks
  22209. } = attributes;
  22210. const isTemporaryVideo = !id && Object(external_wp_blob_["isBlobURL"])(src);
  22211. const mediaUpload = Object(external_wp_data_["useSelect"])(select => select(external_wp_blockEditor_["store"]).getSettings().mediaUpload);
  22212. Object(external_wp_element_["useEffect"])(() => {
  22213. if (!id && Object(external_wp_blob_["isBlobURL"])(src)) {
  22214. const file = Object(external_wp_blob_["getBlobByURL"])(src);
  22215. if (file) {
  22216. mediaUpload({
  22217. filesList: [file],
  22218. onFileChange: ([{
  22219. url
  22220. }]) => {
  22221. setAttributes({
  22222. src: url
  22223. });
  22224. },
  22225. onError: message => {
  22226. noticeOperations.createErrorNotice(message);
  22227. },
  22228. allowedTypes: video_edit_ALLOWED_MEDIA_TYPES
  22229. });
  22230. }
  22231. }
  22232. }, []);
  22233. Object(external_wp_element_["useEffect"])(() => {
  22234. // Placeholder may be rendered.
  22235. if (videoPlayer.current) {
  22236. videoPlayer.current.load();
  22237. }
  22238. }, [poster]);
  22239. function onSelectVideo(media) {
  22240. if (!media || !media.url) {
  22241. // in this case there was an error
  22242. // previous attributes should be removed
  22243. // because they may be temporary blob urls
  22244. setAttributes({
  22245. src: undefined,
  22246. id: undefined
  22247. });
  22248. return;
  22249. } // sets the block's attribute and updates the edit component from the
  22250. // selected media
  22251. setAttributes({
  22252. src: media.url,
  22253. id: media.id
  22254. });
  22255. }
  22256. function onSelectURL(newSrc) {
  22257. if (newSrc !== src) {
  22258. // Check if there's an embed block that handles this URL.
  22259. const embedBlock = createUpgradedEmbedBlock({
  22260. attributes: {
  22261. url: newSrc
  22262. }
  22263. });
  22264. if (undefined !== embedBlock) {
  22265. onReplace(embedBlock);
  22266. return;
  22267. }
  22268. setAttributes({
  22269. src: newSrc,
  22270. id: undefined
  22271. });
  22272. }
  22273. }
  22274. function onUploadError(message) {
  22275. noticeOperations.removeAllNotices();
  22276. noticeOperations.createErrorNotice(message);
  22277. }
  22278. const classes = classnames_default()(className, {
  22279. 'is-transient': isTemporaryVideo
  22280. });
  22281. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  22282. className: classes
  22283. });
  22284. if (!src) {
  22285. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  22286. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  22287. icon: library_video
  22288. }),
  22289. onSelect: onSelectVideo,
  22290. onSelectURL: onSelectURL,
  22291. accept: "video/*",
  22292. allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
  22293. value: attributes,
  22294. notices: noticeUI,
  22295. onError: onUploadError
  22296. }));
  22297. }
  22298. function onSelectPoster(image) {
  22299. setAttributes({
  22300. poster: image.url
  22301. });
  22302. }
  22303. function onRemovePoster() {
  22304. setAttributes({
  22305. poster: ''
  22306. }); // Move focus back to the Media Upload button.
  22307. this.posterImageButton.current.focus();
  22308. }
  22309. const videoPosterDescription = `video-block__poster-image-description-${instanceId}`;
  22310. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  22311. group: "block"
  22312. }, Object(external_wp_element_["createElement"])(TracksEditor, {
  22313. tracks: tracks,
  22314. onChange: newTracks => {
  22315. setAttributes({
  22316. tracks: newTracks
  22317. });
  22318. }
  22319. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  22320. group: "other"
  22321. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  22322. mediaId: id,
  22323. mediaURL: src,
  22324. allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
  22325. accept: "video/*",
  22326. onSelect: onSelectVideo,
  22327. onSelectURL: onSelectURL,
  22328. onError: onUploadError
  22329. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  22330. title: Object(external_wp_i18n_["__"])('Video settings')
  22331. }, Object(external_wp_element_["createElement"])(edit_common_settings, {
  22332. setAttributes: setAttributes,
  22333. attributes: attributes
  22334. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
  22335. className: "editor-video-poster-control"
  22336. }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, Object(external_wp_i18n_["__"])('Poster image')), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], {
  22337. title: Object(external_wp_i18n_["__"])('Select poster image'),
  22338. onSelect: onSelectPoster,
  22339. allowedTypes: VIDEO_POSTER_ALLOWED_MEDIA_TYPES,
  22340. render: ({
  22341. open
  22342. }) => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  22343. isPrimary: true,
  22344. onClick: open,
  22345. ref: posterImageButton,
  22346. "aria-describedby": videoPosterDescription
  22347. }, !poster ? Object(external_wp_i18n_["__"])('Select') : Object(external_wp_i18n_["__"])('Replace'))
  22348. }), Object(external_wp_element_["createElement"])("p", {
  22349. id: videoPosterDescription,
  22350. hidden: true
  22351. }, poster ? Object(external_wp_i18n_["sprintf"])(
  22352. /* translators: %s: poster image URL. */
  22353. Object(external_wp_i18n_["__"])('The current poster image url is %s'), poster) : Object(external_wp_i18n_["__"])('There is no poster image currently selected')), !!poster && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  22354. onClick: onRemovePoster,
  22355. isTertiary: true
  22356. }, Object(external_wp_i18n_["__"])('Remove')))))), Object(external_wp_element_["createElement"])("figure", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], {
  22357. isDisabled: !isSelected
  22358. }, Object(external_wp_element_["createElement"])("video", {
  22359. controls: controls,
  22360. poster: poster,
  22361. src: src,
  22362. ref: videoPlayer
  22363. }, Object(external_wp_element_["createElement"])(Tracks, {
  22364. tracks: tracks
  22365. }))), isTemporaryVideo && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  22366. tagName: "figcaption",
  22367. "aria-label": Object(external_wp_i18n_["__"])('Video caption text'),
  22368. placeholder: Object(external_wp_i18n_["__"])('Add caption'),
  22369. value: caption,
  22370. onChange: value => setAttributes({
  22371. caption: value
  22372. }),
  22373. inlineToolbar: true,
  22374. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
  22375. })));
  22376. }
  22377. /* harmony default export */ var video_edit = (Object(external_wp_components_["withNotices"])(VideoEdit));
  22378. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/save.js
  22379. /**
  22380. * WordPress dependencies
  22381. */
  22382. /**
  22383. * Internal dependencies
  22384. */
  22385. function video_save_save({
  22386. attributes
  22387. }) {
  22388. const {
  22389. autoplay,
  22390. caption,
  22391. controls,
  22392. loop,
  22393. muted,
  22394. poster,
  22395. preload,
  22396. src,
  22397. playsInline,
  22398. tracks
  22399. } = attributes;
  22400. return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), src && Object(external_wp_element_["createElement"])("video", {
  22401. autoPlay: autoplay,
  22402. controls: controls,
  22403. loop: loop,
  22404. muted: muted,
  22405. poster: poster,
  22406. preload: preload !== 'metadata' ? preload : undefined,
  22407. src: src,
  22408. playsInline: playsInline
  22409. }, Object(external_wp_element_["createElement"])(Tracks, {
  22410. tracks: tracks
  22411. })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
  22412. tagName: "figcaption",
  22413. value: caption
  22414. }));
  22415. }
  22416. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/transforms.js
  22417. /**
  22418. * WordPress dependencies
  22419. */
  22420. const video_transforms_transforms = {
  22421. from: [{
  22422. type: 'files',
  22423. isMatch(files) {
  22424. return files.length === 1 && files[0].type.indexOf('video/') === 0;
  22425. },
  22426. transform(files) {
  22427. const file = files[0]; // We don't need to upload the media directly here
  22428. // It's already done as part of the `componentDidMount`
  22429. // in the video block
  22430. const block = Object(external_wp_blocks_["createBlock"])('core/video', {
  22431. src: Object(external_wp_blob_["createBlobURL"])(file)
  22432. });
  22433. return block;
  22434. }
  22435. }, {
  22436. type: 'shortcode',
  22437. tag: 'video',
  22438. attributes: {
  22439. src: {
  22440. type: 'string',
  22441. shortcode: ({
  22442. named: {
  22443. src,
  22444. mp4,
  22445. m4v,
  22446. webm,
  22447. ogv,
  22448. flv
  22449. }
  22450. }) => {
  22451. return src || mp4 || m4v || webm || ogv || flv;
  22452. }
  22453. },
  22454. poster: {
  22455. type: 'string',
  22456. shortcode: ({
  22457. named: {
  22458. poster
  22459. }
  22460. }) => {
  22461. return poster;
  22462. }
  22463. },
  22464. loop: {
  22465. type: 'string',
  22466. shortcode: ({
  22467. named: {
  22468. loop
  22469. }
  22470. }) => {
  22471. return loop;
  22472. }
  22473. },
  22474. autoplay: {
  22475. type: 'string',
  22476. shortcode: ({
  22477. named: {
  22478. autoplay
  22479. }
  22480. }) => {
  22481. return autoplay;
  22482. }
  22483. },
  22484. preload: {
  22485. type: 'string',
  22486. shortcode: ({
  22487. named: {
  22488. preload
  22489. }
  22490. }) => {
  22491. return preload;
  22492. }
  22493. }
  22494. }
  22495. }]
  22496. };
  22497. /* harmony default export */ var video_transforms = (video_transforms_transforms);
  22498. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/index.js
  22499. /**
  22500. * WordPress dependencies
  22501. */
  22502. /**
  22503. * Internal dependencies
  22504. */
  22505. const video_metadata = {
  22506. apiVersion: 2,
  22507. name: "core/video",
  22508. title: "Video",
  22509. category: "media",
  22510. description: "Embed a video from your media library or upload a new one.",
  22511. keywords: ["movie"],
  22512. textdomain: "default",
  22513. attributes: {
  22514. autoplay: {
  22515. type: "boolean",
  22516. source: "attribute",
  22517. selector: "video",
  22518. attribute: "autoplay"
  22519. },
  22520. caption: {
  22521. type: "string",
  22522. source: "html",
  22523. selector: "figcaption"
  22524. },
  22525. controls: {
  22526. type: "boolean",
  22527. source: "attribute",
  22528. selector: "video",
  22529. attribute: "controls",
  22530. "default": true
  22531. },
  22532. id: {
  22533. type: "number"
  22534. },
  22535. loop: {
  22536. type: "boolean",
  22537. source: "attribute",
  22538. selector: "video",
  22539. attribute: "loop"
  22540. },
  22541. muted: {
  22542. type: "boolean",
  22543. source: "attribute",
  22544. selector: "video",
  22545. attribute: "muted"
  22546. },
  22547. poster: {
  22548. type: "string",
  22549. source: "attribute",
  22550. selector: "video",
  22551. attribute: "poster"
  22552. },
  22553. preload: {
  22554. type: "string",
  22555. source: "attribute",
  22556. selector: "video",
  22557. attribute: "preload",
  22558. "default": "metadata"
  22559. },
  22560. src: {
  22561. type: "string",
  22562. source: "attribute",
  22563. selector: "video",
  22564. attribute: "src"
  22565. },
  22566. playsInline: {
  22567. type: "boolean",
  22568. source: "attribute",
  22569. selector: "video",
  22570. attribute: "playsinline"
  22571. },
  22572. tracks: {
  22573. type: "array",
  22574. items: {
  22575. type: "object"
  22576. },
  22577. "default": []
  22578. }
  22579. },
  22580. supports: {
  22581. anchor: true,
  22582. align: true
  22583. },
  22584. editorStyle: "wp-block-video-editor",
  22585. style: "wp-block-video"
  22586. };
  22587. const {
  22588. name: video_name
  22589. } = video_metadata;
  22590. const video_settings = {
  22591. icon: library_video,
  22592. example: {
  22593. attributes: {
  22594. src: 'https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm',
  22595. // translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.
  22596. caption: Object(external_wp_i18n_["__"])('Wood thrush singing in Central Park, NYC.')
  22597. }
  22598. },
  22599. transforms: video_transforms,
  22600. edit: video_edit,
  22601. save: video_save_save
  22602. };
  22603. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tag.js
  22604. /**
  22605. * WordPress dependencies
  22606. */
  22607. const tag_tag = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  22608. xmlns: "http://www.w3.org/2000/svg",
  22609. viewBox: "0 0 24 24"
  22610. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  22611. d: "M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"
  22612. }));
  22613. /* harmony default export */ var library_tag = (tag_tag);
  22614. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/tag-cloud/edit.js
  22615. /**
  22616. * External dependencies
  22617. */
  22618. /**
  22619. * WordPress dependencies
  22620. */
  22621. function TagCloudEdit({
  22622. attributes,
  22623. setAttributes,
  22624. taxonomies
  22625. }) {
  22626. const {
  22627. taxonomy,
  22628. showTagCounts
  22629. } = attributes;
  22630. const getTaxonomyOptions = () => {
  22631. const selectOption = {
  22632. label: Object(external_wp_i18n_["__"])('- Select -'),
  22633. value: '',
  22634. disabled: true
  22635. };
  22636. const taxonomyOptions = Object(external_lodash_["map"])(Object(external_lodash_["filter"])(taxonomies, 'show_cloud'), item => {
  22637. return {
  22638. value: item.slug,
  22639. label: item.name
  22640. };
  22641. });
  22642. return [selectOption, ...taxonomyOptions];
  22643. };
  22644. const inspectorControls = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  22645. title: Object(external_wp_i18n_["__"])('Tag Cloud settings')
  22646. }, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  22647. label: Object(external_wp_i18n_["__"])('Taxonomy'),
  22648. options: getTaxonomyOptions(),
  22649. value: taxonomy,
  22650. onChange: selectedTaxonomy => setAttributes({
  22651. taxonomy: selectedTaxonomy
  22652. })
  22653. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  22654. label: Object(external_wp_i18n_["__"])('Show post counts'),
  22655. checked: showTagCounts,
  22656. onChange: () => setAttributes({
  22657. showTagCounts: !showTagCounts
  22658. })
  22659. })));
  22660. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, inspectorControls, Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
  22661. key: "tag-cloud",
  22662. block: "core/tag-cloud",
  22663. attributes: attributes
  22664. })));
  22665. }
  22666. /* harmony default export */ var tag_cloud_edit = (Object(external_wp_data_["withSelect"])(select => {
  22667. return {
  22668. taxonomies: select(external_wp_coreData_["store"]).getTaxonomies({
  22669. per_page: -1
  22670. })
  22671. };
  22672. })(TagCloudEdit));
  22673. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
  22674. /**
  22675. * WordPress dependencies
  22676. */
  22677. /**
  22678. * Internal dependencies
  22679. */
  22680. const tag_cloud_metadata = {
  22681. apiVersion: 2,
  22682. name: "core/tag-cloud",
  22683. title: "Tag Cloud",
  22684. category: "widgets",
  22685. description: "A cloud of your most used tags.",
  22686. textdomain: "default",
  22687. attributes: {
  22688. taxonomy: {
  22689. type: "string",
  22690. "default": "post_tag"
  22691. },
  22692. showTagCounts: {
  22693. type: "boolean",
  22694. "default": false
  22695. }
  22696. },
  22697. supports: {
  22698. html: false,
  22699. align: true
  22700. },
  22701. editorStyle: "wp-block-tag-cloud-editor"
  22702. };
  22703. const {
  22704. name: tag_cloud_name
  22705. } = tag_cloud_metadata;
  22706. const tag_cloud_settings = {
  22707. icon: library_tag,
  22708. example: {},
  22709. edit: tag_cloud_edit
  22710. };
  22711. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/classic.js
  22712. /**
  22713. * WordPress dependencies
  22714. */
  22715. const classic = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  22716. viewBox: "0 0 24 24",
  22717. xmlns: "http://www.w3.org/2000/svg"
  22718. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  22719. d: "M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"
  22720. }));
  22721. /* harmony default export */ var library_classic = (classic);
  22722. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js
  22723. /**
  22724. * WordPress dependencies
  22725. */
  22726. const ConvertToBlocksButton = ({
  22727. clientId
  22728. }) => {
  22729. const {
  22730. replaceBlocks
  22731. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  22732. const block = Object(external_wp_data_["useSelect"])(select => {
  22733. return select(external_wp_blockEditor_["store"]).getBlock(clientId);
  22734. }, [clientId]);
  22735. return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  22736. onClick: () => replaceBlocks(block.clientId, Object(external_wp_blocks_["rawHandler"])({
  22737. HTML: Object(external_wp_blocks_["serialize"])(block)
  22738. }))
  22739. }, Object(external_wp_i18n_["__"])('Convert to blocks'));
  22740. };
  22741. /* harmony default export */ var convert_to_blocks_button = (ConvertToBlocksButton);
  22742. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/edit.js
  22743. /**
  22744. * External dependencies
  22745. */
  22746. /**
  22747. * WordPress dependencies
  22748. */
  22749. /**
  22750. * Internal dependencies
  22751. */
  22752. const {
  22753. wp: edit_wp
  22754. } = window;
  22755. function isTmceEmpty(editor) {
  22756. // When tinyMce is empty the content seems to be:
  22757. // <p><br data-mce-bogus="1"></p>
  22758. // avoid expensive checks for large documents
  22759. const body = editor.getBody();
  22760. if (body.childNodes.length > 1) {
  22761. return false;
  22762. } else if (body.childNodes.length === 0) {
  22763. return true;
  22764. }
  22765. if (body.childNodes[0].childNodes.length > 1) {
  22766. return false;
  22767. }
  22768. return /^\n?$/.test(body.innerText || body.textContent);
  22769. }
  22770. function ClassicEdit({
  22771. clientId,
  22772. attributes: {
  22773. content
  22774. },
  22775. setAttributes,
  22776. onReplace
  22777. }) {
  22778. const didMount = Object(external_wp_element_["useRef"])(false);
  22779. Object(external_wp_element_["useEffect"])(() => {
  22780. if (!didMount.current) {
  22781. return;
  22782. }
  22783. const editor = window.tinymce.get(`editor-${clientId}`);
  22784. const currentContent = editor === null || editor === void 0 ? void 0 : editor.getContent();
  22785. if (currentContent !== content) {
  22786. editor.setContent(content || '');
  22787. }
  22788. }, [content]);
  22789. Object(external_wp_element_["useEffect"])(() => {
  22790. const {
  22791. baseURL,
  22792. suffix
  22793. } = window.wpEditorL10n.tinymce;
  22794. didMount.current = true;
  22795. window.tinymce.EditorManager.overrideDefaults({
  22796. base_url: baseURL,
  22797. suffix
  22798. });
  22799. function onSetup(editor) {
  22800. let bookmark;
  22801. if (content) {
  22802. editor.on('loadContent', () => editor.setContent(content));
  22803. }
  22804. editor.on('blur', () => {
  22805. bookmark = editor.selection.getBookmark(2, true); // There is an issue with Chrome and the editor.focus call in core at https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/lib/link.js#L451.
  22806. // This causes a scroll to the top of editor content on return from some content updating dialogs so tracking
  22807. // scroll position until this is fixed in core.
  22808. const scrollContainer = document.querySelector('.interface-interface-skeleton__content');
  22809. const scrollPosition = scrollContainer.scrollTop;
  22810. setAttributes({
  22811. content: editor.getContent()
  22812. });
  22813. editor.once('focus', () => {
  22814. if (bookmark) {
  22815. editor.selection.moveToBookmark(bookmark);
  22816. if (scrollContainer.scrollTop !== scrollPosition) {
  22817. scrollContainer.scrollTop = scrollPosition;
  22818. }
  22819. }
  22820. });
  22821. return false;
  22822. });
  22823. editor.on('mousedown touchstart', () => {
  22824. bookmark = null;
  22825. });
  22826. const debouncedOnChange = Object(external_lodash_["debounce"])(() => {
  22827. const value = editor.getContent();
  22828. if (value !== editor._lastChange) {
  22829. editor._lastChange = value;
  22830. setAttributes({
  22831. content: value
  22832. });
  22833. }
  22834. }, 250);
  22835. editor.on('Paste Change input Undo Redo', debouncedOnChange); // We need to cancel the debounce call because when we remove
  22836. // the editor (onUnmount) this callback is executed in
  22837. // another tick. This results in setting the content to empty.
  22838. editor.on('remove', debouncedOnChange.cancel);
  22839. editor.on('keydown', event => {
  22840. if (external_wp_keycodes_["isKeyboardEvent"].primary(event, 'z')) {
  22841. // Prevent the gutenberg undo kicking in so TinyMCE undo stack works as expected
  22842. event.stopPropagation();
  22843. }
  22844. if ((event.keyCode === external_wp_keycodes_["BACKSPACE"] || event.keyCode === external_wp_keycodes_["DELETE"]) && isTmceEmpty(editor)) {
  22845. // delete the block
  22846. onReplace([]);
  22847. event.preventDefault();
  22848. event.stopImmediatePropagation();
  22849. }
  22850. const {
  22851. altKey
  22852. } = event;
  22853. /*
  22854. * Prevent Mousetrap from kicking in: TinyMCE already uses its own
  22855. * `alt+f10` shortcut to focus its toolbar.
  22856. */
  22857. if (altKey && event.keyCode === external_wp_keycodes_["F10"]) {
  22858. event.stopPropagation();
  22859. }
  22860. });
  22861. editor.on('init', () => {
  22862. const rootNode = editor.getBody(); // Create the toolbar by refocussing the editor.
  22863. if (rootNode.ownerDocument.activeElement === rootNode) {
  22864. rootNode.blur();
  22865. editor.focus();
  22866. }
  22867. });
  22868. }
  22869. function initialize() {
  22870. const {
  22871. settings
  22872. } = window.wpEditorL10n.tinymce;
  22873. edit_wp.oldEditor.initialize(`editor-${clientId}`, {
  22874. tinymce: { ...settings,
  22875. inline: true,
  22876. content_css: false,
  22877. fixed_toolbar_container: `#toolbar-${clientId}`,
  22878. setup: onSetup
  22879. }
  22880. });
  22881. }
  22882. function onReadyStateChange() {
  22883. if (document.readyState === 'complete') {
  22884. initialize();
  22885. }
  22886. }
  22887. if (document.readyState === 'complete') {
  22888. initialize();
  22889. } else {
  22890. document.addEventListener('readystatechange', onReadyStateChange);
  22891. }
  22892. return () => {
  22893. document.removeEventListener('readystatechange', onReadyStateChange);
  22894. edit_wp.oldEditor.remove(`editor-${clientId}`);
  22895. };
  22896. }, []);
  22897. function focus() {
  22898. const editor = window.tinymce.get(`editor-${clientId}`);
  22899. if (editor) {
  22900. editor.focus();
  22901. }
  22902. }
  22903. function onToolbarKeyDown(event) {
  22904. // Prevent WritingFlow from kicking in and allow arrows navigation on the toolbar.
  22905. event.stopPropagation(); // Prevent Mousetrap from moving focus to the top toolbar when pressing `alt+f10` on this block toolbar.
  22906. event.nativeEvent.stopImmediatePropagation();
  22907. } // Disable reasons:
  22908. //
  22909. // jsx-a11y/no-static-element-interactions
  22910. // - the toolbar itself is non-interactive, but must capture events
  22911. // from the KeyboardShortcuts component to stop their propagation.
  22912. /* eslint-disable jsx-a11y/no-static-element-interactions */
  22913. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(convert_to_blocks_button, {
  22914. clientId: clientId
  22915. }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])("div", {
  22916. key: "toolbar",
  22917. id: `toolbar-${clientId}`,
  22918. className: "block-library-classic__toolbar",
  22919. onClick: focus,
  22920. "data-placeholder": Object(external_wp_i18n_["__"])('Classic'),
  22921. onKeyDown: onToolbarKeyDown
  22922. }), Object(external_wp_element_["createElement"])("div", {
  22923. key: "editor",
  22924. id: `editor-${clientId}`,
  22925. className: "wp-block-freeform block-library-rich-text__tinymce"
  22926. })));
  22927. /* eslint-enable jsx-a11y/no-static-element-interactions */
  22928. }
  22929. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/save.js
  22930. /**
  22931. * WordPress dependencies
  22932. */
  22933. function freeform_save_save({
  22934. attributes
  22935. }) {
  22936. const {
  22937. content
  22938. } = attributes;
  22939. return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, content);
  22940. }
  22941. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/index.js
  22942. /**
  22943. * WordPress dependencies
  22944. */
  22945. /**
  22946. * Internal dependencies
  22947. */
  22948. const freeform_metadata = {
  22949. apiVersion: 2,
  22950. name: "core/freeform",
  22951. title: "Classic",
  22952. category: "text",
  22953. description: "Use the classic WordPress editor.",
  22954. textdomain: "default",
  22955. attributes: {
  22956. content: {
  22957. type: "string",
  22958. source: "html"
  22959. }
  22960. },
  22961. supports: {
  22962. className: false,
  22963. customClassName: false,
  22964. reusable: false
  22965. },
  22966. editorStyle: "wp-block-freeform-editor"
  22967. };
  22968. const {
  22969. name: freeform_name
  22970. } = freeform_metadata;
  22971. const freeform_settings = {
  22972. icon: library_classic,
  22973. edit: ClassicEdit,
  22974. save: freeform_save_save
  22975. };
  22976. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/share.js
  22977. /**
  22978. * WordPress dependencies
  22979. */
  22980. const share = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  22981. viewBox: "0 0 24 24",
  22982. xmlns: "http://www.w3.org/2000/svg"
  22983. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  22984. d: "M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"
  22985. }));
  22986. /* harmony default export */ var library_share = (share);
  22987. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/deprecated.js
  22988. /**
  22989. * External dependencies
  22990. */
  22991. /**
  22992. * WordPress dependencies
  22993. */
  22994. // Social Links block deprecations.
  22995. const social_links_deprecated_deprecated = [// V1. Remove CSS variable use for colors.
  22996. {
  22997. attributes: {
  22998. iconColor: {
  22999. type: 'string'
  23000. },
  23001. customIconColor: {
  23002. type: 'string'
  23003. },
  23004. iconColorValue: {
  23005. type: 'string'
  23006. },
  23007. iconBackgroundColor: {
  23008. type: 'string'
  23009. },
  23010. customIconBackgroundColor: {
  23011. type: 'string'
  23012. },
  23013. iconBackgroundColorValue: {
  23014. type: 'string'
  23015. },
  23016. openInNewTab: {
  23017. type: 'boolean',
  23018. default: false
  23019. },
  23020. size: {
  23021. type: 'string'
  23022. }
  23023. },
  23024. providesContext: {
  23025. openInNewTab: 'openInNewTab'
  23026. },
  23027. supports: {
  23028. align: ['left', 'center', 'right'],
  23029. anchor: true
  23030. },
  23031. save: props => {
  23032. const {
  23033. attributes: {
  23034. iconBackgroundColorValue,
  23035. iconColorValue,
  23036. itemsJustification,
  23037. size
  23038. }
  23039. } = props;
  23040. const className = classnames_default()(size, {
  23041. 'has-icon-color': iconColorValue,
  23042. 'has-icon-background-color': iconBackgroundColorValue,
  23043. [`items-justified-${itemsJustification}`]: itemsJustification
  23044. });
  23045. const style = {
  23046. '--wp--social-links--icon-color': iconColorValue,
  23047. '--wp--social-links--icon-background-color': iconBackgroundColorValue
  23048. };
  23049. return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({
  23050. className,
  23051. style
  23052. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  23053. }
  23054. }];
  23055. /* harmony default export */ var social_links_deprecated = (social_links_deprecated_deprecated);
  23056. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/edit.js
  23057. /**
  23058. * External dependencies
  23059. */
  23060. /**
  23061. * WordPress dependencies
  23062. */
  23063. const social_links_edit_ALLOWED_BLOCKS = ['core/social-link'];
  23064. const sizeOptions = [{
  23065. name: Object(external_wp_i18n_["__"])('Small'),
  23066. value: 'has-small-icon-size'
  23067. }, {
  23068. name: Object(external_wp_i18n_["__"])('Normal'),
  23069. value: 'has-normal-icon-size'
  23070. }, {
  23071. name: Object(external_wp_i18n_["__"])('Large'),
  23072. value: 'has-large-icon-size'
  23073. }, {
  23074. name: Object(external_wp_i18n_["__"])('Huge'),
  23075. value: 'has-huge-icon-size'
  23076. }];
  23077. function SocialLinksEdit(props) {
  23078. var _attributes$className;
  23079. const {
  23080. attributes,
  23081. iconBackgroundColor,
  23082. iconColor,
  23083. isSelected,
  23084. setAttributes,
  23085. setIconBackgroundColor,
  23086. setIconColor
  23087. } = props;
  23088. const {
  23089. iconBackgroundColorValue,
  23090. iconColorValue,
  23091. itemsJustification,
  23092. openInNewTab,
  23093. size
  23094. } = attributes; // Remove icon background color if logos only style selected.
  23095. const logosOnly = ((_attributes$className = attributes.className) === null || _attributes$className === void 0 ? void 0 : _attributes$className.indexOf('is-style-logos-only')) >= 0;
  23096. Object(external_wp_element_["useEffect"])(() => {
  23097. if (logosOnly) {
  23098. setAttributes({
  23099. iconBackgroundColor: undefined,
  23100. customIconBackgroundColor: undefined,
  23101. iconBackgroundColorValue: undefined
  23102. });
  23103. }
  23104. }, [logosOnly, setAttributes]);
  23105. const SocialPlaceholder = Object(external_wp_element_["createElement"])("li", {
  23106. className: "wp-block-social-links__social-placeholder"
  23107. }, Object(external_wp_element_["createElement"])("div", {
  23108. className: "wp-social-link"
  23109. }), Object(external_wp_element_["createElement"])("div", {
  23110. className: "wp-block-social-links__social-placeholder-icons"
  23111. }, Object(external_wp_element_["createElement"])("div", {
  23112. className: "wp-social-link wp-social-link-twitter"
  23113. }), Object(external_wp_element_["createElement"])("div", {
  23114. className: "wp-social-link wp-social-link-facebook"
  23115. }), Object(external_wp_element_["createElement"])("div", {
  23116. className: "wp-social-link wp-social-link-instagram"
  23117. })));
  23118. const SelectedSocialPlaceholder = Object(external_wp_element_["createElement"])("li", {
  23119. className: "wp-block-social-links__social-prompt"
  23120. }, Object(external_wp_i18n_["__"])('Click plus to add')); // Fallback color values are used maintain selections in case switching
  23121. // themes and named colors in palette do not match.
  23122. const className = classnames_default()(size, {
  23123. 'has-icon-color': iconColor.color || iconColorValue,
  23124. 'has-icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue,
  23125. [`items-justified-${itemsJustification}`]: itemsJustification
  23126. });
  23127. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  23128. className
  23129. });
  23130. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
  23131. allowedBlocks: social_links_edit_ALLOWED_BLOCKS,
  23132. orientation: 'horizontal',
  23133. placeholder: isSelected ? SelectedSocialPlaceholder : SocialPlaceholder,
  23134. templateLock: false,
  23135. __experimentalAppenderTagName: 'li'
  23136. });
  23137. const POPOVER_PROPS = {
  23138. position: 'bottom right',
  23139. isAlternate: true
  23140. };
  23141. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  23142. group: "block"
  23143. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["JustifyContentControl"], {
  23144. allowedControls: ['left', 'center', 'right', 'space-between'],
  23145. value: itemsJustification,
  23146. onChange: value => setAttributes({
  23147. itemsJustification: value
  23148. }),
  23149. popoverProps: {
  23150. position: 'bottom right',
  23151. isAlternate: true
  23152. }
  23153. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  23154. group: "other"
  23155. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarDropdownMenu"], {
  23156. label: Object(external_wp_i18n_["__"])('Size'),
  23157. text: Object(external_wp_i18n_["__"])('Size'),
  23158. icon: null,
  23159. popoverProps: POPOVER_PROPS
  23160. }, ({
  23161. onClose
  23162. }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, sizeOptions.map(entry => {
  23163. return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
  23164. icon: (size === entry.value || !size && entry.value === 'has-normal-icon-size') && check["a" /* default */],
  23165. isSelected: size === entry.value,
  23166. key: entry.value,
  23167. onClick: () => {
  23168. setAttributes({
  23169. size: entry.value
  23170. });
  23171. },
  23172. onClose: onClose,
  23173. role: "menuitemradio"
  23174. }, entry.name);
  23175. })))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  23176. title: Object(external_wp_i18n_["__"])('Link settings')
  23177. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  23178. label: Object(external_wp_i18n_["__"])('Open links in new tab'),
  23179. checked: openInNewTab,
  23180. onChange: () => setAttributes({
  23181. openInNewTab: !openInNewTab
  23182. })
  23183. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PanelColorSettings"], {
  23184. title: Object(external_wp_i18n_["__"])('Color'),
  23185. colorSettings: [{
  23186. // Use custom attribute as fallback to prevent loss of named color selection when
  23187. // switching themes to a new theme that does not have a matching named color.
  23188. value: iconColor.color || iconColorValue,
  23189. onChange: colorValue => {
  23190. setIconColor(colorValue);
  23191. setAttributes({
  23192. iconColorValue: colorValue
  23193. });
  23194. },
  23195. label: Object(external_wp_i18n_["__"])('Icon color')
  23196. }, !logosOnly && {
  23197. // Use custom attribute as fallback to prevent loss of named color selection when
  23198. // switching themes to a new theme that does not have a matching named color.
  23199. value: iconBackgroundColor.color || iconBackgroundColorValue,
  23200. onChange: colorValue => {
  23201. setIconBackgroundColor(colorValue);
  23202. setAttributes({
  23203. iconBackgroundColorValue: colorValue
  23204. });
  23205. },
  23206. label: Object(external_wp_i18n_["__"])('Icon background color')
  23207. }]
  23208. }), !logosOnly && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ContrastChecker"], {
  23209. textColor: iconColorValue,
  23210. backgroundColor: iconBackgroundColorValue,
  23211. isLargeText: false
  23212. })), Object(external_wp_element_["createElement"])("ul", innerBlocksProps));
  23213. }
  23214. const iconColorAttributes = {
  23215. iconColor: 'icon-color',
  23216. iconBackgroundColor: 'icon-background-color'
  23217. };
  23218. /* harmony default export */ var social_links_edit = (Object(external_wp_blockEditor_["withColors"])(iconColorAttributes)(SocialLinksEdit));
  23219. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/save.js
  23220. /**
  23221. * External dependencies
  23222. */
  23223. /**
  23224. * WordPress dependencies
  23225. */
  23226. function social_links_save_save(props) {
  23227. const {
  23228. attributes: {
  23229. iconBackgroundColorValue,
  23230. iconColorValue,
  23231. itemsJustification,
  23232. size
  23233. }
  23234. } = props;
  23235. const className = classnames_default()(size, {
  23236. 'has-icon-color': iconColorValue,
  23237. 'has-icon-background-color': iconBackgroundColorValue,
  23238. [`items-justified-${itemsJustification}`]: itemsJustification
  23239. });
  23240. return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({
  23241. className
  23242. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  23243. }
  23244. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
  23245. /**
  23246. * WordPress dependencies
  23247. */
  23248. /**
  23249. * Internal dependencies
  23250. */
  23251. const social_links_metadata = {
  23252. apiVersion: 2,
  23253. name: "core/social-links",
  23254. title: "Social Icons",
  23255. category: "widgets",
  23256. description: "Display icons linking to your social media profiles or websites.",
  23257. keywords: ["links"],
  23258. textdomain: "default",
  23259. attributes: {
  23260. iconColor: {
  23261. type: "string"
  23262. },
  23263. customIconColor: {
  23264. type: "string"
  23265. },
  23266. iconColorValue: {
  23267. type: "string"
  23268. },
  23269. iconBackgroundColor: {
  23270. type: "string"
  23271. },
  23272. customIconBackgroundColor: {
  23273. type: "string"
  23274. },
  23275. iconBackgroundColorValue: {
  23276. type: "string"
  23277. },
  23278. openInNewTab: {
  23279. type: "boolean",
  23280. "default": false
  23281. },
  23282. size: {
  23283. type: "string"
  23284. }
  23285. },
  23286. providesContext: {
  23287. openInNewTab: "openInNewTab",
  23288. iconColorValue: "iconColorValue",
  23289. iconBackgroundColorValue: "iconBackgroundColorValue"
  23290. },
  23291. supports: {
  23292. align: ["left", "center", "right"],
  23293. anchor: true
  23294. },
  23295. styles: [{
  23296. name: "default",
  23297. label: "Default",
  23298. isDefault: true
  23299. }, {
  23300. name: "logos-only",
  23301. label: "Logos Only"
  23302. }, {
  23303. name: "pill-shape",
  23304. label: "Pill Shape"
  23305. }],
  23306. editorStyle: "wp-block-social-links-editor",
  23307. style: "wp-block-social-links"
  23308. };
  23309. const {
  23310. name: social_links_name
  23311. } = social_links_metadata;
  23312. const social_links_settings = {
  23313. example: {
  23314. innerBlocks: [{
  23315. name: 'core/social-link',
  23316. attributes: {
  23317. service: 'wordpress',
  23318. url: 'https://wordpress.org'
  23319. }
  23320. }, {
  23321. name: 'core/social-link',
  23322. attributes: {
  23323. service: 'facebook',
  23324. url: 'https://www.facebook.com/WordPress/'
  23325. }
  23326. }, {
  23327. name: 'core/social-link',
  23328. attributes: {
  23329. service: 'twitter',
  23330. url: 'https://twitter.com/WordPress'
  23331. }
  23332. }]
  23333. },
  23334. icon: library_share,
  23335. edit: social_links_edit,
  23336. save: social_links_save_save,
  23337. deprecated: social_links_deprecated
  23338. };
  23339. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
  23340. var keyboard_return = __webpack_require__("btIw");
  23341. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/wordpress.js
  23342. /**
  23343. * WordPress dependencies
  23344. */
  23345. const WordPressIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23346. width: "24",
  23347. height: "24",
  23348. viewBox: "0 0 24 24",
  23349. version: "1.1",
  23350. xmlns: "http://www.w3.org/2000/svg"
  23351. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23352. d: "M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"
  23353. }));
  23354. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/fivehundredpx.js
  23355. /**
  23356. * WordPress dependencies
  23357. */
  23358. const FivehundredpxIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23359. width: "24",
  23360. height: "24",
  23361. viewBox: "0 0 24 24",
  23362. version: "1.1"
  23363. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23364. d: "M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"
  23365. }));
  23366. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/amazon.js
  23367. /**
  23368. * WordPress dependencies
  23369. */
  23370. const AmazonIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23371. width: "24",
  23372. height: "24",
  23373. viewBox: "0 0 24 24",
  23374. version: "1.1"
  23375. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23376. d: "M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"
  23377. }));
  23378. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/bandcamp.js
  23379. /**
  23380. * WordPress dependencies
  23381. */
  23382. const BandcampIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23383. width: "24",
  23384. height: "24",
  23385. viewBox: "0 0 24 24",
  23386. version: "1.1"
  23387. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23388. d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"
  23389. }));
  23390. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/behance.js
  23391. /**
  23392. * WordPress dependencies
  23393. */
  23394. const BehanceIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23395. width: "24",
  23396. height: "24",
  23397. viewBox: "0 0 24 24",
  23398. version: "1.1"
  23399. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23400. d: "M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"
  23401. }));
  23402. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/chain.js
  23403. /**
  23404. * WordPress dependencies
  23405. */
  23406. const ChainIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23407. width: "24",
  23408. height: "24",
  23409. viewBox: "0 0 24 24",
  23410. version: "1.1"
  23411. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23412. d: "M19.647,16.706a1.134,1.134,0,0,0-.343-.833l-2.549-2.549a1.134,1.134,0,0,0-.833-.343,1.168,1.168,0,0,0-.883.392l.233.226q.2.189.264.264a2.922,2.922,0,0,1,.184.233.986.986,0,0,1,.159.312,1.242,1.242,0,0,1,.043.337,1.172,1.172,0,0,1-1.176,1.176,1.237,1.237,0,0,1-.337-.043,1,1,0,0,1-.312-.159,2.76,2.76,0,0,1-.233-.184q-.073-.068-.264-.264l-.226-.233a1.19,1.19,0,0,0-.4.895,1.134,1.134,0,0,0,.343.833L15.837,19.3a1.13,1.13,0,0,0,.833.331,1.18,1.18,0,0,0,.833-.318l1.8-1.789a1.12,1.12,0,0,0,.343-.821Zm-8.615-8.64a1.134,1.134,0,0,0-.343-.833L8.163,4.7a1.134,1.134,0,0,0-.833-.343,1.184,1.184,0,0,0-.833.331L4.7,6.473a1.12,1.12,0,0,0-.343.821,1.134,1.134,0,0,0,.343.833l2.549,2.549a1.13,1.13,0,0,0,.833.331,1.184,1.184,0,0,0,.883-.38L8.728,10.4q-.2-.189-.264-.264A2.922,2.922,0,0,1,8.28,9.9a.986.986,0,0,1-.159-.312,1.242,1.242,0,0,1-.043-.337A1.172,1.172,0,0,1,9.254,8.079a1.237,1.237,0,0,1,.337.043,1,1,0,0,1,.312.159,2.761,2.761,0,0,1,.233.184q.073.068.264.264l.226.233a1.19,1.19,0,0,0,.4-.895ZM22,16.706a3.343,3.343,0,0,1-1.042,2.488l-1.8,1.789a3.536,3.536,0,0,1-4.988-.025l-2.525-2.537a3.384,3.384,0,0,1-1.017-2.488,3.448,3.448,0,0,1,1.078-2.561l-1.078-1.078a3.434,3.434,0,0,1-2.549,1.078,3.4,3.4,0,0,1-2.5-1.029L3.029,9.794A3.4,3.4,0,0,1,2,7.294,3.343,3.343,0,0,1,3.042,4.806l1.8-1.789A3.384,3.384,0,0,1,7.331,2a3.357,3.357,0,0,1,2.5,1.042l2.525,2.537a3.384,3.384,0,0,1,1.017,2.488,3.448,3.448,0,0,1-1.078,2.561l1.078,1.078a3.551,3.551,0,0,1,5.049-.049l2.549,2.549A3.4,3.4,0,0,1,22,16.706Z"
  23413. }));
  23414. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/codepen.js
  23415. /**
  23416. * WordPress dependencies
  23417. */
  23418. const CodepenIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23419. width: "24",
  23420. height: "24",
  23421. viewBox: "0 0 24 24",
  23422. version: "1.1"
  23423. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23424. d: "M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"
  23425. }));
  23426. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/deviantart.js
  23427. /**
  23428. * WordPress dependencies
  23429. */
  23430. const DeviantArtIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23431. width: "24",
  23432. height: "24",
  23433. viewBox: "0 0 24 24",
  23434. version: "1.1"
  23435. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23436. d: "M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"
  23437. }));
  23438. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/dribbble.js
  23439. /**
  23440. * WordPress dependencies
  23441. */
  23442. const DribbbleIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23443. width: "24",
  23444. height: "24",
  23445. viewBox: "0 0 24 24",
  23446. version: "1.1"
  23447. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23448. d: "M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"
  23449. }));
  23450. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/dropbox.js
  23451. /**
  23452. * WordPress dependencies
  23453. */
  23454. const DropboxIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23455. width: "24",
  23456. height: "24",
  23457. viewBox: "0 0 24 24",
  23458. version: "1.1"
  23459. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23460. d: "M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"
  23461. }));
  23462. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/etsy.js
  23463. /**
  23464. * WordPress dependencies
  23465. */
  23466. const EtsyIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23467. width: "24",
  23468. height: "24",
  23469. viewBox: "0 0 24 24",
  23470. version: "1.1"
  23471. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23472. d: "M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"
  23473. }));
  23474. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/facebook.js
  23475. /**
  23476. * WordPress dependencies
  23477. */
  23478. const FacebookIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23479. width: "24",
  23480. height: "24",
  23481. viewBox: "0 0 24 24",
  23482. version: "1.1"
  23483. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23484. d: "M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"
  23485. }));
  23486. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/feed.js
  23487. /**
  23488. * WordPress dependencies
  23489. */
  23490. const FeedIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23491. width: "24",
  23492. height: "24",
  23493. viewBox: "0 0 24 24",
  23494. version: "1.1"
  23495. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23496. d: "M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"
  23497. }));
  23498. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/flickr.js
  23499. /**
  23500. * WordPress dependencies
  23501. */
  23502. const FlickrIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23503. width: "24",
  23504. height: "24",
  23505. viewBox: "0 0 24 24",
  23506. version: "1.1"
  23507. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23508. d: "M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"
  23509. }));
  23510. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/foursquare.js
  23511. /**
  23512. * WordPress dependencies
  23513. */
  23514. const FoursquareIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23515. width: "24",
  23516. height: "24",
  23517. viewBox: "0 0 24 24",
  23518. version: "1.1"
  23519. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23520. d: "M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"
  23521. }));
  23522. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/goodreads.js
  23523. /**
  23524. * WordPress dependencies
  23525. */
  23526. const GoodreadsIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23527. width: "24",
  23528. height: "24",
  23529. viewBox: "0 0 24 24",
  23530. version: "1.1"
  23531. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23532. d: "M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"
  23533. }));
  23534. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/google.js
  23535. /**
  23536. * WordPress dependencies
  23537. */
  23538. const GoogleIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23539. width: "24",
  23540. height: "24",
  23541. viewBox: "0 0 24 24",
  23542. version: "1.1"
  23543. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23544. d: "M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"
  23545. }));
  23546. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/github.js
  23547. /**
  23548. * WordPress dependencies
  23549. */
  23550. const GitHubIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23551. width: "24",
  23552. height: "24",
  23553. viewBox: "0 0 24 24",
  23554. version: "1.1"
  23555. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23556. d: "M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"
  23557. }));
  23558. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/instagram.js
  23559. /**
  23560. * WordPress dependencies
  23561. */
  23562. const InstagramIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23563. width: "24",
  23564. height: "24",
  23565. viewBox: "0 0 24 24",
  23566. version: "1.1"
  23567. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23568. d: "M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"
  23569. }));
  23570. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/lastfm.js
  23571. /**
  23572. * WordPress dependencies
  23573. */
  23574. const LastfmIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23575. width: "24",
  23576. height: "24",
  23577. viewBox: "0 0 24 24",
  23578. version: "1.1"
  23579. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23580. d: "M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"
  23581. }));
  23582. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/linkedin.js
  23583. /**
  23584. * WordPress dependencies
  23585. */
  23586. const LinkedInIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23587. width: "24",
  23588. height: "24",
  23589. viewBox: "0 0 24 24",
  23590. version: "1.1"
  23591. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23592. d: "M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"
  23593. }));
  23594. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/mail.js
  23595. /**
  23596. * WordPress dependencies
  23597. */
  23598. const MailIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23599. width: "24",
  23600. height: "24",
  23601. viewBox: "0 0 24 24",
  23602. version: "1.1"
  23603. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23604. d: "M20,4H4C2.895,4,2,4.895,2,6v12c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2V6C22,4.895,21.105,4,20,4z M20,8.236l-8,4.882 L4,8.236V6h16V8.236z"
  23605. }));
  23606. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/mastodon.js
  23607. /**
  23608. * WordPress dependencies
  23609. */
  23610. const MastodonIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23611. width: "24",
  23612. height: "24",
  23613. viewBox: "0 0 24 24",
  23614. version: "1.1"
  23615. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23616. d: "M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"
  23617. }));
  23618. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/meetup.js
  23619. /**
  23620. * WordPress dependencies
  23621. */
  23622. const MeetupIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23623. width: "24",
  23624. height: "24",
  23625. viewBox: "0 0 24 24",
  23626. version: "1.1"
  23627. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23628. d: "M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"
  23629. }));
  23630. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/medium.js
  23631. /**
  23632. * WordPress dependencies
  23633. */
  23634. const MediumIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23635. width: "24",
  23636. height: "24",
  23637. viewBox: "0 0 24 24",
  23638. version: "1.1"
  23639. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23640. d: "M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"
  23641. }));
  23642. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/patreon.js
  23643. /**
  23644. * WordPress dependencies
  23645. */
  23646. const PatreonIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23647. width: "24",
  23648. height: "24",
  23649. viewBox: "0 0 569 546",
  23650. version: "1.1"
  23651. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Circle"], {
  23652. cx: "363",
  23653. cy: "205",
  23654. r: "205"
  23655. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  23656. width: "100",
  23657. height: "546",
  23658. x: "0",
  23659. y: "0"
  23660. }));
  23661. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/pinterest.js
  23662. /**
  23663. * WordPress dependencies
  23664. */
  23665. const PinterestIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23666. width: "24",
  23667. height: "24",
  23668. viewBox: "0 0 24 24",
  23669. version: "1.1"
  23670. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23671. d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"
  23672. }));
  23673. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/pocket.js
  23674. /**
  23675. * WordPress dependencies
  23676. */
  23677. const PocketIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23678. width: "24",
  23679. height: "24",
  23680. viewBox: "0 0 24 24",
  23681. version: "1.1"
  23682. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23683. d: "M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"
  23684. }));
  23685. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/reddit.js
  23686. /**
  23687. * WordPress dependencies
  23688. */
  23689. const RedditIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23690. width: "24",
  23691. height: "24",
  23692. viewBox: "0 0 24 24",
  23693. version: "1.1"
  23694. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23695. d: "M22,11.816c0-1.256-1.021-2.277-2.277-2.277c-0.593,0-1.122,0.24-1.526,0.614c-1.481-0.965-3.455-1.594-5.647-1.69 l1.171-3.702l3.18,0.748c0.008,1.028,0.846,1.862,1.876,1.862c1.035,0,1.877-0.842,1.877-1.878c0-1.035-0.842-1.877-1.877-1.877 c-0.769,0-1.431,0.466-1.72,1.13l-3.508-0.826c-0.203-0.047-0.399,0.067-0.46,0.261l-1.35,4.268 c-2.316,0.038-4.411,0.67-5.97,1.671C5.368,9.765,4.853,9.539,4.277,9.539C3.021,9.539,2,10.56,2,11.816 c0,0.814,0.433,1.523,1.078,1.925c-0.037,0.221-0.061,0.444-0.061,0.672c0,3.292,4.011,5.97,8.941,5.97s8.941-2.678,8.941-5.97 c0-0.214-0.02-0.424-0.053-0.632C21.533,13.39,22,12.661,22,11.816z M18.776,4.394c0.606,0,1.1,0.493,1.1,1.1s-0.493,1.1-1.1,1.1 s-1.1-0.494-1.1-1.1S18.169,4.394,18.776,4.394z M2.777,11.816c0-0.827,0.672-1.5,1.499-1.5c0.313,0,0.598,0.103,0.838,0.269 c-0.851,0.676-1.477,1.479-1.812,2.36C2.983,12.672,2.777,12.27,2.777,11.816z M11.959,19.606c-4.501,0-8.164-2.329-8.164-5.193 S7.457,9.22,11.959,9.22s8.164,2.329,8.164,5.193S16.46,19.606,11.959,19.606z M20.636,13.001c-0.326-0.89-0.948-1.701-1.797-2.384 c0.248-0.186,0.55-0.301,0.883-0.301c0.827,0,1.5,0.673,1.5,1.5C21.223,12.299,20.992,12.727,20.636,13.001z M8.996,14.704 c-0.76,0-1.397-0.616-1.397-1.376c0-0.76,0.637-1.397,1.397-1.397c0.76,0,1.376,0.637,1.376,1.397 C10.372,14.088,9.756,14.704,8.996,14.704z M16.401,13.328c0,0.76-0.616,1.376-1.376,1.376c-0.76,0-1.399-0.616-1.399-1.376 c0-0.76,0.639-1.397,1.399-1.397C15.785,11.931,16.401,12.568,16.401,13.328z M15.229,16.708c0.152,0.152,0.152,0.398,0,0.55 c-0.674,0.674-1.727,1.002-3.219,1.002c-0.004,0-0.007-0.002-0.011-0.002c-0.004,0-0.007,0.002-0.011,0.002 c-1.492,0-2.544-0.328-3.218-1.002c-0.152-0.152-0.152-0.398,0-0.55c0.152-0.152,0.399-0.151,0.55,0 c0.521,0.521,1.394,0.775,2.669,0.775c0.004,0,0.007,0.002,0.011,0.002c0.004,0,0.007-0.002,0.011-0.002 c1.275,0,2.148-0.253,2.669-0.775C14.831,16.556,15.078,16.556,15.229,16.708z"
  23696. }));
  23697. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/skype.js
  23698. /**
  23699. * WordPress dependencies
  23700. */
  23701. const SkypeIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23702. width: "24",
  23703. height: "24",
  23704. viewBox: "0 0 24 24",
  23705. version: "1.1"
  23706. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23707. d: "M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"
  23708. }));
  23709. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/snapchat.js
  23710. /**
  23711. * WordPress dependencies
  23712. */
  23713. const SnapchatIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23714. width: "24",
  23715. height: "24",
  23716. viewBox: "0 0 24 24",
  23717. version: "1.1"
  23718. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23719. d: "M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"
  23720. }));
  23721. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/soundcloud.js
  23722. /**
  23723. * WordPress dependencies
  23724. */
  23725. const SoundCloudIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23726. width: "24",
  23727. height: "24",
  23728. viewBox: "0 0 24 24",
  23729. version: "1.1"
  23730. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23731. d: "M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z"
  23732. }));
  23733. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/spotify.js
  23734. /**
  23735. * WordPress dependencies
  23736. */
  23737. const SpotifyIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23738. width: "24",
  23739. height: "24",
  23740. viewBox: "0 0 24 24",
  23741. version: "1.1"
  23742. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23743. d: "M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"
  23744. }));
  23745. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/telegram.js
  23746. /**
  23747. * WordPress dependencies
  23748. */
  23749. const TelegramIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23750. width: "24",
  23751. height: "24",
  23752. viewBox: "0 0 128 128",
  23753. version: "1.1"
  23754. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23755. d: "M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"
  23756. }));
  23757. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/tiktok.js
  23758. /**
  23759. * WordPress dependencies
  23760. */
  23761. const TiktokIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23762. width: "24",
  23763. height: "24",
  23764. viewBox: "0 0 32 32",
  23765. version: "1.1"
  23766. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23767. d: "M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z"
  23768. }));
  23769. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/tumblr.js
  23770. /**
  23771. * WordPress dependencies
  23772. */
  23773. const TumblrIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23774. width: "24",
  23775. height: "24",
  23776. viewBox: "0 0 24 24",
  23777. version: "1.1"
  23778. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23779. d: "M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"
  23780. }));
  23781. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitch.js
  23782. /**
  23783. * WordPress dependencies
  23784. */
  23785. const TwitchIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23786. width: "24",
  23787. height: "24",
  23788. viewBox: "0 0 24 24",
  23789. version: "1.1"
  23790. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23791. d: "M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"
  23792. }));
  23793. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitter.js
  23794. /**
  23795. * WordPress dependencies
  23796. */
  23797. const TwitterIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23798. width: "24",
  23799. height: "24",
  23800. viewBox: "0 0 24 24",
  23801. version: "1.1"
  23802. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23803. d: "M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"
  23804. }));
  23805. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/vimeo.js
  23806. /**
  23807. * WordPress dependencies
  23808. */
  23809. const VimeoIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23810. width: "24",
  23811. height: "24",
  23812. viewBox: "0 0 24 24",
  23813. version: "1.1"
  23814. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23815. d: "M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"
  23816. }));
  23817. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/vk.js
  23818. /**
  23819. * WordPress dependencies
  23820. */
  23821. const VkIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23822. width: "24",
  23823. height: "24",
  23824. viewBox: "0 0 24 24",
  23825. version: "1.1"
  23826. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23827. d: "M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"
  23828. }));
  23829. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/yelp.js
  23830. /**
  23831. * WordPress dependencies
  23832. */
  23833. const YelpIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23834. width: "24",
  23835. height: "24",
  23836. viewBox: "0 0 24 24",
  23837. version: "1.1"
  23838. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23839. d: "M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"
  23840. }));
  23841. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/youtube.js
  23842. /**
  23843. * WordPress dependencies
  23844. */
  23845. const YouTubeIcon = () => Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  23846. width: "24",
  23847. height: "24",
  23848. viewBox: "0 0 24 24",
  23849. version: "1.1"
  23850. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  23851. d: "M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"
  23852. }));
  23853. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/variations.js
  23854. /**
  23855. * Internal dependencies
  23856. */
  23857. const social_link_variations_variations = [{
  23858. isDefault: true,
  23859. name: 'wordpress',
  23860. attributes: {
  23861. service: 'wordpress'
  23862. },
  23863. title: 'WordPress',
  23864. icon: WordPressIcon
  23865. }, {
  23866. name: 'fivehundredpx',
  23867. attributes: {
  23868. service: 'fivehundredpx'
  23869. },
  23870. title: '500px',
  23871. icon: FivehundredpxIcon
  23872. }, {
  23873. name: 'amazon',
  23874. attributes: {
  23875. service: 'amazon'
  23876. },
  23877. title: 'Amazon',
  23878. icon: AmazonIcon
  23879. }, {
  23880. name: 'bandcamp',
  23881. attributes: {
  23882. service: 'bandcamp'
  23883. },
  23884. title: 'Bandcamp',
  23885. icon: BandcampIcon
  23886. }, {
  23887. name: 'behance',
  23888. attributes: {
  23889. service: 'behance'
  23890. },
  23891. title: 'Behance',
  23892. icon: BehanceIcon
  23893. }, {
  23894. name: 'chain',
  23895. attributes: {
  23896. service: 'chain'
  23897. },
  23898. title: 'Link',
  23899. icon: ChainIcon
  23900. }, {
  23901. name: 'codepen',
  23902. attributes: {
  23903. service: 'codepen'
  23904. },
  23905. title: 'CodePen',
  23906. icon: CodepenIcon
  23907. }, {
  23908. name: 'deviantart',
  23909. attributes: {
  23910. service: 'deviantart'
  23911. },
  23912. title: 'DeviantArt',
  23913. icon: DeviantArtIcon
  23914. }, {
  23915. name: 'dribbble',
  23916. attributes: {
  23917. service: 'dribbble'
  23918. },
  23919. title: 'Dribbble',
  23920. icon: DribbbleIcon
  23921. }, {
  23922. name: 'dropbox',
  23923. attributes: {
  23924. service: 'dropbox'
  23925. },
  23926. title: 'Dropbox',
  23927. icon: DropboxIcon
  23928. }, {
  23929. name: 'etsy',
  23930. attributes: {
  23931. service: 'etsy'
  23932. },
  23933. title: 'Etsy',
  23934. icon: EtsyIcon
  23935. }, {
  23936. name: 'facebook',
  23937. attributes: {
  23938. service: 'facebook'
  23939. },
  23940. title: 'Facebook',
  23941. icon: FacebookIcon
  23942. }, {
  23943. name: 'feed',
  23944. attributes: {
  23945. service: 'feed'
  23946. },
  23947. title: 'RSS Feed',
  23948. icon: FeedIcon
  23949. }, {
  23950. name: 'flickr',
  23951. attributes: {
  23952. service: 'flickr'
  23953. },
  23954. title: 'Flickr',
  23955. icon: FlickrIcon
  23956. }, {
  23957. name: 'foursquare',
  23958. attributes: {
  23959. service: 'foursquare'
  23960. },
  23961. title: 'Foursquare',
  23962. icon: FoursquareIcon
  23963. }, {
  23964. name: 'goodreads',
  23965. attributes: {
  23966. service: 'goodreads'
  23967. },
  23968. title: 'Goodreads',
  23969. icon: GoodreadsIcon
  23970. }, {
  23971. name: 'google',
  23972. attributes: {
  23973. service: 'google'
  23974. },
  23975. title: 'Google',
  23976. icon: GoogleIcon
  23977. }, {
  23978. name: 'github',
  23979. attributes: {
  23980. service: 'github'
  23981. },
  23982. title: 'GitHub',
  23983. icon: GitHubIcon
  23984. }, {
  23985. name: 'instagram',
  23986. attributes: {
  23987. service: 'instagram'
  23988. },
  23989. title: 'Instagram',
  23990. icon: InstagramIcon
  23991. }, {
  23992. name: 'lastfm',
  23993. attributes: {
  23994. service: 'lastfm'
  23995. },
  23996. title: 'Last.fm',
  23997. icon: LastfmIcon
  23998. }, {
  23999. name: 'linkedin',
  24000. attributes: {
  24001. service: 'linkedin'
  24002. },
  24003. title: 'LinkedIn',
  24004. icon: LinkedInIcon
  24005. }, {
  24006. name: 'mail',
  24007. attributes: {
  24008. service: 'mail'
  24009. },
  24010. title: 'Mail',
  24011. keywords: ['email', 'e-mail'],
  24012. icon: MailIcon
  24013. }, {
  24014. name: 'mastodon',
  24015. attributes: {
  24016. service: 'mastodon'
  24017. },
  24018. title: 'Mastodon',
  24019. icon: MastodonIcon
  24020. }, {
  24021. name: 'meetup',
  24022. attributes: {
  24023. service: 'meetup'
  24024. },
  24025. title: 'Meetup',
  24026. icon: MeetupIcon
  24027. }, {
  24028. name: 'medium',
  24029. attributes: {
  24030. service: 'medium'
  24031. },
  24032. title: 'Medium',
  24033. icon: MediumIcon
  24034. }, {
  24035. name: 'patreon',
  24036. attributes: {
  24037. service: 'patreon'
  24038. },
  24039. title: 'Patreon',
  24040. icon: PatreonIcon
  24041. }, {
  24042. name: 'pinterest',
  24043. attributes: {
  24044. service: 'pinterest'
  24045. },
  24046. title: 'Pinterest',
  24047. icon: PinterestIcon
  24048. }, {
  24049. name: 'pocket',
  24050. attributes: {
  24051. service: 'pocket'
  24052. },
  24053. title: 'Pocket',
  24054. icon: PocketIcon
  24055. }, {
  24056. name: 'reddit',
  24057. attributes: {
  24058. service: 'reddit'
  24059. },
  24060. title: 'Reddit',
  24061. icon: RedditIcon
  24062. }, {
  24063. name: 'skype',
  24064. attributes: {
  24065. service: 'skype'
  24066. },
  24067. title: 'Skype',
  24068. icon: SkypeIcon
  24069. }, {
  24070. name: 'snapchat',
  24071. attributes: {
  24072. service: 'snapchat'
  24073. },
  24074. title: 'Snapchat',
  24075. icon: SnapchatIcon
  24076. }, {
  24077. name: 'soundcloud',
  24078. attributes: {
  24079. service: 'soundcloud'
  24080. },
  24081. title: 'SoundCloud',
  24082. icon: SoundCloudIcon
  24083. }, {
  24084. name: 'spotify',
  24085. attributes: {
  24086. service: 'spotify'
  24087. },
  24088. title: 'Spotify',
  24089. icon: SpotifyIcon
  24090. }, {
  24091. name: 'telegram',
  24092. attributes: {
  24093. service: 'telegram'
  24094. },
  24095. title: 'Telegram',
  24096. icon: TelegramIcon
  24097. }, {
  24098. name: 'tiktok',
  24099. attributes: {
  24100. service: 'tiktok'
  24101. },
  24102. title: 'TikTok',
  24103. icon: TiktokIcon
  24104. }, {
  24105. name: 'tumblr',
  24106. attributes: {
  24107. service: 'tumblr'
  24108. },
  24109. title: 'Tumblr',
  24110. icon: TumblrIcon
  24111. }, {
  24112. name: 'twitch',
  24113. attributes: {
  24114. service: 'twitch'
  24115. },
  24116. title: 'Twitch',
  24117. icon: TwitchIcon
  24118. }, {
  24119. name: 'twitter',
  24120. attributes: {
  24121. service: 'twitter'
  24122. },
  24123. title: 'Twitter',
  24124. icon: TwitterIcon
  24125. }, {
  24126. name: 'vimeo',
  24127. attributes: {
  24128. service: 'vimeo'
  24129. },
  24130. title: 'Vimeo',
  24131. icon: VimeoIcon
  24132. }, {
  24133. name: 'vk',
  24134. attributes: {
  24135. service: 'vk'
  24136. },
  24137. title: 'VK',
  24138. icon: VkIcon
  24139. }, {
  24140. name: 'yelp',
  24141. attributes: {
  24142. service: 'yelp'
  24143. },
  24144. title: 'Yelp',
  24145. icon: YelpIcon
  24146. }, {
  24147. name: 'youtube',
  24148. attributes: {
  24149. service: 'youtube'
  24150. },
  24151. title: 'YouTube',
  24152. icon: YouTubeIcon
  24153. }];
  24154. /**
  24155. * Add `isActive` function to all `social link` variations, if not defined.
  24156. * `isActive` function is used to find a variation match from a created
  24157. * Block by providing its attributes.
  24158. */
  24159. social_link_variations_variations.forEach(variation => {
  24160. if (variation.isActive) return;
  24161. variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.service === variationAttributes.service;
  24162. });
  24163. /* harmony default export */ var social_link_variations = (social_link_variations_variations);
  24164. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/social-list.js
  24165. /**
  24166. * External dependencies
  24167. */
  24168. /**
  24169. * WordPress dependencies
  24170. */
  24171. /**
  24172. * Internal dependencies
  24173. */
  24174. /**
  24175. * Retrieves the social service's icon component.
  24176. *
  24177. * @param {string} name key for a social service (lowercase slug)
  24178. *
  24179. * @return {WPComponent} Icon component for social service.
  24180. */
  24181. const getIconBySite = name => {
  24182. const variation = Object(external_lodash_["find"])(social_link_variations, {
  24183. name
  24184. });
  24185. return variation ? variation.icon : ChainIcon;
  24186. };
  24187. /**
  24188. * Retrieves the display name for the social service.
  24189. *
  24190. * @param {string} name key for a social service (lowercase slug)
  24191. *
  24192. * @return {string} Display name for social service
  24193. */
  24194. const getNameBySite = name => {
  24195. const variation = Object(external_lodash_["find"])(social_link_variations, {
  24196. name
  24197. });
  24198. return variation ? variation.title : Object(external_wp_i18n_["__"])('Social Icon');
  24199. };
  24200. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/edit.js
  24201. /**
  24202. * External dependencies
  24203. */
  24204. /**
  24205. * WordPress dependencies
  24206. */
  24207. /**
  24208. * Internal dependencies
  24209. */
  24210. const SocialLinkEdit = ({
  24211. attributes,
  24212. context,
  24213. isSelected,
  24214. setAttributes
  24215. }) => {
  24216. const {
  24217. url,
  24218. service,
  24219. label
  24220. } = attributes;
  24221. const {
  24222. iconColorValue,
  24223. iconBackgroundColorValue
  24224. } = context;
  24225. const [showURLPopover, setPopover] = Object(external_wp_element_["useState"])(false);
  24226. const classes = classnames_default()('wp-social-link', 'wp-social-link-' + service, {
  24227. 'wp-social-link__is-incomplete': !url
  24228. });
  24229. const IconComponent = getIconBySite(service);
  24230. const socialLinkName = getNameBySite(service);
  24231. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  24232. className: classes,
  24233. style: {
  24234. color: iconColorValue,
  24235. backgroundColor: iconBackgroundColorValue
  24236. }
  24237. });
  24238. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  24239. title: Object(external_wp_i18n_["sprintf"])(
  24240. /* translators: %s: name of the social service. */
  24241. Object(external_wp_i18n_["__"])('%s label'), socialLinkName),
  24242. initialOpen: false
  24243. }, Object(external_wp_element_["createElement"])(external_wp_components_["PanelRow"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  24244. label: Object(external_wp_i18n_["__"])('Link label'),
  24245. help: Object(external_wp_i18n_["__"])('Briefly describe the link to help screen reader users.'),
  24246. value: label,
  24247. onChange: value => setAttributes({
  24248. label: value
  24249. })
  24250. })))), Object(external_wp_element_["createElement"])("li", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  24251. onClick: () => setPopover(true)
  24252. }, Object(external_wp_element_["createElement"])(IconComponent, null), isSelected && showURLPopover && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["URLPopover"], {
  24253. onClose: () => setPopover(false)
  24254. }, Object(external_wp_element_["createElement"])("form", {
  24255. className: "block-editor-url-popover__link-editor",
  24256. onSubmit: event => {
  24257. event.preventDefault();
  24258. setPopover(false);
  24259. }
  24260. }, Object(external_wp_element_["createElement"])("div", {
  24261. className: "block-editor-url-input"
  24262. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["URLInput"], {
  24263. value: url,
  24264. onChange: nextURL => setAttributes({
  24265. url: nextURL
  24266. }),
  24267. placeholder: Object(external_wp_i18n_["__"])('Enter address'),
  24268. disableSuggestions: true
  24269. })), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  24270. icon: keyboard_return["a" /* default */],
  24271. label: Object(external_wp_i18n_["__"])('Apply'),
  24272. type: "submit"
  24273. }))))));
  24274. };
  24275. /* harmony default export */ var social_link_edit = (SocialLinkEdit);
  24276. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
  24277. /**
  24278. * WordPress dependencies
  24279. */
  24280. /**
  24281. * Internal dependencies
  24282. */
  24283. const social_link_metadata = {
  24284. apiVersion: 2,
  24285. name: "core/social-link",
  24286. title: "Social Icon",
  24287. category: "widgets",
  24288. parent: ["core/social-links"],
  24289. description: "Display an icon linking to a social media profile or website.",
  24290. textdomain: "default",
  24291. attributes: {
  24292. url: {
  24293. type: "string"
  24294. },
  24295. service: {
  24296. type: "string"
  24297. },
  24298. label: {
  24299. type: "string"
  24300. }
  24301. },
  24302. usesContext: ["openInNewTab", "iconColorValue", "iconBackgroundColorValue"],
  24303. supports: {
  24304. reusable: false,
  24305. html: false
  24306. },
  24307. editorStyle: "wp-block-social-link-editor"
  24308. };
  24309. const {
  24310. name: social_link_name
  24311. } = social_link_metadata;
  24312. const social_link_settings = {
  24313. icon: library_share,
  24314. edit: social_link_edit,
  24315. variations: social_link_variations
  24316. };
  24317. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/site-logo.js
  24318. /**
  24319. * WordPress dependencies
  24320. */
  24321. const siteLogo = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  24322. xmlns: "http://www.w3.org/2000/svg",
  24323. viewBox: "0 0 24 24"
  24324. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  24325. d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 1.5c4.1 0 7.5 3.4 7.5 7.5v.1c-1.4-.8-3.3-1.7-3.4-1.8-.2-.1-.5-.1-.8.1l-2.9 2.1L9 11.3c-.2-.1-.4 0-.6.1l-3.7 2.2c-.1-.5-.2-1-.2-1.5 0-4.2 3.4-7.6 7.5-7.6zm0 15c-3.1 0-5.7-1.9-6.9-4.5l3.7-2.2 3.5 1.2c.2.1.5 0 .7-.1l2.9-2.1c.8.4 2.5 1.2 3.5 1.9-.9 3.3-3.9 5.8-7.4 5.8z"
  24326. }));
  24327. /* harmony default export */ var site_logo = (siteLogo);
  24328. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-logo/edit.js
  24329. /**
  24330. * External dependencies
  24331. */
  24332. /**
  24333. * WordPress dependencies
  24334. */
  24335. /**
  24336. * Internal dependencies
  24337. */
  24338. /**
  24339. * Module constants
  24340. */
  24341. const site_logo_edit_ALLOWED_MEDIA_TYPES = ['image'];
  24342. const ACCEPT_MEDIA_STRING = 'image/*';
  24343. const SiteLogo = ({
  24344. alt,
  24345. attributes: {
  24346. align,
  24347. width,
  24348. height,
  24349. isLink,
  24350. linkTarget
  24351. },
  24352. containerRef,
  24353. isSelected,
  24354. setAttributes,
  24355. logoUrl,
  24356. siteUrl
  24357. }) => {
  24358. const clientWidth = useClientWidth(containerRef, [align]);
  24359. const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
  24360. const isWideAligned = Object(external_lodash_["includes"])(['wide', 'full'], align);
  24361. const isResizable = !isWideAligned && isLargeViewport;
  24362. const [{
  24363. naturalWidth,
  24364. naturalHeight
  24365. }, setNaturalSize] = Object(external_wp_element_["useState"])({});
  24366. const {
  24367. toggleSelection
  24368. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  24369. const classes = classnames_default()('custom-logo-link', {
  24370. 'is-transient': Object(external_wp_blob_["isBlobURL"])(logoUrl)
  24371. });
  24372. const {
  24373. maxWidth,
  24374. title
  24375. } = Object(external_wp_data_["useSelect"])(select => {
  24376. const {
  24377. getSettings
  24378. } = select(external_wp_blockEditor_["store"]);
  24379. const siteEntities = select(external_wp_coreData_["store"]).getEditedEntityRecord('root', 'site');
  24380. return {
  24381. title: siteEntities.title,
  24382. ...Object(external_lodash_["pick"])(getSettings(), ['imageSizes', 'maxWidth'])
  24383. };
  24384. }, []);
  24385. function onResizeStart() {
  24386. toggleSelection(false);
  24387. }
  24388. function onResizeStop() {
  24389. toggleSelection(true);
  24390. }
  24391. const img = Object(external_wp_element_["createElement"])("img", {
  24392. className: "custom-logo",
  24393. src: logoUrl,
  24394. alt: alt,
  24395. onLoad: event => {
  24396. setNaturalSize(Object(external_lodash_["pick"])(event.target, ['naturalWidth', 'naturalHeight']));
  24397. }
  24398. });
  24399. let imgWrapper = img; // Disable reason: Image itself is not meant to be interactive, but
  24400. // should direct focus to block.
  24401. if (isLink) {
  24402. imgWrapper =
  24403. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
  24404. Object(external_wp_element_["createElement"])("a", {
  24405. href: siteUrl,
  24406. className: classes,
  24407. rel: "home",
  24408. title: title,
  24409. onClick: event => event.preventDefault()
  24410. }, img)
  24411. /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
  24412. ;
  24413. }
  24414. let imageWidthWithinContainer;
  24415. if (clientWidth && naturalWidth && naturalHeight) {
  24416. const exceedMaxWidth = naturalWidth > clientWidth;
  24417. imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth;
  24418. }
  24419. if (!isResizable || !imageWidthWithinContainer) {
  24420. return Object(external_wp_element_["createElement"])("div", {
  24421. style: {
  24422. width,
  24423. height
  24424. }
  24425. }, imgWrapper);
  24426. }
  24427. const currentWidth = width || imageWidthWithinContainer;
  24428. const ratio = naturalWidth / naturalHeight;
  24429. const currentHeight = currentWidth / ratio;
  24430. const minWidth = naturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;
  24431. const minHeight = naturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio; // With the current implementation of ResizableBox, an image needs an
  24432. // explicit pixel value for the max-width. In absence of being able to
  24433. // set the content-width, this max-width is currently dictated by the
  24434. // vanilla editor style. The following variable adds a buffer to this
  24435. // vanilla style, so 3rd party themes have some wiggleroom. This does,
  24436. // in most cases, allow you to scale the image beyond the width of the
  24437. // main column, though not infinitely.
  24438. // @todo It would be good to revisit this once a content-width variable
  24439. // becomes available.
  24440. const maxWidthBuffer = maxWidth * 2.5; // Set the default width to a responsible size.
  24441. // Note that this width is also set in the attached CSS file.
  24442. const defaultWidth = 120;
  24443. let showRightHandle = false;
  24444. let showLeftHandle = false;
  24445. /* eslint-disable no-lonely-if */
  24446. // See https://github.com/WordPress/gutenberg/issues/7584.
  24447. if (align === 'center') {
  24448. // When the image is centered, show both handles.
  24449. showRightHandle = true;
  24450. showLeftHandle = true;
  24451. } else if (Object(external_wp_i18n_["isRTL"])()) {
  24452. // In RTL mode the image is on the right by default.
  24453. // Show the right handle and hide the left handle only when it is
  24454. // aligned left. Otherwise always show the left handle.
  24455. if (align === 'left') {
  24456. showRightHandle = true;
  24457. } else {
  24458. showLeftHandle = true;
  24459. }
  24460. } else {
  24461. // Show the left handle and hide the right handle only when the
  24462. // image is aligned right. Otherwise always show the right handle.
  24463. if (align === 'right') {
  24464. showLeftHandle = true;
  24465. } else {
  24466. showRightHandle = true;
  24467. }
  24468. }
  24469. /* eslint-enable no-lonely-if */
  24470. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  24471. title: Object(external_wp_i18n_["__"])('Settings')
  24472. }, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  24473. label: Object(external_wp_i18n_["__"])('Image width'),
  24474. onChange: newWidth => setAttributes({
  24475. width: newWidth
  24476. }),
  24477. min: minWidth,
  24478. max: maxWidthBuffer,
  24479. initialPosition: Math.min(defaultWidth, maxWidthBuffer),
  24480. value: width || '',
  24481. disabled: !isResizable
  24482. }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  24483. label: Object(external_wp_i18n_["__"])('Link image to home'),
  24484. onChange: () => setAttributes({
  24485. isLink: !isLink
  24486. }),
  24487. checked: isLink
  24488. }), isLink && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  24489. label: Object(external_wp_i18n_["__"])('Open in new tab'),
  24490. onChange: value => setAttributes({
  24491. linkTarget: value ? '_blank' : '_self'
  24492. }),
  24493. checked: linkTarget === '_blank'
  24494. })))), Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
  24495. size: {
  24496. width,
  24497. height
  24498. },
  24499. showHandle: isSelected,
  24500. minWidth: minWidth,
  24501. maxWidth: maxWidthBuffer,
  24502. minHeight: minHeight,
  24503. maxHeight: maxWidthBuffer / ratio,
  24504. lockAspectRatio: true,
  24505. enable: {
  24506. top: false,
  24507. right: showRightHandle,
  24508. bottom: true,
  24509. left: showLeftHandle
  24510. },
  24511. onResizeStart: onResizeStart,
  24512. onResizeStop: (event, direction, elt, delta) => {
  24513. onResizeStop();
  24514. setAttributes({
  24515. width: parseInt(currentWidth + delta.width, 10),
  24516. height: parseInt(currentHeight + delta.height, 10)
  24517. });
  24518. }
  24519. }, imgWrapper));
  24520. };
  24521. function LogoEdit({
  24522. attributes,
  24523. className,
  24524. setAttributes,
  24525. isSelected
  24526. }) {
  24527. const {
  24528. width
  24529. } = attributes;
  24530. const [logoUrl, setLogoUrl] = Object(external_wp_element_["useState"])();
  24531. const [error, setError] = Object(external_wp_element_["useState"])();
  24532. const ref = Object(external_wp_element_["useRef"])();
  24533. const {
  24534. siteLogoId,
  24535. canUserEdit,
  24536. url,
  24537. mediaItemData,
  24538. isRequestingMediaItem
  24539. } = Object(external_wp_data_["useSelect"])(select => {
  24540. const {
  24541. canUser,
  24542. getEntityRecord,
  24543. getEditedEntityRecord
  24544. } = select(external_wp_coreData_["store"]);
  24545. const siteSettings = getEditedEntityRecord('root', 'site');
  24546. const siteData = getEntityRecord('root', '__unstableBase');
  24547. const _siteLogo = siteSettings === null || siteSettings === void 0 ? void 0 : siteSettings.site_logo;
  24548. const _readOnlyLogo = siteData === null || siteData === void 0 ? void 0 : siteData.site_logo;
  24549. const _canUserEdit = canUser('update', 'settings');
  24550. const _siteLogoId = _siteLogo || _readOnlyLogo;
  24551. const mediaItem = _siteLogoId && select(external_wp_coreData_["store"]).getEntityRecord('root', 'media', _siteLogoId, {
  24552. context: 'view'
  24553. });
  24554. const _isRequestingMediaItem = _siteLogoId && !select(external_wp_coreData_["store"]).hasFinishedResolution('getEntityRecord', ['root', 'media', _siteLogoId, {
  24555. context: 'view'
  24556. }]);
  24557. return {
  24558. siteLogoId: _siteLogoId,
  24559. canUserEdit: _canUserEdit,
  24560. url: siteData === null || siteData === void 0 ? void 0 : siteData.url,
  24561. mediaItemData: mediaItem && {
  24562. url: mediaItem.source_url,
  24563. alt: mediaItem.alt_text
  24564. },
  24565. isRequestingMediaItem: _isRequestingMediaItem
  24566. };
  24567. }, []);
  24568. const {
  24569. editEntityRecord
  24570. } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
  24571. const setLogo = newValue => editEntityRecord('root', 'site', undefined, {
  24572. site_logo: newValue
  24573. });
  24574. let alt = null;
  24575. if (mediaItemData) {
  24576. alt = mediaItemData.alt;
  24577. if (logoUrl !== mediaItemData.url) {
  24578. setLogoUrl(mediaItemData.url);
  24579. }
  24580. }
  24581. const onSelectLogo = media => {
  24582. if (!media) {
  24583. return;
  24584. }
  24585. if (!media.id && media.url) {
  24586. // This is a temporary blob image
  24587. setLogo(undefined);
  24588. setError(null);
  24589. setLogoUrl(media.url);
  24590. return;
  24591. }
  24592. setLogo(media.id);
  24593. };
  24594. const onUploadError = message => {
  24595. setError(message[2] ? message[2] : null);
  24596. };
  24597. const controls = canUserEdit && logoUrl && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  24598. group: "other"
  24599. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  24600. mediaURL: logoUrl,
  24601. allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
  24602. accept: ACCEPT_MEDIA_STRING,
  24603. onSelect: onSelectLogo,
  24604. onError: onUploadError
  24605. }));
  24606. const label = Object(external_wp_i18n_["__"])('Site Logo');
  24607. let logoImage;
  24608. const isLoading = siteLogoId === undefined || isRequestingMediaItem;
  24609. if (isLoading) {
  24610. logoImage = Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null);
  24611. }
  24612. if (!!logoUrl) {
  24613. logoImage = Object(external_wp_element_["createElement"])(SiteLogo, {
  24614. alt: alt,
  24615. attributes: attributes,
  24616. className: className,
  24617. containerRef: ref,
  24618. isSelected: isSelected,
  24619. setAttributes: setAttributes,
  24620. logoUrl: logoUrl,
  24621. siteUrl: url
  24622. });
  24623. }
  24624. const classes = classnames_default()(className, {
  24625. 'is-default-size': !width
  24626. });
  24627. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  24628. ref,
  24629. className: classes
  24630. });
  24631. return Object(external_wp_element_["createElement"])("div", blockProps, controls, !!logoUrl && logoImage, !logoUrl && !canUserEdit && Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
  24632. className: "site-logo_placeholder",
  24633. icon: site_logo,
  24634. label: label
  24635. }, isLoading && Object(external_wp_element_["createElement"])("span", {
  24636. className: "components-placeholder__preview"
  24637. }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))), !logoUrl && canUserEdit && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  24638. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  24639. icon: site_logo
  24640. }),
  24641. labels: {
  24642. title: label,
  24643. instructions: Object(external_wp_i18n_["__"])('Upload an image, or pick one from your media library, to be your site logo')
  24644. },
  24645. onSelect: onSelectLogo,
  24646. accept: ACCEPT_MEDIA_STRING,
  24647. allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
  24648. mediaPreview: logoImage,
  24649. notices: error && Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
  24650. status: "error",
  24651. isDismissible: false
  24652. }, error),
  24653. onError: onUploadError
  24654. }));
  24655. }
  24656. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
  24657. /**
  24658. * WordPress dependencies
  24659. */
  24660. /**
  24661. * Internal dependencies
  24662. */
  24663. const site_logo_metadata = {
  24664. apiVersion: 2,
  24665. name: "core/site-logo",
  24666. title: "Site Logo",
  24667. category: "layout",
  24668. description: "Useful for displaying a graphic mark, design, or symbol to represent the site. Once a site logo is set, it can be reused in different places and templates. It should not be confused with the site icon, which is the small image used in the dashboard, browser tabs, public search results, etc, to help recognize a site.",
  24669. textdomain: "default",
  24670. attributes: {
  24671. align: {
  24672. type: "string"
  24673. },
  24674. width: {
  24675. type: "number"
  24676. },
  24677. isLink: {
  24678. type: "boolean",
  24679. "default": true
  24680. },
  24681. linkTarget: {
  24682. type: "string",
  24683. "default": "_self"
  24684. }
  24685. },
  24686. supports: {
  24687. html: false,
  24688. align: true,
  24689. alignWide: false
  24690. },
  24691. styles: [{
  24692. name: "default",
  24693. label: "Default",
  24694. isDefault: true
  24695. }, {
  24696. name: "rounded",
  24697. label: "Rounded"
  24698. }],
  24699. editorStyle: "wp-block-site-logo-editor",
  24700. style: "wp-block-site-logo"
  24701. };
  24702. const {
  24703. name: site_logo_name
  24704. } = site_logo_metadata;
  24705. const site_logo_settings = {
  24706. icon: site_logo,
  24707. edit: LogoEdit
  24708. };
  24709. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/edit.js
  24710. /**
  24711. * External dependencies
  24712. */
  24713. /**
  24714. * WordPress dependencies
  24715. */
  24716. function SiteTaglineEdit({
  24717. attributes,
  24718. setAttributes
  24719. }) {
  24720. const {
  24721. textAlign
  24722. } = attributes;
  24723. const [siteTagline, setSiteTagline] = Object(external_wp_coreData_["useEntityProp"])('root', 'site', 'description');
  24724. const {
  24725. canUserEdit,
  24726. readOnlySiteTagLine
  24727. } = Object(external_wp_data_["useSelect"])(select => {
  24728. const {
  24729. canUser,
  24730. getEntityRecord
  24731. } = select(external_wp_coreData_["store"]);
  24732. const siteData = getEntityRecord('root', '__unstableBase');
  24733. return {
  24734. canUserEdit: canUser('update', 'settings'),
  24735. readOnlySiteTagLine: siteData === null || siteData === void 0 ? void 0 : siteData.description
  24736. };
  24737. }, []);
  24738. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  24739. className: classnames_default()({
  24740. [`has-text-align-${textAlign}`]: textAlign,
  24741. 'wp-block-site-tagline__placeholder': !canUserEdit && !readOnlySiteTagLine
  24742. })
  24743. });
  24744. const siteTaglineContent = canUserEdit ? Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
  24745. allowedFormats: [],
  24746. onChange: setSiteTagline,
  24747. "aria-label": Object(external_wp_i18n_["__"])('Site tagline text'),
  24748. placeholder: Object(external_wp_i18n_["__"])('Write site tagline…'),
  24749. tagName: "p",
  24750. value: siteTagline
  24751. }, blockProps)) : Object(external_wp_element_["createElement"])("p", blockProps, readOnlySiteTagLine || Object(external_wp_i18n_["__"])('Site Tagline placeholder'));
  24752. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  24753. group: "block"
  24754. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  24755. onChange: newAlign => setAttributes({
  24756. textAlign: newAlign
  24757. }),
  24758. value: textAlign
  24759. })), siteTaglineContent);
  24760. }
  24761. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/icon.js
  24762. /**
  24763. * WordPress dependencies
  24764. */
  24765. /* harmony default export */ var site_tagline_icon = (Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  24766. xmlns: "http://www.w3.org/2000/svg",
  24767. width: "24",
  24768. height: "24"
  24769. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  24770. fill: "none",
  24771. d: "M0 0h24v24H0z"
  24772. }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  24773. d: "M4 9h16v2H4V9zm0 4h10v2H4v-2z"
  24774. })));
  24775. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
  24776. /**
  24777. * Internal dependencies
  24778. */
  24779. const site_tagline_metadata = {
  24780. apiVersion: 2,
  24781. name: "core/site-tagline",
  24782. title: "Site Tagline",
  24783. category: "design",
  24784. description: "Describe in a few words what the website is about. The tagline can be used in search results or when sharing on social networks even if it's not displayed in the theme design.",
  24785. keywords: ["description"],
  24786. textdomain: "default",
  24787. attributes: {
  24788. textAlign: {
  24789. type: "string"
  24790. }
  24791. },
  24792. supports: {
  24793. html: false,
  24794. color: {
  24795. gradients: true
  24796. },
  24797. spacing: {
  24798. margin: true,
  24799. padding: true
  24800. },
  24801. typography: {
  24802. fontSize: true,
  24803. lineHeight: true,
  24804. __experimentalFontFamily: true,
  24805. __experimentalTextTransform: true
  24806. }
  24807. },
  24808. editorStyle: "wp-block-site-tagline-editor"
  24809. };
  24810. const {
  24811. name: site_tagline_name
  24812. } = site_tagline_metadata;
  24813. const site_tagline_settings = {
  24814. icon: site_tagline_icon,
  24815. edit: SiteTaglineEdit
  24816. };
  24817. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/map-marker.js
  24818. /**
  24819. * WordPress dependencies
  24820. */
  24821. const mapMarker = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  24822. xmlns: "https://www.w3.org/2000/svg",
  24823. viewBox: "0 0 24 24"
  24824. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  24825. d: "M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"
  24826. }));
  24827. /* harmony default export */ var map_marker = (mapMarker);
  24828. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/edit/level-icon.js
  24829. /**
  24830. * WordPress dependencies
  24831. */
  24832. function LevelIcon({
  24833. level,
  24834. isPressed = false
  24835. }) {
  24836. if (level === 0) return library_paragraph;
  24837. const levelToPath = {
  24838. 1: 'M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z',
  24839. 2: 'M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z',
  24840. 3: 'M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z',
  24841. 4: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z',
  24842. 5: 'M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z',
  24843. 6: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z'
  24844. };
  24845. return Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  24846. width: "20",
  24847. height: "20",
  24848. viewBox: "0 0 20 20",
  24849. xmlns: "http://www.w3.org/2000/svg",
  24850. isPressed: isPressed
  24851. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  24852. d: levelToPath[level]
  24853. }));
  24854. }
  24855. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/edit/level-toolbar.js
  24856. /**
  24857. * WordPress dependencies
  24858. */
  24859. /**
  24860. * Internal dependencies
  24861. */
  24862. function LevelControl({
  24863. level,
  24864. onChange
  24865. }) {
  24866. const allControls = [1, 2, 3, 4, 5, 6, 0].map(currentLevel => {
  24867. const isActive = currentLevel === level;
  24868. return {
  24869. icon: Object(external_wp_element_["createElement"])(LevelIcon, {
  24870. level: currentLevel,
  24871. isPressed: isActive
  24872. }),
  24873. title: currentLevel === 0 ? Object(external_wp_i18n_["__"])('Paragraph') : // translators: %s: heading level e.g: "1", "2", "3"
  24874. Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Heading %d'), currentLevel),
  24875. isActive,
  24876. onClick: () => onChange(currentLevel)
  24877. };
  24878. });
  24879. return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarDropdownMenu"], {
  24880. label: Object(external_wp_i18n_["__"])('Change heading level'),
  24881. icon: Object(external_wp_element_["createElement"])(LevelIcon, {
  24882. level: level
  24883. }),
  24884. controls: allControls
  24885. });
  24886. }
  24887. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/edit/index.js
  24888. /**
  24889. * External dependencies
  24890. */
  24891. /**
  24892. * WordPress dependencies
  24893. */
  24894. /**
  24895. * Internal dependencies
  24896. */
  24897. function SiteTitleEdit({
  24898. attributes,
  24899. setAttributes,
  24900. insertBlocksAfter
  24901. }) {
  24902. const {
  24903. level,
  24904. textAlign
  24905. } = attributes;
  24906. const [title, setTitle] = Object(external_wp_coreData_["useEntityProp"])('root', 'site', 'title');
  24907. const {
  24908. canUserEdit,
  24909. readOnlyTitle
  24910. } = Object(external_wp_data_["useSelect"])(select => {
  24911. const {
  24912. canUser,
  24913. getEntityRecord
  24914. } = select(external_wp_coreData_["store"]);
  24915. const siteData = getEntityRecord('root', '__unstableBase');
  24916. return {
  24917. canUserEdit: canUser('update', 'settings'),
  24918. readOnlyTitle: siteData === null || siteData === void 0 ? void 0 : siteData.name
  24919. };
  24920. }, []);
  24921. const TagName = level === 0 ? 'p' : `h${level}`;
  24922. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  24923. className: classnames_default()({
  24924. [`has-text-align-${textAlign}`]: textAlign,
  24925. 'wp-block-site-title__placeholder': !canUserEdit && !readOnlyTitle
  24926. })
  24927. });
  24928. const siteTitleContent = canUserEdit ? Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  24929. tagName: "a",
  24930. style: {
  24931. display: 'inline-block'
  24932. },
  24933. "aria-label": Object(external_wp_i18n_["__"])('Site title text'),
  24934. placeholder: Object(external_wp_i18n_["__"])('Write site title…'),
  24935. value: title || readOnlyTitle,
  24936. onChange: setTitle,
  24937. allowedFormats: [],
  24938. disableLineBreaks: true,
  24939. __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])(Object(external_wp_blocks_["getDefaultBlockName"])()))
  24940. })) : Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_element_["createElement"])("a", {
  24941. href: "#site-title-pseudo-link",
  24942. onClick: event => event.preventDefault()
  24943. }, readOnlyTitle || Object(external_wp_i18n_["__"])('Site Title placeholder')));
  24944. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  24945. group: "block"
  24946. }, Object(external_wp_element_["createElement"])(LevelControl, {
  24947. level: level,
  24948. onChange: newLevel => setAttributes({
  24949. level: newLevel
  24950. })
  24951. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  24952. value: textAlign,
  24953. onChange: nextAlign => {
  24954. setAttributes({
  24955. textAlign: nextAlign
  24956. });
  24957. }
  24958. })), siteTitleContent);
  24959. }
  24960. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/index.js
  24961. /**
  24962. * WordPress dependencies
  24963. */
  24964. /**
  24965. * Internal dependencies
  24966. */
  24967. const site_title_metadata = {
  24968. apiVersion: 2,
  24969. name: "core/site-title",
  24970. title: "Site Title",
  24971. category: "design",
  24972. description: "Displays and allows editing the name of the site. The site title usually appears in the browser title bar, in search results, and more. Also available in Settings > General.",
  24973. textdomain: "default",
  24974. attributes: {
  24975. level: {
  24976. type: "number",
  24977. "default": 1
  24978. },
  24979. textAlign: {
  24980. type: "string"
  24981. }
  24982. },
  24983. supports: {
  24984. align: ["wide", "full"],
  24985. html: false,
  24986. color: {
  24987. gradients: true,
  24988. text: false,
  24989. link: true
  24990. },
  24991. spacing: {
  24992. padding: true,
  24993. margin: true
  24994. },
  24995. typography: {
  24996. fontSize: true,
  24997. lineHeight: true,
  24998. __experimentalFontFamily: true,
  24999. __experimentalTextTransform: true,
  25000. __experimentalFontStyle: true,
  25001. __experimentalFontWeight: true
  25002. }
  25003. },
  25004. editorStyle: "wp-block-site-title-editor"
  25005. };
  25006. const {
  25007. name: site_title_name
  25008. } = site_title_metadata;
  25009. const site_title_settings = {
  25010. icon: map_marker,
  25011. edit: SiteTitleEdit
  25012. };
  25013. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/loop.js
  25014. /**
  25015. * WordPress dependencies
  25016. */
  25017. const loop_loop = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  25018. viewBox: "0 0 24 24",
  25019. xmlns: "http://www.w3.org/2000/svg"
  25020. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  25021. d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"
  25022. }));
  25023. /* harmony default export */ var library_loop = (loop_loop);
  25024. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/settings.js
  25025. /**
  25026. * WordPress dependencies
  25027. */
  25028. const settings_settings = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  25029. xmlns: "http://www.w3.org/2000/svg",
  25030. viewBox: "0 0 24 24"
  25031. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  25032. d: "M17 4h-2v4.5h2V7h3V5.5h-3V4zM4 5.5h9V7H4V5.5zm16 5.75h-9v1.5h9v-1.5zm-16 0h3V10h2v4.25H7v-1.5H4v-1.5zM9 17H4v1.5h5V17zm4 0h7v1.5h-7V20h-2v-4.25h2V17z"
  25033. }));
  25034. /* harmony default export */ var library_settings = (settings_settings);
  25035. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/query-toolbar.js
  25036. /**
  25037. * WordPress dependencies
  25038. */
  25039. function QueryToolbar({
  25040. attributes: {
  25041. query,
  25042. displayLayout
  25043. },
  25044. setQuery,
  25045. setDisplayLayout
  25046. }) {
  25047. const maxPageInputId = Object(external_wp_compose_["useInstanceId"])(QueryToolbar, 'blocks-query-pagination-max-page-input');
  25048. const displayLayoutControls = [{
  25049. icon: library_list,
  25050. title: Object(external_wp_i18n_["__"])('List view'),
  25051. onClick: () => setDisplayLayout({
  25052. type: 'list'
  25053. }),
  25054. isActive: (displayLayout === null || displayLayout === void 0 ? void 0 : displayLayout.type) === 'list'
  25055. }, {
  25056. icon: grid["a" /* default */],
  25057. title: Object(external_wp_i18n_["__"])('Grid view'),
  25058. onClick: () => setDisplayLayout({
  25059. type: 'flex',
  25060. columns: (displayLayout === null || displayLayout === void 0 ? void 0 : displayLayout.columns) || 3
  25061. }),
  25062. isActive: (displayLayout === null || displayLayout === void 0 ? void 0 : displayLayout.type) === 'flex'
  25063. }];
  25064. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, !query.inherit && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
  25065. contentClassName: "block-library-query-toolbar__popover",
  25066. renderToggle: ({
  25067. onToggle
  25068. }) => Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  25069. icon: library_settings,
  25070. label: Object(external_wp_i18n_["__"])('Display settings'),
  25071. onClick: onToggle
  25072. }),
  25073. renderContent: () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNumberControl"], {
  25074. __unstableInputWidth: "60px",
  25075. label: Object(external_wp_i18n_["__"])('Items per Page'),
  25076. labelPosition: "edge",
  25077. min: 1,
  25078. max: 100,
  25079. onChange: value => {
  25080. if (isNaN(value) || value < 1 || value > 100) {
  25081. return;
  25082. }
  25083. setQuery({
  25084. perPage: value
  25085. });
  25086. },
  25087. step: "1",
  25088. value: query.perPage,
  25089. isDragEnabled: false
  25090. })), Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNumberControl"], {
  25091. __unstableInputWidth: "60px",
  25092. label: Object(external_wp_i18n_["__"])('Offset'),
  25093. labelPosition: "edge",
  25094. min: 0,
  25095. max: 100,
  25096. onChange: value => {
  25097. if (isNaN(value) || value < 0 || value > 100) {
  25098. return;
  25099. }
  25100. setQuery({
  25101. offset: value
  25102. });
  25103. },
  25104. step: "1",
  25105. value: query.offset,
  25106. isDragEnabled: false
  25107. })), Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
  25108. id: maxPageInputId,
  25109. help: Object(external_wp_i18n_["__"])('Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).')
  25110. }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNumberControl"], {
  25111. id: maxPageInputId,
  25112. __unstableInputWidth: "60px",
  25113. label: Object(external_wp_i18n_["__"])('Max page to show'),
  25114. labelPosition: "edge",
  25115. min: 0,
  25116. onChange: value => {
  25117. if (isNaN(value) || value < 0) {
  25118. return;
  25119. }
  25120. setQuery({
  25121. pages: value
  25122. });
  25123. },
  25124. step: "1",
  25125. value: query.pages,
  25126. isDragEnabled: false
  25127. })))
  25128. })), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
  25129. controls: displayLayoutControls
  25130. }));
  25131. }
  25132. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/utils.js
  25133. /**
  25134. * WordPress dependencies
  25135. */
  25136. /**
  25137. * WordPress term object from REST API.
  25138. * Categories ref: https://developer.wordpress.org/rest-api/reference/categories/
  25139. * Tags ref: https://developer.wordpress.org/rest-api/reference/tags/
  25140. *
  25141. * @typedef {Object} WPTerm
  25142. * @property {number} id Unique identifier for the term.
  25143. * @property {number} count Number of published posts for the term.
  25144. * @property {string} description HTML description of the term.
  25145. * @property {string} link URL of the term.
  25146. * @property {string} name HTML title for the term.
  25147. * @property {string} slug An alphanumeric identifier for the term unique to its type.
  25148. * @property {string} taxonomy Type attribution for the term.
  25149. * @property {Object} meta Meta fields
  25150. * @property {number} [parent] The parent term ID.
  25151. */
  25152. /**
  25153. * The object used in Query block that contains info and helper mappings
  25154. * from an array of WPTerm.
  25155. *
  25156. * @typedef {Object} QueryTermsInfo
  25157. * @property {WPTerm[]} terms The array of terms.
  25158. * @property {Object<string, WPTerm>} mapById Object mapping with the term id as key and the term as value.
  25159. * @property {Object<string, WPTerm>} mapByName Object mapping with the term name as key and the term as value.
  25160. * @property {string[]} names Array with the terms' names.
  25161. */
  25162. /**
  25163. * Returns a helper object with mapping from WPTerms.
  25164. *
  25165. * @param {WPTerm[]} terms The terms to extract of helper object.
  25166. * @return {QueryTermsInfo} The object with the terms information.
  25167. */
  25168. const getTermsInfo = terms => {
  25169. const mapping = terms === null || terms === void 0 ? void 0 : terms.reduce((accumulator, term) => {
  25170. const {
  25171. mapById,
  25172. mapByName,
  25173. names
  25174. } = accumulator;
  25175. mapById[term.id] = term;
  25176. mapByName[term.name] = term;
  25177. names.push(term.name);
  25178. return accumulator;
  25179. }, {
  25180. mapById: {},
  25181. mapByName: {},
  25182. names: []
  25183. });
  25184. return {
  25185. terms,
  25186. ...mapping
  25187. };
  25188. };
  25189. /**
  25190. * Returns a helper object that contains:
  25191. * 1. An `options` object from the available post types, to be passed to a `SelectControl`.
  25192. * 2. A helper map with available taxonomies per post type.
  25193. *
  25194. * @return {Object} The helper object related to post types.
  25195. */
  25196. const usePostTypes = () => {
  25197. const {
  25198. postTypes
  25199. } = Object(external_wp_data_["useSelect"])(select => {
  25200. var _getPostTypes;
  25201. const {
  25202. getPostTypes
  25203. } = select(external_wp_coreData_["store"]);
  25204. const excludedPostTypes = ['attachment'];
  25205. const filteredPostTypes = (_getPostTypes = getPostTypes({
  25206. per_page: -1
  25207. })) === null || _getPostTypes === void 0 ? void 0 : _getPostTypes.filter(({
  25208. viewable,
  25209. slug
  25210. }) => viewable && !excludedPostTypes.includes(slug));
  25211. return {
  25212. postTypes: filteredPostTypes
  25213. };
  25214. }, []);
  25215. const postTypesTaxonomiesMap = Object(external_wp_element_["useMemo"])(() => {
  25216. if (!(postTypes !== null && postTypes !== void 0 && postTypes.length)) return;
  25217. return postTypes.reduce((accumulator, type) => {
  25218. accumulator[type.slug] = type.taxonomies;
  25219. return accumulator;
  25220. }, {});
  25221. }, [postTypes]);
  25222. const postTypesSelectOptions = Object(external_wp_element_["useMemo"])(() => (postTypes || []).map(({
  25223. labels,
  25224. slug
  25225. }) => ({
  25226. label: labels.singular_name,
  25227. value: slug
  25228. })), [postTypes]);
  25229. return {
  25230. postTypesTaxonomiesMap,
  25231. postTypesSelectOptions
  25232. };
  25233. };
  25234. /**
  25235. * Recurses over a list of blocks and returns the first found
  25236. * Query Loop block's clientId.
  25237. *
  25238. * @param {WPBlock[]} blocks The list of blocks to look through.
  25239. * @return {string=} The first found Query Loop's clientId.
  25240. */
  25241. const getFirstQueryClientIdFromBlocks = blocks => {
  25242. const blocksQueue = [...blocks];
  25243. while (blocksQueue.length > 0) {
  25244. var _block$innerBlocks;
  25245. const block = blocksQueue.shift();
  25246. if (block.name === 'core/query') {
  25247. return block.clientId;
  25248. }
  25249. (_block$innerBlocks = block.innerBlocks) === null || _block$innerBlocks === void 0 ? void 0 : _block$innerBlocks.forEach(innerBlock => {
  25250. blocksQueue.push(innerBlock);
  25251. });
  25252. }
  25253. };
  25254. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/constants.js
  25255. const MAX_FETCHED_TERMS = 100;
  25256. const DEFAULTS_POSTS_PER_PAGE = 3;
  25257. /* harmony default export */ var constants = ({
  25258. MAX_FETCHED_TERMS,
  25259. DEFAULTS_POSTS_PER_PAGE
  25260. });
  25261. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/query-inspector-controls.js
  25262. /**
  25263. * External dependencies
  25264. */
  25265. /**
  25266. * WordPress dependencies
  25267. */
  25268. /**
  25269. * Internal dependencies
  25270. */
  25271. const stickyOptions = [{
  25272. label: Object(external_wp_i18n_["__"])('Include'),
  25273. value: ''
  25274. }, {
  25275. label: Object(external_wp_i18n_["__"])('Exclude'),
  25276. value: 'exclude'
  25277. }, {
  25278. label: Object(external_wp_i18n_["__"])('Only'),
  25279. value: 'only'
  25280. }]; // Helper function to get the term id based on user input in terms `FormTokenField`.
  25281. const getTermIdByTermValue = (termsMappedByName, termValue) => {
  25282. var _termsMappedByName$te;
  25283. // First we check for exact match by `term.id` or case sensitive `term.name` match.
  25284. const termId = (termValue === null || termValue === void 0 ? void 0 : termValue.id) || ((_termsMappedByName$te = termsMappedByName[termValue]) === null || _termsMappedByName$te === void 0 ? void 0 : _termsMappedByName$te.id);
  25285. if (termId) return termId;
  25286. /**
  25287. * Here we make an extra check for entered terms in a non case sensitive way,
  25288. * to match user expectations, due to `FormTokenField` behaviour that shows
  25289. * suggestions which are case insensitive.
  25290. *
  25291. * Although WP tries to discourage users to add terms with the same name (case insensitive),
  25292. * it's still possible if you manually change the name, as long as the terms have different slugs.
  25293. * In this edge case we always apply the first match from the terms list.
  25294. */
  25295. const termValueLower = termValue.toLocaleLowerCase();
  25296. for (const term in termsMappedByName) {
  25297. if (term.toLocaleLowerCase() === termValueLower) {
  25298. return termsMappedByName[term].id;
  25299. }
  25300. }
  25301. };
  25302. function QueryInspectorControls({
  25303. attributes: {
  25304. query,
  25305. displayLayout
  25306. },
  25307. setQuery,
  25308. setDisplayLayout
  25309. }) {
  25310. var _categories$terms, _tags$terms;
  25311. const {
  25312. order,
  25313. orderBy,
  25314. author: selectedAuthorId,
  25315. postType,
  25316. sticky,
  25317. inherit
  25318. } = query;
  25319. const [showCategories, setShowCategories] = Object(external_wp_element_["useState"])(true);
  25320. const [showTags, setShowTags] = Object(external_wp_element_["useState"])(true);
  25321. const [showSticky, setShowSticky] = Object(external_wp_element_["useState"])(postType === 'post');
  25322. const {
  25323. postTypesTaxonomiesMap,
  25324. postTypesSelectOptions
  25325. } = usePostTypes();
  25326. const {
  25327. authorList,
  25328. categories,
  25329. tags
  25330. } = Object(external_wp_data_["useSelect"])(select => {
  25331. const {
  25332. getEntityRecords
  25333. } = select(external_wp_coreData_["store"]);
  25334. const termsQuery = {
  25335. per_page: MAX_FETCHED_TERMS
  25336. };
  25337. const _categories = getEntityRecords('taxonomy', 'category', termsQuery);
  25338. const _tags = getEntityRecords('taxonomy', 'post_tag', termsQuery);
  25339. return {
  25340. categories: getTermsInfo(_categories),
  25341. tags: getTermsInfo(_tags),
  25342. authorList: getEntityRecords('root', 'user', {
  25343. per_page: -1
  25344. })
  25345. };
  25346. }, []);
  25347. Object(external_wp_element_["useEffect"])(() => {
  25348. if (!postTypesTaxonomiesMap) return;
  25349. const postTypeTaxonomies = postTypesTaxonomiesMap[postType];
  25350. setShowCategories(postTypeTaxonomies.includes('category'));
  25351. setShowTags(postTypeTaxonomies.includes('post_tag'));
  25352. }, [postType, postTypesTaxonomiesMap]);
  25353. Object(external_wp_element_["useEffect"])(() => {
  25354. setShowSticky(postType === 'post');
  25355. }, [postType]);
  25356. const onPostTypeChange = newValue => {
  25357. const updateQuery = {
  25358. postType: newValue
  25359. };
  25360. if (!postTypesTaxonomiesMap[newValue].includes('category')) {
  25361. updateQuery.categoryIds = [];
  25362. }
  25363. if (!postTypesTaxonomiesMap[newValue].includes('post_tag')) {
  25364. updateQuery.tagIds = [];
  25365. }
  25366. if (newValue !== 'post') {
  25367. updateQuery.sticky = '';
  25368. }
  25369. setQuery(updateQuery);
  25370. }; // Handles categories and tags changes.
  25371. const onTermsChange = (terms, queryProperty) => newTermValues => {
  25372. const termIds = Array.from(newTermValues.reduce((accumulator, termValue) => {
  25373. const termId = getTermIdByTermValue(terms.mapByName, termValue);
  25374. if (termId) accumulator.add(termId);
  25375. return accumulator;
  25376. }, new Set()));
  25377. setQuery({
  25378. [queryProperty]: termIds
  25379. });
  25380. };
  25381. const onCategoriesChange = onTermsChange(categories, 'categoryIds');
  25382. const onTagsChange = onTermsChange(tags, 'tagIds');
  25383. const [querySearch, setQuerySearch] = Object(external_wp_element_["useState"])(query.search);
  25384. const onChangeDebounced = Object(external_wp_element_["useCallback"])(Object(external_lodash_["debounce"])(() => {
  25385. if (query.search !== querySearch) {
  25386. setQuery({
  25387. search: querySearch
  25388. });
  25389. }
  25390. }, 250), [querySearch, query.search]);
  25391. Object(external_wp_element_["useEffect"])(() => {
  25392. onChangeDebounced();
  25393. return onChangeDebounced.cancel;
  25394. }, [querySearch, onChangeDebounced]); // Returns only the existing term ids (categories/tags) in proper
  25395. // format to be used in `FormTokenField`. This prevents the component
  25396. // from crashing in the editor, when non existing term ids were provided.
  25397. const getExistingTermsFormTokenValue = taxonomy => {
  25398. const termsMapper = {
  25399. category: {
  25400. queryProp: 'categoryIds',
  25401. terms: categories
  25402. },
  25403. post_tag: {
  25404. queryProp: 'tagIds',
  25405. terms: tags
  25406. }
  25407. };
  25408. const requestedTerm = termsMapper[taxonomy];
  25409. return (query[requestedTerm.queryProp] || []).reduce((accumulator, termId) => {
  25410. const term = requestedTerm.terms.mapById[termId];
  25411. if (term) {
  25412. accumulator.push({
  25413. id: termId,
  25414. value: term.name
  25415. });
  25416. }
  25417. return accumulator;
  25418. }, []);
  25419. };
  25420. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  25421. title: Object(external_wp_i18n_["__"])('Settings')
  25422. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  25423. label: Object(external_wp_i18n_["__"])('Inherit query from template'),
  25424. help: Object(external_wp_i18n_["__"])('Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'),
  25425. checked: !!inherit,
  25426. onChange: value => setQuery({
  25427. inherit: !!value
  25428. })
  25429. }), !inherit && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  25430. options: postTypesSelectOptions,
  25431. value: postType,
  25432. label: Object(external_wp_i18n_["__"])('Post Type'),
  25433. onChange: onPostTypeChange,
  25434. help: Object(external_wp_i18n_["__"])('WordPress contains different types of content and they are divided into collections called "Post Types". By default there are a few different ones such as blog posts and pages, but plugins could add more.')
  25435. }), (displayLayout === null || displayLayout === void 0 ? void 0 : displayLayout.type) === 'flex' && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
  25436. label: Object(external_wp_i18n_["__"])('Columns'),
  25437. value: displayLayout.columns,
  25438. onChange: value => setDisplayLayout({
  25439. columns: value
  25440. }),
  25441. min: 2,
  25442. max: Math.max(6, displayLayout.columns)
  25443. }), displayLayout.columns > 6 && Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
  25444. status: "warning",
  25445. isDismissible: false
  25446. }, Object(external_wp_i18n_["__"])('This column count exceeds the recommended amount and may cause visual breakage.'))), !inherit && Object(external_wp_element_["createElement"])(external_wp_components_["QueryControls"], {
  25447. order,
  25448. orderBy,
  25449. onOrderChange: value => setQuery({
  25450. order: value
  25451. }),
  25452. onOrderByChange: value => setQuery({
  25453. orderBy: value
  25454. })
  25455. }), showSticky && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  25456. label: Object(external_wp_i18n_["__"])('Sticky posts'),
  25457. options: stickyOptions,
  25458. value: sticky,
  25459. onChange: value => setQuery({
  25460. sticky: value
  25461. }),
  25462. help: Object(external_wp_i18n_["__"])('Blog posts can be "stickied", a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.')
  25463. })), !inherit && Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  25464. title: Object(external_wp_i18n_["__"])('Filters')
  25465. }, showCategories && (categories === null || categories === void 0 ? void 0 : (_categories$terms = categories.terms) === null || _categories$terms === void 0 ? void 0 : _categories$terms.length) > 0 && Object(external_wp_element_["createElement"])(external_wp_components_["FormTokenField"], {
  25466. label: Object(external_wp_i18n_["__"])('Categories'),
  25467. value: getExistingTermsFormTokenValue('category'),
  25468. suggestions: categories.names,
  25469. onChange: onCategoriesChange
  25470. }), showTags && (tags === null || tags === void 0 ? void 0 : (_tags$terms = tags.terms) === null || _tags$terms === void 0 ? void 0 : _tags$terms.length) > 0 && Object(external_wp_element_["createElement"])(external_wp_components_["FormTokenField"], {
  25471. label: Object(external_wp_i18n_["__"])('Tags'),
  25472. value: getExistingTermsFormTokenValue('post_tag'),
  25473. suggestions: tags.names,
  25474. onChange: onTagsChange
  25475. }), Object(external_wp_element_["createElement"])(external_wp_components_["QueryControls"], {
  25476. selectedAuthorId,
  25477. authorList,
  25478. onAuthorChange: value => setQuery({
  25479. author: value !== '' ? +value : undefined
  25480. })
  25481. }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  25482. label: Object(external_wp_i18n_["__"])('Keyword'),
  25483. value: querySearch,
  25484. onChange: setQuerySearch
  25485. })));
  25486. }
  25487. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/query-placeholder.js
  25488. /**
  25489. * WordPress dependencies
  25490. */
  25491. const QueryPlaceholder = ({
  25492. clientId,
  25493. name,
  25494. attributes,
  25495. setAttributes
  25496. }) => {
  25497. var _blockType$icon;
  25498. const {
  25499. blockType,
  25500. defaultVariation,
  25501. scopeVariations,
  25502. allVariations
  25503. } = Object(external_wp_data_["useSelect"])(select => {
  25504. const {
  25505. getBlockVariations,
  25506. getBlockType,
  25507. getDefaultBlockVariation
  25508. } = select(external_wp_blocks_["store"]);
  25509. return {
  25510. blockType: getBlockType(name),
  25511. defaultVariation: getDefaultBlockVariation(name, 'block'),
  25512. scopeVariations: getBlockVariations(name, 'block'),
  25513. allVariations: getBlockVariations(name)
  25514. };
  25515. }, [name]);
  25516. const {
  25517. replaceInnerBlocks
  25518. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  25519. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  25520. const matchingVariation = Object(external_wp_blockEditor_["__experimentalGetMatchingVariation"])(attributes, allVariations);
  25521. const icon = (matchingVariation === null || matchingVariation === void 0 ? void 0 : matchingVariation.icon) || (blockType === null || blockType === void 0 ? void 0 : (_blockType$icon = blockType.icon) === null || _blockType$icon === void 0 ? void 0 : _blockType$icon.src);
  25522. const label = (matchingVariation === null || matchingVariation === void 0 ? void 0 : matchingVariation.title) || (blockType === null || blockType === void 0 ? void 0 : blockType.title);
  25523. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockVariationPicker"], {
  25524. icon: icon,
  25525. label: label,
  25526. variations: scopeVariations,
  25527. onSelect: (nextVariation = defaultVariation) => {
  25528. if (nextVariation.attributes) {
  25529. setAttributes(nextVariation.attributes);
  25530. }
  25531. if (nextVariation.innerBlocks) {
  25532. replaceInnerBlocks(clientId, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(nextVariation.innerBlocks), false);
  25533. }
  25534. }
  25535. }));
  25536. };
  25537. /* harmony default export */ var query_placeholder = (QueryPlaceholder);
  25538. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/index.js
  25539. /**
  25540. * WordPress dependencies
  25541. */
  25542. /**
  25543. * Internal dependencies
  25544. */
  25545. const edit_TEMPLATE = [['core/post-template']];
  25546. function QueryContent({
  25547. attributes,
  25548. setAttributes
  25549. }) {
  25550. const {
  25551. queryId,
  25552. query,
  25553. displayLayout,
  25554. tagName: TagName = 'div',
  25555. layout = {}
  25556. } = attributes;
  25557. const {
  25558. __unstableMarkNextChangeAsNotPersistent
  25559. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  25560. const instanceId = Object(external_wp_compose_["useInstanceId"])(QueryContent);
  25561. const {
  25562. themeSupportsLayout
  25563. } = Object(external_wp_data_["useSelect"])(select => {
  25564. var _getSettings;
  25565. const {
  25566. getSettings
  25567. } = select(external_wp_blockEditor_["store"]);
  25568. return {
  25569. themeSupportsLayout: (_getSettings = getSettings()) === null || _getSettings === void 0 ? void 0 : _getSettings.supportsLayout
  25570. };
  25571. }, []);
  25572. const defaultLayout = Object(external_wp_blockEditor_["useSetting"])('layout') || {};
  25573. const usedLayout = !!layout && layout.inherit ? defaultLayout : layout;
  25574. const {
  25575. contentSize,
  25576. wideSize
  25577. } = usedLayout;
  25578. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  25579. const _layout = Object(external_wp_element_["useMemo"])(() => {
  25580. if (themeSupportsLayout) {
  25581. const alignments = contentSize || wideSize ? ['wide', 'full', 'left', 'center', 'right'] : ['left', 'center', 'right'];
  25582. return {
  25583. type: 'default',
  25584. // Find a way to inject this in the support flag code (hooks).
  25585. alignments
  25586. };
  25587. }
  25588. return undefined;
  25589. }, [themeSupportsLayout, contentSize, wideSize]);
  25590. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
  25591. template: edit_TEMPLATE,
  25592. __experimentalLayout: _layout
  25593. });
  25594. const {
  25595. postsPerPage
  25596. } = Object(external_wp_data_["useSelect"])(select => {
  25597. const {
  25598. getSettings
  25599. } = select(external_wp_blockEditor_["store"]);
  25600. return {
  25601. postsPerPage: +getSettings().postsPerPage || DEFAULTS_POSTS_PER_PAGE
  25602. };
  25603. }, []); // There are some effects running where some initialization logic is
  25604. // happening and setting some values to some attributes (ex. queryId).
  25605. // These updates can cause an `undo trap` where undoing will result in
  25606. // resetting again, so we need to mark these changes as not persistent
  25607. // with `__unstableMarkNextChangeAsNotPersistent`.
  25608. // Changes in query property (which is an object) need to be in the same callback,
  25609. // because updates are batched after the render and changes in different query properties
  25610. // would cause to overide previous wanted changes.
  25611. Object(external_wp_element_["useEffect"])(() => {
  25612. const newQuery = {};
  25613. if (!query.perPage && postsPerPage) {
  25614. newQuery.perPage = postsPerPage;
  25615. }
  25616. if (!!Object.keys(newQuery).length) {
  25617. __unstableMarkNextChangeAsNotPersistent();
  25618. updateQuery(newQuery);
  25619. }
  25620. }, [query.perPage]); // We need this for multi-query block pagination.
  25621. // Query parameters for each block are scoped to their ID.
  25622. Object(external_wp_element_["useEffect"])(() => {
  25623. if (!queryId) {
  25624. __unstableMarkNextChangeAsNotPersistent();
  25625. setAttributes({
  25626. queryId: instanceId
  25627. });
  25628. }
  25629. }, [queryId, instanceId]);
  25630. const updateQuery = newQuery => setAttributes({
  25631. query: { ...query,
  25632. ...newQuery
  25633. }
  25634. });
  25635. const updateDisplayLayout = newDisplayLayout => setAttributes({
  25636. displayLayout: { ...displayLayout,
  25637. ...newDisplayLayout
  25638. }
  25639. });
  25640. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(QueryInspectorControls, {
  25641. attributes: attributes,
  25642. setQuery: updateQuery,
  25643. setDisplayLayout: updateDisplayLayout
  25644. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(QueryToolbar, {
  25645. attributes: attributes,
  25646. setQuery: updateQuery,
  25647. setDisplayLayout: updateDisplayLayout
  25648. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  25649. label: Object(external_wp_i18n_["__"])('HTML element'),
  25650. options: [{
  25651. label: Object(external_wp_i18n_["__"])('Default (<div>)'),
  25652. value: 'div'
  25653. }, {
  25654. label: '<main>',
  25655. value: 'main'
  25656. }, {
  25657. label: '<section>',
  25658. value: 'section'
  25659. }, {
  25660. label: '<aside>',
  25661. value: 'aside'
  25662. }],
  25663. value: TagName,
  25664. onChange: value => setAttributes({
  25665. tagName: value
  25666. })
  25667. })), Object(external_wp_element_["createElement"])(TagName, innerBlocksProps));
  25668. }
  25669. function QueryPatternSetup(props) {
  25670. const {
  25671. clientId,
  25672. name: blockName
  25673. } = props;
  25674. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  25675. const {
  25676. replaceBlock,
  25677. selectBlock
  25678. } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  25679. const onBlockPatternSelect = blocks => {
  25680. const clonedBlocks = blocks.map(block => Object(external_wp_blocks_["cloneBlock"])(block));
  25681. const firstQueryClientId = getFirstQueryClientIdFromBlocks(clonedBlocks);
  25682. replaceBlock(clientId, clonedBlocks);
  25683. if (firstQueryClientId) {
  25684. selectBlock(firstQueryClientId);
  25685. }
  25686. }; // `startBlankComponent` is what to render when clicking `Start blank`
  25687. // or if no matched patterns are found.
  25688. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockPatternSetup"], {
  25689. blockName: blockName,
  25690. clientId: clientId,
  25691. startBlankComponent: Object(external_wp_element_["createElement"])(query_placeholder, props),
  25692. onBlockPatternSelect: onBlockPatternSelect
  25693. }));
  25694. }
  25695. const QueryEdit = props => {
  25696. const {
  25697. clientId
  25698. } = props;
  25699. const hasInnerBlocks = Object(external_wp_data_["useSelect"])(select => !!select(external_wp_blockEditor_["store"]).getBlocks(clientId).length, [clientId]);
  25700. const Component = hasInnerBlocks ? QueryContent : QueryPatternSetup;
  25701. return Object(external_wp_element_["createElement"])(Component, props);
  25702. };
  25703. /* harmony default export */ var query_edit = (QueryEdit);
  25704. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/save.js
  25705. /**
  25706. * WordPress dependencies
  25707. */
  25708. function QuerySave({
  25709. attributes: {
  25710. tagName: Tag = 'div'
  25711. }
  25712. }) {
  25713. return Object(external_wp_element_["createElement"])(Tag, external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  25714. }
  25715. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/icons.js
  25716. /**
  25717. * WordPress dependencies
  25718. */
  25719. const titleDate = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  25720. xmlns: "http://www.w3.org/2000/svg",
  25721. viewBox: "0 0 48 48"
  25722. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  25723. d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"
  25724. }));
  25725. const titleExcerpt = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  25726. xmlns: "http://www.w3.org/2000/svg",
  25727. viewBox: "0 0 48 48"
  25728. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  25729. d: "M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"
  25730. }));
  25731. const titleDateExcerpt = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  25732. xmlns: "http://www.w3.org/2000/svg",
  25733. viewBox: "0 0 48 48"
  25734. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  25735. d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"
  25736. }));
  25737. const imageDateTitle = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  25738. xmlns: "http://www.w3.org/2000/svg",
  25739. viewBox: "0 0 48 48"
  25740. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  25741. d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"
  25742. }));
  25743. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/variations.js
  25744. /**
  25745. * WordPress dependencies
  25746. */
  25747. /**
  25748. * Internal dependencies
  25749. */
  25750. const QUERY_DEFAULT_ATTRIBUTES = {
  25751. query: {
  25752. perPage: 3,
  25753. pages: 0,
  25754. offset: 0,
  25755. postType: 'post',
  25756. categoryIds: [],
  25757. tagIds: [],
  25758. order: 'desc',
  25759. orderBy: 'date',
  25760. author: '',
  25761. search: '',
  25762. exclude: [],
  25763. sticky: '',
  25764. inherit: false
  25765. }
  25766. };
  25767. const query_variations_variations = [{
  25768. name: 'posts-list',
  25769. title: Object(external_wp_i18n_["__"])('Posts List'),
  25770. description: Object(external_wp_i18n_["__"])('Display a list of your most recent posts, excluding sticky posts.'),
  25771. icon: post_list,
  25772. attributes: {
  25773. query: {
  25774. perPage: 4,
  25775. pages: 1,
  25776. offset: 0,
  25777. postType: 'post',
  25778. categoryIds: [],
  25779. tagIds: [],
  25780. order: 'desc',
  25781. orderBy: 'date',
  25782. author: '',
  25783. search: '',
  25784. sticky: 'exclude',
  25785. inherit: false
  25786. }
  25787. },
  25788. scope: ['inserter']
  25789. }, {
  25790. name: 'title-date',
  25791. title: Object(external_wp_i18n_["__"])('Title & Date'),
  25792. icon: titleDate,
  25793. attributes: { ...QUERY_DEFAULT_ATTRIBUTES
  25794. },
  25795. innerBlocks: [['core/post-template', {}, [['core/post-title'], ['core/post-date']]]],
  25796. scope: ['block']
  25797. }, {
  25798. name: 'title-excerpt',
  25799. title: Object(external_wp_i18n_["__"])('Title & Excerpt'),
  25800. icon: titleExcerpt,
  25801. attributes: { ...QUERY_DEFAULT_ATTRIBUTES
  25802. },
  25803. innerBlocks: [['core/post-template', {}, [['core/post-title'], ['core/post-excerpt']]]],
  25804. scope: ['block']
  25805. }, {
  25806. name: 'title-date-excerpt',
  25807. title: Object(external_wp_i18n_["__"])('Title, Date, & Excerpt'),
  25808. icon: titleDateExcerpt,
  25809. attributes: { ...QUERY_DEFAULT_ATTRIBUTES
  25810. },
  25811. innerBlocks: [['core/post-template', {}, [['core/post-title'], ['core/post-date'], ['core/post-excerpt']]]],
  25812. scope: ['block']
  25813. }, {
  25814. name: 'image-date-title',
  25815. title: Object(external_wp_i18n_["__"])('Image, Date, & Title'),
  25816. icon: imageDateTitle,
  25817. attributes: { ...QUERY_DEFAULT_ATTRIBUTES
  25818. },
  25819. innerBlocks: [['core/post-template', {}, [['core/post-featured-image'], ['core/post-date'], ['core/post-title']]]],
  25820. scope: ['block']
  25821. }];
  25822. /* harmony default export */ var query_variations = (query_variations_variations);
  25823. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/deprecated.js
  25824. /**
  25825. * WordPress dependencies
  25826. */
  25827. const query_deprecated_deprecated = [// Version with NO wrapper `div` element.
  25828. {
  25829. attributes: {
  25830. queryId: {
  25831. type: 'number'
  25832. },
  25833. query: {
  25834. type: 'object',
  25835. default: {
  25836. perPage: null,
  25837. pages: 0,
  25838. offset: 0,
  25839. postType: 'post',
  25840. categoryIds: [],
  25841. tagIds: [],
  25842. order: 'desc',
  25843. orderBy: 'date',
  25844. author: '',
  25845. search: '',
  25846. exclude: [],
  25847. sticky: '',
  25848. inherit: true
  25849. }
  25850. },
  25851. layout: {
  25852. type: 'object',
  25853. default: {
  25854. type: 'list'
  25855. }
  25856. }
  25857. },
  25858. supports: {
  25859. html: false
  25860. },
  25861. save() {
  25862. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null);
  25863. }
  25864. }];
  25865. /* harmony default export */ var query_deprecated = (query_deprecated_deprecated);
  25866. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/hooks.js
  25867. /**
  25868. * WordPress dependencies
  25869. */
  25870. const CreateNewPostLink = ({
  25871. attributes: {
  25872. query: {
  25873. postType
  25874. } = {}
  25875. } = {}
  25876. }) => {
  25877. if (!postType) return null;
  25878. const newPostUrl = Object(external_wp_url_["addQueryArgs"])('post-new.php', {
  25879. post_type: postType
  25880. });
  25881. return Object(external_wp_element_["createElement"])("div", {
  25882. className: "wp-block-query__create-new-link"
  25883. }, Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["__"])('<a>Create a new post</a> for this feed.'), // eslint-disable-next-line jsx-a11y/anchor-has-content
  25884. {
  25885. a: Object(external_wp_element_["createElement"])("a", {
  25886. href: newPostUrl
  25887. })
  25888. }));
  25889. };
  25890. /**
  25891. * Override the default edit UI to include layout controls
  25892. *
  25893. * @param {Function} BlockEdit Original component
  25894. * @return {Function} Wrapped component
  25895. */
  25896. const queryTopInspectorControls = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => props => {
  25897. const {
  25898. name,
  25899. isSelected
  25900. } = props;
  25901. if (name !== 'core/query' || !isSelected) {
  25902. return Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
  25903. key: "edit"
  25904. }, props));
  25905. }
  25906. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(CreateNewPostLink, props)), Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
  25907. key: "edit"
  25908. }, props)));
  25909. }, 'withInspectorControls');
  25910. /* harmony default export */ var hooks = (queryTopInspectorControls);
  25911. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/index.js
  25912. /**
  25913. * WordPress dependencies
  25914. */
  25915. /**
  25916. * Internal dependencies
  25917. */
  25918. const query_metadata = {
  25919. apiVersion: 2,
  25920. name: "core/query",
  25921. title: "Query Loop",
  25922. category: "theme",
  25923. description: "An advanced block that allows displaying post types based on different query parameters and visual configurations.",
  25924. textdomain: "default",
  25925. attributes: {
  25926. queryId: {
  25927. type: "number"
  25928. },
  25929. query: {
  25930. type: "object",
  25931. "default": {
  25932. perPage: null,
  25933. pages: 0,
  25934. offset: 0,
  25935. postType: "post",
  25936. categoryIds: [],
  25937. tagIds: [],
  25938. order: "desc",
  25939. orderBy: "date",
  25940. author: "",
  25941. search: "",
  25942. exclude: [],
  25943. sticky: "",
  25944. inherit: true
  25945. }
  25946. },
  25947. tagName: {
  25948. type: "string",
  25949. "default": "div"
  25950. },
  25951. displayLayout: {
  25952. type: "object",
  25953. "default": {
  25954. type: "list"
  25955. }
  25956. }
  25957. },
  25958. providesContext: {
  25959. queryId: "queryId",
  25960. query: "query",
  25961. displayLayout: "displayLayout"
  25962. },
  25963. supports: {
  25964. align: ["wide", "full"],
  25965. html: false,
  25966. color: {
  25967. gradients: true,
  25968. link: true
  25969. },
  25970. __experimentalLayout: true
  25971. },
  25972. editorStyle: "wp-block-query-editor"
  25973. };
  25974. const {
  25975. name: query_name
  25976. } = query_metadata;
  25977. const query_settings = {
  25978. icon: library_loop,
  25979. edit: query_edit,
  25980. save: QuerySave,
  25981. variations: query_variations,
  25982. deprecated: query_deprecated
  25983. }; // Importing this file includes side effects and is whitelisted
  25984. // in block-library/package.json under `sideEffects`.
  25985. Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/query', hooks);
  25986. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/edit.js
  25987. /**
  25988. * External dependencies
  25989. */
  25990. /**
  25991. * WordPress dependencies
  25992. */
  25993. const post_template_edit_TEMPLATE = [['core/post-title'], ['core/post-date'], ['core/post-excerpt']];
  25994. function PostTemplateEdit({
  25995. clientId,
  25996. context: {
  25997. query: {
  25998. perPage,
  25999. offset,
  26000. categoryIds,
  26001. postType,
  26002. tagIds = [],
  26003. order,
  26004. orderBy,
  26005. author,
  26006. search,
  26007. exclude,
  26008. sticky,
  26009. inherit
  26010. } = {},
  26011. queryContext = [{
  26012. page: 1
  26013. }],
  26014. templateSlug,
  26015. displayLayout: {
  26016. type: layoutType = 'flex',
  26017. columns = 1
  26018. } = {}
  26019. }
  26020. }) {
  26021. const [{
  26022. page
  26023. }] = queryContext;
  26024. const [activeBlockContext, setActiveBlockContext] = Object(external_wp_element_["useState"])();
  26025. const {
  26026. posts,
  26027. blocks
  26028. } = Object(external_wp_data_["useSelect"])(select => {
  26029. const {
  26030. getEntityRecords
  26031. } = select(external_wp_coreData_["store"]);
  26032. const {
  26033. getBlocks
  26034. } = select(external_wp_blockEditor_["store"]);
  26035. const query = {
  26036. offset: perPage ? perPage * (page - 1) + offset : 0,
  26037. categories: categoryIds,
  26038. tags: tagIds,
  26039. order,
  26040. orderby: orderBy
  26041. };
  26042. if (perPage) {
  26043. query.per_page = perPage;
  26044. }
  26045. if (author) {
  26046. query.author = author;
  26047. }
  26048. if (search) {
  26049. query.search = search;
  26050. }
  26051. if (exclude !== null && exclude !== void 0 && exclude.length) {
  26052. query.exclude = exclude;
  26053. } // If sticky is not set, it will return all posts in the results.
  26054. // If sticky is set to `only`, it will limit the results to sticky posts only.
  26055. // If it is anything else, it will exclude sticky posts from results. For the record the value stored is `exclude`.
  26056. if (sticky) {
  26057. query.sticky = sticky === 'only';
  26058. } // If `inherit` is truthy, adjust conditionally the query to create a better preview.
  26059. if (inherit) {
  26060. // Change the post-type if needed.
  26061. if (templateSlug !== null && templateSlug !== void 0 && templateSlug.startsWith('archive-')) {
  26062. query.postType = templateSlug.replace('archive-', '');
  26063. postType = query.postType;
  26064. }
  26065. }
  26066. return {
  26067. posts: getEntityRecords('postType', postType, query),
  26068. blocks: getBlocks(clientId)
  26069. };
  26070. }, [perPage, page, offset, categoryIds, tagIds, order, orderBy, clientId, author, search, postType, exclude, sticky, inherit, templateSlug]);
  26071. const blockContexts = Object(external_wp_element_["useMemo"])(() => posts === null || posts === void 0 ? void 0 : posts.map(post => ({
  26072. postType: post.type,
  26073. postId: post.id
  26074. })), [posts]);
  26075. const hasLayoutFlex = layoutType === 'flex' && columns > 1;
  26076. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  26077. className: classnames_default()({
  26078. 'is-flex-container': hasLayoutFlex,
  26079. [`columns-${columns}`]: hasLayoutFlex
  26080. })
  26081. });
  26082. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({}, {
  26083. template: post_template_edit_TEMPLATE
  26084. });
  26085. if (!posts) {
  26086. return Object(external_wp_element_["createElement"])("p", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null));
  26087. }
  26088. if (!posts.length) {
  26089. return Object(external_wp_element_["createElement"])("p", blockProps, " ", Object(external_wp_i18n_["__"])('No results found.'));
  26090. }
  26091. return Object(external_wp_element_["createElement"])("ul", blockProps, blockContexts && blockContexts.map(blockContext => Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockContextProvider"], {
  26092. key: blockContext.postId,
  26093. value: blockContext
  26094. }, blockContext === (activeBlockContext || blockContexts[0]) ? Object(external_wp_element_["createElement"])("li", innerBlocksProps) : Object(external_wp_element_["createElement"])("li", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockPreview"], {
  26095. blocks: blocks,
  26096. __experimentalLive: true,
  26097. __experimentalOnClick: () => setActiveBlockContext(blockContext)
  26098. })))));
  26099. }
  26100. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/save.js
  26101. /**
  26102. * WordPress dependencies
  26103. */
  26104. function PostTemplateSave() {
  26105. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null);
  26106. }
  26107. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/index.js
  26108. /**
  26109. * WordPress dependencies
  26110. */
  26111. /**
  26112. * Internal dependencies
  26113. */
  26114. const post_template_metadata = {
  26115. apiVersion: 2,
  26116. name: "core/post-template",
  26117. title: "Post Template",
  26118. category: "design",
  26119. parent: ["core/query"],
  26120. description: "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",
  26121. textdomain: "default",
  26122. usesContext: ["queryId", "query", "queryContext", "displayLayout", "templateSlug"],
  26123. supports: {
  26124. reusable: false,
  26125. html: false,
  26126. align: true
  26127. },
  26128. style: "wp-block-post-template",
  26129. editorStyle: "wp-block-post-template-editor"
  26130. };
  26131. const {
  26132. name: post_template_name
  26133. } = post_template_metadata;
  26134. const post_template_settings = {
  26135. icon: library_loop,
  26136. edit: PostTemplateEdit,
  26137. save: PostTemplateSave
  26138. };
  26139. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/edit.js
  26140. /**
  26141. * External dependencies
  26142. */
  26143. /**
  26144. * WordPress dependencies
  26145. */
  26146. // import { useSelect, useDispatch } from '@wordpress/data';
  26147. /**
  26148. * Internal dependencies
  26149. */
  26150. const SUPPORTED_TYPES = ['archive'];
  26151. function QueryTitleEdit({
  26152. attributes: {
  26153. type,
  26154. level,
  26155. textAlign
  26156. },
  26157. setAttributes
  26158. }) {
  26159. const TagName = `h${level}`;
  26160. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  26161. className: classnames_default()({
  26162. [`has-text-align-${textAlign}`]: textAlign,
  26163. 'wp-block-query-title__placeholder': type === 'archive'
  26164. })
  26165. }); // The plan is to augment this block with more
  26166. // block variations like `Search Title`.
  26167. if (!SUPPORTED_TYPES.includes(type)) {
  26168. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Provided type is not supported.')));
  26169. }
  26170. let titleElement;
  26171. if (type === 'archive') {
  26172. titleElement = Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_i18n_["__"])('Archive title'));
  26173. }
  26174. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  26175. group: "block"
  26176. }, Object(external_wp_element_["createElement"])(HeadingLevelDropdown, {
  26177. selectedLevel: level,
  26178. onChange: newLevel => setAttributes({
  26179. level: newLevel
  26180. })
  26181. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  26182. value: textAlign,
  26183. onChange: nextAlign => {
  26184. setAttributes({
  26185. textAlign: nextAlign
  26186. });
  26187. }
  26188. })), titleElement);
  26189. }
  26190. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive-title.js
  26191. /**
  26192. * WordPress dependencies
  26193. */
  26194. const archiveTitle = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26195. viewBox: "0 0 24 24",
  26196. xmlns: "http://www.w3.org/2000/svg"
  26197. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26198. stroke: "#1E1E1E",
  26199. strokeWidth: "1.5",
  26200. d: "M4 19.25h9M4 15.25h16"
  26201. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26202. d: "M8.994 10.103H6.08L5.417 12H4l2.846-8h1.383l2.845 8H9.657l-.663-1.897zm-.457-1.28l-.994-2.857-1.006 2.857h2z",
  26203. fill: "#1E1E1E"
  26204. }));
  26205. /* harmony default export */ var archive_title = (archiveTitle);
  26206. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/variations.js
  26207. /**
  26208. * WordPress dependencies
  26209. */
  26210. const query_title_variations_variations = [{
  26211. isDefault: true,
  26212. name: 'archive-title',
  26213. title: Object(external_wp_i18n_["__"])('Archive Title'),
  26214. description: Object(external_wp_i18n_["__"])('Display the archive title based on the queried object.'),
  26215. icon: archive_title,
  26216. attributes: {
  26217. type: 'archive'
  26218. },
  26219. scope: ['inserter']
  26220. }];
  26221. /**
  26222. * Add `isActive` function to all `query-title` variations, if not defined.
  26223. * `isActive` function is used to find a variation match from a created
  26224. * Block by providing its attributes.
  26225. */
  26226. query_title_variations_variations.forEach(variation => {
  26227. if (variation.isActive) return;
  26228. variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
  26229. });
  26230. /* harmony default export */ var query_title_variations = (query_title_variations_variations);
  26231. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/index.js
  26232. /**
  26233. * Internal dependencies
  26234. */
  26235. const query_title_metadata = {
  26236. apiVersion: 2,
  26237. name: "core/query-title",
  26238. title: "Query Title",
  26239. category: "design",
  26240. description: "Display the query title.",
  26241. textdomain: "default",
  26242. attributes: {
  26243. type: {
  26244. type: "string"
  26245. },
  26246. textAlign: {
  26247. type: "string"
  26248. },
  26249. level: {
  26250. type: "number",
  26251. "default": 1
  26252. }
  26253. },
  26254. supports: {
  26255. align: ["wide", "full"],
  26256. html: false,
  26257. color: {
  26258. gradients: true
  26259. },
  26260. typography: {
  26261. fontSize: true,
  26262. lineHeight: true,
  26263. __experimentalFontFamily: true
  26264. }
  26265. },
  26266. editorStyle: "wp-block-query-title-editor"
  26267. };
  26268. const {
  26269. name: query_title_name
  26270. } = query_title_metadata;
  26271. const query_title_settings = {
  26272. edit: QueryTitleEdit,
  26273. variations: query_title_variations
  26274. };
  26275. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination.js
  26276. /**
  26277. * WordPress dependencies
  26278. */
  26279. const queryPagination = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26280. xmlns: "http://www.w3.org/2000/svg",
  26281. viewBox: "0 0 24 24"
  26282. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26283. x: "4",
  26284. y: "10.5",
  26285. width: "6",
  26286. height: "3",
  26287. rx: "1.5",
  26288. fill: "#000"
  26289. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26290. x: "12",
  26291. y: "10.5",
  26292. width: "3",
  26293. height: "3",
  26294. rx: "1.5",
  26295. fill: "#000"
  26296. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26297. x: "17",
  26298. y: "10.5",
  26299. width: "3",
  26300. height: "3",
  26301. rx: "1.5",
  26302. fill: "#000"
  26303. }));
  26304. /* harmony default export */ var query_pagination = (queryPagination);
  26305. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/edit.js
  26306. /**
  26307. * WordPress dependencies
  26308. */
  26309. const query_pagination_edit_TEMPLATE = [['core/query-pagination-previous'], ['core/query-pagination-numbers'], ['core/query-pagination-next']];
  26310. function QueryPaginationEdit() {
  26311. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  26312. const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
  26313. template: query_pagination_edit_TEMPLATE,
  26314. allowedBlocks: ['core/query-pagination-previous', 'core/query-pagination-numbers', 'core/query-pagination-next'],
  26315. orientation: 'horizontal'
  26316. });
  26317. return Object(external_wp_element_["createElement"])("div", innerBlocksProps);
  26318. }
  26319. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/save.js
  26320. /**
  26321. * WordPress dependencies
  26322. */
  26323. function query_pagination_save_save() {
  26324. return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
  26325. }
  26326. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
  26327. /**
  26328. * WordPress dependencies
  26329. */
  26330. /**
  26331. * Internal dependencies
  26332. */
  26333. const query_pagination_metadata = {
  26334. apiVersion: 2,
  26335. name: "core/query-pagination",
  26336. title: "Query Pagination",
  26337. category: "design",
  26338. parent: ["core/query"],
  26339. description: "Displays a paginated navigation to next/previous set of posts, when applicable.",
  26340. textdomain: "default",
  26341. usesContext: ["queryId", "query"],
  26342. supports: {
  26343. align: true,
  26344. reusable: false,
  26345. html: false,
  26346. color: {
  26347. gradients: true,
  26348. link: true
  26349. }
  26350. },
  26351. editorStyle: "wp-block-query-pagination-editor",
  26352. style: "wp-block-query-pagination"
  26353. };
  26354. const {
  26355. name: query_pagination_name
  26356. } = query_pagination_metadata;
  26357. const query_pagination_settings = {
  26358. icon: query_pagination,
  26359. edit: QueryPaginationEdit,
  26360. save: query_pagination_save_save
  26361. };
  26362. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination-next.js
  26363. /**
  26364. * WordPress dependencies
  26365. */
  26366. const queryPaginationNext = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26367. xmlns: "http://www.w3.org/2000/svg",
  26368. viewBox: "0 0 24 24"
  26369. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26370. x: "6",
  26371. y: "10.5",
  26372. width: "3",
  26373. height: "3",
  26374. rx: "1.5",
  26375. fill: "#000"
  26376. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26377. x: "11",
  26378. y: "10.5",
  26379. width: "3",
  26380. height: "3",
  26381. rx: "1.5",
  26382. fill: "#000"
  26383. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26384. d: "M16.5 9.5L19 12l-2.5 2.5",
  26385. stroke: "#1E1E1E",
  26386. strokeWidth: "1.5"
  26387. }));
  26388. /* harmony default export */ var query_pagination_next = (queryPaginationNext);
  26389. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/edit.js
  26390. /**
  26391. * WordPress dependencies
  26392. */
  26393. function QueryPaginationNextEdit({
  26394. attributes: {
  26395. label
  26396. },
  26397. setAttributes
  26398. }) {
  26399. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], Object(esm_extends["a" /* default */])({
  26400. __experimentalVersion: 2,
  26401. tagName: "a",
  26402. style: {
  26403. display: 'inline-block'
  26404. },
  26405. "aria-label": Object(external_wp_i18n_["__"])('Next page link'),
  26406. placeholder: Object(external_wp_i18n_["__"])('Next Page'),
  26407. value: label,
  26408. onChange: newLabel => setAttributes({
  26409. label: newLabel
  26410. })
  26411. }, Object(external_wp_blockEditor_["useBlockProps"])()));
  26412. }
  26413. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
  26414. /**
  26415. * WordPress dependencies
  26416. */
  26417. /**
  26418. * Internal dependencies
  26419. */
  26420. const query_pagination_next_metadata = {
  26421. apiVersion: 2,
  26422. name: "core/query-pagination-next",
  26423. title: "Query Pagination Next",
  26424. category: "design",
  26425. parent: ["core/query-pagination"],
  26426. description: "Displays the next posts page link.",
  26427. textdomain: "default",
  26428. attributes: {
  26429. label: {
  26430. type: "string"
  26431. }
  26432. },
  26433. usesContext: ["queryId", "query"],
  26434. supports: {
  26435. reusable: false,
  26436. html: false,
  26437. color: {
  26438. gradients: true,
  26439. link: true
  26440. },
  26441. typography: {
  26442. fontSize: true,
  26443. lineHeight: true
  26444. }
  26445. }
  26446. };
  26447. const {
  26448. name: query_pagination_next_name
  26449. } = query_pagination_next_metadata;
  26450. const query_pagination_next_settings = {
  26451. icon: query_pagination_next,
  26452. edit: QueryPaginationNextEdit
  26453. };
  26454. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination-numbers.js
  26455. /**
  26456. * WordPress dependencies
  26457. */
  26458. const queryPaginationNumbers = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26459. xmlns: "http://www.w3.org/2000/svg",
  26460. viewBox: "0 0 24 24"
  26461. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26462. x: "4",
  26463. y: "10.5",
  26464. width: "6",
  26465. height: "3",
  26466. rx: "1.5",
  26467. fill: "#000"
  26468. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26469. d: "M13.5 14v-4l-1.5.5",
  26470. stroke: "#1E1E1E"
  26471. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26472. d: "M19.266 9.805c-.473-.611-1.22-.51-1.702-.367a3.854 3.854 0 00-.718.307l.13 1.082c.192-.17.47-.422.782-.515.34-.1.578.025.668.141.21.27-.034.835-.16 1.055-.49.85-.93 1.594-1.45 2.492H19.5v-1h-.914c.277-.574.814-1.443.914-2.106.052-.343.02-.762-.234-1.09z",
  26473. fill: "#1E1E1E"
  26474. }));
  26475. /* harmony default export */ var query_pagination_numbers = (queryPaginationNumbers);
  26476. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/edit.js
  26477. /**
  26478. * WordPress dependencies
  26479. */
  26480. const createPaginationItem = (content, Tag = 'a', extraClass = '') => Object(external_wp_element_["createElement"])(Tag, {
  26481. className: `page-numbers ${extraClass}`
  26482. }, content);
  26483. const previewPaginationNumbers = () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, createPaginationItem(1), createPaginationItem(2), createPaginationItem(3, 'span', 'current'), createPaginationItem(4), createPaginationItem(5), createPaginationItem('...', 'span', 'dots'), createPaginationItem(8));
  26484. function QueryPaginationNumbersEdit() {
  26485. const paginationNumbers = previewPaginationNumbers();
  26486. return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), paginationNumbers);
  26487. }
  26488. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
  26489. /**
  26490. * WordPress dependencies
  26491. */
  26492. /**
  26493. * Internal dependencies
  26494. */
  26495. const query_pagination_numbers_metadata = {
  26496. apiVersion: 2,
  26497. name: "core/query-pagination-numbers",
  26498. title: "Query Pagination Numbers",
  26499. category: "design",
  26500. parent: ["core/query-pagination"],
  26501. description: "Displays a list of page numbers for pagination",
  26502. textdomain: "default",
  26503. usesContext: ["queryId", "query"],
  26504. supports: {
  26505. reusable: false,
  26506. html: false
  26507. },
  26508. editorStyle: "query-pagination-numbers-editor"
  26509. };
  26510. const {
  26511. name: query_pagination_numbers_name
  26512. } = query_pagination_numbers_metadata;
  26513. const query_pagination_numbers_settings = {
  26514. icon: query_pagination_numbers,
  26515. edit: QueryPaginationNumbersEdit
  26516. };
  26517. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination-previous.js
  26518. /**
  26519. * WordPress dependencies
  26520. */
  26521. const queryPaginationPrevious = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26522. xmlns: "http://www.w3.org/2000/svg",
  26523. viewBox: "0 0 24 24"
  26524. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26525. x: "18",
  26526. y: "13.5",
  26527. width: "3",
  26528. height: "3",
  26529. rx: "1.5",
  26530. transform: "rotate(-180 18 13.5)",
  26531. fill: "#000"
  26532. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Rect"], {
  26533. x: "13",
  26534. y: "13.5",
  26535. width: "3",
  26536. height: "3",
  26537. rx: "1.5",
  26538. transform: "rotate(-180 13 13.5)",
  26539. fill: "#000"
  26540. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26541. d: "M7.5 14.5L5 12l2.5-2.5",
  26542. stroke: "#1E1E1E",
  26543. strokeWidth: "1.5"
  26544. }));
  26545. /* harmony default export */ var query_pagination_previous = (queryPaginationPrevious);
  26546. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/edit.js
  26547. /**
  26548. * WordPress dependencies
  26549. */
  26550. function QueryPaginationPreviousEdit({
  26551. attributes: {
  26552. label
  26553. },
  26554. setAttributes
  26555. }) {
  26556. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], Object(esm_extends["a" /* default */])({
  26557. __experimentalVersion: 2,
  26558. tagName: "a",
  26559. style: {
  26560. display: 'inline-block'
  26561. },
  26562. "aria-label": Object(external_wp_i18n_["__"])('Previous page link'),
  26563. placeholder: Object(external_wp_i18n_["__"])('Previous Page'),
  26564. value: label,
  26565. onChange: newLabel => setAttributes({
  26566. label: newLabel
  26567. })
  26568. }, Object(external_wp_blockEditor_["useBlockProps"])()));
  26569. }
  26570. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
  26571. /**
  26572. * WordPress dependencies
  26573. */
  26574. /**
  26575. * Internal dependencies
  26576. */
  26577. const query_pagination_previous_metadata = {
  26578. apiVersion: 2,
  26579. name: "core/query-pagination-previous",
  26580. title: "Query Pagination Previous",
  26581. category: "design",
  26582. parent: ["core/query-pagination"],
  26583. description: "Displays the previous posts page link.",
  26584. textdomain: "default",
  26585. attributes: {
  26586. label: {
  26587. type: "string"
  26588. }
  26589. },
  26590. usesContext: ["queryId", "query"],
  26591. supports: {
  26592. reusable: false,
  26593. html: false,
  26594. color: {
  26595. gradients: true,
  26596. link: true
  26597. },
  26598. typography: {
  26599. fontSize: true,
  26600. lineHeight: true
  26601. }
  26602. }
  26603. };
  26604. const {
  26605. name: query_pagination_previous_name
  26606. } = query_pagination_previous_metadata;
  26607. const query_pagination_previous_settings = {
  26608. icon: query_pagination_previous,
  26609. edit: QueryPaginationPreviousEdit
  26610. };
  26611. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-title.js
  26612. /**
  26613. * WordPress dependencies
  26614. */
  26615. const postTitle = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26616. viewBox: "0 0 24 24",
  26617. xmlns: "http://www.w3.org/2000/svg"
  26618. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26619. d: "M4 14.5h16V16H4zM4 18.5h9V20H4zM4 4h3c2 0 3 .86 3 2.583 0 .891-.253 1.554-.76 1.988-.505.435-1.24.652-2.204.652H5.542V12H4V4zm2.855 4c.53 0 .924-.114 1.18-.343.266-.228.398-.579.398-1.051 0-.473-.132-.82-.397-1.04-.265-.229-.67-.343-1.217-.343H5.542V8h1.313z"
  26620. }));
  26621. /* harmony default export */ var post_title = (postTitle);
  26622. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/hooks.js
  26623. /**
  26624. * WordPress dependencies
  26625. */
  26626. /**
  26627. * Returns whether the current user can edit the given entity.
  26628. *
  26629. * @param {string} kind Entity kind.
  26630. * @param {string} name Entity name.
  26631. * @param {string} recordId Record's id.
  26632. */
  26633. function useCanEditEntity(kind, name, recordId) {
  26634. return Object(external_wp_data_["useSelect"])(select => select(external_wp_coreData_["store"]).canUserEditEntityRecord(kind, name, recordId), [kind, name, recordId]);
  26635. }
  26636. /* harmony default export */ var utils_hooks = ({
  26637. useCanEditEntity
  26638. });
  26639. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/edit.js
  26640. /**
  26641. * External dependencies
  26642. */
  26643. /**
  26644. * WordPress dependencies
  26645. */
  26646. /**
  26647. * Internal dependencies
  26648. */
  26649. function PostTitleEdit({
  26650. attributes: {
  26651. level,
  26652. textAlign,
  26653. isLink,
  26654. rel,
  26655. linkTarget
  26656. },
  26657. setAttributes,
  26658. context: {
  26659. postType,
  26660. postId,
  26661. queryId
  26662. }
  26663. }) {
  26664. const TagName = 0 === level ? 'p' : 'h' + level;
  26665. const isDescendentOfQueryLoop = !!queryId;
  26666. const userCanEdit = useCanEditEntity('postType', postType, postId);
  26667. const [rawTitle = '', setTitle, fullTitle] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'title', postId);
  26668. const [link] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'link', postId);
  26669. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  26670. className: classnames_default()({
  26671. [`has-text-align-${textAlign}`]: textAlign
  26672. })
  26673. });
  26674. let titleElement = Object(external_wp_element_["createElement"])(TagName, isLink ? {} : blockProps, Object(external_wp_i18n_["__"])('An example title'));
  26675. if (postType && postId) {
  26676. titleElement = userCanEdit && !isDescendentOfQueryLoop ? Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], Object(esm_extends["a" /* default */])({
  26677. tagName: TagName,
  26678. placeholder: Object(external_wp_i18n_["__"])('No Title'),
  26679. value: rawTitle,
  26680. onChange: setTitle,
  26681. __experimentalVersion: 2
  26682. }, isLink ? {} : blockProps)) : Object(external_wp_element_["createElement"])(TagName, isLink ? {} : blockProps, Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], {
  26683. key: "html"
  26684. }, fullTitle.rendered));
  26685. }
  26686. if (isLink) {
  26687. titleElement = userCanEdit && !isDescendentOfQueryLoop ? Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], {
  26688. tagName: "a",
  26689. href: link,
  26690. target: linkTarget,
  26691. rel: rel,
  26692. placeholder: !rawTitle.length ? Object(external_wp_i18n_["__"])('No Title') : null,
  26693. value: rawTitle,
  26694. onChange: setTitle,
  26695. __experimentalVersion: 2
  26696. })) : Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_element_["createElement"])("a", {
  26697. href: link,
  26698. target: linkTarget,
  26699. rel: rel,
  26700. onClick: event => event.preventDefault()
  26701. }, Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], {
  26702. key: "html"
  26703. }, fullTitle.rendered)));
  26704. }
  26705. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  26706. group: "block"
  26707. }, Object(external_wp_element_["createElement"])(HeadingLevelDropdown, {
  26708. selectedLevel: level,
  26709. onChange: newLevel => setAttributes({
  26710. level: newLevel
  26711. })
  26712. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  26713. value: textAlign,
  26714. onChange: nextAlign => {
  26715. setAttributes({
  26716. textAlign: nextAlign
  26717. });
  26718. }
  26719. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  26720. title: Object(external_wp_i18n_["__"])('Link settings')
  26721. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  26722. label: Object(external_wp_i18n_["__"])('Make title a link'),
  26723. onChange: () => setAttributes({
  26724. isLink: !isLink
  26725. }),
  26726. checked: isLink
  26727. }), isLink && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  26728. label: Object(external_wp_i18n_["__"])('Open in new tab'),
  26729. onChange: value => setAttributes({
  26730. linkTarget: value ? '_blank' : '_self'
  26731. }),
  26732. checked: linkTarget === '_blank'
  26733. }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  26734. label: Object(external_wp_i18n_["__"])('Link rel'),
  26735. value: rel,
  26736. onChange: newRel => setAttributes({
  26737. rel: newRel
  26738. })
  26739. })))), titleElement);
  26740. }
  26741. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/index.js
  26742. /**
  26743. * WordPress dependencies
  26744. */
  26745. /**
  26746. * Internal dependencies
  26747. */
  26748. const post_title_metadata = {
  26749. apiVersion: 2,
  26750. name: "core/post-title",
  26751. title: "Post Title",
  26752. category: "theme",
  26753. description: "Displays the title of a post, page, or any other content-type.",
  26754. textdomain: "default",
  26755. usesContext: ["postId", "postType", "queryId"],
  26756. attributes: {
  26757. textAlign: {
  26758. type: "string"
  26759. },
  26760. level: {
  26761. type: "number",
  26762. "default": 2
  26763. },
  26764. isLink: {
  26765. type: "boolean",
  26766. "default": false
  26767. },
  26768. rel: {
  26769. type: "string",
  26770. attribute: "rel",
  26771. "default": ""
  26772. },
  26773. linkTarget: {
  26774. type: "string",
  26775. "default": "_self"
  26776. }
  26777. },
  26778. supports: {
  26779. align: ["wide", "full"],
  26780. html: false,
  26781. color: {
  26782. gradients: true,
  26783. link: true
  26784. },
  26785. typography: {
  26786. fontSize: true,
  26787. lineHeight: true,
  26788. __experimentalFontFamily: true
  26789. }
  26790. },
  26791. style: "wp-block-post-title"
  26792. };
  26793. const {
  26794. name: post_title_name
  26795. } = post_title_metadata;
  26796. const post_title_settings = {
  26797. icon: post_title,
  26798. edit: PostTitleEdit
  26799. };
  26800. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-content.js
  26801. /**
  26802. * WordPress dependencies
  26803. */
  26804. const postContent = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26805. xmlns: "https://www.w3.org/2000/svg",
  26806. viewBox: "0 0 24 24"
  26807. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26808. d: "M4 20h16v-1.5H4V20zm0-4.8h16v-1.5H4v1.5zm0-6.4v1.5h16V8.8H4zM16 4H4v1.5h12V4z"
  26809. }));
  26810. /* harmony default export */ var post_content = (postContent);
  26811. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-content/edit.js
  26812. /**
  26813. * WordPress dependencies
  26814. */
  26815. /**
  26816. * Internal dependencies
  26817. */
  26818. function ReadOnlyContent({
  26819. userCanEdit,
  26820. postType,
  26821. postId
  26822. }) {
  26823. const [,, content] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'content', postId);
  26824. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  26825. return content !== null && content !== void 0 && content.protected && !userCanEdit ? Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('This content is password protected.'))) : Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], {
  26826. key: "html"
  26827. }, content === null || content === void 0 ? void 0 : content.rendered));
  26828. }
  26829. function EditableContent({
  26830. layout,
  26831. context = {}
  26832. }) {
  26833. const {
  26834. postType,
  26835. postId
  26836. } = context;
  26837. const themeSupportsLayout = Object(external_wp_data_["useSelect"])(select => {
  26838. var _getSettings;
  26839. const {
  26840. getSettings
  26841. } = select(external_wp_blockEditor_["store"]);
  26842. return (_getSettings = getSettings()) === null || _getSettings === void 0 ? void 0 : _getSettings.supportsLayout;
  26843. }, []);
  26844. const defaultLayout = Object(external_wp_blockEditor_["useSetting"])('layout') || {};
  26845. const usedLayout = !!layout && layout.inherit ? defaultLayout : layout;
  26846. const {
  26847. contentSize,
  26848. wideSize
  26849. } = usedLayout;
  26850. const _layout = Object(external_wp_element_["useMemo"])(() => {
  26851. if (themeSupportsLayout) {
  26852. const alignments = contentSize || wideSize ? ['wide', 'full', 'left', 'center', 'right'] : ['left', 'center', 'right'];
  26853. return {
  26854. type: 'default',
  26855. // Find a way to inject this in the support flag code (hooks).
  26856. alignments
  26857. };
  26858. }
  26859. return undefined;
  26860. }, [themeSupportsLayout, contentSize, wideSize]);
  26861. const [blocks, onInput, onChange] = Object(external_wp_coreData_["useEntityBlockEditor"])('postType', postType, {
  26862. id: postId
  26863. });
  26864. const props = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(Object(external_wp_blockEditor_["useBlockProps"])({
  26865. className: 'entry-content'
  26866. }), {
  26867. value: blocks,
  26868. onInput,
  26869. onChange,
  26870. __experimentalLayout: _layout
  26871. });
  26872. return Object(external_wp_element_["createElement"])("div", props);
  26873. }
  26874. function Content(props) {
  26875. const {
  26876. context: {
  26877. queryId,
  26878. postType,
  26879. postId
  26880. } = {}
  26881. } = props;
  26882. const isDescendentOfQueryLoop = !!queryId;
  26883. const userCanEdit = useCanEditEntity('postType', postType, postId);
  26884. const isEditable = userCanEdit && !isDescendentOfQueryLoop;
  26885. return isEditable ? Object(external_wp_element_["createElement"])(EditableContent, props) : Object(external_wp_element_["createElement"])(ReadOnlyContent, {
  26886. userCanEdit: userCanEdit,
  26887. postType: postType,
  26888. postId: postId
  26889. });
  26890. }
  26891. function edit_Placeholder() {
  26892. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  26893. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])("div", {
  26894. className: "wp-block-post-content__placeholder"
  26895. }, Object(external_wp_element_["createElement"])("span", null, Object(external_wp_i18n_["__"])('This is a placeholder for post content.'))));
  26896. }
  26897. function RecursionError() {
  26898. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  26899. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block cannot be rendered inside itself.')));
  26900. }
  26901. function PostContentEdit({
  26902. context,
  26903. attributes
  26904. }) {
  26905. const {
  26906. postId: contextPostId,
  26907. postType: contextPostType
  26908. } = context;
  26909. const {
  26910. layout = {}
  26911. } = attributes;
  26912. const [hasAlreadyRendered, RecursionProvider] = Object(external_wp_blockEditor_["__experimentalUseNoRecursiveRenders"])(contextPostId);
  26913. if (contextPostId && contextPostType && hasAlreadyRendered) {
  26914. return Object(external_wp_element_["createElement"])(RecursionError, null);
  26915. }
  26916. return Object(external_wp_element_["createElement"])(RecursionProvider, null, contextPostId && contextPostType ? Object(external_wp_element_["createElement"])(Content, {
  26917. context: context,
  26918. layout: layout
  26919. }) : Object(external_wp_element_["createElement"])(edit_Placeholder, null));
  26920. }
  26921. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-content/index.js
  26922. /**
  26923. * WordPress dependencies
  26924. */
  26925. /**
  26926. * Internal dependencies
  26927. */
  26928. const post_content_metadata = {
  26929. apiVersion: 2,
  26930. name: "core/post-content",
  26931. title: "Post Content",
  26932. category: "theme",
  26933. description: "Displays the contents of a post or page.",
  26934. textdomain: "default",
  26935. usesContext: ["postId", "postType", "queryId"],
  26936. supports: {
  26937. align: ["wide", "full"],
  26938. html: false,
  26939. __experimentalLayout: true
  26940. },
  26941. editorStyle: "wp-block-post-content-editor"
  26942. };
  26943. const {
  26944. name: post_content_name
  26945. } = post_content_metadata;
  26946. const post_content_settings = {
  26947. icon: post_content,
  26948. edit: PostContentEdit
  26949. };
  26950. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-date.js
  26951. /**
  26952. * WordPress dependencies
  26953. */
  26954. const post_date_postDate = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  26955. xmlns: "http://www.w3.org/2000/svg",
  26956. viewBox: "0 0 24 24"
  26957. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26958. d: "M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"
  26959. }), Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  26960. d: "M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"
  26961. }));
  26962. /* harmony default export */ var post_date = (post_date_postDate);
  26963. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-date/edit.js
  26964. /**
  26965. * External dependencies
  26966. */
  26967. /**
  26968. * WordPress dependencies
  26969. */
  26970. function PostDateEdit({
  26971. attributes: {
  26972. textAlign,
  26973. format,
  26974. isLink
  26975. },
  26976. context: {
  26977. postId,
  26978. postType,
  26979. queryId
  26980. },
  26981. setAttributes
  26982. }) {
  26983. const isDescendentOfQueryLoop = !!queryId;
  26984. const [siteFormat] = Object(external_wp_coreData_["useEntityProp"])('root', 'site', 'date_format');
  26985. const [date, setDate] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'date', postId);
  26986. const [isPickerOpen, setIsPickerOpen] = Object(external_wp_element_["useState"])(false);
  26987. const settings = Object(external_wp_date_["__experimentalGetSettings"])(); // To know if the current time format is a 12 hour time, look for "a".
  26988. // Also make sure this "a" is not escaped by a "/".
  26989. const is12Hour = /a(?!\\)/i.test(settings.formats.time.toLowerCase() // Test only for the lower case "a".
  26990. .replace(/\\\\/g, '') // Replace "//" with empty strings.
  26991. .split('').reverse().join('') // Reverse the string and test for "a" not followed by a slash.
  26992. );
  26993. const formatOptions = Object.values(settings.formats).map(formatOption => ({
  26994. key: formatOption,
  26995. name: Object(external_wp_date_["dateI18n"])(formatOption, date)
  26996. }));
  26997. const resolvedFormat = format || siteFormat || settings.formats.date;
  26998. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  26999. className: classnames_default()({
  27000. [`has-text-align-${textAlign}`]: textAlign
  27001. })
  27002. });
  27003. let postDate = date ? Object(external_wp_element_["createElement"])("time", {
  27004. dateTime: Object(external_wp_date_["dateI18n"])('c', date)
  27005. }, Object(external_wp_date_["dateI18n"])(resolvedFormat, date), isPickerOpen && Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
  27006. onClose: setIsPickerOpen.bind(null, false)
  27007. }, Object(external_wp_element_["createElement"])(external_wp_components_["DateTimePicker"], {
  27008. currentDate: date,
  27009. onChange: setDate,
  27010. is12Hour: is12Hour
  27011. }))) : Object(external_wp_i18n_["__"])('No Date');
  27012. if (isLink && date) {
  27013. postDate = Object(external_wp_element_["createElement"])("a", {
  27014. href: "#post-date-pseudo-link",
  27015. onClick: event => event.preventDefault()
  27016. }, postDate);
  27017. }
  27018. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  27019. group: "block"
  27020. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
  27021. value: textAlign,
  27022. onChange: nextAlign => {
  27023. setAttributes({
  27024. textAlign: nextAlign
  27025. });
  27026. }
  27027. }), date && !isDescendentOfQueryLoop && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
  27028. icon: library_edit["a" /* default */],
  27029. title: Object(external_wp_i18n_["__"])('Change Date'),
  27030. onClick: () => setIsPickerOpen(_isPickerOpen => !_isPickerOpen)
  27031. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  27032. title: Object(external_wp_i18n_["__"])('Format settings')
  27033. }, Object(external_wp_element_["createElement"])(external_wp_components_["CustomSelectControl"], {
  27034. hideLabelFromVision: true,
  27035. label: Object(external_wp_i18n_["__"])('Date Format'),
  27036. options: formatOptions,
  27037. onChange: ({
  27038. selectedItem
  27039. }) => setAttributes({
  27040. format: selectedItem.key
  27041. }),
  27042. value: formatOptions.find(option => option.key === resolvedFormat)
  27043. })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  27044. title: Object(external_wp_i18n_["__"])('Link settings')
  27045. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  27046. label: Object(external_wp_i18n_["sprintf"])( // translators: %s: Name of the post type e.g: "post".
  27047. Object(external_wp_i18n_["__"])('Link to %s'), postType),
  27048. onChange: () => setAttributes({
  27049. isLink: !isLink
  27050. }),
  27051. checked: isLink
  27052. }))), Object(external_wp_element_["createElement"])("div", blockProps, postDate));
  27053. }
  27054. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-date/index.js
  27055. /**
  27056. * WordPress dependencies
  27057. */
  27058. /**
  27059. * Internal dependencies
  27060. */
  27061. const post_date_metadata = {
  27062. apiVersion: 2,
  27063. name: "core/post-date",
  27064. title: "Post Date",
  27065. category: "theme",
  27066. description: "Add the date of this post.",
  27067. textdomain: "default",
  27068. attributes: {
  27069. textAlign: {
  27070. type: "string"
  27071. },
  27072. format: {
  27073. type: "string"
  27074. },
  27075. isLink: {
  27076. type: "boolean",
  27077. "default": false
  27078. }
  27079. },
  27080. usesContext: ["postId", "postType", "queryId"],
  27081. supports: {
  27082. html: false,
  27083. color: {
  27084. gradients: true,
  27085. link: true
  27086. },
  27087. typography: {
  27088. fontSize: true,
  27089. lineHeight: true
  27090. }
  27091. }
  27092. };
  27093. const {
  27094. name: post_date_name
  27095. } = post_date_metadata;
  27096. const post_date_settings = {
  27097. icon: post_date,
  27098. edit: PostDateEdit
  27099. };
  27100. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-excerpt.js
  27101. /**
  27102. * WordPress dependencies
  27103. */
  27104. const post_excerpt_postExcerpt = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  27105. xmlns: "http://www.w3.org/2000/svg",
  27106. viewBox: "0 0 24 24"
  27107. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  27108. d: "M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"
  27109. }));
  27110. /* harmony default export */ var post_excerpt = (post_excerpt_postExcerpt);
  27111. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-excerpt/edit.js
  27112. /**
  27113. * External dependencies
  27114. */
  27115. /**
  27116. * WordPress dependencies
  27117. */
  27118. /**
  27119. * Internal dependencies
  27120. */
  27121. function PostExcerptEditor({
  27122. attributes: {
  27123. textAlign,
  27124. moreText,
  27125. showMoreOnNewLine
  27126. },
  27127. setAttributes,
  27128. isSelected,
  27129. context: {
  27130. postId,
  27131. postType,
  27132. queryId
  27133. }
  27134. }) {
  27135. const isDescendentOfQueryLoop = !!queryId;
  27136. const userCanEdit = useCanEditEntity('postType', postType, postId);
  27137. const isEditable = userCanEdit && !isDescendentOfQueryLoop;
  27138. const [rawExcerpt, setExcerpt, {
  27139. rendered: renderedExcerpt,
  27140. protected: isProtected
  27141. } = {}] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'excerpt', postId);
  27142. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  27143. className: classnames_default()({
  27144. [`has-text-align-${textAlign}`]: textAlign
  27145. })
  27146. });
  27147. /**
  27148. * When excerpt is editable, strip the html tags from
  27149. * rendered excerpt. This will be used if the entity's
  27150. * excerpt has been produced from the content.
  27151. */
  27152. const strippedRenderedExcerpt = Object(external_wp_element_["useMemo"])(() => {
  27153. if (!renderedExcerpt) return '';
  27154. const document = new window.DOMParser().parseFromString(renderedExcerpt, 'text/html');
  27155. return document.body.textContent || document.body.innerText || '';
  27156. }, [renderedExcerpt]);
  27157. if (!postType || !postId) {
  27158. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Post excerpt block: no post found.')));
  27159. }
  27160. if (isProtected && !userCanEdit) {
  27161. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('There is no excerpt because this is a protected post.')));
  27162. }
  27163. const readMoreLink = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  27164. className: "wp-block-post-excerpt__more-link",
  27165. tagName: "a",
  27166. "aria-label": Object(external_wp_i18n_["__"])('"Read more" link text'),
  27167. placeholder: Object(external_wp_i18n_["__"])('Add "read more" link text'),
  27168. value: moreText,
  27169. onChange: newMoreText => setAttributes({
  27170. moreText: newMoreText
  27171. })
  27172. });
  27173. const excerptContent = isEditable ? Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
  27174. className: !showMoreOnNewLine && 'wp-block-post-excerpt__excerpt is-inline',
  27175. "aria-label": Object(external_wp_i18n_["__"])('Post excerpt text'),
  27176. value: rawExcerpt || strippedRenderedExcerpt || (isSelected ? '' : Object(external_wp_i18n_["__"])('No post excerpt found')),
  27177. onChange: setExcerpt
  27178. }) : renderedExcerpt && Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], {
  27179. key: "html"
  27180. }, renderedExcerpt)) || Object(external_wp_i18n_["__"])('No post excerpt found');
  27181. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], {
  27182. value: textAlign,
  27183. onChange: newAlign => setAttributes({
  27184. textAlign: newAlign
  27185. })
  27186. })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  27187. title: Object(external_wp_i18n_["__"])('Post Excerpt Settings')
  27188. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  27189. label: Object(external_wp_i18n_["__"])('Show link on new line'),
  27190. checked: showMoreOnNewLine,
  27191. onChange: newShowMoreOnNewLine => setAttributes({
  27192. showMoreOnNewLine: newShowMoreOnNewLine
  27193. })
  27194. }))), Object(external_wp_element_["createElement"])("div", blockProps, excerptContent, !showMoreOnNewLine && ' ', showMoreOnNewLine ? Object(external_wp_element_["createElement"])("p", {
  27195. className: "wp-block-post-excerpt__more-text"
  27196. }, readMoreLink) : readMoreLink));
  27197. }
  27198. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
  27199. /**
  27200. * WordPress dependencies
  27201. */
  27202. /**
  27203. * Internal dependencies
  27204. */
  27205. const post_excerpt_metadata = {
  27206. apiVersion: 2,
  27207. name: "core/post-excerpt",
  27208. title: "Post Excerpt",
  27209. category: "theme",
  27210. description: "Display a post's excerpt.",
  27211. textdomain: "default",
  27212. attributes: {
  27213. textAlign: {
  27214. type: "string"
  27215. },
  27216. moreText: {
  27217. type: "string"
  27218. },
  27219. showMoreOnNewLine: {
  27220. type: "boolean",
  27221. "default": true
  27222. }
  27223. },
  27224. usesContext: ["postId", "postType", "queryId"],
  27225. supports: {
  27226. html: false,
  27227. color: {
  27228. gradients: true,
  27229. link: true
  27230. },
  27231. typography: {
  27232. fontSize: true,
  27233. lineHeight: true
  27234. }
  27235. },
  27236. editorStyle: "wp-block-post-excerpt-editor",
  27237. style: "wp-block-post-excerpt"
  27238. };
  27239. const {
  27240. name: post_excerpt_name
  27241. } = post_excerpt_metadata;
  27242. const post_excerpt_settings = {
  27243. icon: post_excerpt,
  27244. edit: PostExcerptEditor
  27245. };
  27246. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-featured-image.js
  27247. /**
  27248. * WordPress dependencies
  27249. */
  27250. const postFeaturedImage = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  27251. xmlns: "http://www.w3.org/2000/svg",
  27252. viewBox: "0 0 24 24"
  27253. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  27254. d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"
  27255. }));
  27256. /* harmony default export */ var post_featured_image = (postFeaturedImage);
  27257. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/edit.js
  27258. /**
  27259. * WordPress dependencies
  27260. */
  27261. const post_featured_image_edit_ALLOWED_MEDIA_TYPES = ['image'];
  27262. const placeholderChip = Object(external_wp_element_["createElement"])("div", {
  27263. className: "post-featured-image_placeholder"
  27264. }, Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
  27265. icon: post_featured_image
  27266. }), Object(external_wp_element_["createElement"])("p", null, " ", Object(external_wp_i18n_["__"])('Featured Image')));
  27267. function PostFeaturedImageDisplay({
  27268. attributes: {
  27269. isLink
  27270. },
  27271. setAttributes,
  27272. context: {
  27273. postId,
  27274. postType,
  27275. queryId
  27276. },
  27277. noticeUI,
  27278. noticeOperations
  27279. }) {
  27280. const isDescendentOfQueryLoop = !!queryId;
  27281. const [featuredImage, setFeaturedImage] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'featured_media', postId);
  27282. const media = Object(external_wp_data_["useSelect"])(select => featuredImage && select(external_wp_coreData_["store"]).getMedia(featuredImage), [featuredImage]);
  27283. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  27284. const onSelectImage = value => {
  27285. if (value !== null && value !== void 0 && value.id) {
  27286. setFeaturedImage(value.id);
  27287. }
  27288. };
  27289. function onUploadError(message) {
  27290. noticeOperations.removeAllNotices();
  27291. noticeOperations.createErrorNotice(message);
  27292. }
  27293. let image;
  27294. if (!featuredImage && isDescendentOfQueryLoop) {
  27295. return Object(external_wp_element_["createElement"])("div", blockProps, placeholderChip);
  27296. }
  27297. if (!featuredImage) {
  27298. image = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
  27299. icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
  27300. icon: post_featured_image
  27301. }),
  27302. onSelect: onSelectImage,
  27303. notices: noticeUI,
  27304. onError: onUploadError,
  27305. accept: "image/*",
  27306. allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
  27307. labels: {
  27308. title: Object(external_wp_i18n_["__"])('Featured image'),
  27309. instructions: Object(external_wp_i18n_["__"])('Upload a media file or pick one from your media library.')
  27310. }
  27311. });
  27312. } else {
  27313. // We have a Featured image so show a Placeholder if is loading.
  27314. image = !media ? placeholderChip : Object(external_wp_element_["createElement"])("img", {
  27315. src: media.source_url,
  27316. alt: media.alt_text || Object(external_wp_i18n_["__"])('Featured image')
  27317. });
  27318. }
  27319. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  27320. title: Object(external_wp_i18n_["__"])('Link settings')
  27321. }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
  27322. label: Object(external_wp_i18n_["sprintf"])( // translators: %s: Name of the post type e.g: "post".
  27323. Object(external_wp_i18n_["__"])('Link to %s'), postType),
  27324. onChange: () => setAttributes({
  27325. isLink: !isLink
  27326. }),
  27327. checked: isLink
  27328. }))), !!media && !isDescendentOfQueryLoop && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
  27329. group: "other"
  27330. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
  27331. mediaId: featuredImage,
  27332. mediaURL: media.source_url,
  27333. allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
  27334. accept: "image/*",
  27335. onSelect: onSelectImage,
  27336. onError: onUploadError
  27337. })), Object(external_wp_element_["createElement"])("figure", blockProps, image));
  27338. }
  27339. const PostFeaturedImageWithNotices = Object(external_wp_components_["withNotices"])(PostFeaturedImageDisplay);
  27340. function PostFeaturedImageEdit(props) {
  27341. var _props$context;
  27342. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
  27343. if (!((_props$context = props.context) !== null && _props$context !== void 0 && _props$context.postId)) {
  27344. return Object(external_wp_element_["createElement"])("div", blockProps, placeholderChip);
  27345. }
  27346. return Object(external_wp_element_["createElement"])(PostFeaturedImageWithNotices, props);
  27347. }
  27348. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
  27349. /**
  27350. * WordPress dependencies
  27351. */
  27352. /**
  27353. * Internal dependencies
  27354. */
  27355. const post_featured_image_metadata = {
  27356. apiVersion: 2,
  27357. name: "core/post-featured-image",
  27358. title: "Post Featured Image",
  27359. category: "theme",
  27360. description: "Display a post's featured image.",
  27361. textdomain: "default",
  27362. attributes: {
  27363. isLink: {
  27364. type: "boolean",
  27365. "default": false
  27366. }
  27367. },
  27368. usesContext: ["postId", "postType", "queryId"],
  27369. supports: {
  27370. align: ["left", "right", "center", "wide", "full"],
  27371. html: false
  27372. },
  27373. editorStyle: "wp-block-post-featured-image-editor",
  27374. style: "wp-block-post-featured-image"
  27375. };
  27376. const {
  27377. name: post_featured_image_name
  27378. } = post_featured_image_metadata;
  27379. const post_featured_image_settings = {
  27380. icon: post_featured_image,
  27381. edit: PostFeaturedImageEdit
  27382. };
  27383. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/use-post-terms.js
  27384. /**
  27385. * WordPress dependencies
  27386. */
  27387. function usePostTerms({
  27388. postId,
  27389. postType,
  27390. term
  27391. }) {
  27392. var _term$visibility2;
  27393. const {
  27394. rest_base: restBase,
  27395. slug
  27396. } = term;
  27397. const [termIds] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, restBase, postId);
  27398. return Object(external_wp_data_["useSelect"])(select => {
  27399. var _term$visibility;
  27400. const visible = term === null || term === void 0 ? void 0 : (_term$visibility = term.visibility) === null || _term$visibility === void 0 ? void 0 : _term$visibility.publicly_queryable;
  27401. if (!visible) {
  27402. return {
  27403. postTerms: [],
  27404. _isLoading: false,
  27405. hasPostTerms: false
  27406. };
  27407. }
  27408. if (!termIds) {
  27409. // Waiting for post terms to be fetched.
  27410. return {
  27411. isLoading: true
  27412. };
  27413. }
  27414. if (!termIds.length) {
  27415. return {
  27416. isLoading: false
  27417. };
  27418. }
  27419. const {
  27420. getEntityRecords,
  27421. isResolving
  27422. } = select(external_wp_coreData_["store"]);
  27423. const taxonomyArgs = ['taxonomy', slug, {
  27424. include: termIds,
  27425. context: 'view'
  27426. }];
  27427. const terms = getEntityRecords(...taxonomyArgs);
  27428. const _isLoading = isResolving('getEntityRecords', taxonomyArgs);
  27429. return {
  27430. postTerms: terms,
  27431. isLoading: _isLoading,
  27432. hasPostTerms: !!(terms !== null && terms !== void 0 && terms.length)
  27433. };
  27434. }, [termIds, term === null || term === void 0 ? void 0 : (_term$visibility2 = term.visibility) === null || _term$visibility2 === void 0 ? void 0 : _term$visibility2.publicly_queryable]);
  27435. }
  27436. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/edit.js
  27437. /**
  27438. * External dependencies
  27439. */
  27440. /**
  27441. * WordPress dependencies
  27442. */
  27443. /**
  27444. * Internal dependencies
  27445. */
  27446. function PostTermsEdit({
  27447. attributes,
  27448. context,
  27449. setAttributes
  27450. }) {
  27451. var _selectedTerm$labels;
  27452. const {
  27453. term,
  27454. textAlign
  27455. } = attributes;
  27456. const {
  27457. postId,
  27458. postType
  27459. } = context;
  27460. const selectedTerm = Object(external_wp_data_["useSelect"])(select => {
  27461. var _taxonomy$visibility;
  27462. if (!term) return {};
  27463. const {
  27464. getTaxonomy
  27465. } = select(external_wp_coreData_["store"]);
  27466. const taxonomy = getTaxonomy(term);
  27467. return taxonomy !== null && taxonomy !== void 0 && (_taxonomy$visibility = taxonomy.visibility) !== null && _taxonomy$visibility !== void 0 && _taxonomy$visibility.publicly_queryable ? taxonomy : {};
  27468. }, [term]);
  27469. const {
  27470. postTerms,
  27471. hasPostTerms,
  27472. isLoading
  27473. } = usePostTerms({
  27474. postId,
  27475. postType,
  27476. term: selectedTerm
  27477. });
  27478. const hasPost = postId && postType;
  27479. const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
  27480. className: classnames_default()({
  27481. [`has-text-align-${textAlign}`]: textAlign
  27482. })
  27483. });
  27484. if (!hasPost) {
  27485. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Post Terms block: post not found.')));
  27486. }
  27487. if (!term) {
  27488. return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_i18n_["__"])('Post Terms block: no term specified.'));
  27489. }
  27490. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], {
  27491. value: textAlign,
  27492. onChange: nextAlign => {
  27493. setAttributes({
  27494. textAlign: nextAlign
  27495. });
  27496. }
  27497. })), Object(external_wp_element_["createElement"])("div", blockProps, isLoading && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), !isLoading && hasPostTerms && postTerms.map(postTerm => Object(external_wp_element_["createElement"])("a", {
  27498. key: postTerm.id,
  27499. href: postTerm.link,
  27500. onClick: event => event.preventDefault()
  27501. }, postTerm.name)).reduce((prev, curr) => [prev, ' | ', curr]), !isLoading && !hasPostTerms && ((selectedTerm === null || selectedTerm === void 0 ? void 0 : (_selectedTerm$labels = selectedTerm.labels) === null || _selectedTerm$labels === void 0 ? void 0 : _selectedTerm$labels.no_terms) || Object(external_wp_i18n_["__"])('Term items not found.'))));
  27502. }
  27503. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-categories.js
  27504. /**
  27505. * WordPress dependencies
  27506. */
  27507. const postCategories = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  27508. viewBox: "0 0 24 24",
  27509. xmlns: "http://www.w3.org/2000/svg"
  27510. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  27511. d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",
  27512. fillRule: "evenodd",
  27513. clipRule: "evenodd"
  27514. }));
  27515. /* harmony default export */ var post_categories = (postCategories);
  27516. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/variations.js
  27517. /**
  27518. * WordPress dependencies
  27519. */
  27520. const post_terms_variations_variations = [{
  27521. name: 'category',
  27522. title: Object(external_wp_i18n_["__"])('Post Categories'),
  27523. description: Object(external_wp_i18n_["__"])("Display a post's categories."),
  27524. icon: post_categories,
  27525. isDefault: true,
  27526. attributes: {
  27527. term: 'category'
  27528. },
  27529. isActive: blockAttributes => blockAttributes.term === 'category'
  27530. }, {
  27531. name: 'post_tag',
  27532. title: Object(external_wp_i18n_["__"])('Post Tags'),
  27533. description: Object(external_wp_i18n_["__"])("Display a post's tags."),
  27534. icon: post_categories,
  27535. attributes: {
  27536. term: 'post_tag'
  27537. },
  27538. isActive: blockAttributes => blockAttributes.term === 'post_tag'
  27539. }];
  27540. /* harmony default export */ var post_terms_variations = (post_terms_variations_variations);
  27541. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
  27542. /**
  27543. * Internal dependencies
  27544. */
  27545. const post_terms_metadata = {
  27546. apiVersion: 2,
  27547. name: "core/post-terms",
  27548. title: "Post Terms",
  27549. category: "design",
  27550. description: "Post terms.",
  27551. textdomain: "default",
  27552. attributes: {
  27553. term: {
  27554. type: "string"
  27555. },
  27556. textAlign: {
  27557. type: "string"
  27558. }
  27559. },
  27560. usesContext: ["postId", "postType"],
  27561. supports: {
  27562. html: false,
  27563. color: {
  27564. gradients: true,
  27565. link: true
  27566. },
  27567. typography: {
  27568. lineHeight: true,
  27569. fontSize: true
  27570. }
  27571. }
  27572. };
  27573. const {
  27574. name: post_terms_name
  27575. } = post_terms_metadata;
  27576. const post_terms_settings = {
  27577. variations: post_terms_variations,
  27578. edit: PostTermsEdit
  27579. };
  27580. // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/index.js
  27581. /**
  27582. * WordPress dependencies
  27583. */
  27584. /**
  27585. * Internal dependencies
  27586. */
  27587. // import * as tableOfContents from './table-of-contents';
  27588. // Full Site Editing Blocks
  27589. /**
  27590. * Function to register an individual block.
  27591. *
  27592. * @param {Object} block The block to be registered.
  27593. *
  27594. */
  27595. const registerBlock = block => {
  27596. if (!block) {
  27597. return;
  27598. }
  27599. const {
  27600. metadata,
  27601. settings,
  27602. name
  27603. } = block;
  27604. Object(external_wp_blocks_["registerBlockType"])({
  27605. name,
  27606. ...metadata
  27607. }, settings);
  27608. };
  27609. /**
  27610. * Function to get all the core blocks in an array.
  27611. *
  27612. * @example
  27613. * ```js
  27614. * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';
  27615. *
  27616. * const coreBlocks = __experimentalGetCoreBlocks();
  27617. * ```
  27618. */
  27619. const __experimentalGetCoreBlocks = () => [// Common blocks are grouped at the top to prioritize their display
  27620. // in various contexts — like the inserter and auto-complete components.
  27621. build_module_paragraph_namespaceObject, build_module_image_namespaceObject, build_module_heading_namespaceObject, build_module_gallery_namespaceObject, build_module_list_namespaceObject, build_module_quote_namespaceObject, // Register all remaining core blocks.
  27622. build_module_shortcode_namespaceObject, archives_namespaceObject, build_module_audio_namespaceObject, button_namespaceObject, build_module_buttons_namespaceObject, build_module_calendar_namespaceObject, categories_namespaceObject, code_namespaceObject, build_module_columns_namespaceObject, build_module_column_namespaceObject, build_module_cover_namespaceObject, embed_namespaceObject, build_module_file_namespaceObject, build_module_group_namespaceObject, window.wp && window.wp.oldEditor ? freeform_namespaceObject : null, // Only add the classic block in WP Context
  27623. build_module_html_namespaceObject, media_text_namespaceObject, latest_comments_namespaceObject, latest_posts_namespaceObject, missing_namespaceObject, build_module_more_namespaceObject, nextpage_namespaceObject, page_list_namespaceObject, build_module_preformatted_namespaceObject, build_module_pullquote_namespaceObject, build_module_rss_namespaceObject, search_namespaceObject, build_module_separator_namespaceObject, block_namespaceObject, social_links_namespaceObject, social_link_namespaceObject, spacer_namespaceObject, build_module_table_namespaceObject, // tableOfContents,
  27624. tag_cloud_namespaceObject, text_columns_namespaceObject, build_module_verse_namespaceObject, build_module_video_namespaceObject, // Theme blocks
  27625. build_module_site_logo_namespaceObject, site_tagline_namespaceObject, site_title_namespaceObject, query_namespaceObject, post_template_namespaceObject, query_title_namespaceObject, build_module_query_pagination_namespaceObject, build_module_query_pagination_next_namespaceObject, build_module_query_pagination_numbers_namespaceObject, build_module_query_pagination_previous_namespaceObject, build_module_post_title_namespaceObject, build_module_post_content_namespaceObject, build_module_post_date_namespaceObject, build_module_post_excerpt_namespaceObject, build_module_post_featured_image_namespaceObject, post_terms_namespaceObject, loginout_namespaceObject];
  27626. /**
  27627. * Function to register core blocks provided by the block editor.
  27628. *
  27629. * @param {Array} blocks An optional array of the core blocks being registered.
  27630. *
  27631. * @example
  27632. * ```js
  27633. * import { registerCoreBlocks } from '@wordpress/block-library';
  27634. *
  27635. * registerCoreBlocks();
  27636. * ```
  27637. */
  27638. const registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => {
  27639. blocks.forEach(registerBlock);
  27640. Object(external_wp_blocks_["setDefaultBlockName"])(paragraph_name);
  27641. if (window.wp && window.wp.oldEditor) {
  27642. Object(external_wp_blocks_["setFreeformContentHandlerName"])(freeform_name);
  27643. }
  27644. Object(external_wp_blocks_["setUnregisteredTypeHandlerName"])(missing_name);
  27645. Object(external_wp_blocks_["setGroupingBlockName"])(group_name);
  27646. };
  27647. /**
  27648. * Function to register experimental core blocks depending on editor settings.
  27649. *
  27650. * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.
  27651. * @example
  27652. * ```js
  27653. * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';
  27654. *
  27655. * __experimentalRegisterExperimentalCoreBlocks( settings );
  27656. * ```
  27657. */
  27658. const __experimentalRegisterExperimentalCoreBlocks = false ? undefined : undefined;
  27659. /***/ }),
  27660. /***/ "K9lf":
  27661. /***/ (function(module, exports) {
  27662. (function() { module.exports = window["wp"]["compose"]; }());
  27663. /***/ }),
  27664. /***/ "KEfo":
  27665. /***/ (function(module, exports) {
  27666. (function() { module.exports = window["wp"]["viewport"]; }());
  27667. /***/ }),
  27668. /***/ "Mmq9":
  27669. /***/ (function(module, exports) {
  27670. (function() { module.exports = window["wp"]["url"]; }());
  27671. /***/ }),
  27672. /***/ "Mp0b":
  27673. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  27674. "use strict";
  27675. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  27676. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  27677. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  27678. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  27679. /**
  27680. * WordPress dependencies
  27681. */
  27682. const linkOff = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  27683. xmlns: "http://www.w3.org/2000/svg",
  27684. viewBox: "0 0 24 24"
  27685. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  27686. d: "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"
  27687. }));
  27688. /* harmony default export */ __webpack_exports__["a"] = (linkOff);
  27689. /***/ }),
  27690. /***/ "NMb1":
  27691. /***/ (function(module, exports) {
  27692. (function() { module.exports = window["wp"]["deprecated"]; }());
  27693. /***/ }),
  27694. /***/ "NTP4":
  27695. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  27696. "use strict";
  27697. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  27698. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  27699. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  27700. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  27701. /**
  27702. * WordPress dependencies
  27703. */
  27704. const upload = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  27705. xmlns: "http://www.w3.org/2000/svg",
  27706. viewBox: "0 0 24 24"
  27707. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  27708. d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"
  27709. }));
  27710. /* harmony default export */ __webpack_exports__["a"] = (upload);
  27711. /***/ }),
  27712. /***/ "RMJe":
  27713. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  27714. "use strict";
  27715. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  27716. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  27717. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  27718. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  27719. /**
  27720. * WordPress dependencies
  27721. */
  27722. const check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  27723. xmlns: "http://www.w3.org/2000/svg",
  27724. viewBox: "0 0 24 24"
  27725. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  27726. d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
  27727. }));
  27728. /* harmony default export */ __webpack_exports__["a"] = (check);
  27729. /***/ }),
  27730. /***/ "RxS6":
  27731. /***/ (function(module, exports) {
  27732. (function() { module.exports = window["wp"]["keycodes"]; }());
  27733. /***/ }),
  27734. /***/ "TSYQ":
  27735. /***/ (function(module, exports, __webpack_require__) {
  27736. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  27737. Copyright (c) 2018 Jed Watson.
  27738. Licensed under the MIT License (MIT), see
  27739. http://jedwatson.github.io/classnames
  27740. */
  27741. /* global define */
  27742. (function () {
  27743. 'use strict';
  27744. var hasOwn = {}.hasOwnProperty;
  27745. function classNames() {
  27746. var classes = [];
  27747. for (var i = 0; i < arguments.length; i++) {
  27748. var arg = arguments[i];
  27749. if (!arg) continue;
  27750. var argType = typeof arg;
  27751. if (argType === 'string' || argType === 'number') {
  27752. classes.push(arg);
  27753. } else if (Array.isArray(arg)) {
  27754. if (arg.length) {
  27755. var inner = classNames.apply(null, arg);
  27756. if (inner) {
  27757. classes.push(inner);
  27758. }
  27759. }
  27760. } else if (argType === 'object') {
  27761. if (arg.toString === Object.prototype.toString) {
  27762. for (var key in arg) {
  27763. if (hasOwn.call(arg, key) && arg[key]) {
  27764. classes.push(key);
  27765. }
  27766. }
  27767. } else {
  27768. classes.push(arg.toString());
  27769. }
  27770. }
  27771. }
  27772. return classes.join(' ');
  27773. }
  27774. if ( true && module.exports) {
  27775. classNames.default = classNames;
  27776. module.exports = classNames;
  27777. } else if (true) {
  27778. // register as 'classnames', consistent with npm package name
  27779. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  27780. return classNames;
  27781. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  27782. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  27783. } else {}
  27784. }());
  27785. /***/ }),
  27786. /***/ "Tqx9":
  27787. /***/ (function(module, exports) {
  27788. (function() { module.exports = window["wp"]["primitives"]; }());
  27789. /***/ }),
  27790. /***/ "UuzZ":
  27791. /***/ (function(module, exports) {
  27792. (function() { module.exports = window["wp"]["autop"]; }());
  27793. /***/ }),
  27794. /***/ "YLtl":
  27795. /***/ (function(module, exports) {
  27796. (function() { module.exports = window["lodash"]; }());
  27797. /***/ }),
  27798. /***/ "Zss7":
  27799. /***/ (function(module, exports, __webpack_require__) {
  27800. var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.2
  27801. // https://github.com/bgrins/TinyColor
  27802. // Brian Grinstead, MIT License
  27803. (function(Math) {
  27804. var trimLeft = /^\s+/,
  27805. trimRight = /\s+$/,
  27806. tinyCounter = 0,
  27807. mathRound = Math.round,
  27808. mathMin = Math.min,
  27809. mathMax = Math.max,
  27810. mathRandom = Math.random;
  27811. function tinycolor (color, opts) {
  27812. color = (color) ? color : '';
  27813. opts = opts || { };
  27814. // If input is already a tinycolor, return itself
  27815. if (color instanceof tinycolor) {
  27816. return color;
  27817. }
  27818. // If we are called as a function, call using new instead
  27819. if (!(this instanceof tinycolor)) {
  27820. return new tinycolor(color, opts);
  27821. }
  27822. var rgb = inputToRGB(color);
  27823. this._originalInput = color,
  27824. this._r = rgb.r,
  27825. this._g = rgb.g,
  27826. this._b = rgb.b,
  27827. this._a = rgb.a,
  27828. this._roundA = mathRound(100*this._a) / 100,
  27829. this._format = opts.format || rgb.format;
  27830. this._gradientType = opts.gradientType;
  27831. // Don't let the range of [0,255] come back in [0,1].
  27832. // Potentially lose a little bit of precision here, but will fix issues where
  27833. // .5 gets interpreted as half of the total, instead of half of 1
  27834. // If it was supposed to be 128, this was already taken care of by `inputToRgb`
  27835. if (this._r < 1) { this._r = mathRound(this._r); }
  27836. if (this._g < 1) { this._g = mathRound(this._g); }
  27837. if (this._b < 1) { this._b = mathRound(this._b); }
  27838. this._ok = rgb.ok;
  27839. this._tc_id = tinyCounter++;
  27840. }
  27841. tinycolor.prototype = {
  27842. isDark: function() {
  27843. return this.getBrightness() < 128;
  27844. },
  27845. isLight: function() {
  27846. return !this.isDark();
  27847. },
  27848. isValid: function() {
  27849. return this._ok;
  27850. },
  27851. getOriginalInput: function() {
  27852. return this._originalInput;
  27853. },
  27854. getFormat: function() {
  27855. return this._format;
  27856. },
  27857. getAlpha: function() {
  27858. return this._a;
  27859. },
  27860. getBrightness: function() {
  27861. //http://www.w3.org/TR/AERT#color-contrast
  27862. var rgb = this.toRgb();
  27863. return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
  27864. },
  27865. getLuminance: function() {
  27866. //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
  27867. var rgb = this.toRgb();
  27868. var RsRGB, GsRGB, BsRGB, R, G, B;
  27869. RsRGB = rgb.r/255;
  27870. GsRGB = rgb.g/255;
  27871. BsRGB = rgb.b/255;
  27872. if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
  27873. if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
  27874. if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
  27875. return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
  27876. },
  27877. setAlpha: function(value) {
  27878. this._a = boundAlpha(value);
  27879. this._roundA = mathRound(100*this._a) / 100;
  27880. return this;
  27881. },
  27882. toHsv: function() {
  27883. var hsv = rgbToHsv(this._r, this._g, this._b);
  27884. return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
  27885. },
  27886. toHsvString: function() {
  27887. var hsv = rgbToHsv(this._r, this._g, this._b);
  27888. var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
  27889. return (this._a == 1) ?
  27890. "hsv(" + h + ", " + s + "%, " + v + "%)" :
  27891. "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
  27892. },
  27893. toHsl: function() {
  27894. var hsl = rgbToHsl(this._r, this._g, this._b);
  27895. return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
  27896. },
  27897. toHslString: function() {
  27898. var hsl = rgbToHsl(this._r, this._g, this._b);
  27899. var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
  27900. return (this._a == 1) ?
  27901. "hsl(" + h + ", " + s + "%, " + l + "%)" :
  27902. "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
  27903. },
  27904. toHex: function(allow3Char) {
  27905. return rgbToHex(this._r, this._g, this._b, allow3Char);
  27906. },
  27907. toHexString: function(allow3Char) {
  27908. return '#' + this.toHex(allow3Char);
  27909. },
  27910. toHex8: function(allow4Char) {
  27911. return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
  27912. },
  27913. toHex8String: function(allow4Char) {
  27914. return '#' + this.toHex8(allow4Char);
  27915. },
  27916. toRgb: function() {
  27917. return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
  27918. },
  27919. toRgbString: function() {
  27920. return (this._a == 1) ?
  27921. "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
  27922. "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
  27923. },
  27924. toPercentageRgb: function() {
  27925. return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
  27926. },
  27927. toPercentageRgbString: function() {
  27928. return (this._a == 1) ?
  27929. "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
  27930. "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
  27931. },
  27932. toName: function() {
  27933. if (this._a === 0) {
  27934. return "transparent";
  27935. }
  27936. if (this._a < 1) {
  27937. return false;
  27938. }
  27939. return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
  27940. },
  27941. toFilter: function(secondColor) {
  27942. var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
  27943. var secondHex8String = hex8String;
  27944. var gradientType = this._gradientType ? "GradientType = 1, " : "";
  27945. if (secondColor) {
  27946. var s = tinycolor(secondColor);
  27947. secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
  27948. }
  27949. return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
  27950. },
  27951. toString: function(format) {
  27952. var formatSet = !!format;
  27953. format = format || this._format;
  27954. var formattedString = false;
  27955. var hasAlpha = this._a < 1 && this._a >= 0;
  27956. var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
  27957. if (needsAlphaFormat) {
  27958. // Special case for "transparent", all other non-alpha formats
  27959. // will return rgba when there is transparency.
  27960. if (format === "name" && this._a === 0) {
  27961. return this.toName();
  27962. }
  27963. return this.toRgbString();
  27964. }
  27965. if (format === "rgb") {
  27966. formattedString = this.toRgbString();
  27967. }
  27968. if (format === "prgb") {
  27969. formattedString = this.toPercentageRgbString();
  27970. }
  27971. if (format === "hex" || format === "hex6") {
  27972. formattedString = this.toHexString();
  27973. }
  27974. if (format === "hex3") {
  27975. formattedString = this.toHexString(true);
  27976. }
  27977. if (format === "hex4") {
  27978. formattedString = this.toHex8String(true);
  27979. }
  27980. if (format === "hex8") {
  27981. formattedString = this.toHex8String();
  27982. }
  27983. if (format === "name") {
  27984. formattedString = this.toName();
  27985. }
  27986. if (format === "hsl") {
  27987. formattedString = this.toHslString();
  27988. }
  27989. if (format === "hsv") {
  27990. formattedString = this.toHsvString();
  27991. }
  27992. return formattedString || this.toHexString();
  27993. },
  27994. clone: function() {
  27995. return tinycolor(this.toString());
  27996. },
  27997. _applyModification: function(fn, args) {
  27998. var color = fn.apply(null, [this].concat([].slice.call(args)));
  27999. this._r = color._r;
  28000. this._g = color._g;
  28001. this._b = color._b;
  28002. this.setAlpha(color._a);
  28003. return this;
  28004. },
  28005. lighten: function() {
  28006. return this._applyModification(lighten, arguments);
  28007. },
  28008. brighten: function() {
  28009. return this._applyModification(brighten, arguments);
  28010. },
  28011. darken: function() {
  28012. return this._applyModification(darken, arguments);
  28013. },
  28014. desaturate: function() {
  28015. return this._applyModification(desaturate, arguments);
  28016. },
  28017. saturate: function() {
  28018. return this._applyModification(saturate, arguments);
  28019. },
  28020. greyscale: function() {
  28021. return this._applyModification(greyscale, arguments);
  28022. },
  28023. spin: function() {
  28024. return this._applyModification(spin, arguments);
  28025. },
  28026. _applyCombination: function(fn, args) {
  28027. return fn.apply(null, [this].concat([].slice.call(args)));
  28028. },
  28029. analogous: function() {
  28030. return this._applyCombination(analogous, arguments);
  28031. },
  28032. complement: function() {
  28033. return this._applyCombination(complement, arguments);
  28034. },
  28035. monochromatic: function() {
  28036. return this._applyCombination(monochromatic, arguments);
  28037. },
  28038. splitcomplement: function() {
  28039. return this._applyCombination(splitcomplement, arguments);
  28040. },
  28041. triad: function() {
  28042. return this._applyCombination(triad, arguments);
  28043. },
  28044. tetrad: function() {
  28045. return this._applyCombination(tetrad, arguments);
  28046. }
  28047. };
  28048. // If input is an object, force 1 into "1.0" to handle ratios properly
  28049. // String input requires "1.0" as input, so 1 will be treated as 1
  28050. tinycolor.fromRatio = function(color, opts) {
  28051. if (typeof color == "object") {
  28052. var newColor = {};
  28053. for (var i in color) {
  28054. if (color.hasOwnProperty(i)) {
  28055. if (i === "a") {
  28056. newColor[i] = color[i];
  28057. }
  28058. else {
  28059. newColor[i] = convertToPercentage(color[i]);
  28060. }
  28061. }
  28062. }
  28063. color = newColor;
  28064. }
  28065. return tinycolor(color, opts);
  28066. };
  28067. // Given a string or object, convert that input to RGB
  28068. // Possible string inputs:
  28069. //
  28070. // "red"
  28071. // "#f00" or "f00"
  28072. // "#ff0000" or "ff0000"
  28073. // "#ff000000" or "ff000000"
  28074. // "rgb 255 0 0" or "rgb (255, 0, 0)"
  28075. // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
  28076. // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
  28077. // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
  28078. // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
  28079. // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
  28080. // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
  28081. //
  28082. function inputToRGB(color) {
  28083. var rgb = { r: 0, g: 0, b: 0 };
  28084. var a = 1;
  28085. var s = null;
  28086. var v = null;
  28087. var l = null;
  28088. var ok = false;
  28089. var format = false;
  28090. if (typeof color == "string") {
  28091. color = stringInputToObject(color);
  28092. }
  28093. if (typeof color == "object") {
  28094. if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
  28095. rgb = rgbToRgb(color.r, color.g, color.b);
  28096. ok = true;
  28097. format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  28098. }
  28099. else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
  28100. s = convertToPercentage(color.s);
  28101. v = convertToPercentage(color.v);
  28102. rgb = hsvToRgb(color.h, s, v);
  28103. ok = true;
  28104. format = "hsv";
  28105. }
  28106. else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
  28107. s = convertToPercentage(color.s);
  28108. l = convertToPercentage(color.l);
  28109. rgb = hslToRgb(color.h, s, l);
  28110. ok = true;
  28111. format = "hsl";
  28112. }
  28113. if (color.hasOwnProperty("a")) {
  28114. a = color.a;
  28115. }
  28116. }
  28117. a = boundAlpha(a);
  28118. return {
  28119. ok: ok,
  28120. format: color.format || format,
  28121. r: mathMin(255, mathMax(rgb.r, 0)),
  28122. g: mathMin(255, mathMax(rgb.g, 0)),
  28123. b: mathMin(255, mathMax(rgb.b, 0)),
  28124. a: a
  28125. };
  28126. }
  28127. // Conversion Functions
  28128. // --------------------
  28129. // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
  28130. // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
  28131. // `rgbToRgb`
  28132. // Handle bounds / percentage checking to conform to CSS color spec
  28133. // <http://www.w3.org/TR/css3-color/>
  28134. // *Assumes:* r, g, b in [0, 255] or [0, 1]
  28135. // *Returns:* { r, g, b } in [0, 255]
  28136. function rgbToRgb(r, g, b){
  28137. return {
  28138. r: bound01(r, 255) * 255,
  28139. g: bound01(g, 255) * 255,
  28140. b: bound01(b, 255) * 255
  28141. };
  28142. }
  28143. // `rgbToHsl`
  28144. // Converts an RGB color value to HSL.
  28145. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
  28146. // *Returns:* { h, s, l } in [0,1]
  28147. function rgbToHsl(r, g, b) {
  28148. r = bound01(r, 255);
  28149. g = bound01(g, 255);
  28150. b = bound01(b, 255);
  28151. var max = mathMax(r, g, b), min = mathMin(r, g, b);
  28152. var h, s, l = (max + min) / 2;
  28153. if(max == min) {
  28154. h = s = 0; // achromatic
  28155. }
  28156. else {
  28157. var d = max - min;
  28158. s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
  28159. switch(max) {
  28160. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  28161. case g: h = (b - r) / d + 2; break;
  28162. case b: h = (r - g) / d + 4; break;
  28163. }
  28164. h /= 6;
  28165. }
  28166. return { h: h, s: s, l: l };
  28167. }
  28168. // `hslToRgb`
  28169. // Converts an HSL color value to RGB.
  28170. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
  28171. // *Returns:* { r, g, b } in the set [0, 255]
  28172. function hslToRgb(h, s, l) {
  28173. var r, g, b;
  28174. h = bound01(h, 360);
  28175. s = bound01(s, 100);
  28176. l = bound01(l, 100);
  28177. function hue2rgb(p, q, t) {
  28178. if(t < 0) t += 1;
  28179. if(t > 1) t -= 1;
  28180. if(t < 1/6) return p + (q - p) * 6 * t;
  28181. if(t < 1/2) return q;
  28182. if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
  28183. return p;
  28184. }
  28185. if(s === 0) {
  28186. r = g = b = l; // achromatic
  28187. }
  28188. else {
  28189. var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  28190. var p = 2 * l - q;
  28191. r = hue2rgb(p, q, h + 1/3);
  28192. g = hue2rgb(p, q, h);
  28193. b = hue2rgb(p, q, h - 1/3);
  28194. }
  28195. return { r: r * 255, g: g * 255, b: b * 255 };
  28196. }
  28197. // `rgbToHsv`
  28198. // Converts an RGB color value to HSV
  28199. // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  28200. // *Returns:* { h, s, v } in [0,1]
  28201. function rgbToHsv(r, g, b) {
  28202. r = bound01(r, 255);
  28203. g = bound01(g, 255);
  28204. b = bound01(b, 255);
  28205. var max = mathMax(r, g, b), min = mathMin(r, g, b);
  28206. var h, s, v = max;
  28207. var d = max - min;
  28208. s = max === 0 ? 0 : d / max;
  28209. if(max == min) {
  28210. h = 0; // achromatic
  28211. }
  28212. else {
  28213. switch(max) {
  28214. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  28215. case g: h = (b - r) / d + 2; break;
  28216. case b: h = (r - g) / d + 4; break;
  28217. }
  28218. h /= 6;
  28219. }
  28220. return { h: h, s: s, v: v };
  28221. }
  28222. // `hsvToRgb`
  28223. // Converts an HSV color value to RGB.
  28224. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  28225. // *Returns:* { r, g, b } in the set [0, 255]
  28226. function hsvToRgb(h, s, v) {
  28227. h = bound01(h, 360) * 6;
  28228. s = bound01(s, 100);
  28229. v = bound01(v, 100);
  28230. var i = Math.floor(h),
  28231. f = h - i,
  28232. p = v * (1 - s),
  28233. q = v * (1 - f * s),
  28234. t = v * (1 - (1 - f) * s),
  28235. mod = i % 6,
  28236. r = [v, q, p, p, t, v][mod],
  28237. g = [t, v, v, q, p, p][mod],
  28238. b = [p, p, t, v, v, q][mod];
  28239. return { r: r * 255, g: g * 255, b: b * 255 };
  28240. }
  28241. // `rgbToHex`
  28242. // Converts an RGB color to hex
  28243. // Assumes r, g, and b are contained in the set [0, 255]
  28244. // Returns a 3 or 6 character hex
  28245. function rgbToHex(r, g, b, allow3Char) {
  28246. var hex = [
  28247. pad2(mathRound(r).toString(16)),
  28248. pad2(mathRound(g).toString(16)),
  28249. pad2(mathRound(b).toString(16))
  28250. ];
  28251. // Return a 3 character hex if possible
  28252. if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
  28253. return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
  28254. }
  28255. return hex.join("");
  28256. }
  28257. // `rgbaToHex`
  28258. // Converts an RGBA color plus alpha transparency to hex
  28259. // Assumes r, g, b are contained in the set [0, 255] and
  28260. // a in [0, 1]. Returns a 4 or 8 character rgba hex
  28261. function rgbaToHex(r, g, b, a, allow4Char) {
  28262. var hex = [
  28263. pad2(mathRound(r).toString(16)),
  28264. pad2(mathRound(g).toString(16)),
  28265. pad2(mathRound(b).toString(16)),
  28266. pad2(convertDecimalToHex(a))
  28267. ];
  28268. // Return a 4 character hex if possible
  28269. if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
  28270. return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
  28271. }
  28272. return hex.join("");
  28273. }
  28274. // `rgbaToArgbHex`
  28275. // Converts an RGBA color to an ARGB Hex8 string
  28276. // Rarely used, but required for "toFilter()"
  28277. function rgbaToArgbHex(r, g, b, a) {
  28278. var hex = [
  28279. pad2(convertDecimalToHex(a)),
  28280. pad2(mathRound(r).toString(16)),
  28281. pad2(mathRound(g).toString(16)),
  28282. pad2(mathRound(b).toString(16))
  28283. ];
  28284. return hex.join("");
  28285. }
  28286. // `equals`
  28287. // Can be called with any tinycolor input
  28288. tinycolor.equals = function (color1, color2) {
  28289. if (!color1 || !color2) { return false; }
  28290. return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
  28291. };
  28292. tinycolor.random = function() {
  28293. return tinycolor.fromRatio({
  28294. r: mathRandom(),
  28295. g: mathRandom(),
  28296. b: mathRandom()
  28297. });
  28298. };
  28299. // Modification Functions
  28300. // ----------------------
  28301. // Thanks to less.js for some of the basics here
  28302. // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
  28303. function desaturate(color, amount) {
  28304. amount = (amount === 0) ? 0 : (amount || 10);
  28305. var hsl = tinycolor(color).toHsl();
  28306. hsl.s -= amount / 100;
  28307. hsl.s = clamp01(hsl.s);
  28308. return tinycolor(hsl);
  28309. }
  28310. function saturate(color, amount) {
  28311. amount = (amount === 0) ? 0 : (amount || 10);
  28312. var hsl = tinycolor(color).toHsl();
  28313. hsl.s += amount / 100;
  28314. hsl.s = clamp01(hsl.s);
  28315. return tinycolor(hsl);
  28316. }
  28317. function greyscale(color) {
  28318. return tinycolor(color).desaturate(100);
  28319. }
  28320. function lighten (color, amount) {
  28321. amount = (amount === 0) ? 0 : (amount || 10);
  28322. var hsl = tinycolor(color).toHsl();
  28323. hsl.l += amount / 100;
  28324. hsl.l = clamp01(hsl.l);
  28325. return tinycolor(hsl);
  28326. }
  28327. function brighten(color, amount) {
  28328. amount = (amount === 0) ? 0 : (amount || 10);
  28329. var rgb = tinycolor(color).toRgb();
  28330. rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
  28331. rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
  28332. rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
  28333. return tinycolor(rgb);
  28334. }
  28335. function darken (color, amount) {
  28336. amount = (amount === 0) ? 0 : (amount || 10);
  28337. var hsl = tinycolor(color).toHsl();
  28338. hsl.l -= amount / 100;
  28339. hsl.l = clamp01(hsl.l);
  28340. return tinycolor(hsl);
  28341. }
  28342. // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
  28343. // Values outside of this range will be wrapped into this range.
  28344. function spin(color, amount) {
  28345. var hsl = tinycolor(color).toHsl();
  28346. var hue = (hsl.h + amount) % 360;
  28347. hsl.h = hue < 0 ? 360 + hue : hue;
  28348. return tinycolor(hsl);
  28349. }
  28350. // Combination Functions
  28351. // ---------------------
  28352. // Thanks to jQuery xColor for some of the ideas behind these
  28353. // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
  28354. function complement(color) {
  28355. var hsl = tinycolor(color).toHsl();
  28356. hsl.h = (hsl.h + 180) % 360;
  28357. return tinycolor(hsl);
  28358. }
  28359. function triad(color) {
  28360. var hsl = tinycolor(color).toHsl();
  28361. var h = hsl.h;
  28362. return [
  28363. tinycolor(color),
  28364. tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
  28365. tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
  28366. ];
  28367. }
  28368. function tetrad(color) {
  28369. var hsl = tinycolor(color).toHsl();
  28370. var h = hsl.h;
  28371. return [
  28372. tinycolor(color),
  28373. tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
  28374. tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
  28375. tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
  28376. ];
  28377. }
  28378. function splitcomplement(color) {
  28379. var hsl = tinycolor(color).toHsl();
  28380. var h = hsl.h;
  28381. return [
  28382. tinycolor(color),
  28383. tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
  28384. tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
  28385. ];
  28386. }
  28387. function analogous(color, results, slices) {
  28388. results = results || 6;
  28389. slices = slices || 30;
  28390. var hsl = tinycolor(color).toHsl();
  28391. var part = 360 / slices;
  28392. var ret = [tinycolor(color)];
  28393. for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
  28394. hsl.h = (hsl.h + part) % 360;
  28395. ret.push(tinycolor(hsl));
  28396. }
  28397. return ret;
  28398. }
  28399. function monochromatic(color, results) {
  28400. results = results || 6;
  28401. var hsv = tinycolor(color).toHsv();
  28402. var h = hsv.h, s = hsv.s, v = hsv.v;
  28403. var ret = [];
  28404. var modification = 1 / results;
  28405. while (results--) {
  28406. ret.push(tinycolor({ h: h, s: s, v: v}));
  28407. v = (v + modification) % 1;
  28408. }
  28409. return ret;
  28410. }
  28411. // Utility Functions
  28412. // ---------------------
  28413. tinycolor.mix = function(color1, color2, amount) {
  28414. amount = (amount === 0) ? 0 : (amount || 50);
  28415. var rgb1 = tinycolor(color1).toRgb();
  28416. var rgb2 = tinycolor(color2).toRgb();
  28417. var p = amount / 100;
  28418. var rgba = {
  28419. r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
  28420. g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
  28421. b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
  28422. a: ((rgb2.a - rgb1.a) * p) + rgb1.a
  28423. };
  28424. return tinycolor(rgba);
  28425. };
  28426. // Readability Functions
  28427. // ---------------------
  28428. // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
  28429. // `contrast`
  28430. // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
  28431. tinycolor.readability = function(color1, color2) {
  28432. var c1 = tinycolor(color1);
  28433. var c2 = tinycolor(color2);
  28434. return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
  28435. };
  28436. // `isReadable`
  28437. // Ensure that foreground and background color combinations meet WCAG2 guidelines.
  28438. // The third argument is an optional Object.
  28439. // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
  28440. // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
  28441. // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
  28442. // *Example*
  28443. // tinycolor.isReadable("#000", "#111") => false
  28444. // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
  28445. tinycolor.isReadable = function(color1, color2, wcag2) {
  28446. var readability = tinycolor.readability(color1, color2);
  28447. var wcag2Parms, out;
  28448. out = false;
  28449. wcag2Parms = validateWCAG2Parms(wcag2);
  28450. switch (wcag2Parms.level + wcag2Parms.size) {
  28451. case "AAsmall":
  28452. case "AAAlarge":
  28453. out = readability >= 4.5;
  28454. break;
  28455. case "AAlarge":
  28456. out = readability >= 3;
  28457. break;
  28458. case "AAAsmall":
  28459. out = readability >= 7;
  28460. break;
  28461. }
  28462. return out;
  28463. };
  28464. // `mostReadable`
  28465. // Given a base color and a list of possible foreground or background
  28466. // colors for that base, returns the most readable color.
  28467. // Optionally returns Black or White if the most readable color is unreadable.
  28468. // *Example*
  28469. // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
  28470. // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
  28471. // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
  28472. // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
  28473. tinycolor.mostReadable = function(baseColor, colorList, args) {
  28474. var bestColor = null;
  28475. var bestScore = 0;
  28476. var readability;
  28477. var includeFallbackColors, level, size ;
  28478. args = args || {};
  28479. includeFallbackColors = args.includeFallbackColors ;
  28480. level = args.level;
  28481. size = args.size;
  28482. for (var i= 0; i < colorList.length ; i++) {
  28483. readability = tinycolor.readability(baseColor, colorList[i]);
  28484. if (readability > bestScore) {
  28485. bestScore = readability;
  28486. bestColor = tinycolor(colorList[i]);
  28487. }
  28488. }
  28489. if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
  28490. return bestColor;
  28491. }
  28492. else {
  28493. args.includeFallbackColors=false;
  28494. return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
  28495. }
  28496. };
  28497. // Big List of Colors
  28498. // ------------------
  28499. // <http://www.w3.org/TR/css3-color/#svg-color>
  28500. var names = tinycolor.names = {
  28501. aliceblue: "f0f8ff",
  28502. antiquewhite: "faebd7",
  28503. aqua: "0ff",
  28504. aquamarine: "7fffd4",
  28505. azure: "f0ffff",
  28506. beige: "f5f5dc",
  28507. bisque: "ffe4c4",
  28508. black: "000",
  28509. blanchedalmond: "ffebcd",
  28510. blue: "00f",
  28511. blueviolet: "8a2be2",
  28512. brown: "a52a2a",
  28513. burlywood: "deb887",
  28514. burntsienna: "ea7e5d",
  28515. cadetblue: "5f9ea0",
  28516. chartreuse: "7fff00",
  28517. chocolate: "d2691e",
  28518. coral: "ff7f50",
  28519. cornflowerblue: "6495ed",
  28520. cornsilk: "fff8dc",
  28521. crimson: "dc143c",
  28522. cyan: "0ff",
  28523. darkblue: "00008b",
  28524. darkcyan: "008b8b",
  28525. darkgoldenrod: "b8860b",
  28526. darkgray: "a9a9a9",
  28527. darkgreen: "006400",
  28528. darkgrey: "a9a9a9",
  28529. darkkhaki: "bdb76b",
  28530. darkmagenta: "8b008b",
  28531. darkolivegreen: "556b2f",
  28532. darkorange: "ff8c00",
  28533. darkorchid: "9932cc",
  28534. darkred: "8b0000",
  28535. darksalmon: "e9967a",
  28536. darkseagreen: "8fbc8f",
  28537. darkslateblue: "483d8b",
  28538. darkslategray: "2f4f4f",
  28539. darkslategrey: "2f4f4f",
  28540. darkturquoise: "00ced1",
  28541. darkviolet: "9400d3",
  28542. deeppink: "ff1493",
  28543. deepskyblue: "00bfff",
  28544. dimgray: "696969",
  28545. dimgrey: "696969",
  28546. dodgerblue: "1e90ff",
  28547. firebrick: "b22222",
  28548. floralwhite: "fffaf0",
  28549. forestgreen: "228b22",
  28550. fuchsia: "f0f",
  28551. gainsboro: "dcdcdc",
  28552. ghostwhite: "f8f8ff",
  28553. gold: "ffd700",
  28554. goldenrod: "daa520",
  28555. gray: "808080",
  28556. green: "008000",
  28557. greenyellow: "adff2f",
  28558. grey: "808080",
  28559. honeydew: "f0fff0",
  28560. hotpink: "ff69b4",
  28561. indianred: "cd5c5c",
  28562. indigo: "4b0082",
  28563. ivory: "fffff0",
  28564. khaki: "f0e68c",
  28565. lavender: "e6e6fa",
  28566. lavenderblush: "fff0f5",
  28567. lawngreen: "7cfc00",
  28568. lemonchiffon: "fffacd",
  28569. lightblue: "add8e6",
  28570. lightcoral: "f08080",
  28571. lightcyan: "e0ffff",
  28572. lightgoldenrodyellow: "fafad2",
  28573. lightgray: "d3d3d3",
  28574. lightgreen: "90ee90",
  28575. lightgrey: "d3d3d3",
  28576. lightpink: "ffb6c1",
  28577. lightsalmon: "ffa07a",
  28578. lightseagreen: "20b2aa",
  28579. lightskyblue: "87cefa",
  28580. lightslategray: "789",
  28581. lightslategrey: "789",
  28582. lightsteelblue: "b0c4de",
  28583. lightyellow: "ffffe0",
  28584. lime: "0f0",
  28585. limegreen: "32cd32",
  28586. linen: "faf0e6",
  28587. magenta: "f0f",
  28588. maroon: "800000",
  28589. mediumaquamarine: "66cdaa",
  28590. mediumblue: "0000cd",
  28591. mediumorchid: "ba55d3",
  28592. mediumpurple: "9370db",
  28593. mediumseagreen: "3cb371",
  28594. mediumslateblue: "7b68ee",
  28595. mediumspringgreen: "00fa9a",
  28596. mediumturquoise: "48d1cc",
  28597. mediumvioletred: "c71585",
  28598. midnightblue: "191970",
  28599. mintcream: "f5fffa",
  28600. mistyrose: "ffe4e1",
  28601. moccasin: "ffe4b5",
  28602. navajowhite: "ffdead",
  28603. navy: "000080",
  28604. oldlace: "fdf5e6",
  28605. olive: "808000",
  28606. olivedrab: "6b8e23",
  28607. orange: "ffa500",
  28608. orangered: "ff4500",
  28609. orchid: "da70d6",
  28610. palegoldenrod: "eee8aa",
  28611. palegreen: "98fb98",
  28612. paleturquoise: "afeeee",
  28613. palevioletred: "db7093",
  28614. papayawhip: "ffefd5",
  28615. peachpuff: "ffdab9",
  28616. peru: "cd853f",
  28617. pink: "ffc0cb",
  28618. plum: "dda0dd",
  28619. powderblue: "b0e0e6",
  28620. purple: "800080",
  28621. rebeccapurple: "663399",
  28622. red: "f00",
  28623. rosybrown: "bc8f8f",
  28624. royalblue: "4169e1",
  28625. saddlebrown: "8b4513",
  28626. salmon: "fa8072",
  28627. sandybrown: "f4a460",
  28628. seagreen: "2e8b57",
  28629. seashell: "fff5ee",
  28630. sienna: "a0522d",
  28631. silver: "c0c0c0",
  28632. skyblue: "87ceeb",
  28633. slateblue: "6a5acd",
  28634. slategray: "708090",
  28635. slategrey: "708090",
  28636. snow: "fffafa",
  28637. springgreen: "00ff7f",
  28638. steelblue: "4682b4",
  28639. tan: "d2b48c",
  28640. teal: "008080",
  28641. thistle: "d8bfd8",
  28642. tomato: "ff6347",
  28643. turquoise: "40e0d0",
  28644. violet: "ee82ee",
  28645. wheat: "f5deb3",
  28646. white: "fff",
  28647. whitesmoke: "f5f5f5",
  28648. yellow: "ff0",
  28649. yellowgreen: "9acd32"
  28650. };
  28651. // Make it easy to access colors via `hexNames[hex]`
  28652. var hexNames = tinycolor.hexNames = flip(names);
  28653. // Utilities
  28654. // ---------
  28655. // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
  28656. function flip(o) {
  28657. var flipped = { };
  28658. for (var i in o) {
  28659. if (o.hasOwnProperty(i)) {
  28660. flipped[o[i]] = i;
  28661. }
  28662. }
  28663. return flipped;
  28664. }
  28665. // Return a valid alpha value [0,1] with all invalid values being set to 1
  28666. function boundAlpha(a) {
  28667. a = parseFloat(a);
  28668. if (isNaN(a) || a < 0 || a > 1) {
  28669. a = 1;
  28670. }
  28671. return a;
  28672. }
  28673. // Take input from [0, n] and return it as [0, 1]
  28674. function bound01(n, max) {
  28675. if (isOnePointZero(n)) { n = "100%"; }
  28676. var processPercent = isPercentage(n);
  28677. n = mathMin(max, mathMax(0, parseFloat(n)));
  28678. // Automatically convert percentage into number
  28679. if (processPercent) {
  28680. n = parseInt(n * max, 10) / 100;
  28681. }
  28682. // Handle floating point rounding errors
  28683. if ((Math.abs(n - max) < 0.000001)) {
  28684. return 1;
  28685. }
  28686. // Convert into [0, 1] range if it isn't already
  28687. return (n % max) / parseFloat(max);
  28688. }
  28689. // Force a number between 0 and 1
  28690. function clamp01(val) {
  28691. return mathMin(1, mathMax(0, val));
  28692. }
  28693. // Parse a base-16 hex value into a base-10 integer
  28694. function parseIntFromHex(val) {
  28695. return parseInt(val, 16);
  28696. }
  28697. // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  28698. // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  28699. function isOnePointZero(n) {
  28700. return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
  28701. }
  28702. // Check to see if string passed in is a percentage
  28703. function isPercentage(n) {
  28704. return typeof n === "string" && n.indexOf('%') != -1;
  28705. }
  28706. // Force a hex value to have 2 characters
  28707. function pad2(c) {
  28708. return c.length == 1 ? '0' + c : '' + c;
  28709. }
  28710. // Replace a decimal with it's percentage value
  28711. function convertToPercentage(n) {
  28712. if (n <= 1) {
  28713. n = (n * 100) + "%";
  28714. }
  28715. return n;
  28716. }
  28717. // Converts a decimal to a hex value
  28718. function convertDecimalToHex(d) {
  28719. return Math.round(parseFloat(d) * 255).toString(16);
  28720. }
  28721. // Converts a hex value to a decimal
  28722. function convertHexToDecimal(h) {
  28723. return (parseIntFromHex(h) / 255);
  28724. }
  28725. var matchers = (function() {
  28726. // <http://www.w3.org/TR/css3-values/#integers>
  28727. var CSS_INTEGER = "[-\\+]?\\d+%?";
  28728. // <http://www.w3.org/TR/css3-values/#number-value>
  28729. var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
  28730. // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
  28731. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
  28732. // Actual matching.
  28733. // Parentheses and commas are optional, but not required.
  28734. // Whitespace can take the place of commas or opening paren
  28735. var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  28736. var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  28737. return {
  28738. CSS_UNIT: new RegExp(CSS_UNIT),
  28739. rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
  28740. rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
  28741. hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
  28742. hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
  28743. hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
  28744. hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
  28745. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  28746. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  28747. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  28748. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  28749. };
  28750. })();
  28751. // `isValidCSSUnit`
  28752. // Take in a single string / number and check to see if it looks like a CSS unit
  28753. // (see `matchers` above for definition).
  28754. function isValidCSSUnit(color) {
  28755. return !!matchers.CSS_UNIT.exec(color);
  28756. }
  28757. // `stringInputToObject`
  28758. // Permissive string parsing. Take in a number of formats, and output an object
  28759. // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
  28760. function stringInputToObject(color) {
  28761. color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
  28762. var named = false;
  28763. if (names[color]) {
  28764. color = names[color];
  28765. named = true;
  28766. }
  28767. else if (color == 'transparent') {
  28768. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  28769. }
  28770. // Try to match string input using regular expressions.
  28771. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
  28772. // Just return an object and let the conversion functions handle that.
  28773. // This way the result will be the same whether the tinycolor is initialized with string or object.
  28774. var match;
  28775. if ((match = matchers.rgb.exec(color))) {
  28776. return { r: match[1], g: match[2], b: match[3] };
  28777. }
  28778. if ((match = matchers.rgba.exec(color))) {
  28779. return { r: match[1], g: match[2], b: match[3], a: match[4] };
  28780. }
  28781. if ((match = matchers.hsl.exec(color))) {
  28782. return { h: match[1], s: match[2], l: match[3] };
  28783. }
  28784. if ((match = matchers.hsla.exec(color))) {
  28785. return { h: match[1], s: match[2], l: match[3], a: match[4] };
  28786. }
  28787. if ((match = matchers.hsv.exec(color))) {
  28788. return { h: match[1], s: match[2], v: match[3] };
  28789. }
  28790. if ((match = matchers.hsva.exec(color))) {
  28791. return { h: match[1], s: match[2], v: match[3], a: match[4] };
  28792. }
  28793. if ((match = matchers.hex8.exec(color))) {
  28794. return {
  28795. r: parseIntFromHex(match[1]),
  28796. g: parseIntFromHex(match[2]),
  28797. b: parseIntFromHex(match[3]),
  28798. a: convertHexToDecimal(match[4]),
  28799. format: named ? "name" : "hex8"
  28800. };
  28801. }
  28802. if ((match = matchers.hex6.exec(color))) {
  28803. return {
  28804. r: parseIntFromHex(match[1]),
  28805. g: parseIntFromHex(match[2]),
  28806. b: parseIntFromHex(match[3]),
  28807. format: named ? "name" : "hex"
  28808. };
  28809. }
  28810. if ((match = matchers.hex4.exec(color))) {
  28811. return {
  28812. r: parseIntFromHex(match[1] + '' + match[1]),
  28813. g: parseIntFromHex(match[2] + '' + match[2]),
  28814. b: parseIntFromHex(match[3] + '' + match[3]),
  28815. a: convertHexToDecimal(match[4] + '' + match[4]),
  28816. format: named ? "name" : "hex8"
  28817. };
  28818. }
  28819. if ((match = matchers.hex3.exec(color))) {
  28820. return {
  28821. r: parseIntFromHex(match[1] + '' + match[1]),
  28822. g: parseIntFromHex(match[2] + '' + match[2]),
  28823. b: parseIntFromHex(match[3] + '' + match[3]),
  28824. format: named ? "name" : "hex"
  28825. };
  28826. }
  28827. return false;
  28828. }
  28829. function validateWCAG2Parms(parms) {
  28830. // return valid WCAG2 parms for isReadable.
  28831. // If input parms are invalid, return {"level":"AA", "size":"small"}
  28832. var level, size;
  28833. parms = parms || {"level":"AA", "size":"small"};
  28834. level = (parms.level || "AA").toUpperCase();
  28835. size = (parms.size || "small").toLowerCase();
  28836. if (level !== "AA" && level !== "AAA") {
  28837. level = "AA";
  28838. }
  28839. if (size !== "small" && size !== "large") {
  28840. size = "small";
  28841. }
  28842. return {"level":level, "size":size};
  28843. }
  28844. // Node: Export function
  28845. if ( true && module.exports) {
  28846. module.exports = tinycolor;
  28847. }
  28848. // AMD/requirejs: Define the module
  28849. else if (true) {
  28850. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
  28851. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  28852. }
  28853. // Browser: Expose to window
  28854. else {}
  28855. })(Math);
  28856. /***/ }),
  28857. /***/ "axFQ":
  28858. /***/ (function(module, exports) {
  28859. (function() { module.exports = window["wp"]["blockEditor"]; }());
  28860. /***/ }),
  28861. /***/ "b2RC":
  28862. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28863. "use strict";
  28864. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  28865. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  28866. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  28867. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  28868. /**
  28869. * WordPress dependencies
  28870. */
  28871. const grid = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  28872. xmlns: "http://www.w3.org/2000/svg",
  28873. viewBox: "0 0 24 24"
  28874. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  28875. d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",
  28876. fillRule: "evenodd",
  28877. clipRule: "evenodd"
  28878. }));
  28879. /* harmony default export */ __webpack_exports__["a"] = (grid);
  28880. /***/ }),
  28881. /***/ "bWcr":
  28882. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28883. "use strict";
  28884. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  28885. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  28886. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  28887. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  28888. /**
  28889. * WordPress dependencies
  28890. */
  28891. const closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  28892. xmlns: "http://www.w3.org/2000/svg",
  28893. viewBox: "0 0 24 24"
  28894. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  28895. d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
  28896. }));
  28897. /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
  28898. /***/ }),
  28899. /***/ "btIw":
  28900. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28901. "use strict";
  28902. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  28903. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  28904. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  28905. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  28906. /**
  28907. * WordPress dependencies
  28908. */
  28909. const keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  28910. xmlns: "http://www.w3.org/2000/svg",
  28911. viewBox: "-2 -2 24 24"
  28912. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  28913. d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"
  28914. }));
  28915. /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
  28916. /***/ }),
  28917. /***/ "cDcd":
  28918. /***/ (function(module, exports) {
  28919. (function() { module.exports = window["React"]; }());
  28920. /***/ }),
  28921. /***/ "cGtP":
  28922. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28923. "use strict";
  28924. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  28925. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  28926. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  28927. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  28928. /**
  28929. * WordPress dependencies
  28930. */
  28931. const search = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  28932. xmlns: "http://www.w3.org/2000/svg",
  28933. viewBox: "0 0 24 24"
  28934. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  28935. d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"
  28936. }));
  28937. /* harmony default export */ __webpack_exports__["a"] = (search);
  28938. /***/ }),
  28939. /***/ "diJD":
  28940. /***/ (function(module, exports) {
  28941. (function() { module.exports = window["wp"]["reusableBlocks"]; }());
  28942. /***/ }),
  28943. /***/ "ez49":
  28944. /***/ (function(module, exports, __webpack_require__) {
  28945. "use strict";
  28946. /**
  28947. * Copyright 2013-2015, Facebook, Inc.
  28948. * All rights reserved.
  28949. *
  28950. * This source code is licensed under the BSD-style license found in the
  28951. * LICENSE file in the root directory of this source tree. An additional grant
  28952. * of patent rights can be found in the PATENTS file in the same directory.
  28953. *
  28954. * @providesModule isEventSupported
  28955. */
  28956. var ExecutionEnvironment = __webpack_require__("o97j");
  28957. var useHasFeature;
  28958. if (ExecutionEnvironment.canUseDOM) {
  28959. useHasFeature =
  28960. document.implementation &&
  28961. document.implementation.hasFeature &&
  28962. // always returns true in newer browsers as per the standard.
  28963. // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
  28964. document.implementation.hasFeature('', '') !== true;
  28965. }
  28966. /**
  28967. * Checks if an event is supported in the current execution environment.
  28968. *
  28969. * NOTE: This will not work correctly for non-generic events such as `change`,
  28970. * `reset`, `load`, `error`, and `select`.
  28971. *
  28972. * Borrows from Modernizr.
  28973. *
  28974. * @param {string} eventNameSuffix Event name, e.g. "click".
  28975. * @param {?boolean} capture Check if the capture phase is supported.
  28976. * @return {boolean} True if the event is supported.
  28977. * @internal
  28978. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  28979. */
  28980. function isEventSupported(eventNameSuffix, capture) {
  28981. if (!ExecutionEnvironment.canUseDOM ||
  28982. capture && !('addEventListener' in document)) {
  28983. return false;
  28984. }
  28985. var eventName = 'on' + eventNameSuffix;
  28986. var isSupported = eventName in document;
  28987. if (!isSupported) {
  28988. var element = document.createElement('div');
  28989. element.setAttribute(eventName, 'return;');
  28990. isSupported = typeof element[eventName] === 'function';
  28991. }
  28992. if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
  28993. // This is the only way to test support for the `wheel` event in IE9+.
  28994. isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
  28995. }
  28996. return isSupported;
  28997. }
  28998. module.exports = isEventSupported;
  28999. /***/ }),
  29000. /***/ "fPbg":
  29001. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29002. "use strict";
  29003. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  29004. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  29005. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  29006. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  29007. /**
  29008. * WordPress dependencies
  29009. */
  29010. const alignLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  29011. xmlns: "http://www.w3.org/2000/svg",
  29012. viewBox: "0 0 24 24"
  29013. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  29014. d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"
  29015. }));
  29016. /* harmony default export */ __webpack_exports__["a"] = (alignLeft);
  29017. /***/ }),
  29018. /***/ "g56x":
  29019. /***/ (function(module, exports) {
  29020. (function() { module.exports = window["wp"]["hooks"]; }());
  29021. /***/ }),
  29022. /***/ "iClF":
  29023. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29024. "use strict";
  29025. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  29026. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  29027. /**
  29028. * WordPress dependencies
  29029. */
  29030. /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
  29031. /**
  29032. * Return an SVG icon.
  29033. *
  29034. * @param {IconProps} props icon is the SVG component to render
  29035. * size is a number specifiying the icon size in pixels
  29036. * Other props will be passed to wrapped SVG component
  29037. *
  29038. * @return {JSX.Element} Icon component
  29039. */
  29040. function Icon({
  29041. icon,
  29042. size = 24,
  29043. ...props
  29044. }) {
  29045. return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, {
  29046. width: size,
  29047. height: size,
  29048. ...props
  29049. });
  29050. }
  29051. /* harmony default export */ __webpack_exports__["a"] = (Icon);
  29052. /***/ }),
  29053. /***/ "jZUy":
  29054. /***/ (function(module, exports) {
  29055. (function() { module.exports = window["wp"]["coreData"]; }());
  29056. /***/ }),
  29057. /***/ "jrfk":
  29058. /***/ (function(module, exports) {
  29059. /**
  29060. * Copyright 2004-present Facebook. All Rights Reserved.
  29061. *
  29062. * @providesModule UserAgent_DEPRECATED
  29063. */
  29064. /**
  29065. * Provides entirely client-side User Agent and OS detection. You should prefer
  29066. * the non-deprecated UserAgent module when possible, which exposes our
  29067. * authoritative server-side PHP-based detection to the client.
  29068. *
  29069. * Usage is straightforward:
  29070. *
  29071. * if (UserAgent_DEPRECATED.ie()) {
  29072. * // IE
  29073. * }
  29074. *
  29075. * You can also do version checks:
  29076. *
  29077. * if (UserAgent_DEPRECATED.ie() >= 7) {
  29078. * // IE7 or better
  29079. * }
  29080. *
  29081. * The browser functions will return NaN if the browser does not match, so
  29082. * you can also do version compares the other way:
  29083. *
  29084. * if (UserAgent_DEPRECATED.ie() < 7) {
  29085. * // IE6 or worse
  29086. * }
  29087. *
  29088. * Note that the version is a float and may include a minor version number,
  29089. * so you should always use range operators to perform comparisons, not
  29090. * strict equality.
  29091. *
  29092. * **Note:** You should **strongly** prefer capability detection to browser
  29093. * version detection where it's reasonable:
  29094. *
  29095. * http://www.quirksmode.org/js/support.html
  29096. *
  29097. * Further, we have a large number of mature wrapper functions and classes
  29098. * which abstract away many browser irregularities. Check the documentation,
  29099. * grep for things, or ask on javascript@lists.facebook.com before writing yet
  29100. * another copy of "event || window.event".
  29101. *
  29102. */
  29103. var _populated = false;
  29104. // Browsers
  29105. var _ie, _firefox, _opera, _webkit, _chrome;
  29106. // Actual IE browser for compatibility mode
  29107. var _ie_real_version;
  29108. // Platforms
  29109. var _osx, _windows, _linux, _android;
  29110. // Architectures
  29111. var _win64;
  29112. // Devices
  29113. var _iphone, _ipad, _native;
  29114. var _mobile;
  29115. function _populate() {
  29116. if (_populated) {
  29117. return;
  29118. }
  29119. _populated = true;
  29120. // To work around buggy JS libraries that can't handle multi-digit
  29121. // version numbers, Opera 10's user agent string claims it's Opera
  29122. // 9, then later includes a Version/X.Y field:
  29123. //
  29124. // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
  29125. var uas = navigator.userAgent;
  29126. var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
  29127. var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
  29128. _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
  29129. _ipad = /\b(iP[ao]d)/.exec(uas);
  29130. _android = /Android/i.exec(uas);
  29131. _native = /FBAN\/\w+;/i.exec(uas);
  29132. _mobile = /Mobile/i.exec(uas);
  29133. // Note that the IE team blog would have you believe you should be checking
  29134. // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
  29135. // from either x64 or ia64; so ultimately, you should just check for Win64
  29136. // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
  29137. // Windows will send 'WOW64' instead.
  29138. _win64 = !!(/Win64/.exec(uas));
  29139. if (agent) {
  29140. _ie = agent[1] ? parseFloat(agent[1]) : (
  29141. agent[5] ? parseFloat(agent[5]) : NaN);
  29142. // IE compatibility mode
  29143. if (_ie && document && document.documentMode) {
  29144. _ie = document.documentMode;
  29145. }
  29146. // grab the "true" ie version from the trident token if available
  29147. var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
  29148. _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
  29149. _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
  29150. _opera = agent[3] ? parseFloat(agent[3]) : NaN;
  29151. _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
  29152. if (_webkit) {
  29153. // We do not add the regexp to the above test, because it will always
  29154. // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
  29155. // the userAgent string.
  29156. agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
  29157. _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
  29158. } else {
  29159. _chrome = NaN;
  29160. }
  29161. } else {
  29162. _ie = _firefox = _opera = _chrome = _webkit = NaN;
  29163. }
  29164. if (os) {
  29165. if (os[1]) {
  29166. // Detect OS X version. If no version number matches, set _osx to true.
  29167. // Version examples: 10, 10_6_1, 10.7
  29168. // Parses version number as a float, taking only first two sets of
  29169. // digits. If only one set of digits is found, returns just the major
  29170. // version number.
  29171. var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
  29172. _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
  29173. } else {
  29174. _osx = false;
  29175. }
  29176. _windows = !!os[2];
  29177. _linux = !!os[3];
  29178. } else {
  29179. _osx = _windows = _linux = false;
  29180. }
  29181. }
  29182. var UserAgent_DEPRECATED = {
  29183. /**
  29184. * Check if the UA is Internet Explorer.
  29185. *
  29186. *
  29187. * @return float|NaN Version number (if match) or NaN.
  29188. */
  29189. ie: function() {
  29190. return _populate() || _ie;
  29191. },
  29192. /**
  29193. * Check if we're in Internet Explorer compatibility mode.
  29194. *
  29195. * @return bool true if in compatibility mode, false if
  29196. * not compatibility mode or not ie
  29197. */
  29198. ieCompatibilityMode: function() {
  29199. return _populate() || (_ie_real_version > _ie);
  29200. },
  29201. /**
  29202. * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
  29203. * only need this because Skype can't handle 64-bit IE yet. We need to remove
  29204. * this when we don't need it -- tracked by #601957.
  29205. */
  29206. ie64: function() {
  29207. return UserAgent_DEPRECATED.ie() && _win64;
  29208. },
  29209. /**
  29210. * Check if the UA is Firefox.
  29211. *
  29212. *
  29213. * @return float|NaN Version number (if match) or NaN.
  29214. */
  29215. firefox: function() {
  29216. return _populate() || _firefox;
  29217. },
  29218. /**
  29219. * Check if the UA is Opera.
  29220. *
  29221. *
  29222. * @return float|NaN Version number (if match) or NaN.
  29223. */
  29224. opera: function() {
  29225. return _populate() || _opera;
  29226. },
  29227. /**
  29228. * Check if the UA is WebKit.
  29229. *
  29230. *
  29231. * @return float|NaN Version number (if match) or NaN.
  29232. */
  29233. webkit: function() {
  29234. return _populate() || _webkit;
  29235. },
  29236. /**
  29237. * For Push
  29238. * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
  29239. */
  29240. safari: function() {
  29241. return UserAgent_DEPRECATED.webkit();
  29242. },
  29243. /**
  29244. * Check if the UA is a Chrome browser.
  29245. *
  29246. *
  29247. * @return float|NaN Version number (if match) or NaN.
  29248. */
  29249. chrome : function() {
  29250. return _populate() || _chrome;
  29251. },
  29252. /**
  29253. * Check if the user is running Windows.
  29254. *
  29255. * @return bool `true' if the user's OS is Windows.
  29256. */
  29257. windows: function() {
  29258. return _populate() || _windows;
  29259. },
  29260. /**
  29261. * Check if the user is running Mac OS X.
  29262. *
  29263. * @return float|bool Returns a float if a version number is detected,
  29264. * otherwise true/false.
  29265. */
  29266. osx: function() {
  29267. return _populate() || _osx;
  29268. },
  29269. /**
  29270. * Check if the user is running Linux.
  29271. *
  29272. * @return bool `true' if the user's OS is some flavor of Linux.
  29273. */
  29274. linux: function() {
  29275. return _populate() || _linux;
  29276. },
  29277. /**
  29278. * Check if the user is running on an iPhone or iPod platform.
  29279. *
  29280. * @return bool `true' if the user is running some flavor of the
  29281. * iPhone OS.
  29282. */
  29283. iphone: function() {
  29284. return _populate() || _iphone;
  29285. },
  29286. mobile: function() {
  29287. return _populate() || (_iphone || _ipad || _android || _mobile);
  29288. },
  29289. nativeApp: function() {
  29290. // webviews inside of the native apps
  29291. return _populate() || _native;
  29292. },
  29293. android: function() {
  29294. return _populate() || _android;
  29295. },
  29296. ipad: function() {
  29297. return _populate() || _ipad;
  29298. }
  29299. };
  29300. module.exports = UserAgent_DEPRECATED;
  29301. /***/ }),
  29302. /***/ "l3Sj":
  29303. /***/ (function(module, exports) {
  29304. (function() { module.exports = window["wp"]["i18n"]; }());
  29305. /***/ }),
  29306. /***/ "o97j":
  29307. /***/ (function(module, exports, __webpack_require__) {
  29308. "use strict";
  29309. /**
  29310. * Copyright (c) 2015, Facebook, Inc.
  29311. * All rights reserved.
  29312. *
  29313. * This source code is licensed under the BSD-style license found in the
  29314. * LICENSE file in the root directory of this source tree. An additional grant
  29315. * of patent rights can be found in the PATENTS file in the same directory.
  29316. *
  29317. * @providesModule ExecutionEnvironment
  29318. */
  29319. /*jslint evil: true */
  29320. var canUseDOM = !!(
  29321. typeof window !== 'undefined' &&
  29322. window.document &&
  29323. window.document.createElement
  29324. );
  29325. /**
  29326. * Simple, lightweight module assisting with the detection and context of
  29327. * Worker. Helps avoid circular dependencies and allows code to reason about
  29328. * whether or not they are in a Worker, even if they never include the main
  29329. * `ReactWorker` dependency.
  29330. */
  29331. var ExecutionEnvironment = {
  29332. canUseDOM: canUseDOM,
  29333. canUseWorkers: typeof Worker !== 'undefined',
  29334. canUseEventListeners:
  29335. canUseDOM && !!(window.addEventListener || window.attachEvent),
  29336. canUseViewport: canUseDOM && !!window.screen,
  29337. isInWorker: !canUseDOM // For now, this is true - might change in the future.
  29338. };
  29339. module.exports = ExecutionEnvironment;
  29340. /***/ }),
  29341. /***/ "oMoS":
  29342. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29343. "use strict";
  29344. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  29345. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  29346. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  29347. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  29348. /**
  29349. * WordPress dependencies
  29350. */
  29351. const button = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  29352. viewBox: "0 0 24 24",
  29353. xmlns: "http://www.w3.org/2000/svg"
  29354. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  29355. d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"
  29356. }));
  29357. /* harmony default export */ __webpack_exports__["a"] = (button);
  29358. /***/ }),
  29359. /***/ "onLe":
  29360. /***/ (function(module, exports) {
  29361. (function() { module.exports = window["wp"]["notices"]; }());
  29362. /***/ }),
  29363. /***/ "plpT":
  29364. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29365. "use strict";
  29366. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  29367. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  29368. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  29369. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  29370. /**
  29371. * WordPress dependencies
  29372. */
  29373. const alignCenter = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  29374. xmlns: "http://www.w3.org/2000/svg",
  29375. viewBox: "0 0 24 24"
  29376. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  29377. d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"
  29378. }));
  29379. /* harmony default export */ __webpack_exports__["a"] = (alignCenter);
  29380. /***/ }),
  29381. /***/ "qRz9":
  29382. /***/ (function(module, exports) {
  29383. (function() { module.exports = window["wp"]["richText"]; }());
  29384. /***/ }),
  29385. /***/ "rH4q":
  29386. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29387. "use strict";
  29388. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  29389. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  29390. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  29391. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  29392. /**
  29393. * WordPress dependencies
  29394. */
  29395. const media = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  29396. xmlns: "http://www.w3.org/2000/svg",
  29397. viewBox: "0 0 24 24"
  29398. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  29399. d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"
  29400. }));
  29401. /* harmony default export */ __webpack_exports__["a"] = (media);
  29402. /***/ }),
  29403. /***/ "tI+e":
  29404. /***/ (function(module, exports) {
  29405. (function() { module.exports = window["wp"]["components"]; }());
  29406. /***/ }),
  29407. /***/ "wJiJ":
  29408. /***/ (function(module, exports, __webpack_require__) {
  29409. module.exports = __webpack_require__("1K8p");
  29410. /***/ }),
  29411. /***/ "wx14":
  29412. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29413. "use strict";
  29414. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
  29415. function _extends() {
  29416. _extends = Object.assign || function (target) {
  29417. for (var i = 1; i < arguments.length; i++) {
  29418. var source = arguments[i];
  29419. for (var key in source) {
  29420. if (Object.prototype.hasOwnProperty.call(source, key)) {
  29421. target[key] = source[key];
  29422. }
  29423. }
  29424. }
  29425. return target;
  29426. };
  29427. return _extends.apply(this, arguments);
  29428. }
  29429. /***/ }),
  29430. /***/ "wy2R":
  29431. /***/ (function(module, exports) {
  29432. (function() { module.exports = window["moment"]; }());
  29433. /***/ }),
  29434. /***/ "xTGt":
  29435. /***/ (function(module, exports) {
  29436. (function() { module.exports = window["wp"]["blob"]; }());
  29437. /***/ }),
  29438. /***/ "ywyh":
  29439. /***/ (function(module, exports) {
  29440. (function() { module.exports = window["wp"]["apiFetch"]; }());
  29441. /***/ }),
  29442. /***/ "ziDm":
  29443. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29444. "use strict";
  29445. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  29446. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  29447. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  29448. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  29449. /**
  29450. * WordPress dependencies
  29451. */
  29452. const alignRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  29453. xmlns: "http://www.w3.org/2000/svg",
  29454. viewBox: "0 0 24 24"
  29455. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  29456. d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"
  29457. }));
  29458. /* harmony default export */ __webpack_exports__["a"] = (alignRight);
  29459. /***/ })
  29460. /******/ });