EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor - Version 2.5.2

Version Description

Download this release

Release Info

Developer Asif2BD
Plugin Icon wp plugin EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor
Version 2.5.2
Comparing to
See all releases

Code changes from version 2.5.1 to 2.5.2

EmbedPress/Includes/Traits/Shared.php CHANGED
@@ -96,8 +96,8 @@ trait Shared {
96
  * Message message for showing.
97
  */
98
  $notice->classes( 'upsale', 'notice is-dismissible ' );
99
- $notice->message( 'upsale', '<p>'. __( '8,000+ People already using <a href="https://wpdeveloper.net/ea/notificationX" target="_blank">EmbedPress</a> to increase their Sales & Engagement!', $notice->text_domain ) .'</p>' );
100
- $notice->thumbnail( 'upsale', plugins_url( 'assets/images/nx-icon.svg', EMBEDPRESS_PLUGIN_BASENAME ) );
101
 
102
  // Update Notice For PRO Version
103
  if( $this->is_pro_active() && \version_compare( EMBEDPRESS_PRO_VERSION, '2.0.0', '<' ) ) {
@@ -107,13 +107,13 @@ trait Shared {
107
  }
108
 
109
  $notice->upsale_args = array(
110
- 'slug' => 'notificationx',
111
- 'page_slug' => 'nx-builder',
112
- 'file' => 'notificationx.php',
113
  'btn_text' => __( 'Install Free', 'embedpress'),
114
  'condition' => [
115
  'by' => 'class',
116
- 'class' => 'NotificationX'
117
  ],
118
  );
119
 
96
  * Message message for showing.
97
  */
98
  $notice->classes( 'upsale', 'notice is-dismissible ' );
99
+ $notice->message( 'upsale', '<p>'. __( 'If you are using Gutenberg, you must install <a href="https://essential-blocks.com/" target="_blank">Essential Blocks</a>, it extends your capacity, with 22 Free Blocks!', $notice->text_domain ) .'</p>' );
100
+ $notice->thumbnail( 'upsale', plugins_url( 'assets/images/essential-blocks.png', EMBEDPRESS_PLUGIN_BASENAME ) );
101
 
102
  // Update Notice For PRO Version
103
  if( $this->is_pro_active() && \version_compare( EMBEDPRESS_PRO_VERSION, '2.0.0', '<' ) ) {
107
  }
108
 
109
  $notice->upsale_args = array(
110
+ 'slug' => 'essential-blocks',
111
+ 'page_slug' => 'essential-blocks',
112
+ 'file' => 'essential-blocks.php',
113
  'btn_text' => __( 'Install Free', 'embedpress'),
114
  'condition' => [
115
  'by' => 'class',
116
+ 'class' => 'EssentialAdmin'
117
  ],
118
  );
119
 
Gutenberg/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";var r=wp.i18n.__,l=wp.element.Fragment,i=wp.components,o=i.IconButton,a=i.Toolbar,s=wp.editor.BlockControls,c=function(e){var t=e.showEditButton,n=e.switchBackToURLInput;return wp.element.createElement(l,null,wp.element.createElement(s,null,wp.element.createElement(a,null,t&&wp.element.createElement(o,{className:"components-toolbar__control",label:r("Edit URL"),icon:"edit",onClick:n}))))};t.a=c},function(e,t,n){"use strict";var r=wp.i18n.__,l=wp.components.Spinner,i=function(){return wp.element.createElement("div",{className:"wp-block-embed is-loading"},wp.element.createElement(l,null),wp.element.createElement("p",null,r("Embedding\u2026")))};t.a=i},function(e,t,n){"use strict";var r=wp.i18n,l=r.__,i=r._x,o=wp.components,a=o.Button,s=o.Placeholder,c=wp.editor.BlockIcon,u=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,u=e.onChange,p=e.cannotEmbed;return wp.element.createElement(s,{icon:wp.element.createElement(c,{icon:t,showColors:!0}),label:n,className:"wp-block-embed"},wp.element.createElement("form",{onSubmit:o},wp.element.createElement("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:l("Enter URL to embed here\u2026"),onChange:u}),wp.element.createElement(a,{isLarge:!0,type:"submit"},i("Embed","button label")),p&&wp.element.createElement("p",{className:"components-placeholder__error"},l("Sorry, we could not embed that content."),wp.element.createElement("br",null))))};t.a=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(10),a=n.n(o),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.element.Component,p=function(e){function t(){return r(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"componentDidMount",value:function(){a.a.findDOMNode(this.refs.iframe).addEventListener("load",this.props.onLoad)}},{key:"render",value:function(){return wp.element.createElement("iframe",s({ref:"iframe"},this.props))}}]),t}(u);t.a=p},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"f",function(){return s}),n.d(t,"e",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"b",function(){return p}),n.d(t,"d",function(){return m}),n.d(t,"g",function(){return f}),n.d(t,"h",function(){return d});var r=wp.components,l=r.G,i=r.Path,o=(r.Polygon,r.SVG),a=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#BBDEFB"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(i,{style:{fill:"#1565C0"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 23 L 33 23 L 33 25 L 15 25 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 27 L 33 27 L 33 29 L 15 29 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 31 L 33 31 L 33 33 L 15 33 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 35 L 25 35 L 25 37 L 15 37 Z "}))),s=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink","enable-background":"new 0 0 24 24",id:"Layer_2",version:"1.1",viewBox:"0 0 24 24"},wp.element.createElement(l,null,wp.element.createElement(i,{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"}}),wp.element.createElement(i,{d:"M17,6c-0.5444336,0-1.0367432-0.2190552-1.3973999-0.5719604L21,10.8254395V6H17z",style:{fill:"url(#SVGID_1_)"}}),wp.element.createElement(i,{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"}}),wp.element.createElement(i,{d:"M15,0v4c0,1.1045694,0.8954306,2,2,2h4L15,0z",style:{fill:"#FFE083"}}),wp.element.createElement(i,{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"}}),wp.element.createElement(i,{d:"M15,0H5C3.8954468,0,3,0.8953857,3,2v0.25c0-1.1046143,0.8954468-2,2-2h10",style:{fill:"#FFFFFF",opacity:"0.2"}}),wp.element.createElement(i,{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"}}),wp.element.createElement(i,{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_)"}})),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null)),c=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#C8E6C9"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(i,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(i,{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 "}))),u=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#C2ABE1"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(i,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 19 23 L 33 23 L 33 25 L 19 25 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 19 28 L 33 28 L 33 30 L 19 30 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 19 33 L 33 33 L 33 35 L 19 35 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 15 23 L 17 23 L 17 25 L 15 25 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 15 28 L 17 28 L 17 30 L 15 30 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 15 33 L 17 33 L 17 35 L 15 35 Z "}))),p=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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"}),wp.element.createElement(i,{style:{fill:"#EEA6A0"},d:"M40,13H30V3L40,13z"}),wp.element.createElement(i,{style:{fill:"#B3433A"},d:"M30,13l10,10V13H30z"}),wp.element.createElement(i,{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"}),wp.element.createElement(i,{style:{fill:"#FFFFFF"},d:"M27.6,29c-0.6,1.8-1.9,3.3-3.6,4.1V38h9v-9H27.6z"}))),m=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}))),f=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#8E24AA"},d:"M 32 25 L 27 25 L 27 15 L 32 15 Z "}),wp.element.createElement(i,{style:{fill:"#8E24AA"},d:"M 24 25 L 19 25 L 19 15 L 24 15 Z "}))),d=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 769 598",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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"}),wp.element.createElement(i,{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"})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(6),n(11),n(15),n(19),n(23),n(27),n(31),n(35)},function(e,t,n){"use strict";var r=n(7),l=(n.n(r),n(8)),i=(n.n(l),n(9)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-docs-block",{title:a("Google Docs"),icon:o.a,category:"embedpress",keywords:[a("embedpress"),a("google"),a("docs")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-document"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"document"==o?(r.match(/([?&])embedded=true/i)&&(r.indexOf("?")>-1?r+="&embedded=true":r+="?embedded=true"),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Docs URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";var r=n(12),l=(n.n(r),n(13)),i=(n.n(l),n(14)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-slides-block",{title:a("Google Slides"),icon:o.f,category:"embedpress",keywords:[a("embedpress"),a("google"),a("slides")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-presentation"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"presentation"==o?(r.match(/pub\?/i)&&(r=r.replace("/pub?","/embed?")),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Slides URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(16),l=(n.n(r),n(17)),i=(n.n(l),n(18)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-sheets-block",{title:a("Google Sheets"),icon:o.e,category:"embedpress",keywords:[a("embedpress"),a("google"),a("sheets")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-spreadsheets"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];if(o&&"spreadsheets"==o){if(r.indexOf("?")>-1){var a=r.split("?");if(a=a[1],a=a.split("&"),console.log(a),a.length>0){var s=!1,c=!1;a.map(function(e){e.indexOf("widget=")?c=!0:e.indexOf("headers=")&&(s=!0)}),c||(r+="&widget=true"),s||(r+="&headers=false")}}else r+="?widget=true&headers=false";this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Sheets URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(20),l=(n.n(r),n(21)),i=(n.n(l),n(22)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-forms-block",{title:a("Google Forms"),icon:o.c,category:"embedpress",keywords:[a("embedpress"),a("google"),a("forms")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-forms"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"forms"==o?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Forms URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(24),l=(n.n(r),n(25)),i=(n.n(l),n(26)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-drawings-block",{title:a("Google Drawings"),icon:o.b,category:"embedpress",keywords:[a("embedpress"),a("google"),a("drawings")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-drawings"},wp.element.createElement("img",{src:t,width:"960",height:"720"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=(n(3),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),u=wp.i18n.__,p=wp.element,m=p.Component,f=p.Fragment,d=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),c(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"drawings"==o?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,c=this.props.attributes.iframeSrc,p=u("Google Drawings URL (Get your link from File -> Publish to the web -> Link)");return!c||r?wp.element.createElement(s.a,{label:p,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(f,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement("img",{src:c,onLoad:this.onLoad,style:{display:l?"none":""},width:"960",height:"720"}),wp.element.createElement(o.a,{showEditButton:c&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(m);t.a=d},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=n(28),i=(n.n(l),n(29)),o=(n.n(i),n(30)),a=n(4),s=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-maps-block",{title:s("Google Maps"),icon:a.d,category:"embedpress",keywords:[s("embedpress"),s("google"),s("maps")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-maps"},wp.element.createElement("iframe",r({src:t,frameborder:"0",width:"600",height:"450"},"frameborder","0")))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/(?:(?:(?:www\.|maps\.)?(?:google\.com?))|(?:goo\.gl))(?:\.[a-z]{2})?\/(?:maps\/)?(?:place\/)?(?:[a-z0-9\/%+\-_]*)?([a-z0-9\/%,+\-_=!:@\.&*\$#?\']*)/i)){var r=this.decodeHTMLEntities(t);if(t.match("~(maps/embed|output=embed)~i"));else{var l=/@(-?[0-9\.]+,-?[0-9\.]+).+,([0-9\.]+[a-z])/i,i=l.exec(r);i&&i.length>1&&i[1]&&i[2]?r="https://maps.google.com/maps?hl=en&ie=UTF8&ll="+i[1]+"&spn="+i[1]+"&t=m&z="+Math.round(parseInt(i[2]))+"&output=embed":this.setState({cannotEmbed:!0,editingURL:!0})}this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Maps URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(32),l=(n.n(r),n(33)),i=(n.n(l),n(34)),o=n(4),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/twitch-block",{title:s("Twitch"),icon:o.g,category:"embedpress",keywords:[s("embedpress"),s("twitch")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""},attrs:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes,n=t.iframeSrc,r=t.attrs;return wp.element.createElement("div",{class:"ose-twitch-presentation"},wp.element.createElement("iframe",a({src:n},r,{frameborder:"0",width:"600",height:"450"})))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,f=wp.element,d=f.Component,w=f.Fragment,h=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),p(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;n({url:t});var r=/http[s]?:\/\/(?:www\.|clips\.)twitch\.tv\/([0-9a-zA-Z\-\_]+)\/?(chat\/?$|[0-9a-z\-\_]*)?/;if(t&&t.match(r)){var l=this.decodeHTMLEntities(t),i=r.exec(l),o=i[1];console.log(o);var a,s="channel";switch(t.indexOf("clips.twitch.tv")>-1?s="clip":t.indexOf("/videos/")>-1?s="video":t.indexOf("#/chat$#")>-1&&(s="chat"),console.log(s),s){case"channel":l="https://player.twitch.tv/?channel="+o,a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"clip":l="https://clips.twitch.tv/embed?clip="+o+"&autoplay=false",a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"video":o=i[2],l="https://player.twitch.tv/?video="+o,a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"chat":l="http://www.twitch.tv/embed/"+o+"/chat",a={scrolling:"yes",frameborder:"0",allowfullscreen:"true",id:"'"+o+"'"}}console.log(l),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:l,attrs:a})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,p=this.props.attributes,f=p.iframeSrc,d=p.attrs,h=m("Twitch URL");return!f||r?wp.element.createElement(s.a,{label:h,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(w,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,u({src:f},d,{onLoad:this.onLoad,style:{display:l?"none":""},width:"600",height:"450"})),wp.element.createElement(o.a,{showEditButton:f&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(d);t.a=h},function(e,t,n){"use strict";var r=n(36),l=(n.n(r),n(37)),i=(n.n(l),n(38)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/wistia-block",{title:a("Wistia"),icon:o.h,category:"embedpress",keywords:[a("embedpress"),a("wistia")],edit:i.a,save:function(e){return null},deprecated:[{attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-wistia"},wp.element.createElement("iframe",{src:t,allowtransparency:"true",frameborder:"0",class:"wistia_embed",name:"wistia_embed",width:"600",height:"330"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,mediaId:null},e.setUrl(),e}return i(t,e),u(t,[{key:"componentDidMount",value:function(){if(this.props.attributes.url){var e=this.props.attributes.url.match(/medias\/(.*)/),t=e[1];this.setState(Object.assign({},this.state,{mediaId:t}))}}},{key:"onLoad",value:function(){if(this.setState({fetching:!1}),console.log(embedpressObj),embedpressObj.wisita_options){var e=Object.assign({},this.state);setTimeout(function(){var e=document.createElement("script");e.src="https://fast.wistia.com/assets/external/E-v1.js",e.charset="ISO-8859-1",document.body.appendChild(e)},100),setTimeout(function(){var t=document.createElement("script");t.type="text/javascript",t.innerHTML="window.pp_embed_wistia_labels = "+embedpressObj.wistia_labels,document.body.appendChild(t),t=document.createElement("script"),t.type="text/javascript",t.innerHTML='wistiaEmbed = Wistia.embed( "'+e.mediaId+'", '+embedpressObj.wisita_options+" );",document.body.appendChild(t)},400)}}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&(t.match(/^http[s]?:\/\/(?:www\.)?wistia\.com\/medias/i)||t.match(/^http[s]?:\/\/(?:www\.)?fast\/.wistia\.com\/embed\/medias/i.jsonp))){var r=t.match(/medias\/(.*)/),l=r[1],i="//fast.wistia.net/embed/iframe/"+l;this.setState({editingURL:!1,cannotEmbed:!1,mediaId:l}),n({iframeSrc:i})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Wistia URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement("div",{className:"ose-wistia",id:"wistia_"+this.state.mediaId},wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"330",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"})),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";var r=wp.i18n.__,l=wp.element.Fragment,i=wp.components,o=i.IconButton,a=i.Toolbar,s=wp.editor.BlockControls,c=function(e){var t=e.showEditButton,n=e.switchBackToURLInput;return wp.element.createElement(l,null,wp.element.createElement(s,null,wp.element.createElement(a,null,t&&wp.element.createElement(o,{className:"components-toolbar__control",label:r("Edit URL"),icon:"edit",onClick:n}))))};t.a=c},function(e,t,n){"use strict";var r=wp.i18n.__,l=wp.components.Spinner,i=function(){return wp.element.createElement("div",{className:"wp-block-embed is-loading"},wp.element.createElement(l,null),wp.element.createElement("p",null,r("Embedding\u2026")))};t.a=i},function(e,t,n){"use strict";var r=wp.i18n,l=r.__,i=r._x,o=wp.components,a=o.Button,s=o.Placeholder,c=wp.blockEditor.BlockIcon,u=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,u=e.onChange,p=e.cannotEmbed;return wp.element.createElement(s,{icon:wp.element.createElement(c,{icon:t,showColors:!0}),label:n,className:"wp-block-embed"},wp.element.createElement("form",{onSubmit:o},wp.element.createElement("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:l("Enter URL to embed here\u2026"),onChange:u}),wp.element.createElement(a,{isLarge:!0,type:"submit"},i("Embed","button label")),p&&wp.element.createElement("p",{className:"components-placeholder__error"},l("Sorry, we could not embed that content."),wp.element.createElement("br",null))))};t.a=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(10),a=n.n(o),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.element.Component,p=function(e){function t(){return r(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"componentDidMount",value:function(){a.a.findDOMNode(this.refs.iframe).addEventListener("load",this.props.onLoad)}},{key:"render",value:function(){return wp.element.createElement("iframe",s({ref:"iframe"},this.props))}}]),t}(u);t.a=p},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"f",function(){return s}),n.d(t,"e",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"b",function(){return p}),n.d(t,"d",function(){return m}),n.d(t,"g",function(){return f}),n.d(t,"h",function(){return d});var r=wp.components,l=r.G,i=r.Path,o=(r.Polygon,r.SVG),a=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#BBDEFB"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(i,{style:{fill:"#1565C0"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 23 L 33 23 L 33 25 L 15 25 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 27 L 33 27 L 33 29 L 15 29 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 31 L 33 31 L 33 33 L 15 33 Z "}),wp.element.createElement(i,{style:{fill:"#E3F2FD"},d:"M 15 35 L 25 35 L 25 37 L 15 37 Z "}))),s=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink","enable-background":"new 0 0 24 24",id:"Layer_2",version:"1.1",viewBox:"0 0 24 24"},wp.element.createElement(l,null,wp.element.createElement(i,{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"}}),wp.element.createElement(i,{d:"M17,6c-0.5444336,0-1.0367432-0.2190552-1.3973999-0.5719604L21,10.8254395V6H17z",style:{fill:"url(#SVGID_1_)"}}),wp.element.createElement(i,{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"}}),wp.element.createElement(i,{d:"M15,0v4c0,1.1045694,0.8954306,2,2,2h4L15,0z",style:{fill:"#FFE083"}}),wp.element.createElement(i,{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"}}),wp.element.createElement(i,{d:"M15,0H5C3.8954468,0,3,0.8953857,3,2v0.25c0-1.1046143,0.8954468-2,2-2h10",style:{fill:"#FFFFFF",opacity:"0.2"}}),wp.element.createElement(i,{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"}}),wp.element.createElement(i,{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_)"}})),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null),wp.element.createElement(l,null)),c=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#C8E6C9"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(i,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(i,{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 "}))),u=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#C2ABE1"},d:"M 40 13 L 30 13 L 30 3 Z "}),wp.element.createElement(i,{style:{fill:"#2E7D32"},d:"M 30 13 L 40 23 L 40 13 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 19 23 L 33 23 L 33 25 L 19 25 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 19 28 L 33 28 L 33 30 L 19 30 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 19 33 L 33 33 L 33 35 L 19 35 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 15 23 L 17 23 L 17 25 L 15 25 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 15 28 L 17 28 L 17 30 L 15 30 Z "}),wp.element.createElement(i,{style:{fill:"#E8F5E9"},d:"M 15 33 L 17 33 L 17 35 L 15 35 Z "}))),p=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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"}),wp.element.createElement(i,{style:{fill:"#EEA6A0"},d:"M40,13H30V3L40,13z"}),wp.element.createElement(i,{style:{fill:"#B3433A"},d:"M30,13l10,10V13H30z"}),wp.element.createElement(i,{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"}),wp.element.createElement(i,{style:{fill:"#FFFFFF"},d:"M27.6,29c-0.6,1.8-1.9,3.3-3.6,4.1V38h9v-9H27.6z"}))),m=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}))),f=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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 "}),wp.element.createElement(i,{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 "}),wp.element.createElement(i,{style:{fill:"#8E24AA"},d:"M 32 25 L 27 25 L 27 15 L 32 15 Z "}),wp.element.createElement(i,{style:{fill:"#8E24AA"},d:"M 24 25 L 19 25 L 19 15 L 24 15 Z "}))),d=wp.element.createElement(o,{xmlns:"http://www.w3.org/1999/xlink",viewBox:"0 0 769 598",version:"1.1"},wp.element.createElement(l,null,wp.element.createElement(i,{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"}),wp.element.createElement(i,{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"})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(6),n(11),n(15),n(19),n(23),n(27),n(31),n(35)},function(e,t,n){"use strict";var r=n(7),l=(n.n(r),n(8)),i=(n.n(l),n(9)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-docs-block",{title:a("Google Docs"),icon:o.a,category:"embedpress",keywords:[a("embedpress"),a("google"),a("docs")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;if(t)return wp.element.createElement("div",{class:"ose-google-docs-document"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"document"==o?(r.match(/([?&])embedded=true/i)||(r.indexOf("?")>-1?r+="&embedded=true":r+="?embedded=true"),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Docs URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{url:this.state.url,showEditButton:i,hasEmbed:this.props.preview,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";var r=n(12),l=(n.n(r),n(13)),i=(n.n(l),n(14)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-slides-block",{title:a("Google Slides"),icon:o.f,category:"embedpress",keywords:[a("embedpress"),a("google"),a("slides")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-presentation"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"presentation"==o?(r.match(/pub\?/i)&&(r=r.replace("/pub?","/embed?")),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Slides URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(16),l=(n.n(r),n(17)),i=(n.n(l),n(18)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-sheets-block",{title:a("Google Sheets"),icon:o.e,category:"embedpress",keywords:[a("embedpress"),a("google"),a("sheets")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-spreadsheets"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];if(o&&"spreadsheets"==o){if(r.indexOf("?")>-1){var a=r.split("?");if(a=a[1],a=a.split("&"),console.log(a),a.length>0){var s=!1,c=!1;a.map(function(e){e.indexOf("widget=")?c=!0:e.indexOf("headers=")&&(s=!0)}),c||(r+="&widget=true"),s||(r+="&headers=false")}}else r+="?widget=true&headers=false";this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Sheets URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(20),l=(n.n(r),n(21)),i=(n.n(l),n(22)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-forms-block",{title:a("Google Forms"),icon:o.c,category:"embedpress",keywords:[a("embedpress"),a("google"),a("forms")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-forms"},wp.element.createElement("iframe",{src:t,frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"forms"==o?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Forms URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(24),l=(n.n(r),n(25)),i=(n.n(l),n(26)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-drawings-block",{title:a("Google Drawings"),icon:o.b,category:"embedpress",keywords:[a("embedpress"),a("google"),a("drawings")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-docs-drawings"},wp.element.createElement("img",{src:t,width:"960",height:"720"}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=(n(3),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),u=wp.i18n.__,p=wp.element,m=p.Component,f=p.Fragment,d=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),c(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){var r=this.decodeHTMLEntities(t),l=/google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i,i=l.exec(r),o=i[1];o&&"drawings"==o?(this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})):this.setState({cannotEmbed:!0,editingURL:!0})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,c=this.props.attributes.iframeSrc,p=u("Google Drawings URL (Get your link from File -> Publish to the web -> Link)");return!c||r?wp.element.createElement(s.a,{label:p,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(f,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement("img",{src:c,onLoad:this.onLoad,style:{display:l?"none":""},width:"960",height:"720"}),wp.element.createElement(o.a,{showEditButton:c&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(m);t.a=d},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=n(28),i=(n.n(l),n(29)),o=(n.n(i),n(30)),a=n(4),s=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/google-maps-block",{title:s("Google Maps"),icon:a.d,category:"embedpress",keywords:[s("embedpress"),s("google"),s("maps")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:o.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-google-maps"},wp.element.createElement("iframe",r({src:t,frameborder:"0",width:"600",height:"450"},"frameborder","0")))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),u(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&t.match(/^http[s]?:\/\/(?:(?:(?:www\.|maps\.)?(?:google\.com?))|(?:goo\.gl))(?:\.[a-z]{2})?\/(?:maps\/)?(?:place\/)?(?:[a-z0-9\/%+\-_]*)?([a-z0-9\/%,+\-_=!:@\.&*\$#?\']*)/i)){var r=this.decodeHTMLEntities(t);if(t.match("~(maps/embed|output=embed)~i"));else{var l=/@(-?[0-9\.]+,-?[0-9\.]+).+,([0-9\.]+[a-z])/i,i=l.exec(r);i&&i.length>1&&i[1]&&i[2]?r="https://maps.google.com/maps?hl=en&ie=UTF8&ll="+i[1]+"&spn="+i[1]+"&t=m&z="+Math.round(parseInt(i[2]))+"&output=embed":this.setState({cannotEmbed:!0,editingURL:!0})}this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:r})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Google Maps URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"450",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"}),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w},function(e,t,n){"use strict";var r=n(32),l=(n.n(r),n(33)),i=(n.n(l),n(34)),o=n(4),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/twitch-block",{title:s("Twitch"),icon:o.g,category:"embedpress",keywords:[s("embedpress"),s("twitch")],attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""},attrs:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes,n=t.iframeSrc,r=t.attrs;return wp.element.createElement("div",{class:"ose-twitch-presentation"},wp.element.createElement("iframe",a({src:n},r,{frameborder:"0",width:"600",height:"450"})))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=wp.i18n.__,f=wp.element,d=f.Component,w=f.Fragment,h=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1},e}return i(t,e),p(t,[{key:"onLoad",value:function(){this.setState({fetching:!1})}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;n({url:t});var r=/http[s]?:\/\/(?:www\.|clips\.)twitch\.tv\/([0-9a-zA-Z\-\_]+)\/?(chat\/?$|[0-9a-z\-\_]*)?/;if(t&&t.match(r)){var l=this.decodeHTMLEntities(t),i=r.exec(l),o=i[1];console.log(o);var a,s="channel";switch(t.indexOf("clips.twitch.tv")>-1?s="clip":t.indexOf("/videos/")>-1?s="video":t.indexOf("#/chat$#")>-1&&(s="chat"),console.log(s),s){case"channel":l="https://player.twitch.tv/?channel="+o,a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"clip":l="https://clips.twitch.tv/embed?clip="+o+"&autoplay=false",a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"video":o=i[2],l="https://player.twitch.tv/?video="+o,a={scrolling:"no",frameborder:"0",allowfullscreen:"true"};break;case"chat":l="http://www.twitch.tv/embed/"+o+"/chat",a={scrolling:"yes",frameborder:"0",allowfullscreen:"true",id:"'"+o+"'"}}console.log(l),this.setState({editingURL:!1,cannotEmbed:!1}),n({iframeSrc:l,attrs:a})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,p=this.props.attributes,f=p.iframeSrc,d=p.attrs,h=m("Twitch URL");return!f||r?wp.element.createElement(s.a,{label:h,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(w,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement(c.a,u({src:f},d,{onLoad:this.onLoad,style:{display:l?"none":""},width:"600",height:"450"})),wp.element.createElement(o.a,{showEditButton:f&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(d);t.a=h},function(e,t,n){"use strict";var r=n(36),l=(n.n(r),n(37)),i=(n.n(l),n(38)),o=n(4),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("embedpress/wistia-block",{title:a("Wistia"),icon:o.h,category:"embedpress",keywords:[a("embedpress"),a("wistia")],edit:i.a,save:function(e){return null},deprecated:[{attributes:{url:{type:"string",default:""},iframeSrc:{type:"string",default:""}},edit:i.a,save:function(e){var t=e.attributes.iframeSrc;return wp.element.createElement("div",{class:"ose-wistia"},wp.element.createElement("iframe",{src:t,allowtransparency:"true",frameborder:"0",class:"wistia_embed",name:"wistia_embed",width:"600",height:"330"}))}}]})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),a=n(1),s=n(2),c=n(3),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.i18n.__,m=wp.element,f=m.Component,d=m.Fragment,w=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.switchBackToURLInput=e.switchBackToURLInput.bind(e),e.setUrl=e.setUrl.bind(e),e.onLoad=e.onLoad.bind(e),e.state={editingURL:!1,url:e.props.attributes.url,fetching:!0,cannotEmbed:!1,mediaId:null},e.setUrl(),e}return i(t,e),u(t,[{key:"componentDidMount",value:function(){if(this.props.attributes.url){var e=this.props.attributes.url.match(/medias\/(.*)/),t=e[1];this.setState(Object.assign({},this.state,{mediaId:t}))}}},{key:"onLoad",value:function(){if(this.setState({fetching:!1}),console.log(embedpressObj),embedpressObj.wisita_options){var e=Object.assign({},this.state);setTimeout(function(){var e=document.createElement("script");e.src="https://fast.wistia.com/assets/external/E-v1.js",e.charset="ISO-8859-1",document.body.appendChild(e)},100),setTimeout(function(){var t=document.createElement("script");t.type="text/javascript",t.innerHTML="window.pp_embed_wistia_labels = "+embedpressObj.wistia_labels,document.body.appendChild(t),t=document.createElement("script"),t.type="text/javascript",t.innerHTML='wistiaEmbed = Wistia.embed( "'+e.mediaId+'", '+embedpressObj.wisita_options+" );",document.body.appendChild(t)},400)}}},{key:"decodeHTMLEntities",value:function(e){return e&&"string"===typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"")),e}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;if(n({url:t}),t&&(t.match(/^http[s]?:\/\/(?:www\.)?wistia\.com\/medias/i)||t.match(/^http[s]?:\/\/(?:www\.)?fast\/.wistia\.com\/embed\/medias/i.jsonp))){var r=t.match(/medias\/(.*)/),l=r[1],i="//fast.wistia.net/embed/iframe/"+l;this.setState({editingURL:!1,cannotEmbed:!1,mediaId:l}),n({iframeSrc:i})}else this.setState({cannotEmbed:!0,editingURL:!0})}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.url,r=t.editingURL,l=t.fetching,i=t.cannotEmbed,u=this.props.attributes.iframeSrc,m=p("Wistia URL");return!u||r?wp.element.createElement(s.a,{label:m,onSubmit:this.setUrl,value:n,cannotEmbed:i,onChange:function(t){return e.setState({url:t.target.value})}}):wp.element.createElement(d,null,l?wp.element.createElement(a.a,null):null,wp.element.createElement("div",{className:"ose-wistia",id:"wistia_"+this.state.mediaId},wp.element.createElement(c.a,{src:u,onLoad:this.onLoad,style:{display:l?"none":""},frameborder:"0",width:"600",height:"330",allowfullscreen:"true",mozallowfullscreen:"true",webkitallowfullscreen:"true"})),wp.element.createElement(o.a,{showEditButton:u&&!i,switchBackToURLInput:this.switchBackToURLInput}))}}]),t}(f);t.a=w}]);
Gutenberg/src/common/embed-controls.js CHANGED
@@ -25,7 +25,7 @@ const EmbedControls = ( props ) => {
25
  ) }
