Plugin Directory

Changeset 2182506


Ignore:
Timestamp:
10/29/2019 06:44:01 PM (6 years ago)
Author:
peckdaniel
Message:

More sensible cascade of options and settings for structured data

Location:
soundcheck/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • soundcheck/trunk/admin.build.css

    r2148561 r2182506  
    22.flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.soundcheck-table{width:100%;border:1px solid #f1f1f1}.soundcheck-table_header{display:-ms-flexbox;display:flex;width:100%;background:#f1f1f1;padding:8px 0}.soundcheck-table_row{display:-ms-flexbox;display:flex;width:100%;padding:8px 0}.soundcheck-table_row:nth-of-type(odd){background:#f9f9f9}.soundcheck-table_data,.soundcheck-table_header-item{-ms-flex:1 1 20%;flex:1 1 20%}.soundcheck-table_header-item{text-align:center}.soundcheck-table_data{padding:0 8px}.soundcheck-table_data_center{text-align:center}.soundcheck-table_data .components-spinner{float:none}.soundcheck-table_header-item{text-transform:uppercase}.soundcheck-table_filter-link{text-decoration:none;position:relative;display:inline-block;padding-left:16px;padding-right:16px}.soundcheck-table_filter-link::after{content:'';position:absolute;right:-8px;font-size:8px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.soundcheck-table_filter-link.desc::after{content:'(desc)'}.soundcheck-table_filter-link.asc::after{content:'(asc)'}
    33.flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.pointer{cursor:pointer}
    4 .flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.soundcheck-source__row{display:-ms-flexbox;display:flex;width:100%;padding:0 16px}.soundcheck-source__row__item{-ms-flex:1 1;flex:1 1;text-align:left}.soundcheck-source__preview{display:-ms-flexbox;display:flex;width:100%;padding:0 16px;-ms-flex-direction:row-reverse;flex-direction:row-reverse}
    5 .flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.soundcheck-voice-apps__summary img{float:left;height:108px;width:108px;padding:0 16px 0 16px}.soundcheck-voice-apps__summary__content{margin-left:140px}
     4.flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.works-item{margin:0 16px;text-align:center}
    65.flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.soundcheck-dashboard-footer{display:-ms-flexbox;display:flex;width:100%;padding:16px 16px;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.soundcheck-dashboard-footer__item{margin:8px}
    76.flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.sign-in{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:100%}.sign-in__form{padding:16px 16px;margin:32px;border:1px solid #f1f1f1;width:256px}.sign-in__form .logo{margin-bottom:32px}.sign-in__button{margin:16px 0}.sign-in__notice{margin:16px 0}
    8 .flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.works-item{margin:0 16px;text-align:center}
  • soundcheck/trunk/admin.build.js

    r2157970 r2182506  
    1 !function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.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=26)}([function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.data},function(e,t,n){"use strict";var r={};r.logo=function(e){return wp.element.createElement("svg",{width:e+"px",height:e+"px",viewBox:"0 0 53 53",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,"Soundcheck"),wp.element.createElement("g",{id:"Soundcheck",fill:"#3BAB48"},wp.element.createElement("path",{d:"M37.1598063,1 L16.666899,1 L16.666899,1.02119114 C16.3943259,1.01009102 16.1227512,1 15.8511765,1 C7.09988132,1 0,8.16967043 0,17.0154594 L0,51 L37.1598063,51 C45.9111015,51 53,43.8353751 53,34.9905952 L53,17.0154594 C53,8.16967043 45.9111015,1 37.1598063,1 L37.1598063,1 Z M11.626792,32.1479546 C11.626792,33.1671477 10.8060773,33.9966296 9.79665806,33.9966296 C8.78324511,33.9966296 7.96752256,33.1671477 7.96752256,32.1479546 L7.96752256,23.7673616 C7.96752256,22.743123 8.78324511,21.9186866 9.79665806,21.9186866 C10.8060773,21.9186866 11.626792,22.743123 11.626792,23.7673616 L11.626792,32.1479546 Z M19.0351902,39.8352944 C19.0351902,40.8554966 18.213477,41.6849785 17.2050562,41.6849785 C16.195637,41.6849785 15.3749223,40.8554966 15.3749223,39.8352944 L15.3749223,16.0800218 C15.3749223,15.0547741 16.195637,14.2303376 17.2050562,14.2303376 C18.213477,14.2303376 19.0351902,15.0547741 19.0351902,16.0800218 L19.0351902,39.8352944 Z M27.6606823,33.9179196 C27.6606823,34.9431674 26.8399676,35.7665947 25.8315468,35.7665947 C24.8221276,35.7665947 24.0014129,34.9431674 24.0014129,33.9179196 L24.0014129,21.992351 C24.0014129,20.9721488 24.8221276,20.1426669 25.8315468,20.1426669 C26.8399676,20.1426669 27.6606823,20.9721488 27.6606823,21.992351 L27.6606823,33.9179196 Z M36.2871729,36.0895074 C36.2871729,37.1087005 35.4664582,37.9381824 34.457039,37.9381824 C33.4476198,37.9381824 32.626905,37.1087005 32.626905,36.0895074 L32.626905,19.8207633 C32.626905,18.8005611 33.4476198,17.9710791 34.457039,17.9710791 C35.4664582,17.9710791 36.2871729,18.8005611 36.2871729,19.8207633 L36.2871729,36.0895074 Z M44.8707307,32.1479546 C44.8707307,33.1671477 44.050016,33.9966296 43.0415952,33.9966296 C42.0271838,33.9966296 41.2114613,33.1671477 41.2114613,32.1479546 L41.2114613,23.7673616 C41.2114613,22.743123 42.0271838,21.9186866 43.0415952,21.9186866 C44.050016,21.9186866 44.8707307,22.743123 44.8707307,23.7673616 L44.8707307,32.1479546 Z",id:"logo"})))},r.speakable=function(e,t){return wp.element.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 78 78",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,e),wp.element.createElement("g",{id:"Speakable",fill:t,transform:"translate(2.000000, 0.000000)"},wp.element.createElement("path",{d:"M26.4788729,69.9405038 L9.41272422,77.3999991 L12.6487443,62.8196156 C4.92071963,56.3078621 0,46.4867881 0,35.5 C0,15.8938914 15.6700338,2.13162821e-14 35,2.13162821e-14 C54.3299662,2.13162821e-14 70,15.8938914 70,35.5 C70,55.1061086 54.3299662,71 35,71 C32.0609411,71 29.2064934,70.6325615 26.4788729,69.9405038 Z M28.2601921,52.8310547 C32.6326098,44.9247652 37.1284958,38.0443001 41.7479851,32.1894531 C46.3674743,26.3346061 50.6312663,22.1269659 54.539489,19.5664062 C52.8623973,19.012367 51.3051212,18.7353516 49.867614,18.7353516 C47.5765869,18.7353516 45.7385519,19.1471313 44.3534538,19.9707031 C42.9683557,20.794275 41.3025195,22.4713415 39.3558952,25.0019531 C37.1846604,27.8170714 34.1524642,32.9156532 30.2592155,40.2978516 C29.7201503,37.76724 29.0687897,35.9891002 28.305114,34.9633789 C27.5414383,33.9376576 26.4932717,33.4248047 25.1605827,33.4248047 C23.1540623,33.4248047 20.8705565,34.5029189 18.3099968,36.6591797 C20.4962056,37.9619206 22.3903924,40.200505 23.992614,43.375 L24.8236687,45.0595703 C25.1231493,45.6735057 25.4825207,46.4671175 25.9017937,47.4404297 L27.2719108,50.6074219 C27.3917031,50.9069025 27.7211269,51.6481061 28.2601921,52.8310547 Z",id:"icon"})))},r.colors={speakable_purple:"#6A64B6",peck_green:"#3BAB48"},t.a=r},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a});var r="https://api.peck.me",a="https://soundcheck.ai"},function(e,t){e.exports=wp.compose},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function l(){h&&f&&(h=!1,f.length?d=f.concat(d):w=-1,d.length&&c())}function c(){if(!h){var e=a(l);h=!0;for(var t=d.length;t;){for(f=d,d=[];++w<t;)f&&f[w].run();w=-1,t=d.length}f=null,h=!1,o(e)}}function i(e,t){this.fun=e,this.array=t}function s(){}var u,p,m=e.exports={};!function(){try{u="function"===typeof setTimeout?setTimeout:n}catch(e){u=n}try{p="function"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var f,d=[],h=!1,w=-1;m.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new i(e,t)),1!==d.length||h||a(c)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=s,m.addListener=s,m.once=s,m.off=s,m.removeListener=s,m.removeAllListeners=s,m.emit=s,m.prependListener=s,m.prependOnceListener=s,m.listeners=function(e){return[]},m.binding=function(e){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(e){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(e,t,n){e.exports=n(8)},function(e,t,n){var r=function(){return this}()||Function("return this")(),a=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=a&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(9),a)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof a?t:a,l=Object.create(o.prototype),c=new f(r||[]);return l._invoke=s(e,n,c),l}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function a(){}function o(){}function l(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function i(e){function t(n,a,o,l){var c=r(e[n],e,a);if("throw"!==c.type){var i=c.arg,s=i.value;return s&&"object"===typeof s&&v.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,o,l)},function(e){t("throw",e,o,l)}):Promise.resolve(s).then(function(e){i.value=e,o(i)},l)}l(c.arg)}function n(e,n){function r(){return new Promise(function(r,a){t(e,n,r,a)})}return a=a?a.then(r,r):r()}var a;this._invoke=n}function s(e,t,n){var a=P;return function(o,l){if(a===C)throw new Error("Generator is already running");if(a===A){if("throw"===o)throw l;return h()}for(n.method=o,n.arg=l;;){var c=n.delegate;if(c){var i=u(c,n);if(i){if(i===x)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===P)throw a=A,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=C;var s=r(e,t,n);if("normal"===s.type){if(a=n.done?A:_,s.arg===x)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=A,n.method="throw",n.arg=s.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===w){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=w,u(e,t),"throw"===t.method))return x;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var a=r(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,x;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=w),t.delegate=null,x):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,x)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=w,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:w,done:!0}}var w,y=Object.prototype,v=y.hasOwnProperty,g="function"===typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",E=g.asyncIterator||"@@asyncIterator",S=g.toStringTag||"@@toStringTag",k="object"===typeof e,O=t.regeneratorRuntime;if(O)return void(k&&(e.exports=O));O=t.regeneratorRuntime=k?e.exports:{},O.wrap=n;var P="suspendedStart",_="suspendedYield",C="executing",A="completed",x={},T={};T[b]=function(){return this};var j=Object.getPrototypeOf,N=j&&j(j(d([])));N&&N!==y&&v.call(N,b)&&(T=N);var I=l.prototype=a.prototype=Object.create(T);o.prototype=I.constructor=l,l.constructor=o,l[S]=o.displayName="GeneratorFunction",O.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},O.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,S in e||(e[S]="GeneratorFunction")),e.prototype=Object.create(I),e},O.awrap=function(e){return{__await:e}},c(i.prototype),i.prototype[E]=function(){return this},O.AsyncIterator=i,O.async=function(e,t,r,a){var o=new i(n(e,t,r,a));return O.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},c(I),I[S]="Generator",I[b]=function(){return this},I.toString=function(){return"[object Generator]"},O.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},O.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=w,this.done=!1,this.delegate=null,this.method="next",this.arg=w,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=w)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=w),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return t("end");if(a.tryLoc<=this.prev){var l=v.call(a,"catchLoc"),c=v.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return t(a.catchLoc,!0);if(this.prev<a.finallyLoc)return t(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return t(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return t(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,x):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),x},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),x}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;m(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=w),x}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";var r=n(4),a=function(e){var t=e.path,n=e.method,a=e.body,o=localStorage.getItem("jwt"),l=n||"GET",c={method:l,mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"}};o&&(c.headers.Authorization="Bearer "+o);var i=""+r.a+t,s=c;switch(n){case"PUT":case"POST":s.body=JSON.stringify(a);default:return fetch(i,s).then(function(e){if(200==e.status)return e.json();throw new Error(e.statusText)})}};t.a=a},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 a(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 o(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 l=n(1),c=(n.n(l),n(33)),i=n.n(c),s=n(40),u=(n.n(s),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=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.headers,n=e.data;return wp.element.createElement("div",{className:"soundcheck-table"},wp.element.createElement("div",{className:"soundcheck-table_header"},t.map(function(e,t){return wp.element.createElement(f,{key:t,title:e})})),wp.element.createElement("div",{className:"soundcheck-table_content"},n.map(function(e,t){return wp.element.createElement(m,{key:t,row:e})})))}}]),t}(l.Component);p.propTypes={headers:i.a.arrayOf(i.a.string),data:i.a.array.isRequired};var m=function(e){var t=e.row;return wp.element.createElement("div",{className:"soundcheck-table_row"},t.map(function(e,t){return e.component?wp.element.createElement("div",{key:t,className:"soundcheck-table_data "+("center"==e.align?" soundcheck-table_data_center":"")},e.component):wp.element.createElement("div",{key:t,className:"soundcheck-table_data "+("center"==e.align?" soundcheck-table_data_center":""),dangerouslySetInnerHTML:{__html:e.value}})}))},f=function(e){var t=e.title;return wp.element.createElement("div",{className:"soundcheck-table_header-item"},t)};t.a=p},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(2)),o=(n.n(a),n(49)),l=(n.n(o),Object(a.withDispatch)(function(e,t){var n=e("soundcheck"),r=n.setUser;return{signOut:function(){r(null),localStorage.removeItem("jwt")}}})(function(e){var t=e.signOut;return wp.element.createElement(r.PanelRow,null,wp.element.createElement("div",{className:"soundcheck-dashboard-footer"},wp.element.createElement("div",{className:"soundcheck-dashboard-footer__item"},wp.element.createElement(r.Button,{isLink:!0,onClick:t},"Sign Out")),wp.element.createElement("div",{className:"soundcheck-dashboard-footer__item"},wp.element.createElement(r.ExternalLink,{href:"https://soundcheck.ai"},"soundcheck.ai")),wp.element.createElement("div",{className:"soundcheck-dashboard-footer__item"},wp.element.createElement(r.ExternalLink,{href:"mailto:help@soundcheck.ai"},"Help"))))}));t.a=l},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(4)),o=function(){var e=window.location.hostname,t=window.location.protocol+"//"+e,n=localStorage.getItem("jwt"),o=function(){var e=a.b+"/app/start/wordpress?url="+encodeURIComponent(t)+"&token="+n;window.location.href=e};return wp.element.createElement(r.Button,{isPrimary:!0,onClick:o},"Sign Up With ",e)};t.a=o},function(e,t,n){"use strict";(function(t){"production"===t.env.NODE_ENV?e.exports=n(34):e.exports=n(35)}).call(t,n(6))},function(e,t,n){"use strict";var r=n(3),a=n(0),o=(n.n(a),function(e){var t=e.isLoading,n=e.isValid,o=e.tooltip,l=e.color;return t?wp.element.createElement(a.Spinner,null):n?r.a.speakable(o,l):wp.element.createElement("span",{className:"dashicons dashicons-minus"})});t.a=o},function(e,t){},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),n(2)),o=(n.n(a),n(0)),l=(n.n(o),n(5)),c=(n.n(l),n(10)),i=n(4),s=n(50),u=(n.n(s),n(19)),p=n.n(u),m=Object(l.compose)([Object(a.withDispatch)(function(e,t){var n=e("soundcheck"),r=n.setUser;return{onToken:function(e){localStorage.setItem("jwt",e),Object(c.a)({path:"/v4/user"}).then(function(e){r(e)})}}}),Object(l.withState)({email:void 0,codeSent:!1})])(function(e){var t=e.codeSent,n=e.email,r=e.className,a=e.setState,l=e.onToken;return wp.element.createElement(o.Panel,{header:"Already Have an Account?",className:r||""},wp.element.createElement(o.PanelBody,null,wp.element.createElement(o.PanelRow,null,wp.element.createElement("div",{className:"sign-in"},wp.element.createElement("div",{className:"sign-in__form"},wp.element.createElement("div",{class:"logo"},wp.element.createElement("img",{height:"48",src:p.a})),wp.element.createElement("h3",null,"Sign In"),t?wp.element.createElement(d,{email:n,onGoBack:function(){a({codeSent:!1})},onTokenReceived:l}):wp.element.createElement(f,{onCodeSent:function(e){a({codeSent:!0,email:e})}}))))))}),f=Object(l.withState)({email:"",error:null})(function(e){var t=e.onCodeSent,n=e.email,a=e.setState,l=e.error;return wp.element.createElement(r.Fragment,null,l&&wp.element.createElement("div",{className:"sign-in__notice"},wp.element.createElement(o.Notice,{status:"error",onRemove:function(){a({error:null})}},l)),wp.element.createElement(o.TextControl,{label:"Your Email Address",type:"email",value:n,onChange:function(e){return a({email:e})}}),wp.element.createElement(o.Button,{className:"sign-in__button",isPrimary:!0,onClick:function(){if(n)return fetch(i.a+"/auth/email",{method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,create:!1})}).then(function(e){200==e.status?t(n):500==e.status?a({error:"There was an error sending your login code."}):e.json().then(function(e){a({error:e.message})})}).catch(function(e){return a({error:e})})}},"Send Sign In Code"))}),d=Object(l.withState)({authCode:"000000",error:null})(function(e){var t=e.authCode,n=e.onGoBack,a=e.onTokenReceived,l=e.error,c=e.email,s=e.setState;return wp.element.createElement(r.Fragment,null,l&&wp.element.createElement("div",{className:"sign-in__notice"},wp.element.createElement(o.Notice,{status:"error",onRemove:function(){s({error:null})}},l)),wp.element.createElement(o.TextControl,{label:"Your Login Code",type:"text",onChange:function(e){s({authCode:e})}}),wp.element.createElement(o.Button,{className:"sign-in__button",isPrimary:!0,onClick:function(){return fetch(i.a+"/auth/email?email="+encodeURIComponent(c)+"&code="+t,{method:"GET",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"}}).then(function(e){if(200==e.status)return e.json();throw new Error("Invalid login token")}).then(function(e){a(e.token)}).catch(function(e){s({error:e.message})})}},"Confirm Code"),wp.element.createElement("p",null,"Didn't receive your code?"),wp.element.createElement(o.Button,{isLink:!0,onClick:n},"Try Again"))});t.a=m},function(e,t){e.exports="/wp-content/plugins/soundcheck/a69dbe4634047ba85aba5e10462c54cb.png"},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(13)),o=n(14),l=function(e){var t=e.domain;return wp.element.createElement(r.Panel,{header:"Soundcheck Voice Hosting"},wp.element.createElement(r.PanelBody,null,wp.element.createElement(r.Notice,{status:"warning",isDismissible:!1},"This domain ",t," is not signed up with Soundcheck."),wp.element.createElement("p",null,"You can sign up for free and start bringing your business to voice."),wp.element.createElement("p",null,wp.element.createElement(o.a,null)),wp.element.createElement(a.a,null)))};t.a=l},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),a=n.n(r),o=n(1),l=(n.n(o),n(27)),c=n.n(l),i=n(10),s=n(2),u=(n.n(s),n(28)),p=n(58),m=n(59);Object(s.registerStore)("soundcheck",{reducer:Object(s.combineReducers)({speakables:p.b,voiceApps:p.c,soundcheckAuth:p.a}),actions:m.a,selectors:{getSpeakablePosts:function(e){return e.speakables.posts},getSpeakablePages:function(e){return e.speakables.pages},getVoiceApps:function(e){return e.voiceApps.apps},getVoiceAppsLoaded:function(e){return e.voiceApps.loaded},getCommandSources:function(e,t,n){return e.voiceApps.sources[n]},getSelectedVoiceAppId:function(e){return e.voiceApps.selectedAppId},getVoiceAppStats:function(e,t,n,r){var a=e.voiceApps,o=Math.round((r-n)/1e3/3600/24);return a.stats[t+"-"+o]},getSpeakableNews:function(e,t){return e.voiceApps.news[t]},getUser:function(e){return e.soundcheckAuth.user},getUserLoaded:function(e){return e.soundcheckAuth.loaded}},controls:{FETCH_FROM_WPAPI:function(e){return c()({path:e.path})},FETCH_FROM_SOUNDCHECKAPI:function(e){return Object(i.a)({path:e.path})}},resolvers:{getSpeakablePosts:a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/wp/v2/posts?page="+t,e.next=3,m.a.fetchFromWPAPI(n);case 3:return r=e.sent,e.abrupt("return",m.a.setSpeakablePosts(r));case 5:case"end":return e.stop()}},e,this)}),getSpeakablePages:a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/wp/v2/pages?page="+t,e.next=3,m.a.fetchFromWPAPI(n);case 3:return r=e.sent,e.abrupt("return",m.a.setSpeakablePages(r));case 5:case"end":return e.stop()}},e,this)}),getVoiceApps:a.a.mark(function e(){var t,n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="/v4/user/voice_apps",e.next=3,m.a.fetchFromSoundcheckAPI(t);case 3:return n=e.sent,e.abrupt("return",m.a.setVoiceApps(n));case 5:case"end":return e.stop()}},e,this)}),getVoiceAppStats:a.a.mark(function e(t,n,r){var o,l;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o="/v4/user/voice_apps/"+t+"/stats?start="+n+"&end="+r,e.next=3,m.a.fetchFromSoundcheckAPI(o);case 3:return l=e.sent,e.abrupt("return",m.a.setVoiceAppStats(t,l,n,r));case 5:case"end":return e.stop()}},e,this)}),getCommandSources:a.a.mark(function e(t,n){var r,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/v4/user/voice_apps/"+t+"/commands/"+n+"/sources",e.next=3,m.a.fetchFromSoundcheckAPI(r);case 3:return o=e.sent,e.abrupt("return",m.a.setCommandSources(n,o));case 5:case"end":return e.stop()}},e,this)}),getSpeakableNews:a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/v4/user/voice_apps/"+t+"/news",e.next=3,m.a.fetchFromSoundcheckAPI(n);case 3:return r=e.sent,e.abrupt("return",m.a.setSpeakableNews(t,r));case 5:case"end":return e.stop()}},e,this)}),getUser:a.a.mark(function e(){var t,n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="/v4/user",e.prev=1,e.next=4,m.a.fetchFromSoundcheckAPI(t);case 4:return n=e.sent,e.abrupt("return",m.a.setUser(n));case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",m.a.setUser(null));case 11:case"end":return e.stop()}},e,this,[[1,8]])})}}),Object(o.render)(wp.element.createElement(u.a,null),document.getElementById("soundcheck-root"))},function(e,t){e.exports=wp.apiFetch},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 a(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 o(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 l=n(1),c=(n.n(l),n(29)),i=(n.n(c),n(30)),s=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=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"render",value:function(){return wp.element.createElement("div",{className:"soundcheck-layout"},wp.element.createElement(i.a,null))}}]),t}(l.Component);t.a=u},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(1),a=(n.n(r),n(5)),o=(n.n(a),n(31)),l=n(44),c=n(53),i=window.location.search,s=/[?&]page=([^&]*)/.exec(i),u=decodeURIComponent(s[1]),p=Object(a.withState)({route:u})(function(e){switch(e.route){case"soundcheck-structured-data":return;case"soundcheck-speakable-news":return wp.element.createElement(c.a,null);case"soundcheck-voice-interactions":return wp.element.createElement(l.a,null);default:return wp.element.createElement(o.a,null)}})},function(e,t,n){"use strict";var r=n(32),a=function(){return wp.element.createElement(r.a,{className:"margin-bottom"})};t.a=a},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(a,o){try{var l=t[a](o),c=l.value}catch(e){return void n(e)}if(!l.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}return r("next")})}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=n(7),l=n.n(o),c=n(1),i=(n.n(c),n(0)),s=(n.n(i),n(2)),u=(n.n(s),n(5)),p=(n.n(u),n(11)),m=n(3),f=n(41),d=n(4),h=n(16),w=n(43),y=(n.n(w),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}),v=function(){var e=r(l.a.mark(function e(t){var n,r,a;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t.link);case 2:return n=e.sent,e.next=5,n.text();case 5:return r=e.sent,a=Object(f.a)(r),e.abrupt("return",a);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),g=function(e){var t=e.className;return wp.element.createElement(i.Panel,{header:"Voice-Optimized Web Content",className:t||""},wp.element.createElement(i.PanelBody,null,wp.element.createElement("p",null,wp.element.createElement(i.ExternalLink,{href:d.b+"/speakable-content"},"Speakable content")," is text on your website that you designate as optimized for voice assistants. That means it is particularly suited to be read out loud using text to speech.")),wp.element.createElement(E,null),wp.element.createElement(S,null),wp.element.createElement(i.PanelBody,null,wp.element.createElement("p",null,"The tables above show posts that contain speakable content."),wp.element.createElement("ul",null,wp.element.createElement("li",null,"FORMATTED - the post has a valid ",wp.element.createElement("code",null,"SpeakableSpecification"),"."),wp.element.createElement("li",null,'SPEAKABLE - the post contains "speakable" content.')),wp.element.createElement("p",null,'To add speakable content to any post use the "Speakable Section" block in the editor. Click on a SPEAKABLE column check mark to preview the content.')))},b=Object(u.withState)({data:[],initialized:!1,loading:!1})(function(e){var t=e.json,n=e.data,r=e.setState,o=e.type,l=e.icon,c=e.loading;if(e.initialized){if(!c){r({loading:!0});var s=!0,u=!1,f=void 0;try{for(var d,w=n[Symbol.iterator]();!(s=(d=w.next()).done);s=!0){var g=d.value;!function(e){v(e).then(function(t){var o=t.specification,l=t.content,c=t.speakables,i=t.validations,s=[].concat(a(n)),u=s.find(function(t){return t.id===e.id});u.loaded=!0,u.hasSpeakableSpecification=!!o,u.isSpeakable=c&&c.length,u.content=l,u.validations=i,r({data:s})})}(g)}}catch(e){u=!0,f=e}finally{try{!s&&w.return&&w.return()}finally{if(u)throw f}}}}else if(t.length){var b=t.map(function(e){return y({},e,{loaded:!1,hasSpeakableSpecification:!1,isSpeakable:!1,content:null,validations:[],speakables:null})});r({data:b,initialized:!0})}var E=n.map(function(e){return[{component:wp.element.createElement("a",{href:e.link,dangerouslySetInnerHTML:{__html:e.title.rendered}})},{value:new Date(e.date).toLocaleDateString(),align:"center"},{component:wp.element.createElement(h.a,{isLoading:!e.loaded,isValid:e.hasSpeakableSpecification,color:m.a.colors.speakable_purple,tooltip:"Valid Specification"}),align:"center"},{component:wp.element.createElement(k,{isLoading:!e.loaded,validations:e.validations,content:e.content}),align:"center"}]});return wp.element.createElement(i.PanelBody,{title:o+"s",icon:l,initialOpen:!0},wp.element.createElement(i.PanelRow,null,E.length>0?wp.element.createElement(p.a,{data:E,headers:["Title","Date","Formatted","Speakable"]}):wp.element.createElement("p",null,"No ",o,"s with Speakable data yet. Add a Speakable block to a ",o," to get started.")))}),E=Object(s.withSelect)(function(e,t){return{json:(0,e("soundcheck").getSpeakablePosts)(1),type:"Post",icon:"admin-post"}})(b),S=Object(s.withSelect)(function(e,t){return{json:(0,e("soundcheck").getSpeakablePages)(1),type:"Page",icon:"admin-page"}})(b),k=Object(u.withState)({isOpen:!1})(function(e){var t=e.isLoading,n=e.isOpen,r=e.validations,a=e.content,o=e.setState;return t?wp.element.createElement(i.Spinner,null):a?r.length?wp.element.createElement(c.Fragment,null,wp.element.createElement("span",{className:"pointer dashicons dashicons-warning",onClick:function(){return o({isOpen:!0})}}),n?wp.element.createElement(O,{validations:r,content:a,onRequestClose:function(){o({isOpen:!1})}}):null):wp.element.createElement(c.Fragment,null,wp.element.createElement("span",{className:"pointer",onClick:function(){return o({isOpen:!0})}},m.a.speakable("Speakable Content Found",m.a.colors.speakable_purple)),n?wp.element.createElement(O,{validations:r,content:a,onRequestClose:function(){o({isOpen:!1})}}):null):wp.element.createElement("span",{className:"dashicons dashicons-minus"})}),O=function(e){var t=e.validations,n=e.content,r=e.onRequestClose;return wp.element.createElement(i.Modal,{title:"Speakable Content",onRequestClose:r},t.length?wp.element.createElement("ul",null,t.map(function(e,t){return wp.element.createElement("li",{key:t},"error"==e.type?wp.element.createElement("span",{className:"dashicons dashicons-warning"}):wp.element.createElement("span",{className:"dashicons dashicons-info"})," ",e.message)})):wp.element.createElement("p",null,wp.element.createElement("span",{className:"dashicons dashicons-yes"})," Valid Speakable content."),wp.element.createElement("hr",null),wp.element.createElement("p",null,"Preview"),wp.element.createElement("blockquote",null,n))};t.a=g},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r=n(15);e.exports=n(36)(r.isElement,!0)}else e.exports=n(39)()}).call(t,n(6))},function(e,t,n){"use strict";function r(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case l:switch(e=e.type){case f:case d:case i:case u:case s:case w:return e;default:switch(e=e&&e.$$typeof){case m:case h:case p:return e;default:return t}}case v:case y:case c:return t}}}function a(e){return r(e)===d}Object.defineProperty(t,"__esModule",{value:!0});var o="function"===typeof Symbol&&Symbol.for,l=o?Symbol.for("react.element"):60103,c=o?Symbol.for("react.portal"):60106,i=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,p=o?Symbol.for("react.provider"):60109,m=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,w=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116;t.typeOf=r,t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=m,t.ContextProvider=p,t.Element=l,t.ForwardRef=h,t.Fragment=i,t.Lazy=v,t.Memo=y,t.Portal=c,t.Profiler=u,t.StrictMode=s,t.Suspense=w,t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===u||e===s||e===w||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===p||e.$$typeof===m||e.$$typeof===h)},t.isAsyncMode=function(e){return a(e)||r(e)===f},t.isConcurrentMode=a,t.isContextConsumer=function(e){return r(e)===m},t.isContextProvider=function(e){return r(e)===p},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===l},t.isForwardRef=function(e){return r(e)===h},t.isFragment=function(e){return r(e)===i},t.isLazy=function(e){return r(e)===v},t.isMemo=function(e){return r(e)===y},t.isPortal=function(e){return r(e)===c},t.isProfiler=function(e){return r(e)===u},t.isStrictMode=function(e){return r(e)===s},t.isSuspense=function(e){return r(e)===w}},function(e,t,n){"use strict";(function(e){"production"!==e.env.NODE_ENV&&function(){function e(e){return"string"===typeof e||"function"===typeof e||e===g||e===P||e===E||e===b||e===C||"object"===typeof e&&null!==e&&(e.$$typeof===x||e.$$typeof===A||e.$$typeof===S||e.$$typeof===k||e.$$typeof===_)}function n(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case y:var n=e.type;switch(n){case O:case P:case g:case E:case b:case C:return n;default:var r=n&&n.$$typeof;switch(r){case k:case _:case S:return r;default:return t}}case x:case A:case v:return t}}}function r(e){return W||(W=!0,N(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),a(e)||n(e)===O}function a(e){return n(e)===P}function o(e){return n(e)===k}function l(e){return n(e)===S}function c(e){return"object"===typeof e&&null!==e&&e.$$typeof===y}function i(e){return n(e)===_}function s(e){return n(e)===g}function u(e){return n(e)===x}function p(e){return n(e)===A}function m(e){return n(e)===v}function f(e){return n(e)===E}function d(e){return n(e)===b}function h(e){return n(e)===C}Object.defineProperty(t,"__esModule",{value:!0});var w="function"===typeof Symbol&&Symbol.for,y=w?Symbol.for("react.element"):60103,v=w?Symbol.for("react.portal"):60106,g=w?Symbol.for("react.fragment"):60107,b=w?Symbol.for("react.strict_mode"):60108,E=w?Symbol.for("react.profiler"):60114,S=w?Symbol.for("react.provider"):60109,k=w?Symbol.for("react.context"):60110,O=w?Symbol.for("react.async_mode"):60111,P=w?Symbol.for("react.concurrent_mode"):60111,_=w?Symbol.for("react.forward_ref"):60112,C=w?Symbol.for("react.suspense"):60113,A=w?Symbol.for("react.memo"):60115,x=w?Symbol.for("react.lazy"):60116,T=function(){},j=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=0,o="Warning: "+e.replace(/%s/g,function(){return n[a++]});"undefined"!==typeof console&&console.warn(o);try{throw new Error(o)}catch(e){}};T=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];j.apply(void 0,[t].concat(r))}};var N=T,I=O,L=P,V=k,R=S,F=y,M=_,D=g,B=x,U=A,$=v,q=E,G=b,H=C,W=!1;t.typeOf=n,t.AsyncMode=I,t.ConcurrentMode=L,t.ContextConsumer=V,t.ContextProvider=R,t.Element=F,t.ForwardRef=M,t.Fragment=D,t.Lazy=B,t.Memo=U,t.Portal=$,t.Profiler=q,t.StrictMode=G,t.Suspense=H,t.isValidElementType=e,t.isAsyncMode=r,t.isConcurrentMode=a,t.isContextConsumer=o,t.isContextProvider=l,t.isElement=c,t.isForwardRef=i,t.isFragment=s,t.isLazy=u,t.isMemo=p,t.isPortal=m,t.isProfiler=f,t.isStrictMode=d,t.isSuspense=h}()}).call(t,n(6))},function(e,t,n){"use strict";(function(t){function r(){return null}var a=n(15),o=n(37),l=n(12),c=n(38),i=Function.call.bind(Object.prototype.hasOwnProperty),s=function(){};"production"!==t.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,n){function u(e){var t=e&&(A&&e[A]||e[x]);if("function"===typeof t)return t}function p(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function m(e){this.message=e,this.stack=""}function f(e){function r(r,c,i,u,p,f,d){if(u=u||T,f=f||i,d!==l){if(n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("production"!==t.env.NODE_ENV&&"undefined"!==typeof console){var w=u+":"+i;!a[w]&&o<3&&(s("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),a[w]=!0,o++)}}return null==c[i]?r?new m(null===c[i]?"The "+p+" `"+f+"` is marked as required in `"+u+"`, but its value is `null`.":"The "+p+" `"+f+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(c,i,u,p,f)}if("production"!==t.env.NODE_ENV)var a={},o=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function d(e){function t(t,n,r,a,o,l){var c=t[n];if(O(c)!==e)return new m("Invalid "+a+" `"+o+"` of type `"+P(c)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return f(t)}function h(e){function t(t,n,r,a,o){if("function"!==typeof e)return new m("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var c=t[n];if(!Array.isArray(c)){return new m("Invalid "+a+" `"+o+"` of type `"+O(c)+"` supplied to `"+r+"`, expected an array.")}for(var i=0;i<c.length;i++){var s=e(c,i,r,a,o+"["+i+"]",l);if(s instanceof Error)return s}return null}return f(t)}function w(e){function t(t,n,r,a,o){if(!(t[n]instanceof e)){var l=e.name||T;return new m("Invalid "+a+" `"+o+"` of type `"+C(t[n])+"` supplied to `"+r+"`, expected instance of `"+l+"`.")}return null}return f(t)}function y(e){function n(t,n,r,a,o){for(var l=t[n],c=0;c<e.length;c++)if(p(l,e[c]))return null;var i=JSON.stringify(e,function(e,t){return"symbol"===P(t)?String(t):t});return new m("Invalid "+a+" `"+o+"` of value `"+String(l)+"` supplied to `"+r+"`, expected one of "+i+".")}return Array.isArray(e)?f(n):("production"!==t.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)}function v(e){function t(t,n,r,a,o){if("function"!==typeof e)return new m("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],s=O(c);if("object"!==s)return new m("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var u in c)if(i(c,u)){var p=e(c,u,r,a,o+"."+u,l);if(p instanceof Error)return p}return null}return f(t)}function g(e){function n(t,n,r,a,o){for(var c=0;c<e.length;c++){if(null==(0,e[c])(t,n,r,a,o,l))return null}return new m("Invalid "+a+" `"+o+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var a=0;a<e.length;a++){var o=e[a];if("function"!==typeof o)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_(o)+" at index "+a+"."),r}return f(n)}function b(e){function t(t,n,r,a,o){var c=t[n],i=O(c);if("object"!==i)return new m("Invalid "+a+" `"+o+"` of type `"+i+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var u=e[s];if(u){var p=u(c,s,r,a,o+"."+s,l);if(p)return p}}return null}return f(t)}function E(e){function t(t,n,r,a,c){var i=t[n],s=O(i);if("object"!==s)return new m("Invalid "+a+" `"+c+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");var u=o({},t[n],e);for(var p in u){var f=e[p];if(!f)return new m("Invalid "+a+" `"+c+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null,"  ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null,"  "));var d=f(i,p,r,a,c+"."+p,l);if(d)return d}return null}return f(t)}function S(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(S);if(null===t||e(t))return!0;var n=u(t);if(!n)return!1;var r,a=n.call(t);if(n!==t.entries){for(;!(r=a.next()).done;)if(!S(r.value))return!1}else for(;!(r=a.next()).done;){var o=r.value;if(o&&!S(o[1]))return!1}return!0;default:return!1}}function k(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function O(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":k(t,e)?"symbol":t}function P(e){if("undefined"===typeof e||null===e)return""+e;var t=O(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){var t=P(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function C(e){return e.constructor&&e.constructor.name?e.constructor.name:T}var A="function"===typeof Symbol&&Symbol.iterator,x="@@iterator",T="<<anonymous>>",j={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:function(){return f(r)}(),arrayOf:h,element:function(){function t(t,n,r,a,o){var l=t[n];if(!e(l)){return new m("Invalid "+a+" `"+o+"` of type `"+O(l)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return f(t)}(),elementType:function(){function e(e,t,n,r,o){var l=e[t];if(!a.isValidElementType(l)){return new m("Invalid "+r+" `"+o+"` of type `"+O(l)+"` supplied to `"+n+"`, expected a single ReactElement type.")}return null}return f(e)}(),instanceOf:w,node:function(){function e(e,t,n,r,a){return S(e[t])?null:new m("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:v,oneOf:y,oneOfType:g,shape:b,exact:E};return m.prototype=Error.prototype,j.checkPropTypes=c,j.resetWarningCache=c.resetWarningCache,j.PropTypes=j,j}}).call(t,n(6))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,c,i=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var u in n)o.call(n,u)&&(i[u]=n[u]);if(a){c=a(n);for(var p=0;p<c.length;p++)l.call(n,c[p])&&(i[c[p]]=n[c[p]])}}return i}},function(e,t,n){"use strict";(function(t){function r(e,n,r,i,s){if("production"!==t.env.NODE_ENV)for(var u in e)if(c(e,u)){var p;try{if("function"!==typeof e[u]){var m=Error((i||"React class")+": "+r+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.");throw m.name="Invariant Violation",m}p=e[u](n,u,i,r,null,o)}catch(e){p=e}if(!p||p instanceof Error||a((i||"React class")+": type specification of "+r+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in l)){l[p.message]=!0;var f=s?s():"";a("Failed "+r+" type: "+p.message+(null!=f?f:""))}}}var a=function(){};if("production"!==t.env.NODE_ENV){var o=n(12),l={},c=Function.call.bind(Object.prototype.hasOwnProperty);a=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}r.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(l={})},e.exports=r}).call(t,n(6))},function(e,t,n){"use strict";function r(){}function a(){}var o=n(12);a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,l){if(l!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(42),a=n.n(r),o=function(e){var t=[];return a()(e).find("script[type='application/ld+json']").each(function(e,n){try{t[e]=JSON.parse(a()(this).html())}catch(e){throw new Error("There was an error parsing the JSON in the 'application/ld+json' script tag. "+e)}}),0==t.length?null:c(t)},l=function(e){var t=a()("<output>").append(a.a.parseHTML(e)),n=[],r=o(t);if(!r)return{specification:r,speakables:null,content:null,validations:[]};if(0==r.cssSelector.length)throw new Error("No valid selectors found in SpeakableSpecification.");var l=!0,c=!1,i=void 0;try{for(var u,m=r.cssSelector[Symbol.iterator]();!(l=(u=m.next()).done);l=!0){var f=u.value;a()(t).find(f).each(function(e,t){n.push(a()(this).text().trim())})}}catch(e){c=!0,i=e}finally{try{!l&&m.return&&m.return()}finally{if(c)throw i}}var d=s(n),h=p(d);return{specification:r,speakables:n,content:d,validations:h}},c=function(e){var t=!0,n=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var l=a.value;if(l instanceof Array){var c=!0,s=!1,u=void 0;try{for(var p,m=l[Symbol.iterator]();!(c=(p=m.next()).done);c=!0){var f=p.value,d=i(f);if(d)return d}}catch(e){s=!0,u=e}finally{try{!c&&m.return&&m.return()}finally{if(s)throw u}}}else{var h=i(l);if(h)return h}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null},i=function(e){return e.speakable&&e.speakable["@type"]&&"SpeakableSpecification"==e.speakable["@type"]?e.speakable:null},s=function(e){return e?e.map(function(e){return u(e)}).join(" "):null},u=function(e){return e?(e=e.trim(),e.match(/^[\w\W\s]+[?.!]$/g)?e:e+"."):"."},p=function(e){var t=[];if(!e)return t.push({type:"error",message:"No speakable content found."}),t;var n=e.match(/\S+/g).length;return n<7?t.push({type:"error",message:"The speakable content is too short. Aim for 20-30 seconds of spoken content (2-3 sentences)."}):n<20&&t.push({type:"warning",message:"The speakable may be too short. Aim for 20-30 seconds of spoken content."}),n>100?t.push({type:"error",message:"The speakable content is too long. Aim for 20-30 seconds of spoken content (2-3 sentences)."}):n>80&&t.push({type:"warning",message:"The speakable may be too long. Aim for 20-30 seconds of spoken content."}),t}},function(e,t){e.exports=jQuery},function(e,t){},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(1)),o=(n.n(a),n(2)),l=(n.n(o),n(45)),c=n(46),i=(n.n(c),n(47)),s=n(13),u=n(18),p=n(20),m=n(14),f=n(51),d=n.n(f),h=n(52),w=n.n(h),y=n(19),v=n.n(y),g=n(4),b=Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getUser,a=n.getUserLoaded;return{user:r(),loaded:a()}})(function(e){var t=e.user;return e.loaded?t?wp.element.createElement(E,{className:"margin-bottom"}):wp.element.createElement("div",{className:"flex-grid"},wp.element.createElement("div",{class:"col margin-bottom"},wp.element.createElement(r.Panel,{header:"Voice Interactions"},wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,wp.element.createElement("strong",null,"Set up your Voice Interactions to define how users can engange with your voice presence.")),wp.element.createElement("p",null,"Manage your content using WordPress as your CMS and then publish your interactions to popular voice assistants."),wp.element.createElement(r.PanelRow,null,wp.element.createElement("img",{src:d.a,width:"128"}),wp.element.createElement("img",{src:w.a,width:"128"}),wp.element.createElement("img",{src:v.a,width:"128"})),wp.element.createElement("hr",null),wp.element.createElement("p",null,"Start by signing up for a free Soundcheck account."),wp.element.createElement("p",null,wp.element.createElement(m.a,null))))),wp.element.createElement(u.a,{className:"col margin-bottom"})):wp.element.createElement(r.Spinner,null)}),E=Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getVoiceApps,a=n.getVoiceAppsLoaded,o=window.location.hostname,l=r(),c=a();return{selectedApp:l.find(function(e){return e.domain==o}),voiceApps:l,domain:o,loaded:c}})(function(e){var t=e.className,n=e.selectedApp,o=e.loaded,c=e.icon,u=e.domain;return o?n?wp.element.createElement(a.Fragment,null,wp.element.createElement(r.Panel,{header:"Voice Apps",className:t||""},wp.element.createElement(r.PanelBody,{title:n.term+" Voice Activity",icon:c,initialOpen:!0},wp.element.createElement("p",null,"See which platforms are accessing your published voice content."),wp.element.createElement("p",null,wp.element.createElement(r.ExternalLink,{href:g.b+"/app/properties/"+n.id+"/availability"},"Edit Availability")),wp.element.createElement(l.a,{app:n}))),wp.element.createElement(r.Panel,{header:"Voice Interactions",className:t||""},wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,"Your Voice Interactions define how users can engange with your voice presence. Each interaction represents a question or command from a user and the response from the voice assistant."),wp.element.createElement("p",null,wp.element.createElement(r.ExternalLink,{href:g.b+"/app/properties/"+n.id+"/interactions"},"Manage Interactions")),n&&wp.element.createElement(r.Panel,{className:t||""},n&&n.commands.map(function(e){return wp.element.createElement(i.a,{app:n,command:e})})),wp.element.createElement(s.a,null)))):wp.element.createElement(p.a,{domain:u}):wp.element.createElement(r.Spinner,null)});t.a=b},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(2)),o=(n.n(a),n(5)),l=(n.n(o),n(11)),c=n(17),i=(n.n(c),Object(o.compose)([Object(o.withState)({now:Date.now()}),Object(a.withSelect)(function(e,t){var n=t.app,r=t.now,a=e("soundcheck"),o=a.getVoiceAppStats,l=o(n.id,0,r);return{stats:n?u(l).map(function(e){return[{value:e.platform},{value:e.requests},{value:e.users}]}):void 0}})])(function(e){var t=e.stats;return t?wp.element.createElement(l.a,{data:t,headers:["platform","requests","users"]}):wp.element.createElement(r.Spinner,null)})),s=[{platform:"Alexa",requests:0,users:0},{platform:"Actions on Google",requests:0,users:0},{platform:"Soundcheck Mobile",requests:0,users:0}],u=function(e){var t=new Set,n=[Object.assign({},s[0]),Object.assign({},s[1]),Object.assign({},s[2])];if(e){var r=!0,a=!1,o=void 0;try{for(var l,c=e[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var i=l.value,u=-1;"alexa"==i.platform?u=0:"aog"==i.platform?u=1:"mobile"==i.platform&&(u=2),u>=0&&(n[u].requests++,t.has(i.userId)||(n[u].users++,t.add(i.userId)))}}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}}return n};t.a=i},function(e,t){},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),n(0)),o=(n.n(a),n(2)),l=(n.n(o),n(5)),c=(n.n(l),n(48)),i=(n.n(c),n(10)),s=n(4),u=n(17),p=(n.n(u),Object(o.withSelect)(function(e,t){var n=t.app,r=t.command,a=e("soundcheck"),o=a.getCommandSources;return{sources:r?o(n.id,r.id):void 0}})(function(e){var t=e.command,n=e.app,r=e.sources,o=t.id;return t.intent&&(o=t.intent.name),wp.element.createElement(a.PanelBody,{title:o,initialOpen:!0},wp.element.createElement("p",null,t.intent.description),r&&r.map(function(e){return wp.element.createElement(f,{source:e,app:n,command:t})}),r&&wp.element.createElement(m,{app:n,command:t}))})),m=Object(l.withState)({isPreviewing:!1,relaoding:!1,url:null})(function(e){var t=e.app,n=e.command,o=e.isPreviewing,l=e.reloading,c=e.setState,i=e.url,u=s.a+"/v4/domains/"+t.id+"/commands/"+n.id+"/audio";return wp.element.createElement(a.PanelRow,null,wp.element.createElement("div",{className:"soundcheck-source__preview"},o?l?wp.element.createElement(a.IconButton,{icon:"update",isBusy:!0}):wp.element.createElement(r.Fragment,null,wp.element.createElement("audio",{controls:!0},wp.element.createElement("source",{src:i,type:"audio/mpeg"})),wp.element.createElement(a.IconButton,{icon:"update",onClick:function(){c({reloading:!0}),setTimeout(function(){c({reloading:!1})},1e3)}})):wp.element.createElement(a.IconButton,{icon:"controls-volumeon",label:"Preview",isDefault:!0,onClick:function(){c({isPreviewing:!0,url:u})}})))}),f=function(e){var t=e.source,n=e.app,r=e.command;return wp.element.createElement(a.PanelRow,null,wp.element.createElement("div",{className:"soundcheck-source__row"},"SPEAKABLE"==t.contentSource.uuid?wp.element.createElement(h,{source:t,app:n,command:r}):wp.element.createElement(d,{source:t,app:n,command:r}),wp.element.createElement("div",{className:"soundcheck-source__row__item"},t.contentSource.name)))},d=function(e){var t=e.source,n=e.app;e.command;return wp.element.createElement("div",{className:"soundcheck-source__row__item"},wp.element.createElement(a.ExternalLink,{href:s.b+"/app/properties/"+n.id+"/interactions"},t.label))},h=Object(l.compose)([Object(l.withState)({isOpen:!1,option:void 0,url:void 0,selectedPage:void 0,selectedPost:void 0,initialized:!1})],[Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getSpeakablePosts;return{pages:(0,n.getSpeakablePages)(1),posts:r(1)}})],[Object(o.withDispatch)(function(e,t){var n=e("soundcheck"),r=n.setCommandSource;return{onClick:function(e){var n="/v4/user/voice_apps/"+t.app.id+"/commands/"+t.command.id+"/sources/"+t.source.id;return t.source.global.url=e,Object(i.a)({path:n,method:"PUT",body:t.source}).then(function(e){r(t.command.id,e)})}}})])(function(e){var t=e.isOpen,n=e.setState,o=e.source,l=e.onClick,i=e.pages,s=e.posts,u=e.option,p=e.url,m=e.initialized,f=e.selectedPage,d=e.selectedPost,h=i.map(function(e){return{label:Object(c.decodeEntities)(e.title.rendered),value:e.link}});h.unshift({label:"<Select a Page>",value:""});var w=s.map(function(e){return{label:Object(c.decodeEntities)(e.title.rendered),value:e.link}});if(w.unshift({label:"<Select a Post>",value:""}),!m){var y={option:void 0,url:void 0,selectedPage:"",selectedPost:"",initialized:!0};if(y.url=o.global.url,y.option="custom",y.url){var v=!0,g=!1,b=void 0;try{for(var E,S=h[Symbol.iterator]();!(v=(E=S.next()).done);v=!0){E.value.link==y.url&&(y.option="page",y.selectedPage=y.url)}}catch(e){g=!0,b=e}finally{try{!v&&S.return&&S.return()}finally{if(g)throw b}}var k=!0,O=!1,P=void 0;try{for(var _,C=w[Symbol.iterator]();!(k=(_=C.next()).done);k=!0){_.value.link==y.url&&(y.option="post",y.selectedPost=y.url)}}catch(e){O=!0,P=e}finally{try{!k&&C.return&&C.return()}finally{if(O)throw P}}}n(y)}return wp.element.createElement(r.Fragment,null,wp.element.createElement("div",{className:"soundcheck-source__row__item"},wp.element.createElement(a.Button,{isLink:!0,onClick:function(){return n({isOpen:!0})}},o.label)),t?wp.element.createElement(a.Modal,{title:"Speakable Content",onRequestClose:function(){return n({isOpen:!1})}},wp.element.createElement("form",null,wp.element.createElement(a.RadioControl,{label:"Select a source with Speakable content.",selected:u,options:[{label:"A Recent Blog Page",value:"page"},{label:"A Recent Blog Post",value:"post"},{label:"Other URL",value:"custom"}],onChange:function(e){n({option:e})}}),function(){switch(u){case"post":return wp.element.createElement(a.SelectControl,{label:"Select a Post",value:d,options:w,onChange:function(e){n({url:e,selectedPost:e})}});case"page":return wp.element.createElement(a.SelectControl,{label:"Select a Page",value:f,options:h,onChange:function(e){return n({url:e,selectedPage:e})}});case"custom":return wp.element.createElement(a.TextControl,{label:"Other URL",value:p,onChange:function(e){return n({url:e})}})}}(),wp.element.createElement(a.Button,{isDefault:!0,onClick:function(){n({isOpen:!1}),l(p)}},"Save"))):null)});t.a=p},function(e,t){e.exports=wp.htmlEntities},function(e,t){},function(e,t){},function(e,t){e.exports="/wp-content/plugins/soundcheck/bdf0973488134dbe05148d77d0311973.png"},function(e,t){e.exports="/wp-content/plugins/soundcheck/2c3962efb5c14417eb99b15033163bd8.png"},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(1)),o=(n.n(a),n(2)),l=(n.n(o),n(5)),c=(n.n(l),n(11)),i=n(3),s=n(54),u=(n.n(s),n(16)),p=n(13),m=n(18),f=n(20),d=n(14),h=n(55),w=n.n(h),y=n(56),v=n.n(y),g=n(57),b=n(4),E=Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getUser,a=n.getUserLoaded;return{user:r(),loaded:a()}})(function(e){var t=e.user;return e.loaded?t?wp.element.createElement(S,{className:"margin-bottom"}):wp.element.createElement("div",{className:"flex-grid"},wp.element.createElement("div",{class:"col margin-bottom"},wp.element.createElement(r.Panel,{header:"News Optimized for Voice Devices"},wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,wp.element.createElement("strong",null,"Let your web news articles reach a wider voice audience.")),wp.element.createElement("p",null,"If your articles appear in Google News you should always add ",wp.element.createElement("code",null,"speakable")," content. The ",wp.element.createElement("code",null,"speakable"),"parts are eligible to be dictated by Google Home devices as a response to user questions."),wp.element.createElement("ol",null,wp.element.createElement("li",null,"Monitor and understand how your web content is used by voice assistants."),wp.element.createElement("li",null,"Track how your articles are picked up by Google News."),wp.element.createElement("li",null,'Create and validate "speakable" web content using custom editor blocks.')),wp.element.createElement(r.PanelRow,null,wp.element.createElement("div",{className:"works-item"},wp.element.createElement("img",{src:v.a,width:"128"}),wp.element.createElement("p",null,"Works with Google News")),wp.element.createElement("div",{className:"works-item"},wp.element.createElement("img",{src:w.a,width:"128"}),wp.element.createElement("p",null,"Works with Google Home"))),wp.element.createElement("hr",null),wp.element.createElement("p",null,"Start by signing up for a free Soundcheck account."),wp.element.createElement("p",null,wp.element.createElement(d.a,null))))),wp.element.createElement(m.a,{className:"col margin-bottom"})):wp.element.createElement(r.Spinner,null)}),S=Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getVoiceApps,a=(n.getSelectedVoiceAppId,n.getVoiceAppsLoaded),o=window.location.hostname,l=r(),c=a();return{selectedApp:l.find(function(e){return e.domain==o}),voiceApps:l,domain:o,loaded:c}})(function(e){var t=e.className,n=e.selectedApp,o=(e.icon,e.domain);return e.loaded?n?wp.element.createElement(r.Panel,{header:"Speakable News",className:t||""},wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,"If your website is a Google News Producer you can make your articles eligible to be read on Google Home devices."),wp.element.createElement("p",null,wp.element.createElement(r.ExternalLink,{href:b.b+"/app/properties/"+n.id+"/news"},"Manage Speakable News"))),n.rssUrl?wp.element.createElement(a.Fragment,null,wp.element.createElement(k,{voiceApp:n}),wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,"The table above shows articles published through your RSS feed."),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement("strong",null,"TITLE")," - The article's ",wp.element.createElement("code",null,"<title>")," tag."),wp.element.createElement("li",null,wp.element.createElement("strong",null,"PUB DATE")," - Publication date from the RSS feed."),wp.element.createElement("li",null,wp.element.createElement("strong",null,"NEWS")," - Has it been seen in Google News?"),wp.element.createElement("li",null,wp.element.createElement("strong",null,"SPEAK")," - Does it contain ",wp.element.createElement("code",null,"speakable")," content?"),wp.element.createElement("li",null,wp.element.createElement("strong",null,"META")," - Does it contain proper metadata in the ",wp.element.createElement("code",null,"<head>")," section."),wp.element.createElement("li",null,wp.element.createElement("strong",null,"STRUCT")," - Does it contain ",wp.element.createElement("code",null,"JSON+LD")," structured data.")))):null,wp.element.createElement(r.PanelBody,null,wp.element.createElement(p.a,null))):wp.element.createElement(f.a,{domain:o}):wp.element.createElement("div",null)}),k=Object(o.withSelect)(function(e,t){return{data:(0,e("soundcheck").getSpeakableNews)(t.voiceApp.id)}})(function(e){var t=e.data,n=(e.voiceApp,t?t.map(function(e){return[{component:wp.element.createElement("a",{href:e.url,dangerouslySetInnerHTML:{__html:e.speakableValidation.metadata&&e.speakableValidation.metadata.title?e.speakableValidation.metadata.title:"..."}})},{value:new Date(e.publishDate).toLocaleDateString(),align:"center"},{component:wp.element.createElement(P,{newsPresence:e.newsPresence}),align:"center"},{component:wp.element.createElement(u.a,{isValid:e.speakable,color:i.a.colors.speakable_purple,tooltip:"Valid Specification"}),align:"center"},{component:wp.element.createElement(O,{isValid:e.speakableValidation.metadata&&e.speakableValidation.metadata.description}),align:"center"},{component:wp.element.createElement(O,{isValid:e.speakableValidation&&e.speakableValidation.linkeddata&&e.speakableValidation.linkeddata.length}),align:"center"},{component:wp.element.createElement(_,{article:e}),align:"center"}]}):[]);return wp.element.createElement(r.PanelBody,{title:"News Articles",icon:"rss",initialOpen:!0},wp.element.createElement(r.PanelRow,null,n.length>0?wp.element.createElement(c.a,{data:n,headers:["Title","Pub Date","News","Speak","Meta","Struct",""]}):wp.element.createElement("p",null,"No articles with Speakable data yet. Add a Speakable block to a articles to get started.")))}),O=function(e){return e.isValid?wp.element.createElement(r.Icon,{icon:"yes-alt"}):wp.element.createElement(r.Icon,{icon:"minus"})},P=function(e){var t=e.newsPresence;return t&&t.lastCheckedOn?t.firstSeenOn?wp.element.createElement(r.Icon,{icon:"yes-alt"}):wp.element.createElement(r.Icon,{icon:"minus"}):wp.element.createElement("span",null,"pending")},_=Object(l.withState)({isOpen:!1})(function(e){var t=e.isOpen,n=e.article,r=e.setState;return wp.element.createElement(a.Fragment,null,wp.element.createElement("span",{className:"pointer dashicons dashicons-search",onClick:function(){return r({isOpen:!0})}}),t?wp.element.createElement(g.a,{article:n,onRequestClose:function(){r({isOpen:!1})}}):null)});t.a=E},function(e,t){},function(e,t){e.exports="/wp-content/plugins/soundcheck/b15b60d63f97df22a601e3183e6e31bd.png"},function(e,t){e.exports="/wp-content/plugins/soundcheck/c48e103fd8f785a2a496f5f9efc37b71.png"},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),function(e){var t=e.article,n=e.onRequestClose;return wp.element.createElement(r.Modal,{title:"Article Detail",onRequestClose:n},t.speakableValidation&&t.speakableValidation.metadata&&t.speakableValidation.metadata.title?wp.element.createElement("h2",null,t.speakableValidation.metadata.title):wp.element.createElement("h2",null,"Title Not Found"),t.speakableValidation&&t.speakableValidation.metadata&&t.speakableValidation.metadata.image?wp.element.createElement("img",{src:t.speakableValidation.metadata.image,alt:t.speakableValidation.metadata.title,width:"100%"}):null,t.speakableValidation&&t.speakableValidation.metadata&&t.speakableValidation.metadata.description?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Description:")," ",t.speakableValidation.metadata.description):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Description:")," metadata missing."),t.speakableValidation&&t.speakableValidation.linkeddata&&t.speakableValidation.linkeddata.length?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Structured Data:")," Found JSON+LD structured data."):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Structured Data:")," JSON+LD structured data missing."),t.speakableValidation&&t.speakable?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Speakable:")," ",t.speakableValidation.speakable):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Speakable:")," No speakable content found."),t.newsPresence&&t.newsPresence.firstSeenOn?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Google News:")," ",new Date(t.newsPresence.firstSeenOn).toLocaleDateString()):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Google News:")," Not seen in Google News."))});t.a=a},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"a",function(){return i});var 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},o={speakables:{posts:[],pages:[]},voiceApps:{selectedAppId:null,apps:[],stats:{},news:{},sources:{},loaded:!1},soundcheckAuth:{user:null,loaded:!1,token:localStorage.getItem("jwt")}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.speakables,t=arguments[1];switch(t.type){case"SPEAKABLE_SET_POSTS":return a({},e,{posts:t.posts});case"SPEAKABLE_SET_PAGES":return a({},e,{pages:t.pages});default:return e}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.voiceApps,t=arguments[1];switch(t.type){case"VOICEAPPS_SET_APPS":return a({},e,{apps:t.apps,selectedAppId:t.apps.length>0?t.apps[0].id:null,loaded:!0});case"VOICEAPPS_SET_SOURCES":return a({},e,{sources:a({},e.sources,r({},t.commandId,t.sources))});case"VOICEAPPS_SET_NEWS":return a({},e,{news:a({},e.news,r({},t.appId,t.news))});case"VOICEAPPS_SET_STATS":var n=Math.round((t.end-t.start)/1e3/3600/24);return a({},e,{stats:a({},e.stats,r({},t.appId+"-"+n,t.stats))});case"VOICEAPPS_SET_SOURCE":var l=a({},e.sources);return l[t.commandId].map(function(e){return e.id==t.source.id?t.source:e}),a({},e,{sources:l});case"VOICEAPPS_SELECT_APP":return a({},e,{selectedAppId:t.id});default:return e}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.soundcheckAuth,t=arguments[1];switch(t.type){case"AUTH_SET_USER":return a({},e,{user:t.user,loaded:!0});case"AUTH_SET_TOKEN":return localStorage.setItem("jwt",t.token),a({},e,{token:t.token});default:return e}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r={setSpeakablePosts:function(e){return{type:"SPEAKABLE_SET_POSTS",posts:e}},setSpeakablePages:function(e){return{type:"SPEAKABLE_SET_PAGES",pages:e}},setVoiceApps:function(e){return{type:"VOICEAPPS_SET_APPS",apps:e}},setVoiceAppStats:function(e,t,n,r){return{type:"VOICEAPPS_SET_STATS",appId:e,stats:t,start:n,end:r}},setSelectedVoiceAppId:function(e){return{type:"VOICEAPPS_SELECT_APP",id:e}},setCommandSources:function(e,t){return{type:"VOICEAPPS_SET_SOURCES",commandId:e,sources:t}},setCommandSource:function(e,t){return{type:"VOICEAPPS_SET_SOURCE",commandId:e,source:t}},setSpeakableNews:function(e,t){return{type:"VOICEAPPS_SET_NEWS",appId:e,news:t}},setUser:function(e){return{type:"AUTH_SET_USER",user:e}},fetchFromWPAPI:function(e){return{type:"FETCH_FROM_WPAPI",path:e}},fetchFromSoundcheckAPI:function(e){return{type:"FETCH_FROM_SOUNDCHECKAPI",path:e}},updateToSoundcheckAPI:function(e,t){return{type:"UPDATE_TO_SOUNDCHECKAPI",path:e,body:t}},fetchVoiceAppDetailsFromSoundcheckAPI:function(e){return{type:"FETCH_VOICE_APP_DETAILS_FROM_SOUNDCHECKAPI",voiceApp:e}}}}]);
     1!function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.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=22)}([function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.components},function(e,t,n){"use strict";var r={};r.logo=function(e){return wp.element.createElement("svg",{width:e+"px",height:e+"px",viewBox:"0 0 53 53",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,"Soundcheck"),wp.element.createElement("g",{id:"Soundcheck",fill:"#3BAB48"},wp.element.createElement("path",{d:"M37.1598063,1 L16.666899,1 L16.666899,1.02119114 C16.3943259,1.01009102 16.1227512,1 15.8511765,1 C7.09988132,1 0,8.16967043 0,17.0154594 L0,51 L37.1598063,51 C45.9111015,51 53,43.8353751 53,34.9905952 L53,17.0154594 C53,8.16967043 45.9111015,1 37.1598063,1 L37.1598063,1 Z M11.626792,32.1479546 C11.626792,33.1671477 10.8060773,33.9966296 9.79665806,33.9966296 C8.78324511,33.9966296 7.96752256,33.1671477 7.96752256,32.1479546 L7.96752256,23.7673616 C7.96752256,22.743123 8.78324511,21.9186866 9.79665806,21.9186866 C10.8060773,21.9186866 11.626792,22.743123 11.626792,23.7673616 L11.626792,32.1479546 Z M19.0351902,39.8352944 C19.0351902,40.8554966 18.213477,41.6849785 17.2050562,41.6849785 C16.195637,41.6849785 15.3749223,40.8554966 15.3749223,39.8352944 L15.3749223,16.0800218 C15.3749223,15.0547741 16.195637,14.2303376 17.2050562,14.2303376 C18.213477,14.2303376 19.0351902,15.0547741 19.0351902,16.0800218 L19.0351902,39.8352944 Z M27.6606823,33.9179196 C27.6606823,34.9431674 26.8399676,35.7665947 25.8315468,35.7665947 C24.8221276,35.7665947 24.0014129,34.9431674 24.0014129,33.9179196 L24.0014129,21.992351 C24.0014129,20.9721488 24.8221276,20.1426669 25.8315468,20.1426669 C26.8399676,20.1426669 27.6606823,20.9721488 27.6606823,21.992351 L27.6606823,33.9179196 Z M36.2871729,36.0895074 C36.2871729,37.1087005 35.4664582,37.9381824 34.457039,37.9381824 C33.4476198,37.9381824 32.626905,37.1087005 32.626905,36.0895074 L32.626905,19.8207633 C32.626905,18.8005611 33.4476198,17.9710791 34.457039,17.9710791 C35.4664582,17.9710791 36.2871729,18.8005611 36.2871729,19.8207633 L36.2871729,36.0895074 Z M44.8707307,32.1479546 C44.8707307,33.1671477 44.050016,33.9966296 43.0415952,33.9966296 C42.0271838,33.9966296 41.2114613,33.1671477 41.2114613,32.1479546 L41.2114613,23.7673616 C41.2114613,22.743123 42.0271838,21.9186866 43.0415952,21.9186866 C44.050016,21.9186866 44.8707307,22.743123 44.8707307,23.7673616 L44.8707307,32.1479546 Z",id:"logo"})))},r.speakable=function(e,t){return wp.element.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 78 78",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,e),wp.element.createElement("g",{id:"Speakable",fill:t,transform:"translate(2.000000, 0.000000)"},wp.element.createElement("path",{d:"M26.4788729,69.9405038 L9.41272422,77.3999991 L12.6487443,62.8196156 C4.92071963,56.3078621 0,46.4867881 0,35.5 C0,15.8938914 15.6700338,2.13162821e-14 35,2.13162821e-14 C54.3299662,2.13162821e-14 70,15.8938914 70,35.5 C70,55.1061086 54.3299662,71 35,71 C32.0609411,71 29.2064934,70.6325615 26.4788729,69.9405038 Z M28.2601921,52.8310547 C32.6326098,44.9247652 37.1284958,38.0443001 41.7479851,32.1894531 C46.3674743,26.3346061 50.6312663,22.1269659 54.539489,19.5664062 C52.8623973,19.012367 51.3051212,18.7353516 49.867614,18.7353516 C47.5765869,18.7353516 45.7385519,19.1471313 44.3534538,19.9707031 C42.9683557,20.794275 41.3025195,22.4713415 39.3558952,25.0019531 C37.1846604,27.8170714 34.1524642,32.9156532 30.2592155,40.2978516 C29.7201503,37.76724 29.0687897,35.9891002 28.305114,34.9633789 C27.5414383,33.9376576 26.4932717,33.4248047 25.1605827,33.4248047 C23.1540623,33.4248047 20.8705565,34.5029189 18.3099968,36.6591797 C20.4962056,37.9619206 22.3903924,40.200505 23.992614,43.375 L24.8236687,45.0595703 C25.1231493,45.6735057 25.4825207,46.4671175 25.9017937,47.4404297 L27.2719108,50.6074219 C27.3917031,50.9069025 27.7211269,51.6481061 28.2601921,52.8310547 Z",id:"icon"})))},r.colors={speakable_purple:"#6A64B6",peck_green:"#3BAB48"},t.a=r},function(e,t){e.exports=wp.data},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a});var r="https://api.peck.me",a="https://soundcheck.ai"},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function i(){h&&m&&(h=!1,m.length?d=m.concat(d):w=-1,d.length&&l())}function l(){if(!h){var e=a(i);h=!0;for(var t=d.length;t;){for(m=d,d=[];++w<t;)m&&m[w].run();w=-1,t=d.length}m=null,h=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function s(){}var u,p,f=e.exports={};!function(){try{u="function"===typeof setTimeout?setTimeout:n}catch(e){u=n}try{p="function"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var m,d=[],h=!1,w=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new c(e,t)),1!==d.length||h||a(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=s,f.addListener=s,f.once=s,f.off=s,f.removeListener=s,f.removeAllListeners=s,f.emit=s,f.prependListener=s,f.prependOnceListener=s,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){e.exports=n(8)},function(e,t){e.exports=wp.compose},function(e,t,n){var r=function(){return this}()||Function("return this")(),a=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=a&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(9),a)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof a?t:a,i=Object.create(o.prototype),l=new m(r||[]);return i._invoke=s(e,n,l),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function a(){}function o(){}function i(){}function l(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,a,o,i){var l=r(e[n],e,a);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"===typeof s&&v.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,o,i)},function(e){t("throw",e,o,i)}):Promise.resolve(s).then(function(e){c.value=e,o(c)},i)}i(l.arg)}function n(e,n){function r(){return new Promise(function(r,a){t(e,n,r,a)})}return a=a?a.then(r,r):r()}var a;this._invoke=n}function s(e,t,n){var a=P;return function(o,i){if(a===C)throw new Error("Generator is already running");if(a===x){if("throw"===o)throw i;return h()}for(n.method=o,n.arg=i;;){var l=n.delegate;if(l){var c=u(l,n);if(c){if(c===T)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===P)throw a=x,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=C;var s=r(e,t,n);if("normal"===s.type){if(a=n.done?x:_,s.arg===T)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=x,n.method="throw",n.arg=s.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===w){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=w,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var a=r(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,T;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=w),t.delegate=null,T):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function m(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[g];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=w,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:w,done:!0}}var w,y=Object.prototype,v=y.hasOwnProperty,b="function"===typeof Symbol?Symbol:{},g=b.iterator||"@@iterator",E=b.asyncIterator||"@@asyncIterator",k=b.toStringTag||"@@toStringTag",S="object"===typeof e,O=t.regeneratorRuntime;if(O)return void(S&&(e.exports=O));O=t.regeneratorRuntime=S?e.exports:{},O.wrap=n;var P="suspendedStart",_="suspendedYield",C="executing",x="completed",T={},A={};A[g]=function(){return this};var N=Object.getPrototypeOf,j=N&&N(N(d([])));j&&j!==y&&v.call(j,g)&&(A=j);var L=i.prototype=a.prototype=Object.create(A);o.prototype=L.constructor=i,i.constructor=o,i[k]=o.displayName="GeneratorFunction",O.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},O.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(L),e},O.awrap=function(e){return{__await:e}},l(c.prototype),c.prototype[E]=function(){return this},O.AsyncIterator=c,O.async=function(e,t,r,a){var o=new c(n(e,t,r,a));return O.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},l(L),L[k]="Generator",L[g]=function(){return this},L.toString=function(){return"[object Generator]"},O.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},O.values=d,m.prototype={constructor:m,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=w,this.done=!1,this.delegate=null,this.method="next",this.arg=w,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=w)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=w),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return t("end");if(a.tryLoc<=this.prev){var i=v.call(a,"catchLoc"),l=v.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return t(a.catchLoc,!0);if(this.prev<a.finallyLoc)return t(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return t(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return t(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,T):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;f(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=w),T}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(4),a=function(e){var t=e.path,n=e.method,a=e.body,o=localStorage.getItem("jwt"),i=n||"GET",l={method:i,mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"}};o&&(l.headers.Authorization="Bearer "+o);var c=""+r.a+t,s=l;switch(n){case"PUT":case"POST":s.body=JSON.stringify(a);default:return fetch(c,s).then(function(e){if(200==e.status)return e.json();throw new Error(e.statusText)})}};t.a=a},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 a(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 o(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 i=n(0),l=(n.n(i),n(29)),c=n.n(l),s=n(36),u=(n.n(s),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=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.headers,n=e.data;return wp.element.createElement("div",{className:"soundcheck-table"},wp.element.createElement("div",{className:"soundcheck-table_header"},t.map(function(e,t){return wp.element.createElement(m,{key:t,title:e})})),wp.element.createElement("div",{className:"soundcheck-table_content"},n.map(function(e,t){return wp.element.createElement(f,{key:t,row:e})})))}}]),t}(i.Component);p.propTypes={headers:c.a.arrayOf(c.a.string),data:c.a.array.isRequired};var f=function(e){var t=e.row;return wp.element.createElement("div",{className:"soundcheck-table_row"},t.map(function(e,t){return e.component?wp.element.createElement("div",{key:t,className:"soundcheck-table_data "+("center"==e.align?" soundcheck-table_data_center":"")},e.component):wp.element.createElement("div",{key:t,className:"soundcheck-table_data "+("center"==e.align?" soundcheck-table_data_center":""),dangerouslySetInnerHTML:{__html:e.value}})}))},m=function(e){var t=e.title;return wp.element.createElement("div",{className:"soundcheck-table_header-item"},t)};t.a=p},function(e,t,n){"use strict";(function(t){"production"===t.env.NODE_ENV?e.exports=n(30):e.exports=n(31)}).call(t,n(5))},function(e,t,n){"use strict";var r=n(2),a=n(1),o=(n.n(a),function(e){var t=e.isLoading,n=e.isValid,o=e.tooltip,i=e.color;return t?wp.element.createElement(a.Spinner,null):n?r.a.speakable(o,i):wp.element.createElement("span",{className:"dashicons dashicons-minus"})});t.a=o},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),n(3)),o=(n.n(a),n(42)),i=(n.n(o),Object(a.withDispatch)(function(e,t){var n=e("soundcheck"),r=n.setUser;return{signOut:function(){r(null),localStorage.removeItem("jwt")}}})(function(e){var t=e.signOut;return wp.element.createElement(r.PanelRow,null,wp.element.createElement("div",{className:"soundcheck-dashboard-footer"},wp.element.createElement("div",{className:"soundcheck-dashboard-footer__item"},wp.element.createElement(r.Button,{isLink:!0,onClick:t},"Sign Out")),wp.element.createElement("div",{className:"soundcheck-dashboard-footer__item"},wp.element.createElement(r.ExternalLink,{href:"https://soundcheck.ai"},"soundcheck.ai")),wp.element.createElement("div",{className:"soundcheck-dashboard-footer__item"},wp.element.createElement(r.ExternalLink,{href:"mailto:help@soundcheck.ai"},"Help"))))}));t.a=i},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),n(4)),o=function(){var e=window.location.hostname,t=window.location.protocol+"//"+e,n=localStorage.getItem("jwt"),o=function(){var e=a.b+"/app/start/wordpress?url="+encodeURIComponent(t)+"&token="+n;window.location.href=e};return wp.element.createElement(r.Button,{isPrimary:!0,onClick:o},"Sign Up With ",e)};t.a=o},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),a=n.n(r),o=n(0),i=(n.n(o),n(23)),l=n.n(i),c=n(11),s=n(3),u=(n.n(s),n(24)),p=n(50),f=n(51);Object(s.registerStore)("soundcheck",{reducer:Object(s.combineReducers)({speakables:p.b,voiceApps:p.c,soundcheckAuth:p.a}),actions:f.a,selectors:{getSpeakablePosts:function(e){return e.speakables.posts},getSpeakablePages:function(e){return e.speakables.pages},getVoiceApps:function(e){return e.voiceApps.apps},getVoiceAppsLoaded:function(e){return e.voiceApps.loaded},getCommandSources:function(e,t,n){return e.voiceApps.sources[n]},getSelectedVoiceAppId:function(e){return e.voiceApps.selectedAppId},getVoiceAppStats:function(e,t,n,r){var a=e.voiceApps,o=Math.round((r-n)/1e3/3600/24);return a.stats[t+"-"+o]},getSpeakableNews:function(e,t){return e.voiceApps.news[t]},getUser:function(e){return e.soundcheckAuth.user},getUserLoaded:function(e){return e.soundcheckAuth.loaded}},controls:{FETCH_FROM_WPAPI:function(e){return l()({path:e.path})},FETCH_FROM_SOUNDCHECKAPI:function(e){return Object(c.a)({path:e.path})}},resolvers:{getSpeakablePosts:a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/wp/v2/posts?page="+t,e.next=3,f.a.fetchFromWPAPI(n);case 3:return r=e.sent,e.abrupt("return",f.a.setSpeakablePosts(r));case 5:case"end":return e.stop()}},e,this)}),getSpeakablePages:a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/wp/v2/pages?page="+t,e.next=3,f.a.fetchFromWPAPI(n);case 3:return r=e.sent,e.abrupt("return",f.a.setSpeakablePages(r));case 5:case"end":return e.stop()}},e,this)}),getVoiceApps:a.a.mark(function e(){var t,n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="/v4/user/voice_apps",e.next=3,f.a.fetchFromSoundcheckAPI(t);case 3:return n=e.sent,e.abrupt("return",f.a.setVoiceApps(n));case 5:case"end":return e.stop()}},e,this)}),getSpeakableNews:a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/v4/user/voice_apps/"+t+"/news",e.next=3,f.a.fetchFromSoundcheckAPI(n);case 3:return r=e.sent,r.content&&(r=r.content),e.abrupt("return",f.a.setSpeakableNews(t,r));case 6:case"end":return e.stop()}},e,this)}),getUser:a.a.mark(function e(){var t,n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="/v4/user",e.prev=1,e.next=4,f.a.fetchFromSoundcheckAPI(t);case 4:return n=e.sent,e.abrupt("return",f.a.setUser(n));case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",f.a.setUser(null));case 11:case"end":return e.stop()}},e,this,[[1,8]])})}}),Object(o.render)(wp.element.createElement(u.a,null),document.getElementById("soundcheck-root"))},function(e,t){e.exports=wp.apiFetch},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 a(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 o(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 i=n(0),l=(n.n(i),n(25)),c=(n.n(l),n(26)),s=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=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"render",value:function(){return wp.element.createElement("div",{className:"soundcheck-layout"},wp.element.createElement(c.a,null))}}]),t}(i.Component);t.a=u},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(0),a=(n.n(r),n(7)),o=(n.n(a),n(27)),i=n(40),l=window.location.search,c=/[?&]page=([^&]*)/.exec(l),s=decodeURIComponent(c[1]),u=Object(a.withState)({route:s})(function(e){switch(e.route){case"soundcheck-speakable-news":return wp.element.createElement(i.a,null);default:return wp.element.createElement(o.a,null)}})},function(e,t,n){"use strict";var r=n(28),a=function(){return wp.element.createElement(r.a,{className:"margin-bottom"})};t.a=a},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(a,o){try{var i=t[a](o),l=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(l).then(function(e){r("next",e)},function(e){r("throw",e)});e(l)}return r("next")})}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=n(6),i=n.n(o),l=n(0),c=(n.n(l),n(1)),s=(n.n(c),n(3)),u=(n.n(s),n(7)),p=(n.n(u),n(12)),f=n(2),m=n(37),d=n(4),h=n(14),w=n(39),y=(n.n(w),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}),v=function(){var e=r(i.a.mark(function e(t){var n,r,a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t.link);case 2:return n=e.sent,e.next=5,n.text();case 5:return r=e.sent,a=Object(m.a)(r),e.abrupt("return",a);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),b=function(e){var t=e.className;return wp.element.createElement(c.Panel,{header:"Voice-Optimized Web Content",className:t||""},wp.element.createElement(c.PanelBody,null,wp.element.createElement("p",null,wp.element.createElement(c.ExternalLink,{href:d.b+"/speakable-content"},"Speakable content")," is text on your website that you designate as optimized for voice assistants. That means it is particularly suited to be read out loud using text to speech.")),wp.element.createElement(E,null),wp.element.createElement(k,null),wp.element.createElement(c.PanelBody,null,wp.element.createElement("p",null,"The tables above show posts that contain speakable content."),wp.element.createElement("ul",null,wp.element.createElement("li",null,"FORMATTED - the post has a valid ",wp.element.createElement("code",null,"SpeakableSpecification"),"."),wp.element.createElement("li",null,'SPEAKABLE - the post contains "speakable" content.')),wp.element.createElement("p",null,'To add speakable content to any post use the "Speakable Section" block in the editor. Click on a SPEAKABLE column check mark to preview the content.')))},g=Object(u.withState)({data:[],initialized:!1,loading:!1})(function(e){var t=e.json,n=e.data,r=e.setState,o=e.type,i=e.icon,l=e.loading;if(e.initialized){if(!l){r({loading:!0});var s=!0,u=!1,m=void 0;try{for(var d,w=n[Symbol.iterator]();!(s=(d=w.next()).done);s=!0){var b=d.value;!function(e){v(e).then(function(t){var o=t.specification,i=t.content,l=t.speakables,c=t.validations,s=[].concat(a(n)),u=s.find(function(t){return t.id===e.id});u.loaded=!0,u.hasSpeakableSpecification=!!o,u.isSpeakable=l&&l.length,u.content=i,u.validations=c,r({data:s})})}(b)}}catch(e){u=!0,m=e}finally{try{!s&&w.return&&w.return()}finally{if(u)throw m}}}}else if(t.length){var g=t.map(function(e){return y({},e,{loaded:!1,hasSpeakableSpecification:!1,isSpeakable:!1,content:null,validations:[],speakables:null})});r({data:g,initialized:!0})}var E=n.map(function(e){return[{component:wp.element.createElement("a",{href:e.link,dangerouslySetInnerHTML:{__html:e.title.rendered}})},{value:new Date(e.date).toLocaleDateString(),align:"center"},{component:wp.element.createElement(h.a,{isLoading:!e.loaded,isValid:e.hasSpeakableSpecification,color:f.a.colors.speakable_purple,tooltip:"Valid Specification"}),align:"center"},{component:wp.element.createElement(S,{isLoading:!e.loaded,validations:e.validations,content:e.content}),align:"center"}]});return wp.element.createElement(c.PanelBody,{title:o+"s",icon:i,initialOpen:!0},wp.element.createElement(c.PanelRow,null,E.length>0?wp.element.createElement(p.a,{data:E,headers:["Title","Date","Formatted","Speakable"]}):wp.element.createElement("p",null,"No ",o,"s with Speakable data yet. Add a Speakable block to a ",o," to get started.")))}),E=Object(s.withSelect)(function(e,t){return{json:(0,e("soundcheck").getSpeakablePosts)(1),type:"Post",icon:"admin-post"}})(g),k=Object(s.withSelect)(function(e,t){return{json:(0,e("soundcheck").getSpeakablePages)(1),type:"Page",icon:"admin-page"}})(g),S=Object(u.withState)({isOpen:!1})(function(e){var t=e.isLoading,n=e.isOpen,r=e.validations,a=e.content,o=e.setState;return t?wp.element.createElement(c.Spinner,null):a?r.length?wp.element.createElement(l.Fragment,null,wp.element.createElement("span",{className:"pointer dashicons dashicons-warning",onClick:function(){return o({isOpen:!0})}}),n?wp.element.createElement(O,{validations:r,content:a,onRequestClose:function(){o({isOpen:!1})}}):null):wp.element.createElement(l.Fragment,null,wp.element.createElement("span",{className:"pointer",onClick:function(){return o({isOpen:!0})}},f.a.speakable("Speakable Content Found",f.a.colors.speakable_purple)),n?wp.element.createElement(O,{validations:r,content:a,onRequestClose:function(){o({isOpen:!1})}}):null):wp.element.createElement("span",{className:"dashicons dashicons-minus"})}),O=function(e){var t=e.validations,n=e.content,r=e.onRequestClose;return wp.element.createElement(c.Modal,{title:"Speakable Content",onRequestClose:r},t.length?wp.element.createElement("ul",null,t.map(function(e,t){return wp.element.createElement("li",{key:t},"error"==e.type?wp.element.createElement("span",{className:"dashicons dashicons-warning"}):wp.element.createElement("span",{className:"dashicons dashicons-info"})," ",e.message)})):wp.element.createElement("p",null,wp.element.createElement("span",{className:"dashicons dashicons-yes"})," Valid Speakable content."),wp.element.createElement("hr",null),wp.element.createElement("p",null,"Preview"),wp.element.createElement("blockquote",null,n))};t.a=b},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r=n(13);e.exports=n(32)(r.isElement,!0)}else e.exports=n(35)()}).call(t,n(5))},function(e,t,n){"use strict";function r(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case m:case d:case c:case u:case s:case w:return e;default:switch(e=e&&e.$$typeof){case f:case h:case p:return e;default:return t}}case v:case y:case l:return t}}}function a(e){return r(e)===d}Object.defineProperty(t,"__esModule",{value:!0});var o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,l=o?Symbol.for("react.portal"):60106,c=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,p=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,m=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,w=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116;t.typeOf=r,t.AsyncMode=m,t.ConcurrentMode=d,t.ContextConsumer=f,t.ContextProvider=p,t.Element=i,t.ForwardRef=h,t.Fragment=c,t.Lazy=v,t.Memo=y,t.Portal=l,t.Profiler=u,t.StrictMode=s,t.Suspense=w,t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===c||e===d||e===u||e===s||e===w||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===p||e.$$typeof===f||e.$$typeof===h)},t.isAsyncMode=function(e){return a(e)||r(e)===m},t.isConcurrentMode=a,t.isContextConsumer=function(e){return r(e)===f},t.isContextProvider=function(e){return r(e)===p},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return r(e)===h},t.isFragment=function(e){return r(e)===c},t.isLazy=function(e){return r(e)===v},t.isMemo=function(e){return r(e)===y},t.isPortal=function(e){return r(e)===l},t.isProfiler=function(e){return r(e)===u},t.isStrictMode=function(e){return r(e)===s},t.isSuspense=function(e){return r(e)===w}},function(e,t,n){"use strict";(function(e){"production"!==e.env.NODE_ENV&&function(){function e(e){return"string"===typeof e||"function"===typeof e||e===b||e===P||e===E||e===g||e===C||"object"===typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===x||e.$$typeof===k||e.$$typeof===S||e.$$typeof===_)}function n(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case y:var n=e.type;switch(n){case O:case P:case b:case E:case g:case C:return n;default:var r=n&&n.$$typeof;switch(r){case S:case _:case k:return r;default:return t}}case T:case x:case v:return t}}}function r(e){return q||(q=!0,j(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),a(e)||n(e)===O}function a(e){return n(e)===P}function o(e){return n(e)===S}function i(e){return n(e)===k}function l(e){return"object"===typeof e&&null!==e&&e.$$typeof===y}function c(e){return n(e)===_}function s(e){return n(e)===b}function u(e){return n(e)===T}function p(e){return n(e)===x}function f(e){return n(e)===v}function m(e){return n(e)===E}function d(e){return n(e)===g}function h(e){return n(e)===C}Object.defineProperty(t,"__esModule",{value:!0});var w="function"===typeof Symbol&&Symbol.for,y=w?Symbol.for("react.element"):60103,v=w?Symbol.for("react.portal"):60106,b=w?Symbol.for("react.fragment"):60107,g=w?Symbol.for("react.strict_mode"):60108,E=w?Symbol.for("react.profiler"):60114,k=w?Symbol.for("react.provider"):60109,S=w?Symbol.for("react.context"):60110,O=w?Symbol.for("react.async_mode"):60111,P=w?Symbol.for("react.concurrent_mode"):60111,_=w?Symbol.for("react.forward_ref"):60112,C=w?Symbol.for("react.suspense"):60113,x=w?Symbol.for("react.memo"):60115,T=w?Symbol.for("react.lazy"):60116,A=function(){},N=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=0,o="Warning: "+e.replace(/%s/g,function(){return n[a++]});"undefined"!==typeof console&&console.warn(o);try{throw new Error(o)}catch(e){}};A=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];N.apply(void 0,[t].concat(r))}};var j=A,L=O,I=P,V=S,R=k,F=y,D=_,M=b,B=T,$=x,U=v,G=E,H=g,W=C,q=!1;t.typeOf=n,t.AsyncMode=L,t.ConcurrentMode=I,t.ContextConsumer=V,t.ContextProvider=R,t.Element=F,t.ForwardRef=D,t.Fragment=M,t.Lazy=B,t.Memo=$,t.Portal=U,t.Profiler=G,t.StrictMode=H,t.Suspense=W,t.isValidElementType=e,t.isAsyncMode=r,t.isConcurrentMode=a,t.isContextConsumer=o,t.isContextProvider=i,t.isElement=l,t.isForwardRef=c,t.isFragment=s,t.isLazy=u,t.isMemo=p,t.isPortal=f,t.isProfiler=m,t.isStrictMode=d,t.isSuspense=h}()}).call(t,n(5))},function(e,t,n){"use strict";(function(t){function r(){return null}var a=n(13),o=n(33),i=n(10),l=n(34),c=Function.call.bind(Object.prototype.hasOwnProperty),s=function(){};"production"!==t.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,n){function u(e){var t=e&&(x&&e[x]||e[T]);if("function"===typeof t)return t}function p(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function m(e){function r(r,l,c,u,p,m,d){if(u=u||A,m=m||c,d!==i){if(n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("production"!==t.env.NODE_ENV&&"undefined"!==typeof console){var w=u+":"+c;!a[w]&&o<3&&(s("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),a[w]=!0,o++)}}return null==l[c]?r?new f(null===l[c]?"The "+p+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`.":"The "+p+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(l,c,u,p,m)}if("production"!==t.env.NODE_ENV)var a={},o=0;var l=r.bind(null,!1);return l.isRequired=r.bind(null,!0),l}function d(e){function t(t,n,r,a,o,i){var l=t[n];if(O(l)!==e)return new f("Invalid "+a+" `"+o+"` of type `"+P(l)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return m(t)}function h(e){function t(t,n,r,a,o){if("function"!==typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l)){return new f("Invalid "+a+" `"+o+"` of type `"+O(l)+"` supplied to `"+r+"`, expected an array.")}for(var c=0;c<l.length;c++){var s=e(l,c,r,a,o+"["+c+"]",i);if(s instanceof Error)return s}return null}return m(t)}function w(e){function t(t,n,r,a,o){if(!(t[n]instanceof e)){var i=e.name||A;return new f("Invalid "+a+" `"+o+"` of type `"+C(t[n])+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}return null}return m(t)}function y(e){function n(t,n,r,a,o){for(var i=t[n],l=0;l<e.length;l++)if(p(i,e[l]))return null;var c=JSON.stringify(e,function(e,t){return"symbol"===P(t)?String(t):t});return new f("Invalid "+a+" `"+o+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")}return Array.isArray(e)?m(n):("production"!==t.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)}function v(e){function t(t,n,r,a,o){if("function"!==typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],s=O(l);if("object"!==s)return new f("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var u in l)if(c(l,u)){var p=e(l,u,r,a,o+"."+u,i);if(p instanceof Error)return p}return null}return m(t)}function b(e){function n(t,n,r,a,o){for(var l=0;l<e.length;l++){if(null==(0,e[l])(t,n,r,a,o,i))return null}return new f("Invalid "+a+" `"+o+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var a=0;a<e.length;a++){var o=e[a];if("function"!==typeof o)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_(o)+" at index "+a+"."),r}return m(n)}function g(e){function t(t,n,r,a,o){var l=t[n],c=O(l);if("object"!==c)return new f("Invalid "+a+" `"+o+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var u=e[s];if(u){var p=u(l,s,r,a,o+"."+s,i);if(p)return p}}return null}return m(t)}function E(e){function t(t,n,r,a,l){var c=t[n],s=O(c);if("object"!==s)return new f("Invalid "+a+" `"+l+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");var u=o({},t[n],e);for(var p in u){var m=e[p];if(!m)return new f("Invalid "+a+" `"+l+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null,"  ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null,"  "));var d=m(c,p,r,a,l+"."+p,i);if(d)return d}return null}return m(t)}function k(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(k);if(null===t||e(t))return!0;var n=u(t);if(!n)return!1;var r,a=n.call(t);if(n!==t.entries){for(;!(r=a.next()).done;)if(!k(r.value))return!1}else for(;!(r=a.next()).done;){var o=r.value;if(o&&!k(o[1]))return!1}return!0;default:return!1}}function S(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function O(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":S(t,e)?"symbol":t}function P(e){if("undefined"===typeof e||null===e)return""+e;var t=O(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){var t=P(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function C(e){return e.constructor&&e.constructor.name?e.constructor.name:A}var x="function"===typeof Symbol&&Symbol.iterator,T="@@iterator",A="<<anonymous>>",N={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:function(){return m(r)}(),arrayOf:h,element:function(){function t(t,n,r,a,o){var i=t[n];if(!e(i)){return new f("Invalid "+a+" `"+o+"` of type `"+O(i)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return m(t)}(),elementType:function(){function e(e,t,n,r,o){var i=e[t];if(!a.isValidElementType(i)){return new f("Invalid "+r+" `"+o+"` of type `"+O(i)+"` supplied to `"+n+"`, expected a single ReactElement type.")}return null}return m(e)}(),instanceOf:w,node:function(){function e(e,t,n,r,a){return k(e[t])?null:new f("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}return m(e)}(),objectOf:v,oneOf:y,oneOfType:b,shape:g,exact:E};return f.prototype=Error.prototype,N.checkPropTypes=l,N.resetWarningCache=l.resetWarningCache,N.PropTypes=N,N}}).call(t,n(5))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,c=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var u in n)o.call(n,u)&&(c[u]=n[u]);if(a){l=a(n);for(var p=0;p<l.length;p++)i.call(n,l[p])&&(c[l[p]]=n[l[p]])}}return c}},function(e,t,n){"use strict";(function(t){function r(e,n,r,c,s){if("production"!==t.env.NODE_ENV)for(var u in e)if(l(e,u)){var p;try{if("function"!==typeof e[u]){var f=Error((c||"React class")+": "+r+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.");throw f.name="Invariant Violation",f}p=e[u](n,u,c,r,null,o)}catch(e){p=e}if(!p||p instanceof Error||a((c||"React class")+": type specification of "+r+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var m=s?s():"";a("Failed "+r+" type: "+p.message+(null!=m?m:""))}}}var a=function(){};if("production"!==t.env.NODE_ENV){var o=n(10),i={},l=Function.call.bind(Object.prototype.hasOwnProperty);a=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}r.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(i={})},e.exports=r}).call(t,n(5))},function(e,t,n){"use strict";function r(){}function a(){}var o=n(10);a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(38),a=n.n(r),o=function(e){var t=[];return a()(e).find("script[type='application/ld+json']").each(function(e,n){try{t[e]=JSON.parse(a()(this).html())}catch(e){throw new Error("There was an error parsing the JSON in the 'application/ld+json' script tag. "+e)}}),0==t.length?null:l(t)},i=function(e){var t=a()("<output>").append(a.a.parseHTML(e)),n=[],r=o(t);if(!r)return{specification:r,speakables:null,content:null,validations:[]};if(0==r.cssSelector.length)throw new Error("No valid selectors found in SpeakableSpecification.");var i=!0,l=!1,c=void 0;try{for(var u,f=r.cssSelector[Symbol.iterator]();!(i=(u=f.next()).done);i=!0){var m=u.value;a()(t).find(m).each(function(e,t){n.push(a()(this).text().trim())})}}catch(e){l=!0,c=e}finally{try{!i&&f.return&&f.return()}finally{if(l)throw c}}var d=s(n),h=p(d);return{specification:r,speakables:n,content:d,validations:h}},l=function(e){var t=!0,n=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;if(i instanceof Array){var l=!0,s=!1,u=void 0;try{for(var p,f=i[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var m=p.value,d=c(m);if(d)return d}}catch(e){s=!0,u=e}finally{try{!l&&f.return&&f.return()}finally{if(s)throw u}}}else{var h=c(i);if(h)return h}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null},c=function(e){return e.speakable&&e.speakable["@type"]&&"SpeakableSpecification"==e.speakable["@type"]?e.speakable:null},s=function(e){return e?e.map(function(e){return u(e)}).join(" "):null},u=function(e){return e?(e=e.trim(),e.match(/^[\w\W\s]+[?.!]$/g)?e:e+"."):"."},p=function(e){var t=[];if(!e)return t.push({type:"error",message:"No speakable content found."}),t;var n=e.match(/\S+/g).length;return n<7?t.push({type:"error",message:"The speakable content is too short. Aim for 20-30 seconds of spoken content (2-3 sentences)."}):n<20&&t.push({type:"warning",message:"The speakable may be too short. Aim for 20-30 seconds of spoken content."}),n>100?t.push({type:"error",message:"The speakable content is too long. Aim for 20-30 seconds of spoken content (2-3 sentences)."}):n>80&&t.push({type:"warning",message:"The speakable may be too long. Aim for 20-30 seconds of spoken content."}),t}},function(e,t){e.exports=jQuery},function(e,t){},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),n(0)),o=(n.n(a),n(3)),i=(n.n(o),n(7)),l=(n.n(i),n(12)),c=n(2),s=n(41),u=(n.n(s),n(14)),p=n(15),f=n(43),m=n(46),d=n(16),h=n(47),w=n.n(h),y=n(48),v=n.n(y),b=n(49),g=n(4),E=Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getUser,a=n.getUserLoaded;return{user:r(),loaded:a()}})(function(e){var t=e.user;return e.loaded?t?wp.element.createElement(k,{className:"margin-bottom"}):wp.element.createElement("div",{className:"flex-grid"},wp.element.createElement("div",{class:"col margin-bottom"},wp.element.createElement(r.Panel,{header:"News Optimized for Voice Devices"},wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,wp.element.createElement("strong",null,"Let your web news articles reach a wider voice audience.")),wp.element.createElement("p",null,"If your articles appear in Google News you should always add ",wp.element.createElement("code",null,"speakable")," content. The ",wp.element.createElement("code",null,"speakable"),"parts are eligible to be dictated by Google Home devices as a response to user questions."),wp.element.createElement("ol",null,wp.element.createElement("li",null,"Monitor and understand how your web content is used by voice assistants."),wp.element.createElement("li",null,"Track how your articles are picked up by Google News."),wp.element.createElement("li",null,'Create and validate "speakable" web content using custom editor blocks.')),wp.element.createElement(r.PanelRow,null,wp.element.createElement("div",{className:"works-item"},wp.element.createElement("img",{src:v.a,width:"128"}),wp.element.createElement("p",null,"Works with Google News")),wp.element.createElement("div",{className:"works-item"},wp.element.createElement("img",{src:w.a,width:"128"}),wp.element.createElement("p",null,"Works with Google Home"))),wp.element.createElement("hr",null),wp.element.createElement("p",null,"Start by signing up for a free Soundcheck account."),wp.element.createElement("p",null,wp.element.createElement(d.a,null))))),wp.element.createElement(f.a,{className:"col margin-bottom"})):wp.element.createElement(r.Spinner,null)}),k=Object(o.withSelect)(function(e,t){var n=e("soundcheck"),r=n.getVoiceApps,a=(n.getSelectedVoiceAppId,n.getVoiceAppsLoaded),o=window.location.hostname,i=r(),l=a();return{selectedApp:i.find(function(e){return e.domain==o}),voiceApps:i,domain:o,loaded:l}})(function(e){var t=e.className,n=e.selectedApp,o=(e.icon,e.domain);return e.loaded?n?wp.element.createElement(r.Panel,{header:"Speakable News",className:t||""},wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,"If your website is a Google News Producer you can make your articles eligible to be read on Google Home devices."),wp.element.createElement("p",null,wp.element.createElement(r.ExternalLink,{href:g.b+"/app/properties/"+n.id+"/news"},"Manage Speakable News"))),n.rssUrl?wp.element.createElement(a.Fragment,null,wp.element.createElement(S,{voiceApp:n}),wp.element.createElement(r.PanelBody,null,wp.element.createElement("p",null,"The table above shows articles published through your RSS feed."),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement("strong",null,"TITLE")," - The article's ",wp.element.createElement("code",null,"<title>")," tag."),wp.element.createElement("li",null,wp.element.createElement("strong",null,"PUB DATE")," - Publication date from the RSS feed."),wp.element.createElement("li",null,wp.element.createElement("strong",null,"NEWS")," - Has it been seen in Google News?"),wp.element.createElement("li",null,wp.element.createElement("strong",null,"SPEAK")," - Does it contain ",wp.element.createElement("code",null,"speakable")," content?"),wp.element.createElement("li",null,wp.element.createElement("strong",null,"META")," - Does it contain proper metadata in the ",wp.element.createElement("code",null,"<head>")," section."),wp.element.createElement("li",null,wp.element.createElement("strong",null,"STRUCT")," - Does it contain ",wp.element.createElement("code",null,"JSON+LD")," structured data.")))):null,wp.element.createElement(r.PanelBody,null,wp.element.createElement(p.a,null))):wp.element.createElement(m.a,{domain:o}):wp.element.createElement("div",null)}),S=Object(o.withSelect)(function(e,t){return{data:(0,e("soundcheck").getSpeakableNews)(t.voiceApp.id)}})(function(e){var t=e.data,n=(e.voiceApp,t?t.map(function(e){return[{component:wp.element.createElement("a",{href:e.url,dangerouslySetInnerHTML:{__html:e.speakableValidation.metadata&&e.speakableValidation.metadata.title?e.speakableValidation.metadata.title:"..."}})},{value:new Date(e.publishDate).toLocaleDateString(),align:"center"},{component:wp.element.createElement(P,{newsPresence:e.newsPresence}),align:"center"},{component:wp.element.createElement(u.a,{isValid:e.speakable,color:c.a.colors.speakable_purple,tooltip:"Valid Specification"}),align:"center"},{component:wp.element.createElement(O,{isValid:e.speakableValidation.metadata&&e.speakableValidation.metadata.description}),align:"center"},{component:wp.element.createElement(O,{isValid:e.speakableValidation&&e.speakableValidation.linkeddata&&e.speakableValidation.linkeddata.length}),align:"center"},{component:wp.element.createElement(_,{article:e}),align:"center"}]}):[]);return wp.element.createElement(r.PanelBody,{title:"News Articles",icon:"rss",initialOpen:!0},wp.element.createElement(r.PanelRow,null,n.length>0?wp.element.createElement(l.a,{data:n,headers:["Title","Pub Date","News","Speak","Meta","Struct",""]}):wp.element.createElement("p",null,"No articles with Speakable data yet. Add a Speakable block to a articles to get started.")))}),O=function(e){return e.isValid?wp.element.createElement(r.Icon,{icon:"yes-alt"}):wp.element.createElement(r.Icon,{icon:"minus"})},P=function(e){var t=e.newsPresence;return t&&t.lastCheckedOn?t.firstSeenOn?wp.element.createElement(r.Icon,{icon:"yes-alt"}):wp.element.createElement(r.Icon,{icon:"minus"}):wp.element.createElement("span",null,"pending")},_=Object(i.withState)({isOpen:!1})(function(e){var t=e.isOpen,n=e.article,r=e.setState;return wp.element.createElement(a.Fragment,null,wp.element.createElement("span",{className:"pointer dashicons dashicons-search",onClick:function(){return r({isOpen:!0})}}),t?wp.element.createElement(b.a,{article:n,onRequestClose:function(){r({isOpen:!1})}}):null)});t.a=E},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(0),a=(n.n(r),n(3)),o=(n.n(a),n(1)),i=(n.n(o),n(7)),l=(n.n(i),n(11)),c=n(4),s=n(44),u=(n.n(s),n(45)),p=n.n(u),f=Object(i.compose)([Object(a.withDispatch)(function(e,t){var n=e("soundcheck"),r=n.setUser;return{onToken:function(e){localStorage.setItem("jwt",e),Object(l.a)({path:"/v4/user"}).then(function(e){r(e)})}}}),Object(i.withState)({email:void 0,codeSent:!1})])(function(e){var t=e.codeSent,n=e.email,r=e.className,a=e.setState,i=e.onToken;return wp.element.createElement(o.Panel,{header:"Already Have an Account?",className:r||""},wp.element.createElement(o.PanelBody,null,wp.element.createElement(o.PanelRow,null,wp.element.createElement("div",{className:"sign-in"},wp.element.createElement("div",{className:"sign-in__form"},wp.element.createElement("div",{class:"logo"},wp.element.createElement("img",{height:"48",src:p.a})),wp.element.createElement("h3",null,"Sign In"),t?wp.element.createElement(d,{email:n,onGoBack:function(){a({codeSent:!1})},onTokenReceived:i}):wp.element.createElement(m,{onCodeSent:function(e){a({codeSent:!0,email:e})}}))))))}),m=Object(i.withState)({email:"",error:null})(function(e){var t=e.onCodeSent,n=e.email,a=e.setState,i=e.error;return wp.element.createElement(r.Fragment,null,i&&wp.element.createElement("div",{className:"sign-in__notice"},wp.element.createElement(o.Notice,{status:"error",onRemove:function(){a({error:null})}},i)),wp.element.createElement(o.TextControl,{label:"Your Email Address",type:"email",value:n,onChange:function(e){return a({email:e})}}),wp.element.createElement(o.Button,{className:"sign-in__button",isPrimary:!0,onClick:function(){if(n)return fetch(c.a+"/auth/email",{method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,create:!1})}).then(function(e){200==e.status?t(n):500==e.status?a({error:"There was an error sending your login code."}):e.json().then(function(e){a({error:e.message})})}).catch(function(e){return a({error:e})})}},"Send Sign In Code"))}),d=Object(i.withState)({authCode:"000000",error:null})(function(e){var t=e.authCode,n=e.onGoBack,a=e.onTokenReceived,i=e.error,l=e.email,s=e.setState;return wp.element.createElement(r.Fragment,null,i&&wp.element.createElement("div",{className:"sign-in__notice"},wp.element.createElement(o.Notice,{status:"error",onRemove:function(){s({error:null})}},i)),wp.element.createElement(o.TextControl,{label:"Your Login Code",type:"text",onChange:function(e){s({authCode:e})}}),wp.element.createElement(o.Button,{className:"sign-in__button",isPrimary:!0,onClick:function(){return fetch(c.a+"/auth/email?email="+encodeURIComponent(l)+"&code="+t,{method:"GET",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"}}).then(function(e){if(200==e.status)return e.json();throw new Error("Invalid login token")}).then(function(e){a(e.token)}).catch(function(e){s({error:e.message})})}},"Confirm Code"),wp.element.createElement("p",null,"Didn't receive your code?"),wp.element.createElement(o.Button,{isLink:!0,onClick:n},"Try Again"))});t.a=f},function(e,t){},function(e,t){e.exports="/wp-content/plugins/soundcheck/a69dbe4634047ba85aba5e10462c54cb.png"},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),n(15)),o=n(16),i=function(e){var t=e.domain;return wp.element.createElement(r.Panel,{header:"Soundcheck Voice Hosting"},wp.element.createElement(r.PanelBody,null,wp.element.createElement(r.Notice,{status:"warning",isDismissible:!1},"This domain ",t," is not signed up with Soundcheck."),wp.element.createElement("p",null,"You can sign up for free and start bringing your business to voice."),wp.element.createElement("p",null,wp.element.createElement(o.a,null)),wp.element.createElement(a.a,null)))};t.a=i},function(e,t){e.exports="/wp-content/plugins/soundcheck/b15b60d63f97df22a601e3183e6e31bd.png"},function(e,t){e.exports="/wp-content/plugins/soundcheck/c48e103fd8f785a2a496f5f9efc37b71.png"},function(e,t,n){"use strict";var r=n(1),a=(n.n(r),function(e){var t=e.article,n=e.onRequestClose;return wp.element.createElement(r.Modal,{title:"Article Detail",onRequestClose:n},t.speakableValidation&&t.speakableValidation.metadata&&t.speakableValidation.metadata.title?wp.element.createElement("h2",null,t.speakableValidation.metadata.title):wp.element.createElement("h2",null,"Title Not Found"),t.speakableValidation&&t.speakableValidation.metadata&&t.speakableValidation.metadata.image?wp.element.createElement("img",{src:t.speakableValidation.metadata.image,alt:t.speakableValidation.metadata.title,width:"100%"}):null,t.speakableValidation&&t.speakableValidation.metadata&&t.speakableValidation.metadata.description?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Description:")," ",t.speakableValidation.metadata.description):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Description:")," metadata missing."),t.speakableValidation&&t.speakableValidation.linkeddata&&t.speakableValidation.linkeddata.length?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Structured Data:")," Found JSON+LD structured data."):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Structured Data:")," JSON+LD structured data missing."),t.speakableValidation&&t.speakable?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Speakable:")," ",t.speakableValidation.speakable):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Speakable:")," No speakable content found."),t.newsPresence&&t.newsPresence.firstSeenOn?wp.element.createElement("p",null,wp.element.createElement("strong",null,"Google News:")," ",new Date(t.newsPresence.firstSeenOn).toLocaleDateString()):wp.element.createElement("p",null,wp.element.createElement("strong",null,"Google News:")," Not seen in Google News."))});t.a=a},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"b",function(){return i}),n.d(t,"c",function(){return l}),n.d(t,"a",function(){return c});var 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},o={speakables:{posts:[],pages:[]},voiceApps:{selectedAppId:null,apps:[],news:{},loaded:!1},soundcheckAuth:{user:null,loaded:!1,token:localStorage.getItem("jwt")}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.speakables,t=arguments[1];switch(t.type){case"SPEAKABLE_SET_POSTS":return a({},e,{posts:t.posts});case"SPEAKABLE_SET_PAGES":return a({},e,{pages:t.pages});default:return e}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.voiceApps,t=arguments[1];switch(t.type){case"VOICEAPPS_SET_APPS":return a({},e,{apps:t.apps,selectedAppId:t.apps.length>0?t.apps[0].id:null,loaded:!0});case"VOICEAPPS_SET_NEWS":return a({},e,{news:a({},e.news,r({},t.appId,t.news))});case"VOICEAPPS_SELECT_APP":return a({},e,{selectedAppId:t.id});default:return e}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.soundcheckAuth,t=arguments[1];switch(t.type){case"AUTH_SET_USER":return a({},e,{user:t.user,loaded:!0});case"AUTH_SET_TOKEN":return localStorage.setItem("jwt",t.token),a({},e,{token:t.token});default:return e}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r={setSpeakablePosts:function(e){return{type:"SPEAKABLE_SET_POSTS",posts:e}},setSpeakablePages:function(e){return{type:"SPEAKABLE_SET_PAGES",pages:e}},setVoiceApps:function(e){return{type:"VOICEAPPS_SET_APPS",apps:e}},setSelectedVoiceAppId:function(e){return{type:"VOICEAPPS_SELECT_APP",id:e}},setSpeakableNews:function(e,t){return{type:"VOICEAPPS_SET_NEWS",appId:e,news:t}},setUser:function(e){return{type:"AUTH_SET_USER",user:e}},fetchFromWPAPI:function(e){return{type:"FETCH_FROM_WPAPI",path:e}},fetchFromSoundcheckAPI:function(e){return{type:"FETCH_FROM_SOUNDCHECKAPI",path:e}},updateToSoundcheckAPI:function(e,t){return{type:"UPDATE_TO_SOUNDCHECKAPI",path:e,body:t}},fetchVoiceAppDetailsFromSoundcheckAPI:function(e){return{type:"FETCH_VOICE_APP_DETAILS_FROM_SOUNDCHECKAPI",voiceApp:e}}}}]);
  • soundcheck/trunk/blocks.build.js

    r2157970 r2182506  
    1 !function(e){function t(l){if(n[l])return n[l].exports;var a=n[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},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=21)}({21:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(22),n(23)},22:function(e,t,n){"use strict";var l=n(3),a=wp.blocks,o=a.getCategories;(0,a.setCategories)([{slug:"soundcheck",title:"Soundcheck",icon:l.a.logo(20)}].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o().filter(function(e){return"soundcheck"!==e.slug}))))},23:function(e,t,n){"use strict";var l=n(24),a=(n.n(l),n(25)),o=(n.n(a),n(3)),r=wp.i18n.__,c=wp.blocks.registerBlockType,s=wp.editor,i=s.RichText,p=s.AlignmentToolbar,u=s.BlockControls,m=s.InspectorControls,d=s.withColors,C=wp.element.Fragment,w=wp.components,g=w.PanelBody,b=(w.SelectControl,w.ToggleControl,d("backgroundColor",{textColor:"color"}),{content:{type:"array",source:"children",selector:"p"},jsonType:{type:"string",default:"WebPage"},includeJson:{type:"boolean",default:!0}});c("soundcheck/speakable",{title:r("Speakable Section"),icon:o.a.speakable("Speakable",o.a.colors.speakable_purple),category:"soundcheck",keywords:[r("Speakable"),r("voice"),r("alexa")],attributes:b,edit:function(e){var t=e.attributes,n=t.content,l=t.alignment,a=(t.includeJson,t.jsonType,e.setAttributes),o=e.className,r=e.isSelected,c=function(e){a({content:e})},s=function(e){a({alignment:void 0===e?"none":e})};return wp.element.createElement(C,null,r&&wp.element.createElement(m,null,wp.element.createElement(g,{title:"Content Guidelines"},wp.element.createElement("p",null,"Follow these guidelines when writing speakable content."),wp.element.createElement("ul",null,wp.element.createElement("li",null,"Your content should have concise headlines and/or summaries that provide users with comprehensible and useful information."),wp.element.createElement("li",null,"Break up information into individual sentences so that it reads more clearly for TTS."),wp.element.createElement("li",null,"For optimal audio user experiences, Google recommends around 20-30 seconds of content per section of speakable structured data, or roughly two to three sentences.")))),wp.element.createElement(u,null,wp.element.createElement(p,{value:l,onChange:s})),wp.element.createElement(i,{className:o,style:{textAlign:l},tagName:"p",onChange:c,value:n}))},save:function(e){return wp.element.createElement(i.Content,{tagName:"p",value:e.attributes.content,className:"wp-block-soundcheck-speakable"})},deprecated:[{attributes:b,save:function(e){var t=wp.element.createElement(i.Content,{tagName:"p",value:e.attributes.content,className:"wp-block-soundcheck-speakable"}),n={"@context":"http://schema.org/","@type":e.attributes.jsonType?e.attributes.jsonType:"WebPage",speakable:{"@type":"SpeakableSpecification",cssSelector:[".is-style-speakable",".wp-block-soundcheck-speakable"]}},l=wp.element.createElement("script",{type:"application/ld+json"},JSON.stringify(n));return wp.element.createElement(C,null,l,t)}},{attributes:b,save:function(e){return wp.element.createElement(i.Content,{tagName:"p",value:e.attributes.content,className:"wp-block-soundcheck-speakable"})}}]}),wp.blocks.registerBlockStyle("core/paragraph",{name:"speakable",label:"Speakable"})},24:function(e,t){},25:function(e,t){},3:function(e,t,n){"use strict";var l={};l.logo=function(e){return wp.element.createElement("svg",{width:e+"px",height:e+"px",viewBox:"0 0 53 53",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,"Soundcheck"),wp.element.createElement("g",{id:"Soundcheck",fill:"#3BAB48"},wp.element.createElement("path",{d:"M37.1598063,1 L16.666899,1 L16.666899,1.02119114 C16.3943259,1.01009102 16.1227512,1 15.8511765,1 C7.09988132,1 0,8.16967043 0,17.0154594 L0,51 L37.1598063,51 C45.9111015,51 53,43.8353751 53,34.9905952 L53,17.0154594 C53,8.16967043 45.9111015,1 37.1598063,1 L37.1598063,1 Z M11.626792,32.1479546 C11.626792,33.1671477 10.8060773,33.9966296 9.79665806,33.9966296 C8.78324511,33.9966296 7.96752256,33.1671477 7.96752256,32.1479546 L7.96752256,23.7673616 C7.96752256,22.743123 8.78324511,21.9186866 9.79665806,21.9186866 C10.8060773,21.9186866 11.626792,22.743123 11.626792,23.7673616 L11.626792,32.1479546 Z M19.0351902,39.8352944 C19.0351902,40.8554966 18.213477,41.6849785 17.2050562,41.6849785 C16.195637,41.6849785 15.3749223,40.8554966 15.3749223,39.8352944 L15.3749223,16.0800218 C15.3749223,15.0547741 16.195637,14.2303376 17.2050562,14.2303376 C18.213477,14.2303376 19.0351902,15.0547741 19.0351902,16.0800218 L19.0351902,39.8352944 Z M27.6606823,33.9179196 C27.6606823,34.9431674 26.8399676,35.7665947 25.8315468,35.7665947 C24.8221276,35.7665947 24.0014129,34.9431674 24.0014129,33.9179196 L24.0014129,21.992351 C24.0014129,20.9721488 24.8221276,20.1426669 25.8315468,20.1426669 C26.8399676,20.1426669 27.6606823,20.9721488 27.6606823,21.992351 L27.6606823,33.9179196 Z M36.2871729,36.0895074 C36.2871729,37.1087005 35.4664582,37.9381824 34.457039,37.9381824 C33.4476198,37.9381824 32.626905,37.1087005 32.626905,36.0895074 L32.626905,19.8207633 C32.626905,18.8005611 33.4476198,17.9710791 34.457039,17.9710791 C35.4664582,17.9710791 36.2871729,18.8005611 36.2871729,19.8207633 L36.2871729,36.0895074 Z M44.8707307,32.1479546 C44.8707307,33.1671477 44.050016,33.9966296 43.0415952,33.9966296 C42.0271838,33.9966296 41.2114613,33.1671477 41.2114613,32.1479546 L41.2114613,23.7673616 C41.2114613,22.743123 42.0271838,21.9186866 43.0415952,21.9186866 C44.050016,21.9186866 44.8707307,22.743123 44.8707307,23.7673616 L44.8707307,32.1479546 Z",id:"logo"})))},l.speakable=function(e,t){return wp.element.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 78 78",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,e),wp.element.createElement("g",{id:"Speakable",fill:t,transform:"translate(2.000000, 0.000000)"},wp.element.createElement("path",{d:"M26.4788729,69.9405038 L9.41272422,77.3999991 L12.6487443,62.8196156 C4.92071963,56.3078621 0,46.4867881 0,35.5 C0,15.8938914 15.6700338,2.13162821e-14 35,2.13162821e-14 C54.3299662,2.13162821e-14 70,15.8938914 70,35.5 C70,55.1061086 54.3299662,71 35,71 C32.0609411,71 29.2064934,70.6325615 26.4788729,69.9405038 Z M28.2601921,52.8310547 C32.6326098,44.9247652 37.1284958,38.0443001 41.7479851,32.1894531 C46.3674743,26.3346061 50.6312663,22.1269659 54.539489,19.5664062 C52.8623973,19.012367 51.3051212,18.7353516 49.867614,18.7353516 C47.5765869,18.7353516 45.7385519,19.1471313 44.3534538,19.9707031 C42.9683557,20.794275 41.3025195,22.4713415 39.3558952,25.0019531 C37.1846604,27.8170714 34.1524642,32.9156532 30.2592155,40.2978516 C29.7201503,37.76724 29.0687897,35.9891002 28.305114,34.9633789 C27.5414383,33.9376576 26.4932717,33.4248047 25.1605827,33.4248047 C23.1540623,33.4248047 20.8705565,34.5029189 18.3099968,36.6591797 C20.4962056,37.9619206 22.3903924,40.200505 23.992614,43.375 L24.8236687,45.0595703 C25.1231493,45.6735057 25.4825207,46.4671175 25.9017937,47.4404297 L27.2719108,50.6074219 C27.3917031,50.9069025 27.7211269,51.6481061 28.2601921,52.8310547 Z",id:"icon"})))},l.colors={speakable_purple:"#6A64B6",peck_green:"#3BAB48"},t.a=l}});
     1!function(e){function t(l){if(n[l])return n[l].exports;var a=n[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},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=17)}([,,function(e,t,n){"use strict";var l={};l.logo=function(e){return wp.element.createElement("svg",{width:e+"px",height:e+"px",viewBox:"0 0 53 53",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,"Soundcheck"),wp.element.createElement("g",{id:"Soundcheck",fill:"#3BAB48"},wp.element.createElement("path",{d:"M37.1598063,1 L16.666899,1 L16.666899,1.02119114 C16.3943259,1.01009102 16.1227512,1 15.8511765,1 C7.09988132,1 0,8.16967043 0,17.0154594 L0,51 L37.1598063,51 C45.9111015,51 53,43.8353751 53,34.9905952 L53,17.0154594 C53,8.16967043 45.9111015,1 37.1598063,1 L37.1598063,1 Z M11.626792,32.1479546 C11.626792,33.1671477 10.8060773,33.9966296 9.79665806,33.9966296 C8.78324511,33.9966296 7.96752256,33.1671477 7.96752256,32.1479546 L7.96752256,23.7673616 C7.96752256,22.743123 8.78324511,21.9186866 9.79665806,21.9186866 C10.8060773,21.9186866 11.626792,22.743123 11.626792,23.7673616 L11.626792,32.1479546 Z M19.0351902,39.8352944 C19.0351902,40.8554966 18.213477,41.6849785 17.2050562,41.6849785 C16.195637,41.6849785 15.3749223,40.8554966 15.3749223,39.8352944 L15.3749223,16.0800218 C15.3749223,15.0547741 16.195637,14.2303376 17.2050562,14.2303376 C18.213477,14.2303376 19.0351902,15.0547741 19.0351902,16.0800218 L19.0351902,39.8352944 Z M27.6606823,33.9179196 C27.6606823,34.9431674 26.8399676,35.7665947 25.8315468,35.7665947 C24.8221276,35.7665947 24.0014129,34.9431674 24.0014129,33.9179196 L24.0014129,21.992351 C24.0014129,20.9721488 24.8221276,20.1426669 25.8315468,20.1426669 C26.8399676,20.1426669 27.6606823,20.9721488 27.6606823,21.992351 L27.6606823,33.9179196 Z M36.2871729,36.0895074 C36.2871729,37.1087005 35.4664582,37.9381824 34.457039,37.9381824 C33.4476198,37.9381824 32.626905,37.1087005 32.626905,36.0895074 L32.626905,19.8207633 C32.626905,18.8005611 33.4476198,17.9710791 34.457039,17.9710791 C35.4664582,17.9710791 36.2871729,18.8005611 36.2871729,19.8207633 L36.2871729,36.0895074 Z M44.8707307,32.1479546 C44.8707307,33.1671477 44.050016,33.9966296 43.0415952,33.9966296 C42.0271838,33.9966296 41.2114613,33.1671477 41.2114613,32.1479546 L41.2114613,23.7673616 C41.2114613,22.743123 42.0271838,21.9186866 43.0415952,21.9186866 C44.050016,21.9186866 44.8707307,22.743123 44.8707307,23.7673616 L44.8707307,32.1479546 Z",id:"logo"})))},l.speakable=function(e,t){return wp.element.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 78 78",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,e),wp.element.createElement("g",{id:"Speakable",fill:t,transform:"translate(2.000000, 0.000000)"},wp.element.createElement("path",{d:"M26.4788729,69.9405038 L9.41272422,77.3999991 L12.6487443,62.8196156 C4.92071963,56.3078621 0,46.4867881 0,35.5 C0,15.8938914 15.6700338,2.13162821e-14 35,2.13162821e-14 C54.3299662,2.13162821e-14 70,15.8938914 70,35.5 C70,55.1061086 54.3299662,71 35,71 C32.0609411,71 29.2064934,70.6325615 26.4788729,69.9405038 Z M28.2601921,52.8310547 C32.6326098,44.9247652 37.1284958,38.0443001 41.7479851,32.1894531 C46.3674743,26.3346061 50.6312663,22.1269659 54.539489,19.5664062 C52.8623973,19.012367 51.3051212,18.7353516 49.867614,18.7353516 C47.5765869,18.7353516 45.7385519,19.1471313 44.3534538,19.9707031 C42.9683557,20.794275 41.3025195,22.4713415 39.3558952,25.0019531 C37.1846604,27.8170714 34.1524642,32.9156532 30.2592155,40.2978516 C29.7201503,37.76724 29.0687897,35.9891002 28.305114,34.9633789 C27.5414383,33.9376576 26.4932717,33.4248047 25.1605827,33.4248047 C23.1540623,33.4248047 20.8705565,34.5029189 18.3099968,36.6591797 C20.4962056,37.9619206 22.3903924,40.200505 23.992614,43.375 L24.8236687,45.0595703 C25.1231493,45.6735057 25.4825207,46.4671175 25.9017937,47.4404297 L27.2719108,50.6074219 C27.3917031,50.9069025 27.7211269,51.6481061 28.2601921,52.8310547 Z",id:"icon"})))},l.colors={speakable_purple:"#6A64B6",peck_green:"#3BAB48"},t.a=l},,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(18),n(19)},function(e,t,n){"use strict";var l=n(2),a=wp.blocks,r=a.getCategories;(0,a.setCategories)([{slug:"soundcheck",title:"Soundcheck",icon:l.a.logo(20)}].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(r().filter(function(e){return"soundcheck"!==e.slug}))))},function(e,t,n){"use strict";var l=n(20),a=(n.n(l),n(21)),r=(n.n(a),n(2)),o=wp.i18n.__,c=wp.blocks,s=c.registerBlockType,i=c.createBlock,p=wp.editor,u=p.RichText,m=p.AlignmentToolbar,d=p.BlockControls,w=p.InspectorControls,C=wp.element.Fragment,b=wp.components,f=b.PanelBody,g=(b.SelectControl,b.ToggleControl,{content:{type:"array",source:"children",selector:"p"},jsonType:{type:"string",default:"WebPage"},includeJson:{type:"boolean",default:!0}});s("soundcheck/speakable",{title:o("Speakable Section"),icon:r.a.speakable("Speakable",r.a.colors.speakable_purple),category:"soundcheck",keywords:[o("Speakable"),o("voice"),o("alexa")],attributes:g,edit:function(e){var t=e.attributes,n=t.content,l=t.alignment,a=(t.includeJson,t.jsonType,e.setAttributes),r=e.className,o=e.isSelected,c=function(e){a({content:e})},s=function(e){a({alignment:void 0===e?"none":e})};return wp.element.createElement(C,null,o&&wp.element.createElement(w,null,wp.element.createElement(f,{title:"Content Guidelines"},wp.element.createElement("p",null,"Follow these guidelines when writing speakable content."),wp.element.createElement("ul",null,wp.element.createElement("li",null,"Your content should have concise headlines and/or summaries that provide users with comprehensible and useful information."),wp.element.createElement("li",null,"Break up information into individual sentences so that it reads more clearly for TTS."),wp.element.createElement("li",null,"For optimal audio user experiences, Google recommends around 20-30 seconds of content per section of speakable structured data, or roughly two to three sentences.")))),wp.element.createElement(d,null,wp.element.createElement(m,{value:l,onChange:s})),wp.element.createElement(u,{className:r,style:{textAlign:l},tagName:"p",onChange:c,value:n}))},save:function(e){return wp.element.createElement(u.Content,{tagName:"p",value:e.attributes.content,className:"wp-block-soundcheck-speakable"})},transforms:{to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return i("core/paragraph",{content:t})}}]},deprecated:[{attributes:g,save:function(e){var t=wp.element.createElement(u.Content,{tagName:"p",value:e.attributes.content,className:"wp-block-soundcheck-speakable"}),n={"@context":"http://schema.org/","@type":e.attributes.jsonType?e.attributes.jsonType:"WebPage",speakable:{"@type":"SpeakableSpecification",cssSelector:[".is-style-speakable",".wp-block-soundcheck-speakable"]}},l=wp.element.createElement("script",{type:"application/ld+json"},JSON.stringify(n));return wp.element.createElement(C,null,l,t)}},{attributes:g,save:function(e){return wp.element.createElement(u.Content,{tagName:"p",value:e.attributes.content,className:"wp-block-soundcheck-speakable"})}}]}),wp.blocks.registerBlockStyle("core/paragraph",[{name:"default",label:"Default",isDefault:!0},{name:"speakable",label:"Speakable"}])},function(e,t){},function(e,t){}]);
  • soundcheck/trunk/blocks.editor.build.css

    r2157970 r2182506  
    1 .flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}.speakable{border-bottom:1px dotted #ddd;text-decoration:none}
     1.flex-grid{display:-ms-flexbox;display:flex}.flex-grid .col{-ms-flex:1;flex:1;margin:8px}@media (max-width: 768px){.flex-grid{display:block}}
  • soundcheck/trunk/plugin.php

    r2157970 r2182506  
    44 * Plugin URI: https://soundcheck.ai/wordpress
    55 * Description: The Soundcheck plugin is the easiest way to publish web content that is optimized for voice devices like Amazon Echo and Google Home. You get a new "Speakable" block type and a voice admin screen to validate and preview your voice content.
    6  * Version: 1.1.1
     6 * Version: 1.2.0
    77 * Author: Soundcheck
    88 *
     
    6060    $post_id = get_the_ID();
    6161    $meta = get_post_meta($post_id);
    62     if ( $meta["_soundcheck_include_speakable_sd"] && $meta["_soundcheck_include_speakable_sd"][0] ) {
    6362
    64         $cssSelector = array(".is-style-speakable", ".wp-block-soundcheck-speakable");
    65         if ( $meta["_soundcheck_speakable_selectors"] && $meta["_soundcheck_speakable_selectors"][0] ) {
    66             $selectors = $meta["_soundcheck_speakable_selectors"][0];
    67             $cssSelector = array();
    68             if (strpos($selectors, 'block') !== false) {
    69                 array_push($cssSelector,".is-style-speakable");
    70                 array_push($cssSelector,".wp-block-soundcheck-speakable");
    71             }
    72             if (strpos($selectors, 'meta_desc') !== false) {
    73                 array_push($cssSelector,"meta[name='description']");
    74             }
    75             if (strpos($selectors, 'speak_css') !== false) {
    76                 array_push($cssSelector,".speakable");
    77             }
     63    $options = get_option('soundcheck_options');
     64
     65    //defaults if no other setting found
     66    $_sd = true;
     67    $_selector = 'block';
     68
     69    //use per-post setting if found, then global if found
     70    if ( isset($meta["_soundcheck_include_speakable_sd"])) {
     71        $_sd = $meta["_soundcheck_include_speakable_sd"][0];
     72    } else if (isset($options)) {
     73        $_sd = isset($options["soundcheck_field_sd"]);
     74    }
     75
     76    if ( isset($meta["_soundcheck_speakable_selectors"])) {
     77        $_selector = $meta["_soundcheck_speakable_selectors"][0];
     78    }  else if (isset($options)) {
     79        $_selector = $options["soundcheck_field_selector"];
     80    }
     81
     82    if ( $_sd ) {
     83
     84        $selectors = $_selector;
     85        $cssSelector = array();
     86        if (strpos($selectors, 'block') !== false) {
     87            array_push($cssSelector,".is-style-speakable");
     88            array_push($cssSelector,".wp-block-soundcheck-speakable");
    7889        }
     90        if (strpos($selectors, 'meta_desc') !== false) {
     91            array_push($cssSelector,"meta[name='description']");
     92        }
     93        if (strpos($selectors, 'speak_css') !== false) {
     94            array_push($cssSelector,".speakable");
     95        }
     96       
    7997
    8098        $speakable = array("@type" => "SpeakableSpecification", "cssSelector" => $cssSelector);
  • soundcheck/trunk/readme.txt

    r2157970 r2182506  
    66Tested up to: 5.2.2
    77Requires PHP: 5.2.4
    8 Stable tag: 1.1.1
     8Stable tag: 1.2.0
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl.html
     
    8787* Global settings page to configure speakable structured data
    8888* More configuration options in the sidebar
     89
     90= 1.2.0 =
     91* More sensible cascade of options and settings for structured data
     92* Removing "interactions" section for now to simplify UI. Interactions are still available on the Soundcheck webapp.
  • soundcheck/trunk/sidebar.build.js

    r2157970 r2182506  
    1 !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.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=60)}({0:function(e,t){e.exports=wp.components},1:function(e,t){e.exports=wp.element},2:function(e,t){e.exports=wp.data},3:function(e,t,n){"use strict";var r={};r.logo=function(e){return wp.element.createElement("svg",{width:e+"px",height:e+"px",viewBox:"0 0 53 53",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,"Soundcheck"),wp.element.createElement("g",{id:"Soundcheck",fill:"#3BAB48"},wp.element.createElement("path",{d:"M37.1598063,1 L16.666899,1 L16.666899,1.02119114 C16.3943259,1.01009102 16.1227512,1 15.8511765,1 C7.09988132,1 0,8.16967043 0,17.0154594 L0,51 L37.1598063,51 C45.9111015,51 53,43.8353751 53,34.9905952 L53,17.0154594 C53,8.16967043 45.9111015,1 37.1598063,1 L37.1598063,1 Z M11.626792,32.1479546 C11.626792,33.1671477 10.8060773,33.9966296 9.79665806,33.9966296 C8.78324511,33.9966296 7.96752256,33.1671477 7.96752256,32.1479546 L7.96752256,23.7673616 C7.96752256,22.743123 8.78324511,21.9186866 9.79665806,21.9186866 C10.8060773,21.9186866 11.626792,22.743123 11.626792,23.7673616 L11.626792,32.1479546 Z M19.0351902,39.8352944 C19.0351902,40.8554966 18.213477,41.6849785 17.2050562,41.6849785 C16.195637,41.6849785 15.3749223,40.8554966 15.3749223,39.8352944 L15.3749223,16.0800218 C15.3749223,15.0547741 16.195637,14.2303376 17.2050562,14.2303376 C18.213477,14.2303376 19.0351902,15.0547741 19.0351902,16.0800218 L19.0351902,39.8352944 Z M27.6606823,33.9179196 C27.6606823,34.9431674 26.8399676,35.7665947 25.8315468,35.7665947 C24.8221276,35.7665947 24.0014129,34.9431674 24.0014129,33.9179196 L24.0014129,21.992351 C24.0014129,20.9721488 24.8221276,20.1426669 25.8315468,20.1426669 C26.8399676,20.1426669 27.6606823,20.9721488 27.6606823,21.992351 L27.6606823,33.9179196 Z M36.2871729,36.0895074 C36.2871729,37.1087005 35.4664582,37.9381824 34.457039,37.9381824 C33.4476198,37.9381824 32.626905,37.1087005 32.626905,36.0895074 L32.626905,19.8207633 C32.626905,18.8005611 33.4476198,17.9710791 34.457039,17.9710791 C35.4664582,17.9710791 36.2871729,18.8005611 36.2871729,19.8207633 L36.2871729,36.0895074 Z M44.8707307,32.1479546 C44.8707307,33.1671477 44.050016,33.9966296 43.0415952,33.9966296 C42.0271838,33.9966296 41.2114613,33.1671477 41.2114613,32.1479546 L41.2114613,23.7673616 C41.2114613,22.743123 42.0271838,21.9186866 43.0415952,21.9186866 C44.050016,21.9186866 44.8707307,22.743123 44.8707307,23.7673616 L44.8707307,32.1479546 Z",id:"logo"})))},r.speakable=function(e,t){return wp.element.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 78 78",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,e),wp.element.createElement("g",{id:"Speakable",fill:t,transform:"translate(2.000000, 0.000000)"},wp.element.createElement("path",{d:"M26.4788729,69.9405038 L9.41272422,77.3999991 L12.6487443,62.8196156 C4.92071963,56.3078621 0,46.4867881 0,35.5 C0,15.8938914 15.6700338,2.13162821e-14 35,2.13162821e-14 C54.3299662,2.13162821e-14 70,15.8938914 70,35.5 C70,55.1061086 54.3299662,71 35,71 C32.0609411,71 29.2064934,70.6325615 26.4788729,69.9405038 Z M28.2601921,52.8310547 C32.6326098,44.9247652 37.1284958,38.0443001 41.7479851,32.1894531 C46.3674743,26.3346061 50.6312663,22.1269659 54.539489,19.5664062 C52.8623973,19.012367 51.3051212,18.7353516 49.867614,18.7353516 C47.5765869,18.7353516 45.7385519,19.1471313 44.3534538,19.9707031 C42.9683557,20.794275 41.3025195,22.4713415 39.3558952,25.0019531 C37.1846604,27.8170714 34.1524642,32.9156532 30.2592155,40.2978516 C29.7201503,37.76724 29.0687897,35.9891002 28.305114,34.9633789 C27.5414383,33.9376576 26.4932717,33.4248047 25.1605827,33.4248047 C23.1540623,33.4248047 20.8705565,34.5029189 18.3099968,36.6591797 C20.4962056,37.9619206 22.3903924,40.200505 23.992614,43.375 L24.8236687,45.0595703 C25.1231493,45.6735057 25.4825207,46.4671175 25.9017937,47.4404297 L27.2719108,50.6074219 C27.3917031,50.9069025 27.7211269,51.6481061 28.2601921,52.8310547 Z",id:"icon"})))},r.colors={speakable_purple:"#6A64B6",peck_green:"#3BAB48"},t.a=r},60:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=(n.n(r),n(2)),i=(n.n(o),n(3)),a=n(61),c=wp.i18n.__,s=wp.editPost,u=s.PluginSidebar,l=s.PluginSidebarMoreMenuItem,h=wp.plugins.registerPlugin,p=Object(o.withSelect)(function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.getCurrentPostId,i=r.isSavingPost,a=r.isPublishingPost,c=r.isAutosavingPost;return{postId:o(),isSaving:n||i(),isAutoSaving:c(),isPublishing:a()}})(a.a);h("soundcheck-admin-sidebar",{icon:i.a.logo(20),render:function(){return wp.element.createElement(r.Fragment,null,wp.element.createElement(l,{target:"soundcheck-admin-sidebar"},c("Soundcheck","soundcheck-admin")),wp.element.createElement(u,{name:"soundcheck-admin-sidebar",title:c("Soundcheck","soundcheck-admin")},wp.element.createElement(p,null)))}})},61:function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),c=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}return r("next")})}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 c=n(7),s=n.n(c),u=n(1),l=(n.n(u),n(0)),h=(n.n(l),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=function(e){function t(){o(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={includeJson:!1,selectors:[],initialized:!1},e}return a(t,e),h(t,[{key:"componentDidMount",value:function(){function e(){return t.apply(this,arguments)}var t=r(s.a.mark(function e(){var t,n,r,o;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiRequest({path:"/soundcheck-admin/v1/get-settings?id="+this.props.postId,method:"GET"});case 2:return t=e.sent,n={soundcheck_field_sd:t.soundcheck_field_sd?t.soundcheck_field_sd:"enabled",soundcheck_field_selector:t.soundcheck_field_selector?t.soundcheck_field_selector:"block"},e.next=6,wp.apiFetch({path:"/wp/v2/posts/"+this.props.postId,method:"GET"});case 6:return r=e.sent,o={includeJson:r.meta._soundcheck_speakable_selectors?r.meta._soundcheck_include_speakable_sd:"enabled"==n.soundcheck_field_sd,selectors:r.meta._soundcheck_speakable_selectors?JSON.parse(r.meta._soundcheck_speakable_selectors):[n.soundcheck_field_selector],initialized:!0},e.abrupt("return",this.setState(o));case 9:case"end":return e.stop()}},e,this)}));return e}()},{key:"componentDidUpdate",value:function(e,t){var n=JSON.stringify(this.state),r=JSON.stringify(t);if(t.initialized&&n!=r){var o={_soundcheck_include_speakable_sd:this.state.includeJson?1:0,_soundcheck_speakable_selectors:JSON.stringify(this.state.selectors)};return wp.apiRequest({path:"/soundcheck-admin/v1/update-structured-data?id="+e.postId,method:"POST",data:o}).then(function(e){return e},function(e){return e})}}},{key:"updateSelector",value:function(e,t){var n=this.state.selectors.filter(function(e){return e!==t});e&&n.push(t),this.setState({selectors:n})}},{key:"render",value:function(){var e=this,t=!!this.state.selectors.find(function(e){return"block"==e}),n=!!this.state.selectors.find(function(e){return"meta_desc"==e}),r=!!this.state.selectors.find(function(e){return"speak_css"==e});return wp.element.createElement(l.PanelBody,{title:"Structured Data"},wp.element.createElement("h3",null,"Speakable Specification"),wp.element.createElement(l.ToggleControl,{checked:this.state.includeJson,label:"Include structured data?",help:"Places hidden ld+json markup on the page.",onChange:function(){var t=!e.state.includeJson;e.setState({includeJson:t})}}),wp.element.createElement("p",null),this.state.includeJson?wp.element.createElement(u.Fragment,null,wp.element.createElement("h3",null,"Selectors"),wp.element.createElement(l.CheckboxControl,{label:"Speakable Block",checked:t,onChange:function(t){e.updateSelector(t,"block")}}),wp.element.createElement(l.CheckboxControl,{label:"Meta Description",checked:n,onChange:function(t){e.updateSelector(t,"meta_desc")}}),wp.element.createElement(l.CheckboxControl,{label:".speakable CSS",checked:r,onChange:function(t){e.updateSelector(t,"speak_css")}}),wp.element.createElement("p",{className:"description"},"All of the speakable content found using the selectors you chose gets combined into one response in the order they appear on the page.")):null)}}]),t}(u.Component);t.a=p},7:function(e,t,n){e.exports=n(8)},8:function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(9),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},9:function(e,t){!function(t){"use strict";function n(e,t,n,r){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),c=new f(r||[]);return a._invoke=u(e,n,c),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function i(){}function a(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,i,a){var c=r(e[n],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"===typeof u&&y.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(u).then(function(e){s.value=e,i(s)},a)}a(c.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function u(e,t,n){var o=E;return function(i,a){if(o===S)throw new Error("Generator is already running");if(o===O){if("throw"===i)throw a;return m()}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=l(c,n);if(s){if(s===P)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===E)throw o=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=S;var u=r(e,t,n);if("normal"===u.type){if(o=n.done?O:L,u.arg===P)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=O,n.method="throw",n.arg=u.arg)}}}function l(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,l(e,t),"throw"===t.method))return P;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return P}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,P;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,P):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,P)}function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:g,done:!0}}var g,v=Object.prototype,y=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},b=w.iterator||"@@iterator",_=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag",C="object"===typeof e,x=t.regeneratorRuntime;if(x)return void(C&&(e.exports=x));x=t.regeneratorRuntime=C?e.exports:{},x.wrap=n;var E="suspendedStart",L="suspendedYield",S="executing",O="completed",P={},j={};j[b]=function(){return this};var M=Object.getPrototypeOf,N=M&&M(M(d([])));N&&N!==v&&y.call(N,b)&&(j=N);var R=a.prototype=o.prototype=Object.create(j);i.prototype=R.constructor=a,a.constructor=i,a[k]=i.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(R),e},x.awrap=function(e){return{__await:e}},c(s.prototype),s.prototype[_]=function(){return this},x.AsyncIterator=s,x.async=function(e,t,r,o){var i=new s(n(e,t,r,o));return x.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},c(R),R[k]="Generator",R[b]=function(){return this},R.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=y.call(o,"catchLoc"),c=y.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,P):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),P},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),P}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),P}}}(function(){return this}()||Function("return this")())}});
     1!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.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=52)}({0:function(e,t){e.exports=wp.element},1:function(e,t){e.exports=wp.components},2:function(e,t,n){"use strict";var r={};r.logo=function(e){return wp.element.createElement("svg",{width:e+"px",height:e+"px",viewBox:"0 0 53 53",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,"Soundcheck"),wp.element.createElement("g",{id:"Soundcheck",fill:"#3BAB48"},wp.element.createElement("path",{d:"M37.1598063,1 L16.666899,1 L16.666899,1.02119114 C16.3943259,1.01009102 16.1227512,1 15.8511765,1 C7.09988132,1 0,8.16967043 0,17.0154594 L0,51 L37.1598063,51 C45.9111015,51 53,43.8353751 53,34.9905952 L53,17.0154594 C53,8.16967043 45.9111015,1 37.1598063,1 L37.1598063,1 Z M11.626792,32.1479546 C11.626792,33.1671477 10.8060773,33.9966296 9.79665806,33.9966296 C8.78324511,33.9966296 7.96752256,33.1671477 7.96752256,32.1479546 L7.96752256,23.7673616 C7.96752256,22.743123 8.78324511,21.9186866 9.79665806,21.9186866 C10.8060773,21.9186866 11.626792,22.743123 11.626792,23.7673616 L11.626792,32.1479546 Z M19.0351902,39.8352944 C19.0351902,40.8554966 18.213477,41.6849785 17.2050562,41.6849785 C16.195637,41.6849785 15.3749223,40.8554966 15.3749223,39.8352944 L15.3749223,16.0800218 C15.3749223,15.0547741 16.195637,14.2303376 17.2050562,14.2303376 C18.213477,14.2303376 19.0351902,15.0547741 19.0351902,16.0800218 L19.0351902,39.8352944 Z M27.6606823,33.9179196 C27.6606823,34.9431674 26.8399676,35.7665947 25.8315468,35.7665947 C24.8221276,35.7665947 24.0014129,34.9431674 24.0014129,33.9179196 L24.0014129,21.992351 C24.0014129,20.9721488 24.8221276,20.1426669 25.8315468,20.1426669 C26.8399676,20.1426669 27.6606823,20.9721488 27.6606823,21.992351 L27.6606823,33.9179196 Z M36.2871729,36.0895074 C36.2871729,37.1087005 35.4664582,37.9381824 34.457039,37.9381824 C33.4476198,37.9381824 32.626905,37.1087005 32.626905,36.0895074 L32.626905,19.8207633 C32.626905,18.8005611 33.4476198,17.9710791 34.457039,17.9710791 C35.4664582,17.9710791 36.2871729,18.8005611 36.2871729,19.8207633 L36.2871729,36.0895074 Z M44.8707307,32.1479546 C44.8707307,33.1671477 44.050016,33.9966296 43.0415952,33.9966296 C42.0271838,33.9966296 41.2114613,33.1671477 41.2114613,32.1479546 L41.2114613,23.7673616 C41.2114613,22.743123 42.0271838,21.9186866 43.0415952,21.9186866 C44.050016,21.9186866 44.8707307,22.743123 44.8707307,23.7673616 L44.8707307,32.1479546 Z",id:"logo"})))},r.speakable=function(e,t){return wp.element.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 78 78",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("title",null,e),wp.element.createElement("g",{id:"Speakable",fill:t,transform:"translate(2.000000, 0.000000)"},wp.element.createElement("path",{d:"M26.4788729,69.9405038 L9.41272422,77.3999991 L12.6487443,62.8196156 C4.92071963,56.3078621 0,46.4867881 0,35.5 C0,15.8938914 15.6700338,2.13162821e-14 35,2.13162821e-14 C54.3299662,2.13162821e-14 70,15.8938914 70,35.5 C70,55.1061086 54.3299662,71 35,71 C32.0609411,71 29.2064934,70.6325615 26.4788729,69.9405038 Z M28.2601921,52.8310547 C32.6326098,44.9247652 37.1284958,38.0443001 41.7479851,32.1894531 C46.3674743,26.3346061 50.6312663,22.1269659 54.539489,19.5664062 C52.8623973,19.012367 51.3051212,18.7353516 49.867614,18.7353516 C47.5765869,18.7353516 45.7385519,19.1471313 44.3534538,19.9707031 C42.9683557,20.794275 41.3025195,22.4713415 39.3558952,25.0019531 C37.1846604,27.8170714 34.1524642,32.9156532 30.2592155,40.2978516 C29.7201503,37.76724 29.0687897,35.9891002 28.305114,34.9633789 C27.5414383,33.9376576 26.4932717,33.4248047 25.1605827,33.4248047 C23.1540623,33.4248047 20.8705565,34.5029189 18.3099968,36.6591797 C20.4962056,37.9619206 22.3903924,40.200505 23.992614,43.375 L24.8236687,45.0595703 C25.1231493,45.6735057 25.4825207,46.4671175 25.9017937,47.4404297 L27.2719108,50.6074219 C27.3917031,50.9069025 27.7211269,51.6481061 28.2601921,52.8310547 Z",id:"icon"})))},r.colors={speakable_purple:"#6A64B6",peck_green:"#3BAB48"},t.a=r},3:function(e,t){e.exports=wp.data},52:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=(n.n(r),n(3)),i=(n.n(o),n(2)),a=n(53),c=wp.i18n.__,s=wp.editPost,u=s.PluginSidebar,l=s.PluginSidebarMoreMenuItem,h=wp.plugins.registerPlugin,p=Object(o.withSelect)(function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.getCurrentPostId,i=r.isSavingPost,a=r.isPublishingPost,c=r.isAutosavingPost;return{postId:o(),isSaving:n||i(),isAutoSaving:c(),isPublishing:a()}})(a.a);h("soundcheck-admin-sidebar",{icon:i.a.logo(20),render:function(){return wp.element.createElement(r.Fragment,null,wp.element.createElement(l,{target:"soundcheck-admin-sidebar"},c("Soundcheck","soundcheck-admin")),wp.element.createElement(u,{name:"soundcheck-admin-sidebar",title:c("Soundcheck","soundcheck-admin")},wp.element.createElement(p,null)))}})},53:function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),c=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}return r("next")})}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 c=n(6),s=n.n(c),u=n(0),l=(n.n(u),n(1)),h=(n.n(l),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=function(e){function t(){o(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={includeJson:!1,selectors:[],initialized:!1},e}return a(t,e),h(t,[{key:"componentDidMount",value:function(){function e(){return t.apply(this,arguments)}var t=r(s.a.mark(function e(){var t,n,r,o;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiRequest({path:"/soundcheck-admin/v1/get-settings?id="+this.props.postId,method:"GET"});case 2:return t=e.sent,n={soundcheck_field_sd:t.soundcheck_field_sd?t.soundcheck_field_sd:"enabled",soundcheck_field_selector:t.soundcheck_field_selector?t.soundcheck_field_selector:"block"},e.next=6,wp.apiFetch({path:"/wp/v2/posts/"+this.props.postId,method:"GET"});case 6:return r=e.sent,o={includeJson:r.meta._soundcheck_speakable_selectors?r.meta._soundcheck_include_speakable_sd:"enabled"==n.soundcheck_field_sd,selectors:r.meta._soundcheck_speakable_selectors?JSON.parse(r.meta._soundcheck_speakable_selectors):[n.soundcheck_field_selector],initialized:!0},e.abrupt("return",this.setState(o));case 9:case"end":return e.stop()}},e,this)}));return e}()},{key:"componentDidUpdate",value:function(e,t){var n=JSON.stringify(this.state),r=JSON.stringify(t);if(t.initialized&&n!=r){var o={_soundcheck_include_speakable_sd:this.state.includeJson?1:0,_soundcheck_speakable_selectors:JSON.stringify(this.state.selectors)};return wp.apiRequest({path:"/soundcheck-admin/v1/update-structured-data?id="+e.postId,method:"POST",data:o}).then(function(e){return e},function(e){return e})}}},{key:"updateSelector",value:function(e,t){var n=this.state.selectors.filter(function(e){return e!==t});e&&n.push(t),this.setState({selectors:n})}},{key:"render",value:function(){var e=this,t=!!this.state.selectors.find(function(e){return"block"==e}),n=!!this.state.selectors.find(function(e){return"meta_desc"==e}),r=!!this.state.selectors.find(function(e){return"speak_css"==e});return wp.element.createElement(l.PanelBody,{title:"Structured Data"},wp.element.createElement("h3",null,"Speakable Specification"),wp.element.createElement(l.ToggleControl,{checked:this.state.includeJson,label:"Include structured data?",help:"Places hidden ld+json markup on the page.",onChange:function(){var t=!e.state.includeJson;e.setState({includeJson:t})}}),wp.element.createElement("p",null),this.state.includeJson?wp.element.createElement(u.Fragment,null,wp.element.createElement("h3",null,"Selectors"),wp.element.createElement(l.CheckboxControl,{label:"Speakable Block",checked:t,onChange:function(t){e.updateSelector(t,"block")}}),wp.element.createElement(l.CheckboxControl,{label:"Meta Description",checked:n,onChange:function(t){e.updateSelector(t,"meta_desc")}}),wp.element.createElement(l.CheckboxControl,{label:".speakable CSS",checked:r,onChange:function(t){e.updateSelector(t,"speak_css")}}),wp.element.createElement("p",{className:"description"},"All of the speakable content found using the selectors you chose gets combined into one response in the order they appear on the page.")):null)}}]),t}(u.Component);t.a=p},6:function(e,t,n){e.exports=n(8)},8:function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(9),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},9:function(e,t){!function(t){"use strict";function n(e,t,n,r){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),c=new f(r||[]);return a._invoke=u(e,n,c),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function i(){}function a(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,i,a){var c=r(e[n],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"===typeof u&&y.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(u).then(function(e){s.value=e,i(s)},a)}a(c.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function u(e,t,n){var o=E;return function(i,a){if(o===S)throw new Error("Generator is already running");if(o===O){if("throw"===i)throw a;return m()}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=l(c,n);if(s){if(s===P)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===E)throw o=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=S;var u=r(e,t,n);if("normal"===u.type){if(o=n.done?O:L,u.arg===P)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=O,n.method="throw",n.arg=u.arg)}}}function l(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,l(e,t),"throw"===t.method))return P;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return P}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,P;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,P):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,P)}function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:g,done:!0}}var g,v=Object.prototype,y=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},b=w.iterator||"@@iterator",_=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag",C="object"===typeof e,x=t.regeneratorRuntime;if(x)return void(C&&(e.exports=x));x=t.regeneratorRuntime=C?e.exports:{},x.wrap=n;var E="suspendedStart",L="suspendedYield",S="executing",O="completed",P={},j={};j[b]=function(){return this};var M=Object.getPrototypeOf,N=M&&M(M(d([])));N&&N!==v&&y.call(N,b)&&(j=N);var R=a.prototype=o.prototype=Object.create(j);i.prototype=R.constructor=a,a.constructor=i,a[k]=i.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(R),e},x.awrap=function(e){return{__await:e}},c(s.prototype),s.prototype[_]=function(){return this},x.AsyncIterator=s,x.async=function(e,t,r,o){var i=new s(n(e,t,r,o));return x.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},c(R),R[k]="Generator",R[b]=function(){return this},R.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=y.call(o,"catchLoc"),c=y.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,P):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),P},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),P}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),P}}}(function(){return this}()||Function("return this")())}});
  • soundcheck/trunk/src/init-admin.php

    r2157970 r2182506  
    1111
    1212function soundcheck_register_page() {
    13     global $menu, $submenu;
    1413
    1514    $base64_icon = 'PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgNTMgNTMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBpZD0iU291bmRjaGVjayIgZmlsbD0iYmxhY2siPjxwYXRoIGQ9Ik0zNy4xNTk4MDYzLDEgTDE2LjY2Njg5OSwxIEwxNi42NjY4OTksMS4wMjExOTExNCBDMTYuMzk0MzI1OSwxLjAxMDA5MTAyIDE2LjEyMjc1MTIsMSAxNS44NTExNzY1LDEgQzcuMDk5ODgxMzIsMSAwLDguMTY5NjcwNDMgMCwxNy4wMTU0NTk0IEwwLDUxIEwzNy4xNTk4MDYzLDUxIEM0NS45MTExMDE1LDUxIDUzLDQzLjgzNTM3NTEgNTMsMzQuOTkwNTk1MiBMNTMsMTcuMDE1NDU5NCBDNTMsOC4xNjk2NzA0MyA0NS45MTExMDE1LDEgMzcuMTU5ODA2MywxIEwzNy4xNTk4MDYzLDEgWiBNMTEuNjI2NzkyLDMyLjE0Nzk1NDYgQzExLjYyNjc5MiwzMy4xNjcxNDc3IDEwLjgwNjA3NzMsMzMuOTk2NjI5NiA5Ljc5NjY1ODA2LDMzLjk5NjYyOTYgQzguNzgzMjQ1MTEsMzMuOTk2NjI5NiA3Ljk2NzUyMjU2LDMzLjE2NzE0NzcgNy45Njc1MjI1NiwzMi4xNDc5NTQ2IEw3Ljk2NzUyMjU2LDIzLjc2NzM2MTYgQzcuOTY3NTIyNTYsMjIuNzQzMTIzIDguNzgzMjQ1MTEsMjEuOTE4Njg2NiA5Ljc5NjY1ODA2LDIxLjkxODY4NjYgQzEwLjgwNjA3NzMsMjEuOTE4Njg2NiAxMS42MjY3OTIsMjIuNzQzMTIzIDExLjYyNjc5MiwyMy43NjczNjE2IEwxMS42MjY3OTIsMzIuMTQ3OTU0NiBaIE0xOS4wMzUxOTAyLDM5LjgzNTI5NDQgQzE5LjAzNTE5MDIsNDAuODU1NDk2NiAxOC4yMTM0NzcsNDEuNjg0OTc4NSAxNy4yMDUwNTYyLDQxLjY4NDk3ODUgQzE2LjE5NTYzNyw0MS42ODQ5Nzg1IDE1LjM3NDkyMjMsNDAuODU1NDk2NiAxNS4zNzQ5MjIzLDM5LjgzNTI5NDQgTDE1LjM3NDkyMjMsMTYuMDgwMDIxOCBDMTUuMzc0OTIyMywxNS4wNTQ3NzQxIDE2LjE5NTYzNywxNC4yMzAzMzc2IDE3LjIwNTA1NjIsMTQuMjMwMzM3NiBDMTguMjEzNDc3LDE0LjIzMDMzNzYgMTkuMDM1MTkwMiwxNS4wNTQ3NzQxIDE5LjAzNTE5MDIsMTYuMDgwMDIxOCBMMTkuMDM1MTkwMiwzOS44MzUyOTQ0IFogTTI3LjY2MDY4MjMsMzMuOTE3OTE5NiBDMjcuNjYwNjgyMywzNC45NDMxNjc0IDI2LjgzOTk2NzYsMzUuNzY2NTk0NyAyNS44MzE1NDY4LDM1Ljc2NjU5NDcgQzI0LjgyMjEyNzYsMzUuNzY2NTk0NyAyNC4wMDE0MTI5LDM0Ljk0MzE2NzQgMjQuMDAxNDEyOSwzMy45MTc5MTk2IEwyNC4wMDE0MTI5LDIxLjk5MjM1MSBDMjQuMDAxNDEyOSwyMC45NzIxNDg4IDI0LjgyMjEyNzYsMjAuMTQyNjY2OSAyNS44MzE1NDY4LDIwLjE0MjY2NjkgQzI2LjgzOTk2NzYsMjAuMTQyNjY2OSAyNy42NjA2ODIzLDIwLjk3MjE0ODggMjcuNjYwNjgyMywyMS45OTIzNTEgTDI3LjY2MDY4MjMsMzMuOTE3OTE5NiBaIE0zNi4yODcxNzI5LDM2LjA4OTUwNzQgQzM2LjI4NzE3MjksMzcuMTA4NzAwNSAzNS40NjY0NTgyLDM3LjkzODE4MjQgMzQuNDU3MDM5LDM3LjkzODE4MjQgQzMzLjQ0NzYxOTgsMzcuOTM4MTgyNCAzMi42MjY5MDUsMzcuMTA4NzAwNSAzMi42MjY5MDUsMzYuMDg5NTA3NCBMMzIuNjI2OTA1LDE5LjgyMDc2MzMgQzMyLjYyNjkwNSwxOC44MDA1NjExIDMzLjQ0NzYxOTgsMTcuOTcxMDc5MSAzNC40NTcwMzksMTcuOTcxMDc5MSBDMzUuNDY2NDU4MiwxNy45NzEwNzkxIDM2LjI4NzE3MjksMTguODAwNTYxMSAzNi4yODcxNzI5LDE5LjgyMDc2MzMgTDM2LjI4NzE3MjksMzYuMDg5NTA3NCBaIE00NC44NzA3MzA3LDMyLjE0Nzk1NDYgQzQ0Ljg3MDczMDcsMzMuMTY3MTQ3NyA0NC4wNTAwMTYsMzMuOTk2NjI5NiA0My4wNDE1OTUyLDMzLjk5NjYyOTYgQzQyLjAyNzE4MzgsMzMuOTk2NjI5NiA0MS4yMTE0NjEzLDMzLjE2NzE0NzcgNDEuMjExNDYxMywzMi4xNDc5NTQ2IEw0MS4yMTE0NjEzLDIzLjc2NzM2MTYgQzQxLjIxMTQ2MTMsMjIuNzQzMTIzIDQyLjAyNzE4MzgsMjEuOTE4Njg2NiA0My4wNDE1OTUyLDIxLjkxODY4NjYgQzQ0LjA1MDAxNiwyMS45MTg2ODY2IDQ0Ljg3MDczMDcsMjIuNzQzMTIzIDQ0Ljg3MDczMDcsMjMuNzY3MzYxNiBMNDQuODcwNzMwNywzMi4xNDc5NTQ2IFoiIGlkPSJsb2dvIj48L3BhdGg+PC9nPjwvc3ZnPg==';
     
    4443    add_submenu_page(
    4544        'soundcheck-admin',
    46         __( 'Voice Interactions', 'soundcheck-admin' ),
    47         __( 'Voice Interactions', 'soundcheck-admin' ),
    48         'manage_options',
    49         'soundcheck-voice-interactions',
    50         'soundcheck_admin_page'
    51     );
    52 
    53     add_submenu_page(
    54         'soundcheck-admin',
    5545        __( 'Soundcheck Settings', 'soundcheck-admin' ),
    5646        __( 'Settings', 'soundcheck-admin' ),
     
    6656
    6757    global $hook_suffix;
    68     error_log($hook_suffix);
    6958    $page_match = preg_match('/^toplevel_page_soundcheck-[\w-]*$|^soundcheck_page_soundcheck-[voice\-interactions|speakable\-news|admin]*$/',$hook_suffix);
    7059    if ($page_match) {
     
    145134    $keys = array('_soundcheck_include_speakable_sd','_soundcheck_speakable_selectors');
    146135    foreach ($keys as $key) {
    147         error_log('updating post meta '.$key.' to '.$data[$key]);
    148136        update_post_meta( $data['id'], $key, $data[$key] );
    149137    }
     
    278266        return;
    279267    }
    280    
    281     // add error/update messages
    282    
    283     // check if the user have submitted the settings
    284     // wordpress will add the "settings-updated" $_GET parameter to the url
     268
    285269    if ( isset( $_GET['settings-updated'] ) ) {
    286270        // add settings saved message with the class of "updated"
     
    288272    }
    289273   
    290     // show error/update messages
    291274    settings_errors( 'soundcheck_messages' );
    292275    ?>
Note: See TracChangeset for help on using the changeset viewer.