File: /home/slfopp7cb1df/www/shaneconrad.me/wp-content/plugins/embedpress/assets/js/blocks.build.js
import{j as e,g as aa,R as na}from"./chunks/index-MYapx1be.js";import{R as Qa,A as Aa,P as en,p as Ls,a as tn,T as on,b as Wt,c as sn,d as ft,L as Ts}from"./chunks/AnimatedTheme-Bv11i3Ou.js";const{G:Lt,Path:H,Polygon:tg,SVG:dt}=wp.components,_s=e.jsxs(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",children:[" ",e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#2196F3"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),e.jsx(H,{style:{fill:"#BBDEFB"},d:"M 40 13 L 30 13 L 30 3 Z "}),e.jsx(H,{style:{fill:"#1565C0"},d:"M 30 13 L 40 23 L 40 13 Z "}),e.jsx(H,{style:{fill:"#E3F2FD"},d:"M 15 23 L 33 23 L 33 25 L 15 25 Z "}),e.jsx(H,{style:{fill:"#E3F2FD"},d:"M 15 27 L 33 27 L 33 29 L 15 29 Z "}),e.jsx(H,{style:{fill:"#E3F2FD"},d:"M 15 31 L 33 31 L 33 33 L 15 33 Z "}),e.jsx(H,{style:{fill:"#E3F2FD"},d:"M 15 35 L 25 35 L 25 37 L 15 37 Z "})]})]}),ra=e.jsx(dt,{xmlns:"http://www.w3.org/1999/xlink",enableBackground:"new 0 0 24 24",id:"Layer_2",version:"1.1",viewBox:"0 0 24 24",children:e.jsxs(Lt,{children:[e.jsx(H,{d:"M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14c1.1045704,0,2-0.8954296,2-2 V6z",style:{fill:"#FFC720"}}),e.jsx(H,{d:"M17,6c-0.5444336,0-1.0367432-0.2190552-1.3973999-0.5719604L21,10.8254395V6H17z",style:{fill:"url(#SVGID_1_)"}}),e.jsx(H,{d:"M19,23.75H5c-1.1045532,0-2-0.8954468-2-2V22c0,1.1045532,0.8954468,2,2,2h14c1.1045532,0,2-0.8954468,2-2 v-0.25C21,22.8545532,20.1045532,23.75,19,23.75z",style:{opacity:"0.1"}}),e.jsx(H,{d:"M15,0v4c0,1.1045694,0.8954306,2,2,2h4L15,0z",style:{fill:"#FFE083"}}),e.jsx(H,{d:"M17,5.75c-1.1045532,0-2-0.8954468-2-2V4c0,1.1045532,0.8954468,2,2,2h4l-0.25-0.25H17z",style:{opacity:"0.1"}}),e.jsx(H,{d:"M15,0H5C3.8954468,0,3,0.8953857,3,2v0.25c0-1.1046143,0.8954468-2,2-2h10",style:{fill:"#FFFFFF",opacity:"0.2"}}),e.jsx(H,{d:"M15.5,9h-7C7.6728516,9,7,9.6728516,7,10.5v6C7,17.3271484,7.6728516,18,8.5,18h7 c0.8271484,0,1.5-0.6728516,1.5-1.5v-6C17,9.6728516,16.3271484,9,15.5,9z M8,15.5V11h8v4.5H8z",style:{fill:"#FFFFFF"}}),e.jsx(H,{d:"M21,6l-6-6H5C3.8954306,0,3,0.8954305,3,2v20c0,1.1045704,0.8954306,2,2,2h14 c1.1045704,0,2-0.8954296,2-2V6z",style:{fill:"url(#SVGID_2_)"}})]})}),ia=e.jsx(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1",children:e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#43A047"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),e.jsx(H,{style:{fill:"#C8E6C9"},d:"M 40 13 L 30 13 L 30 3 Z "}),e.jsx(H,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 31 23 L 15 23 L 15 37 L 33 37 L 33 23 Z M 17 25 L 21 25 L 21 27 L 17 27 Z M 17 29 L 21 29 L 21 31 L 17 31 Z M 17 33 L 21 33 L 21 35 L 17 35 Z M 31 35 L 23 35 L 23 33 L 31 33 Z M 31 31 L 23 31 L 23 29 L 31 29 Z M 31 27 L 23 27 L 23 25 L 31 25 Z "})]})}),da=e.jsxs(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1",children:[" ",e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#7850C1"},d:"M 37 45 L 11 45 C 9.34375 45 8 43.65625 8 42 L 8 6 C 8 4.34375 9.34375 3 11 3 L 30 3 L 40 13 L 40 42 C 40 43.65625 38.65625 45 37 45 Z "}),e.jsx(H,{style:{fill:"#C2ABE1"},d:"M 40 13 L 30 13 L 30 3 Z "}),e.jsx(H,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 19 23 L 33 23 L 33 25 L 19 25 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 19 28 L 33 28 L 33 30 L 19 30 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 19 33 L 33 33 L 33 35 L 19 35 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 15 23 L 17 23 L 17 25 L 15 25 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 15 28 L 17 28 L 17 30 L 15 30 Z "}),e.jsx(H,{style:{fill:"#E8F5E9"},d:"M 15 33 L 17 33 L 17 35 L 15 35 Z "})]})]}),ca=e.jsxs(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1",children:[" ",e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#DE5245"},d:"M37,45H11c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h19l10,10v29C40,43.7,38.7,45,37,45z"}),e.jsx(H,{style:{fill:"#EEA6A0"},d:"M40,13H30V3L40,13z"}),e.jsx(H,{style:{fill:"#B3433A"},d:"M30,13l10,10V13H30z"}),e.jsx(H,{style:{fill:"#FFFFFF"},d:"M20.5,32c-3,0-5.5-2.5-5.5-5.5c0-3,2.5-5.5,5.5-5.5s5.5,2.5,5.5,5.5C26,29.5,23.5,32,20.5,32z M20.5,23c-1.9,0-3.5,1.6-3.5,3.5s1.6,3.5,3.5,3.5s3.5-1.6,3.5-3.5S22.4,23,20.5,23z"}),e.jsx(H,{style:{fill:"#FFFFFF"},d:"M27.6,29c-0.6,1.8-1.9,3.3-3.6,4.1V38h9v-9H27.6z"})]})]}),pa=e.jsxs(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1",children:[" ",e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#1C9957"},d:"M 42 39 L 42 9 C 42 7.34375 40.65625 6 39 6 L 9 6 C 7.34375 6 6 7.34375 6 9 L 6 39 C 6 40.65625 7.34375 42 9 42 L 39 42 C 40.65625 42 42 40.65625 42 39 Z "}),e.jsx(H,{style:{fill:"#3E7BF1"},d:"M 9 42 L 39 42 C 40.65625 42 24 26 24 26 C 24 26 7.34375 42 9 42 Z "}),e.jsx(H,{style:{fill:"#CBCCC9"},d:"M 42 39 L 42 9 C 42 7.34375 26 24 26 24 C 26 24 42 40.65625 42 39 Z "}),e.jsx(H,{style:{fill:"#EFEFEF"},d:"M 39 42 C 40.65625 42 42 40.65625 42 39 L 42 38.753906 L 26.246094 23 L 23 26.246094 L 38.753906 42 Z "}),e.jsx(H,{style:{fill:"#FFD73D"},d:"M 42 9 C 42 7.34375 40.65625 6 39 6 L 38.753906 6 L 6 38.753906 L 6 39 C 6 40.65625 7.34375 42 9 42 L 9.246094 42 L 42 9.246094 Z "}),e.jsx(H,{style:{fill:"#D73F35"},d:"M 36 2 C 30.476563 2 26 6.476563 26 12 C 26 18.8125 33.664063 21.296875 35.332031 31.851563 C 35.441406 32.53125 35.449219 33 36 33 C 36.550781 33 36.558594 32.53125 36.667969 31.851563 C 38.335938 21.296875 46 18.8125 46 12 C 46 6.476563 41.523438 2 36 2 Z "}),e.jsx(H,{style:{fill:"#752622"},d:"M 39.5 12 C 39.5 13.933594 37.933594 15.5 36 15.5 C 34.066406 15.5 32.5 13.933594 32.5 12 C 32.5 10.066406 34.066406 8.5 36 8.5 C 37.933594 8.5 39.5 10.066406 39.5 12 Z "}),e.jsx(H,{style:{fill:"#FFFFFF"},d:"M 14.492188 12.53125 L 14.492188 14.632813 L 17.488281 14.632813 C 17.09375 15.90625 16.03125 16.816406 14.492188 16.816406 C 12.660156 16.816406 11.175781 15.332031 11.175781 13.5 C 11.175781 11.664063 12.660156 10.179688 14.492188 10.179688 C 15.316406 10.179688 16.070313 10.484375 16.648438 10.980469 L 18.195313 9.433594 C 17.21875 8.542969 15.921875 8 14.492188 8 C 11.453125 8 8.992188 10.464844 8.992188 13.5 C 8.992188 16.535156 11.453125 19 14.492188 19 C 19.304688 19 20.128906 14.683594 19.675781 12.539063 Z "})]})]}),ua=e.jsxs(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1",children:[" ",e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#FFFFFF"},d:"M 12 32 L 12 8 L 39 8 L 39 26 L 33 32 L 24 32 L 18 38 L 18 32 Z "}),e.jsx(H,{style:{fill:"#8E24AA"},d:"M 9 5 L 6 12.121094 L 6 38 L 15 38 L 15 43 L 20 43 L 25 38 L 32 38 L 42 28 L 42 5 Z M 38 26 L 33 31 L 24 31 L 19 36 L 19 31 L 13 31 L 13 9 L 38 9 Z "}),e.jsx(H,{style:{fill:"#8E24AA"},d:"M 32 25 L 27 25 L 27 15 L 32 15 Z "}),e.jsx(H,{style:{fill:"#8E24AA"},d:"M 24 25 L 19 25 L 19 15 L 24 15 Z "})]})]}),ma=e.jsxs(dt,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 769 598",version:"1.1",children:[" ",e.jsxs(Lt,{children:[e.jsx(H,{style:{fill:"#148ee0"},d:"M766.89,229.17c0,0 -17.78,35.38 -106.5,91.3c-37.82,23.79 -116.36,49.1 -217.33,58.86c-54.52,5.29 -154.9,0.99 -197.96,0.99c-43.29,0 -63.13,9.12 -101.95,52.84c-143.15,161.36 -143.15,161.36 -143.15,161.36c0,0 49.57,0.24 87.01,0.24c37.43,0 271.55,13.59 375.43,-14.98c337.36,-92.72 304.46,-350.62 304.46,-350.62z"}),e.jsx(H,{style:{fill:"#54bbff"},d:"M757.84,126.66c16.23,-98.97 -39.68,-126.16 -39.68,-126.16c0,0 2.36,80.57 -145.7,97.65c-131.42,15.16 -572.46,3.74 -572.46,3.74c0,0 0,0 141.74,162.54c38.39,44.06 58.76,49.17 101.92,52.22c43.16,2.89 138.42,1.86 202.99,-3.05c70.58,-5.41 171.17,-28.43 239.19,-81.11c34.88,-26.98 65.21,-64.48 72,-105.83z"})]})]}),ha=e.jsx(dt,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false",children:e.jsx(H,{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"})}),ga=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 276 340",children:[e.jsx("path",{d:"M196.7.6H24.3C11.1.6.4 11.3.4 24.6v292.9c0 12.3 10 22.2 22.2 22.2H252c13.3 0 23.9-10.7 23.9-23.9V80.9L196.7.6z",fill:"#e94848"}),e.jsx("path",{d:"M196.7 57c0 13.3 10.7 23.9 23.9 23.9H276L196.7.6V57z",fill:"#f19191"}),e.jsxs("linearGradient",{id:"A",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"77.111",x2:"116.568",y2:"77.111",children:[e.jsx("stop",{offset:"0",stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff0f0"})]}),e.jsx("path",{d:"M113 84.5H48.3c-1.9 0-3.5-1.6-3.5-3.5v-7.7c0-1.9 1.6-3.5 3.5-3.5H113c1.9 0 3.5 1.6 3.5 3.5V81c.1 1.9-1.5 3.5-3.5 3.5z",fill:"url(#A)"}),e.jsxs("linearGradient",{id:"B",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"136.016",x2:"233.927",y2:"136.016",children:[e.jsx("stop",{offset:"0",stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff0f0"})]}),e.jsx("use",{href:"#H",opacity:".8",fill:"url(#B)"}),e.jsxs("linearGradient",{id:"C",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"135.993",x2:"233.927",y2:"135.993",children:[e.jsx("stop",{offset:"0",stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff0f0"})]}),e.jsx("use",{href:"#H",y:"33.6",opacity:".7",fill:"url(#C)"}),e.jsxs("linearGradient",{id:"D",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"135.969",x2:"233.927",y2:"135.969",children:[e.jsx("stop",{offset:"0",stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff0f0"})]}),e.jsx("use",{href:"#H",y:"67.2",opacity:".6",fill:"url(#D)"}),e.jsxs("linearGradient",{id:"E",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"136.045",x2:"233.927",y2:"136.045",children:[e.jsx("stop",{offset:"0",stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff0f0"})]}),e.jsx("use",{href:"#H",y:"100.7",opacity:".4",fill:"url(#E)"}),e.jsxs("linearGradient",{id:"F",gradientUnits:"userSpaceOnUse",x1:"44.744",y1:"270.322",x2:"174.778",y2:"270.322",children:[e.jsx("stop",{offset:"0",stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff0f0"})]}),e.jsx("path",{d:"M171.9 277.7H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9h124.3c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z",opacity:".3",fill:"url(#F)"}),e.jsx("defs",{children:e.jsx("path",{id:"H",d:"M231 143.4H47.6c-1.6 0-2.9-1.3-2.9-2.9v-9c0-1.6 1.3-2.9 2.9-2.9H231c1.6 0 2.9 1.3 2.9 2.9v9c0 1.6-1.3 2.9-2.9 2.9z"})})]}),fa=e.jsxs("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 512 512",children:[e.jsx("path",{fill:"#E2E5E7",d:"M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"}),e.jsx("path",{fill:"#B0B7BD",d:"M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"}),e.jsx("polygon",{fill:"#CAD1D8",points:"480,224 384,128 480,128 "}),e.jsx("path",{fill:"#F15642",d:`M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
V416z`}),e.jsxs("g",{children:[e.jsx("path",{fill:"#FFFFFF",d:`M101.744,303.152c0-4.224,3.328-8.832,8.688-8.832h29.552c16.64,0,31.616,11.136,31.616,32.48
c0,20.224-14.976,31.488-31.616,31.488h-21.36v16.896c0,5.632-3.584,8.816-8.192,8.816c-4.224,0-8.688-3.184-8.688-8.816V303.152z
M118.624,310.432v31.872h21.36c8.576,0,15.36-7.568,15.36-15.504c0-8.944-6.784-16.368-15.36-16.368H118.624z`}),e.jsx("path",{fill:"#FFFFFF",d:`M196.656,384c-4.224,0-8.832-2.304-8.832-7.92v-72.672c0-4.592,4.608-7.936,8.832-7.936h29.296
c58.464,0,57.184,88.528,1.152,88.528H196.656z M204.72,311.088V368.4h21.232c34.544,0,36.08-57.312,0-57.312H204.72z`}),e.jsx("path",{fill:"#FFFFFF",d:`M303.872,312.112v20.336h32.624c4.608,0,9.216,4.608,9.216,9.072c0,4.224-4.608,7.68-9.216,7.68
h-32.624v26.864c0,4.48-3.184,7.92-7.664,7.92c-5.632,0-9.072-3.44-9.072-7.92v-72.672c0-4.592,3.456-7.936,9.072-7.936h44.912
c5.632,0,8.96,3.344,8.96,7.936c0,4.096-3.328,8.704-8.96,8.704h-37.248V312.112z`})]}),e.jsx("path",{fill:"#CAD1D8",d:"M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"})]}),ba=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"186 38 76 76",children:[e.jsx("path",{fill:"#fff",d:"M244 56h-40v40h40V56z"}),e.jsx("path",{fill:"#EA4335",d:"M244 114l18-18h-18v18z"}),e.jsx("path",{fill:"#FBBC04",d:"M262 56h-18v40h18V56z"}),e.jsx("path",{fill:"#34A853",d:"M244 96h-40v18h40V96z"}),e.jsx("path",{fill:"#188038",d:"M186 96v12c0 3.315 2.685 6 6 6h12V96h-18z"}),e.jsx("path",{fill:"#1967D2",d:"M262 56V44c0-3.315-2.685-6-6-6h-12v18h18z"}),e.jsx("path",{fill:"#4285F4",d:"M244 38h-52c-3.315 0 -6 2.685-6 6v52h18V56h40V38z"}),e.jsx("path",{fill:"#4285F4",d:"M212.205 87.03c-1.495-1.01-2.53-2.485-3.095-4.435l3.47-1.43c.315 1.2.865 2.13 1.65 2.79.78.66 1.73.985 2.84.985 1.135 0 2.11-.345 2.925-1.035s1.225-1.57 1.225-2.635c0-1.09-.43-1.98-1.29-2.67-.86-.69-1.94-1.035-3.23-1.035h-2.005V74.13h1.8c1.11 0 2.045-.3 2.805-.9.76-.6 1.14-1.42 1.14-2.465 0 -.93-.34-1.67-1.02-2.225-.68-.555-1.54-.835-2.585-.835-1.02 0 -1.83.27-2.43.815a4.784 4.784 0 0 0 -1.31 2.005l-3.435-1.43c.455-1.29 1.29-2.43 2.515-3.415 1.225-.985 2.79-1.48 4.69-1.48 1.405 0 2.67.27 3.79.815 1.12.545 2 1.3 2.635 2.26.635.965.95 2.045.95 3.245 0 1.225-.295 2.26-.885 3.11-.59.85-1.315 1.5-2.175 1.955v.205a6.605 6.605 0 0 1 2.79 2.175c.725.975 1.09 2.14 1.09 3.5 0 1.36-.345 2.575-1.035 3.64s-1.645 1.905-2.855 2.515c-1.215.61-2.58.92-4.095.92-1.755.005-3.375-.5-4.87-1.51zM233.52 69.81l-3.81 2.755-1.905-2.89 6.835-4.93h2.62V88h-3.74V69.81z"})]}),U=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",id:"Layer_1",x:0,y:0,style:{enableBackground:"new 0 0 70 70"},viewBox:"0 0 70 70",children:[e.jsx("style",{children:".st0{fill:#5b4e96}"}),e.jsx("path",{d:"M4 4.4h9.3V1.1H.7v12.7H4zM65.7 56.8v9.3h-9.4v3.3H68.9V56.8zM59 41.8c.3-.2.7-.3 1-.5 8.2-4.5 11.1-14.8 6.6-22.9-2.6-4.7-7.4-7.9-12.8-8.5-3.1-.4-6.3.2-9.2 1.5-.3.2-.7.3-1 .5-3.9 2.2-6.8 5.8-8 9.9L26.4 48c-.8 2.4-2.3 4.3-4.3 5.4-.2.1-.3.2-.5.3-1.5.7-3.2 1-4.9.8-2.9-.3-5.5-2-6.9-4.6-1.2-2.1-1.4-4.5-.8-6.9.7-2.3 2.2-4.3 4.3-5.4.2-.1.4-.2.5-.3 1.5-.7 3.2-1 5-.8h.2L17.1 42c-.1.4.1.8.5.9l4.9 1.6c.4.1.8-.1.9-.4l4.2-12c.1-.3.1-.6-.1-.9-.1-.3-.4-.5-.7-.6l-4.4-1.3c-.1 0-.2 0-.3-.1l-.4-.1c-.6-.1-1.3-.3-1.9-.3-3.2-.4-6.3.2-9.2 1.5-.3.2-.7.3-1 .5-4 2.2-6.8 5.8-8.1 10.1-1.3 4.4-.7 9 1.5 12.9 2.6 4.7 7.4 7.9 12.8 8.5 3.1.4 6.3-.2 9.2-1.5.3-.2.7-.3 1-.5 3.9-2.2 6.8-5.8 8-9.9l9.2-26.2v-.1c1-2.6 2.4-4.3 4.3-5.4.2-.1.4-.2.5-.3 1.5-.7 3.2-1 4.9-.8 2.9.3 5.5 2 6.9 4.6 2.4 4.4.8 9.9-3.5 12.3-.2.1-.4.2-.5.3-1.6.7-3.2 1-5 .8-.5-.1-1-.2-1.6-.3l-2.8-.8c-.3-.1-.6.1-.7.4L43.3 41c-.1.3.1.7.4.8l3.5 1c.8.2 1.7.4 2.6.5 3.1.4 6.3-.2 9.2-1.5z",className:"st0"})]}),lt=e.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 48 48",version:"1",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{fill:"#2196F3",cx:"24",cy:"24",r:"21"}),e.jsx("path",{fill:"#fff",d:"M22 22h4v11h-4z"}),e.jsx("circle",{fill:"#fff",cx:"24",cy:"16.5",r:"2.5"})]}),ln=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),an=()=>e.jsx("div",{className:"ep-doc-popup-icon",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",xmlSpace:"preserve",children:[e.jsx("path",{fill:"#fff",d:"M5 3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6l-2-2v8H5V5h8l-2-2H5zm9 0 2.7 2.7-7.5 7.5 1.7 1.7 7.5-7.5L21 10V3h-7z"}),e.jsx("path",{style:{fill:"none"},d:"M0 0h24v24H0z"})]})}),nn=()=>e.jsx("div",{className:"ep-doc-download-icon",children:e.jsx("svg",{width:20,height:20,viewBox:"0 0 0.6 0.6",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M.525.4A.025.025 0 0 1 .55.422v.053A.075.075 0 0 1 .479.55H.125A.075.075 0 0 1 .05.479V.425A.025.025 0 0 1 .1.422v.053A.025.025 0 0 0 .122.5h.353A.025.025 0 0 0 .5.478V.425A.025.025 0 0 1 .525.4ZM.3.05a.025.025 0 0 1 .025.025v.24L.357.283A.025.025 0 0 1 .39.281l.002.002a.025.025 0 0 1 .002.033L.392.318.317.393.316.394.314.395.311.397.308.398.305.399.301.4H.295L.292.399.289.398.287.397.285.395A.025.025 0 0 1 .283.393L.208.318A.025.025 0 0 1 .241.281l.002.002.032.032v-.24A.025.025 0 0 1 .3.05Z"})})}),rn=()=>e.jsx("div",{className:"ep-doc-print-icon",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 24",children:e.jsx("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z",fill:"#fff"})})}),dn=()=>e.jsx("div",{className:"ep-doc-fullscreen-icon",children:e.jsx("svg",{width:20,height:20,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"m3 15 .117.007a1 1 0 0 1 .876.876L4 16v4h4l.117.007a1 1 0 0 1 0 1.986L8 22H3l-.117-.007a1 1 0 0 1-.876-.876L2 21v-5l.007-.117a1 1 0 0 1 .876-.876L3 15Zm18 0a1 1 0 0 1 .993.883L22 16v5a1 1 0 0 1-.883.993L21 22h-5a1 1 0 0 1-.117-1.993L16 20h4v-4a1 1 0 0 1 .883-.993L21 15ZM8 2a1 1 0 0 1 .117 1.993L8 4H4v4a1 1 0 0 1-.883.993L3 9a1 1 0 0 1-.993-.883L2 8V3a1 1 0 0 1 .883-.993L3 2h5Zm13 0 .117.007a1 1 0 0 1 .876.876L22 3v5l-.007.117a1 1 0 0 1-.876.876L21 9l-.117-.007a1 1 0 0 1-.876-.876L20 8V4h-4l-.117-.007a1 1 0 0 1 0-1.986L16 2h5Z",fill:"#fff"})})}),cn=()=>e.jsx("div",{className:"ep-doc-minimize-icon",style:{display:"none"},children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{enableBackground:"new 0 0 385.331 385.331"},xmlSpace:"preserve",width:20,height:20,children:[e.jsx("path",{fill:"#fff",d:"M13.751 8.131h5.62c0.355 0 0.619 -0.28 0.619 -0.634 0 -0.355 -0.265 -0.615 -0.619 -0.614h-4.995V1.878c0 -0.355 -0.27 -0.624 -0.624 -0.624s-0.624 0.27 -0.624 0.624v5.62c0 0.002 0.001 0.003 0.001 0.004 0 0.002 -0.001 0.003 -0.001 0.005 0 0.348 0.276 0.625 0.624 0.624zM6.244 1.259c-0.354 0 -0.614 0.265 -0.614 0.619v4.995H0.624c-0.355 0 -0.624 0.27 -0.624 0.624 0 0.355 0.27 0.624 0.624 0.624h5.62c0.002 0 0.003 -0.001 0.004 -0.001 0.002 0 0.003 0.001 0.005 0.001 0.348 0 0.624 -0.276 0.624 -0.624V1.878c0 -0.354 -0.28 -0.619 -0.634 -0.619zm0.005 10.61H0.629c-0.355 0.001 -0.619 0.28 -0.619 0.634 0 0.355 0.265 0.615 0.619 0.614h4.995v5.005c0 0.355 0.27 0.624 0.624 0.624 0.355 0 0.624 -0.27 0.624 -0.624V12.502c0 -0.002 -0.001 -0.003 -0.001 -0.004 0 -0.002 0.001 -0.003 0.001 -0.005 0 -0.348 -0.276 -0.624 -0.624 -0.624zm13.127 0H13.756c-0.002 0 -0.003 0.001 -0.004 0.001 -0.002 0 -0.003 -0.001 -0.005 -0.001 -0.348 0 -0.624 0.276 -0.624 0.624v5.62c0 0.355 0.28 0.619 0.634 0.619 0.354 0.001 0.614 -0.265 0.614 -0.619v-4.995H19.376c0.355 0 0.624 -0.27 0.624 -0.624s-0.27 -0.624 -0.624 -0.625z"})," ",e.jsx("g",{}),e.jsx("g",{}),e.jsx("g",{}),e.jsx("g",{}),e.jsx("g",{}),e.jsx("g",{})]})}),pn=()=>e.jsx("div",{className:"ep-doc-draw-icon",children:e.jsx("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"m15 7.5 2.5 2.5m-10 10L19.25 8.25c0.69 -0.69 0.69 -1.81 0 -2.5v0c-0.69 -0.69 -1.81 -0.69 -2.5 0L5 17.5V20h2.5Zm0 0h8.379C17.05 20 18 19.05 18 17.879v0c0 -0.563 -0.224 -1.103 -0.621 -1.5L17 16M4.5 5c2 -2 5.5 -1 5.5 1 0 2.5 -6 2.5 -6 5 0 0.876 0.533 1.526 1.226 2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})});var ya={exports:{}},xa={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(s,l){return s<<l|s>>>32-l},rotr:function(s,l){return s<<32-l|s>>>l},endian:function(s){if(s.constructor==Number)return t.rotl(s,8)&16711935|t.rotl(s,24)&4278255360;for(var l=0;l<s.length;l++)s[l]=t.endian(s[l]);return s},randomBytes:function(s){for(var l=[];s>0;s--)l.push(Math.floor(Math.random()*256));return l},bytesToWords:function(s){for(var l=[],a=0,n=0;a<s.length;a++,n+=8)l[n>>>5]|=s[a]<<24-n%32;return l},wordsToBytes:function(s){for(var l=[],a=0;a<s.length*32;a+=8)l.push(s[a>>>5]>>>24-a%32&255);return l},bytesToHex:function(s){for(var l=[],a=0;a<s.length;a++)l.push((s[a]>>>4).toString(16)),l.push((s[a]&15).toString(16));return l.join("")},hexToBytes:function(s){for(var l=[],a=0;a<s.length;a+=2)l.push(parseInt(s.substr(a,2),16));return l},bytesToBase64:function(s){for(var l=[],a=0;a<s.length;a+=3)for(var n=s[a]<<16|s[a+1]<<8|s[a+2],c=0;c<4;c++)a*8+c*6<=s.length*8?l.push(o.charAt(n>>>6*(3-c)&63)):l.push("=");return l.join("")},base64ToBytes:function(s){s=s.replace(/[^A-Z0-9+\/]/ig,"");for(var l=[],a=0,n=0;a<s.length;n=++a%4)n!=0&&l.push((o.indexOf(s.charAt(a-1))&Math.pow(2,-2*n+8)-1)<<n*2|o.indexOf(s.charAt(a))>>>6-n*2);return l}};xa.exports=t})();var un=xa.exports,gs={utf8:{stringToBytes:function(o){return gs.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(gs.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var t=[],s=0;s<o.length;s++)t.push(o.charCodeAt(s)&255);return t},bytesToString:function(o){for(var t=[],s=0;s<o.length;s++)t.push(String.fromCharCode(o[s]));return t.join("")}}},Bs=gs;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var mn=function(o){return o!=null&&(wa(o)||hn(o)||!!o._isBuffer)};function wa(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}function hn(o){return typeof o.readFloatLE=="function"&&typeof o.slice=="function"&&wa(o.slice(0,0))}(function(){var o=un,t=Bs.utf8,s=mn,l=Bs.bin,a=function(n,c){n.constructor==String?c&&c.encoding==="binary"?n=l.stringToBytes(n):n=t.stringToBytes(n):s(n)?n=Array.prototype.slice.call(n,0):!Array.isArray(n)&&n.constructor!==Uint8Array&&(n=n.toString());for(var r=o.bytesToWords(n),u=n.length*8,i=1732584193,d=-271733879,m=-1732584194,p=271733878,h=0;h<r.length;h++)r[h]=(r[h]<<8|r[h]>>>24)&16711935|(r[h]<<24|r[h]>>>8)&4278255360;r[u>>>5]|=128<<u%32,r[(u+64>>>9<<4)+14]=u;for(var x=a._ff,g=a._gg,b=a._hh,f=a._ii,h=0;h<r.length;h+=16){var y=i,P=d,v=m,w=p;i=x(i,d,m,p,r[h+0],7,-680876936),p=x(p,i,d,m,r[h+1],12,-389564586),m=x(m,p,i,d,r[h+2],17,606105819),d=x(d,m,p,i,r[h+3],22,-1044525330),i=x(i,d,m,p,r[h+4],7,-176418897),p=x(p,i,d,m,r[h+5],12,1200080426),m=x(m,p,i,d,r[h+6],17,-1473231341),d=x(d,m,p,i,r[h+7],22,-45705983),i=x(i,d,m,p,r[h+8],7,1770035416),p=x(p,i,d,m,r[h+9],12,-1958414417),m=x(m,p,i,d,r[h+10],17,-42063),d=x(d,m,p,i,r[h+11],22,-1990404162),i=x(i,d,m,p,r[h+12],7,1804603682),p=x(p,i,d,m,r[h+13],12,-40341101),m=x(m,p,i,d,r[h+14],17,-1502002290),d=x(d,m,p,i,r[h+15],22,1236535329),i=g(i,d,m,p,r[h+1],5,-165796510),p=g(p,i,d,m,r[h+6],9,-1069501632),m=g(m,p,i,d,r[h+11],14,643717713),d=g(d,m,p,i,r[h+0],20,-373897302),i=g(i,d,m,p,r[h+5],5,-701558691),p=g(p,i,d,m,r[h+10],9,38016083),m=g(m,p,i,d,r[h+15],14,-660478335),d=g(d,m,p,i,r[h+4],20,-405537848),i=g(i,d,m,p,r[h+9],5,568446438),p=g(p,i,d,m,r[h+14],9,-1019803690),m=g(m,p,i,d,r[h+3],14,-187363961),d=g(d,m,p,i,r[h+8],20,1163531501),i=g(i,d,m,p,r[h+13],5,-1444681467),p=g(p,i,d,m,r[h+2],9,-51403784),m=g(m,p,i,d,r[h+7],14,1735328473),d=g(d,m,p,i,r[h+12],20,-1926607734),i=b(i,d,m,p,r[h+5],4,-378558),p=b(p,i,d,m,r[h+8],11,-2022574463),m=b(m,p,i,d,r[h+11],16,1839030562),d=b(d,m,p,i,r[h+14],23,-35309556),i=b(i,d,m,p,r[h+1],4,-1530992060),p=b(p,i,d,m,r[h+4],11,1272893353),m=b(m,p,i,d,r[h+7],16,-155497632),d=b(d,m,p,i,r[h+10],23,-1094730640),i=b(i,d,m,p,r[h+13],4,681279174),p=b(p,i,d,m,r[h+0],11,-358537222),m=b(m,p,i,d,r[h+3],16,-722521979),d=b(d,m,p,i,r[h+6],23,76029189),i=b(i,d,m,p,r[h+9],4,-640364487),p=b(p,i,d,m,r[h+12],11,-421815835),m=b(m,p,i,d,r[h+15],16,530742520),d=b(d,m,p,i,r[h+2],23,-995338651),i=f(i,d,m,p,r[h+0],6,-198630844),p=f(p,i,d,m,r[h+7],10,1126891415),m=f(m,p,i,d,r[h+14],15,-1416354905),d=f(d,m,p,i,r[h+5],21,-57434055),i=f(i,d,m,p,r[h+12],6,1700485571),p=f(p,i,d,m,r[h+3],10,-1894986606),m=f(m,p,i,d,r[h+10],15,-1051523),d=f(d,m,p,i,r[h+1],21,-2054922799),i=f(i,d,m,p,r[h+8],6,1873313359),p=f(p,i,d,m,r[h+15],10,-30611744),m=f(m,p,i,d,r[h+6],15,-1560198380),d=f(d,m,p,i,r[h+13],21,1309151649),i=f(i,d,m,p,r[h+4],6,-145523070),p=f(p,i,d,m,r[h+11],10,-1120210379),m=f(m,p,i,d,r[h+2],15,718787259),d=f(d,m,p,i,r[h+9],21,-343485551),i=i+y>>>0,d=d+P>>>0,m=m+v>>>0,p=p+w>>>0}return o.endian([i,d,m,p])};a._ff=function(n,c,r,u,i,d,m){var p=n+(c&r|~c&u)+(i>>>0)+m;return(p<<d|p>>>32-d)+c},a._gg=function(n,c,r,u,i,d,m){var p=n+(c&u|r&~u)+(i>>>0)+m;return(p<<d|p>>>32-d)+c},a._hh=function(n,c,r,u,i,d,m){var p=n+(c^r^u)+(i>>>0)+m;return(p<<d|p>>>32-d)+c},a._ii=function(n,c,r,u,i,d,m){var p=n+(r^(c|~u))+(i>>>0)+m;return(p<<d|p>>>32-d)+c},a._blocksize=16,a._digestsize=16,ya.exports=function(n,c){if(n==null)throw new Error("Illegal argument "+n);var r=o.wordsToBytes(a(n,c));return c&&c.asBytes?r:c&&c.asString?l.bytesToString(r):o.bytesToHex(r)}})();var gn=ya.exports;const ye=aa(gn),fn=(o,t)=>{if(typeof embedpressGutenbergData>"u"||!embedpressGutenbergData.ajax_url)return;const s=new XMLHttpRequest;s.open("POST",embedpressGutenbergData.ajax_url),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){s.status===200?console.log("EmbedPress: Source data saved successfully"):console.error("EmbedPress: Failed to save source data:",s.statusText)},s.onerror=function(){console.error("EmbedPress: Request failed:",s.statusText)};const l={action:"save_source_data",block_id:o,source_url:t,_source_nonce:embedpressGutenbergData.source_nonce||""},a=Object.keys(l).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(l[n])}`).join("&");s.send(a)},bn=o=>{if(typeof embedpressGutenbergData>"u"||!embedpressGutenbergData.ajax_url)return;const t=new XMLHttpRequest;t.open("POST",embedpressGutenbergData.ajax_url),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.onload=function(){t.status===200?console.log("EmbedPress: Source data deleted successfully"):console.error("EmbedPress: Failed to delete source data:",t.statusText)},t.onerror=function(){console.error("EmbedPress: Request failed:",t.statusText)};const s={action:"delete_source_data",block_id:o,_source_nonce:embedpressGutenbergData.source_nonce||""},l=Object.keys(s).map(a=>`${encodeURIComponent(a)}=${encodeURIComponent(s[a])}`).join("&");t.send(l)},yn=()=>{if(typeof wp>"u"||!wp.data)return;const o=()=>wp.data.select("core/block-editor").getBlocks();let t=o();wp.data.subscribe(()=>{const s=o(),l=t.filter(a=>!s.includes(a));if(l.length&&s.length<t.length){const a=l.filter(n=>n.name==="embedpress/embedpress"&&n.attributes.clientId).map(n=>n.attributes.clientId);a.length>0&&a.forEach(n=>{bn(n);const c=ye(n);if(typeof window.embedpressPlayers<"u"&&window.embedpressPlayers[c])try{window.embedpressPlayers[c].destroy(),delete window.embedpressPlayers[c]}catch(r){console.warn("EmbedPress: Error destroying player on block removal:",r)}})}t=s})},va=({attributes:o})=>{const{customPlayer:t}=o;if(!t)return"";const{playerPreset:s,playerColor:l,posterThumbnail:a,playerPip:n,playerRestart:c,playerRewind:r,playerFastForward:u,playerTooltip:i,playerHideControls:d,playerDownload:m,starttime:p,endtime:h,relatedvideos:x,muteVideo:g,fullscreen:b,vstarttime:f,vautoplay:y,vautopause:P,vdnt:v}=o,{selfhosted:w,format:j}=_n(o.url),$={rewind:r,restart:c,pip:n,poster_thumbnail:a,player_color:l,player_preset:s,fast_forward:u,player_tooltip:i,hide_controls:d,download:m,...p&&{start:p},...h&&{end:h},...x&&{rel:x},...g&&{mute:g},...b&&{fullscreen:b},...f&&{t:f},...y&&{autoplay:y},...P&&{autopause:P},...v&&{dnt:v},...w&&{self_hosted:w},...j&&{hosted_format:j}};return JSON.stringify($)},ja=({attributes:o})=>{const{instaLayout:t,slidesShow:s,slidesScroll:l,carouselAutoplay:a,autoplaySpeed:n,transitionSpeed:c,carouselLoop:r,carouselArrows:u,carouselSpacing:i}=o;return t!=="insta-carousel"?"":JSON.stringify({layout:t,slideshow:s,autoplay:a,autoplayspeed:n,transitionspeed:c,loop:r,arrows:u,spacing:i})},fs=o=>o.match(/\.(mp4|mov|avi|wmv|flv|mkv|webm|mpeg|mpg)$/i),bs=o=>o.match(/\.(mp3|wav|ogg|aac)$/i),Ro=o=>/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/(?:c\/|channel\/|user\/|@)[\w.-]+\/?$/i.test(o),ys=o=>/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)[\w-]+/i.test(o)&&!Ro(o)&&!Ho(o)&&!Ca(o),Ho=o=>/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/(?:c\/|channel\/|user\/|@)[\w-]+\/live\/?$/i.test(o),Ca=o=>/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/shorts\/[\w-]+/i.test(o),_a=o=>/^(?:https?:\/\/)?(?:www\.)?vimeo\.com\/\d+/i.test(o),ka=o=>/\/medias\/|(?:https?:\/\/)?(?:www\.)?(?:wistia.com\/)(\w+)[^?\/]*$/i.test(o),$a=o=>/^(?:https?:\/\/)?(?:www\.)?instagram\.com\/[\w.-]+\/?$/i.test(o),xs=o=>/^(?:https?:\/\/)?(?:www\.)?opensea\.io\/collection\/[\w.-]+\/?$/i.test(o),Pa=o=>/^(?:https?:\/\/)?(?:www\.)?opensea\.io\/assets\/[\w.-]+\/[\w.-]+\/?$/i.test(o),xn=o=>/^(?:https?:\/\/)?(?:www\.)?calendly\.com\/[\w.-]+/i.test(o),wn=o=>/^(?:https?:\/\/)?(?:www\.)?tiktok\.com\/@[\w.-]+\/video\/([\w.-]+)$/i.test(o),vn=o=>/^https?:\/\/(www\.)?spreaker\.com\/(show|user|podcast|episode)\/[^/]+/.test(o),jn=o=>/^https:\/\/(photos\.app\.goo\.gl|photos\.google\.com)\/.*$/i.test(o),Sa=o=>/^(?:https?:\/\/)?(?:www\.)?meetup\.com\/.+/i.test(o);typeof window.embedpressPlayers>"u"&&(window.embedpressPlayers={});const Fs=(o,t)=>{const{url:s,posterThumbnail:l,customPlayer:a,playerTooltip:n,playerHideControls:c,playerPreset:r,playerColor:u,playerPip:i,playerRestart:d,playerRewind:m,playerFastForward:p,fullscreen:h,vautopause:x,vdnt:g,vstarttime:b}=t,f=bs(s);if(fs(s),window.embedpressPlayers[o])try{window.embedpressPlayers[o].destroy(),delete window.embedpressPlayers[o]}catch(P){console.warn("EmbedPress: Error destroying player:",P)}const y=setInterval(()=>{let P=document.querySelector(`[data-playerid="${o}"] .ose-embedpress-responsive`);if(fs(s)?P=document.querySelector(`[data-playerid="${o}"] .ose-embedpress-responsive video`):bs(s)&&(P=document.querySelector(`[data-playerid="${o}"] .ose-embedpress-responsive audio`)),P&&typeof Plyr<"u"){clearInterval(y);let v=document.querySelector(`[data-playerid="${o}"]`).getAttribute("data-options");v=JSON.parse(v),document.querySelector(`[data-playerid="${o}"]`).style.opacity="1";const w=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,j=document.querySelector(`[data-playerid='${o}'] iframe[src*="youtube"]`)!==null,$=w&&j,S=new Plyr(P,{controls:["play-large","restart","rewind","play","fast-forward","progress","current-time","duration","mute","volume","captions","settings",f?"":"pip","airplay",v.download?"download":"",f?"":"fullscreen"],hideControls:c,tooltips:{controls:n,seek:n},fullscreen:{enabled:!0,fallback:!0,iosNative:!$},playsinline:!0,youtube:{...v.autoplay&&{autoplay:v.autoplay},...v.start&&{start:v.start},...v.end&&{end:v.end},...v.rel&&{rel:v.rel},...v.fullscreen&&{fs:v.fullscreen}},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,controls:!1,...v.t&&{t:v.t},...v.vautoplay&&{autoplay:v.vautoplay},...v.autopause&&{autopause:v.autopause},...v.dnt&&{dnt:v.dnt}}});if(window.embedpressPlayers[o]=S,$){const _=document.querySelector(`[data-playerid='${o}'] iframe[src*="youtube"]`);_&&(_.setAttribute("allowfullscreen",""),_.setAttribute("webkitallowfullscreen",""),_.setAttribute("mozallowfullscreen",""),_.classList.add("ios-youtube-iframe"),S.on("enterfullscreen",()=>{const B=document.querySelector('meta[name="viewport"]');if(B){const N=B.getAttribute("content");B.setAttribute("data-original-content",N),B.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover")}}),S.on("exitfullscreen",()=>{const B=document.querySelector('meta[name="viewport"]');B&&B.hasAttribute("data-original-content")&&(B.setAttribute("content",B.getAttribute("data-original-content")),B.removeAttribute("data-original-content"))}))}l&&(S.poster=l)}},200)},Cn=(o,t)=>{const{url:s,instaLayout:l,slidesShow:a,slidesScroll:n,carouselAutoplay:c,autoplaySpeed:r,transitionSpeed:u,carouselLoop:i,carouselArrows:d,carouselSpacing:m}=t,p={layout:l,slidesPerView:a,spacing:m,loop:i,autoplay:c,autoplaySpeed:r,transitionSpeed:u,arrows:d,breakpoints:{768:{slidesPerView:2},1024:{slidesPerView:4}}},h=setInterval(()=>{if(document.querySelector(`[data-carouselid="${o}"] .embedpress-insta-container`)&&typeof CgCarousel<"u"){clearInterval(h);const g=new CgCarousel(`[data-carouselid="${o}"] .embedpress-insta-container`,p,{});if(d){const y=document.querySelector(`[data-carouselid="${o}"] .cg-carousel__btns`);y&&y.classList.remove("hidden")}else{const y=document.querySelector(`[data-carouselid="${o}"] .cg-carousel__btns`);y&&y.classList.add("hidden")}const b=document.querySelector(`[data-carouselid="${o}"] #js-carousel__next-1`);b&&b.addEventListener("click",()=>g.next());const f=document.querySelector(`[data-carouselid="${o}"] #js-carousel__prev-1`);f&&f.addEventListener("click",()=>g.prev())}},200)};function _n(o){const t=/\.(mp4|mov|avi|wmv|flv|mkv|webm|mpeg|mpg)$/i,s=/\.(mp3|wav|ogg|aac)$/i,l=t.test(o),a=s.test(o);let n=!1,c="";return(l||a)&&(n=!0,l?c="video":a&&(c="audio")),n?{selfhosted:!0,format:c}:{selfhosted:!1}}const{Fragment:kn}=wp.element;function La({attributes:o}){const{url:t,clientId:s,width:l,height:a,videosize:n,ispagination:c,gapbetweenvideos:r,ytChannelLayout:u,columns:i,customlogo:d,loadmore:m,itemperpage:p,limit:h,customPlayer:x,fullscreen:g,posterThumbnail:b,playerPreset:f,playerColor:y,playerPip:P,playerRestart:v,playerRewind:w,playerFastForward:j,playerDownload:$,instaLayout:S}=o,_=ye(s||""),B=P?"block":"none",N=v?"block":"none",I=w?"block":"none",R=j?"block":"none",L=g?"block":"none",J=$?"block":"none";let W="repeat(auto-fit, minmax(250px, 1fr))";i>0&&(W=`repeat(auto-fit, minmax(calc(${100/i}% - ${r}px), 1fr))`);let V="flex";c||(V="none");let Z="";d&&(Z=`
[data-source-id="source-${s}"] img.watermark.ep-custom-logo {
display: block !important;
}
`);let F="none";return S==="insta-carousel"&&(F="block"),e.jsxs(kn,{children:[Ro(t)&&e.jsx("style",{children:`
[data-source-id="source-${s}"] .ep-youtube__content__block .youtube__content__body .content__wrap:not(.youtube-carousel){
gap: ${r}px!important;
margin-top: ${r}px!important;
display: grid!important;
grid-template-columns: ${W}!important;
}
[data-source-id="source-${s}"] .ose-youtube{
width: ${l}px!important;
}
[data-source-id="source-${s}"] .ose-youtube .ep-first-video iframe{
max-height: ${a}px!important;
}
[data-source-id="source-${s}"] .ose-youtube > iframe{
height: ${a}px!important;
width: ${l}px!important;
max-width: 100%!important;
}
[data-source-id="source-${s}"] .ep-youtube__content__block .ep-youtube__content__pagination{
display: ${V}!important;
}
[data-source-id="source-${s}"] img.watermark{
display: none;
}
[data-source-id="source-${s}"] .layout-list .ep-youtube__content__block .youtube__content__body .content__wrap{
grid-template-columns: repeat(auto-fit, minmax(calc(100% - 30px), 1fr))!important;
}
${Z}
`}),!Ro(t)&&!xs(t)&&!Pa(t)&&!Sa(t)&&e.jsx("style",{children:`
[data-source-id="source-${s}"] .ose-embedpress-responsive{
width: ${l}px!important;
height: ${a}px!important;
max-height: ${a}px!important;
}
[data-source-id="source-${s}"] iframe{
width: ${l}px!important;
height: ${a}px!important;
max-height: ${a}px!important;
}
[data-source-id="source-${s}"] .embedpress-yt-subscribe iframe{
height: 100%!important;
}
[data-source-id="source-${s}"] .ose-youtube > iframe{
height: ${a}px!important;
width: ${l}px!important;
max-width: 100%!important;
}
[data-source-id="source-${s}"] .ose-youtube{
height: ${a}px!important;
width: ${l}px!important;
}
[data-source-id="source-${s}"] .ose-giphy img{
height: ${a}px!important;
width: ${l}px!important;
}
[data-source-id="source-${s}"] .ose-google-docs img{
height: ${a}px!important;
width: ${l}px!important;
}
[data-source-id="source-${s}"] .ose-embedpress-responsive.ose-google-photos{
height: 100% !important;
max-height: 100% !important;
}
[data-source-id="source-${s}"] .embera-embed-responsive-provider-gettyimages,
[data-source-id="source-${s}"] .embera-embed-responsive-provider-gettyimages iframe,
[data-source-id="source-${s}"] .getty{
width: ${l}px!important;
height: ${a}px!important;
max-height: ${a}px!important;
max-width: 100%!important;
}
`}),xs(t)&&e.jsx("style",{children:`
[data-source-id="source-${s}"]{
width: 900px;
max-width: 100%!important;
}
[data-source-id="source-${s}"] .ose-opensea {
width: calc(100% - 40px)!important;
height: 100%!important;
}
[data-source-id="source-${s}"] .ose-opensea .ep_nft_item{
display: none!important;
}
[data-source-id="source-${s}"] .ose-opensea .ep_nft_item:nth-of-type(-n+${m?p:h}) {
display: block !important;
}
`}),ka(t)&&e.jsx("style",{children:`
[data-source-id="source-${s}"] .ose-wistia{
width: ${l}px!important;
height: ${a}px!important;
}
.wistia_embed{
width: 100%!important;
height: 100%!important;
}
[data-source-id="source-${s}"] img.watermark{
display: none;
}
${Z}
`}),(ys(t)||_a(t)||Ho(t))&&e.jsx("style",{children:`
[data-source-id="source-${s}"] img.watermark{
display: none;
}
${Z}
`}),n==="responsive"&&(ys(t)||Ho(t))&&e.jsx("style",{children:`
[data-source-id="source-${s}"] .ose-youtube {
width: ${l}px!important;
position: relative;
padding: 0;
padding-top: 56.5%;
height: 100%!important;
}
[data-source-id="source-${s}"] .ose-youtube iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%!important;
}
`}),x&&e.jsx("style",{children:`
[data-source-id="source-${s}"] {
--plyr-color-main: ${y&&y.length===7?`rgba(${parseInt(y.slice(1,3),16)}, ${parseInt(y.slice(3,5),16)}, ${parseInt(y.slice(5,7),16)}, .8)`:"rgba(0, 0, 0, .8)"};
}
[data-source-id="source-${s}"] .custom-player-preset-1,
[data-source-id="source-${s}"] .custom-player-preset-3,
[data-source-id="source-${s}"] .custom-player-preset-4{
--plyr-color-main: ${y&&y.length===7?`rgb(${parseInt(y.slice(1,3),16)}, ${parseInt(y.slice(3,5),16)}, ${parseInt(y.slice(5,7),16)})`:"rgba(0, 0, 0, .8)"};
--plyr-range-fill-background: #fff;
}
[data-source-id="source-${s}"] [data-plyr="restart"] {
display: ${N}!important;
}
[data-source-id="source-${s}"] [data-plyr="rewind"] {
display: ${I}!important;
}
[data-source-id="source-${s}"] [data-plyr="fast-forward"] {
display: ${R}!important;
}
[data-source-id="source-${s}"] [data-plyr="pip"] {
display: ${B}!important;
}
[data-source-id="source-${s}"] [data-plyr="fullscreen"] {
display: ${L}!important;
}
[data-source-id="source-${s}"] [data-plyr="download"] {
display: ${J}!important;
}
[data-playerid="${_}"] > .plyr {
width: ${l}px!important;
height: ${a}px!important;
max-height: ${a}px!important;
}
/* Custom player fullscreen fixes */
[data-playerid="${_}"] > .plyr.plyr--fullscreen-fallback {
-webkit-user-select: none;
user-select: none;
-webkit-touch-callout: none;
touch-action: manipulation;
width: 100vw!important;
height: 100vh!important;
max-height: 100vh!important;
}
[data-playerid="${_}"] > .plyr.plyr--fullscreen-fallback iframe{
width: 100vw!important;
height: 100vh!important;
max-height: 100vh!important;
}
.plyr--fullscreen-fallback .plyr__controls {
bottom: 40px !important;
}
${b&&b.length>=0?`[data-playerid="${_}"] .plyr--paused .plyr__poster {
background-image: url("${b}")!important;
opacity: 1!important;
}`:""}
`}),$a(t)&&e.jsx("style",{children:`
[data-carouselid="${s}"] .cg-carousel__btns{
display: ${F};
}
`})]})}const St=(o,t)=>{t||(document.querySelector(".pro__alert__wrap").style.display="block")},Ze=()=>{document.querySelector(".pro__alert__wrap")&&document.querySelector(".pro__alert__wrap .pro__alert__card .button").addEventListener("click",o=>{document.querySelector(".pro__alert__wrap").style.display="none"})},Xe=o=>{const t=`
<div class="pro__alert__wrap" style="display: none;">
<div class="pro__alert__card">
<img src="../wp-content/plugins/embedpress/EmbedPress/Ends/Back/Settings/assets/img/alert.svg" alt=""/>
<h2>Opps...</h2>
<p>You need to upgrade to the <a href="https://wpdeveloper.com/in/upgrade-embedpress" target="_blank">Premium</a> Version to use this feature</p>
<a href="#" class="button radius-10">Close</a>
</div>
</div>
`,s=document.createElement("div");return s.innerHTML=t,s},ks=()=>{document.querySelector(".tips__alert__wrap")&&document.querySelector(".tips__alert__wrap .tips__alert__card .button").addEventListener("click",o=>{document.querySelector(".tips__alert__wrap").style.display="none"})},Ta=o=>{document.querySelector(".tips__alert__wrap").style.display="block"},$s=()=>{const o=`
<div class="tips__alert__wrap" style="display: none;">
<div class="tips__alert__card">
<img src="../wp-content/plugins/embedpress/EmbedPress/Ends/Back/Settings/assets/img/idea.svg" alt=""/>
<h2>Simply add "/live" to the channel's URL to embed a live video.</h2>
<p>Note: If there are multiple live videos on the channel, just the most recent ones will be seen. </p>
<a href="#" class="button radius-10">Close</a>
</div>
</div>
`,t=document.createElement("div");return t.innerHTML=o,t},Tt=(o,t)=>{const s=new XMLHttpRequest;s.open("POST",ajaxurl),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){s.status===200?console.log("Request successful:",s.responseText):console.error("Request failed:",s.statusText)},s.onerror=function(){console.error("Request failed:",s.statusText)};const l={action:"save_source_data",block_id:o,source_url:t,_source_nonce:embedpressGutenbergData.sourceNonce},a=Object.keys(l).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(l[n])}`).join("&");s.send(a)},Ba=(o,t,s,l,a)=>{let n=`<div class="ep-social-share share-position-${o}">`;return t&&(n+=`
<a href="#" class="ep-social-icon facebook" target="_blank">
<svg width="64px" height="64px" viewBox="0 -6 512 512" xmlns="http://www.w3.org/2000/svg" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0" /><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" /><g id="SVGRepo_iconCarrier"><path fill="#475a96" d="M0 0h512v500H0z" /><path d="M375.717 112.553H138.283c-8.137 0-14.73 6.594-14.73 14.73v237.434c0 8.135 6.594 14.73 14.73 14.73h127.826V276.092h-34.781v-40.28h34.781v-29.705c0-34.473 21.055-53.244 51.807-53.244 14.73 0 27.391 1.097 31.08 1.587v36.026l-21.328.01c-16.725 0-19.963 7.947-19.963 19.609v25.717h39.887l-5.193 40.28h-34.693v103.355h68.012c8.135 0 14.73-6.596 14.73-14.73V127.283c-.001-8.137-6.596-14.73-14.731-14.73z" fill="#ffffff" /></g></svg>
</a>`),s&&(n+=`
<a href="#" class="ep-social-icon twitter" target="_blank">
<svg viewBox="0 0 24 24" aria-hidden="true" fill="#fff" class="r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-lrsllp r-1nao33i r-16y2uox r-8kz0gk"><g><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>
</a>`),l&&(n+=`
<a href="#" class="ep-social-icon pinterest" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" height="800" width="1200" viewBox="-36.42015 -60.8 315.6413 364.8">
<path
d="M121.5 0C54.4 0 0 54.4 0 121.5 0 173 32 217 77.2 234.7c-1.1-9.6-2-24.4.4-34.9 2.2-9.5 14.2-60.4 14.2-60.4s-3.6-7.3-3.6-18c0-16.9 9.8-29.5 22-29.5 10.4 0 15.4 7.8 15.4 17.1 0 10.4-6.6 26-10.1 40.5-2.9 12.1 6.1 22 18 22 21.6 0 38.2-22.8 38.2-55.6 0-29.1-20.9-49.4-50.8-49.4-34.6 0-54.9 25.9-54.9 52.7 0 10.4 4 21.6 9 27.7 1 1.2 1.1 2.3.8 3.5-.9 3.8-3 12.1-3.4 13.8-.5 2.2-1.8 2.7-4.1 1.6-15.2-7.1-24.7-29.2-24.7-47.1 0-38.3 27.8-73.5 80.3-73.5 42.1 0 74.9 30 74.9 70.2 0 41.9-26.4 75.6-63 75.6-12.3 0-23.9-6.4-27.8-14 0 0-6.1 23.2-7.6 28.9-2.7 10.6-10.1 23.8-15.1 31.9 11.4 3.5 23.4 5.4 36 5.4 67.1 0 121.5-54.4 121.5-121.5C243 54.4 188.6 0 121.5 0z"
fill="#fff" />
</svg>
</a>`),a&&(n+=`
<a href="#" class="ep-social-icon linkedin" target="_blank">
<svg fill="#ffffff" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 310 310" xml:space="preserve"><g id="XMLID_801_"><path id="XMLID_802_" d="M72.16,99.73H9.927c-2.762,0-5,2.239-5,5v199.928c0,2.762,2.238,5,5,5H72.16c2.762,0,5-2.238,5-5V104.73
C77.16,101.969,74.922,99.73,72.16,99.73z"/><path id="XMLID_803_" d="M41.066,0.341C18.422,0.341,0,18.743,0,41.362C0,63.991,18.422,82.4,41.066,82.4
c22.626,0,41.033-18.41,41.033-41.038C82.1,18.743,63.692,0.341,41.066,0.341z"/><path id="XMLID_804_" d="M230.454,94.761c-24.995,0-43.472,10.745-54.679,22.954V104.73c0-2.761-2.238-5-5-5h-59.599
c-2.762,0-5,2.239-5,5v199.928c0,2.762,2.238,5,5,5h62.097c2.762,0,5-2.238,5-5v-98.918c0-33.333,9.054-46.319,32.29-46.319
c25.306,0,27.317,20.818,27.317,48.034v97.204c0,2.762,2.238,5,5,5H305c2.762,0,5-2.238,5-5V194.995
C310,145.43,300.549,94.761,230.454,94.761z"/></g></svg>
</a>`),n+="</div>",n},qo=o=>/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/i.test(o),$n=o=>{const t=parseInt(o.slice(1,3),16),s=parseInt(o.slice(3,5),16),l=parseInt(o.slice(5,7),16),a=Math.max(t,s,l),n=Math.min(t,s,l),c=(a+n)/2;return Math.round(c/255*100)},Pn=(o,t)=>{const s=parseInt(o.slice(1,3),16),l=parseInt(o.slice(3,5),16),a=parseInt(o.slice(5,7),16),n=Math.round(t/100*255),c=Math.max(Math.min(s+n,255),0),r=Math.max(Math.min(l+n,255),0),u=Math.max(Math.min(a+n,255),0);return"#"+((1<<24)+(c<<16)+(r<<8)+u).toString(16).slice(1)},Kt=o=>/^(?:https?:\/\/)?(?:www\.)?instagram\.com\/(?:[a-zA-Z0-9_\.]+\/?|explore\/tags\/[a-zA-Z0-9_\-]+\/?)$/.test(o),A=o=>{if(o.startsWith("/")||o.startsWith("#"))return o;try{const t=new URL(o);if(!["http:","https:","ftp:","ftps:","mailto:","news:","irc:","irc6:","ircs:","gopher:","nntp:","feed:","telnet:","mms:","rtsp:","sms:","svn:","tel:","fax:","xmpp:","webcal:","urn:"].includes(t.protocol))throw new Error("Invalid protocol");return t.toString()}catch(t){return console.error("Error sanitizing URL:",t.message),"/404"}},ws=o=>/^https?:\/\/(?:www\.)?instagram\.com\/explore\/tags\/([^/]+)\/?$/i.test(o),K=(o,t="")=>{if(t)return t;if(!o)return"";try{if(o.indexOf("view.officeapps.live.com")!==-1){const r=new URLSearchParams(o.split("?")[1]).get("src");r&&(o=r)}const s=new URL(o),a=s.pathname.split("/"),n=a.pop()||a.pop();if(n){let c=n.split(".")[0];return c=decodeURIComponent(c).replace(/[-_]/g," "),c.charAt(0).toUpperCase()+c.slice(1)}return s.hostname}catch{return""}},{useBlockProps:Sn}=wp.blockEditor,{applyFilters:Ln}=wp.hooks;function Tn({attributes:o}){const t=Sn.save(),{url:s,embedHTML:l,width:a,height:n,contentShare:c,sharePosition:r,customPlayer:u,playerPreset:i,customlogo:d,logoX:m,logoY:p,logoOpacity:h,clientId:x,adManager:g,adSource:b,adFileUrl:f,adWidth:y,adHeight:P,adXPosition:v,adYPosition:w,shareFacebook:j,shareTwitter:$,sharePinterest:S,shareLinkedin:_,instaLayout:B,cEmbedType:N,cPopupButtonText:I,cPopupButtonBGColor:R,cPopupButtonTextColor:L,coverImageUrl:J,playlist:W,enableLazyLoad:V}=o;if(!s||Bn(s))return null;const Z=s&&(s.includes("youtube.com/channel/")||s.includes("youtube.com/c/")||s.includes("youtube.com/user/")),F=s&&s.includes("instagram.com"),k=s&&s.includes("opensea.io")&&!s.includes("/assets/"),E=s&&s.includes("opensea.io")&&s.includes("/assets/"),z=s&&s.includes("wistia.com");s&&s.includes("spreaker.com");let q="",O="",Y=r||"right";c&&(q="ep-content-share-enabled",O="ep-share-position-"+Y);let T="";u&&(T=i||"preset-default");let re="";Z&&(re="embedded-youtube-channel");let ie="";F&&(ie=B);let ue="";(k||E)&&(ue=" source-opensea");const xe={position:"relative",display:"inline-block"},ne=ye(x||"");let de="";if(N==="popup_button"){let rt=L,Le=R;L&&!L.startsWith("#")&&(rt="#"+L),R&&!R.startsWith("#")&&(Le="#"+R),de=`
<div class="cbutton-preview-wrapper" style="margin-top:-${n}px">
<h4 class="cbutton-preview-text">Preview Popup Button</h4>
<div style="position: static" class="calendly-badge-widget">
<div class="calendly-badge-content" style="color: ${rt}; background: ${Le};">
${I}
</div>
</div>
</div>
`}let M="";z&&(M="<span class='ep-wistia-message'> Changes will be affected in frontend. </span>");let we="";c&&(we=Ba(r,j,$,S,_));const ve=Ln("embedpress.customLogoComponent","",o),ke=`${a?`width:${a}px;`:""}${n?`height:${n}px;`:""}max-width:100%;`;let Ue=l||"";l&&(V&&!u)?Ue=l.replace(/<iframe([^>]*)src=["']([^"']+)["']([^>]*)>/gi,(rt,Le,mt,ht)=>`<div class="ep-lazy-iframe-placeholder" data-ep-lazy-src="${mt}" data-ep-iframe-style="${ke}" ${Le} ${ht} style="${ke}"></div>`):l&&(a||n)?Ue=l.replace(/<iframe([^>]*)>/gi,`<iframe$1 style="${ke}">`):!l&&s&&(Ue=`
<div class="embedpress-placeholder" data-url="${s}" data-width="${a||600}" data-height="${n||400}">
<!-- EmbedPress content will be loaded here -->
</div>`);const nt=u?va({attributes:o}):"",Ge=B==="insta-carousel"?ja({attributes:o}):"";return e.jsxs("figure",{...t,"data-source-id":`source-${x}`,"data-embed-type":o.providerName||"",children:[e.jsxs("div",{className:`gutenberg-block-wraper ${q} ${O}${ue}`,children:[e.jsx("div",{className:`position-${Y}-wraper ep-embed-content-wraper ${re} ${T} ${ie}`,style:xe,...u?{"data-playerid":ne}:{},...u?{"data-options":nt}:{},...B==="insta-carousel"?{"data-carouselid":ne}:{},...B==="insta-carousel"?{"data-carousel-options":Ge}:{},dangerouslySetInnerHTML:{__html:Ue+ve+M+we+de}}),g&&b==="image"&&f&&e.jsx("div",{className:"main-ad-template",style:{position:"absolute",bottom:`${w}%`,left:`${v}%`,width:`${y}px`,height:`${P}px`,backgroundImage:`url(${f})`,backgroundSize:"cover",backgroundPosition:"center",zIndex:10},children:e.jsx("div",{style:{width:"100%",height:"100%"},children:e.jsx("img",{src:f,alt:"Advertisement",style:{width:"100%",height:"100%",objectFit:"cover"}})})})]}),g&&b==="image"&&e.jsx("style",{dangerouslySetInnerHTML:{__html:`
[data-source-id="source-${x}"] .main-ad-template div,
.main-ad-template div img {
height: 100%;
}
[data-source-id="source-${x}"] .main-ad-template {
position: absolute;
bottom: ${w}%;
left: ${v}%;
}
`}}),e.jsx(La,{attributes:o})]})}function Bn(o){return o?["photos.app.goo.gl","photos.google.com","instagram.com","opensea.io"].some(s=>o.includes(s)):!1}const{useRef:og}=wp.element,{applyFilters:Yo}=wp.hooks,{__:Fn}=wp.i18n,{TextControl:sg,TextareaControl:lg,ToggleControl:ag,PanelBody:En}=wp.components;function ct({attributes:o,setAttributes:t}){const{lockContent:s,protectionType:l,userRole:a,lockHeading:n,lockSubHeading:c,lockErrorMessage:r,passwordPlaceholder:u,submitButtonText:i,submitUnlockingText:d,enableFooterMessage:m,footerMessage:p,contentPassword:h}=o,x=Yo("embedpress.togglePlaceholder",[],"Enable Content Protection",!1);return e.jsxs(En,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Fn("Content Protection","embedpress")]}),initialOpen:!1,className:s?"":"disabled-content-protection",children:[Yo("embedpress.toggleContentProtection",[x],o,t),Yo("embedpress.lockContentControllers",[],o,t)]})}function G({classname:o,headerText:t}){return e.jsx("h4",{className:o||"ep-control-header",children:t})}const{__:ng}=wp.i18n,{TextControl:rg,RangeControl:ig,PanelBody:dg,Button:Dn}=wp.components,{MediaUpload:Nn}=wp.blockEditor;function Mn({attributes:o,setAttributes:t}){const{customThumbnail:s}=o,l=n=>{t({customThumbnail:n.sizes.full.url})},a=n=>{t({customThumbnail:""})};return e.jsxs("div",{children:[e.jsx("label",{class:"custom-share-thumbnail-label",children:"Thumbnail"}),s&&e.jsxs("div",{className:"ep__custom-logo",style:{position:"relative"},children:[e.jsx("button",{title:"Remove Image",className:"ep-remove__image",type:"button",onClick:a,children:e.jsx("span",{class:"dashicon dashicons dashicons-trash"})}),e.jsx("img",{src:s,alt:"John"})]}),e.jsx("div",{className:"ep-custom-logo-button",children:e.jsx(Nn,{onSelect:l,allowedTypes:["image"],value:s,render:({open:n})=>e.jsx(Dn,{className:"ep-logo-upload-button",icon:s?"update":"upload",onClick:n,children:s?"Change Image":"Upload Image"})})})]})}const{__:Me}=wp.i18n,{TextControl:zn,TextareaControl:Un,ToggleControl:At,SelectControl:In,PanelBody:Gn}=wp.components;function at({attributes:o,setAttributes:t}){const{customTitle:s,customDescription:l,contentShare:a,sharePosition:n,shareFacebook:c,shareTwitter:r,sharePinterest:u,shareLinkedin:i}=o;return e.jsxs(Gn,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Me("Social Share","embedpress")]}),initialOpen:!1,children:[e.jsx("div",{className:"content-share-toggle",children:e.jsx(At,{label:Me("Enable Social Share"),checked:a,onChange:d=>t({contentShare:d})})}),a&&e.jsxs("div",{className:"content-share-controls",children:[e.jsx(zn,{label:Me("Title"),value:s,onChange:d=>t({customTitle:d}),placeholder:Me("Enter Title")}),e.jsx(Un,{label:Me("Description"),placeholder:Me("Enter description"),value:l,onChange:d=>t({customDescription:d})}),e.jsx(In,{label:Me("Position"),value:n,options:[{label:"Top",value:"top"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"},{label:"Left",value:"left"}],onChange:d=>t({sharePosition:d}),__nextHasNoMarginBottom:!0}),e.jsx(Mn,{attributes:o,setAttributes:t}),e.jsx("h3",{children:Me("Share Platforms","embedpress")}),e.jsx(At,{label:Me("Facebook"),checked:c!==!1,onChange:d=>t({shareFacebook:d})}),e.jsx(At,{label:Me("Twitter"),checked:r!==!1,onChange:d=>t({shareTwitter:d})}),e.jsx(At,{label:Me("Pinterest"),checked:u!==!1,onChange:d=>t({sharePinterest:d})}),e.jsx(At,{label:Me("LinkedIn"),checked:i!==!1,onChange:d=>t({shareLinkedin:d})}),e.jsxs("div",{className:"ep-documentation ",children:[U,e.jsx("a",{href:"https://embedpress.com/docs/ep-social-share-option-with-embedded-content/",target:"_blank",children:" Need Help? "})]})]})]})}const{useState:cg,useEffect:pg}=wp.element,{isShallowEqualObjects:ug}=wp.isShallowEqual,Rn=(o,t)=>{const s={};return Object.keys(o).forEach(l=>{l in t?s[l]=t[l]:s[l]=o[l]}),s},ee=(o,t,s)=>{const l=Rn(s,t);return{...o,...l}},vs=o=>o.match(/\.(mp4|mov|avi|wmv|flv|mkv|webm|mpeg|mpg)$/i),Es=o=>o.match(/\.(mp3|wav|ogg|aac)$/i),Fa=o=>/^https?:\/\/(www\.)?spreaker\.com\/(show|user|podcast|episode)\/[^/]+/.test(o),Oo=o=>/^https:\/\/(photos\.app\.goo\.gl|photos\.google\.com)\/.*$/i.test(o),{__:Hn}=wp.i18n,{applyFilters:Ds}=wp.hooks,{TextControl:mg,RangeControl:hg,PanelBody:On,Button:gg}=wp.components;function Vn({attributes:o,setAttributes:t}){const{customlogo:s,logoX:l,logoY:a,customlogoUrl:n,logoOpacity:c}=o;embedpressGutenbergData.isProPluginActive,document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const r=Ds("embedpress.uploadPlaceholder",[]);return e.jsx(On,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Hn("Custom Branding","embedpress")]}),initialOpen:!1,children:Ds("embedpress.customLogoSettings",[r],o,t)})}const{__:ce}=wp.i18n,{applyFilters:be}=wp.hooks,{SelectControl:fg,ToggleControl:Ae,ColorPalette:bg,Button:yg,TextControl:Ns}=wp.components,Wn=[{name:"",color:"#FF0000"},{name:"",color:"#00FF00"},{name:"",color:"#5b4e96"},{name:"",color:"#0000FF"},{name:"",color:"#FFA500"}],{MediaUpload:xg}=wp.blockEditor,Ps=o=>{const{attributes:t,setAttributes:s,isYTVideo:l,isYTLive:a,isYTShorts:n,isVimeoVideo:c,isSelfHostedAudio:r}=o,{url:u,customPlayer:i,starttime:d,endtime:m,autoplay:p,muteVideo:h,fullscreen:x,relatedvideos:g,vautoplay:b,vautopause:f,vdnt:y,posterThumbnail:P,playerPip:v,playerRestart:w,playerRewind:j,playerFastForward:$,playerPreset:S,playerColor:_,playerTooltip:B,playerHideControls:N,playerDownload:I}=t;vs(u),document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze()),document.querySelector(".tips__alert__wrap")||(document.querySelector("body").append($s()),ks());const R=be("embedpress.togglePlaceholder",[],ce("Tooltip","embedpress"),!0),L=be("embedpress.togglePlaceholder",[],ce("Auto Hide Controls","embedpress"),!0),J=be("embedpress.togglePlaceholder",[],ce("Source Link","embedpress"),!0),W=be("embedpress.togglePlaceholder",[],ce("Sticky Video","embedpress"),!1),V=be("embedpress.uploadPlaceholder",[],ce("Sticky Video","embedpress"),!1),Z=be("embedpress.selectPlaceholder",[],ce("Preset","embedpress"),"default","Default"),F=be("embedpress.colorPlatePlaceholder",[],ce("Player Color","embedpress"),"#5b4e96",Wn),k=be("embedpress.togglePlaceholder",[],ce("Auto Paause","embedpress"),!1),E=be("embedpress.togglePlaceholder",[],ce("DNT","embedpress"),!1);return e.jsxs("div",{className:"ep-custom-player-controls",children:[be("embedpress.youtubeControls",[Z],t,s,"preset",o),(a||l||n)&&e.jsxs("div",{className:"youtube-player-controls",children:[e.jsx(Ns,{label:ce("Start Time (in seconds)"),value:d,onChange:z=>s({starttime:z}),type:"number",className:"ep-control-field"}),e.jsx(Ns,{label:ce("End Time (in seconds)"),value:m,onChange:z=>s({endtime:z}),type:"number",className:"ep-control-field"}),!i&&e.jsxs("div",{children:[e.jsx(Ae,{label:ce("Auto Play"),checked:p,onChange:z=>s({autoplay:z})}),e.jsx(Ae,{label:ce("Fullscreen Button"),checked:x,onChange:z=>s({fullscreen:z})})]})]}),be("embedpress.youtubeControls",[F],t,s,"playerColor"),i&&(a||l)&&e.jsxs("div",{className:"remove-last-child-margin",children:[e.jsx(Ae,{label:ce("Auto Play"),checked:p,onChange:z=>s({autoplay:z})}),p&&e.jsx(Ae,{label:ce("Mute"),checked:h,onChange:z=>s({muteVideo:z})}),e.jsx(Ae,{label:ce("Fullscreen Button"),checked:x,onChange:z=>s({fullscreen:z})})]}),c&&e.jsxs("div",{className:"vimeo-player-controls",children:[e.jsx(Ae,{label:ce("Auto Play"),checked:b,onChange:z=>s({vautoplay:z})}),be("embedpress.vimeoControls",[k],t,s,"autoPause"),be("embedpress.vimeoControls",[E],t,s,"dnt")]}),e.jsx(Ae,{label:ce("Restart"),checked:w,onChange:z=>s({playerRestart:z})}),e.jsx(Ae,{label:ce("Rewind"),checked:j,onChange:z=>s({playerRewind:z})}),e.jsx(Ae,{label:ce("Fast Forward"),checked:$,onChange:z=>s({playerFastForward:z})}),be("embedpress.youtubeControls",[R],t,s,"tooltip"),be("embedpress.youtubeControls",[L],t,s,"autoHide"),be("embedpress.youtubeControls",[J],t,s,"sourceLink"),be("embedpress.youtubeControls",[W],t,s,"stickyVideo"),(a||l)&&e.jsxs("div",{className:"ep-yt-related-videos",children:[e.jsx(Ae,{label:ce("Related Videos"),checked:g,onChange:z=>s({relatedvideos:z})}),e.jsx("p",{children:"Enable to display related videos from all channels. Otherwise, related videos will show from the same channel."})]}),!r&&e.jsxs("div",{children:[e.jsx(G,{headerText:"Thumbnail"}),be("embedpress.youtubeControls",V,t,s,"thumbnail",o)]})]})},{isShallowEqualObjects:Ea}=wp.isShallowEqual,{useState:Da,useEffect:Na}=wp.element,{applyFilters:mo}=wp.hooks,{__:he}=wp.i18n,{addFilter:qn}=wp.hooks,{TextControl:Zo,SelectControl:ho,RangeControl:Yn,ToggleControl:Dt,PanelBody:Zn}=wp.components,Xn=()=>{qn("embedpress_block_rest_param","embedpress",Jn,10)},Jn=(o,t)=>{if(!t.url)return o;let s={},l={};(Ma(t.url)||Cs(t.url)||Kn(t.url))&&(s={videosize:"fixed",starttime:"",endtime:"",autoplay:!1,muteVideo:!0,controls:"2",fullscreen:!0,videoannotations:!0,progressbarcolor:"red",closedcaptions:!1,modestbranding:"0",relatedvideos:!0,customPlayer:!1,posterThumbnail:"",playerPreset:"",playerColor:"",playerRestart:!1,playerRewind:!1,playerFastForward:!1,playerTooltip:!1,playerHideControls:!1}),js(t.url)&&!Cs(t.url)&&(l={pagesize:6,ytChannelLayout:"gallery"});const a={...s,...l};return ee(o,t,a)},js=o=>!!o.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/(?:c\/|channel\/|user\/|@)([^\/\?]+)/i),Cs=o=>!!o.match(/^https?:\/\/(?:www\.)?youtube\.com\/(?:channel\/[\w-]+|@[\w-]+)\/live$/),Kn=o=>/^https:\/\/www\.youtube\.com\/shorts\/[A-Za-z0-9_-]+$/.test(o),Ma=o=>{const t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/i,s=o.match(t);return s?s[7].length===11:!1},za=o=>{const t={pagesize:null,ytChannelLayout:null},s=ee({},o,t),[l,a]=Da(s);return Na(()=>{const n=ee(l,o,t);Ea(l||{},n)||a(n)},[o]),l},Ua=o=>{const t={videosize:null,starttime:null,endtime:null,autoplay:null,muteVideo:null,controls:null,fullscreen:null,videoannotations:null,progressbarcolor:null,closedcaptions:null,modestbranding:null,relatedvideos:null,customPlayer:null,posterThumbnail:null,playerPreset:null,playerColor:null,playerRestart:null,playerRewind:null,playerFastForward:null,playerTooltip:null,playerHideControls:null},s=ee({},o,t),[l,a]=Da(s);return Na(()=>{const n=ee(l,o,t);Ea(l||{},n)||a(n)},[o]),l},Qn=(o,t)=>({youtubeParams:js(t)?za(o):Ua(o),isYTChannel:js(t),isYTVideo:Ma(t),isYTLive:Cs(t)});function Xo({attributes:o,setAttributes:t,isYTChannel:s,isYTVideo:l,isYTLive:a,isYTShorts:n}){const{url:c,ispagination:r,pagesize:u,ytChannelLayout:i,columns:d,gapbetweenvideos:m,videosize:p,starttime:h,endtime:x,autoplay:g,muteVideo:b,controls:f,fullscreen:y,videoannotations:P,progressbarcolor:v,closedcaptions:w,modestbranding:j,relatedvideos:$,customPlayer:S}=o,_=embedpressGutenbergData.isProPluginActive;document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze()),document.querySelector(".tips__alert__wrap")||(document.querySelector("body").append($s()),ks());const B=mo("embedpress.togglePlaceholder",[],he("Closed Captions","embedpress"),!0),N=mo("embedpress.selectPlaceholder",[],he("Modest Branding","embedpress"),"display","Display");i==="grid"&&d===1&&t({columns:3}),i==="list"&&t({columns:1});let I="Video per page";i==="carousel"&&(I="Number of videos (max 50)");let R=" (Pro)";return _&&(R=""),!_&&(i=="grid"||i=="carousel")&&(St(null,_),t({ytChannelLayout:"gallery"})),e.jsxs("div",{children:[s&&!a&&e.jsxs("div",{className:"ep__channel-yt-video-options",children:[e.jsx(ho,{label:he("Layout"),value:i,options:[{label:"Gallery",value:"gallery"},{label:"List",value:"list"},{label:"Grid"+R,value:"grid"},{label:"Carousel"+R,value:"carousel"}],onChange:L=>t({ytChannelLayout:L}),__nextHasNoMarginBottom:!0}),e.jsx(Zo,{label:he(I),value:u,onChange:L=>t({pagesize:L})}),e.jsx("p",{children:"Specify the number of videos you wish to show on each page."}),i!=="list"&&i!=="carousel"&&e.jsx(ho,{label:he("Column"),value:d,options:[{label:"Auto",value:"auto"},{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"6",value:"6"}],onChange:L=>t({columns:L}),__nextHasNoMarginBottom:!0}),i!=="carousel"&&e.jsxs("div",{children:[e.jsx(Yn,{label:he("Gap Between Videos"),value:m,onChange:L=>t({gapbetweenvideos:L}),min:1,max:100}),e.jsx("p",{children:"Specify the gap between youtube videos."})]}),i!="carousel"&&e.jsx(Dt,{label:he("Pagination"),checked:r,onChange:L=>t({ispagination:L})}),e.jsxs("div",{className:"ep-tips-and-tricks",children:[U,e.jsxs("a",{href:"#",target:"_blank",onClick:L=>{L.preventDefault(),Ta()},children:[" ",he("Tips & Tricks","embedpress")," "]})]})]}),(l||a||n)&&e.jsx("div",{className:"ep__single-yt-video-options",children:e.jsxs(Zn,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",he("Video Controls","embedpress")]}),initialOpen:!1,children:[e.jsx(Dt,{label:he("Enable Custom Player","embedpress"),checked:S,onChange:L=>t({customPlayer:L})}),S?e.jsx("div",{className:"ep-video-controlers",children:e.jsx(Ps,{attributes:o,setAttributes:t,isYTVideo:l,isYTLive:a})}):e.jsxs("div",{className:"ep-video-controlers",children:[e.jsx(Zo,{label:he("Start Time (in seconds)"),value:h,onChange:L=>t({starttime:L}),type:"number",className:"ep-control-field"}),e.jsx(Zo,{label:he("End Time (in seconds)"),value:x,onChange:L=>t({endtime:L}),type:"number",className:"ep-control-field"}),e.jsx(Dt,{label:he("Auto Play"),checked:g,onChange:L=>t({autoplay:L})}),g&&e.jsxs("div",{className:"ep-yt-mute-videos",children:[e.jsx(Dt,{label:he("Mute"),checked:b,onChange:L=>t({muteVideo:L})}),e.jsx("p",{children:"Mute the video to ensure autoplay works smoothly across all browsers. Recommended for autoplay-enabled videos."})]}),e.jsx(ho,{label:he("Controls","embedpress"),value:f,options:[{label:"Display immediately",value:"1"},{label:"Hide controls",value:"0"},{label:"Display after user initiation immediately",value:"2"}],onChange:L=>t({controls:L}),className:"ep-select-control-field",__nextHasNoMarginBottom:!0}),e.jsx(Dt,{label:he("Fullscreen Button"),checked:y,onChange:L=>t({fullscreen:L})}),e.jsx(Dt,{label:he("Video Annotations"),checked:P,onChange:L=>t({videoannotations:L})}),e.jsx(ho,{label:he("Progress Bar Color","embedpress"),value:v,options:[{label:"Red",value:"red"},{label:"White",value:"white"}],onChange:L=>t({progressbarcolor:L}),className:"ep-select-control-field",__nextHasNoMarginBottom:!0}),mo("embedpress.youtubeControls",[B],o,t,"closedCaptions"),mo("embedpress.youtubeControls",[N],o,t,"modestBranding"),e.jsxs("div",{className:"ep-yt-related-videos",children:[e.jsx(Dt,{label:he("Related Videos"),checked:$,onChange:L=>t({relatedvideos:L})}),e.jsx("p",{children:"Enable to display related videos from all channels. Otherwise, related videos will show from the same channel."})]})]})]})})]})}const{useState:Ms,useEffect:An,useRef:er}=wp.element,Ce=({attributes:o,setAttributes:t,deleteIcon:s,inEditor:l,progressBar:a})=>{const{adSource:n,adContent:c,adFileUrl:r,adSkipButton:u}=o,[i,d]=Ms(!1),[m,p]=Ms(0),h=er(null),{adWidth:x,adHeight:g}=o,b=()=>{t({adFileUrl:""})},f=$=>{const[S,_]=$.split(":");return parseInt(S,10)*60+parseInt(_,10)};let y=0;c&&(y=c.fileLength?f(c.fileLength):0);const P=()=>{const $=h.current;if($){const{currentTime:S}=$;p(S),S>=3&&d(!0)}};An(()=>{if(n==="video")h.current.addEventListener("timeupdate",P);else{const $=setTimeout(()=>{d(!0)},3e3);return()=>{clearTimeout($)}}},[n,c,r]);const v=()=>{t({adFileUrl:""})};let w={width:x+"px",height:g+"px"},j=!1;return l||(w={},j=!0),e.jsx("div",{className:"main-ad-template",style:w,children:e.jsx("div",{className:"ep-ad-container",children:e.jsxs("div",{className:"ep__custom-logo",style:{position:"relative"},children:[s||!l&&e.jsx("button",{title:"Remove Image",className:"ep-remove__image",type:"button",onClick:b,children:e.jsx("span",{className:"dashicon dashicons dashicons-trash"})}),n==="video"?e.jsx("div",{children:e.jsxs("video",{ref:h,className:"ep-ad",autoPlay:!0,muted:j,children:[e.jsx("source",{src:r}),"Your browser does not support the video tag."]})}):e.jsx("div",{children:e.jsx("img",{src:r})}),a||n!=="image"&&e.jsx("div",{className:"progress-bar-container",children:e.jsx("div",{className:"progress-bar",style:{background:"#5be82a",height:"4px",marginTop:"-4px",width:`${n==="video"?m/y*100:100}%`,maxWidth:"100%"}})}),u&&i&&e.jsx("button",{title:"Skip Ad",className:"skip-ad-button",onClick:v,children:"Skip Ad"})]})})})},{useRef:tr}=wp.element,{applyFilters:go}=wp.hooks,{__:zs}=wp.i18n,{TextControl:wg,RangeControl:vg,SelectControl:jg,ToggleControl:Cg,PanelBody:or,Button:_g}=wp.components,{MediaUpload:kg}=wp.blockEditor;function pt({attributes:o,setAttributes:t}){const{adManager:s,adSource:l,adContent:a,adFileUrl:n,adWidth:c,adHeight:r,adXPosition:u,adYPosition:i,adUrl:d,adStart:m,adSkipButton:p,adSkipButtonAfter:h}=o;tr(null);const x=go("embedpress.togglePlaceholder",[],"Ads Settings",!0),g=go("embedpress.adsPlaceholder",[]);return e.jsxs(or,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",zs("Ads Settings","embedpress")]}),initialOpen:!1,className:s?"":"disabled-content-protection",children:[go("embedpress.adsSettings",[x],o,t),go("embedpress.adManagerSettings",[g],o,t),e.jsxs("div",{className:"ep-documentation ads-help",children:[U,e.jsxs("a",{href:"https://embedpress.com/docs/add-ep-content-protection-in-embedded-content/",target:"_blank",children:[" ",zs("Need Help?","emebdpress")," "]})]})]})}const{isShallowEqualObjects:sr}=wp.isShallowEqual,{useState:lr,useEffect:ar}=wp.element,{__:D}=wp.i18n,{addFilter:nr}=wp.hooks,{SelectControl:Jo,RangeControl:Ko,ToggleControl:it,TextControl:$g,PanelBody:Fe,ColorPalette:ge,FontSizePicker:$e}=wp.components,{InspectorControls:Pg}=wp.blockEditor,{applyFilters:je}=wp.hooks,rr=()=>{nr("embedpress_block_rest_param","embedpress",ir,10)},ir=(o,t)=>!t.url||!(dr(t.url)||Us(t.url))?o:ee(o,t,{limit:20,itemperpage:9,loadmore:!1,loadmorelabel:"Load More",orderby:"desc",layout:Us?"ep-list":"ep-grid",preset:"ep-preset-1",nftperrow:"3",gapbetweenitem:30,collectionname:!1,nftrank:!1,label_nftrank:"",nftdetails:!1,label_nftdetails:"",nftimage:!1,nftcreator:!1,prefix_nftcreator:"",nfttitle:!1,nftprice:!1,prefix_nftprice:"",nftlastsale:!1,prefix_nftlastsale:"",nftbutton:!1,label_nftbutton:"",itemBGColor:"",collectionNameColor:"",collectionNameFZ:"",titleColor:"",titleFontsize:"",creatorColor:"",creatorFontsize:"",creatorLinkColor:"",creatorLinkFontsize:"",priceLabelColor:"",priceLabelFontsize:"",priceColor:"",priceFontsize:"",priceUSDColor:"",priceUSDFontsize:"",lastSaleLabelColor:"",lastSaleLabelFontsize:"",lastSaleColor:"",lastSaleFontsize:"",lastSaleUSDColor:"",lastSaleUSDFontsize:"",buttonTextColor:"",buttonBackgroundColor:"",buttonFontSize:"",loadmoreTextColor:"",loadmoreBackgroundColor:"",loadmoreTextFontsize:"",rankBtnColor:"",rankBtnFZ:"",rankBtnBorderColor:"",rankLabelColor:"",rankLabelFZ:"",detialTitleColor:"",detialTitleFZ:"",detailTextColor:"",detailTextLinkColor:"",detailTextFZ:""}),dr=o=>o.match(/\/collection\/|(?:https?:\/\/)?(?:www\.)?(?:opensea.com\/)(\w+)[^?\/]*$/i),Us=o=>o.match(/\/assets\/|(?:https?:\/\/)?(?:www\.)?(?:opensea.io\/)(\w+)[^?\/]*$/i),cr=o=>{const t={limit:null,itemperpage:null,loadmore:null,loadmorelabel:null,layout:null,preset:null,orderby:null,collectionname:null,nftimage:null,nfttitle:null,nftprice:null,prefix_nftprice:null,nftlastsale:null,prefix_nftlastsale:null,nftperrow:null,gapbetweenitem:null,nftbutton:null,nftrank:null,label_nftrank:null,nftdetails:null,label_nftdetails:null,label_nftbutton:null,nftcreator:null,prefix_nftcreator:null,itemBGColor:null,collectionNameColor:null,collectionNameFZ:null,titleColor:null,titleFontsize:null,creatorColor:null,creatorFontsize:null,creatorLinkColor:null,creatorLinkFontsize:null,priceLabelColor:null,priceLabelFontsize:null,priceColor:null,priceFontsize:null,priceUSDColor:null,priceUSDFontsize:null,lastSaleLabelColor:null,lastSaleLabelFontsize:null,lastSaleColor:null,lastSaleFontsize:null,lastSaleUSDColor:null,lastSaleUSDFontsize:null,buttonTextColor:null,buttonBackgroundColor:null,buttonFontSize:null,loadmoreTextColor:null,loadmoreBackgroundColor:null,loadmoreTextFontsize:null,rankBtnColor:null,rankBtnFZ:null,rankBtnBorderColor:null,rankLabelColor:null,rankLabelFZ:null,detialTitleColor:null,detialTitleFZ:null,detailTextColor:null,detailTextLinkColor:null,detailTextFZ:null},s=ee({},o,t),[l,a]=lr(s);return ar(()=>{const n=ee(l,o,t);sr(l||{},n)||a(n)},[o]),l};function pr({attributes:o,setAttributes:t,isOpensea:s,isOpenseaSingle:l}){const{limit:a,itemperpage:n,loadmore:c,loadmorelabel:r,orderby:u,layout:i,preset:d,nftperrow:m,gapbetweenitem:p,collectionname:h,nftimage:x,nftcreator:g,prefix_nftcreator:b,nfttitle:f,nftprice:y,prefix_nftprice:P,nftlastsale:v,prefix_nftlastsale:w,nftbutton:j,nftrank:$,label_nftrank:S,nftdetails:_,label_nftdetails:B,label_nftbutton:N,alignment:I,itemBGColor:R,collectionNameColor:L,collectionNameFZ:J,titleColor:W,titleFontsize:V,creatorColor:Z,creatorFontsize:F,creatorLinkColor:k,creatorLinkFontsize:E,priceLabelColor:z,priceLabelFontsize:q,priceColor:O,priceFontsize:Y,priceUSDColor:T,priceUSDFontsize:re,lastSaleLabelColor:ie,lastSaleLabelFontsize:ue,lastSaleColor:xe,lastSaleFontsize:ne,lastSaleUSDColor:de,lastSaleUSDFontsize:M,buttonTextColor:we,buttonBackgroundColor:ve,buttonFontSize:ke,loadmoreTextColor:Ue,loadmoreBackgroundColor:Ie,loadmoreTextFontsize:nt,rankBtnColor:Ge,rankBtnFZ:rt,rankBtnBorderColor:Le,rankLabelColor:mt,rankLabelFZ:ht,detialTitleColor:Ut,detialTitleFZ:It,detailTextColor:po,detailTextLinkColor:Gt,detailTextFZ:Bt}=o;embedpressGutenbergData.isProPluginActive;const Rt=()=>{document.querySelector(".pro__alert__wrap")&&document.querySelector(".pro__alert__wrap .pro__alert__card .button").addEventListener("click",C=>{document.querySelector(".pro__alert__wrap").style.display="none"})},Ht=C=>{const uo=`
<div class="pro__alert__wrap" style="display: none;">
<div class="pro__alert__card">
<img src="../wp-content/plugins/embedpress/EmbedPress/Ends/Back/Settings/assets/img/alert.svg" alt=""/>
<h2>Opps...</h2>
<p>You need to upgrade to the <a href="https://wpdeveloper.com/in/upgrade-embedpress" target="_blank">Premium</a> Version to use this feature</p>
<a href="#" class="button radius-10">Close</a>
</div>
</div>
`,Ft=document.createElement("div");return Ft.innerHTML=uo,Ft};document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Ht()),Rt());const pe=[{name:D("Small"),slug:"small",size:16},{name:D("Medium"),slug:"medium",size:18},{name:D("Large"),slug:"big",size:26}],se=[{name:"",color:"red"},{name:"",color:"green"},{name:"",color:"blue"},{name:"",color:"yellow"},{name:"",color:"orange"}],me=16;je("embedpress.uploadPlaceholder",[],D("Sticky Video","embedpress"),!1);const gt=je("embedpress.textControlPlaceholder",[],D("Creator Prefix","embedpress"),""),oe=je("embedpress.textControlPlaceholder",[],D("Price Prefix","embedpress"),""),fe=je("embedpress.textControlPlaceholder",[],D("Last Sale Prefix","embedpress"),""),Re=je("embedpress.textControlPlaceholder",[],D("Button Label","embedpress"),""),Ot=je("embedpress.textControlPlaceholder",[],D("Rank Label","embedpress"),""),Vt=je("embedpress.textControlPlaceholder",[],D("Details Label","embedpress"),""),Qt=je("embedpress.togglePlaceholder",[],D("Load More","embedpress"),!1);return(s||l)&&e.jsxs("div",{children:[s&&e.jsx(Fe,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",D("Query","embedpress")]}),initialOpen:!0,className:"ep-opensea-options",children:e.jsxs("div",{children:[e.jsx(Ko,{label:D("Limit","embedpress"),value:a,onChange:C=>t({limit:C}),min:1,max:100}),e.jsx(Jo,{label:D("Order By","embedpress"),value:u,options:[{label:"Oldest",value:"asc"},{label:"Newest",value:"desc"}],onChange:C=>t({orderby:C}),__nextHasNoMarginBottom:!0})]})}),s&&e.jsx(Fe,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",D("Layout","embedpress")]}),initialOpen:!1,className:"ep-opensea-options",children:e.jsxs("div",{children:[e.jsx(Jo,{label:D("Layout","embedpress"),value:i,options:[{label:"List",value:"ep-list"},{label:"Grid",value:"ep-grid"}],onChange:C=>t({layout:C})}),i=="ep-grid"&&e.jsx(Jo,{label:D("Preset","embedpress"),value:d,options:[{label:"Preset 1",value:"ep-preset-1"},{label:"Preset 2",value:"ep-preset-2"}],onChange:C=>t({preset:C})}),e.jsx(Ko,{label:D("Item Per Row","embedpress"),value:m||3,onChange:C=>t({nftperrow:C}),min:1,max:6}),e.jsx(Ko,{label:D("Gap Between Item","embedpress"),value:p,onChange:C=>t({gapbetweenitem:C}),min:1,max:100})]})}),e.jsxs(Fe,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",D("Content","embedpress")]}),initialOpen:!1,className:"ep-opensea-options",children:[l&&e.jsx(it,{label:D("Collection Name","embedpress"),checked:h,onChange:C=>t({collectionname:C})}),e.jsx(it,{label:D("Thumbnail","embedpress"),checked:x,onChange:C=>t({nftimage:C})}),e.jsx(it,{label:D("Title","embedpress"),checked:f,onChange:C=>t({nfttitle:C})}),e.jsx(it,{label:D("Creator","embedpress"),checked:g,onChange:C=>t({nftcreator:C})}),g&&je("embedpress.openseaControls",[gt],o,t,"creatorPrefix"),e.jsx(it,{label:D("Show Price","embedpress"),checked:y,onChange:C=>t({nftprice:C})}),y&&je("embedpress.openseaControls",[oe],o,t,"pricePrefix"),e.jsx(it,{label:D("Last Sale","embedpress"),checked:v,onChange:C=>t({nftlastsale:C})}),v&&je("embedpress.openseaControls",[fe],o,t,"lastSalePrefix"),e.jsx(it,{label:D("Show Button","embedpress"),checked:j,onChange:C=>t({nftbutton:C})}),j&&je("embedpress.openseaControls",[Re],o,t,"buttonLabel"),l&&e.jsxs("div",{children:[e.jsx(it,{label:D("Rank","embedpress"),checked:$,onChange:C=>t({nftrank:C})}),$&&je("embedpress.openseaControls",[Ot],o,t,"rankLabel"),e.jsx(it,{label:D("Details","embedpress"),checked:_,onChange:C=>t({nftdetails:C})}),_&&je("embedpress.openseaControls",[Vt],o,t,"detailsLabel")]})]}),s&&e.jsx(Fe,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",D("Load More","embedpress")]}),initialOpen:!1,className:"ep-opensea-options",children:je("embedpress.openseaControls",[Qt],o,t,"loadMore")}),e.jsxs(Fe,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",D("Color and Typography","embedpress")]}),initialOpen:!1,className:"ep-colors-typography",children:[e.jsx("p",{children:D("You can adjust the color and typography of embedded content.")}),e.jsxs("div",{className:"ep-opensea-sub-controls",children:[e.jsxs(Fe,{title:D("Item"),initialOpen:!1,children:[e.jsx(G,{headerText:"Background Color"}),e.jsx(ge,{label:D("Background Color"),colors:se,value:R,onChange:C=>t({itemBGColor:C})})]}),e.jsxs(Fe,{title:D("Collection Name"),initialOpen:!1,children:[e.jsx(G,{headerText:"Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:L,onChange:C=>t({collectionNameColor:C})}),e.jsx(G,{headerText:"Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:J,fallbackFontSize:me,onChange:C=>t({collectionNameFZ:C})})]}),e.jsxs(Fe,{title:D("Title"),initialOpen:!1,children:[e.jsx(G,{headerText:"Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:W,onChange:C=>t({titleColor:C})}),e.jsx(G,{headerText:"Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:V,fallbackFontSize:me,onChange:C=>t({titleFontsize:C})})]}),e.jsxs(Fe,{title:D("Creator"),initialOpen:!1,children:[e.jsx(G,{headerText:"Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:Z,onChange:C=>t({creatorColor:C})}),e.jsx(G,{headerText:"Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:F,fallbackFontSize:me,onChange:C=>t({creatorFontsize:C})}),e.jsx(G,{headerText:"Link Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:k,onChange:C=>t({creatorLinkColor:C})}),e.jsx(G,{headerText:"Link Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:E,fallbackFontSize:me,onChange:C=>t({creatorLinkFontsize:C})})]}),e.jsxs(Fe,{title:D("Current Price"),initialOpen:!1,children:[l&&e.jsxs("div",{children:[e.jsx(G,{headerText:"Label Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:z,onChange:C=>t({priceLabelColor:C})}),e.jsx(G,{headerText:"Label Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:q,fallbackFontSize:me,onChange:C=>t({priceLabelFontsize:C})})]}),e.jsx(G,{headerText:"ETH Price Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:O,onChange:C=>t({priceColor:C})}),e.jsx(G,{headerText:"ETH Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:Y,fallbackFontSize:me,onChange:C=>t({priceFontsize:C})}),l&&e.jsxs("div",{children:[e.jsx(G,{headerText:"USD Price Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:T,onChange:C=>t({priceUSDColor:C})}),e.jsx(G,{headerText:"USD Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:re,fallbackFontSize:me,onChange:C=>t({priceUSDFontsize:C})})]})]}),e.jsxs(Fe,{title:D("Last Sale Price"),initialOpen:!1,children:[l&&e.jsxs("div",{children:[e.jsx(G,{headerText:"Label Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:ie,onChange:C=>t({lastSaleLabelColor:C})}),e.jsx(G,{headerText:"Label Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:ue,fallbackFontSize:me,onChange:C=>t({lastSaleLabelFontsize:C})})]}),e.jsx(G,{headerText:"ETH Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:xe,onChange:C=>t({lastSaleColor:C})}),e.jsx(G,{headerText:"ETH Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:ne,fallbackFontSize:me,onChange:C=>t({lastSaleFontsize:C})}),l&&e.jsxs("div",{children:[e.jsx(G,{headerText:"USD Price Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:de,onChange:C=>t({lastSaleUSDColor:C})}),e.jsx(G,{headerText:"USD Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:M,fallbackFontSize:me,onChange:C=>t({lastSaleUSDFontsize:C})})]})]}),e.jsxs(Fe,{title:D("Button"),initialOpen:!1,children:[e.jsx(G,{headerText:"Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:we,onChange:C=>t({buttonTextColor:C})}),e.jsx(G,{headerText:"Background Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:ve,onChange:C=>t({buttonBackgroundColor:C})}),e.jsx(G,{headerText:"Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:ke,fallbackFontSize:me,onChange:C=>t({buttonFontSize:C})})]}),c&&je("embedpress.openseaControls",[],o,t,"loadmorePanelBody"),l&&e.jsxs(Fe,{title:D("Rank"),initialOpen:!1,children:[e.jsx(G,{headerText:"Label Color"}),e.jsx(ge,{label:D("Label Color"),colors:se,value:mt,onChange:C=>t({rankLabelColor:C})}),e.jsx(G,{headerText:"Label Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:ht,fallbackFontSize:me,onChange:C=>t({rankLabelFZ:C})}),e.jsx(G,{headerText:"Color"}),e.jsx(ge,{label:D("Title Color"),colors:se,value:Ge,onChange:C=>t({rankBtnColor:C})}),e.jsx(G,{headerText:"Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:rt,fallbackFontSize:me,onChange:C=>t({rankBtnFZ:C})}),e.jsx(G,{headerText:"Border Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:Le,onChange:C=>t({rankBtnBorderColor:C})})]}),l&&e.jsxs(Fe,{title:D("Details"),initialOpen:!1,children:[e.jsx(G,{headerText:"Title Color"}),e.jsx(ge,{label:D("Title Color"),colors:se,value:Ut,onChange:C=>t({detialTitleColor:C})}),e.jsx(G,{headerText:"Title Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:It,fallbackFontSize:me,onChange:C=>t({detialTitleFZ:C})}),e.jsx(G,{headerText:"Content Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:po,onChange:C=>t({detailTextColor:C})}),e.jsx(G,{headerText:"Link Color"}),e.jsx(ge,{label:D("Color"),colors:se,value:Gt,onChange:C=>t({detailTextLinkColor:C})}),e.jsx(G,{headerText:"Content Font Size"}),e.jsx($e,{__nextHasNoMarginBottom:!0,fontSizes:pe,value:Bt,fallbackFontSize:me,onChange:C=>t({detailTextFZ:C})})]})]})]}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(at,{attributes:o,setAttributes:t})]})}const{__:et}=wp.i18n,{isShallowEqualObjects:ur}=wp.isShallowEqual,{useState:mr,useEffect:hr}=wp.element,{addFilter:gr,applyFilters:qt}=wp.hooks,{TextControl:fr,SelectControl:Sg,RangeControl:Lg,ToggleControl:fo,PanelBody:br,Button:Tg,ColorPalette:yr}=wp.components,xr=()=>{gr("embedpress_block_rest_param","embedpress",wr,10)},wr=(o,t)=>{if(!t.url)return o;let s={};vr(t.url)&&(s={wstarttime:"",wautoplay:!1,scheme:"",captions:!0,playbar:!0,wfullscreen:!0,playbutton:!0,smallplaybutton:!0,resumable:!0,wistiafocus:!0,volumecontrol:!0,volume:100,rewind:!0,customlogo:"",logoX:5,logoY:10,customlogoUrl:"",logoOpacity:.6});const l={...s};return ee(o,t,l)},vr=o=>o.match(/\/medias\/|(?:https?:\/\/)?(?:www\.)?(?:wistia.com\/)(\w+)[^?\/]*$/i),jr=o=>{const t={wstarttime:null,wautoplay:null,scheme:null,captions:null,playbar:null,wfullscreen:null,playbutton:null,smallplaybutton:null,resumable:null,wistiafocus:null,volumecontrol:null,volume:null,rewind:null,customlogo:null,logoX:null,logoY:null,customlogoUrl:null,logoOpacity:null},s=ee({},o,t),[l,a]=mr(s);return hr(()=>{const n=ee(l,o,t);ur(l||{},n)||a(n)},[o]),l};function Cr({attributes:o,setAttributes:t,isWistiaVideo:s}){const{wstarttime:l,wautoplay:a,scheme:n,captions:c,playbar:r,wfullscreen:u,playbutton:i,smallplaybutton:d,resumable:m,wistiafocus:p,volumecontrol:h,volume:x,rewind:g,customlogo:b,logoX:f,logoY:y,customlogoUrl:P,logoOpacity:v}=o;embedpressGutenbergData.isProPluginActive,document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const w=[{name:"",color:"#FF0000"},{name:"",color:"#00FF00"},{name:"",color:"#0000FF"},{name:"",color:"#FFFF00"},{name:"",color:"#FFA500"}],j=qt("embedpress.togglePlaceholder",[],et("Captions","embedpress"),!0),$=qt("embedpress.togglePlaceholder",[],et("Volume Control","embedpress"),!0),S=qt("embedpress.rangeControlPlaceholder",[],et("Volume"),50,0,100,!0);return e.jsx("div",{children:s&&e.jsx("div",{className:"ep__single-yt-video-options",children:e.jsx(br,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",et("Wistia Video Controls","embedpress")]}),initialOpen:!1,children:e.jsxs("div",{className:"ep-video-controlers",children:[e.jsx(fr,{label:et("Start Time (In Seconds)"),value:l,onChange:_=>t({wstarttime:_}),type:"number",className:"ep-control-field"}),e.jsx(fo,{label:et("Auto Play"),checked:a,onChange:_=>t({wautoplay:_})}),e.jsx(G,{headerText:"Scheme"}),e.jsx(yr,{label:et("Scheme"),colors:w,value:n,onChange:_=>t({scheme:_})}),e.jsx("hr",{}),e.jsx(fo,{label:et("Fullscreen Button"),checked:u,onChange:_=>t({wfullscreen:_})}),e.jsx(fo,{label:et("Small Play Button"),checked:d,onChange:_=>t({smallplaybutton:_})}),qt("embedpress.wistiaControls",[j],o,t,"captions"),e.jsx(fo,{label:et("Playbar"),checked:r,onChange:_=>t({playbar:_})}),qt("embedpress.wistiaControls",[$],o,t,"volume"),h&&qt("embedpress.wistiaControls",[S],o,t,"volumeRange")]})})})})}const{isShallowEqualObjects:_r}=wp.isShallowEqual,{useState:kr,useEffect:$r}=wp.element,{__:Oe}=wp.i18n,{addFilter:Pr,applyFilters:Yt}=wp.hooks,{TextControl:Sr,SelectControl:Bg,RangeControl:Fg,ToggleControl:eo,PanelBody:Lr,Button:Eg,ColorPalette:Tr}=wp.components,Br=()=>{Pr("embedpress_block_rest_param","embedpress",Er,10)},Fr=[{name:"",color:"#FF0000"},{name:"",color:"#00FF00"},{name:"",color:"#0000FF"},{name:"",color:"#FFFF00"},{name:"",color:"#FFA500"}],Er=(o,t)=>{if(!t.url)return o;let s={};Dr(t.url)&&(s={vstarttime:"",vautoplay:!1,vscheme:"#00ADEF",vtitle:!0,vauthor:!0,vavatar:!0,vloop:!1,vautopause:!1,vdnt:!1});const l={...s};return ee(o,t,l)},Dr=o=>o.match(/https?:\/\/(www\.)?vimeo\.com\/\d+/),Nr=o=>{const t={vstarttime:null,vautoplay:null,vscheme:null,vtitle:null,vauthor:null,vavatar:null,vloop:null,vautopause:null,vdnt:null},s=ee({},o,t),[l,a]=kr(s);return $r(()=>{const n=ee(l,o,t);_r(l||{},n)||a(n)},[o]),l};function Mr({attributes:o,setAttributes:t,isVimeoVideo:s}){const{vstarttime:l,vautoplay:a,vscheme:n,vtitle:c,vauthor:r,vavatar:u,vloop:i,vautopause:d,vdnt:m,customPlayer:p,customlogo:h,logoX:x,logoY:g,customlogoUrl:b,logoOpacity:f}=o;embedpressGutenbergData.isProPluginActive,document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const y=Yt("embedpress.togglePlaceholder",[],Oe("Loop","embedpress"),!1),P=Yt("embedpress.togglePlaceholder",[],Oe("Auto Paause","embedpress"),!1),v=Yt("embedpress.togglePlaceholder",[],Oe("DNT","embedpress"),!1);return e.jsx("div",{children:s&&e.jsx("div",{className:"ep__vimeo-video-options",children:e.jsxs(Lr,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Oe("Video Controls","embedpress")]}),initialOpen:!1,children:[e.jsx(eo,{label:Oe("Enable Custom Player","embedpress"),checked:p,onChange:w=>t({customPlayer:w})}),p?e.jsx("div",{className:"ep-video-controlers",children:e.jsx(Ps,{attributes:o,setAttributes:t,isVimeoVideo:s})}):e.jsxs("div",{className:"ep-video-controlers",children:[e.jsx(Sr,{label:Oe("Start Time (In Seconds)"),value:l,onChange:w=>t({vstarttime:w}),type:"number",className:"ep-control-field"}),e.jsx(eo,{label:Oe("Auto Play"),checked:a,onChange:w=>t({vautoplay:w})}),e.jsx(G,{headerText:"Scheme"}),e.jsx(Tr,{label:Oe("Scheme"),colors:Fr,value:n,onChange:w=>t({vscheme:w})}),e.jsx(eo,{label:Oe("Title"),checked:c,onChange:w=>t({vtitle:w})}),e.jsx(eo,{label:Oe("Author"),checked:r,onChange:w=>t({vauthor:w})}),e.jsx(eo,{label:Oe("Avatar"),checked:u,onChange:w=>t({vavatar:w})}),Yt("embedpress.vimeoControls",[y],o,t,"loop"),Yt("embedpress.vimeoControls",[P],o,t,"autoPause"),Yt("embedpress.vimeoControls",[v],o,t,"dnt")]})]})})})}const{isShallowEqualObjects:Dg}=wp.isShallowEqual,{useState:Ng,useEffect:Mg}=wp.element,{__:Qo}=wp.i18n,{addFilter:zg}=wp.hooks,{TextControl:Ug,SelectControl:Ig,RangeControl:Gg,ToggleControl:Is,PanelBody:zr,Button:Rg,ColorPalette:Hg}=wp.components;function Ur({attributes:o,setAttributes:t}){const{url:s,vstarttime:l,vautoplay:a,vscheme:n,vtitle:c,vauthor:r,vavatar:u,vloop:i,vautopause:d,vdnt:m,customPlayer:p,customlogo:h,logoX:x,logoY:g,customlogoUrl:b,logoOpacity:f,autoPause:y}=o,P=vs(s),v=Es(s);embedpressGutenbergData.isProPluginActive,document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());let w="Video Controls";return v&&(w="Audio Controls"),e.jsx("div",{children:(vs(s)||Es(s))&&e.jsx("div",{className:"ep__vimeo-video-options",children:e.jsxs(zr,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Qo(w,"embedpress")]}),initialOpen:!1,children:[e.jsx(Is,{label:Qo("Auto-Pause","embedpress"),checked:y,onChange:j=>t({autoPause:j})}),e.jsx("p",{className:"control-description",children:"Pauses other players when a new one starts."}),e.jsx(Is,{label:Qo("Enable Custom Player","embedpress"),checked:p,onChange:j=>t({customPlayer:j})}),p&&e.jsx(Ps,{attributes:o,setAttributes:t,isSelfHostedVideo:P,isSelfHostedAudio:v})]})})})}const{isShallowEqualObjects:Ir}=wp.isShallowEqual,{useState:Gr,useEffect:Rr}=wp.element,{applyFilters:bt}=wp.hooks,{__:Q}=wp.i18n,{addFilter:Hr}=wp.hooks,{TextControl:tt,SelectControl:Ao,RangeControl:Og,ToggleControl:Ve,PanelBody:Gs,Button:Vg,ColorPalette:Wg,PanelRow:Or}=wp.components,Vr=()=>{Hr("embedpress_block_rest_param","embedpress",Wr,10)},Wr=(o,t)=>!t.url||!Kt(t.url)?o:ee(o,t,{width:"900",instafeedAccName:!0,instafeedProfileImage:!0,instafeedProfileImageUrl:"",instafeedFollowBtn:!0,instafeedFollowBtnLabel:"Follow",instafeedPostsCount:!0,instafeedPostsCountText:"[count] posts",instafeedFollowersCount:!0,instafeedFollowersCountText:"[count] followers",instaLayout:"insta-grid",instafeedFeedType:"user_account_type",instafeedAccountType:"personal",instafeedColumns:"3",instafeedColumnsGap:"5",instafeedPostsPerPage:!0,instafeedTab:!0,instafeedCommentsCount:!1,instafeedLikesCount:!1,instafeedPopup:!0,instafeedPopupFollowBtn:!0,instafeedPopupFollowBtnLabel:"Follow",instafeedLoadmore:!0,instafeedLoadmoreLabel:"Load More",slidesShow:"4",slidesScroll:"4",carouselAutoplay:!1,autoplaySpeed:"3000",transitionSpeed:"1000",carouselLoop:!0,carouselArrows:!0,carouselSpacing:"0",carouselDots:!1}),qr=o=>{const t={width:null,instaLayout:null,instafeedFeedType:null,instafeedAccountType:null,slidesShow:null,slidesScroll:null,carouselAutoplay:null,autoplaySpeed:null,transitionSpeed:null,carouselLoop:null,carouselArrows:null,carouselSpacing:null,instafeedProfileImage:null,instafeedProfileImageUrl:null,instafeedFollowBtn:null,instafeedFollowBtnLabel:null,instafeedPostsCount:null,instafeedPostsCountText:null,instafeedFollowersCount:null,instafeedFollowersCountText:null,instafeedAccName:null,instafeedColumns:null,instafeedColumnsGap:null,instafeedPostsPerPage:null,instafeedTab:null,instafeedCommentsCount:null,instafeedLikesCount:null,instafeedPopup:null,instafeedPopupFollowBtn:null,instafeedPopupFollowBtnLabel:null,instafeedLoadmore:null,instafeedLoadmoreLabel:null},s=ee({},o,t),[l,a]=Gr(s);return Rr(()=>{const n=ee(l,o,t);Ir(l||{},n)||a(n)},[o]),l};function Yr({attributes:o,setAttributes:t}){const{url:s,instaLayout:l,instafeedFeedType:a,instafeedAccountType:n,instafeedColumns:c,instafeedColumnsGap:r,instafeedPostsPerPage:u,instafeedTab:i,instafeedCommentsCount:d,instafeedLikesCount:m,instafeedPopup:p,instafeedPopupFollowBtn:h,instafeedPopupFollowBtnLabel:x,instafeedLoadmore:g,instafeedLoadmoreLabel:b,slidesShow:f,slidesScroll:y,carouselAutoplay:P,autoplaySpeed:v,transitionSpeed:w,carouselLoop:j,carouselArrows:$,carouselSpacing:S,carouselDots:_,instafeedProfileImage:B,instafeedProfileImageUrl:N,instafeedFollowBtn:I,instafeedFollowBtnLabel:R,instafeedPostsCount:L,instafeedPostsCountText:J,instafeedFollowersCount:W,instafeedFollowersCountText:V,instafeedAccName:Z}=o,F=Kt(s),k=T=>{t({instafeedProfileImageUrl:""})};document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const E=[{label:"Auto",value:"auto"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"6",value:"6"}];l==="insta-carousel"&&t({instafeedLoadmore:!1});const z=bt("embedpress.uploadPlaceholder",[]),q=bt("embedpress.togglePlaceholder",[],Q("Feed Tab","embedpress"),!1),O=bt("embedpress.togglePlaceholder",[],Q("Likes Count","embedpress"),!1),Y=bt("embedpress.togglePlaceholder",[],Q("Comments Count","embedpress"),!1);return e.jsx("div",{children:F&&e.jsxs("div",{className:"ep__instafeed-options",children:[e.jsxs(Gs,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Q("Profile Settings","embedpress")]}),initialOpen:!1,children:[e.jsx(Ve,{label:Q("Profile Image","embedpress"),checked:B,onChange:T=>{t({instafeedProfileImage:T})}}),N&&e.jsxs("div",{className:"ep__custom-logo",style:{position:"relative"},children:[e.jsx("button",{title:"Remove Image",className:"ep-remove__image",type:"button",onClick:k,children:e.jsx("span",{class:"dashicon dashicons dashicons-trash"})}),e.jsx("img",{src:N,alt:"John"})]}),B&&bt("embedpress.instafeedControls",[z],o,t,"profileImage"),e.jsx(Ve,{label:Q("Follow Button","embedpress"),checked:I,onChange:T=>t({instafeedFollowBtn:T})}),I&&e.jsx(tt,{label:Q("Button Label","embedpress"),value:R,onChange:T=>t({instafeedFollowBtnLabel:T})}),e.jsx(Ve,{label:Q("Posts Count","embedpress"),checked:L,onChange:T=>t({instafeedPostsCount:T})}),L&&e.jsx(tt,{label:Q("Count Text","embedpress"),value:J,onChange:T=>t({instafeedPostsCountText:T})}),n==="business"&&e.jsx(Ve,{label:Q("Followers Count","embedpress"),checked:W,onChange:T=>t({instafeedFollowersCount:T})}),W&&n==="business"&&e.jsx(tt,{label:Q("Count Text","embedpress"),value:V,onChange:T=>t({instafeedFollowersCountText:T})}),n==="business"&&e.jsx(Ve,{label:Q("Account Name","embedpress"),checked:Z,onChange:T=>t({instafeedAccName:T})})]}),e.jsx(Gs,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Q("Feed Settings","embedpress")]}),initialOpen:!1,children:F&&e.jsxs("div",{className:"instafeed-controls",children:[e.jsx(Ao,{label:Q("Layout"),value:l,options:[{label:"Grid",value:"insta-grid"},{label:"Masonry",value:"insta-masonry"},{label:"Carousel",value:"insta-carousel"}],onChange:T=>t({instaLayout:T}),__nextHasNoMarginBottom:!0}),l==="insta-carousel"&&e.jsx(Or,{className:"elementor-panel-alert elementor-panel-warning-info margin-bottom-10",children:"Changes will apply in frontend."}),(l==="insta-grid"||l==="insta-masonry")&&e.jsxs("div",{children:[e.jsx(Ao,{label:Q("Columns","embedpress"),value:c,options:E,onChange:T=>t({instafeedColumns:T})}),e.jsx(tt,{label:Q("Column Gap","embedpress"),value:r,onChange:T=>t({instafeedColumnsGap:T})})]}),l==="insta-carousel"&&e.jsxs("div",{children:[e.jsx(Ao,{label:Q("Slides to Show","embedpress"),value:f,options:[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"},{label:"6",value:"6"},{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"}],onChange:T=>t({slidesShow:T}),__nextHasNoMarginBottom:!0}),e.jsx(Ve,{label:Q("Autoplay","embedpress"),checked:P,onChange:T=>t({carouselAutoplay:T})}),e.jsx(tt,{label:Q("Autoplay Speed(ms)","embedpress"),value:v,onChange:T=>t({autoplaySpeed:T})}),e.jsx(tt,{label:Q("Transition Speed(ms)","embedpress"),value:w,onChange:T=>t({transitionSpeed:T})}),e.jsx(Ve,{label:Q("Loop","embedpress"),checked:j,onChange:T=>t({carouselLoop:T})}),e.jsx(tt,{label:Q("Space","embedpress"),value:S,onChange:T=>t({carouselSpacing:T})}),e.jsx(Ve,{label:Q("Arrows","embedpress"),checked:$,onChange:T=>t({carouselArrows:T})})]}),e.jsx(tt,{label:Q("Posts Per Page","embedpress"),value:u,onChange:T=>t({instafeedPostsPerPage:T})}),bt("embedpress.instafeedControls",[q],o,t,"feedTab"),(n==="business"||a==="hashtag_type")&&bt("embedpress.instafeedControls",[O],o,t,"likesCount"),(n==="business"||a==="hashtag_type")&&bt("embedpress.instafeedControls",[Y],o,t,"commentsCount"),e.jsx(Ve,{label:Q("Popup","embedpress"),checked:p,onChange:T=>t({instafeedPopup:T})}),p&&e.jsxs("div",{children:[e.jsx(Ve,{label:Q("Popup Follow Button","embedpress"),checked:h,onChange:T=>t({instafeedPopupFollowBtn:T})}),h&&e.jsx(tt,{label:Q("Follow Button Label","embedpress"),value:x,onChange:T=>t({instafeedPopupFollowBtnLabel:T})})]}),(l==="insta-grid"||l==="insta-masonry")&&e.jsx(Ve,{label:Q("Load More","embedpress"),checked:g,onChange:T=>t({instafeedLoadmore:T})}),g&&e.jsx(tt,{label:Q("Load More Button Label","embedpress"),value:b,onChange:T=>t({instafeedLoadmoreLabel:T})})]})})]})})}const{isShallowEqualObjects:Zr}=wp.isShallowEqual,{useState:Xr,useEffect:Jr}=wp.element,{applyFilters:Rs}=wp.hooks,{__:De}=wp.i18n,{addFilter:Kr}=wp.hooks,{SelectControl:Qr,RangeControl:qg,ToggleControl:Hs,TextControl:Ar,PanelBody:Os,ColorPalette:to,FontSizePicker:Yg}=wp.components,{InspectorControls:Zg}=wp.blockEditor,ei=()=>{Kr("embedpress_block_rest_param","embedpress",ti,10)},ti=(o,t)=>t.url?ee(o,t,{cEmbedType:"inline",calendlyData:0,hideCookieBanner:0,hideEventTypeDetails:0,cBackgroundColor:"ffffff",cTextColor:"2cff2c",cButtonLinkColor:"0000FF",cPopupButtonText:"Schedule time with me",cPopupButtonBGColor:"#0000FF",cPopupButtonTextColor:"#FFFFFF",cPopupLinkText:"Schedule time with me"}):o,oi=o=>{const t={cEmbedType:null,calendlyData:null,hideCookieBanner:null,hideEventTypeDetails:null,cBackgroundColor:null,cTextColor:null,cButtonLinkColor:null,cPopupButtonText:null,cPopupButtonBGColor:null,cPopupButtonTextColor:null,cPopupLinkText:null},s=ee({},o,t),[l,a]=Xr(s);return Jr(()=>{const n=ee(l,o,t);Zr(l||{},n)||a(n)},[o]),l};function si({attributes:o,setAttributes:t,isCalendly:s}){const{cEmbedType:l,calendlyData:a,hideCookieBanner:n,hideEventTypeDetails:c,cBackgroundColor:r,cTextColor:u,cButtonLinkColor:i,cPopupButtonText:d,cPopupButtonBGColor:m,cPopupButtonTextColor:p,cPopupLinkText:h}=o;embedpressGutenbergData.isProPluginActive;const x=()=>{document.querySelector(".pro__alert__wrap")&&document.querySelector(".pro__alert__wrap .pro__alert__card .button").addEventListener("click",y=>{document.querySelector(".pro__alert__wrap").style.display="none"})},g=y=>{const P=`
<div class="pro__alert__wrap" style="display: none;">
<div class="pro__alert__card">
<img src="../wp-content/plugins/embedpress/EmbedPress/Ends/Back/Settings/assets/img/alert.svg" alt=""/>
<h2>Opps...</h2>
<p>You need to upgrade to the <a href="https://wpdeveloper.com/in/upgrade-embedpress" target="_blank">Premium</a> Version to use this feature</p>
<a href="#" class="button radius-10">Close</a>
</div>
</div>
`,v=document.createElement("div");return v.innerHTML=P,v};document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(g()),x()),De("Small"),De("Medium"),De("Large");const b=[{name:"",color:"#FF0000"},{name:"",color:"#00FF00"},{name:"",color:"#0000FF"},{name:"",color:"#FFFF00"},{name:"",color:"#FFA500"}],f=Rs("embedpress.togglePlaceholder",[],De("Calendly Data","embedpress"),!1);return s&&e.jsxs("div",{children:[e.jsx(Os,{title:De("Calendly Controls"),initialOpen:!1,className:"ep-calendly-options",children:e.jsxs("div",{children:[e.jsx(Qr,{label:De("Embed Type","embedpress"),value:l,options:[{label:"Inline",value:"inline"},{label:"Popup Button",value:"popup_button"}],onChange:y=>t({cEmbedType:y})}),Rs("embedpress.calendlyControls",[f],o,t,"calendlyData"),a&&e.jsxs("div",{className:"ep-calendly-data-link",children:[ln,e.jsxs("a",{href:"/wp-admin/admin.php?page=embedpress&page_type=calendly",target:"_blank",children:[" ",De("View Calendly Data","embedpress")," "]})]}),e.jsx(Hs,{label:"Hide Cookie Banner",checked:n,onChange:y=>t({hideCookieBanner:y})}),e.jsx(Hs,{label:"Hide Event Type Details",checked:c,onChange:y=>t({hideEventTypeDetails:y})}),e.jsx(G,{headerText:"Background Color"}),e.jsx(to,{label:De("Background Color"),colors:b,value:r,onChange:y=>t({cBackgroundColor:y})}),e.jsx(G,{headerText:"Text Color"}),e.jsx(to,{label:De("Text Color"),colors:b,value:u,onChange:y=>t({cTextColor:y})}),e.jsx(G,{headerText:"Button & Link Color"}),e.jsx(to,{label:De("Button & Link Color"),colors:b,value:i,onChange:y=>t({cButtonLinkColor:y})})]})}),e.jsx("div",{children:l==="popup_button"&&e.jsx(Os,{title:De("Popup Settings"),initialOpen:!1,className:"ep-calendly-options",children:e.jsxs("div",{children:[e.jsx(Ar,{label:"Button Text",value:d,onChange:y=>t({cPopupButtonText:y})}),e.jsx(G,{headerText:"Text Color"}),e.jsx(to,{label:De("Text Color"),colors:b,value:p,onChange:y=>t({cPopupButtonTextColor:y})}),e.jsx(G,{headerText:"Background Color"}),e.jsx(to,{label:De("Background Color"),colors:b,value:m,onChange:y=>t({cPopupButtonBGColor:y})})]})})})]})}const{isShallowEqualObjects:li}=wp.isShallowEqual,{useState:ai,useEffect:ni}=wp.element,{__:ae}=wp.i18n,{addFilter:ri,applyFilters:yt}=wp.hooks,{TextControl:Xg,SelectControl:Vs,RangeControl:Jg,ToggleControl:ot,PanelBody:ii,Button:Kg,ColorPalette:di}=wp.components,ci=()=>{ri("embedpress_block_rest_param","embedpress",pi,10)},pi=(o,t)=>!t.url||!Fa(t.url)?o:ee(o,t,{theme:"light",color:"",coverImageUrl:"",playlist:!1,playlistContinuous:!1,playlistLoop:!1,playlistAutoupdate:!0,chaptersImage:!0,episodeImagePosition:"right",hideLikes:!1,hideComments:!1,hideSharing:!1,hideLogo:!1,hideEpisodeDescription:!1,hidePlaylistDescriptions:!1,hidePlaylistImages:!1,hideDownload:!0}),ui=o=>{const t={theme:null,color:null,coverImageUrl:null,playlist:null,playlistContinuous:null,playlistLoop:null,playlistAutoupdate:null,chaptersImage:null,episodeImagePosition:null,hideLikes:null,hideComments:null,hideSharing:null,hideLogo:null,hideEpisodeDescription:null,hidePlaylistDescriptions:null,hidePlaylistImages:null,hideDownload:null},s=ee({},o,t),[l,a]=ai(s);return ni(()=>{const n=ee(l,o,t);li(l||{},n)||a(n)},[o]),l};function mi({attributes:o,setAttributes:t}){const{url:s,theme:l,color:a,coverImageUrl:n,playlist:c,playlistContinuous:r,playlistLoop:u,playlistAutoupdate:i,chaptersImage:d,episodeImagePosition:m,hideLikes:p,hideComments:h,hideSharing:x,hideLogo:g,hideEpisodeDescription:b,hidePlaylistDescriptions:f,hidePlaylistImages:y,hideDownload:P}=o;embedpressGutenbergData.isProPluginActive,document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const v=[{name:"Red",color:"#FF0000"},{name:"Green",color:"#00FF00"},{name:"Blue",color:"#0000FF"},{name:"Yellow",color:"#FFFF00"},{name:"Orange",color:"#FFA500"},{name:"Purple",color:"#800080"}],w=yt("embedpress.togglePlaceholder",[],ae("Disable Download","embedpress"),!1),j=yt("embedpress.togglePlaceholder",[],ae("Continuous Playlist","embedpress"),!1),$=yt("embedpress.togglePlaceholder",[],ae("Loop Playlist","embedpress"),!1),S=yt("embedpress.uploadPlaceholder",[]);return e.jsx("div",{children:Fa(s)&&e.jsx("div",{className:"ep__vimeo-video-options",children:e.jsxs(ii,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",ae("Spreaker Controls","embedpress")]}),initialOpen:!1,children:[e.jsx(Vs,{label:ae("Theme","embedpress"),value:l,options:[{label:ae("Light","embedpress"),value:"light"},{label:ae("Dark","embedpress"),value:"dark"}],onChange:_=>t({theme:_})}),e.jsx(G,{headerText:"Main Color "}),e.jsx(di,{colors:v,value:a,onChange:_=>t({color:_})}),e.jsx(G,{headerText:"Cover Image"}),yt("embedpress.spreakerControls",[S],o,t,"coverImage"),yt("embedpress.spreakerControls",[w],o,t,"hideDownload"),e.jsx(ot,{label:ae("Enable Playlist","embedpress"),help:ae("This option is for podcast playlists and doesn’t affect individual episodes.","embedpress"),checked:c,onChange:_=>t({playlist:_})}),c&&e.jsxs("div",{children:[yt("embedpress.spreakerControls",[j],o,t,"playlistContinuous"),yt("embedpress.spreakerControls",[$],o,t,"playlistLoop"),e.jsx(ot,{label:ae("Playlist Autoupdate","embedpress"),checked:i,onChange:_=>t({playlistAutoupdate:_})}),e.jsx(ot,{label:ae("Hide Playlist Descriptions","embedpress"),checked:f,onChange:_=>t({hidePlaylistDescriptions:_})}),e.jsx(ot,{label:ae("Hide Playlist Images","embedpress"),checked:y,onChange:_=>t({hidePlaylistImages:_})})]}),e.jsx(Vs,{label:ae("Episode Image Position","embedpress"),value:m,options:[{label:ae("Right","embedpress"),value:"right"},{label:ae("Left","embedpress"),value:"left"}],onChange:_=>t({episodeImagePosition:_})}),e.jsx(ot,{label:ae("Show Chapters Images","embedpress"),checked:d,onChange:_=>t({chaptersImage:_}),help:ae("Only applies if the podcast includes chapter images.","embedpress")}),e.jsx(ot,{label:ae("Hide Likes","embedpress"),checked:p,onChange:_=>t({hideLikes:_})}),e.jsx(ot,{label:ae("Hide Comments","embedpress"),checked:h,onChange:_=>t({hideComments:_})}),e.jsx(ot,{label:ae("Hide Sharing","embedpress"),checked:x,onChange:_=>t({hideSharing:_})}),e.jsx(ot,{label:ae("Hide Logo","embedpress"),checked:g,onChange:_=>t({hideLogo:_}),help:ae("Hide the Spreaker logo and branding in the player. Requires Broadcaster plan or higher.","embedpress")}),e.jsx(ot,{label:ae("Hide Episode Description","embedpress"),checked:b,onChange:_=>t({hideEpisodeDescription:_})})]})})})}const{isShallowEqualObjects:hi}=wp.isShallowEqual,{useState:gi,useEffect:fi}=wp.element,{addFilter:bi}=wp.hooks,{__:Pe}=wp.i18n,{TextControl:Qg,SelectControl:yi,RangeControl:Ws,ToggleControl:bo,PanelBody:xi,ColorPalette:wi}=wp.components,vi=()=>{bi("embedpress_block_rest_param","embedpress",ji,10)},ji=(o,t)=>!t.url||!Oo(t.url)?o:ee(o,t,{mode:"carousel",imageWidth:800,imageHeight:600,playerAutoplay:!1,delay:5,repeat:!0,mediaitemsAspectRatio:!0,mediaitemsEnlarge:!1,mediaitemsStretch:!1,mediaitemsCover:!1,backgroundColor:"",expiration:0,photos_link:!0,showTitle:!0}),Ci=o=>{const t={mode:null,imageWidth:null,imageHeight:null,playerAutoplay:null,delay:null,repeat:null,mediaitemsAspectRatio:null,mediaitemsEnlarge:null,mediaitemsStretch:null,mediaitemsCover:null,backgroundColor:null,expiration:null,photos_link:null,showTitle:null},s=ee({},o,t),[l,a]=gi(s);return fi(()=>{const n=ee(l,o,t);hi(l||{},n)||a(n)},[o]),l};function _i({attributes:o,setAttributes:t}){const{url:s,mode:l,imageWidth:a,imageHeight:n,playerAutoplay:c,delay:r,repeat:u,mediaitemsAspectRatio:i,mediaitemsEnlarge:d,mediaitemsStretch:m,mediaitemsCover:p,backgroundColor:h,expiration:x,photos_link:g,showTitle:b}=o,f=[{name:"Red",color:"#FF0000"},{name:"Green",color:"#00FF00"},{name:"Blue",color:"#0000FF"},{name:"Yellow",color:"#FFFF00"},{name:"Orange",color:"#FFA500"},{name:"Purple",color:"#800080"}],y=embedpressGutenbergData.isProPluginActive;let P=" (Pro)";return y&&(P=""),e.jsx("div",{children:Oo(s)&&e.jsx("div",{className:"ep__google-photos-options",children:e.jsxs(xi,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Pe("GooglePhotos Controls","embedpress")]}),initialOpen:!0,children:[e.jsx(yi,{label:Pe("Album Mode","embedpress"),value:l,options:[{label:Pe("Carousel","embedpress"),value:"carousel"},{label:Pe("Gallery Player","embedpress"),value:"gallery-player"},{label:Pe("Grid"+P,"embedpress"),value:"gallery-grid"},{label:Pe("Masonry "+P,"embedpress"),value:"gallery-masonary"},{label:Pe("Justify "+P,"embedpress"),value:"gallery-justify"}],onChange:v=>{(v==="gallery-justify"||v==="gallery-grid"||v==="gallery-masonary")&&!y?St(null,y):t({mode:v})}}),l=="gallery-player"&&e.jsxs("frameElement",{children:[e.jsx(bo,{label:Pe("Autoplay","embedpress"),checked:c,onChange:v=>t({playerAutoplay:v})}),e.jsx(Ws,{label:Pe("Delay","embedpress"),value:r,onChange:v=>t({delay:v}),min:1,max:60}),e.jsx(bo,{label:Pe("Repeat","embedpress"),checked:u,onChange:v=>t({repeat:v})})]}),l=="gallery-player"||l=="carousel"&&e.jsx(wi,{label:Pe("Background Color","embedpress"),colors:f,value:h,onChange:v=>t({backgroundColor:v})}),e.jsx(Ws,{label:Pe("Sync after (minutes)","embedpress"),value:x,onChange:v=>t({expiration:v}),min:0,max:1440}),(l==="gallery-player"||l==="carousel")&&e.jsx(bo,{label:Pe("Enable Visit Google Photos Link","embedpress"),checked:g,onChange:v=>t({photos_link:v}),help:Pe("Enable an external link icon to visit the original Google Photos album","embedpress")}),e.jsx(bo,{label:Pe("Show Title","embedpress"),checked:b,onChange:v=>t({showTitle:v})})]})})})}const{isShallowEqualObjects:ki}=wp.isShallowEqual,{useState:$i,useEffect:Pi}=wp.element,{__:X}=wp.i18n,{addFilter:Si}=wp.hooks,{PanelBody:Li,SelectControl:oo,ToggleControl:Ti,RangeControl:Bi}=wp.components,Fi=()=>{Si("embedpress_block_rest_param","embedpress",Ei,10)},Ei=(o,t)=>!t.url||!t.url.includes("meetup.com")?o:ee(o,t,{meetupOrderBy:"date",meetupOrder:"ASC",meetupPerPage:10,meetupEnablePagination:!0,meetupTimezone:"wp_timezone",meetupDateFormat:"wp_date_format",meetupTimeFormat:"wp_time_format"}),Di=o=>{const t={meetupOrderBy:null,meetupOrder:null,meetupPerPage:null,meetupEnablePagination:null,meetupTimezone:null,meetupDateFormat:null,meetupTimeFormat:null},s=ee({},o,t),[l,a]=$i(s);return Pi(()=>{const n=ee(l,o,t);ki(l||{},n)||a(n)},[o]),l};function Ni({attributes:o,setAttributes:t}){const{url:s,meetupOrderBy:l,meetupOrder:a,meetupPerPage:n,meetupEnablePagination:c,meetupTimezone:r,meetupDateFormat:u,meetupTimeFormat:i}=o,d=s&&s.includes("meetup.com"),m=d&&(s.endsWith("/events")||s.endsWith("/events/")||s.includes("/events/rss"));return d?e.jsxs(Li,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",X("Meetup Settings","embedpress")]}),initialOpen:!1,children:[m&&e.jsxs(e.Fragment,{children:[e.jsx(oo,{label:X("Order By","embedpress"),value:l,options:[{label:X("Date","embedpress"),value:"date"},{label:X("Title","embedpress"),value:"title"},{label:X("Attendees","embedpress"),value:"attendees"}],onChange:p=>t({meetupOrderBy:p}),help:X("Choose how to sort the events","embedpress"),__nextHasNoMarginBottom:!0}),e.jsx(oo,{label:X("Order","embedpress"),value:a,options:[{label:X("Ascending","embedpress"),value:"ASC"},{label:X("Descending","embedpress"),value:"DESC"}],onChange:p=>t({meetupOrder:p}),help:X("Sort direction","embedpress"),__nextHasNoMarginBottom:!0}),e.jsx(Bi,{label:X("Events Per Page","embedpress"),value:n,onChange:p=>t({meetupPerPage:p}),min:1,max:50,step:1,help:X("Number of events to show per page","embedpress")}),e.jsx(Ti,{label:X("Enable Load More","embedpress"),checked:c,onChange:p=>t({meetupEnablePagination:p}),help:X('Show a "Load More" button to load additional events',"embedpress")})]}),e.jsx(oo,{label:X("Timezone","embedpress"),value:r,options:[{label:X("Visitor Timezone (Auto-detect)","embedpress"),value:"visitor_timezone"},{label:X("WordPress Site Timezone","embedpress"),value:"wp_timezone"},{label:X("UTC","embedpress"),value:"UTC"},{label:X("America/New_York (EST/EDT)","embedpress"),value:"America/New_York"},{label:X("America/Chicago (CST/CDT)","embedpress"),value:"America/Chicago"},{label:X("America/Denver (MST/MDT)","embedpress"),value:"America/Denver"},{label:X("America/Los_Angeles (PST/PDT)","embedpress"),value:"America/Los_Angeles"},{label:X("Europe/London (GMT/BST)","embedpress"),value:"Europe/London"},{label:X("Europe/Paris (CET/CEST)","embedpress"),value:"Europe/Paris"},{label:X("Asia/Tokyo (JST)","embedpress"),value:"Asia/Tokyo"},{label:X("Australia/Sydney (AEST/AEDT)","embedpress"),value:"Australia/Sydney"}],onChange:p=>t({meetupTimezone:p}),help:X("Select timezone for displaying event dates and times. Visitor timezone will auto-detect based on their browser.","embedpress"),__nextHasNoMarginBottom:!0}),e.jsx(oo,{label:X("Date Format","embedpress"),value:u,options:[{label:X("WordPress Date Format","embedpress"),value:"wp_date_format"},{label:X("MM/DD/YYYY","embedpress"),value:"m/d/Y"},{label:X("DD/MM/YYYY","embedpress"),value:"d/m/Y"},{label:X("YYYY-MM-DD","embedpress"),value:"Y-m-d"},{label:X("Month DD, YYYY","embedpress"),value:"F j, Y"},{label:X("DD Month YYYY","embedpress"),value:"j F Y"}],onChange:p=>t({meetupDateFormat:p}),help:X("Select date format for event dates","embedpress"),__nextHasNoMarginBottom:!0}),e.jsx(oo,{label:X("Time Format","embedpress"),value:i,options:[{label:X("WordPress Time Format","embedpress"),value:"wp_time_format"},{label:X("12-hour (h:mm AM/PM)","embedpress"),value:"g:i A"},{label:X("24-hour (HH:mm)","embedpress"),value:"H:i"}],onChange:p=>t({meetupTimeFormat:p}),help:X("Select time format for event times","embedpress"),__nextHasNoMarginBottom:!0})]}):null}const{useLayoutEffect:Mi,useRef:zi,useState:es,useEffect:Ui}=wp.element,Ia=({size:o=70})=>{const t=zi(null),[s,l]=es([]),[a,n]=es(0),[c,r]=es(!0);return Ui(()=>{(async()=>{try{const d=await(await fetch("/wp-json/embedpress/v1/analytics/overview?date_range=30",{headers:{"X-WP-Nonce":embedpressGutenbergData.nonce||wpApiSettings.nonce}})).json(),m=d.overview||d;if(m){const p=[{category:"Views",value:parseInt(m.total_views)||0},{category:"Clicks",value:parseInt(m.total_clicks)||0},{category:"Impr",value:parseInt(m.total_impressions)||0}];console.log("Chart data:",p),l(p),n(parseInt(m.total_embeds)||0)}r(!1)}catch(i){console.error("Error fetching analytics data:",i),r(!1)}})()},[]),Mi(()=>{if(c||!t.current)return;const u=Qa.new(t.current);u._logo.dispose(),u.setThemes([Aa.new(u)]),u.animationThemesEnabled=!1,u.container.set("tooltipPosition","pointer"),u.container.set("tooltipPositionX","pointer"),u.container.set("tooltipPositionY","pointer");const i=u.container.children.push(en.new(u,{layout:u.verticalLayout,innerRadius:Ls(75),radius:Ls(100)})),d=i.series.push(tn.new(u,{valueField:"value",categoryField:"category",alignLabels:!1,sequencedInterpolation:!1}));d.slices.template.set("toggleKey","none"),d.labels.template.set("visible",!1),d.ticks.template.set("visible",!1);const m=on.new(u,{getFillFromSprite:!1,labelText:"[#333]{category}: {value}[/]",paddingTop:4,paddingBottom:4,paddingLeft:6,paddingRight:6,autoTextColor:!1,pointerOrientation:"horizontal",centerX:Wt,centerY:Wt,background:sn.new(u,{fill:ft("#fff"),cornerRadius:4,strokeOpacity:1,stroke:ft("#e0e0e0"),strokeWidth:1,shadowColor:ft("#000"),shadowBlur:4,shadowOpacity:.1,shadowOffsetX:0,shadowOffsetY:2})});m.label.setAll({fill:ft("#333"),fontSize:10,fontWeight:"400",oversizedBehavior:"wrap",maxWidth:150}),d.slices.template.setAll({tooltip:m,stroke:ft("#fff"),strokeWidth:1,cornerRadius:4,interactive:!0,hoverable:!0}),d.slices.template.states.create("hover",{scale:1});const p=["#5B4E96","#8C73FA","#C4B5E8"];d.get("colors").set("colors",p.map(b=>ft(b)));let h=s.length>0?s:[{category:"Views",value:1},{category:"Clicks",value:1},{category:"Impr",value:1}];h.some(b=>b.value>0)||(h=[{category:"Views",value:1},{category:"Clicks",value:1},{category:"Impr",value:1}]),d.data.setAll(h);const g=a||1;return i.seriesContainer.children.push(Ts.new(u,{text:g.toLocaleString(),centerX:Wt,centerY:Wt,textAlign:"center",fontSize:14,fontWeight:"700",fill:ft("#092161"),dy:-8})),i.seriesContainer.children.push(Ts.new(u,{text:"Total Embeds",centerX:Wt,centerY:Wt,textAlign:"center",fontSize:7,fontWeight:"400",fill:ft("#666"),dy:6})),()=>u.dispose()},[c,s,a]),c?e.jsx("div",{style:{width:`${o}px`,height:`${o}px`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("span",{style:{fontSize:"10px",color:"#999"},children:"Loading..."})}):e.jsx("div",{ref:t,style:{width:`${o}px`,height:`${o}px`,overflow:"visible",position:"relative",zIndex:10}})},{useState:xt,useEffect:Ag,useRef:Ii}=wp.element,Gi=()=>{embedpressGutenbergData.is_embedpress_feedback_submited;const o=!!Number(embedpressGutenbergData.turn_off_rating_help),[t,s]=xt(()=>localStorage.getItem("ratingClosed")==="true"),[l,a]=xt(5),[n,c]=xt(!1),[r,u]=xt(!1),[i,d]=xt(!1),[m,p]=xt(0),[h,x]=xt(!1),[g,b]=xt("");Ii(null),embedpressGutenbergData.currentUser;const f=embedpressGutenbergData.isProPluginActive,y=embedpressGutenbergData.adminUrl?embedpressGutenbergData.adminUrl+"admin.php?page=embedpress-analytics":"/wp-admin/admin.php?page=embedpress-analytics";return!o&&f?null:e.jsxs("div",{className:`plugin-rating${o?"":" turn_off_ratting_help"}`,children:[o&&!1,e.jsxs("div",{className:"analytics-section-container",children:[e.jsx("div",{className:"analytics-chart",children:e.jsx(Ia,{size:70})}),e.jsxs("div",{className:"analytics-content",children:[e.jsx("h3",{children:"Advanced Analytics"}),e.jsx("p",{children:"Get full analytics on how your embeds are performing."}),e.jsxs("a",{href:y,className:"view-analytics-link",target:"_blank",children:["View Analytics",e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]}),e.jsxs("frameElement",{children:[e.jsx("p",{children:"Need help? We're here"}),e.jsxs("a",{href:"https://embedpress.com/?support=chat",target:"_blank",className:"chat-button",children:[e.jsxs("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxs("g",{"clip-path":"url(#a)",fill:"#fff",children:[e.jsx("path",{d:"M7.93.727H1.555C.97.727.5 1.198.5 1.782V6c0 .584.471 1.055 1.055 1.055h.351V8.11c0 .254.263.438.52.31.008-.008.022-.008.029-.015 1.934-1.297 1.5-1.008 1.933-1.294a.35.35 0 0 1 .19-.056H7.93c.583 0 1.054-.47 1.054-1.055V1.782c0-.584-.47-1.055-1.054-1.055M5.117 4.946h-2.86c-.463 0-.465-.703 0-.703h2.86c.464 0 .466.703 0 .703m2.11-1.406h-4.97c-.463 0-.465-.704 0-.704h4.97c.463 0 .465.704 0 .704"}),e.jsx("path",{d:"M11.445 3.54H9.687V6c0 .97-.787 1.758-1.757 1.758H4.684l-.668.443v.612c0 .584.47 1.055 1.054 1.055h3.457l2.018 1.35c.276.153.549-.033.549-.296V9.868h.351c.584 0 1.055-.471 1.055-1.055V4.594c0-.583-.471-1.054-1.055-1.054"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M.5 0h12v12H.5z"})})})]}),"Let’s Chat"]})]}),!f&&e.jsxs("div",{className:"upgrade-box",children:[e.jsx("h5",{children:"Want to explore more?"}),e.jsx("p",{children:"Dive in and discover all the premium features"}),e.jsx("a",{href:"https://embedpress.com/in/unlock-gutenberg-controls",target:"_blank",className:"upgrade-link",children:"Upgrade to PRO"})]})]})},{useRef:Ri}=wp.element,{applyFilters:ts}=wp.hooks,{__:We}=wp.i18n,{TextControl:qs,NumberControl:ef,PanelBody:Ys,SelectControl:os,ToggleControl:tf,PanelRow:Zs,Tooltip:Hi}=wp.components,{InspectorControls:Oi}=wp.blockEditor;function Vi({attributes:o,setAttributes:t,isYTChannel:s,isYTVideo:l,isYTLive:a,isYTShorts:n,isOpensea:c,isOpenseaSingle:r,isWistiaVideo:u,isVimeoVideo:i,isSelfHostedVideo:d,isSelfHostedAudio:m,isCalendly:p,isTikTok:h,isSpreaker:x,isMeetup:g}){const{url:b,width:f,height:y,videosize:P,instaLayout:v,instafeedFeedType:w,instafeedAccountType:j,slidesShow:$,slidesScroll:S,carouselAutoplay:_,autoplaySpeed:B,transitionSpeed:N,carouselLoop:I,carouselArrows:R,carouselSpacing:L,lockContent:J,contentPassword:W,editingURL:V,embedHTML:Z,mode:F,enableLazyLoad:k}=o,E=embedpressGutenbergData.isProPluginActive,z=ts("embedpress.togglePlaceholder",[],We("Enable Lazy Loading","embedpress"),k,!0);Ri(null);const q=O=>Math.round(O/5)*5;return document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze()),document.querySelector(".tips__alert__wrap")||(document.querySelector("body").append($s()),ks()),(l||a||i)&&f==="600"&&y==="600"&&t({height:"340"}),m&&t({height:"48"}),p&&f==="600"&&y==="600"&&t({height:"950"}),h&&f==="600"&&y==="600"&&(t({width:"350"}),t({height:"580"})),ws(b)&&f==="600"&&(t({instafeedFeedType:"hashtag_type"}),t({width:"900"})),!V&&Z&&e.jsxs(Oi,{children:[!c&&!r&&e.jsxs("div",{className:"embedpress-gutenberg-controls",children:[e.jsxs(Ys,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",We("General","embedpress")]}),children:[e.jsxs("div",{className:"ep-controls-margin",children:[Kt(b)&&e.jsx(Zs,{children:e.jsxs("div",{style:{marginBottom:"10px",backgroundColor:"#ebe4ff",padding:"8px",borderRadius:"8px",fontWeight:500},className:"elementor-panel-alert elementor-panel-warning-info",children:["To enable full Instagram embedding experience, please add your access token ",e.jsx("a",{href:"/wp-admin/admin.php?page=embedpress&page_type=instagram",target:"_blank",children:"here"}),"."]})}),a&&e.jsxs("p",{className:"ep-live-video-info",children:[lt," ","The most recent live video will be seen."]}),(l||i||a||d)&&e.jsx(os,{label:We("Video Size"),labelPosition:"side",value:P,options:[{label:"Fixed",value:"fixed"},{label:"Responsive",value:"responsive"}],onChange:O=>t({videosize:O}),__nextHasNoMarginBottom:!0}),(!l&&!a&&!i&&!d||P=="fixed")&&e.jsx("p",{children:We("You can adjust the width and height of embedded content.")}),(l||i||a||d)&&P=="responsive"&&e.jsx("p",{children:We("You can adjust the width of embedded content.","embedpress")}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(qs,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[We("Width"),e.jsx(Hi,{text:We("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:f,type:"number",onChange:O=>{t(i||l||a||d||s?{width:`${Math.round(O)}`,height:`${q(Math.round(O*9/16))}`}:{width:O})}})}),!g&&!Oo(b)&&!Kt(b)&&!ws(b)&&(!l&&!i&&!a&&!d&&!s||P=="fixed")||Oo(b)&&(F==="carousel"||F==="gallery-player")?e.jsx(qs,{label:We("Height"),value:y,type:"number",onChange:O=>{t(i||l||a||d||s?{height:`${Math.round(O)}`,width:`${q(Math.round(O*16/9))}`}:{height:O})}}):null,l&&e.jsxs("div",{className:"ep-tips-and-tricks",children:[U,e.jsxs("a",{href:"#",target:"_blank",onClick:O=>{O.preventDefault(),Ta()},children:[" ",We("Tips & Tricks","embedpress")," "]})]})]}),!a&&!n&&e.jsx(Xo,{attributes:o,setAttributes:t,isYTChannel:s}),Kt(b)&&e.jsxs("div",{children:[e.jsx(os,{label:"Feed Type",value:w,options:[{label:"User Account",value:"user_account_type"},{label:"Hashtag",value:"hashtag_type"},{label:"Tagged(Coming Soon)",value:"tagged_type"},{label:"Mixed(Coming Soon)",value:"mixed_type"}],onChange:O=>t({instafeedFeedType:O})}),!E&&w==="hashtag_type"&&e.jsx(Zs,{className:"elementor-panel-alert elementor-panel-warning-info",children:e.jsx("a",{style:{color:"red"},target:"_blank",href:"https://wpdeveloper.com/in/upgrade-embedpress",children:We("Only Available in Pro Version!","embedpress")})}),w==="user_account_type"&&e.jsx(os,{label:"Account Type",value:j,options:[{label:"Personal",value:"personal"},{label:"Business",value:"business"}],onChange:O=>t({instafeedAccountType:O})}),w==="hashtag_type"&&ts("embedpress.commonControls",[],o,t,"warningInfo")]})]}),e.jsx(Yr,{attributes:o,setAttributes:t}),e.jsx(Xo,{attributes:o,setAttributes:t,isYTVideo:l,isYTLive:a,isYTShorts:n}),e.jsx(Xo,{attributes:o,setAttributes:t}),e.jsx(Ur,{attributes:o,setAttributes:t}),e.jsx(mi,{attributes:o,setAttributes:t}),e.jsx(Cr,{attributes:o,setAttributes:t,isWistiaVideo:u}),e.jsx(Mr,{attributes:o,setAttributes:t,isVimeoVideo:i}),e.jsx(si,{attributes:o,setAttributes:t,isCalendly:p}),e.jsx(_i,{attributes:o,setAttributes:t}),e.jsx(Ni,{attributes:o,setAttributes:t}),e.jsx(Vn,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(Ys,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",We("Lazy Loading","embedpress")]}),children:ts("embedpress.toggleLazyLoad",[z],o,t)}),e.jsx(at,{attributes:o,setAttributes:t})]}),e.jsx(pr,{attributes:o,setAttributes:t,isOpensea:c,isOpenseaSingle:r}),e.jsx(Gi,{})]})}const{__:Wi}=wp.i18n,{Spinner:qi}=wp.components,Ne=()=>e.jsxs("div",{className:"wp-block-embed is-loading text-center",children:[e.jsx(qi,{}),e.jsx("p",{children:Wi("Embedding…")})]});var Ga={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(o){(function(){var t={}.hasOwnProperty;function s(){for(var n="",c=0;c<arguments.length;c++){var r=arguments[c];r&&(n=a(n,l(r)))}return n}function l(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return s.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var c="";for(var r in n)t.call(n,r)&&n[r]&&(c=a(c,r));return c}function a(n,c){return c?n?n+" "+c:n+c:n}o.exports?(s.default=s,o.exports=s):window.classNames=s})()})(Ga);var Yi=Ga.exports;const Zi=aa(Yi),{__:Xs,_x:Xi}=wp.i18n,{Button:Ji,Placeholder:Ki,ExternalLink:Qi}=wp.components,{BlockIcon:Ai}=wp.blockEditor,Je=o=>{const{icon:t,label:s,value:l,onSubmit:a,onChange:n,cannotEmbed:c,docLink:r,DocTitle:u}=o,i=Zi("wp-block-embed",{});return e.jsx("div",{className:"ep__components-placeholder",children:e.jsxs(Ki,{icon:e.jsx(Ai,{icon:t,showColors:!0}),label:s,className:i,children:[e.jsxs("form",{onSubmit:a,children:[e.jsx("input",{type:"url",value:l||"",className:"components-placeholder__input","aria-label":s,placeholder:Xs("Enter URL to embed here…"),onChange:n}),e.jsx(Ji,{isSmall:!0,type:"submit",children:Xi("Embed","button label")}),c&&e.jsxs("p",{className:"components-placeholder__error",children:[Xs("Sorry, we could not embed that content."),e.jsx("br",{})]})]}),r&&e.jsx("div",{className:"components-placeholder__learn-more",children:e.jsx(Qi,{href:r,children:u})})]})})},{Component:ed}=wp.element;class td extends ed{constructor(t){super(t),this.myRef=React.createRef()}componentDidMount(){na.findDOMNode(this.myRef.current).addEventListener("load",this.props.onLoad)}render(){return e.jsx("div",{className:this.props.className,ref:this.myRef,...this.props})}}const Js=o=>{if(!o)return"";const t=[{regex:/(?:youtube\.com|youtu\.be)/i,provider:"YouTube"},{regex:/vimeo\.com/i,provider:"Vimeo"},{regex:/wistia\.(?:com|net)/i,provider:"Wistia"},{regex:/twitch\.tv/i,provider:"Twitch"},{regex:/dailymotion\.com/i,provider:"Dailymotion"},{regex:/docs\.google\.com/i,provider:"Google Docs"},{regex:/sheets\.google\.com/i,provider:"Google Sheets"},{regex:/slides\.google\.com/i,provider:"Google Slides"},{regex:/forms\.google\.com/i,provider:"Google Forms"},{regex:/drive\.google\.com/i,provider:"Google Drive"},{regex:/(?:maps\.google\.com|goo\.gl)/i,provider:"Google Maps"},{regex:/(?:photos\.google\.com|photos\.app\.goo\.gl)/i,provider:"Google Photos"},{regex:/instagram\.com/i,provider:"Instagram"},{regex:/(?:twitter\.com|x\.com)/i,provider:"Twitter"},{regex:/linkedin\.com/i,provider:"LinkedIn"},{regex:/facebook\.com/i,provider:"Facebook"},{regex:/soundcloud\.com/i,provider:"SoundCloud"},{regex:/spotify\.com/i,provider:"Spotify"},{regex:/spreaker\.com/i,provider:"Spreaker"},{regex:/boomplay\.com/i,provider:"Boomplay"},{regex:/calendly\.com/i,provider:"Calendly"},{regex:/airtable\.com/i,provider:"Airtable"},{regex:/canva\.com/i,provider:"Canva"},{regex:/github\.com/i,provider:"GitHub"},{regex:/opensea\.io/i,provider:"OpenSea"},{regex:/gumroad\.com/i,provider:"Gumroad"},{regex:/giphy\.com/i,provider:"GIPHY"},{regex:/(?:radio\.nrk\.no|nrk\.no)/i,provider:"NRK Radio"},{regex:/\.pdf$/i,provider:"PDF Document"}];for(const{regex:l,provider:a}of t)if(l.test(o))return a;const s=o.match(/https?:\/\/(?:www\.)?([^.\/]+)\.(?:com|net|org|io|tv|co|fm|ly)/i);if(s!=null&&s[1]){const l=s[1];return l.charAt(0).toUpperCase()+l.slice(1)}return""},{__:ss}=wp.i18n,{Fragment:od,useEffect:wt}=wp.element,{useBlockProps:sd,BlockControls:ld}=wp.blockEditor,{ToolbarButton:ad}=wp.components,{apiFetch:nd}=wp,{applyFilters:Ks}=wp.hooks;yn();function rd(o){const{attributes:t,setAttributes:s,clientId:l}=o,{url:a,editingURL:n,fetching:c,cannotEmbed:r,interactive:u,embedHTML:i,height:d,width:m,contentShare:p,sharePosition:h,lockContent:x,customlogo:g,logoX:b,logoY:f,customlogoUrl:y,logoOpacity:P,customPlayer:v,playerPreset:w,adManager:j,adSource:$,adFileUrl:S,adWidth:_,adHeight:B,adXPosition:N,adYPosition:I,shareFacebook:R,shareTwitter:L,sharePinterest:J,shareLinkedin:W,instaLayout:V,cEmbedType:Z,cPopupButtonText:F,cPopupButtonBGColor:k,cPopupButtonTextColor:E,coverImageUrl:z,playlist:q}=t;wt(()=>{(!t.clientId||t.clientId!==l)&&s({clientId:l})},[l,t.clientId,s]),wt(()=>{if(a&&(!t.providerName||t.providerName==="")){let te=Js(a);if(!te){const Ee=a.match(/https?:\/\/(?:www\.)?([^.\/]+)\.(?:com|net|org|io|tv|co|fm|ly)/i);if(Ee!=null&&Ee[1]){const Te=Ee[1];te=Te.charAt(0).toUpperCase()+Te.slice(1)}}te&&s({providerName:te})}},[a,t.providerName,s]);const O=ye(t.clientId||l),Y=fs(a),T=bs(a),re=Ro(a),ie=ys(a),ue=Ho(a),xe=Ca(a),ne=_a(a),de=ka(a),M=$a(a),we=xs(a),ve=Pa(a),ke=xn(a),Ue=wn(a),Ie=vn(a),nt=jn(a),Ge=Sa(a),rt=cr(t),{youtubeParams:Le}=Qn(t,a),mt=jr(t),ht=za(t),Ut=Ua(t),It=Nr(t),po=qr(t),Gt=oi(t),Bt=ui(t),Rt=Ci(t),Ht=Di(t);wt(()=>{if(typeof window.embedpressGutenbergData<"u"&&!g){const te=window.embedpressGutenbergData;a.includes("youtube.com")||a.includes("youtu.be")?s({customlogo:te.youtube_brand_logo_url||""}):a.includes("vimeo.com")?s({customlogo:te.vimeo_brand_logo_url||""}):a.includes("wistia.com")?s({customlogo:te.wistia_brand_logo_url||""}):a.includes("twitch.com")?s({customlogo:te.twitch_brand_logo_url||""}):a.includes("dailymotion.com")&&s({customlogo:te.dailymotion_brand_logo_url||""})}},[a,g]),wt(()=>{Ie&&!z&&!q&&s({height:"200"}),Ie&&q&&s({height:"450"})},[a,z,q,Ie,s]),wt(()=>{(ie||ue||Y||ne||de)&&n&&s({height:"340"})},[a,n,ie,ue,Y,ne,de,s]);let pe="",se="",me=h||"right";p&&(pe="ep-content-share-enabled",se="ep-share-position-"+me);let gt="";v&&(gt=w||"preset-default");let oe="";re&&(oe="embedded-youtube-channel");let fe="";M&&(fe=V);let Re="";(we||ve)&&(Re=" source-opensea");let Ot="";if(Z==="popup_button"){let te=E,Ee=k;E&&!E.startsWith("#")&&(te="#"+E,s({cPopupButtonTextColor:te})),k&&!k.startsWith("#")&&(Ee="#"+k,s({cPopupButtonBGColor:Ee})),Ot=`
<div class="cbutton-preview-wrapper" style="margin-top:-${d}px">
<h4 class="cbutton-preview-text">Preview Popup Button</h4>
<div style="position: static" class="calendly-badge-widget">
<div class="calendly-badge-content" style="color: ${te}; background: ${Ee};">
${F}
</div>
</div>
</div>
`}let Vt="";de&&(Vt="<span class='ep-wistia-message'> Changes will be affected in frontend. </span>");let Qt="";p&&(Qt=Ba(h,R,L,J,W));const C=Ks("embedpress.customLogoComponent","",t);function uo(){s({editingURL:!0})}function Ft(){if(!i)return;let te=i.matchAll(/<script.*?src=["'](.*?)["'].*?><\/script>/g);te=[...te];for(const Ee of te)if(Ee&&typeof Ee[1]<"u"){const Te=Ee[1],Qe=ye(Te),He=document.getElementById(Qe);He&&He.remove();const Be=document.createElement("script");Be.type="text/javascript",Be.setAttribute("id",Qe),Be.setAttribute("src",Te),document.body.appendChild(Be)}}function Ss(te){te&&te.preventDefault(),a?(s({fetching:!0}),(async Te=>{let Qe={url:Te,width:m,height:d};Qe=Ks("embedpress_block_rest_param",Qe,t);const Et={url:`${(window.embedpressGutenbergData||{}).siteUrl||window.location.origin}/wp-json/embedpress/v1/oembed/embedpress`,method:"POST",data:Qe};return await nd(Et).then(Wo=>Wo).catch(Wo=>(console.error("EmbedPress API Error:",Wo),{error:!0}))})(a).then(Te=>{if(s({fetching:!1}),Te.data&&Te.data.status===404||!Te.embed||Te.error)s({cannotEmbed:!0,editingURL:!0});else{let Qe=Te.provider_name||Js(a);if(!Qe){const Be=a.match(/https?:\/\/(?:www\.)?([^.\/]+)\.(?:com|net|org|io|tv|co|fm|ly)/i);if(Be!=null&&Be[1]){const Et=Be[1];Qe=Et.charAt(0).toUpperCase()+Et.slice(1)}}let He=Te.embed;if(He&&He.includes("<iframe")&&!He.includes("title=")){const Be=He.match(/src=["'](.*?)["']/);if(Be&&Be[1]){const Et=K(Be[1]);Et&&(He=He.replace("<iframe",`<iframe title="${Et}"`))}}s({embedHTML:He,cannotEmbed:!1,editingURL:!1,providerName:Qe||""}),Ft()}})):s({cannotEmbed:!0,fetching:!1,editingURL:!0}),t.clientId&&a&&fn(t.clientId,a),v&&Fs(O,t),V==="insta-carousel"&&Cn(O,t)}wt(()=>{i&&!n&&!c&&Ft()},[i,n,c]),wt(()=>{if(i&&!n&&!c&&v&&t.clientId){const te=setTimeout(()=>{Fs(O,t)},300);return()=>clearTimeout(te)}},[O,v,i,n,c]),wt(()=>{const te=setTimeout(()=>{(!i||n)&&!c||Ss()},1500);return()=>{clearTimeout(te)}},[rt,Le,ht,Ut,mt,It,po,Gt,p,x,Bt,Rt,Ht]);const Vo=sd();return e.jsxs(od,{children:[e.jsx(Vi,{attributes:t,setAttributes:s,isYTChannel:re,isYTVideo:ie,isYTLive:ue,isYTShorts:xe,isOpensea:we,isOpenseaSingle:ve,isWistiaVideo:de,isVimeoVideo:ne,isSelfHostedVideo:Y,isSelfHostedAudio:T,isCalendly:ke,isTikTok:Ue,isSpreaker:Ie,isMeetup:Ge,isGooglePhotos:nt}),(!i||!!n)&&!c&&e.jsx("div",{...Vo,children:e.jsx(Je,{label:ss("EmbedPress - Embed anything from 250+ sites","embedpress"),onSubmit:Ss,value:a,cannotEmbed:r,onChange:te=>s({url:te.target.value}),icon:U,DocTitle:ss("Learn more about EmbedPress","embedpress"),docLink:"https://embedpress.com/docs/"})}),(!we||!!n||n===0)&&(!ve||!!n||n===0)&&(!ie&&!ue&&!xe||!!n||n===0)&&(!re||!!n||n===0)&&(!de||!!n||n===0)&&(!ne||!!n||n===0)&&(!ke||!!n||n===0)&&(!M||!!n||n===0)&&(!Ie||!!n||n===0)&&(!nt||!!n||n===0)&&c&&e.jsx("div",{className:Vo.className,children:e.jsx(Ne,{})}),i&&!n&&(!c||we||ve||re||ie||xe||de||ne||ke||M||Ie||nt)&&e.jsxs(e.Fragment,{children:[e.jsx(ld,{children:e.jsx(ad,{className:"components-edit-button",icon:"edit",label:ss("Edit URL","embedpress"),onClick:uo})}),e.jsx("figure",{...Vo,"data-source-id":"source-"+t.clientId,children:e.jsxs("div",{className:`gutenberg-block-wraper ${pe} ${se}${Re}`,children:[e.jsx(td,{className:`position-${me}-wraper ep-embed-content-wraper ${oe} ${gt} ${fe}`,style:{display:c&&!we&&!ve&&!re&&!ie&&!ue&&!xe&&!de&&!ne&&!ke&&!M&&!nt?"none":we||ve?"block":"inline-block",position:"relative"},...v?{"data-playerid":ye(t.clientId)}:{},...v?{"data-options":va({attributes:t})}:{},...V==="insta-carousel"?{"data-carouselid":ye(t.clientId)}:{},...V==="insta-carousel"?{"data-carousel-options":ja({attributes:t})}:{},dangerouslySetInnerHTML:{__html:i+C+Vt+Qt+Ot}}),j&&$==="image"&&S&&e.jsx("div",{className:"main-ad-template",style:{position:"absolute",bottom:`${I}%`,left:`${N}%`,width:`${_}px`,height:`${B}px`,backgroundImage:`url(${S})`,backgroundSize:"cover",backgroundPosition:"center",zIndex:10},children:e.jsx("div",{style:{width:"100%",height:"100%"},children:e.jsx("img",{src:S,alt:"Advertisement",style:{width:"100%",height:"100%",objectFit:"cover"}})})}),c&&e.jsx("div",{style:{filter:"grayscale(1)",backgroundColor:"#fffafa",opacity:"0.7"},className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})}),!we&&!ve&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]})})]}),e.jsx(La,{attributes:t}),j&&$==="image"&&e.jsx("style",{children:`
[data-source-id="source-${t.clientId}"] .main-ad-template div,
.main-ad-template div img {
height: 100%;
}
[data-source-id="source-${t.clientId}"] .main-ad-template {
position: absolute;
bottom: ${I}%;
left: ${N}%;
}
`})]})}const id="https://schemas.wp.org/trunk/block.json",dd="EmbedPress",cd="embedpress/embedpress",pd="embedpress",ud="Embed content from 250+ providers with advanced customization options including YouTube, Vimeo, Google Docs, social media, and more.",md=3,hd="embedpress",gd="embedpress-blocks-editor",fd="embedpress-blocks-editor-style",bd="embedpress-blocks-style",yd={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},xd={$schema:id,title:dd,name:cd,category:pd,description:ud,apiVersion:md,textdomain:hd,editorScript:gd,editorStyle:fd,style:bd,supports:yd};var oa;const wd={clientId:{type:"string"},url:{type:"string",default:""},providerName:{type:"string",default:""},embedHTML:{type:"string",default:""},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"600"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1},editingURL:{type:"boolean",default:!0},fetching:{type:"boolean",default:!1},cannotEmbed:{type:"boolean",default:!1},interactive:{type:"boolean",default:!1},align:{type:"string",default:"center"},customPlayer:{type:"boolean",default:!1},playerPreset:{type:"string",default:"preset-default"},playerColor:{type:"string",default:"#5b4e96"},autoPause:{type:"boolean",default:!1},posterThumbnail:{type:"string",default:""},playerPip:{type:"boolean",default:!0},playerRestart:{type:"boolean",default:!0},playerRewind:{type:"boolean",default:!1},playerFastForward:{type:"boolean",default:!1},playerTooltip:{type:"boolean",default:!0},playerHideControls:{type:"boolean",default:!1},playerDownload:{type:"boolean",default:!0},pVolume:{type:"number",default:1},playbackSpeed:{type:"number",default:1},showProgress:{type:"boolean",default:!0},showCurrentTime:{type:"boolean",default:!0},showDuration:{type:"boolean",default:!0},showMute:{type:"boolean",default:!0},showVolume:{type:"boolean",default:!0},showCaptions:{type:"boolean",default:!0},showFullscreen:{type:"boolean",default:!0},showPictureInPicture:{type:"boolean",default:!0},showSettings:{type:"boolean",default:!0},showPlaybackSpeed:{type:"boolean",default:!0},showRestart:{type:"boolean",default:!0},showSeek:{type:"boolean",default:!0},showLoop:{type:"boolean",default:!0},ispagination:{type:"boolean",default:!0},ytChannelLayout:{type:"string",default:"gallery"},pagesize:{type:"string",default:"6"},columns:{type:"string",default:"3"},gapbetweenvideos:{type:"number",default:30},videosize:{type:"string",default:"fixed"},starttime:{type:"string"},endtime:{type:"string"},autoplay:{type:"boolean",default:!1},muteVideo:{type:"boolean",default:!0},controls:{type:"string"},fullscreen:{type:"boolean",default:!0},videoannotations:{type:"boolean",default:!0},progressbarcolor:{type:"string",default:"red"},closedcaptions:{type:"boolean",default:!0},modestbranding:{type:"string"},relatedvideos:{type:"boolean",default:!0},vstarttime:{type:"string"},vautoplay:{type:"boolean",default:!1},vscheme:{type:"string"},vtitle:{type:"boolean",default:!0},vauthor:{type:"boolean",default:!0},vavatar:{type:"boolean",default:!0},vloop:{type:"boolean",default:!1},vautopause:{type:"boolean",default:!1},vdnt:{type:"boolean",default:!1},wstarttime:{type:"string"},wautoplay:{type:"boolean",default:!0},scheme:{type:"string"},captions:{type:"boolean",default:!0},playbutton:{type:"boolean",default:!0},smallplaybutton:{type:"boolean",default:!0},playbar:{type:"boolean",default:!0},resumable:{type:"boolean",default:!0},wistiafocus:{type:"boolean",default:!0},volumecontrol:{type:"boolean",default:!0},volume:{type:"number",default:100},rewind:{type:"boolean",default:!1},wfullscreen:{type:"boolean",default:!0},instafeedFeedType:{type:"string",default:"user_account_type"},instafeedAccountType:{type:"string",default:"default"},instafeedProfileImage:{type:"boolean",default:!0},instafeedProfileImageUrl:{type:"string",default:""},instafeedFollowBtn:{type:"boolean",default:!0},instafeedFollowBtnLabel:{type:"string",default:"Follow"},instafeedPostsCount:{type:"boolean",default:!0},instafeedPostsCountText:{type:"string",default:"[count] posts"},instafeedFollowersCount:{type:"boolean",default:!0},instafeedFollowersCountText:{type:"string",default:"[count] followers"},instafeedAccName:{type:"boolean",default:!0},instaLayout:{type:"string",default:"insta-grid"},instafeedColumns:{type:"string",default:"3"},instafeedColumnsGap:{type:"string",default:"5"},instafeedPostsPerPage:{type:"string",default:"12"},instafeedTab:{type:"boolean",default:!0},instafeedLikesCount:{type:"boolean",default:!0},instafeedCommentsCount:{type:"boolean",default:!0},instafeedPopup:{type:"boolean",default:!0},instafeedPopupFollowBtn:{type:"boolean",default:!0},instafeedPopupFollowBtnLabel:{type:"string",default:"Follow"},instafeedLoadmore:{type:"boolean",default:!0},instafeedLoadmoreLabel:{type:"string",default:"Load More"},slidesShow:{type:"string",default:"4"},slidesScroll:{type:"string",default:"4"},carouselAutoplay:{type:"boolean",default:!1},autoplaySpeed:{type:"string",default:"3000"},transitionSpeed:{type:"string",default:"1000"},carouselLoop:{type:"boolean",default:!0},carouselArrows:{type:"boolean",default:!0},carouselSpacing:{type:"string",default:"0"},carouselDots:{type:"boolean",default:!1},cEmbedType:{type:"string",default:"inline"},calendlyData:{type:"boolean",default:!1},hideCookieBanner:{type:"boolean",default:!1},hideEventTypeDetails:{type:"boolean",default:!1},cBackgroundColor:{type:"string",default:"ffffff"},cTextColor:{type:"string",default:"1A1A1A"},cButtonLinkColor:{type:"string",default:"0000FF"},cPopupButtonText:{type:"string",default:"Schedule time with me"},cPopupButtonBGColor:{type:"string",default:"0000FF"},cPopupButtonTextColor:{type:"string",default:"FFFFFF"},cPopupLinkText:{type:"string",default:"Schedule time with me"},theme:{type:"string",default:"light"},color:{type:"string",default:""},coverImageUrl:{type:"string",default:""},playlist:{type:"boolean",default:!1},playlistContinuous:{type:"boolean",default:!1},playlistLoop:{type:"boolean",default:!1},playlistAutoupdate:{type:"boolean",default:!0},chaptersImage:{type:"boolean",default:!0},episodeImagePosition:{type:"string",default:"right"},hideLikes:{type:"boolean",default:!1},hideComments:{type:"boolean",default:!1},hideSharing:{type:"boolean",default:!1},hideLogo:{type:"boolean",default:!1},hideEpisodeDescription:{type:"boolean",default:!1},hidePlaylistDescriptions:{type:"boolean",default:!1},hidePlaylistImages:{type:"boolean",default:!1},hideDownload:{type:"boolean",default:!1},mode:{type:"string",default:"carousel"},imageWidth:{type:"number",default:800},imageHeight:{type:"number",default:600},playerAutoplay:{type:"boolean",default:!1},delay:{type:"number",default:5},repeat:{type:"boolean",default:!0},mediaitemsAspectRatio:{type:"boolean",default:!0},mediaitemsEnlarge:{type:"boolean",default:!1},mediaitemsStretch:{type:"boolean",default:!1},mediaitemsCover:{type:"boolean",default:!1},backgroundColor:{type:"string",default:"#000000"},expiration:{type:"number",default:60},showTitle:{type:"boolean",default:!0},photos_link:{type:"boolean",default:!0},limit:{type:"number",default:20},itemperpage:{type:"number",default:9},loadmore:{type:"boolean",default:!1},loadmorelabel:{type:"text",default:"Load More"},orderby:{type:"string",default:"desc"},gapbetweenitem:{type:"number",default:30},layout:{type:"string",default:"ep-grid"},preset:{type:"string",default:"preset-default"},nftperrow:{type:"number",default:3},collectionname:{type:"boolean",default:!0},nftimage:{type:"boolean",default:!0},nfttitle:{type:"boolean",default:!0},nftcreator:{type:"boolean",default:!0},prefix_nftcreator:{type:"string",default:"Created By"},nftprice:{type:"boolean",default:!0},prefix_nftprice:{type:"string",default:"Current Price"},nftlastsale:{type:"boolean",default:!0},prefix_nftlastsale:{type:"string",default:"Last Sale"},nftbutton:{type:"boolean",default:!0},nftrank:{type:"boolean",default:!0},label_nftrank:{type:"string",default:"Rank"},nftdetails:{type:"boolean",default:!0},label_nftdetails:{type:"string",default:"Details"},label_nftbutton:{type:"string",default:"See Details"},alignment:{type:"string",default:"ep-item-center"},itemBGColor:{type:"string"},collectionNameColor:{type:"string"},collectionNameFZ:{type:"number"},titleColor:{type:"string"},titleFontsize:{type:"number"},creatorColor:{type:"string"},creatorFontsize:{type:"number"},creatorLinkColor:{type:"string"},creatorLinkFontsize:{type:"number"},priceLabelColor:{type:"string"},priceLabelFontsize:{type:"number"},priceColor:{type:"string"},priceFontsize:{type:"number"},priceUSDColor:{type:"string"},priceUSDFontsize:{type:"number"},lastSaleLabelColor:{type:"string"},lastSaleLabelFontsize:{type:"number"},lastSaleColor:{type:"string"},lastSaleFontsize:{type:"number"},lastSaleUSDColor:{type:"string"},lastSaleUSDFontsize:{type:"number"},buttonTextColor:{type:"string"},buttonBackgroundColor:{type:"string"},buttonTextFontsize:{type:"number"},loadmoreTextColor:{type:"string"},loadmoreBackgroundColor:{type:"string"},loadmoreTextFontsize:{type:"number"},rankBtnColor:{type:"string"},rankBtnBorderColor:{type:"string"},rankBtnFZ:{type:"number"},rankLabelColor:{type:"string"},rankLabelFZ:{type:"number"},detialTitleColor:{type:"string"},detialTitleFZ:{type:"number"},detailTextColor:{type:"string"},detailTextLinkColor:{type:"string"},detailTextFZ:{type:"number"},customlogo:{type:"string",default:((oa=embedpressGutenbergData==null?void 0:embedpressGutenbergData.brandingLogos)==null?void 0:oa.document)||""},logoX:{type:"number",default:5},logoY:{type:"number",default:10},customlogoUrl:{type:"string"},logoOpacity:{type:"number",default:.6},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."},meetupOrderBy:{type:"string",default:"date"},meetupOrder:{type:"string",default:"ASC"},meetupPerPage:{type:"number",default:10},meetupEnablePagination:{type:"boolean",default:!0},meetupTimezone:{type:"string",default:"visitor_timezone"},meetupDateFormat:{type:"string",default:"wp_date_format"},meetupTimeFormat:{type:"string",default:"wp_time_format"}},{registerBlockType:vd}=wp.blocks,co=(o,t)=>{typeof embedpressGutenbergData<"u"&&embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks.embedpress||typeof embedpressGutenbergData>"u"||typeof embedpressGutenbergData<"u"&&!embedpressGutenbergData.activeBlocks?vd(o.name,{...o,...t}):console.warn("EmbedPress: Block not registered - disabled in settings",o.name)},{__:vt}=wp.i18n;co(xd,{icon:U,attributes:wd,keywords:[vt("embed","embedpress"),vt("embedpress","embedpress"),vt("video","embedpress"),vt("social","embedpress"),vt("youtube","embedpress"),vt("vimeo","embedpress"),vt("google docs","embedpress"),vt("pdf","embedpress")],edit:rd,save:Tn});Vr();Xn();rr();xr();Br();ei();ci();vi();Fi();const{Fragment:of}=wp.element;function _e({attributes:o}){const{sharePosition:t,shareFacebook:s,shareTwitter:l,sharePinterest:a,shareLinkedin:n,pageUrl:c,customTitle:r="",customDescription:u="",customThumbnail:i=""}=o,d=encodeURIComponent(c||window.location.href),m=encodeURIComponent(r),p=encodeURIComponent(u),h=encodeURIComponent(i),x=`https://www.facebook.com/sharer/sharer.php?u=${d}`,g=`https://twitter.com/intent/tweet?url=${d}&text=${m}`,b=`http://pinterest.com/pin/create/button/?url=${d}&media=${h}&description=${p}`,f=`https://www.linkedin.com/shareArticle?mini=true&url=${d}`;return e.jsxs("div",{className:`ep-social-share share-position-${t}`,children:[s!==!1&&e.jsx("a",{href:x,className:"ep-social-icon facebook",target:"_blank",rel:"noopener noreferrer",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 -6 512 512",children:e.jsxs("g",{children:[e.jsx("path",{fill:"#475a96",d:"M0 0h512v500H0z"}),e.jsx("path",{fill:"#fff",d:"M375.717 112.553H138.283c-8.137 0-14.73 6.594-14.73 14.73v237.434c0 8.135 6.594 14.73 14.73 14.73h127.826V276.092h-34.781v-40.28h34.781v-29.705c0-34.473 21.055-53.244 51.807-53.244 14.73 0 27.391 1.097 31.08 1.587v36.026l-21.328.01c-16.725 0-19.963 7.947-19.963 19.609v25.717h39.887l-5.193 40.28h-34.693v103.355h68.012c8.135 0 14.73-6.596 14.73-14.73V127.283c-.001-8.137-6.596-14.73-14.731-14.73z"})]})})}),l!==!1&&e.jsx("a",{href:g,className:"ep-social-icon twitter",target:"_blank",rel:"noopener noreferrer",children:e.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",fill:"#fff",class:"r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-lrsllp r-1nao33i r-16y2uox r-8kz0gk",children:e.jsx("g",{children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})})}),a!==!1&&e.jsx("a",{href:b,className:"ep-social-icon pinterest",target:"_blank",rel:"noopener noreferrer",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1200",height:"800",viewBox:"-36.42 -60.8 315.641 364.8",children:e.jsx("path",{fill:"#fff",d:"M121.5 0C54.4 0 0 54.4 0 121.5 0 173 32 217 77.2 234.7c-1.1-9.6-2-24.4.4-34.9 2.2-9.5 14.2-60.4 14.2-60.4s-3.6-7.3-3.6-18c0-16.9 9.8-29.5 22-29.5 10.4 0 15.4 7.8 15.4 17.1 0 10.4-6.6 26-10.1 40.5-2.9 12.1 6.1 22 18 22 21.6 0 38.2-22.8 38.2-55.6 0-29.1-20.9-49.4-50.8-49.4-34.6 0-54.9 25.9-54.9 52.7 0 10.4 4 21.6 9 27.7 1 1.2 1.1 2.3.8 3.5-.9 3.8-3 12.1-3.4 13.8-.5 2.2-1.8 2.7-4.1 1.6-15.2-7.1-24.7-29.2-24.7-47.1 0-38.3 27.8-73.5 80.3-73.5 42.1 0 74.9 30 74.9 70.2 0 41.9-26.4 75.6-63 75.6-12.3 0-23.9-6.4-27.8-14 0 0-6.1 23.2-7.6 28.9-2.7 10.6-10.1 23.8-15.1 31.9 11.4 3.5 23.4 5.4 36 5.4 67.1 0 121.5-54.4 121.5-121.5C243 54.4 188.6 0 121.5 0z"})})}),n!==!1&&e.jsx("a",{href:f,className:"ep-social-icon linkedin",target:"_blank",rel:"noopener noreferrer",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800",fill:"#fff",version:"1.1",viewBox:"0 0 310 310",xmlSpace:"preserve",children:e.jsxs("g",{children:[e.jsx("path",{d:"M72.16 99.73H9.927a5 5 0 00-5 5v199.928a5 5 0 005 5H72.16a5 5 0 005-5V104.73a5 5 0 00-5-5z"}),e.jsx("path",{d:"M41.066.341C18.422.341 0 18.743 0 41.362 0 63.991 18.422 82.4 41.066 82.4c22.626 0 41.033-18.41 41.033-41.038C82.1 18.743 63.692.341 41.066.341z"}),e.jsx("path",{d:"M230.454 94.761c-24.995 0-43.472 10.745-54.679 22.954V104.73a5 5 0 00-5-5h-59.599a5 5 0 00-5 5v199.928a5 5 0 005 5h62.097a5 5 0 005-5V205.74c0-33.333 9.054-46.319 32.29-46.319 25.306 0 27.317 20.818 27.317 48.034v97.204a5 5 0 005 5H305a5 5 0 005-5V194.995c0-49.565-9.451-100.234-79.546-100.234z"})]})})})]})}const{useState:jt,useEffect:sf,useRef:jd}=wp.element,Ke=()=>{embedpressGutenbergData.is_embedpress_feedback_submited;const o=!!Number(embedpressGutenbergData.turn_off_rating_help),[t,s]=jt(()=>localStorage.getItem("ratingClosed")==="true"),[l,a]=jt(5),[n,c]=jt(!1),[r,u]=jt(!1),[i,d]=jt(!1),[m,p]=jt(0),[h,x]=jt(!1),[g,b]=jt("");jd(null),embedpressGutenbergData.currentUser;const f=embedpressGutenbergData.isProPluginActive,y=embedpressGutenbergData.adminUrl?embedpressGutenbergData.adminUrl+"admin.php?page=embedpress-analytics":"/wp-admin/admin.php?page=embedpress-analytics";return o?e.jsxs("div",{className:`plugin-rating${o?"":" turn_off_ratting_help"}`,children:[o&&!1,e.jsxs("div",{className:"analytics-section-container",children:[e.jsx("div",{className:"analytics-chart",children:e.jsx(Ia,{size:70})}),e.jsxs("div",{className:"analytics-content",children:[e.jsx("h3",{children:"Advanced Analytics"}),e.jsx("p",{children:"Get full analytics on how your embeds are performing."}),e.jsxs("a",{href:y,className:"view-analytics-link",target:"_blank",children:["View Analytics",e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]}),e.jsxs("frameElement",{children:[e.jsx("p",{children:"Need help? We're here"}),e.jsxs("a",{href:"https://embedpress.com/?support=chat",target:"_blank",className:"chat-button",children:[e.jsxs("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxs("g",{"clip-path":"url(#a)",fill:"#fff",children:[e.jsx("path",{d:"M7.93.727H1.555C.97.727.5 1.198.5 1.782V6c0 .584.471 1.055 1.055 1.055h.351V8.11c0 .254.263.438.52.31.008-.008.022-.008.029-.015 1.934-1.297 1.5-1.008 1.933-1.294a.35.35 0 0 1 .19-.056H7.93c.583 0 1.054-.47 1.054-1.055V1.782c0-.584-.47-1.055-1.054-1.055M5.117 4.946h-2.86c-.463 0-.465-.703 0-.703h2.86c.464 0 .466.703 0 .703m2.11-1.406h-4.97c-.463 0-.465-.704 0-.704h4.97c.463 0 .465.704 0 .704"}),e.jsx("path",{d:"M11.445 3.54H9.687V6c0 .97-.787 1.758-1.757 1.758H4.684l-.668.443v.612c0 .584.47 1.055 1.054 1.055h3.457l2.018 1.35c.276.153.549-.033.549-.296V9.868h.351c.584 0 1.055-.471 1.055-1.055V4.594c0-.583-.471-1.054-1.055-1.054"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M.5 0h12v12H.5z"})})})]}),"Let’s Chat"]})]}),!f&&e.jsxs("div",{className:"upgrade-box",children:[e.jsx("h5",{children:"Want to explore more?"}),e.jsx("p",{children:"Dive in and discover all the premium features"}),e.jsx("a",{href:"https://embedpress.com/in/unlock-gutenberg-controls",target:"_blank",className:"upgrade-link",children:"Upgrade to PRO"})]})]}):null},{__:Cd}=wp.i18n,{applyFilters:Qs}=wp.hooks,{TextControl:lf,RangeControl:af,PanelBody:_d,Button:nf}=wp.components,{MediaUpload:rf}=wp.blockEditor;function Ra({attributes:o,setAttributes:t}){const{customlogo:s,logoX:l,logoY:a,customlogoUrl:n,logoOpacity:c}=o;embedpressGutenbergData.isProPluginActive,document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const r=Qs("embedpress.uploadPlaceholder",[]);return e.jsx(_d,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Cd("Custom Branding","embedpress")]}),initialOpen:!1,children:Qs("embedpress.customLogoSettings",[r],o,t)})}const{__:Ct}=wp.i18n,{Fragment:kd}=wp.element,{applyFilters:yo}=wp.hooks,{PanelBody:$d,ToggleControl:ls,SelectControl:As,TextControl:Pd,ColorPalette:Sd}=wp.components,Ld=({attributes:o,setAttributes:t})=>{const{docViewer:s,themeMode:l,customColor:a,presentation:n,position:c,download:r,draw:u,toolbar:i,copy_text:d,doc_rotation:m,powered_by:p,href:h}=o;document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(Xe()),Ze());const x=[{name:"",color:"#823535"},{name:"",color:"#008000"},{name:"",color:"#403A81"},{name:"",color:"#333333"},{name:"",color:"#000264"}],g=yo("embedpress.togglePlaceholder",[],Ct("Toolbar","embedpress"),!0),b=yo("embedpress.togglePlaceholder",[],Ct("Print/Download","embedpress"),!0);return e.jsxs($d,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Ct("Document Controls","embedpress")]}),initialOpen:!1,children:[e.jsx(Pd,{label:Ct("Document URL","embedpress"),type:"text",value:h||"",onChange:f=>t({href:f})}),e.jsx(As,{label:"Viewer",value:s,options:[{label:"Custom",value:"custom"},{label:"MS Office",value:"office"},{label:"Google",value:"google"}],onChange:f=>t({docViewer:f}),__nextHasNoMarginBottom:!0}),s==="custom"&&e.jsx(As,{label:"Theme",value:l,options:[{label:"System Default",value:"default"},{label:"Dark",value:"dark"},{label:"Light",value:"light"},{label:"Custom",value:"custom"}],onChange:f=>t({themeMode:f}),__nextHasNoMarginBottom:!0}),l==="custom"&&s==="custom"&&e.jsxs("div",{className:"ep-docs-viewer-colors",children:[e.jsx(G,{headerText:"Color"}),e.jsx(Sd,{label:Ct("Color"),colors:x,value:a,onChange:f=>t({customColor:f})})]}),s==="custom"&&yo("embedpress.documentControls",[g],o,t,"toolbar"),i&&s==="custom"&&e.jsxs(kd,{children:[e.jsx(ls,{label:Ct("Fullscreen","embedpress"),onChange:f=>t({presentation:f}),checked:n}),yo("embedpress.documentControls",[b],o,t,"print"),e.jsx(ls,{label:Ct("Draw","embedpress"),onChange:f=>t({draw:f}),checked:u}),e.jsx(ls,{label:Ct("Powered By"),onChange:f=>t({powered_by:f}),checked:p})]})]})},{__:xo}=wp.i18n,{useState:df,useEffect:cf,Fragment:pf}=wp.element,{BlockControls:uf,BlockIcon:mf,MediaPlaceholder:hf,InspectorControls:Td,useBlockProps:gf}=wp.blockEditor,{ToolbarButton:ff,PanelBody:Bd,ExternalLink:bf,ToggleControl:yf,TextControl:el,SelectControl:xf,RadioControl:Fd,ColorPalette:wf,Tooltip:Ed}=wp.components,Dd=({attributes:o,setAttributes:t})=>{const{unitoption:s,width:l,height:a}=o;return e.jsxs(Td,{children:[e.jsx(Bd,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",xo("Embed Size","embedpress")]}),className:"embedpress-documents-control",children:e.jsxs("div",{className:"ep-controls-margin",children:[e.jsxs("div",{className:"ep-pdf-width-contol",children:[e.jsx(Fd,{selected:s,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:n=>t({unitoption:n}),className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(el,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[xo("Width"),e.jsx(Ed,{text:xo("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),type:"number",value:l,onChange:n=>t({width:n})})})]}),e.jsx(el,{label:xo("Height","embedpress"),value:a,type:"number",onChange:n=>t({height:n})})]})}),e.jsx(Ld,{attributes:o,setAttributes:t}),e.jsx(Ra,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(Ke,{})]})},Ha=({attributes:o})=>{const{id:t,themeMode:s,customColor:l}=o;let a="#f2f2f6";return l&&$n(l)>60&&(a="#343434"),e.jsx("style",{children:s==="custom"&&`
[data-id='${t}'][data-theme-mode='custom'] {
--viewer-primary-color: ${l};
--viewer-icons-color: ${a};
--viewer-icons-hover-bgcolor: ${Pn(l,-10)};
}
`})},Oa=({href:o,id:t,width:s,height:l,setFetching:a,unitoption:n,title:c})=>e.jsx("div",{className:`embedpress-embed-document-pdf ${t}`,style:{height:l+"px",width:s+n},"data-emid":t,children:e.jsx("embed",{title:c,src:A(o),style:{height:l+"px",width:s+n,maxWidth:"100%"},onLoad:()=>a(!1)})}),Va=({href:o,url:t,docViewer:s,width:l,height:a,unitoption:n,themeMode:c,customColor:r,id:u,download:i,draw:d,toolbar:m,presentation:p,setShowOverlay:h,setFetching:x,loadPdf:g,fetching:b,title:f})=>e.jsxs("div",{className:`${s==="custom"?"ep-file-download-option-masked ":""}ep-gutenberg-file-doc ep-powered-by-enabled${i?" enabled-file-download":""}`,"data-theme-mode":c,"data-custom-color":r,"data-id":u,children:[e.jsx("iframe",{title:f,src:A(t),style:{height:a+"px",width:l+n},allowFullScreen:!0,onLoad:()=>x(!1),onMouseUp:()=>h(!1)}),d&&s==="custom"&&e.jsx("canvas",{className:"ep-doc-canvas",width:l,height:a}),m&&s==="custom"&&e.jsxs("div",{className:"ep-external-doc-icons",children:[!qo(o)&&an(),i&&qo(o)&&rn(),i&&qo(o)&&nn(),d&&pn(),p&&dn(),p&&cn()]})]}),{BlockIcon:Nd,MediaPlaceholder:Md}=wp.blockEditor,{ExternalLink:zd}=wp.components,{__:tl}=wp.i18n,Ud=["application/pdf","application/msword","application/vnd.ms-powerpoint","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],Id=({onSelect:o,onError:t,notices:s})=>e.jsx("div",{className:"embedpress-document-editmode",children:e.jsx(Md,{icon:e.jsx(Nd,{icon:ga}),labels:{title:tl("Document","embedpress"),instructions:tl("Upload a file or pick one from your media library for embed.","embedpress")},onSelect:o,notices:s,allowedTypes:Ud,onError:t,children:e.jsx("div",{className:"components-placeholder__learn-more embedpress-doc-link",children:e.jsx(zd,{href:"https://embedpress.com/docs/embed-document/",children:"Learn more about Embedded document"})})})}),{useState:wo,useEffect:ol}=wp.element,{__:Gd}=wp.i18n,{getBlobByURL:Rd,isBlobURL:Hd,revokeBlobURL:Od}=wp.blob,{useBlockProps:Vd,BlockIcon:vf,MediaPlaceholder:jf,InspectorControls:Cf,BlockControls:Wd}=wp.blockEditor,{ExternalLink:_f,ToolbarButton:qd}=wp.components,{applyFilters:Yd}=wp.hooks,Zd=({attributes:o,mediaUpload:t,noticeOperations:s,isSelected:l,setAttributes:a,clientId:n,noticeUI:c})=>{const{href:r,mime:u,id:i,unitoption:d,width:m,height:p,docViewer:h,themeMode:x,customColor:g,presentation:b=!0,position:f="bottom",download:y=!0,draw:P=!0,toolbar:v,powered_by:w,adManager:j,adSource:$,adFileUrl:S,sharePosition:_,contentShare:B,customlogo:N}=o,[I,R]=wo(!1),[L,J]=wo(!1),[W,V]=wo(!0),[Z,F]=wo(!0),k=Vd();ol(()=>{if(Hd(r)){const Y=Rd(r);t({filesList:[Y],onFileChange:([T])=>E(T),onError:T=>{R(!0),s.createErrorNotice(T)}}),Od(r)}r&&u==="application/pdf"&&Z&&(F(!1),typeof PDFObject<"u"&&PDFObject.embed(r,`.${i}`))},[r,u,i]),ol(()=>{l||V(!0)},[l]);const E=Y=>{Y!=null&&Y.url&&(R(!1),a({href:Y.url,fileName:Y.title,id:"embedpress-pdf-"+Date.now(),mime:Y.mime,powered_by:w}),Y.mime==="application/pdf"&&(F(!1),typeof PDFObject<"u"&&PDFObject.embed(Y.url,`.${i}`)),n&&Y.url&&Tt(n,Y.url))},z=Y=>{s.removeAllNotices(),s.createErrorNotice(Y)},q=()=>h==="google"?`//docs.google.com/gview?embedded=true&url=${r}`:`//view.officeapps.live.com/op/embed.aspx?src=${r}`;if(!r||I)return e.jsx("div",{...k,children:e.jsx(Id,{onSelect:E,onError:z,notices:c})});const O=Yd("embedpress.customLogoComponent","",o);return e.jsxs("div",{...k,children:[e.jsx(Wd,{children:e.jsx(qd,{icon:"edit",label:Gd("Re Upload","embedpress"),onClick:()=>a({href:""})})}),L&&u!=="application/pdf"&&e.jsx(Ne,{}),e.jsxs("div",{className:`embedpress-document-embed ep-doc-${i}`,style:{height:p,width:m},children:[e.jsxs("div",{className:`position-${_}-wraper gutenberg-doc-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[u==="application/pdf"?e.jsx(Oa,{href:r,id:i,width:m,height:p,unitoption:d,setFetching:J,title:K(r,o.fileName)}):e.jsx(Va,{href:r,url:q(),docViewer:h,width:m,height:p,unitoption:d,themeMode:x,customColor:g,id:i,download:y,draw:P,toolbar:v,presentation:b,setShowOverlay:V,setFetching:J,loadPdf:Z,fetching:L,title:K(r,o.fileName)}),B&&e.jsx(_e,{attributes:o})]}),O&&e.jsx("div",{className:"custom-logo-container",dangerouslySetInnerHTML:{__html:O}}),w&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),W&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>V(!1)}),e.jsx(Ha,{attributes:o})]}),j&&$==="image"&&S&&e.jsx(Ce,{attributes:o,setAttributes:a,deleteIcon:!0,progressBar:!0,inEditor:!0})]}),e.jsx(Dd,{attributes:o,setAttributes:a})]})},Xd="https://schemas.wp.org/trunk/block.json",Jd="EmbedPress Document",Kd="embedpress/document",Qd="embedpress",Ad="Embed documents like PDF, DOC, PPT, XLS with advanced customization options including viewer styles, toolbar controls, and content protection.",ec=2,tc="embedpress",oc="embedpress-blocks-editor",sc="embedpress-blocks-editor-style",lc="embedpress-blocks-style",ac={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},nc={$schema:Xd,title:Jd,name:Kd,category:Qd,description:Ad,apiVersion:ec,textdomain:tc,editorScript:oc,editorStyle:sc,style:lc,supports:ac};console.log("embedpressGutenbergData",embedpressGutenbergData);var sa;const rc={id:{type:"string"},href:{type:"string"},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"600"},fileName:{type:"string"},mime:{type:"string"},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.embedpress_powered_by<"u"?embedpressGutenbergData.embedpress_powered_by:!0},presentation:{type:"boolean",default:!0},docViewer:{type:"string",default:"custom"},themeMode:{type:"string",default:"default"},customColor:{type:"string",default:"#403A81"},position:{type:"string",default:"top"},download:{type:"boolean",default:!0},open:{type:"boolean",default:!1},copy_text:{type:"boolean",default:!0},draw:{type:"boolean",default:!0},toolbar:{type:"boolean",default:!0},doc_rotation:{type:"boolean",default:!0},customlogo:{type:"string",default:((sa=embedpressGutenbergData==null?void 0:embedpressGutenbergData.brandingLogos)==null?void 0:sa.document)||""},logoX:{type:"number",default:5},logoY:{type:"number",default:10},customlogoUrl:{type:"string"},logoOpacity:{type:"number",default:.6},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},ic={attributes:{href:"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",fileName:"Sample Document",mime:"application/pdf",width:600,height:600,unitoption:"%",docViewer:"custom",themeMode:"default",toolbar:!0,presentation:!0,download:!0,copy_text:!0,draw:!0,powered_by:!0,viewerStyle:"modern",position:"top",doc_rotation:!0,add_text:!0,add_image:!0,doc_details:!0}},{useBlockProps:dc}=wp.blockEditor,{applyFilters:cc}=wp.hooks,pc=({attributes:o,setAttributes:t})=>{const s=dc.save(),{href:l,mime:a,id:n,unitoption:c,width:r,height:u,powered_by:i,fileName:d,docViewer:m,themeMode:p,customColor:h,presentation:x=!0,position:g="bottom",download:b=!0,draw:f=!0,toolbar:y,doc_rotation:P,clientId:v,sharePosition:w,contentShare:j,adManager:$,adSource:S,adFileUrl:_,adXPosition:B,adYPosition:N,customlogo:I}=o;if(!l)return null;new URLSearchParams({theme_mode:p,...p==="custom"&&{custom_color:h||"#343434"},presentation:x,position:g,download:b,draw:f}).toString();const R=cc("embedpress.customLogoComponent","",o),L=()=>m==="google"?`//docs.google.com/gview?embedded=true&url=${l}`:`//view.officeapps.live.com/op/embed.aspx?src=${l}`,J=ye(v||"");return e.jsx("div",{...s,children:e.jsx("div",{id:`ep-gutenberg-content-${J}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:`embedpress-document-embed ep-doc-${n}`,style:{height:u,width:r},"data-embed-type":"Document",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${w}-wraper gutenberg-doc-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[a==="application/pdf"?e.jsx(Oa,{href:l,id:n,width:r,height:u,unitoption:c,setFetching:!1,title:K(l,d)}):e.jsx(Va,{href:l,url:L(),docViewer:m,width:r,height:u,themeMode:p,customColor:h,id:n,download:b,draw:f,toolbar:y,presentation:x,setFetching:!1,title:K(l,d)}),j&&e.jsx(_e,{attributes:o})]}),R&&e.jsx("div",{className:"custom-logo-container",dangerouslySetInnerHTML:{__html:R}}),i&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx(Ha,{attributes:o})]}),$&&S==="image"&&_&&e.jsx(Ce,{attributes:o,setAttributes:t,deleteIcon:!0,progressBar:!0,inEditor:!0})]})})})})},{__:Zt}=wp.i18n;co(nc,{icon:ga,attributes:rc,example:ic,keywords:[Zt("embedpress","embedpress"),Zt("document","embedpress"),Zt("pdf","embedpress"),Zt("doc","embedpress"),Zt("ppt","embedpress"),Zt("xls","embedpress")],edit:Zd,save:pc});const{__:kf}=wp.i18n,{Fragment:$f}=wp.element,{Button:Pf,Toolbar:Sf}=wp.components,{BlockControls:Lf}=wp.blockEditor,{TextControl:sl,PanelBody:ll,ToggleControl:al,ToolbarButton:uc}=wp.components,{InspectorControls:mc,useBlockProps:nl,BlockControls:hc}=wp.blockEditor,{Fragment:gc,useEffect:fc}=wp.element,{__:qe}=wp.i18n;function bc({attributes:o,className:t,setAttributes:s,isSelected:l}){const{url:a,editingURL:n,fetching:c,cannotEmbed:r,embedHTML:u,height:i,width:d,powered_by:m,is_public:p,align:h,interactive:x}=o,g=nl?nl({className:"align"+h,style:{width:d+"px",height:i+"px"}}):[];fc(()=>{!l&&x&&s({interactive:!1})},[l,x]);function b(){s({editingURL:!0,is_public:!0})}function f(){s({fetching:!1})}function y(){s({interactive:!0})}function P(w){w&&w.preventDefault(),a?(s({fetching:!0}),setTimeout(()=>{s({fetching:!1,cannotEmbed:!1,editingURL:!1,embedHTML:"ready"})},500)):s({cannotEmbed:!0,fetching:!1,editingURL:!0})}function v(w){return/^https:\/\/calendar\.google\.com\/calendar\/(?:u\/\d+\/)?embed\?.*$/.test(w)}return e.jsxs(gc,{children:[e.jsxs(mc,{children:[e.jsxs(ll,{title:qe("Customize Embedded Calendar","embedpress"),children:[e.jsx("p",{children:qe("You can adjust the width and height of embedded content.","embedpress")}),e.jsx(sl,{label:qe("Width","embedpress"),value:d,onChange:w=>s({width:w})}),!Kt(a)&&!ws(a)&&e.jsx(sl,{label:qe("Height","embedpress"),value:i,onChange:w=>s({height:w})})]}),e.jsxs(ll,{title:qe("Calendar Type and other options","embedpress"),children:[e.jsx("p",{children:qe("You can show public calendar without any API key","embedpress")}),e.jsx(al,{label:qe("Powered By","embedpress"),onChange:w=>s({powered_by:w}),checked:m}),e.jsx(al,{label:qe("Embedding Public Calendar","embedpress"),onChange:w=>s({is_public:w}),checked:p})]})]}),a&&!n&&e.jsx(hc,{children:e.jsx(uc,{className:"components-edit-button",icon:"edit",label:qe("Edit URL","embedpress"),onClick:b})}),(!u||n)&&!c&&p&&e.jsx("div",{...g,children:e.jsx(Je,{label:qe("Public Calendar Link"),onSubmit:P,value:a,cannotEmbed:r,onChange:w=>s({url:w.target.value}),icon:ba,DocTitle:qe("Learn more about EmbedPress Calendar"),docLink:"https://embedpress.com/docs/"})}),c?e.jsxs("div",{className:t,children:[e.jsx(Ne,{})," "]}):null,u&&p&&!n&&!c&&e.jsxs("figure",{...g,children:[p&&v(a)&&e.jsx("iframe",{style:{display:c?"none":""},src:A(a),width:d,height:i,onLoad:f,title:K(a)}),m&&v(a)&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),!v(a)&&e.jsx("p",{className:"embedpress-el-powered",children:"Invalid Calendar Link"}),!x&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:y})]}),!p&&e.jsxs("figure",{className:"testing",...g,children:[e.jsxs("p",{children:["Private Calendar will show in the frontend only.",e.jsx("br",{}),e.jsx("strong",{children:"Note: Private calendar needs EmbedPress Pro."})]}),m&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),!x&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:y})]})]})}const yc=o=>null,xc={id:{type:"string"},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},is_public:{type:"boolean",default:!0},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"600"},url:{type:"string",default:""},embedHTML:{type:"string",default:""},interactive:{type:"boolean",default:!1},editingURL:{type:"boolean",default:!1},fetching:{type:"boolean",default:!1},cannotEmbed:{type:"boolean",default:!1}},{__:wc}=wp.i18n,{registerBlockType:vc}=wp.blocks;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["embedpress-calendar"]&&vc("embedpress/embedpress-calendar",{title:wc("Google Calendar"),icon:ba,category:"embedpress",keywords:["embedpress","embed","calendar","calender","google","cal","events","task","birthday"],supports:{align:["left","center","right"],default:"center",lightBlockWrapper:!0},attributes:xc,edit:bc,save:yc});const{applyFilters:jc}=wp.hooks,{useBlockProps:Cc}=wp.blockEditor,{Fragment:Tf}=wp.element,_c=({attributes:o})=>{const t=Cc.save(),{href:s,fileName:l,mime:a,id:n,unitoption:c,width:r,height:u,powered_by:i,themeMode:d,customColor:m,presentation:p,lazyLoad:h,position:x,flipbook_toolbar_position:g,download:b,add_text:f,draw:y,toolbar:P,copy_text:v,doc_details:w,doc_rotation:j,add_image:$,selection_tool:S,scrolling:_,spreads:B,clientId:N,sharePosition:I,contentShare:R,adManager:L,adSource:J,adFileUrl:W,adXPosition:V,adYPosition:Z,viewerStyle:F,zoomIn:k,zoomOut:E,fitView:z,bookmark:q,customlogo:O}=o;if(!s)return null;let Y="";c==="%"?Y="ep-percentage-width":Y="ep-fixed-width";let T="",re="",ie=I||"right";R&&(T="ep-content-share-enabled",re="ep-share-position-"+ie);function ue(we){let ve="",ke={};d==="custom"&&(ke={customColor:m&&m!=="default"?m:"#403A81"});let Ue={themeMode:d||"default",...ke,presentation:p||!1,lazyLoad:h||!1,position:x||"top",flipbook_toolbar_position:g||"bottom",download:b||!1,toolbar:P||!1,copy_text:v||!1,add_text:f||!1,draw:y||!1,doc_details:w||!1,doc_rotation:j||!1,add_image:$||!1,zoom_in:k||!1,zoom_out:E||!1,fit_view:z||!1,bookmark:q||!1,selection_tool:S||"0",scrolling:_||"-1",spreads:B||"0"};const Ie=new URLSearchParams(Ue).toString();ve="key="+btoa(encodeURIComponent(Ie).replace(/%([0-9A-F]{2})/g,function(rt,Le){return String.fromCharCode(parseInt(Le,16))}));let Ge=we.split("#");return Ge=encodeURIComponent(Ge[0]),F==="flip-book"?`${Ge}&${ve}`:`${Ge}#${ve}`}const xe="//view.officeapps.live.com/op/embed.aspx?src="+ue(s);let ne="";typeof embedpressGutenbergData<"u"&&embedpressGutenbergData.pdfRenderer&&(ne=embedpressGutenbergData.pdfRenderer+(embedpressGutenbergData.pdfRenderer.indexOf("?")===-1?"?":"&")+"scrolling="+_+"&selection_tool="+S+"&spreads="+B+"&file="+ue(s)),F==="flip-book"&&typeof embedpressGutenbergData<"u"&&embedpressGutenbergData.flipbookRenderer&&(ne=embedpressGutenbergData.flipbookRenderer+(embedpressGutenbergData.flipbookRenderer.indexOf("?")===-1?"?":"&")+"file="+ue(s));const de=jc("embedpress.customLogoComponent","",o),M=ye(N||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${M}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-doc-"+n+" "+T+" "+re+" "+Y,style:{width:r+c,height:u+"px",maxWidth:"100%"},id:`ep-doc-${N}`,"data-source-id":"source-"+N,"data-embed-type":"PDF",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${I}-wraper gutenberg-pdf-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[a==="application/pdf"&&ne&&e.jsx("iframe",{title:K(s,l),powered_by:i,style:{height:u+"px",width:r+c,maxWidth:"100%"},className:"embedpress-embed-document-pdf "+n,"data-emid":n,"data-viewer-style":F,src:A(ne)}),a!=="application/pdf"&&e.jsx("iframe",{title:K(xe,l),style:{height:u+"px",width:r+c,maxWidth:"100%"},src:A(xe)}),R&&e.jsx(_e,{attributes:o})]}),de&&e.jsx("div",{className:"custom-logo-container",dangerouslySetInnerHTML:{__html:de}}),i&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),L&&J==="image"&&W&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1,inEditor:!1})]})})})})},{Component:kc}=wp.element;class ut extends kc{constructor(t){super(t),this.myRef=React.createRef()}componentDidMount(){na.findDOMNode(this.myRef.current).addEventListener("load",this.props.onLoad)}render(){return e.jsx("iframe",{ref:this.myRef,...this.props})}}const{__:le}=wp.i18n,{useState:Bf,useEffect:Ff,Fragment:as}=wp.element,{BlockControls:Ef,BlockIcon:Df,MediaPlaceholder:Nf,InspectorControls:$c,useBlockProps:Mf}=wp.blockEditor,{__experimentalToggleGroupControl:rl,__experimentalToggleGroupControlOption:vo}=wp.components,{ToolbarButton:zf,RangeControl:Uf,PanelBody:il,ExternalLink:If,ToggleControl:Ye,TextControl:ns,SelectControl:rs,RadioControl:Pc,ColorPalette:Sc,Tooltip:Lc}=wp.components,{applyFilters:ze}=wp.hooks,Tc=({attributes:o,setAttributes:t})=>{const{href:s,mime:l,id:a,unitoption:n,width:c,height:r,powered_by:u,themeMode:i,customColor:d,presentation:m,lazyLoad:p,position:h,flipbook_toolbar_position:x,download:g,add_text:b,draw:f,open:y,toolbar:P,copy_text:v,toolbar_position:w,doc_details:j,doc_rotation:$,add_image:S,selection_tool:_,scrolling:B,spreads:N,sharePosition:I,contentShare:R,adManager:L,adSource:J,adFileUrl:W,adWidth:V,adHeight:Z,adXPosition:F,adYPosition:k,viewerStyle:E,zoomIn:z,zoomOut:q,fitView:O,bookmark:Y}=o,T=[{name:"",color:"#823535"},{name:"",color:"#008000"},{name:"",color:"#403A81"},{name:"",color:"#333333"},{name:"",color:"#000264"}],re=ze("embedpress.togglePlaceholder",[],le("Toolbar","embedpress"),!0),ie=ze("embedpress.togglePlaceholder",[],le("Print/Download","embedpress"),!0),ue=ze("embedpress.togglePlaceholder",[],le("Draw","embedpress"),!1),xe=ze("embedpress.togglePlaceholder",[],le("Copy Text","embedpress"),!0),ne=ze("embedpress.selectPlaceholder",[],le("Default Scrolling","embedpress"),"-1","Page Scrolling"),de=ze("embedpress.selectPlaceholder",[],le("Default Selection Tool","embedpress"),"0","Text Tool");return e.jsxs($c,{children:[e.jsx(il,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",le("Embed Size","embedpress")]}),children:e.jsxs("div",{className:"ep-controls-margin",children:[e.jsxs("div",{className:"ep-pdf-width-contol",children:[e.jsx(Pc,{selected:n,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:M=>t({unitoption:M}),className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(ns,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[le("Width"),e.jsx(Lc,{text:le("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:c,type:"number",onChange:M=>t({width:M})})})]}),e.jsx(ns,{label:le("Height","embedpress"),value:r,type:"number",onChange:M=>t({height:M})})]})}),e.jsxs(il,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",le("Document Controls","embedpress")]}),initialOpen:!1,children:[e.jsx(ns,{label:le("Document URL","embedpress"),type:"text",value:o.href||"",onChange:M=>t({href:M})}),e.jsx(rs,{label:"Viewer Style",value:E,options:[{label:"Modern",value:"modern"},{label:"Flip Book",value:"flip-book"}],onChange:M=>t({viewerStyle:M}),__nextHasNoMarginBottom:!0}),e.jsx(rs,{label:"Theme",value:i,options:[{label:"System Default",value:"default"},{label:"Dark",value:"dark"},{label:"Light",value:"light"},{label:"Custom",value:"custom"}],onChange:M=>t({themeMode:M}),__nextHasNoMarginBottom:!0}),i==="custom"&&e.jsxs("div",{children:[e.jsx(G,{headerText:"Color"}),e.jsx(Sc,{label:le("Color"),colors:T,value:d,onChange:M=>t({customColor:M})})]}),ze("embedpress.pdfControls",[re],o,t,"toolbar"),P&&e.jsxs(as,{children:[E==="flip-book"?e.jsxs(rl,{label:"Toolbar Position",value:x,onChange:M=>t({flipbook_toolbar_position:M}),children:[e.jsx(vo,{value:"top",label:"Top"}),e.jsx(vo,{value:"bottom",label:"Bottom"})]}):e.jsxs(rl,{label:"Toolbar Position",value:h,onChange:M=>t({position:M}),children:[e.jsx(vo,{value:"top",label:"Top"}),e.jsx(vo,{value:"bottom",label:"Bottom"})]}),e.jsx(Ye,{label:le("Presentation Mode","embedpress"),onChange:M=>t({presentation:M}),checked:m}),e.jsx(Ye,{label:le("Lazy Load","embedpress"),onChange:M=>t({lazyLoad:M}),checked:p}),ze("embedpress.pdfControls",[ie],o,t,"print"),E==="modern"?e.jsxs(as,{children:[e.jsx(Ye,{label:le("Add Text","embedpress"),onChange:M=>t({add_text:M}),checked:b}),ze("embedpress.pdfControls",[ue],o,t,"draw"),ze("embedpress.pdfControls",[xe],o,t,"copyText"),e.jsx(Ye,{label:le("Add Image","embedpress"),onChange:M=>t({add_image:M}),checked:S}),e.jsx(Ye,{label:le("Rotation","embedpress"),onChange:M=>t({doc_rotation:M}),checked:$}),e.jsx(Ye,{label:le("Properties","embedpress"),onChange:M=>t({doc_details:M}),checked:j}),ze("embedpress.pdfControls",[de],o,t,"selectionTool"),ze("embedpress.pdfControls",[ne],o,t,"scrolling"),B!=="1"&&e.jsx(rs,{label:"Default Spreads",value:N,options:[{label:"No Spreads",value:"0"},{label:"Odd Spreads",value:"1"},{label:"Even Spreads",value:"2"}],onChange:M=>t({spreads:M}),__nextHasNoMarginBottom:!0})]}):e.jsxs(as,{children:[e.jsx(Ye,{label:le("Zoom In","embedpress"),onChange:M=>t({zoomIn:M}),checked:z}),e.jsx(Ye,{label:le("Zoom Out","embedpress"),onChange:M=>t({zoomOut:M}),checked:q}),e.jsx(Ye,{label:le("Fit View","embedpress"),onChange:M=>t({fitView:M}),checked:O}),e.jsx(Ye,{label:le("Bookmark","embedpress"),onChange:M=>t({bookmark:M}),checked:Y})]}),e.jsx(Ye,{label:le("Powered By","embedpress"),onChange:M=>t({powered_by:M}),checked:u})]})]}),e.jsx(Ra,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(Ke,{})]},"inspector")},{__:is}=wp.i18n,{useState:jo,useEffect:ds,Fragment:Bc}=wp.element,{BlockControls:Fc,BlockIcon:Ec,MediaPlaceholder:Dc,useBlockProps:Nc}=wp.blockEditor,{ToolbarButton:Mc,ExternalLink:zc}=wp.components,{getBlobByURL:Uc,isBlobURL:Ic,revokeBlobURL:Gc}=wp.blob,{applyFilters:Rc}=wp.hooks,Hc=["application/pdf"];function Oc(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a,noticeUI:n,mediaUpload:c,noticeOperations:r}=o,[u,i]=jo(!1),[d,m]=jo(!1),[p,h]=jo(!1),[x,g]=jo(!0),b=Nc();ds(()=>{!a&&p&&h(!1)},[a,p]),ds(()=>{const{href:oe}=t;if(Ic(oe)){const fe=Uc(oe);c({filesList:[fe],onFileChange:([Re])=>P(Re),onError:Re=>{i(!0),r.createErrorNotice(Re)}}),Gc(oe)}t.href&&t.mime==="application/pdf"&&x&&g(!1)},[]);const f=()=>{h(!0)},y=()=>{m(!1)},P=oe=>{if(oe&&oe.url){i(!1);const fe=oe.url.includes("embedpress-secure");s({href:oe.url,fileName:oe.title,id:"embedpress-pdf-"+Date.now(),mime:oe.mime,lockContent:fe||t.lockContent}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by}),oe.mime==="application/pdf"&&g(!1)}l&&t.href&&Tt(l,t.href)},v=oe=>{r.removeAllNotices(),r.createErrorNotice(oe)},w=()=>{document.querySelector(".pro__alert__wrap")&&document.querySelector(".pro__alert__wrap .pro__alert__card .button").addEventListener("click",()=>{document.querySelector(".pro__alert__wrap").style.display="none"})},j=()=>{const oe=`
<div class="pro__alert__wrap" style="display: none;">
<div class="pro__alert__card">
<img src="../wp-content/plugins/embedpress/EmbedPress/Ends/Back/Settings/assets/img/alert.svg" alt=""/>
<h2>Opps...</h2>
<p>You need to upgrade to the <a href="https://wpdeveloper.com/in/upgrade-embedpress" target="_blank">Premium</a> Version to use this feature</p>
<a href="#" class="button radius-10">Close</a>
</div>
</div>
`,fe=document.createElement("div");return fe.innerHTML=oe,fe};ds(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{href:$,mime:S,id:_,unitoption:B,width:N,height:I,powered_by:R,themeMode:L,customColor:J,presentation:W,lazyLoad:V,position:Z,flipbook_toolbar_position:F,download:k,add_text:E,draw:z,open:q,toolbar:O,copy_text:Y,toolbar_position:T,doc_details:re,doc_rotation:ie,add_image:ue,selection_tool:xe,scrolling:ne,spreads:de,sharePosition:M,contentShare:we,adManager:ve,adSource:ke,adFileUrl:Ue,adWidth:Ie,adHeight:nt,adXPosition:Ge,adYPosition:rt,viewerStyle:Le,zoomIn:mt,zoomOut:ht,fitView:Ut,bookmark:It,customlogo:po}=t,Gt=Rc("embedpress.customLogoComponent","",t);let Bt="";B=="%"?Bt="ep-percentage-width":Bt="ep-fixed-width";let Rt="",Ht="",pe=M||"right";we&&(Rt="ep-content-share-enabled",Ht="ep-share-position-"+pe);const se="https://embedpress.com/docs/embed-document/";embedpressGutenbergData.isProPluginActive||(s({download:!0}),s({copy_text:!0}),s({draw:!1}),s({selection_tool:"0"}),s({scrolling:"-1"})),document.querySelector(".pro__alert__wrap")||(document.querySelector("body").append(j()),w());function gt(oe){let fe="",Re={};L==="custom"&&(Re={customColor:J&&J!=="default"?J:"#403A81"});let Ot={themeMode:L||"default",...Re,presentation:W||!1,lazyLoad:V||!1,position:Z||"top",flipbook_toolbar_position:F||"bottom",download:k||!1,toolbar:O||!1,copy_text:Y||!1,add_text:E||!1,draw:z||!1,toolbar_position:T||"top",doc_details:re||!1,doc_rotation:ie||!1,add_image:ue||!1,zoom_in:mt||!1,zoom_out:ht||!1,fit_view:Ut||!1,bookmark:It||!1,selection_tool:xe||"0",scrolling:ne||"-1",spreads:de||"0"};const Vt=new URLSearchParams(Ot).toString();fe="key="+btoa(encodeURIComponent(Vt).replace(/%([0-9A-F]{2})/g,function(uo,Ft){return String.fromCharCode(parseInt(Ft,16))}));let C=oe.split("#");return C=encodeURIComponent(C[0]),Le==="flip-book"?`${C}&${fe}`:`${C}#${fe}`}if(console.log({width:N,height:I}),!$||u)return e.jsx("div",{className:"embedpress-document-editmode",children:e.jsx(Dc,{icon:e.jsx(Ec,{icon:fa}),labels:{title:is("EmbedPress PDF"),instructions:is("Upload a PDF file or pick one from your media library for embed.")},onSelect:P,notices:n,allowedTypes:Hc,onError:v,children:e.jsx("div",{style:{width:"100%"},className:"components-placeholder__learn-more embedpress-doc-link",children:e.jsx(zc,{href:se,children:"Learn more about Embedded document "})})})});{const oe="//view.officeapps.live.com/op/embed.aspx?src="+gt($);let fe=embedpressGutenbergData.pdfRenderer+(embedpressGutenbergData.pdfRenderer.indexOf("?")===-1?"?":"&")+"scrolling="+ne+"&selection_tool="+xe+"&spreads="+de+"&file="+gt($);return Le==="flip-book"&&typeof embedpressGutenbergData<"u"&&embedpressGutenbergData.flipbookRenderer&&(fe=embedpressGutenbergData.flipbookRenderer+(embedpressGutenbergData.flipbookRenderer.indexOf("?")===-1?"?":"&")+"file="+gt($)),e.jsxs(Bc,{children:[e.jsx(Fc,{children:e.jsx(Mc,{className:"components-edit-button",icon:"edit",label:is("Re Upload","embedpress"),onClick:()=>s({href:""})})}),d&&S!=="application/pdf"?e.jsx(Ne,{}):null,e.jsx("div",{...b,children:e.jsx("div",{className:"embedpress-document-embed ep-doc-"+_+" "+Rt+" "+Ht+" "+Bt,style:{width:N+B,height:I+"px",maxWidth:"100%"},id:`ep-doc-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${M}-wraper gutenberg-pdf-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[S==="application/pdf"&&e.jsx("iframe",{title:K($,t.fileName),powered_by:R,style:{height:I+"px",width:N+B,maxWidth:"100%"},className:"embedpress-embed-document-pdf "+_,"data-emid":_,"data-viewer-style":Le,src:A(fe)}),S!=="application/pdf"&&e.jsx(ut,{title:K(oe,t.fileName),onMouseUponMouseUp:f,style:{height:I+"px",width:N,display:d||!x?"none":""},onLoad:y,src:A(oe)}),we&&e.jsx(_e,{attributes:t})]}),Gt&&e.jsx("div",{className:"custom-logo-container",dangerouslySetInnerHTML:{__html:Gt}}),R&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),ve&&ke==="image"&&Ue&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})}),e.jsx(Tc,{attributes:t,setAttributes:s})]})}}const Vc="https://schemas.wp.org/trunk/block.json",Wc="EmbedPress PDF",qc="embedpress/embedpress-pdf",Yc="embedpress",Zc="Embed PDF documents with advanced customization options including viewer styles, toolbar controls, and content protection.",Xc=2,Jc="embedpress",Kc="embedpress-blocks-editor",Qc="embedpress-blocks-editor-style",Ac="embedpress-blocks-style",ep={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},tp={$schema:Vc,title:Wc,name:qc,category:Yc,description:Zc,apiVersion:Xc,textdomain:Jc,editorScript:Kc,editorStyle:Qc,style:Ac,supports:ep};var la;const op={id:{type:"string"},clientId:{type:"string"},href:{type:"string"},fileName:{type:"string"},mime:{type:"string"},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.embedpress_powered_by<"u"?embedpressGutenbergData.embedpress_powered_by:!0},presentation:{type:"boolean",default:!0},lazyLoad:{type:"boolean",default:!1},themeMode:{type:"string",default:"default"},customColor:{type:"string",default:"#403A81"},position:{type:"string",default:"top"},flipbook_toolbar_position:{type:"string",default:"bottom"},download:{type:"boolean",default:!0},open:{type:"boolean",default:!1},copy_text:{type:"boolean",default:!0},add_text:{type:"boolean",default:!0},draw:{type:"boolean",default:!0},add_image:{type:"boolean",default:!0},selection_tool:{type:"string",default:"0"},scrolling:{type:"string",default:"0"},spreads:{type:"string",default:"0"},toolbar:{type:"boolean",default:!0},doc_details:{type:"boolean",default:!0},doc_rotation:{type:"boolean",default:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"600"},viewerStyle:{type:"string",default:"modern"},zoomIn:{type:"boolean",default:!0},zoomOut:{type:"boolean",default:!0},fitView:{type:"boolean",default:!0},bookmark:{type:"boolean",default:!0},customlogo:{type:"string",default:((la=embedpressGutenbergData==null?void 0:embedpressGutenbergData.brandingLogos)==null?void 0:la.document)||""},logoX:{type:"number",default:5},logoY:{type:"number",default:10},customlogoUrl:{type:"string"},logoOpacity:{type:"number",default:.6},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:Co}=wp.i18n;co(tp,{icon:fa,attributes:op,keywords:[Co("embedpress","embedpress"),Co("pdf","embedpress"),Co("doc","embedpress"),Co("document","embedpress")],edit:Oc,save:_c});const{applyFilters:Gf}=wp.hooks,{useBlockProps:sp}=wp.blockEditor,{Fragment:Rf}=wp.element,lp=({attributes:o})=>{const t=sp.save(),{iframeSrc:s,id:l,unitoption:a,width:n,height:c,powered_by:r,clientId:u,sharePosition:i,contentShare:d,adManager:m,adSource:p,adFileUrl:h,adXPosition:x,adYPosition:g,enableLazyLoad:b}=o;if(!s)return null;let f="";a==="%"?f="ep-percentage-width":f="ep-fixed-width";let y="",P="",v=i||"right";d&&(y="ep-content-share-enabled",P="ep-share-position-"+v);const w=ye(u||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${w}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-google-docs-"+l+" "+y+" "+P+" "+f,id:`ep-google-docs-${u}`,"data-source-id":"source-"+u,"data-embed-type":"Google Docs",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${i}-wraper gutenberg-google-docs-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[b?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":A(s),"data-ep-iframe-style":`width: ${a==="%"?n+"%":n+"px"}; height: ${c}px; max-width: 100%;`,"data-ep-iframe-frameborder":"0","data-ep-iframe-allowfullscreen":"true","data-ep-iframe-mozallowfullscreen":"true","data-ep-iframe-webkitallowfullscreen":"true","data-ep-iframe-title":K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"}}):e.jsx("iframe",{src:A(s),title:K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"},frameBorder:"0",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),d&&e.jsx(_e,{attributes:o})]}),r&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),m&&p==="image"&&h&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1,inEditor:!1})]})})})})},{__:_t}=wp.i18n,{InspectorControls:ap}=wp.blockEditor,{PanelBody:cs,TextControl:dl,RadioControl:np,ToggleControl:rp,Tooltip:ip}=wp.components,{applyFilters:cl}=wp.hooks,pl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,powered_by:n,enableLazyLoad:c}=o,r=cl("embedpress.togglePlaceholder",[],_t("Enable Lazy Loading","embedpress"),c,!0);return e.jsxs(ap,{children:[e.jsxs(cs,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",_t("Embed Size","embedpress")]}),className:"embedpress-google-docs-control",children:[e.jsxs("div",{className:"ep-google-docs-width-control",children:[e.jsx(np,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:u=>{const i={unitoption:u};u==="%"&&parseFloat(s)>100&&(i.width="100"),t(i)},className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(dl,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[_t("Width"),e.jsx(ip,{text:_t("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:s,type:"number",onChange:u=>{let i=u;a==="%"&&parseFloat(u)>100&&(i="100"),t({width:i})}})})]}),e.jsx(dl,{label:_t("Height","embedpress"),value:l,type:"number",onChange:u=>t({height:u})})]}),e.jsx(cs,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",_t("General","embedpress")]}),className:"embedpress-google-docs-general",children:e.jsx(rp,{label:_t("Powered By","embedpress"),checked:n,onChange:u=>t({powered_by:u})})}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(cs,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",_t("Lazy Loading","embedpress")]}),children:cl("embedpress.toggleLazyLoad",[r],o,t)}),e.jsx(Ke,{})]})},{__:_o}=wp.i18n,{useState:so,useEffect:ul,Fragment:dp}=wp.element,{BlockControls:cp,useBlockProps:pp}=wp.blockEditor,{ToolbarButton:up,ExternalLink:Hf}=wp.components;function mp(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a}=o,[n,c]=so(!1),[r,u]=so(t.url||""),[i,d]=so(!0),[m,p]=so(!1),[h,x]=so(!1),g=pp();ul(()=>{!a&&h&&x(!1)},[a,h]);const b=()=>{x(!0)},f=()=>{d(!1)},y=k=>(k&&typeof k=="string"&&(k=k.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),k=k.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),k),P=k=>{var E=/(?:https?:\/\/)?(?:[^./]+\.)?google\.(com?\.)?[a-z]+(?:\.[a-z]+)?/;return E.test(k)},v=k=>{if(k&&k.preventDefault(),s({url:r}),r&&r.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var E=y(r),z=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,q=z.exec(E),O=q[1];O&&O==="document"?(E.match(/([?&])embedded=true/i)||(E.indexOf("?")>-1?E+="&embedded=true":E+="?embedded=true"),c(!1),p(!1),s({iframeSrc:E,id:"embedpress-google-docs-"+Date.now()}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by})):(p(!0),c(!0))}else p(!0),c(!0);l&&r&&Tt(l,r)},w=()=>{c(!0)};ul(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{iframeSrc:j,powered_by:$,unitoption:S,width:_,height:B,sharePosition:N,contentShare:I,adManager:R,adSource:L,adFileUrl:J}=t;if(j&&!P(j))return"Invalid URL.";_o("Google Docs URL");let W="";S=="%"?W="ep-percentage-width":W="ep-fixed-width";let V="",Z="",F=N||"right";return I&&(V="ep-content-share-enabled",Z="ep-share-position-"+F),!j||n?e.jsxs("div",{...g,children:[e.jsx(pl,{attributes:t,setAttributes:s}),e.jsx(Je,{label:_o("Google Docs URL"),onSubmit:v,value:r,cannotEmbed:m,onChange:k=>u(k.target.value),icon:_s,DocTitle:_o("Learn More About Google Docs Embed"),docLink:"https://embedpress.com/docs/embed-google-docs-wordpress/"})]}):e.jsxs(dp,{children:[e.jsx(pl,{attributes:t,setAttributes:s}),e.jsx(cp,{children:e.jsx(up,{className:"components-edit-button",icon:"edit",label:_o("Edit URL","embedpress"),onClick:w})}),i?e.jsx(Ne,{}):null,e.jsx("div",{...g,children:e.jsx("div",{className:"embedpress-document-embed ep-google-docs-"+t.id+" "+V+" "+Z+" "+W,id:`ep-google-docs-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${N}-wraper gutenberg-google-docs-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx(ut,{title:K(j),src:A(j),onMouseUp:b,onLoad:f,style:{width:S==="%"?_+"%":_+"px",height:B+"px",maxWidth:"100%",display:i?"none":""},frameBorder:"0"}),I&&e.jsx(_e,{attributes:t})]}),$&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),R&&L==="image"&&J&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})})]})}const hp="https://schemas.wp.org/trunk/block.json",gp="Google Docs",fp="embedpress/google-docs-block",bp="embedpress",yp="Embed Google Docs documents with live collaboration features and customizable viewing options for seamless content sharing.",xp=2,vp="embedpress",jp="embedpress-blocks-editor",Cp="embedpress-blocks-editor-style",_p="embedpress-blocks-style",kp={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},$p={$schema:hp,title:gp,name:fp,category:bp,description:yp,apiVersion:xp,textdomain:vp,editorScript:jp,editorStyle:Cp,style:_p,supports:kp},Pp={id:{type:"string"},clientId:{type:"string"},url:{type:"string",default:""},iframeSrc:{type:"string",default:""},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"450"},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:ko}=wp.i18n;co($p,{icon:_s,attributes:Pp,keywords:[ko("embedpress","embedpress"),ko("google","embedpress"),ko("docs","embedpress"),ko("document","embedpress")],edit:mp,save:lp});const{applyFilters:Of}=wp.hooks,{useBlockProps:Sp}=wp.blockEditor,{Fragment:Vf}=wp.element,Lp=({attributes:o})=>{const t=Sp.save(),{iframeSrc:s,id:l,unitoption:a,width:n,height:c,powered_by:r,clientId:u,sharePosition:i,contentShare:d,adManager:m,adSource:p,adFileUrl:h,adXPosition:x,adYPosition:g}=o;if(!s)return null;let b="";a==="%"?b="ep-percentage-width":b="ep-fixed-width";let f="",y="",P=i||"right";d&&(f="ep-content-share-enabled",y="ep-share-position-"+P);const v=ye(u||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${v}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-google-drawings-"+l+" "+f+" "+y+" "+b,id:`ep-google-drawings-${u}`,"data-source-id":"source-"+u,"data-embed-type":"Google Drawings",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${i}-wraper gutenberg-google-drawings-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx("img",{src:A(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"},alt:"Google Drawing"}),d&&e.jsx(_e,{attributes:o})]}),r&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),m&&p==="image"&&h&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1,inEditor:!1})]})})})})},{__:Xt}=wp.i18n,{InspectorControls:Tp}=wp.blockEditor,{PanelBody:ml,TextControl:hl,RadioControl:Bp,ToggleControl:Fp,Tooltip:Ep}=wp.components,gl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,powered_by:n}=o;return e.jsxs(Tp,{children:[e.jsxs(ml,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Xt("Embed Size","embedpress")]}),className:"embedpress-google-drawings-control",children:[e.jsxs("div",{className:"ep-google-drawings-width-control",children:[e.jsx(Bp,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:c=>{const r={unitoption:c};c==="%"&&parseFloat(s)>100&&(r.width="100"),t(r)},className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(hl,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[Xt("Width"),e.jsx(Ep,{text:Xt("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:s,type:"number",onChange:c=>{let r=c;a==="%"&&parseFloat(c)>100&&(r="100"),t({width:r})}})})]}),e.jsx(hl,{label:Xt("Height","embedpress"),value:l,type:"number",onChange:c=>t({height:c})})]}),e.jsx(ml,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Xt("General","embedpress")]}),className:"embedpress-google-drawings-general",children:e.jsx(Fp,{label:Xt("Powered By","embedpress"),checked:n,onChange:c=>t({powered_by:c})})}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(Ke,{})]})},{__:$o}=wp.i18n,{useState:lo,useEffect:fl,Fragment:Dp}=wp.element,{BlockControls:Np,useBlockProps:Mp}=wp.blockEditor,{ToolbarButton:zp,ExternalLink:Wf}=wp.components;function Up(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a}=o,[n,c]=lo(!1),[r,u]=lo(t.url||""),[i,d]=lo(!0),[m,p]=lo(!1),[h,x]=lo(!1),g=Mp();fl(()=>{!a&&h&&x(!1)},[a,h]);const b=()=>{d(!1)},f=F=>(F&&typeof F=="string"&&(F=F.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),F=F.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),F),y=F=>{var k=/(?:https?:\/\/)?(?:[^./]+\.)?google\.(com?\.)?[a-z]+(?:\.[a-z]+)?/;return k.test(F)},P=F=>{if(F&&F.preventDefault(),s({url:r}),r&&r.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var k=f(r),E=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,z=E.exec(k),q=z[1];q&&q==="drawings"?(c(!1),p(!1),s({iframeSrc:k,id:"embedpress-google-drawings-"+Date.now()}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by})):(p(!0),c(!0))}else p(!0),c(!0);l&&r&&Tt(l,r)},v=()=>{c(!0)};fl(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{iframeSrc:w,powered_by:j,unitoption:$,width:S,height:_,sharePosition:B,contentShare:N,adManager:I,adSource:R,adFileUrl:L}=t;if(w&&!y(w))return"Invalid URL.";$o("Google Drawings URL (Get your link from File -> Publish to the web -> Link)");let J="";$=="%"?J="ep-percentage-width":J="ep-fixed-width";let W="",V="",Z=B||"right";return N&&(W="ep-content-share-enabled",V="ep-share-position-"+Z),!w||n?e.jsxs("div",{...g,children:[e.jsx(gl,{attributes:t,setAttributes:s}),e.jsx(Je,{label:$o("Google Drawings URL"),onSubmit:P,value:r,cannotEmbed:m,onChange:F=>u(F.target.value),icon:ca,DocTitle:$o("Learn More About Google Drawings Embed"),docLink:"https://embedpress.com/docs/embed-google-drawings-wordpress/"})]}):e.jsxs(Dp,{children:[e.jsx(gl,{attributes:t,setAttributes:s}),e.jsx(Np,{children:e.jsx(zp,{className:"components-edit-button",icon:"edit",label:$o("Edit URL","embedpress"),onClick:v})}),i?e.jsx(Ne,{}):null,e.jsx("div",{...g,children:e.jsx("div",{className:"embedpress-document-embed ep-google-drawings-"+t.id+" "+W+" "+V+" "+J,id:`ep-google-drawings-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${B}-wraper gutenberg-google-drawings-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx("img",{src:A(w),onLoad:b,style:{width:$==="%"?S+"%":S+"px",height:_+"px",maxWidth:"100%",display:i?"none":""},alt:"Google Drawing"}),N&&e.jsx(_e,{attributes:t})]}),j&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),I&&R==="image"&&L&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})})]})}const Ip="https://schemas.wp.org/trunk/block.json",Gp="Google Drawings",Rp="embedpress/google-drawings-block",Hp="embedpress",Op="Embed Google Drawings with interactive diagrams, flowcharts, and visual content for enhanced presentations and documentation.",Vp=2,Wp="embedpress",qp="embedpress-blocks-editor",Yp="embedpress-blocks-editor-style",Zp="embedpress-blocks-style",Xp={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},bl={$schema:Ip,title:Gp,name:Rp,category:Hp,description:Op,apiVersion:Vp,textdomain:Wp,editorScript:qp,editorStyle:Yp,style:Zp,supports:Xp},Jp={id:{type:"string"},clientId:{type:"string"},url:{type:"string",default:""},iframeSrc:{type:"string",default:""},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"450"},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:Po}=wp.i18n,{registerBlockType:Kp}=wp.blocks;let Wa=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["google-drawings-block"]&&(Wa=!0);Wa&&Kp(bl.name,{...bl,icon:ca,attributes:Jp,keywords:[Po("embedpress","embedpress"),Po("google","embedpress"),Po("drawings","embedpress"),Po("diagram","embedpress")],edit:Up,save:Lp});const{useBlockProps:Qp}=wp.blockEditor,Ap=({attributes:o})=>{const t=Qp.save(),{iframeSrc:s,id:l,unitoption:a,width:n,height:c,powered_by:r,clientId:u,sharePosition:i,contentShare:d,adManager:m,adSource:p,adFileUrl:h,enableLazyLoad:x}=o;if(!s)return null;let g="";a==="%"?g="ep-percentage-width":g="ep-fixed-width";let b="",f="",y=i||"right";d&&(b="ep-content-share-enabled",f="ep-share-position-"+y);const P=ye(u||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${P}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-google-forms-"+l+" "+b+" "+f+" "+g,id:`ep-google-forms-${u}`,"data-source-id":"source-"+u,"data-embed-type":"Google Forms",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${i}-wraper gutenberg-google-forms-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[x?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":A(s),"data-ep-iframe-style":`width: ${a==="%"?n+"%":n+"px"}; height: ${c}px; max-width: 100%;`,"data-ep-iframe-frameborder":"0","data-ep-iframe-allowfullscreen":"true","data-ep-iframe-mozallowfullscreen":"true","data-ep-iframe-webkitallowfullscreen":"true","data-ep-iframe-title":K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"}}):e.jsx("iframe",{src:A(s),title:K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"},frameBorder:"0",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),d&&e.jsx(_e,{attributes:o})]}),r&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),m&&p==="image"&&h&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1})]})})})})},{__:kt}=wp.i18n,{InspectorControls:eu}=wp.blockEditor,{PanelBody:ps,TextControl:yl,RadioControl:tu,ToggleControl:ou,Tooltip:su}=wp.components,{applyFilters:xl}=wp.hooks,wl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,powered_by:n,enableLazyLoad:c}=o,r=xl("embedpress.togglePlaceholder",[],kt("Enable Lazy Loading","embedpress"),c,!0);return e.jsxs(eu,{children:[e.jsxs(ps,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",kt("Embed Size","embedpress")]}),className:"embedpress-google-forms-control",children:[e.jsxs("div",{className:"ep-google-forms-width-control",children:[e.jsx(tu,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:u=>{const i={unitoption:u};u==="%"&&parseFloat(s)>100&&(i.width="100"),t(i)},className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(yl,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[kt("Width"),e.jsx(su,{text:kt("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:s,type:"number",onChange:u=>{let i=u;a==="%"&&parseFloat(u)>100&&(i="100"),t({width:i})}})})]}),e.jsx(yl,{label:kt("Height","embedpress"),value:l,type:"number",onChange:u=>t({height:u})})]}),e.jsx(ps,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",kt("General","embedpress")]}),className:"embedpress-google-forms-general",children:e.jsx(ou,{label:kt("Powered By","embedpress"),checked:n,onChange:u=>t({powered_by:u})})}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(ps,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",kt("Lazy Loading","embedpress")]}),children:xl("embedpress.toggleLazyLoad",[r],o,t)}),e.jsx(Ke,{})]})},{__:So}=wp.i18n,{useState:ao,useEffect:vl,Fragment:lu}=wp.element,{BlockControls:au,useBlockProps:nu}=wp.blockEditor,{ToolbarButton:ru}=wp.components;function iu(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a}=o,[n,c]=ao(!1),[r,u]=ao(t.url||""),[i,d]=ao(!0),[m,p]=ao(!1),[h,x]=ao(!1),g=nu();vl(()=>{!a&&h&&x(!1)},[a,h]);const b=()=>{x(!0)},f=()=>{d(!1)},y=k=>(k&&typeof k=="string"&&(k=k.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),k=k.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),k),P=k=>{var E=/(?:https?:\/\/)?(?:[^./]+\.)?google\.(com?\.)?[a-z]+(?:\.[a-z]+)?/;return E.test(k)},v=k=>{if(k&&k.preventDefault(),s({url:r}),r&&r.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var E=y(r),z=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,q=z.exec(E),O=q[1];O&&O==="forms"?(c(!1),p(!1),s({iframeSrc:E,id:"embedpress-google-forms-"+Date.now()}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by})):(p(!0),c(!0))}else p(!0),c(!0);l&&r&&Tt(l,r)},w=()=>{c(!0)};vl(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{iframeSrc:j,powered_by:$,unitoption:S,width:_,height:B,sharePosition:N,contentShare:I,adManager:R,adSource:L,adFileUrl:J}=t;if(j&&!P(j))return"Invalid URL.";So("Google Forms URL");let W="";S=="%"?W="ep-percentage-width":W="ep-fixed-width";let V="",Z="",F=N||"right";return I&&(V="ep-content-share-enabled",Z="ep-share-position-"+F),!j||n?e.jsxs("div",{...g,children:[e.jsx(wl,{attributes:t,setAttributes:s}),e.jsx(Je,{label:So("Google Forms URL"),onSubmit:v,value:r,cannotEmbed:m,onChange:k=>u(k.target.value),icon:da,DocTitle:So("Learn More About Google Forms Embed"),docLink:"https://embedpress.com/docs/embed-google-forms-wordpress/"})]}):e.jsxs(lu,{children:[e.jsx(wl,{attributes:t,setAttributes:s}),e.jsx(au,{children:e.jsx(ru,{className:"components-edit-button",icon:"edit",label:So("Edit URL","embedpress"),onClick:w})}),i?e.jsx(Ne,{}):null,e.jsx("div",{...g,children:e.jsx("div",{className:"embedpress-document-embed ep-google-forms-"+t.id+" "+V+" "+Z+" "+W,id:`ep-google-forms-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${N}-wraper gutenberg-google-forms-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx(ut,{title:K(j),src:A(j),onMouseUp:b,onLoad:f,style:{width:S==="%"?_+"%":_+"px",height:B+"px",maxWidth:"100%",display:i?"none":""},frameBorder:"0"}),I&&e.jsx(_e,{attributes:t})]}),$&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),R&&L==="image"&&J&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})})]})}const du="https://schemas.wp.org/trunk/block.json",cu="Google Forms",pu="embedpress/google-forms-block",uu="embedpress",mu="Embed Google Forms with seamless integration for surveys, contact forms, and data collection with responsive design.",hu=2,gu="embedpress",fu="embedpress-blocks-editor",bu="embedpress-blocks-editor-style",yu="embedpress-blocks-style",xu={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},jl={$schema:du,title:cu,name:pu,category:uu,description:mu,apiVersion:hu,textdomain:gu,editorScript:fu,editorStyle:bu,style:yu,supports:xu},wu={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"450"},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:Lo}=wp.i18n,{registerBlockType:vu}=wp.blocks;let qa=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["google-forms-block"]&&(qa=!0);qa&&vu(jl.name,{...jl,icon:da,attributes:wu,keywords:[Lo("embedpress","embedpress"),Lo("google","embedpress"),Lo("forms","embedpress"),Lo("survey","embedpress")],edit:iu,save:Ap});const{useBlockProps:ju}=wp.blockEditor,Cu=({attributes:o})=>{const t=ju.save(),{iframeSrc:s,id:l,unitoption:a,width:n,height:c,powered_by:r,clientId:u,sharePosition:i,contentShare:d,adManager:m,adSource:p,adFileUrl:h,enableLazyLoad:x}=o;if(!s)return null;let g="";a==="%"?g="ep-percentage-width":g="ep-fixed-width";let b="",f="",y=i||"right";d&&(b="ep-content-share-enabled",f="ep-share-position-"+y);const P=ye(u||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${P}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-google-maps-"+l+" "+b+" "+f+" "+g,id:`ep-google-maps-${u}`,"data-source-id":"source-"+u,"data-embed-type":"Google Maps",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${i}-wraper gutenberg-google-maps-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[x?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":A(s),"data-ep-iframe-style":`width: ${a==="%"?n+"%":n+"px"}; height: ${c}px; max-width: 100%;`,"data-ep-iframe-frameborder":"0","data-ep-iframe-allowfullscreen":"true","data-ep-iframe-mozallowfullscreen":"true","data-ep-iframe-webkitallowfullscreen":"true","data-ep-iframe-title":K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"}}):e.jsx("iframe",{src:A(s),title:K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"},frameBorder:"0",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),d&&e.jsx(_e,{attributes:o})]}),r&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),m&&p==="image"&&h&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1})]})})})})},{__:$t}=wp.i18n,{InspectorControls:_u}=wp.blockEditor,{PanelBody:us,TextControl:Cl,RadioControl:ku,ToggleControl:$u,Tooltip:Pu}=wp.components,{applyFilters:_l}=wp.hooks,kl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,powered_by:n,enableLazyLoad:c}=o,r=_l("embedpress.togglePlaceholder",[],$t("Enable Lazy Loading","embedpress"),c,!0);return e.jsxs(_u,{children:[e.jsxs(us,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",$t("Embed Size","embedpress")]}),className:"embedpress-google-maps-control",children:[e.jsxs("div",{className:"ep-google-maps-width-control",children:[e.jsx(ku,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:u=>{const i={unitoption:u};u==="%"&&parseFloat(s)>100&&(i.width="100"),t(i)},className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(Cl,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[$t("Width"),e.jsx(Pu,{text:$t("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:s,type:"number",onChange:u=>{let i=u;a==="%"&&parseFloat(u)>100&&(i="100"),t({width:i})}})})]}),e.jsx(Cl,{label:$t("Height","embedpress"),value:l,type:"number",onChange:u=>t({height:u})})]}),e.jsx(us,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",$t("General","embedpress")]}),className:"embedpress-google-maps-general",children:e.jsx($u,{label:$t("Powered By","embedpress"),checked:n,onChange:u=>t({powered_by:u})})}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(us,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",$t("Lazy Loading","embedpress")]}),children:_l("embedpress.toggleLazyLoad",[r],o,t)}),e.jsx(Ke,{})]})},{__:To}=wp.i18n,{useState:no,useEffect:$l,Fragment:Su}=wp.element,{BlockControls:Lu,useBlockProps:Tu}=wp.blockEditor,{ToolbarButton:Bu}=wp.components;function Fu(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a}=o,[n,c]=no(!1),[r,u]=no(t.url||""),[i,d]=no(!0),[m,p]=no(!1),[h,x]=no(!1),g=Tu();$l(()=>{!a&&h&&x(!1)},[a,h]);const b=()=>{x(!0)},f=()=>{d(!1)},y=k=>(k&&typeof k=="string"&&(k=k.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),k=k.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),k),P=k=>{var E=/(?:https?:\/\/)?(?:[^./]+\.)?google\.(com?\.)?[a-z]+(?:\.[a-z]+)?/;return E.test(k)},v=k=>{if(k&&k.preventDefault(),s({url:r}),r&&r.match(/^http[s]?:\/\/(?:(?:(?:www\.|maps\.)?(?:google\.com?))|(?:goo\.gl))(?:\.[a-z]{2})?\/(?:maps\/)?(?:place\/)?(?:[a-z0-9\/%+\-_]*)?([a-z0-9\/%,+\-_=!:@\.&*\$#?\']*)/i)){var E=y(r);if(!r.match("~(maps/embed|output=embed)~i")){var z=/@(-?[0-9\.]+,-?[0-9\.]+).+,([0-9\.]+[a-z])/i,q=z.exec(E);q&&q.length>1&&q[1]&&q[2]?E="https://maps.google.com/maps?hl=en&ie=UTF8&ll="+q[1]+"&spn="+q[1]+"&t=m&z="+Math.round(parseInt(q[2]))+"&output=embed":(p(!0),c(!0))}c(!1),p(!1),s({iframeSrc:E,id:"embedpress-google-maps-"+Date.now()}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by})}else p(!0),c(!0);l&&r&&Tt(l,r)},w=()=>{c(!0)};$l(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{iframeSrc:j,powered_by:$,unitoption:S,width:_,height:B,sharePosition:N,contentShare:I,adManager:R,adSource:L,adFileUrl:J}=t;if(j&&!P(j))return"Invalid URL.";To("Google Maps URL");let W="";S=="%"?W="ep-percentage-width":W="ep-fixed-width";let V="",Z="",F=N||"right";return I&&(V="ep-content-share-enabled",Z="ep-share-position-"+F),!j||n?e.jsxs("div",{...g,children:[e.jsx(kl,{attributes:t,setAttributes:s}),e.jsx(Je,{label:To("Google Maps URL"),onSubmit:v,value:r,cannotEmbed:m,onChange:k=>u(k.target.value),icon:pa,DocTitle:To("Learn More About Google Maps Embed"),docLink:"https://embedpress.com/docs/embed-google-maps-wordpress/"})]}):e.jsxs(Su,{children:[e.jsx(kl,{attributes:t,setAttributes:s}),e.jsx(Lu,{children:e.jsx(Bu,{className:"components-edit-button",icon:"edit",label:To("Edit URL","embedpress"),onClick:w})}),i?e.jsx(Ne,{}):null,e.jsx("div",{...g,children:e.jsx("div",{className:"embedpress-document-embed ep-google-maps-"+t.id+" "+V+" "+Z+" "+W,id:`ep-google-maps-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${N}-wraper gutenberg-google-maps-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx(ut,{title:K(j),src:A(j),onMouseUp:b,onLoad:f,style:{width:S==="%"?_+"%":_+"px",height:B+"px",maxWidth:"100%",display:i?"none":""},frameBorder:"0"}),I&&e.jsx(_e,{attributes:t})]}),$&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),R&&L==="image"&&J&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})})]})}const Eu="https://schemas.wp.org/trunk/block.json",Du="Google Maps",Nu="embedpress/google-maps-block",Mu="embedpress",zu="Embed Google Maps with interactive location features, custom markers, and responsive map controls for enhanced user experience.",Uu=2,Iu="embedpress",Gu="embedpress-blocks-editor",Ru="embedpress-blocks-editor-style",Hu="embedpress-blocks-style",Ou={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},Pl={$schema:Eu,title:Du,name:Nu,category:Mu,description:zu,apiVersion:Uu,textdomain:Iu,editorScript:Gu,editorStyle:Ru,style:Hu,supports:Ou},Vu={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"450"},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:Bo}=wp.i18n,{registerBlockType:Wu}=wp.blocks;let Ya=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["google-maps-block"]&&(Ya=!0);Ya&&Wu(Pl.name,{...Pl,icon:pa,attributes:Vu,keywords:[Bo("embedpress","embedpress"),Bo("google","embedpress"),Bo("maps","embedpress"),Bo("location","embedpress")],edit:Fu,save:Cu});const{useBlockProps:qu}=wp.blockEditor,Yu=({attributes:o})=>{const t=qu.save(),{iframeSrc:s,id:l,unitoption:a,width:n,height:c,powered_by:r,clientId:u,sharePosition:i,contentShare:d,adManager:m,adSource:p,adFileUrl:h,enableLazyLoad:x}=o;if(!s)return null;let g="";a==="%"?g="ep-percentage-width":g="ep-fixed-width";let b="",f="",y=i||"right";d&&(b="ep-content-share-enabled",f="ep-share-position-"+y);const P=ye(u||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${P}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-google-sheets-"+l+" "+b+" "+f+" "+g,id:`ep-google-sheets-${u}`,"data-source-id":"source-"+u,"data-embed-type":"Google Sheets",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${i}-wraper gutenberg-google-sheets-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[x?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":A(s),"data-ep-iframe-style":`width: ${a==="%"?n+"%":n+"px"}; height: ${c}px; max-width: 100%;`,"data-ep-iframe-frameborder":"0","data-ep-iframe-allowfullscreen":"true","data-ep-iframe-mozallowfullscreen":"true","data-ep-iframe-webkitallowfullscreen":"true","data-ep-iframe-title":K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"}}):e.jsx("iframe",{src:A(s),title:K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"},frameBorder:"0",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),d&&e.jsx(_e,{attributes:o})]}),r&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),m&&p==="image"&&h&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1})]})})})})},{__:Nt}=wp.i18n,{InspectorControls:Zu}=wp.blockEditor,{PanelBody:Sl,TextControl:Ll,RadioControl:Xu,ToggleControl:Ju,Tooltip:Ku}=wp.components,{applyFilters:Tl}=wp.hooks,Bl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,powered_by:n,enableLazyLoad:c}=o,r=Tl("embedpress.togglePlaceholder",[],Nt("Enable Lazy Loading","embedpress"),c,!0);return e.jsxs(Zu,{children:[e.jsxs(Sl,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Nt("Embed Size","embedpress")]}),className:"embedpress-google-sheets-control",children:[e.jsxs("div",{className:"ep-google-sheets-width-control",children:[e.jsx(Xu,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:u=>{const i={unitoption:u};u==="%"&&parseFloat(s)>100&&(i.width="100"),t(i)},className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(Ll,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[Nt("Width"),e.jsx(Ku,{text:Nt("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:s,type:"number",onChange:u=>{let i=u;a==="%"&&parseFloat(u)>100&&(i="100"),t({width:i})}})})]}),e.jsx(Ll,{label:Nt("Height","embedpress"),value:l,type:"number",onChange:u=>t({height:u})}),e.jsx(Ju,{label:Nt("Powered By","embedpress"),checked:n,onChange:u=>t({powered_by:u})})]}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(Sl,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Nt("Lazy Loading","embedpress")]}),children:Tl("embedpress.toggleLazyLoad",[r],o,t)}),e.jsx(Ke,{})]})},{__:Fo}=wp.i18n,{useState:ro,useEffect:Fl,Fragment:Qu}=wp.element,{BlockControls:Au,useBlockProps:em}=wp.blockEditor,{ToolbarButton:tm}=wp.components;function om(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a}=o,[n,c]=ro(!1),[r,u]=ro(t.url||""),[i,d]=ro(!0),[m,p]=ro(!1),[h,x]=ro(!1),g=em();Fl(()=>{!a&&h&&x(!1)},[a,h]);const b=()=>{x(!0)},f=()=>{d(!1)},y=k=>(k&&typeof k=="string"&&(k=k.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),k=k.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),k),P=k=>{var E=/(?:https?:\/\/)?(?:[^./]+\.)?google\.(com?\.)?[a-z]+(?:\.[a-z]+)?/;return E.test(k)},v=k=>{if(k&&k.preventDefault(),s({url:r}),r&&r.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var E=y(r),z=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,q=z.exec(E),O=q[1];if(O&&O==="spreadsheets"){if(E.indexOf("?")>-1){var Y=E.split("?");if(Y=Y[1],Y=Y.split("&"),Y.length>0){var T=!1,re=!1;Y.map(ie=>{ie.indexOf("widget=")?re=!0:ie.indexOf("headers=")&&(T=!0)}),re||(E+="&widget=true"),T||(E+="&headers=false")}}else E+="?widget=true&headers=false";c(!1),p(!1),s({iframeSrc:E,id:"embedpress-google-sheets-"+Date.now()}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by})}else p(!0),c(!0)}else p(!0),c(!0);l&&r&&Tt(l,r)},w=()=>{c(!0)};Fl(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{iframeSrc:j,powered_by:$,unitoption:S,width:_,height:B,sharePosition:N,contentShare:I,adManager:R,adSource:L,adFileUrl:J}=t;if(j&&!P(j))return"Invalid URL.";Fo("Google Sheets URL");let W="";S=="%"?W="ep-percentage-width":W="ep-fixed-width";let V="",Z="",F=N||"right";return I&&(V="ep-content-share-enabled",Z="ep-share-position-"+F),!j||n?e.jsxs("div",{...g,children:[e.jsx(Bl,{attributes:t,setAttributes:s}),e.jsx(Je,{label:Fo("Google Sheets URL"),onSubmit:v,value:r,cannotEmbed:m,onChange:k=>u(k.target.value),icon:ia,DocTitle:Fo("Learn More About Google Sheets Embed"),docLink:"https://embedpress.com/docs/embed-google-sheets-wordpress/"})]}):e.jsxs(Qu,{children:[e.jsx(Bl,{attributes:t,setAttributes:s}),e.jsx(Au,{children:e.jsx(tm,{className:"components-edit-button",icon:"edit",label:Fo("Edit URL","embedpress"),onClick:w})}),i?e.jsx(Ne,{}):null,e.jsx("div",{...g,children:e.jsx("div",{className:"embedpress-document-embed ep-google-sheets-"+t.id+" "+V+" "+Z+" "+W,id:`ep-google-sheets-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${N}-wraper gutenberg-google-sheets-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx(ut,{title:K(j),src:A(j),onMouseUp:b,onLoad:f,style:{width:S==="%"?_+"%":_+"px",height:B+"px",maxWidth:"100%",display:i?"none":""},frameBorder:"0"}),I&&e.jsx(_e,{attributes:t})]}),$&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),R&&L==="image"&&J&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})})]})}const sm="https://schemas.wp.org/trunk/block.json",lm="Google Sheets",am="embedpress/google-sheets-block",nm="embedpress",rm="Embed Google Sheets spreadsheets with live data updates and customizable display options for collaborative content.",im=2,dm="embedpress",cm="embedpress-blocks-editor",pm="embedpress-blocks-editor-style",um="embedpress-blocks-style",mm={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},El={$schema:sm,title:lm,name:am,category:nm,description:rm,apiVersion:im,textdomain:dm,editorScript:cm,editorStyle:pm,style:um,supports:mm},hm={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"450"},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:Eo}=wp.i18n,{registerBlockType:gm}=wp.blocks;let Za=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["google-sheets-block"]&&(Za=!0);Za&&gm(El.name,{...El,icon:ia,attributes:hm,keywords:[Eo("embedpress","embedpress"),Eo("google","embedpress"),Eo("sheets","embedpress"),Eo("spreadsheet","embedpress")],edit:om,save:Yu});const{useBlockProps:fm}=wp.blockEditor,bm=({attributes:o})=>{const t=fm.save(),{iframeSrc:s,id:l,unitoption:a,width:n,height:c,powered_by:r,clientId:u,sharePosition:i,contentShare:d,adManager:m,adSource:p,adFileUrl:h,enableLazyLoad:x}=o;if(!s)return null;let g="";a==="%"?g="ep-percentage-width":g="ep-fixed-width";let b="",f="",y=i||"right";d&&(b="ep-content-share-enabled",f="ep-share-position-"+y);const P=ye(u||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${P}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"embedpress-document-embed ep-google-slides-"+l+" "+b+" "+f+" "+g,id:`ep-google-slides-${u}`,"data-source-id":"source-"+u,"data-embed-type":"Google Slides",children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${i}-wraper gutenberg-google-slides-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[x?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":A(s),"data-ep-iframe-style":`width: ${a==="%"?n+"%":n+"px"}; height: ${c}px; max-width: 100%;`,"data-ep-iframe-frameborder":"0","data-ep-iframe-allowfullscreen":"true","data-ep-iframe-mozallowfullscreen":"true","data-ep-iframe-webkitallowfullscreen":"true","data-ep-iframe-title":K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"}}):e.jsx("iframe",{src:A(s),title:K(s),style:{width:a==="%"?n+"%":n+"px",height:c+"px",maxWidth:"100%"},frameBorder:"0",allowFullScreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),d&&e.jsx(_e,{attributes:o})]}),r&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"})]}),m&&p==="image"&&h&&e.jsx(Ce,{attributes:o,deleteIcon:!1,progressBar:!1})]})})})})},{__:Pt}=wp.i18n,{InspectorControls:ym}=wp.blockEditor,{PanelBody:ms,TextControl:Dl,RadioControl:xm,ToggleControl:wm,Tooltip:vm}=wp.components,{applyFilters:Nl}=wp.hooks,Ml=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,powered_by:n,enableLazyLoad:c}=o,r=Nl("embedpress.togglePlaceholder",[],Pt("Enable Lazy Loading","embedpress"),c,!0);return e.jsxs(ym,{children:[e.jsxs(ms,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Pt("Embed Size","embedpress")]}),className:"embedpress-google-slides-control",children:[e.jsxs("div",{className:"ep-google-slides-width-control",children:[e.jsx(xm,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:u=>{const i={unitoption:u};u==="%"&&parseFloat(s)>100&&(i.width="100"),t(i)},className:"ep-unit-choice-option"}),e.jsx("div",{className:"ep-width-control-with-tooltip",children:e.jsx(Dl,{label:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[Pt("Width"),e.jsx(vm,{text:Pt("Works as max container width","embedpress"),position:"top",children:e.jsx("span",{style:{display:"inline-flex",cursor:"help"},children:lt})})]}),value:s,type:"number",onChange:u=>{let i=u;a==="%"&&parseFloat(u)>100&&(i="100"),t({width:i})}})})]}),e.jsx(Dl,{label:Pt("Height","embedpress"),value:l,type:"number",onChange:u=>t({height:u})})]}),e.jsx(ms,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Pt("General","embedpress")]}),className:"embedpress-google-slides-general",children:e.jsx(wm,{label:Pt("Powered By","embedpress"),checked:n,onChange:u=>t({powered_by:u})})}),e.jsx(at,{attributes:o,setAttributes:t}),e.jsx(pt,{attributes:o,setAttributes:t}),e.jsx(ct,{attributes:o,setAttributes:t}),e.jsx(ms,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Pt("Lazy Loading","embedpress")]}),children:Nl("embedpress.toggleLazyLoad",[r],o,t)}),e.jsx(Ke,{})]})},{__:hs}=wp.i18n,{useState:io,useEffect:zl,Fragment:jm}=wp.element,{BlockControls:qf,useBlockProps:Cm}=wp.blockEditor,{ToolbarButton:Yf}=wp.components;function _m(o){const{attributes:t,setAttributes:s,clientId:l,isSelected:a}=o,[n,c]=io(!1),[r,u]=io(t.url||""),[i,d]=io(!0),[m,p]=io(!1),[h,x]=io(!1),g=Cm();zl(()=>{!a&&h&&x(!1)},[a,h]);const b=()=>{x(!0)},f=()=>{d(!1)},y=F=>(F&&typeof F=="string"&&(F=F.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),F=F.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),F),P=F=>{var k=/(?:https?:\/\/)?(?:[^./]+\.)?google\.(com?\.)?[a-z]+(?:\.[a-z]+)?/;return k.test(F)},v=F=>{if(F&&F.preventDefault(),s({url:r}),r&&r.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var k=y(r),E=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,z=E.exec(k),q=z[1];q&&q==="presentation"?(k.match(/pub\?/i)&&(k=k.replace("/pub?","/embed?")),c(!1),p(!1),s({iframeSrc:k,id:"embedpress-google-slides-"+Date.now()}),embedpressGutenbergData.branding!==void 0&&embedpressGutenbergData.branding.powered_by!==void 0&&s({powered_by:embedpressGutenbergData.branding.powered_by})):(p(!0),c(!0))}else p(!0),c(!0);l&&r&&Tt(l,r)};zl(()=>{(l==null||l==null)&&s({clientId:l})},[]);const{iframeSrc:w,powered_by:j,unitoption:$,width:S,height:_,sharePosition:B,contentShare:N,adManager:I,adSource:R,adFileUrl:L}=t;if(w&&!P(w))return"Invalid URL.";hs("Google Slides URL");let J="";$=="%"?J="ep-percentage-width":J="ep-fixed-width";let W="",V="",Z=B||"right";return N&&(W="ep-content-share-enabled",V="ep-share-position-"+Z),!w||n?e.jsxs("div",{...g,children:[e.jsx(Ml,{attributes:t,setAttributes:s}),e.jsx(Je,{label:hs("Google Slides URL"),onSubmit:v,value:r,cannotEmbed:m,onChange:F=>u(F.target.value),icon:ra,DocTitle:hs("Learn More About Google Slides Embed"),docLink:"https://embedpress.com/docs/embed-google-slides-wordpress/"})]}):e.jsxs(jm,{children:[e.jsx(Ml,{attributes:t,setAttributes:s}),i?e.jsx(Ne,{}):null,e.jsx("div",{...g,children:e.jsx("div",{className:"embedpress-document-embed ep-google-slides-"+t.id+" "+W+" "+V+" "+J,id:`ep-google-slides-${t.clientId||l}`,"data-source-id":"source-"+(t.clientId||l),children:e.jsxs("div",{className:"ep-embed-content-wraper",children:[e.jsxs("div",{className:`position-${B}-wraper gutenberg-google-slides-wraper`,children:[e.jsxs("div",{className:"main-content-wraper",children:[e.jsx(ut,{title:K(w),src:A(w),onMouseUp:b,onLoad:f,style:{width:$==="%"?S+"%":S+"px",height:_+"px",maxWidth:"100%",display:i?"none":""},frameBorder:"0"}),N&&e.jsx(_e,{attributes:t})]}),j&&e.jsx("p",{className:"embedpress-el-powered",children:"Powered By EmbedPress"}),e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>s({interactive:!0})})]}),I&&R==="image"&&L&&e.jsx(Ce,{attributes:t,setAttributes:s,deleteIcon:!1,progressBar:!1,inEditor:!0})]})})})]})}const km="https://schemas.wp.org/trunk/block.json",$m="Google Slides",Pm="embedpress/google-slides-block",Sm="embedpress",Lm="Embed Google Slides presentations with interactive slideshow features and customizable viewing options.",Tm=2,Bm="embedpress",Fm="embedpress-blocks-editor",Em="embedpress-blocks-editor-style",Dm="embedpress-blocks-style",Nm={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},Ul={$schema:km,title:$m,name:Pm,category:Sm,description:Lm,apiVersion:Tm,textdomain:Bm,editorScript:Fm,editorStyle:Em,style:Dm,supports:Nm},Mm={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},powered_by:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.poweredBy<"u"?embedpressGutenbergData.poweredBy:!0},unitoption:{type:"string",default:"px"},width:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||"600"},height:{type:"string",default:(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||"450"},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1},contentShare:{type:"boolean",default:!1},sharePosition:{type:"string",default:"right"},customTitle:{type:"string",default:""},customDescription:{type:"string",default:""},customThumbnail:{type:"string",default:""},shareFacebook:{type:"boolean",default:!0},shareTwitter:{type:"boolean",default:!0},sharePinterest:{type:"boolean",default:!0},shareLinkedin:{type:"boolean",default:!0},adManager:{type:"boolean",default:!1},adSource:{type:"string",default:"video"},adContent:{type:"object"},adFileUrl:{type:"string",default:""},adWidth:{type:"string",default:"300"},adHeight:{type:"string",default:"200"},adXPosition:{type:"number",default:25},adYPosition:{type:"number",default:10},adUrl:{type:"string",default:""},adStart:{type:"string",default:"10"},adSkipButton:{type:"boolean",default:!0},adSkipButtonAfter:{type:"string",default:"5"},lockContent:{type:"boolean",default:!1},protectionType:{type:"string",default:"password"},userRole:{type:"array",default:[]},protectionMessage:{type:"string",default:"You do not have access to this content. Only users with the following roles can view it: [user_roles]"},contentPassword:{type:"string",default:""},lockHeading:{type:"string",default:"Content Locked"},lockSubHeading:{type:"string",default:"Content is locked and requires password to access it."},lockErrorMessage:{type:"string",default:"Oops, that wasn't the right password. Try again."},passwordPlaceholder:{type:"string",default:"Password"},submitButtonText:{type:"string",default:"Unlock"},submitUnlockingText:{type:"string",default:"Unlocking"},enableFooterMessage:{type:"boolean",default:!1},footerMessage:{type:"string",default:"In case you don't have the password, kindly reach out to content owner or administrator to request access."}},{__:Do}=wp.i18n,{registerBlockType:zm}=wp.blocks;let Xa=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["google-slides-block"]&&(Xa=!0);Xa&&zm(Ul.name,{...Ul,icon:ra,attributes:Mm,keywords:[Do("embedpress","embedpress"),Do("google","embedpress"),Do("slides","embedpress"),Do("presentation","embedpress")],edit:_m,save:bm});const Um=o=>{const{iframeSrc:t,attrs:s,enableLazyLoad:l,customPlayer:a,clientId:n}=o.attributes,c="ose-twitch-presentation",r=t+"&parent="+embedpressGutenbergData.twitch_host,u=l&&!a,i=ye(n||"");return e.jsx("div",{id:`ep-gutenberg-content-${i}`,className:"ep-gutenberg-content",children:e.jsx("figure",{className:c,"data-embed-type":"Twitch",children:u?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":r,"data-ep-iframe-frameborder":"0","data-ep-iframe-width":"600","data-ep-iframe-height":"450","data-ep-iframe-title":K(t),style:{width:"600px",height:"450px",maxWidth:"100%"}}):e.jsx("iframe",{src:r,...s,frameBorder:"0",width:"600",title:K(t),height:"450"})})})},{__:No}=wp.i18n,{InspectorControls:Im}=wp.blockEditor,{PanelBody:Il,RangeControl:Gl,RadioControl:Gm,ToggleControl:Zf}=wp.components,{applyFilters:Rl}=wp.hooks,Hl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,enableLazyLoad:n}=o,c=Rl("embedpress.togglePlaceholder",[],No("Enable Lazy Loading","embedpress"),n,!0),r=1,u=1e3,i=a==="%"?100:1e3;return e.jsxs(Im,{children:[e.jsxs(Il,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",No("Embed Size","embedpress")]}),className:"embedpress-twitch-control",children:[e.jsxs("div",{className:"ep-twitch-width-control",children:[e.jsx(G,{classname:"ep-control-header",headerText:"WIDTH"}),e.jsx(Gm,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:m=>t({unitoption:m}),className:"ep-unit-choice-option"}),e.jsx(Gl,{value:s,onChange:m=>t({width:m}),max:i,min:1})]}),e.jsx(Gl,{label:No("Height","embedpress"),value:l,onChange:m=>t({height:m}),min:r,max:u})]}),e.jsx(Il,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",No("Lazy Loading","embedpress")]}),children:Rl("embedpress.toggleLazyLoad",[c],o,t)}),e.jsx(Ke,{})]})},{__:Ol}=wp.i18n,{useState:Rm,useEffect:Hm}=wp.element,{useBlockProps:Om}=wp.blockEditor;function Vm({attributes:o,setAttributes:t,isSelected:s}){const l=Om(),{url:a,iframeSrc:n,width:c,height:r,unitoption:u}=o,[i,d]=Rm({editingURL:!1,url:a||"",fetching:!1,cannotEmbed:!1,interactive:!1}),{editingURL:m,url:p,fetching:h,cannotEmbed:x,interactive:g}=i;Hm(()=>{!s&&g&&d(j=>({...j,interactive:!1}))},[s,g]);const b=()=>{d(j=>({...j,interactive:!0}))},f=()=>{d(j=>({...j,fetching:!1}))},y=j=>(j&&typeof j=="string"&&(j=j.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),j=j.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,"")),j),P=j=>{j&&j.preventDefault(),t({url:p});var $=/http[s]?:\/\/(?:www\.|clips\.)twitch\.tv\/([0-9a-zA-Z\-\_]+)\/?(chat\/?$|[0-9a-z\-\_]*)?/;if(p&&p.match($)){var S=y(p),_=$.exec(S),B=_[1],N="channel",I;switch(p.indexOf("clips.twitch.tv")>-1?N="clip":p.indexOf("/videos/")>-1?N="video":p.indexOf("#/chat$#")>-1&&(N="chat"),N){case"channel":S="https://player.twitch.tv/?channel="+B,I={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"clip":S="https://clips.twitch.tv/embed?clip="+B+"&autoplay=false",I={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"video":B=_[2],S="https://player.twitch.tv/?video="+B,I={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"chat":S="http://www.twitch.tv/embed/"+B+"/chat",I={scrolling:"yes",frameborder:"0",allowfullscreen:"true",id:"'"+B+"'"};break}d(R=>({...R,editingURL:!1,cannotEmbed:!1})),t({iframeSrc:S,attrs:I})}else d(R=>({...R,cannotEmbed:!0,editingURL:!0}))},v=Ol("Twitch URL");let w="";return u=="%"?w="ep-percentage-width":w="ep-fixed-width",!n||m?e.jsxs("div",{...l,children:[e.jsx(Hl,{attributes:o,setAttributes:t}),e.jsx(Je,{label:v,onSubmit:P,value:p,cannotEmbed:x,onChange:j=>d($=>({...$,url:j.target.value})),icon:ua,DocTitle:Ol("Learn more about Twitch embed"),docLink:"https://embedpress.com/docs/embed-twitch-wordpress/"})]}):e.jsxs("div",{...l,children:[e.jsx(Hl,{attributes:o,setAttributes:t}),e.jsxs("div",{className:`embedpress-twitch-embed ${w}`,style:{width:u==="%"?`${c}%`:`${c}px`,height:`${r}px`},children:[h?e.jsx(Ne,{}):null,e.jsx(ut,{src:A(n),onMouseUp:b,onLoad:f,style:{display:h?"none":"",width:"100%",height:"100%"},frameBorder:"0",width:u==="%"?"100%":c,height:r,title:K(n)}),!g&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:b})]})]})}const Wm="https://schemas.wp.org/trunk/block.json",qm="Twitch",Ym="embedpress/twitch-block",Zm="embedpress",Xm="Embed Twitch videos, streams, and clips with customizable player options and responsive sizing controls.",Jm=2,Km="embedpress",Qm="embedpress-blocks-editor",Am="embedpress-blocks-editor-style",eh="embedpress-blocks-style",th={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},Vl={$schema:Wm,title:qm,name:Ym,category:Zm,description:Xm,apiVersion:Jm,textdomain:Km,editorScript:Qm,editorStyle:Am,style:eh,supports:th},oh={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},attrs:{type:"string",default:""},unitoption:{type:"string",default:"px"},width:{type:"number",default:parseInt(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||600},height:{type:"number",default:parseInt(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||450},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1}},{__:Mo}=wp.i18n,{registerBlockType:sh}=wp.blocks;let Ja=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["twitch-block"]&&(Ja=!0);Ja&&sh(Vl.name,{...Vl,icon:ua,attributes:oh,keywords:[Mo("embedpress","embedpress"),Mo("twitch","embedpress"),Mo("stream","embedpress"),Mo("gaming","embedpress")],edit:Vm,save:Um});const lh=o=>{const{iframeSrc:t,width:s,height:l,enableLazyLoad:a,customPlayer:n,clientId:c}=o.attributes,r=a&&!n,u=ye(c||"");return e.jsx("div",{id:`ep-gutenberg-content-${u}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:"ose-wistia","data-embed-type":"Wistia",children:r?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":t,"data-ep-iframe-allowtransparency":"true","data-ep-iframe-frameborder":"0","data-ep-iframe-class":"wistia_embed","data-ep-iframe-name":"wistia_embed","data-ep-iframe-width":s,"data-ep-iframe-height":l,"data-ep-iframe-title":K(t),style:{width:`${s}px`,height:`${l}px`,maxWidth:"100%"}}):e.jsx("iframe",{src:t,allowtransparency:"true",frameBorder:"0",className:"wistia_embed",name:"wistia_embed",width:s,height:l,title:K(t)})})})},{__:zo}=wp.i18n,{InspectorControls:ah}=wp.blockEditor,{PanelBody:Wl,RangeControl:ql,RadioControl:nh,ToggleControl:Xf}=wp.components,{applyFilters:Yl}=wp.hooks,Zl=({attributes:o,setAttributes:t})=>{const{width:s,height:l,unitoption:a,enableLazyLoad:n}=o,c=Yl("embedpress.togglePlaceholder",[],zo("Enable Lazy Loading","embedpress"),n,!0),r=1,u=1e3,i=a==="%"?100:1e3;return e.jsxs(ah,{children:[e.jsxs(Wl,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",zo("Embed Size","embedpress")]}),className:"embedpress-wistia-control",children:[e.jsxs("div",{className:"ep-wistia-width-control",children:[e.jsx(G,{classname:"ep-control-header",headerText:"WIDTH"}),e.jsx(nh,{selected:a,options:[{label:"%",value:"%"},{label:"PX",value:"px"}],onChange:m=>t({unitoption:m}),className:"ep-unit-choice-option"}),e.jsx(ql,{value:s,onChange:m=>t({width:m}),max:i,min:1})]}),e.jsx(ql,{label:zo("Height","embedpress"),value:l,onChange:m=>t({height:m}),min:r,max:u})]}),e.jsx(Wl,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",zo("Lazy Loading","embedpress")]}),children:Yl("embedpress.toggleLazyLoad",[c],o,t)}),e.jsx(Ke,{})]})},{__:Xl}=wp.i18n,{useState:rh,useEffect:ih}=wp.element,{useBlockProps:dh}=wp.blockEditor;function ch({attributes:o,setAttributes:t,isSelected:s}){const l=dh(),{url:a,iframeSrc:n,width:c,height:r,unitoption:u}=o,[i,d]=rh({editingURL:!1,url:a||"",fetching:!1,cannotEmbed:!1,interactive:!1,mediaId:""}),{editingURL:m,url:p,fetching:h,cannotEmbed:x,interactive:g}=i;ih(()=>{!s&&g&&d(j=>({...j,interactive:!1}))},[s,g]);const b=()=>{d(j=>({...j,interactive:!0}))},f=()=>{if(d(j=>({...j,fetching:!1})),embedpressGutenbergData.wisita_options){let j={...i};setTimeout(function(){let $=document.createElement("script");$.src="https://fast.wistia.com/assets/external/E-v1.js",$.charset="ISO-8859-1",document.body.appendChild($)},100),setTimeout(function(){let $=document.createElement("script");$.type="text/javascript",$.innerHTML="window.pp_embed_wistia_labels = "+embedpressGutenbergData.wistia_labels,document.body.appendChild($),$=document.createElement("script"),$.type="text/javascript",$.innerHTML='wistiaEmbed = Wistia.embed( "'+j.mediaId+'", '+embedpressGutenbergData.wisita_options+" );",document.body.appendChild($)},400)}},y=j=>{j&&j.preventDefault(),t({url:p});const $=p.match(/(?:wistia\.com\/medias\/|wi\.st\/)([a-zA-Z0-9]+)/);if(p&&$){let S=$[1],_=`//fast.wistia.net/embed/iframe/${S}`;d(B=>({...B,editingURL:!1,cannotEmbed:!1,mediaId:S})),t({iframeSrc:_})}else d(S=>({...S,cannotEmbed:!0,editingURL:!0}))};if(n&&!(j=>/^\/\/fast\.wistia\.net\/embed\/iframe\//.test(j))(n))return e.jsx("div",{...l,children:"Invalid URL."});const v=Xl("Wistia URL");let w="";return u=="%"?w="ep-percentage-width":w="ep-fixed-width",!n||m?e.jsxs("div",{...l,children:[e.jsx(Zl,{attributes:o,setAttributes:t}),e.jsx(Je,{label:v,onSubmit:y,value:p,cannotEmbed:x,onChange:j=>d($=>({...$,url:j.target.value})),icon:ma,DocTitle:Xl("Learn more about Wistia embed"),docLink:"https://embedpress.com/docs/embed-wistia-wordpress/"})]}):e.jsxs("div",{...l,children:[e.jsx(Zl,{attributes:o,setAttributes:t}),e.jsxs("div",{className:`embedpress-wistia-embed ${w}`,style:{width:u==="%"?`${c}%`:`${c}px`,height:`${r}px`},children:[h?e.jsx(Ne,{}):null,e.jsx(ut,{src:A(n),onMouseUp:b,onLoad:f,style:{display:h?"none":"",width:"100%",height:"100%"},frameBorder:"0",width:u==="%"?"100%":c,height:r,title:K(n)}),!g&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:b})]})]})}const ph="https://schemas.wp.org/trunk/block.json",uh="Wistia",mh="embedpress/wistia-block",hh="embedpress",gh="Embed Wistia videos with professional video hosting features and advanced analytics integration.",fh=2,bh="embedpress",yh="embedpress-blocks-editor",xh="embedpress-blocks-editor-style",wh="embedpress-blocks-style",vh={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},Jl={$schema:ph,title:uh,name:mh,category:hh,description:gh,apiVersion:fh,textdomain:bh,editorScript:yh,editorStyle:xh,style:wh,supports:vh},jh={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},unitoption:{type:"string",default:"px"},width:{type:"number",default:parseInt(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||600},height:{type:"number",default:parseInt(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||450},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1}},{__:Uo}=wp.i18n,{registerBlockType:Ch}=wp.blocks;let Ka=!1;embedpressGutenbergData&&embedpressGutenbergData.activeBlocks&&embedpressGutenbergData.activeBlocks["wistia-block"]&&(Ka=!0);Ka&&Ch(Jl.name,{...Jl,icon:ma,attributes:jh,keywords:[Uo("embedpress","embedpress"),Uo("wistia","embedpress"),Uo("video","embedpress"),Uo("embed","embedpress")],edit:ch,save:lh});const{useBlockProps:_h}=wp.blockEditor,kh=({attributes:o})=>{const t=_h.save(),{iframeSrc:s,width:l,height:a,enableLazyLoad:n,customPlayer:c,clientId:r}=o;if(!s)return null;const u="ep-fixed-width",i=n&&!c,d=ye(r||"");return e.jsx("div",{...t,children:e.jsx("div",{id:`ep-gutenberg-content-${d}`,className:"ep-gutenberg-content",children:e.jsx("div",{className:`embedpress-youtube-embed ${u}`,style:{maxWidth:"100%",width:`${l}px`,height:`${a}px`},"data-embed-type":"YouTube",children:i?e.jsx("div",{className:"ep-lazy-iframe-placeholder","data-ep-lazy-src":A(s),"data-ep-iframe-style":"max-width: 100%; height: 100%;","data-ep-iframe-frameborder":"0","data-ep-iframe-width":l,"data-ep-iframe-height":a,"data-ep-iframe-allowfullscreen":"true","data-ep-iframe-title":K(s),style:{maxWidth:"100%",height:"100%"}}):e.jsx("iframe",{src:A(s),style:{maxWidth:"100%",height:"100%"},frameBorder:"0",width:l,height:a,allowFullScreen:!0,title:K(s)})})})})},{__:Io}=wp.i18n,{InspectorControls:$h}=wp.blockEditor,{PanelBody:Kl,RangeControl:Ql,ToggleControl:Jf}=wp.components,{applyFilters:Al}=wp.hooks,ea=({attributes:o,setAttributes:t})=>{const{width:s,height:l,enableLazyLoad:a}=o,n=Al("embedpress.togglePlaceholder",[],Io("Enable Lazy Loading","embedpress"),a,!0),c=1,r=1500;return e.jsxs($h,{children:[e.jsxs(Kl,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Io("Embed Size","embedpress")]}),className:"embedpress-youtube-control",children:[e.jsxs("div",{className:"ep-youtube-width-control",children:[e.jsx(G,{classname:"ep-control-header",headerText:"WIDTH"}),e.jsx(Ql,{value:s,onChange:u=>t({width:u}),min:c,max:r})]}),e.jsx(Ql,{label:Io("Height","embedpress"),value:l,onChange:u=>t({height:u}),min:c,max:r})]}),e.jsx(Kl,{title:e.jsxs("div",{className:"ep-pannel-icon",children:[U," ",Io("Lazy Loading","embedpress")]}),children:Al("embedpress.toggleLazyLoad",[n],o,t)}),e.jsx(Ke,{})]})},{__:ta}=wp.i18n,{useState:Ph,useEffect:Sh}=wp.element,{useBlockProps:Lh}=wp.blockEditor;function Th({attributes:o,setAttributes:t,isSelected:s}){const l=Lh(),{url:a,iframeSrc:n,width:c,height:r}=o,[u,i]=Ph({editingURL:!1,url:a||"",fetching:!1,cannotEmbed:!1,interactive:!1}),{editingURL:d,url:m,fetching:p,cannotEmbed:h,interactive:x}=u;Sh(()=>{!s&&x&&i(w=>({...w,interactive:!1}))},[s,x]);const g=()=>{i(w=>({...w,interactive:!0}))},b=()=>{i(w=>({...w,fetching:!1}))},f=w=>{w&&w.preventDefault(),t({url:m});const j=m.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/);if(m&&j){let S=j[1],_="https://www.youtube.com/embed/"+S,B=new URL(_);if(typeof embedpressProObj<"u")for(var $ in embedpressProObj.youtubeParams)B.searchParams.set($,embedpressProObj.youtubeParams[$]);i(N=>({...N,editingURL:!1,cannotEmbed:!1})),t({iframeSrc:B.href,mediaId:S})}else i(S=>({...S,cannotEmbed:!0,editingURL:!0}))};if(n&&!(w=>{var j=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return j.test(w)})(n))return e.jsx("div",{...l,children:"Invalid URL."});const P=ta("YouTube URL");let v="ep-fixed-width";return!n||d?e.jsxs("div",{...l,children:[e.jsx(ea,{attributes:o,setAttributes:t}),e.jsx(Je,{label:P,onSubmit:f,value:m,cannotEmbed:h,onChange:w=>i(j=>({...j,url:w.target.value})),icon:ha,DocTitle:ta("Learn more about YouTube embed"),docLink:"https://embedpress.com/docs/embed-youtube-wordpress/"})]}):e.jsxs("div",{...l,children:[e.jsx(ea,{attributes:o,setAttributes:t}),e.jsxs("div",{className:`embedpress-youtube-embed ${v}`,style:{maxWidth:"100%",width:`${c}px`,height:`${r}px`},children:[p?e.jsx(Ne,{}):null,e.jsx(ut,{src:A(n),onMouseUp:g,onLoad:b,style:{display:p?"none":"",width:"100%",height:"100%"},frameBorder:"0",width:c,height:r,title:K(n)}),!x&&e.jsx("div",{className:"block-library-embed__interactive-overlay",onMouseUp:g})]})]})}const Bh="https://schemas.wp.org/trunk/block.json",Fh="YouTube",Eh="embedpress/youtube-block",Dh="embedpress",Nh="Embed YouTube videos with advanced customization options including custom player controls, autoplay, and responsive sizing.",Mh=2,zh="embedpress",Uh="embedpress-blocks-editor",Ih="embedpress-blocks-editor-style",Gh="embedpress-blocks-style",Rh={align:["left","center","right","wide","full"],html:!1,anchor:!0,lightBlockWrapper:!0,default:"center"},Hh={$schema:Bh,title:Fh,name:Eh,category:Dh,description:Nh,apiVersion:Mh,textdomain:zh,editorScript:Uh,editorStyle:Ih,style:Gh,supports:Rh},Oh={url:{type:"string",default:""},iframeSrc:{type:"string",default:""},mediaId:{type:"string",default:""},unitoption:{type:"string",default:"px"},width:{type:"number",default:parseInt(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_width)||600},height:{type:"number",default:parseInt(embedpressGutenbergData==null?void 0:embedpressGutenbergData.iframe_height)||450},interactive:{type:"boolean",default:!1},enableLazyLoad:{type:"boolean",default:typeof embedpressGutenbergData<"u"&&typeof embedpressGutenbergData.lazyLoad<"u"?embedpressGutenbergData.lazyLoad:!1}},{__:Go}=wp.i18n;co(Hh,{icon:ha,attributes:Oh,keywords:[Go("embedpress","embedpress"),Go("youtube","embedpress"),Go("video","embedpress"),Go("embed","embedpress")],edit:Th,save:kh});const{addFilter:Mt,applyFilters:st}=wp.hooks,{MediaUpload:Vh}=wp.blockEditor,{__:Se}=wp.i18n,{ToggleControl:Wh,SelectControl:qh,Button:Yh,ColorPalette:Zh,TextControl:Xh,RangeControl:Jh}=wp.components,zt=embedpressGutenbergData.isProPluginActive,Jt=(o,t)=>e.jsxs("div",{children:[o,t&&e.jsx("span",{className:"isPro",children:"pro"})]});zt||(Mt("embedpress.uploadPlaceholder","embedpress/uploadPlaceholder",(o,t=!0)=>(o.push(e.jsxs("div",{className:"pro-control ep-custom-logo-button",onClick:s=>{St(s,zt)},children:[e.jsx(Vh,{render:()=>e.jsx(Yh,{className:"ep-logo-upload-button",icon:"upload",children:Se("Upload Image","embedpress")})}),Jt(null,t)]})),o)),Mt("embedpress.togglePlaceholder","embedpress/togglePlaceholder",(o,t,s,l=!0)=>(o.push(e.jsxs("div",{className:"pro-control",onClick:a=>{St(a,zt)},children:[e.jsx(Wh,{label:Se(t),checked:s}),Jt(null,l)]})),o)),Mt("embedpress.selectPlaceholder","embedpress/selectPlaceholder",(o,t,s,l,a=!0)=>(o.push(e.jsxs("div",{className:"pro-control",onClick:n=>{St(n,zt)},children:[e.jsx(qh,{label:Se(t,"embedpress"),value:s,options:[{label:l,value:s}],className:"ep-select-control-field",__nextHasNoMarginBottom:!0}),Jt(null,a)]})),o)),Mt("embedpress.colorPlatePlaceholder","embedpress/colorPlatePlaceholder",(o,t,s,l,a=!0)=>(o.push(e.jsxs("div",{className:"pro-control",onClick:n=>{St(n,zt)},children:[e.jsx(G,{headerText:t}),e.jsx(Zh,{label:Se(t),colors:l,value:s}),Jt(null,a)]})),o)),Mt("embedpress.textControlPlaceholder","embedpress/textControlPlaceholder",(o,t,s,l=!0)=>(o.push(e.jsxs("div",{className:"pro-control",onClick:a=>{St(a,zt)},children:[e.jsx(Xh,{label:Se(t,"embedpress"),value:s}),Jt(null,l)]})),o)),Mt("embedpress.rangeControlPlaceholder","embedpress/rangeControlPlaceholder",(o,t,s,l=0,a=100,n=!0)=>(o.push(e.jsxs("div",{className:"pro-control",onClick:c=>{St(c,zt)},children:[e.jsx(Jh,{label:Se(t,"embedpress"),value:s,min:l,max:a}),Jt(null,n)]})),o)),Mt("embedpress.adsPlaceholder","embedpress/adsPlaceholder",o=>(o.push(e.jsxs("div",{className:"ad-manager-controllers opacity",children:[st("embedpress.selectPlaceholder",[],Se("Ad Source"),"video","Upload Video",!1),e.jsxs("div",{className:"ad-upload",children:[e.jsx("label",{className:"custom-share-thumbnail-label",children:"Ad Label"}),st("embedpress.uploadPlaceholder",[],!1)]}),e.jsxs("div",{children:[st("embedpress.textControlPlaceholder",[],Se("Ad Width"),"",!1),st("embedpress.textControlPlaceholder",[],Se("Ad Height"),"",!1),st("embedpress.rangeControlPlaceholder",[],Se("Ad X position(%)"),50,0,100,!1),st("embedpress.rangeControlPlaceholder",[],Se("Ad Y position(%)"),50,0,100,!1)]}),st("embedpress.textControlPlaceholder",[],Se("Ad URL"),"",!1),st("embedpress.textControlPlaceholder",[],Se("Ad Start After (sec)"),"",!1),st("embedpress.togglePlaceholder",[],Se("Ad Skip Button"),!1,!1),st("embedpress.textControlPlaceholder",[],Se("Skip Button After (sec)"),"",!1)]})),o)));const{__:Kh}=wp.i18n;Kh("Embed a google document.");const{__:Kf}=wp.i18n,{__:Qh}=wp.i18n;wp.blocks&&wp.blocks.registerBlockCollection&&wp.blocks.registerBlockCollection("embedpress",{title:Qh("EmbedPress","embedpress"),icon:U});