26
  </Toolbar>
27
  </BlockControls>
28
-
29
  </Fragment>
30
  );
31
  };
25
  ) }
26
  </Toolbar>
27
  </BlockControls>
28
+
29
  </Fragment>
30
  );
31
  };
Gutenberg/src/common/embed-placeholder.js CHANGED
@@ -3,7 +3,7 @@
3
  */
4
  const { __, _x } = wp.i18n;
5
  const { Button, Placeholder } = wp.components;
6
- const { BlockIcon } = wp.editor;
7
 
8
  const EmbedPlaceholder = ( props ) => {
9
  const { icon, label, value, onSubmit, onChange, cannotEmbed } = props;
3
  */
4
  const { __, _x } = wp.i18n;
5
  const { Button, Placeholder } = wp.components;
6
+ const { BlockIcon } = wp.blockEditor;
7
 
8
  const EmbedPlaceholder = ( props ) => {
9
  const { icon, label, value, onSubmit, onChange, cannotEmbed } = props;
Gutenberg/src/google-docs/edit.js CHANGED
@@ -51,11 +51,11 @@ class GoogleDocsEdit extends Component {
51
  setAttributes( { url } );
52
  if(url && url.match( /^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){
53
  var iframeSrc = this.decodeHTMLEntities(url);
54
- var regEx = /google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i;
55
  var match = regEx.exec(iframeSrc);
56
  var type = match[1];
57
  if(type && type == 'document') {
58
- if(iframeSrc.match( /([?&])embedded=true/i)) {
59
  if(iframeSrc.indexOf('?') > -1 ) {
60
  iframeSrc += '&embedded=true';
61
  }
@@ -64,7 +64,7 @@ class GoogleDocsEdit extends Component {
64
  }
65
  }
66
  this.setState( { editingURL: false, cannotEmbed: false } );
67
- setAttributes( {iframeSrc: iframeSrc })
68
  }
69
  else {
70
  this.setState({
@@ -84,7 +84,7 @@ class GoogleDocsEdit extends Component {
84
  switchBackToURLInput() {
85
  this.setState( { editingURL: true } );
86
  }
87
-
88
  render() {
89
  const { url, editingURL, fetching, cannotEmbed } = this.state;
90
  const { iframeSrc } = this.props.attributes;
@@ -104,19 +104,21 @@ class GoogleDocsEdit extends Component {
104
  );
105
  }
106
  else {
107
-
108
  return (
109
  <Fragment>
110
  {fetching ? <EmbedLoading /> : null}
111
  <Iframe src={iframeSrc} onLoad={this.onLoad} style={{ display: fetching ? 'none' : '' }} frameborder="0" width="600" height="450" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" />
112
  <EmbedControls
113
- showEditButton={ iframeSrc && ! cannotEmbed }
114
- switchBackToURLInput={ this.switchBackToURLInput }
115
- />
 
 
116
  </Fragment>
117
  )
118
  }
119
-
120
  }
121
  };
122
  export default GoogleDocsEdit;
51
  setAttributes( { url } );
52
  if(url && url.match( /^http[s]?:\/\/((?:www\.)?docs\.google\.com(?:.*)?(?:document|presentation|spreadsheets|forms|drawings)\/[a-z0-9\/\?=_\-\.\,&%\$#\@\!\+]*)/i)){
53
  var iframeSrc = this.decodeHTMLEntities(url);
54
+ var regEx = /google\.com(?:.+)?(document|presentation|spreadsheets|forms|drawings)/i;
55
  var match = regEx.exec(iframeSrc);
56
  var type = match[1];
57
  if(type && type == 'document') {
58
+ if(!iframeSrc.match( /([?&])embedded=true/i)) {
59
  if(iframeSrc.indexOf('?') > -1 ) {
60
  iframeSrc += '&embedded=true';
61
  }
64
  }
65
  }
66
  this.setState( { editingURL: false, cannotEmbed: false } );
67
+ setAttributes( {iframeSrc: iframeSrc })
68
  }
69
  else {
70
  this.setState({
84
  switchBackToURLInput() {
85
  this.setState( { editingURL: true } );
86
  }
87
+
88
  render() {
89
  const { url, editingURL, fetching, cannotEmbed } = this.state;
90
  const { iframeSrc } = this.props.attributes;
104
  );
105
  }
106
  else {
107
+
108
  return (
109
  <Fragment>
110
  {fetching ? <EmbedLoading /> : null}
111
  <Iframe src={iframeSrc} onLoad={this.onLoad} style={{ display: fetching ? 'none' : '' }} frameborder="0" width="600" height="450" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" />
112
  <EmbedControls
113
+ url={ this.state.url }
114
+ showEditButton={ cannotEmbed }
115
+ hasEmbed={ this.props.preview }
116
+ switchBackToURLInput={ this.switchBackToURLInput }
117
+ />
118
  </Fragment>
119
  )
120
  }
121
+
122
  }
123
  };
124
  export default GoogleDocsEdit;
Gutenberg/src/google-docs/index.js CHANGED
@@ -66,10 +66,12 @@ registerBlockType( 'embedpress/google-docs-block', {
66
  */
67
  save: function( props ) {
68
  const { iframeSrc } = props.attributes
69
- return (
70
- <div class="ose-google-docs-document">
71
- <iframe src={iframeSrc} frameborder="0" width="600" height="450" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
72
- </div>
73
- );
 
 
74
  },
75
  } );
66
  */
67
  save: function( props ) {
68
  const { iframeSrc } = props.attributes
69
+ if(iframeSrc){
70
+ return (
71
+ <div class="ose-google-docs-document">
72
+ <iframe src={iframeSrc} frameborder="0" width="600" height="450" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
73
+ </div>
74
+ );
75
+ }
76
  },
77
  } );
Gutenberg/src/init.php CHANGED
@@ -9,7 +9,7 @@
9
  */
10
 
11
  // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) {
13
  exit;
14
  }
15
 
@@ -25,7 +25,7 @@ function embedpress_blocks_cgb_block_assets() { // phpcs:ignore
25
  'embedpress_blocks-cgb-style-css', // Handle.
26
  plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ), // Block style CSS.
27
  array( 'wp-editor' ) // Dependency to include the CSS after it.
28
- // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
29
  );
30
  }
31
 
@@ -50,19 +50,19 @@ function embedpress_blocks_cgb_editor_assets() { // phpcs:ignore
50
  // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
51
  true // Enqueue the script in the footer.
52
  );
53
- $wistia_labels = array(
54
- 'watch_from_beginning' => __('Watch from the beginning', 'embedpress-wistia'),
55
- 'skip_to_where_you_left_off' => __('Skip to where you left off', 'embedpress-wistia'),
56
- 'you_have_watched_it_before' => __('It looks like you\'ve watched<br />part of this video before!', 'embedpress-wistia'),
57
- );
58
- $wistia_labels = json_encode($wistia_labels);
59
  $wistia_options = null;
60
- if(function_exists('embedpress_wisita_pro_get_options') ):
61
  $wistia_options = embedpress_wisita_pro_get_options();
62
  endif;
63
  wp_localize_script( 'embedpress_blocks-cgb-block-js', 'embedpressObj', array(
64
- 'wistia_labels' => $wistia_labels,
65
- 'wisita_options' => $wistia_options
66
  ) );
67
 
68
  // Styles.
@@ -70,7 +70,7 @@ function embedpress_blocks_cgb_editor_assets() { // phpcs:ignore
70
  'embedpress_blocks-cgb-block-editor-css', // Handle.
71
  plugins_url( 'dist/blocks.editor.build.css', dirname( __FILE__ ) ), // Block editor CSS.
72
  array( 'wp-edit-blocks' ) // Dependency to include the CSS after it.
73
- // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
74
  );
75
  }
76
 
@@ -83,14 +83,36 @@ function embedpress_block_category( $categories, $post ) {
83
  $categories,
84
  array(
85
  array(
86
- 'slug' => 'embedpress',
87
  'title' => 'EmbedPress',
88
  ),
89
  )
90
  );
91
  }
92
- add_filter( 'block_categories', 'embedpress_block_category', 10, 2);
93
 
94
- foreach ( glob( plugin_dir_path(__FILE__) . '*/index.php' ) as $block_logic ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  require $block_logic;
96
  }
 
 
9
  */
10
 
11
  // Exit if accessed directly.
12
+ if ( !defined( 'ABSPATH' ) ) {
13
  exit;
14
  }
15
 
25
  'embedpress_blocks-cgb-style-css', // Handle.
26
  plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ), // Block style CSS.
27
  array( 'wp-editor' ) // Dependency to include the CSS after it.
28
+ // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
29
  );
30
  }
31
 
50
  // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
51
  true // Enqueue the script in the footer.
52
  );
53
+ $wistia_labels = array(
54
+ 'watch_from_beginning' => __( 'Watch from the beginning', 'embedpress-wistia' ),
55
+ 'skip_to_where_you_left_off' => __( 'Skip to where you left off', 'embedpress-wistia' ),
56
+ 'you_have_watched_it_before' => __( 'It looks like you\'ve watched<br />part of this video before!', 'embedpress-wistia' ),
57
+ );
58
+ $wistia_labels = json_encode( $wistia_labels );
59
  $wistia_options = null;
60
+ if ( function_exists( 'embedpress_wisita_pro_get_options' ) ):
61
  $wistia_options = embedpress_wisita_pro_get_options();
62
  endif;
63
  wp_localize_script( 'embedpress_blocks-cgb-block-js', 'embedpressObj', array(
64
+ 'wistia_labels' => $wistia_labels,
65
+ 'wisita_options' => $wistia_options
66
  ) );
67
 
68
  // Styles.
70
  'embedpress_blocks-cgb-block-editor-css', // Handle.
71
  plugins_url( 'dist/blocks.editor.build.css', dirname( __FILE__ ) ), // Block editor CSS.
72
  array( 'wp-edit-blocks' ) // Dependency to include the CSS after it.
73
+ // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
74
  );
75
  }
76
 
83
  $categories,
84
  array(
85
  array(
86
+ 'slug' => 'embedpress',
87
  'title' => 'EmbedPress',
88
  ),
89
  )
90
  );
91
  }
 
92
 
93
+ add_filter( 'block_categories', 'embedpress_block_category', 10, 2 );
94
+
95
+ /**
96
+ * Registers the embedpress gutneberg block on server.
97
+ */
98
+
99
+ function embedpress_gutenberg_register_all_block() {
100
+ if ( function_exists( 'register_block_type' ) ) :
101
+ register_block_type( 'embedpress/twitch-block' );
102
+ register_block_type( 'embedpress/google-slides-block' );
103
+ register_block_type( 'embedpress/google-sheets-block' );
104
+ register_block_type( 'embedpress/google-maps-block' );
105
+ register_block_type( 'embedpress/google-forms-block' );
106
+ register_block_type( 'embedpress/google-drawings-block' );
107
+ register_block_type( 'embedpress/google-docs-block' );
108
+ endif;
109
+ }
110
+
111
+ add_action( 'init', 'embedpress_gutenberg_register_all_block' );
112
+
113
+
114
+ foreach ( glob( plugin_dir_path( __FILE__ ) . '*/index.php' ) as $block_logic ) {
115
  require $block_logic;
116
  }
117
+
118
+
assets/images/essential-blocks.png ADDED
Binary file
embedpress.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: EmbedPress lets you embed videos, images, posts, audio, maps and all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 75+ sources supported.
6
  * Author: WPDeveloper
7
  * Author URI: https://wpdeveloper.net
8
- * Version: 2.5.1
9
  * Text Domain: embedpress
10
  * Domain Path: /languages
11
  *
5
  * Description: EmbedPress lets you embed videos, images, posts, audio, maps and all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 75+ sources supported.
6
  * Author: WPDeveloper
7
  * Author URI: https://wpdeveloper.net
8
+ * Version: 2.5.2
9
  * Text Domain: embedpress
10
  * Domain Path: /languages
11
  *
includes.php CHANGED
@@ -22,7 +22,7 @@ if ( ! defined('EMBEDPRESS_PLG_NAME')) {
22
  }
23
 
24
  if ( ! defined('EMBEDPRESS_VERSION')) {
25
- define('EMBEDPRESS_VERSION', "2.5.1");
26
  /**
27
  * @deprecated 2.2.0
28
  */
@@ -30,7 +30,7 @@ if ( ! defined('EMBEDPRESS_VERSION')) {
30
  }
31
 
32
  if ( ! defined('EMBEDPRESS_PRO_VERSION')) {
33
- define('EMBEDPRESS_PRO_VERSION', "2.4.1");
34
  }
35
 
36
  if ( ! defined('EMBEDPRESS_ROOT')) {
22
  }
23
 
24
  if ( ! defined('EMBEDPRESS_VERSION')) {
25
+ define('EMBEDPRESS_VERSION', "2.5.2");
26
  /**
27
  * @deprecated 2.2.0
28
  */
30
  }
31
 
32
  if ( ! defined('EMBEDPRESS_PRO_VERSION')) {
33
+ define('EMBEDPRESS_PRO_VERSION', "2.4.2");
34
  }
35
 
36
  if ( ! defined('EMBEDPRESS_ROOT')) {
readme.txt CHANGED
@@ -6,8 +6,8 @@ Tags: embed, embed youtube, gutenberg embed, elementor embed, video embed, Googl
6
  Requires at least: 4.6
7
  Tested up to: 5.4
8
  Requires PHP: 5.6
9
- Stable tag: 2.5.1
10
- License: GPLv2 or later
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
13
  EmbedPress lets you embed videos, images, posts, audio, maps and all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors.
@@ -254,20 +254,24 @@ Not at all. You can set up everything your team needs without any coding knowled
254
 
255
  == Screenshots ==
256
 
257
- 1. YouTube Embeding
258
- 2. Dashboard Screenshot
259
- 3. EmbedPress Screenshot Google Map
260
- 4. EmbedPress Screenshot Google Sheet
261
- 5. EmbedPress Screenshot Twitter
262
- 6. EmbedPress Screenshot Vimeo
263
- 7. EmbedPress Screenshot Wistia
264
- 8. EmbedPress Screenshot YouTube
265
 
266
  == Changelog ==
267
 
268
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
269
  and this project adheres to [Semantic Versioning](http://semver.org/).
270
 
 
 
 
 
271
  = [2.5.1] - 2020-03-25 =
272
  * Fixed Wistia video issue in Elementor
273
  * Fixed Admin notice dismissible
6
  Requires at least: 4.6
7
  Tested up to: 5.4
8
  Requires PHP: 5.6
9
+ Stable tag: 2.5.2
10
+ License: GPLv3 or later
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
13
  EmbedPress lets you embed videos, images, posts, audio, maps and all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors.
254
 
255
  == Screenshots ==
256
 
257
+ 1. YouTube Embeding Example
258
+ 2. EmbedPress Screenshot - Dashboard
259
+ 3. EmbedPress Screenshot - Google Map
260
+ 4. EmbedPress Screenshot - Google Sheet
261
+ 5. EmbedPress Screenshot - Twitter
262
+ 6. EmbedPress Screenshot - Vimeo
263
+ 7. EmbedPress Screenshot - Wistia
264
+ 8. EmbedPress Screenshot - YouTube
265
 
266
  == Changelog ==
267
 
268
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
269
  and this project adheres to [Semantic Versioning](http://semver.org/).
270
 
271
+ = [2.5.2] - 2020-04-09 =
272
+ * Fixed Google doc design issue
273
+ * Compatibility with WordPress 5.4
274
+
275
  = [2.5.1] - 2020-03-25 =
276
  * Fixed Wistia video issue in Elementor
277
  * Fixed Admin notice dismissible