The Ultimate Video Player For WordPress – by Presto Player - Version 1.10.1

Version Description

  • October 26, 2022
Download this release

Release Info

Developer patilvikasj
Plugin Icon 128x128 The Ultimate Video Player For WordPress – by Presto Player
Version 1.10.1
Comparing to
See all releases

Code changes from version 1.10.0 to 1.10.1

dist/settings/admin-1aadbb22.js DELETED
@@ -1,19 +0,0 @@
1
- /*!
2
- *
3
- * Presto Player
4
- *
5
- * @author Presto Made, Inc
6
- * @version 0.1.0
7
- * @link undefined
8
- * @license GPL
9
- *
10
- * Copyright (c) 2022 Presto Made, Inc
11
- *
12
- * This software is released under the GPL License
13
- * https://opensource.org/licenses/GPL
14
- *
15
- * Compiled with the help of https://wpack.io
16
- * A zero setup Webpack Bundler Script for WordPress
17
- */
18
- (window.wpackioprestoPlayersettingsJsonp=window.wpackioprestoPlayersettingsJsonp||[]).push([[0],{0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.components},11:function(e,t){e.exports=window.wp.notices},12:function(e,t){e.exports=window.wp.compose},2:function(e,t){e.exports=window.wp.coreData},32:function(e,t){e.exports=window.wp.apiFetch},35:function(e,t,r){r(36),e.exports=r(51)},51:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(2),o=r(7),c=r(0);Object(o.dispatch)(a.store).addEntities([{name:"preset",kind:"presto-player",label:Object(c.__)("Presets","presto-player"),baseURL:"presto-player/v1/preset",baseURLParams:{context:"edit"}},{name:"audio-preset",kind:"presto-player",label:Object(c.__)("Audio Presets","presto-player"),baseURL:"presto-player/v1/audio-preset",baseURLParams:{context:"edit"}},{name:"webhook",kind:"presto-player",label:Object(c.__)("Webhook","presto-player"),baseURL:"presto-player/v1/webhook",baseURLParams:{context:"edit"}}]);var l=r(9),s=r(3),i=r(4),p=r.n(i),u=r(1),b=r(11),y=r(27),m=r(28),d=r(19),O=r(29),_=r(30),f=r(23),v=r(5),h=r(31),j=r.n(h);function g(e){return{path:e.pathname,hash:e.hash,query:j.a.parse(e.search)}}var E=r(34),R=Object(E.a)(),w=wp.element.createContext({route:g(R.location)}),P=r(16),k=wp.element.useContext,C="";function S(e){var t=e.path,r=e.onRoute,n=e.children,a=k(w).route,o=Object(P.a)("".concat(t))("".concat(a.hash.substr(1)));return o?(r&&(C!==o.path&&r(),C=o.path),React.createElement("div",null,wp.element.cloneElement(n,{route:o}))):null}var x=r(14),D=r.n(x);function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var T=wp.element.useContext;function B(e){var t=e.to,r=e.onClick,n=e.children,a=e.activeClassName,o=T(w).route,c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);delete c.activeClassName;return React.createElement("a",Object.assign({},c,{className:D()(Object(v.a)({},a,Object(P.a)("".concat(t))("".concat(o.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),o.path!==t){r&&r(e);var n=R.location.search;R.push("".concat(n,"#").concat(t))}}}),n)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(f.a)(e);if(t){var a=Object(f.a)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Object(_.a)(this,r)}}var I=function(e){Object(O.a)(r,e);var t=F(r);function r(e){var n;Object(y.a)(this,r),n=t.call(this,e),Object(v.a)(Object(d.a)(n),"handleRouteChange",(function(e){var t=g(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=R.listen(n.handleRouteChange);var a=g(R.location),o=R.location.search;return n.state={route:a,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return Object(m.a)(r,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.NotFound,this.state),n=r.route,a=r.defaultRoute;if(!n.hash)return R.push(a),React.createElement("div",null);var o=!1;(this.routes||[]).forEach((function(e){var t=Object(P.a)(n.hash.substr(1))("".concat(n.hash.substr(1)));t&&(o={name:e,data:t})}));var c={route:n,matched:o},l=!o;return React.createElement(w.Provider,{value:c},l?React.createElement("div",null,"Not found"):t)}}]),r}(n.Component),A={general:{path:"general"},integrations:{path:"/integrations"},performance:{path:"/performance"}},L=r(33),M=["onSave","children","busy","loading"];function U(e){var t=e.onSave,r=e.children,n=e.busy,c=e.loading,l=Object(L.a)(e,M),s=Object(o.useSelect)((function(e){var t=e(a.store),r=t.__experimentalGetDirtyEntityRecords,n=t.isSavingEntityRecord,o=(r()||[]).filter((function(e){return"webhook"!==e.name}));return{isDirty:o.length>0,isSaving:o.some((function(e){return n(e.kind,e.name,e.key)}))}}),[]),i=s.isDirty,p=s.isSaving,b=!i||p;return c?React.createElement(ScSkeleton,{style:{width:"120px",height:"35px",display:"inline-block"}}):React.createElement(u.Button,Object.assign({isPrimary:!0,"aria-disabled":b,disabled:b||p||n,isBusy:p||n,onClick:b?void 0:t},l),r)}var q=function(e){var t=e.className,r=Object(o.useSelect)((function(e){return e(b.store).getNotices()})),n=Object(o.useDispatch)(b.store).removeNotice,a=r.filter((function(e){return"snackbar"===e.type}));return React.createElement(u.SnackbarList,{notices:a,className:t,onRemove:n})};function W(){var e=Object(o.useDispatch)(a.store).saveEditedEntityRecord;return{save:function(){var t=Object(l.a)(p.a.mark((function t(){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(o.select)(a.store).__experimentalGetDirtyEntityRecords(),n=[],r.forEach((function(t){var r=t.kind,a=t.name,o=t.key;n.push(e(r,a,o,{throwOnError:!0}))})),t.next=5,Promise.all(n);case 5:if(!t.sent.some((function(e){return void 0===e}))){t.next=8;break}throw{message:"Saving failed."};case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}}var Y,G=wp.i18n.__,z=wp.element.useState,H=wp.components,V=H.Modal,K=H.Button,J=function(e){var t=e.children,r=e.disabled,n=z(!1),a=Object(s.a)(n,2),o=a[0],c=a[1];return r?React.createElement("div",null,React.createElement("div",{className:"presto-options__disabled-overlay",onClick:function(e){return c(!0),e.preventDefault(),!1}},React.createElement("div",null,t)),!!o&&React.createElement(V,{title:null==r?void 0:r.title,onRequestClose:function(){return c(!1)}},React.createElement("h2",null,null==r?void 0:r.heading),React.createElement("p",null,null==r?void 0:r.message),React.createElement(K,{href:null==r?void 0:r.link,target:"_blank",isPrimary:!0},G("Learn More","presto-player")))):React.createElement("div",null,t)},Q=wp.components,X=Q.Card,Z=Q.CardBody,$=Q.CardFooter,ee=function(e){var t=e.title,r=e.description,n=e.children,a=e.disabled,s=e.hideSaveButton,i=W().save,u=Object(o.useDispatch)(b.store),y=u.createSuccessNotice,m=u.createErrorNotice,d=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i();case 3:y(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),m((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"));case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(J,{disabled:a},React.createElement(X,{size:"large",className:"presto-options__card"},React.createElement(Z,{className:"presto-options__card-body"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"2em"}},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},t&&React.createElement("h2",{style:{marginBottom:0}},t," ",!!a&&React.createElement("div",{className:"presto-options__pro-badge"},"Pro")),r&&React.createElement("p",null,r)),React.createElement("div",null,n))),s?React.createElement("br",null):React.createElement($,{isShady:!0},React.createElement("div",null,React.createElement(U,{onSave:d},Object(c.__)("Update Settings"))))))},te=wp.i18n.__,re=wp.components,ne=re.Button,ae=re.BaseControl,oe=wp.mediaUtils.MediaUpload,ce=(wp.data.dispatch,function(e){var t=e.option,r=e.label,n=e.help,a=e.allowedTypes,o=e.value,c=e.className,l=e.maxWidth,s=e.onSelect;return React.createElement("div",{className:D()(c,"presto-settings__setting is-media-control")},React.createElement(ae,{className:"editor-video-poster-control"},React.createElement(ae.VisualLabel,null,r),o&&React.createElement(ae,null,React.createElement("img",{style:{maxWidth:l,border:"1px solid #dcdcdc"},src:o})),React.createElement("br",null),React.createElement(oe,{title:n,onSelect:s,allowedTypes:a,render:function(e){var t=e.open;return React.createElement(ne,{isSecondary:!0,onClick:t,className:o?"button-replace":"button-select"},te(o?"Replace":"Select","presto-player"))}})," ",React.createElement("p",{id:"video-block__logo-image-description-".concat(null==t?void 0:t.id),hidden:!0},o?sprintf(te("The current logo image url is %s","presto-player"),o):te("There is no logo image currently selected","presto-player")),!!o&&React.createElement(ne,{onClick:function(){return s("")},isTertiary:!0},te("Remove","presto-player"))),React.createElement("br",null))}),le=function(e){var t=e.children,r=e.title,n=e.description;return React.createElement("div",{className:"presto-flow presto-settings__page"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},r&&React.createElement("h1",null,r),n&&React.createElement("p",null,n)),React.createElement("div",{className:"presto-settings__body "},React.createElement("div",{className:"presto-flow"},t)))},se=r(21),ie=r(6),pe=function(e){var t=e.option,r=e.value,a=e.className,o=e.disabled,c=e.onChange,l=function(e){o||(e.save(),c(s.current.value))},s=Object(n.useRef)();return Object(n.useEffect)((function(){var e;null!==(e=wp)&&void 0!==e&&e.CodeMirror&&wp.CodeMirror.fromTextArea(s.current,{type:"text/css",lineNumbers:!0}).on("change",l)}),[]),Object(ie.b)("div",{className:D()(a,"presto-settings__setting")},Object(ie.b)(u.BaseControl,{css:Object(ie.a)(Y||(Y=Object(se.a)(["\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n "]))),label:null==t?void 0:t.name,help:null==t?void 0:t.help},Object(ie.b)("textarea",{onChange:l,ref:s,rows:"5",disabled:!0},r)))};function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye,me=function(){var e,t=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}},r=Object(o.useSelect)((function(e){var t,r,n=["presto-player","preset"],o=["presto-player","audio-preset"];return{presets:(t=e(a.store)).getEntityRecords.apply(t,n),loadingPresets:e(a.store).isResolving("getEntityRecords",n),audioPresets:(r=e(a.store)).getEntityRecords.apply(r,o),loadingAudioPresets:e(a.store).isResolving("getEntityRecords",o)}}),[]),n=r.presets,l=r.loadingPresets,i=r.audioPresets,p=r.loadingAudioPresets,b=Object(a.useEntityProp)("root","site","presto_player_presets"),y=Object(s.a)(b,2),m=y[0],d=y[1],O=Object(a.useEntityProp)("root","site","presto_player_audio_presets"),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(a.useEntityProp)("root","site","presto_player_analytics"),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(be(be({},g||{}),e))},w=Object(a.useEntityProp)("root","site","presto_player_branding"),P=Object(s.a)(w,2),k=P[0],C=P[1],S=function(e){C(be(be({},k||{}),e))},x=Object(a.useEntityProp)("root","site","presto_player_uninstall"),D=Object(s.a)(x,2),N=D[0],T=D[1];return React.createElement(le,{title:Object(c.__)("General","presto-player"),description:Object(c.__)("Branding, analytics and uninstall data.","presto-player")},React.createElement(ee,{title:Object(c.__)("Branding","presto-player"),description:Object(c.__)("Global player branding options","presto-player")},React.createElement(J,{disabled:t()},React.createElement(ce,{className:"presto-player__setting--logo",label:React.createElement(React.Fragment,null,Object(c.__)("Logo","presto-player")," ",t()&&React.createElement("span",{className:"presto-options__pro-badge"},Object(c.__)("Pro","presto-player"))),onSelect:function(e){return S({logo:null==e?void 0:e.url})},maxWidth:(null==k?void 0:k.logo_width)||150,value:null==k?void 0:k.logo}),React.createElement("div",{style:{maxWidth:"500px"}},React.createElement(u.RangeControl,{className:"presto-player__setting--logo-width",label:Object(c.__)("Logo Max Width","presto-player"),value:(null==k?void 0:k.logo_width)||150,onChange:function(e){return S({logo_width:e})},min:1,max:400}))),React.createElement(u.ColorPicker,{className:"presto-player__setting--brand-color",onChangeComplete:function(e){return S({color:e.hex})},color:null==k?void 0:k.color})),React.createElement(ee,{title:Object(c.__)("Analytics","presto-player"),disabled:t(),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player")},React.createElement("div",null,React.createElement(u.ToggleControl,{className:"presto-player__setting--analytics-enable",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Enable view analytics for your media","presto-player"),checked:null==g?void 0:g.enable,onChange:function(e){return R({enable:e})}}),!(null==g||!g.enable)&&React.createElement(u.ToggleControl,{label:Object(c.__)("Auto-Purge Data (recommended)"),help:Object(c.__)("Automatically purge data older than 90 days.","presto-player"),className:"presto-player__setting--analytics-enable",checked:void 0===(null==g?void 0:g.purge_data)||(null==g?void 0:g.purge_data),onChange:function(e){return R({purge_data:e})}}))),React.createElement(ee,{title:Object(c.__)("Presets","presto-player"),disabled:t(),description:Object(c.__)("Media presets settings.","presto-player")},l?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for video.","presto-player"),value:null==m?void 0:m.default_player_preset,options:(n||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void d(be(be({},m||{}),t));var t}}),p?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for audio.","presto-player"),value:null==f?void 0:f.default_player_preset,options:(i||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void v(be(be({},f||{}),t));var t}})),React.createElement(ee,{disabled:t(),title:Object(c.__)("Custom CSS","presto-player"),description:Object(c.__)("Quickly add custom css to the player web component.","presto-player")},React.createElement(pe,{disabled:!(null!==(e=prestoPlayer)&&void 0!==e&&e.isPremium),option:{id:"player_css"},value:null==k?void 0:k.player_css,key:null==k?void 0:k.player_css,onChange:function(e){return S({player_css:e})}})),React.createElement(ee,{title:Object(c.__)("Uninstall Options","presto-player"),description:Object(c.__)("Options to remove data on uninstall.","presto-player")},React.createElement(u.ToggleControl,{label:Object(c.__)("Remove data on uninstall"),help:Object(c.__)("This removes all data on uninstall.","presto-player"),className:"presto-player__setting--uninstall",checked:null==N?void 0:N.uninstall_data,onChange:function(e){var t;if(e&&!confirm(Object(c.__)("Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!","presto-player")))return;t={uninstall_data:e},T(be(be({},N||{}),t))}})))};function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _e=function(){var e=Object(a.useEntityProp)("root","site","presto_player_performance"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(Oe(Oe({},r||{}),e))};return Object(ie.b)(le,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Player performance preferences.","presto-player")},Object(ie.b)(ee,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Performance options for player loading.","presto-player")},Object(ie.b)("div",null,Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--module-enabled",label:Object(c.__)("Dynamically Load JavaScript","presto-player"),help:Object(c.__)("Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.","presto-player"),checked:null==r?void 0:r.module_enabled,onChange:function(e){return o({module_enabled:e})}}),!(null==r||!r.module_enabled)&&Object(ie.b)(u.Notice,{css:Object(ie.a)(ye||(ye=Object(se.a)(["\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n "]))),className:"presto-notice",status:"info",isDismissible:!1},Object(ie.b)("div",null,Object(ie.b)("strong",null,Object(c.__)("Please Note","presto-player"))),Object(ie.b)("div",null,Object(c.__)("You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.","presto-player")," ",Object(ie.b)(u.ExternalLink,{href:"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting"},Object(c.__)("Learn More","presto-player"))))),Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--automations",label:Object(c.__)("Enable Ajax Requests for Progress Integrations","presto-player"),help:Object(c.__)("Keep this on unless you do not plan on using automation, LMS or membership integrations.","presto-player"),checked:null==r?void 0:r.automations,onChange:function(e){return o({automations:e})}})))};function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_pull_zones"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ve(ve({},r||{}),e))},l=r||{},i=l.public_id,p=l.public_hostname,b=l.private_id,y=l.private_hostname,m=l.private_security_key;return React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Storage (Classic)","presto-player")),React.createElement("p",{style:{fontSize:"12px",color:"#757575"}},Object(c.__)('Note: To Change your API key, please click "Reconnect" from a bunny block.',"presto-player")),React.createElement(u.TextControl,{label:Object(c.__)("Public ID","presto-player"),help:Object(c.__)("The ID of the public pull zone to use.","presto-player"),value:i,onChange:function(e){return o({public_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Host Name","presto-player"),help:Object(c.__)("The hostname to use for this pullzone.","presto-player"),value:p,onChange:function(e){return o({public_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private ID","presto-player"),help:Object(c.__)("The ID of the private pull zone to use.","presto-player"),value:b,onChange:function(e){return o({private_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Host Name","presto-player"),help:Object(c.__)("The hostname to use for the private pullzone.","presto-player"),value:y,onChange:function(e){return o({private_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Url Token Authentication Key","presto-player"),help:Object(c.__)("Update the security token used to sign private urls.","presto-player"),type:"password",value:m,onChange:function(e){return o({private_security_key:e})}}))};function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ee=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ge(ge({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}))};function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pe=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_private"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(we(we({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id,y=l.token_auth_key;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Token Authentication Key","presto-player"),help:Object(c.__)("The token authentication key used to sign private urls.","presto-player"),value:y,onChange:function(e){return o({token_auth_key:e})}}))},ke=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0];t[1];return r?React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Stream","presto-player")),React.createElement(Ee,null),React.createElement(Pe,null)):null},Ce=wp.i18n.__,Se=wp.components,xe=Se.Button,De=Se.Panel,Ne=Se.PanelBody,Te=Se.Flex,Be=Se.FlexBlock,Fe=Se.Notice,Ie=Se.Spinner,Ae=wp.element,Le=Ae.useState,Me=Ae.useEffect,Ue=function(){var e=Le(0),t=Object(s.a)(e,2),r=t[0],n=t[1],a=Le(0),o=Object(s.a)(a,2),c=o[0],i=o[1],u=Le(""),b=Object(s.a)(u,2),y=b[0],m=b[1],d=Le(0),O=Object(s.a)(d,2),_=O[0],f=O[1],v=function(){var e=Object(l.a)(p.a.mark((function e(){var t,a,o,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(""),e.prev=1,e.next=4,wp.apiFetch({path:"/presto-player/v1/email/export",method:"post",data:{step:r}});case 4:t=e.sent,a=t.percentage,o=t.step,c=t.url,n(o),i(a),f(c),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),i(0),m((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Ce("Something went wrong","presto-player"));case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return Me((function(){r&&"done"!=r&&v()}),[r]),Me((function(){_&&window.open(_)}),[_]),React.createElement(De,null,React.createElement(Ne,{title:React.createElement(Te,null,React.createElement(Be,null,Ce("Other","presto-player"))),initialOpen:!1},React.createElement("h2",null,Ce("Manual Export","presto-player")),React.createElement("p",null,Ce("Using a service not listed here? You can export contacts and manually upload them to a service.","presto-player")),y&&React.createElement(Fe,{className:"presto-notice",status:"error",onRemove:function(){return m("")}},y),React.createElement(Te,{align:"center",justify:"flex-start"},React.createElement(xe,{isPrimary:!0,onClick:function(e){n(1),i(1),e.preventDefault()}},Ce("Download CSV File","presto-player")),!!c&&React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Ie,{style:{marginTop:0}}),React.createElement("span",null,"Exporting... ",c,"% Complete")))))},qe=r(12),We=wp.i18n.__,Ye=wp.components,Ge=Ye.Button,ze=Ye.Panel,He=Ye.PanelBody,Ve=Ye.Flex,Ke=Ye.Modal,Je=Ye.FlexBlock,Qe=Ye.FlexItem,Xe=Ye.PanelRow,Ze=wp.element.useState,$e=function(e){var t=e.connected,r=e.title,n=e.children,a=e.onConnect,o=e.isBusy,c=e.connectButtonText,l=e.disconnectButtonText,i=e.onDisconnect,p=Ze(!1),u=Object(s.a)(p,2),b=u[0],y=u[1];return React.createElement(ze,null,React.createElement(He,{title:React.createElement(Ve,null,React.createElement(Je,null,r),React.createElement(Qe,null,t?React.createElement(Ge,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},We("Connected","presto-player")):React.createElement(Ge,{isSmall:!0,isSecondary:!0,style:{marginRight:"30px"}},We("Not Connected","presto-player")))),initialOpen:!1},React.createElement("form",{onSubmit:function(e){e.preventDefault(),a()},disabled:o},n,React.createElement(Xe,null,React.createElement("div",null,t?React.createElement("div",null," ",React.createElement(Ge,{isSecondary:!0,isBusy:o,disabled:o,onClick:function(e){e.preventDefault(),y(!0)}},l||We("Disconnect","presto-player"))):React.createElement(Ge,{isPrimary:!0,isBusy:o,disabled:o,type:"submit"},c||We("Connect","presto-player")))))),b&&React.createElement(Ke,{className:"presto-player__modal-confirm",title:We("Are you sure?","presto-player"),style:{"max-width":"350px"},onRequestClose:function(){return y(!1)}},React.createElement("p",null,We("Are you sure you want to disconnect this integration?","presto-player")),React.createElement(Ge,{className:"presto-player__modal-confirm-button",isDestructive:!0,onClick:function(){i&&i(),y(!1)}},We("Disconnect","presto-player")),React.createElement(Ge,{onClick:function(){return y(!1)}},We("Cancel","presto-player"))))},et=wp.components.TextControl,tt=wp.data.dispatch,rt=function(e){var t=e.option,r=e.value,n=e.optionName,a=e.className;return React.createElement("div",{className:"presto-settings__setting is-text-control"},React.createElement(et,Object.assign({className:D()(a,"presto-settings__setting is-media-control"),label:null==t?void 0:t.name,value:r,type:null==t?void 0:t.type,help:null==t?void 0:t.help,placeholder:null==t?void 0:t.placeholder,onChange:function(e){return tt("presto-player/settings").updateSetting(t.id,e,n)}},e)))},nt=r(32),at=r.n(nt);function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var lt=function(e){var t=e.name;return Object(qe.createHigherOrderComponent)((function(e){return function(r){var o=Object(n.useState)(""),i=Object(s.a)(o,2),u=i[0],b=i[1],y=Object(n.useState)(""),m=Object(s.a)(y,2),d=m[0],O=m[1],_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site",t),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(){var e=Object(l.a)(p.a.mark((function e(t){var r,n,a,o,l,s,i,u;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.path,n=t.data,a=void 0===n?{}:n,o=t.message,l=void 0===o?Object(c.__)("Success","presto-player"):o,s=t.success,i=t.error,b(""),O(""),h(!0),e.prev=4,e.next=7,at()({path:r,method:"post",data:a});case 7:u=e.sent,s&&s(u),O(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),null!==e.t0&&void 0!==e.t0&&e.t0.message&&(b(e.t0.message),i&&i(e.t0));case 15:return e.prev=15,h(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[4,12,15,18]])})));return function(t){return e.apply(this,arguments)}}();return React.createElement(e,Object.assign({success:d,setSuccess:O,setError:b,error:u,isBusy:v,setting:E,updateSetting:function(e){R(ct(ct({},E||{}),e))},makeRequest:w},r))}}),"withIntegration")};function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var it=Object(qe.compose)([lt({name:"presto_player_activecampaign"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},m=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/activecampaign/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:y,error:y});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("ActiveCampaign"),connected:null==i?void 0:i.connected,onConnect:function(){s({path:"/presto-player/v1/activecampaign/connect",data:{api_key:null==i?void 0:i.api_key,url:null==i?void 0:i.url},message:Object(c.__)("Connected","presto-player"),success:y,error:y})},onDisconnect:m,isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{label:Object(c.__)("Your ActiveCampaign Url","presto-player"),type:"url",help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.url,onChange:function(e){return b({url:e})}}),React.createElement(rt,{label:Object(c.__)("Your ActiveCampaign API key","presto-player"),help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.api_key,onChange:function(e){return b({api_key:e})}}))))}));function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ut=Object(qe.compose)([lt({name:"presto_player_fluentcrm"})])((function(e){var t=e.error,r=e.setError,n=e.isBusy,a=e.makeRequest,o=e.setting,s=e.updateSetting,i=function(e){s(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},b=(o||{}).connected,y=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a({path:"/presto-player/v1/fluentcrm/disconnect",message:Object(c.__)("Deactivated","presto-player"),success:i,error:i});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("FluentCRM"),connected:b,onConnect:function(){a({path:"/presto-player/v1/fluentcrm/connect",message:Object(c.__)("Installed and connected","presto-player"),success:i,error:i})},onDisconnect:y,connectButtonText:Object(c.__)("Install FluentCRM Plugin","presto-player"),disconnectButtonText:Object(c.__)("Deactivate FluentCRM Plugin","presto-player"),isBusy:n},t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return r("")}},t)),b&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",isDismissible:!1},Object(c.__)("Installed and connected!","presto-player"))))}));function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var yt=Object(qe.compose)([lt({name:"presto_player_mailchimp"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=i||{},m=y.api_key,d=y.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailchimp/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("Mailchimp"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailchimp/connect",data:{api_key:m},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{className:"presto-player__setting--mailchimp-api_key",label:Object(c.__)("Your Mailchimp API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your mailchimp account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://us11.admin.mailchimp.com/account/api/"},Object(c.__)("Get My API Key","presto-player"))),value:m,onChange:function(e){return b({api_key:e})}}))))}));function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var dt=Object(qe.compose)([lt({name:"presto_player_mailerlite"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=i||{},m=y.api_key,d=y.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailerlite/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("Mailerlite"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailerlite/connect",data:{api_key:m},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{className:"presto-player__setting--mailerlite-api_key",label:Object(c.__)("Your MailerLite API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your MailerLite account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://app.mailerlite.com/integrations/api/"},Object(c.__)("Get My API Key","presto-player"))),value:m,onChange:function(e){return b({api_key:e})}}))))})),Ot=r(22);function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vt=function(e){var t=e.headers,r=e.setHeaders,n=function(e,n){r((t||[]).map((function(t,r){return r!==n?t:ft(ft({},t),e)})))};return React.createElement(React.Fragment,null,(t||[]).map((function(e,a){var o=e.name,l=e.value;return React.createElement(u.Flex,{key:a,align:"center"},React.createElement(u.TextControl,{placeholder:Object(c.__)("Header Name","presto-player"),value:o,onChange:function(e){return n({name:e},a)}}),React.createElement(u.TextControl,{placeholder:Object(c.__)("New Value","presto-player"),value:l,onChange:function(e){return n({value:e},a)}}),React.createElement(u.BaseControl,null,React.createElement(u.ToolbarButton,{icon:"trash",onClick:function(){return function(e){return r((t||[]).filter((function(t,r){return r!==e})))}(a)}})))})),React.createElement("div",null,React.createElement(u.Button,{isSecondary:!0,isSmall:!0,onClick:function(){return e={name:"",value:""},void r([].concat(Object(Ot.a)(t||[]),[e]));var e}},Object(c.__)("Add Header","presto-player"))))};function ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gt=function(e){var t=e.onClose,r=e.webhook,i=Object(o.useDispatch)(a.store).saveEntityRecord,y=Object(o.useDispatch)(b.store),m=y.createSuccessNotice,d=y.createErrorNotice,O=Object(n.useState)(!1),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(n.useState)(r||{email_name:"email",method:"POST"}),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(jt(jt({},g||{}),e))},w=g.name,P=g.url,k=g.method,C=g.email_name,S=g.headers,x=(g.archived,function(){var e=Object(l.a)(p.a.mark((function e(r){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.preventDefault(),v(!0),e.next=5,i("presto-player","webhook",jt({},g));case 5:m(null!=g&&g.id?Object(c.__)("Webhook updated","presto-player"):Object(c.__)("Webhook created.","presto-player"),{type:"snackbar"}),t(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),d((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong.","presto-player"),{type:"snackbar"});case 13:return e.prev=13,v(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})));return function(t){return e.apply(this,arguments)}}());return Object(ie.b)(u.Modal,{title:null!=g&&g.id?Object(c.__)("Edit Webhook","presto-player"):Object(c.__)("Add A Webhook","presto-player"),onRequestClose:t,shouldCloseOnClickOutside:!1},Object(ie.b)("form",{onSubmit:x},Object(ie.b)(u.TextControl,{label:Object(c.__)("Name","presto-player"),placeholder:Object(c.__)("Webhook feed name","presto-player"),value:w,onChange:function(e){return R({name:e})},required:!0,autoFocus:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Request URL","presto-player"),placeholder:Object(c.__)("Webhook URL","presto-player"),type:"url",value:P,onChange:function(e){return R({url:e})},required:!0}),Object(ie.b)(u.SelectControl,{label:Object(c.__)("Request Method","presto-player"),value:k,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"}],onChange:function(e){return R({method:e})},required:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Email Name","presto-player"),placeholder:Object(c.__)("The name (key) of the email sent.","presto-player"),value:C,onChange:function(e){return R({email_name:e})},required:!0}),Object(ie.b)("div",{css:{margin:"0 0 1.5rem"}},Object(ie.b)(u.BaseControl.VisualLabel,null,Object(c.__)("Headers","presto-player")),Object(ie.b)(vt,{headers:S,setHeaders:function(e){return R({headers:e})}})),Object(ie.b)(u.Button,{isPrimary:!0,type:"submit",isBusy:f},null!=g&&g.id?Object(c.__)("Update","presto-player"):Object(c.__)("Create","presto-player"))))},Et=function(e){var t=e.webhook,r=Object(n.useState)(!1),i=Object(s.a)(r,2),y=(i[0],i[1],Object(n.useState)(!1)),m=Object(s.a)(y,2),d=m[0],O=m[1],_=Object(o.useDispatch)(a.store),f=_.deleteEntityRecord,v=(_.saveEntityRecord,Object(o.useDispatch)(b.store)),h=v.createSuccessNotice,j=v.createErrorNotice,g=Object(o.useSelect)((function(e){var r=["presto-player","webhook",null==t?void 0:t.id],n=e(a.store),o=n.getEditedEntityRecord,c=n.isSavingEntityRecord,l=n.isDeletingEntityRecord;return{webhook:o.apply(void 0,r),loading:e(a.store).isResolving("getEditedEntityRecord",r),isSaving:c.apply(void 0,r),isDeleting:l.apply(void 0,r)}}),[]),E=g.webhook,R=g.loading,w=g.isSaving,P=g.isDeleting,k=E||{},C=k.name,S=k.url,x=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,confirm(Object(c.__)("Are you sure you want to delete this webhook?","presto-player"))){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,f("presto-player","webhook",null==E?void 0:E.id,void 0,{throwOnError:!0});case 6:h(Object(c.__)("Webhook deleted.","presto-player"),{type:"snackbar"}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),j((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return R?React.createElement(u.Spinner,null):React.createElement(u.Card,null,React.createElement(u.CardBody,null,React.createElement(u.Flex,{align:"center"},React.createElement(u.FlexBlock,null,React.createElement("strong",null,C||Object(c.__)("Untitled webhook","presto-player")),React.createElement("br",null),S),React.createElement(u.FlexItem,null,React.createElement(u.Flex,{align:"center"},w||P?React.createElement(u.Spinner,null):React.createElement(React.Fragment,null,React.createElement(u.ToolbarButton,{icon:"edit",label:"Edit",onClick:function(){return O(!0)}}),React.createElement(u.ToolbarButton,{icon:"trash",label:Object(c.__)("Delete","presto-player"),onClick:x})))))),d&&React.createElement(gt,{onClose:function(){return O(!1)},webhook:t}))},Rt=function(){var e=Object(n.useState)(!1),t=Object(s.a)(e,2),r=t[0],l=t[1],i=Object(o.useSelect)((function(e){var t,r=["presto-player","webhook"];return{webhooks:(t=e(a.store)).getEntityRecords.apply(t,r),loading:e(a.store).isResolving("getEntityRecords",r)}}),[]),p=i.webhooks,b=i.loading;return React.createElement(u.Panel,null,React.createElement(u.PanelBody,{title:React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,Object(c.__)("Webhooks","presto-player")),!(null==p||!p.length)&&React.createElement(u.Button,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},Object(c.sprintf)(Object(c.__)("%d connected"),null==p?void 0:p.length))),initialOpen:!1},(p||[]).map((function(e){return React.createElement(Et,{webhook:e,key:null==e?void 0:e.id,loading:b})})),React.createElement("br",null),React.createElement(u.Button,{isSecondary:!0,onClick:function(){l(!0)}},Object(c.__)("Create New WebHook","presto-player")),r&&React.createElement(gt,{onClose:function(){return l(!1)}})))};function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var kt=r(43),Ct=function(){var e,t,r,o,l,i,p,b,y,m,d,O,_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site","presto_player_bunny_stream"),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(e){R(Pt(Pt({},E||{}),e))},P=Object(a.useEntityProp)("root","site","presto_player_google_analytics"),k=Object(s.a)(P,2),C=k[0],S=k[1],x=function(e){S(Pt(Pt({},C||{}),e))},D=Object(a.useEntityProp)("root","site","presto_player_youtube"),N=Object(s.a)(D,2),T=N[0],B=N[1],F=function(e){B(Pt(Pt({},T||{}),e))},I=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}};return React.createElement(le,{title:Object(c.__)("Integrations","presto-player"),description:Object(c.__)("Third party integrations and connections.","presto-player")},React.createElement(ee,{title:Object(c.__)("Google Analytics","presto-player"),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player"),disabled:I()},React.createElement(u.ToggleControl,{className:"presto-player__setting--google-analytics",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Send analytics events to your Google Analytics account.","presto-player"),checked:null==C?void 0:C.enable,onChange:function(e){return x({enable:e})}}),React.createElement(u.ToggleControl,{className:"presto-player__setting--use-existing-tag",label:Object(c.__)("Use existing on-page tag?","presto-player"),help:Object(c.__)("Should we use an existing google analytics (v4) tag? If not, we'll output one for you.","presto-player"),checked:null==C?void 0:C.use_existing_tag,onChange:function(e){return x({use_existing_tag:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Measurement ID","presto-player"),help:Object(c.__)("Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.","presto-player"),value:null==C?void 0:C.measurement_id,onChange:function(e){return x({measurement_id:e})}})),React.createElement(ee,{title:Object(c.__)("YouTube","presto-player"),description:Object(c.__)("Settings for YouTube videos.","presto-player")},React.createElement(u.ToggleControl,{className:"presto-player__setting--youtube-nocookie",label:Object(c.__)("Privacy-Enhanced Mode","presto-player"),help:Object(c.__)("Embed YouTube videos without using cookies that track viewing behaviour.","presto-player"),checked:null==T?void 0:T.nocookie,onChange:function(e){return F({nocookie:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Channel ID","presto-player"),help:React.createElement("div",null,Object(c.__)("Enter the ID of your channel to enable Youtube Subscribe button functionality.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://support.google.com/youtube/answer/3250431?hl=en"},Object(c.__)("Find my channel id","presto-player"))),value:null==T?void 0:T.channel_id,onChange:function(e){return F({channel_id:e})}})),(null===(m=prestoPlayer)||void 0===m||!m.isPremium||!!(null!==(d=prestoPlayer)&&void 0!==d&&d.proVersion&&kt(null===(O=prestoPlayer)||void 0===O?void 0:O.proVersion,"0.9.0")>=0))&&React.createElement(ee,{hideSaveButton:!0,title:Object(c.__)("Email Capture","presto-player"),description:Object(c.__)("Integrate Presto Player with an email provider for email capture.","presto-player"),disabled:I()},React.createElement(it,null),React.createElement(ut,null),React.createElement(yt,null),React.createElement(dt,null),(null===(e=prestoPlayer)||void 0===e?void 0:e.proVersion)&&kt(null===(t=prestoPlayer)||void 0===t?void 0:t.proVersion,"1.2.0")>=0&&React.createElement(Rt,null),React.createElement(Ue,null)),null!==(r=window)&&void 0!==r&&null!==(o=r.prestoPlayer)&&void 0!==o&&null!==(l=o.isSetup)&&void 0!==l&&l.bunny?React.createElement(React.Fragment,null,React.createElement(ee,{title:Object(c.__)("Bunny.net Settings","presto-player"),description:Object(c.__)("Modify bunny.net settings.","presto-player")},!(null===(i=window)||void 0===i||null===(p=i.prestoPlayer)||void 0===p||null===(b=p.isSetup)||void 0===b||null===(y=b.bunny)||void 0===y||!y.stream)&&React.createElement(n.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Initial Quality Level","presto-player"),help:Object(c.__)("You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.","presto-player"),placeholder:"480",type:"number",value:null==E?void 0:E.hls_start_level,onChange:function(e){return w({hls_start_level:e})}}),React.createElement("br",null),React.createElement(u.ToggleControl,{label:Object(c.__)("Disable Classic Bunny.net Storage","presto-player"),help:Object(c.__)("This will disable Bunny.net classic storage in your block UI.","presto-player"),checked:null==E?void 0:E.disable_legacy_storage,onChange:function(e){return w({disable_legacy_storage:e})}}),React.createElement("br",null)),React.createElement(u.ToggleControl,{label:Object(c.__)("Edit Bunny.net Settings","presto-player"),help:Object(c.__)("Edit Bunny.net connection settings. Only edit this if you know what you're doing.","presto-player"),checked:v,onChange:h}),!!v&&React.createElement(React.Fragment,null,React.createElement(ke,null),React.createElement(he,null)))):React.createElement(ee,null,React.createElement(CTA,{className:"presto-player__setting--bunny-cta",option:{name:Object(c.__)("Bunny.net Video","presto-player"),help:Object(c.__)("To get started with Bunny.net, add a Bunny.net video to your page.","presto-player"),type:"cta",button:{text:"Learn More",link:"https://prestoplayer.com/secure-video-with-bunny-net",target:"_blank"}}})))};var St=function(){var e,t,r,i,y,m,d,O=Object(o.useDispatch)(b.store),_=O.createSuccessNotice,f=O.createErrorNotice,v=Object(n.useState)(!1),h=Object(s.a)(v,2),j=h[0],g=h[1];window.onhashchange=function(){window.scrollTo(0,0)};var E=W().save,R=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E();case 3:_(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),f((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),w=Object(o.useSelect)((function(e){var t,r,n,o=["root","site"];return(t=e(a.store)).getEntityRecords.apply(t,o),!(null!==(r=e(a.store))&&void 0!==r&&null!==(n=r.hasFinishedResolution)&&void 0!==n&&n.call(r,"getEntityRecords",o))}));return Object(n.useEffect)((function(){w||g(!0)}),[w]),j?React.createElement("div",{className:"presto-settings"},React.createElement(I,{routes:A,defaultRoute:null==A||null===(e=A.general)||void 0===e?void 0:e.path},React.createElement(u.Card,{className:"presto-settings__navigation"},React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,React.createElement("div",{role:"tablist","aria-orientation":"horizontal",className:"components-tab-panel__tabs"},React.createElement(B,{to:null==A||null===(t=A.general)||void 0===t?void 0:t.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-general"},Object(c.__)("General","presto-player")),React.createElement(B,{to:null==A||null===(r=A.integrations)||void 0===r?void 0:r.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-integrations"},Object(c.__)("Integrations","presto-player")),React.createElement(B,{to:null==A||null===(i=A.performance)||void 0===i?void 0:i.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-performance"},Object(c.__)("Performance","presto-player")))),React.createElement(u.FlexItem,null,React.createElement(U,{onSave:R,style:{marginRight:"8px"}},Object(c.__)("Update Settings","presto-player"))))),React.createElement(S,{path:null==A||null===(y=A.general)||void 0===y?void 0:y.path},React.createElement(me,null)),React.createElement(S,{path:null==A||null===(m=A.integrations)||void 0===m?void 0:m.path},React.createElement(Ct,null)),React.createElement(S,{path:null==A||null===(d=A.performance)||void 0===d?void 0:d.path},React.createElement(_e,null))),React.createElement(q,{className:"presto-settings-page-notices"})):React.createElement("div",{className:"presto-settings__loading"},React.createElement(u.Spinner,null))};Object(n.render)(React.createElement(St,null),document.getElementById("presto-settings-page"))},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.wp.element}},[[35,1,2]]]);
19
- //# sourceMappingURL=admin-1aadbb22.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dist/settings/admin-1aadbb22.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///external [\"wp\",\"i18n\"]","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"notices\"]","webpack:///external [\"wp\",\"compose\"]","webpack:///external [\"wp\",\"coreData\"]","webpack:///external [\"wp\",\"apiFetch\"]","webpack:///./src/admin/settings/entities.js","webpack:///./src/router/utils.js","webpack:///./src/router/context.js","webpack:///./src/router/route.js","webpack:///./src/router/link.js","webpack:///./src/router/index.js","webpack:///./src/admin/settings/routes.js","webpack:///./src/admin/settings/components/SaveButton.js","webpack:///./src/admin/settings/components/Notices.js","webpack:///./src/hooks/useSave.js","webpack:///./src/admin/settings/components/Disabled.js","webpack:///./src/admin/settings/components/Group.js","webpack:///./src/admin/settings/components/Media.js","webpack:///./src/admin/settings/components/Page.js","webpack:///./src/admin/settings/components/CodeMirror.js","webpack:///./src/admin/settings/pages/General.js","webpack:///./src/admin/settings/pages/Performance.js","webpack:///./src/admin/settings/pages/parts/BunnyClassic/index.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PublicStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PrivateStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/index.js","webpack:///./src/admin/settings/pages/parts/EmailExport.js","webpack:///./src/admin/settings/components/Integration.js","webpack:///./src/admin/settings/components/TextControl.js","webpack:///./src/admin/settings/pages/parts/integration/withIntegration.js","webpack:///./src/admin/settings/pages/parts/integration/ActiveCampaign.js","webpack:///./src/admin/settings/pages/parts/integration/FluentCRM.js","webpack:///./src/admin/settings/pages/parts/integration/Mailchimp.js","webpack:///./src/admin/settings/pages/parts/integration/MailerLite.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Headers.js","webpack:///./src/admin/settings/pages/parts/Webhooks/NewWebhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Webhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/index.js","webpack:///./src/admin/settings/pages/Integrations.js","webpack:///./src/admin/settings/app.js","webpack:///./src/admin/settings/index.js","webpack:///external [\"wp\",\"data\"]","webpack:///external [\"wp\",\"element\"]"],"names":["module","exports","window","dispatch","coreStore","addEntities","name","kind","label","__","baseURL","baseURLParams","context","locationToRoute","location","path","pathname","hash","query","qs","parse","search","history","createBrowserHistory","RouterContext","wp","element","createContext","route","useContext","prev","Route","onRoute","children","matched","match","checkMatch","substr","cloneElement","Link","props","to","onClick","activeClassName","state","className","classNames","e","preventDefault","push","Router","setState","routes","Object","keys","map","key","unlisten","listen","handleRouteChange","defaultRoute","this","NotFound","forEach","isMatched","data","routerContextValue","is404","Provider","value","Component","general","integrations","performance","SaveButton","onSave","busy","loading","rest","useSelect","select","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","dirtyEntityRecords","filter","r","isDirty","length","isSaving","some","record","disabled","ScSkeleton","style","width","height","display","isPrimary","aria-disabled","isBusy","undefined","notices","noticesStore","getNotices","removeNotice","useDispatch","snackbarNotices","type","onRemove","useSave","saveEditedEntityRecord","save","a","dirtyRecords","pendingSavedRecords","throwOnError","Promise","all","message","i18n","useState","components","Modal","Button","dialog","setDialog","title","onRequestClose","heading","href","link","target","Card","CardBody","CardFooter","description","hideSaveButton","createSuccessNotice","createErrorNotice","console","error","Disabled","size","marginBottom","isShady","BaseControl","MediaUpload","mediaUtils","option","help","allowedTypes","maxWidth","onSelect","VisualLabel","border","src","render","open","isSecondary","id","hidden","sprintf","isTertiary","onChange","handleChange","instance","textRef","current","useRef","useEffect","CodeMirror","fromTextArea","lineNumbers","on","css","ref","rows","prestoPlayer","isPremium","presetArgs","audioPresetArgs","presets","getEntityRecords","loadingPresets","isResolving","audioPresets","loadingAudioPresets","useEntityProp","presetSettings","setPresetSettings","audioPresetSettings","setAudioPresetSettings","analytics","setAnalytics","updateAnalytics","branding","setBranding","updateBranding","uninstall","setUninstall","Page","Group","Media","image","logo","url","logo_width","min","max","onChangeComplete","color","hex","checked","enable","purge_data","default_player_preset","options","preset","player_css","uninstall_data","confirm","setPerformance","updatePerformance","module_enabled","status","isDismissible","automations","classic","setClassic","updateClassic","public_id","public_hostname","private_id","private_hostname","private_security_key","marginTop","fontSize","stream","setStream","updateStream","video_library_api_key","pull_zone_url","video_library_id","token_auth_key","PublicStream","PrivateStream","Panel","PanelBody","Flex","FlexBlock","Notice","Spinner","step","setStep","progress","setProgress","setError","setURL","exportEmails","apiFetch","method","percentage","currentStep","fetchedURL","initialOpen","align","justify","alignItems","FlexItem","PanelRow","connected","onConnect","connectButtonText","disconnectButtonText","onDisconnect","setConfirm","isSmall","marginRight","onSubmit","isDestructive","TextControl","optionName","placeholder","updateSetting","createHigherOrderComponent","WrappedComponent","success","setSuccess","setIsBusy","setting","setSetting","makeRequest","response","compose","withIntegration","setData","Integration","api_key","headers","setHeaders","updateHeader","index","item","i","icon","_","removeHeader","header","onClose","webhook","saveEntityRecord","setBusy","email_name","form","setForm","updateForm","submit","archived","shouldCloseOnClickOutside","required","autoFocus","margin","Headers","incomingWebhook","setOpen","deleteEntityRecord","queryArgs","getEditedEntityRecord","isDeletingEntityRecord","isDeleting","deleteWebhook","NewWebhook","webhooks","Webhook","semverCompare","require","editBunny","setEditBunny","youtube","setYoutube","updateYoutube","use_existing_tag","measurement_id","nocookie","channel_id","proVersion","ActiveCampaign","FluentCRM","Mailchimp","MailerLite","Webhooks","EmailExport","isSetup","bunny","hls_start_level","disable_legacy_storage","BunnyStream","BunnyClassic","CTA","button","text","App","loaded","setLoaded","onhashchange","scrollTo","hasFinishedResolution","role","aria-orientation","General","Integrations","Performance","Notices","document","getElementById"],"mappings":";;;;;;;;;;;;;;;;;iHAAcA,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAc,Y,iBCA1C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C,mBAAiB,aACjBnU,UAAU,8BAEV,oBAACN,EAAD,CACEE,GAAIW,SAAF,UAAEA,EAAQmB,eAAV,aAAE,EAAiBxD,KACrB4F,KAAK,SACLoQ,KAAK,MACLpU,gBAAgB,YAChBE,UAAU,gFAETpC,aAAG,UAAW,kBAEjB,oBAAC8B,EAAD,CACEE,GAAIW,SAAF,UAAEA,EAAQoB,oBAAV,aAAE,EAAsBzD,KAC1B4F,KAAK,SACLoQ,KAAK,MACLpU,gBAAgB,YAChBE,UAAU,qFAETpC,aAAG,eAAgB,kBAEtB,oBAAC8B,EAAD,CACEE,GAAIW,SAAF,UAAEA,EAAQqB,mBAAV,aAAE,EAAqB1D,KACzB4F,KAAK,SACLoQ,KAAK,MACLpU,gBAAgB,YAChBE,UAAU,oFAETpC,aAAG,cAAe,oBAIzB,oBAAC,WAAD,KACE,oBAACiE,EAAD,CAAYC,OAAQ2M,EAAUzL,MAAO,CAAEwL,YAAa,QACjD5Q,aAAG,kBAAmB,qBAM/B,oBAACsB,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQmB,eAAV,aAAE,EAAiBxD,MAC5B,oBAACkW,GAAD,OAEF,oBAAClV,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQoB,oBAAV,aAAE,EAAsBzD,MACjC,oBAACmW,GAAD,OAEF,oBAACnV,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQqB,mBAAV,aAAE,EAAqB1D,MAChC,oBAACoW,GAAD,QAIJ,oBAACC,EAAD,CAASvU,UAAU,kCAjEnB,2BAAKA,UAAU,4BACb,oBAAC,UAAD,QClDR+G,iBAAO,oBAAC,GAAD,MAASyN,SAASC,eAAe,0B,gBCpB1BtX,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAW,U","file":"settings/admin-1aadbb22.js","sourcesContent":["(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"notices\"]; }());","(function() { module.exports = window[\"wp\"][\"compose\"]; }());","(function() { module.exports = window[\"wp\"][\"coreData\"]; }());","(function() { module.exports = window[\"wp\"][\"apiFetch\"]; }());","import { store as coreStore } from \"@wordpress/core-data\";\nimport { dispatch } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\n\ndispatch(coreStore).addEntities([\n {\n name: \"preset\",\n kind: \"presto-player\",\n label: __(\"Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"audio-preset\",\n kind: \"presto-player\",\n label: __(\"Audio Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/audio-preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"webhook\",\n kind: \"presto-player\",\n label: __(\"Webhook\", \"presto-player\"),\n baseURL: \"presto-player/v1/webhook\",\n baseURLParams: { context: \"edit\" },\n },\n]);\n","import qs from \"querystringify\";\nexport function locationToRoute(location) {\n // location comes from the history package\n return {\n path: location.pathname,\n hash: location.hash,\n query: qs.parse(location.search),\n };\n}\n","import { createBrowserHistory } from \"history\";\nimport { locationToRoute } from \"./utils\";\n\nexport const history = createBrowserHistory();\nexport const RouterContext = wp.element.createContext({\n route: locationToRoute(history.location),\n});\n","import { RouterContext } from \"./context\";\nconst { useContext } = wp.element;\nimport { match } from \"path-to-regexp\";\nlet prev = \"\";\n\nexport function Route({ path, onRoute, children }) {\n // Extract route from RouterContext\n const { route } = useContext(RouterContext);\n\n const checkMatch = match(`${path}`);\n const matched = checkMatch(`${route.hash.substr(1)}`);\n\n if (!matched) {\n return null;\n }\n\n if (onRoute) {\n if (prev !== matched.path) {\n onRoute();\n }\n prev = matched.path;\n }\n\n return <div>{wp.element.cloneElement(children, { route: matched })}</div>;\n}\n","const { useContext } = wp.element;\nimport { RouterContext, history } from \"./context\";\nimport classNames from \"classnames\";\nimport { match } from \"path-to-regexp\";\n\nexport function Link(props) {\n const { to, onClick, children, activeClassName } = props;\n const { route } = useContext(RouterContext);\n\n let state = { ...props };\n delete state.activeClassName;\n\n const isActive = () => {\n const checkMatch = match(`${to}`);\n return checkMatch(`${route.hash.substr(1)}`);\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n // Dont' navigate if current path\n if (route.path === to) {\n return;\n }\n // Trigger onClick prop manually\n if (onClick) {\n onClick(e);\n }\n const { search } = history.location;\n\n // Use history API to navigate page\n history.push(`${search}#${to}`);\n };\n\n return (\n <a\n {...state}\n className={classNames({ [activeClassName]: isActive() }, props.className)}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n}\n","import { Component } from \"@wordpress/element\";\nimport { locationToRoute } from \"./utils\";\nimport { history, RouterContext } from \"./context\";\nimport { Route } from \"./route\";\nimport { Link } from \"./link\";\nimport { match } from \"path-to-regexp\";\n\nclass Router extends Component {\n constructor(props) {\n super(props);\n\n // Convert our routes into an array for easy 404 checking\n this.routes = Object.keys(props.routes).map(\n (key) => props.routes[key].path\n );\n\n // Listen for path changes from the history API\n this.unlisten = history.listen(this.handleRouteChange);\n\n const route = locationToRoute(history.location);\n const { search } = history.location;\n\n // Define the initial RouterContext value\n this.state = {\n route,\n defaultRoute: props?.defaultRoute\n ? `${search}#${props?.defaultRoute}`\n : `${search}#/`,\n };\n }\n\n componentWillUnmount() {\n // Stop listening for changes if the Router component unmounts\n this.unlisten();\n }\n\n handleRouteChange = (location) => {\n const route = locationToRoute(location?.location);\n this.setState({ route: route });\n };\n\n render() {\n // Define our variables\n const { children, NotFound } = this.props;\n const { route, defaultRoute } = this.state;\n\n if (!route.hash) {\n history.push(defaultRoute);\n return <div></div>;\n }\n\n let matched = false;\n // match route\n (this.routes || []).forEach((name) => {\n const checkMatch = match(route.hash.substr(1));\n const isMatched = checkMatch(`${route.hash.substr(1)}`);\n if (!isMatched) {\n return;\n }\n matched = {\n name,\n data: isMatched,\n };\n });\n\n const routerContextValue = { route, matched };\n\n // Check if 404 if no route matched\n const is404 = !matched;\n\n return (\n <RouterContext.Provider value={routerContextValue}>\n {is404 ? <div>Not found</div> : children}\n </RouterContext.Provider>\n );\n }\n}\nexport { history, RouterContext, Router, Route, Link };\n","export const routes = {\n general: {\n path: \"general\",\n },\n integrations: {\n path: \"/integrations\",\n },\n performance: {\n path: \"/performance\",\n },\n};\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { Button } from \"@wordpress/components\";\n\nexport default function SaveButton({\n onSave,\n children,\n busy,\n loading,\n ...rest\n}) {\n const { isDirty, isSaving } = useSelect((select) => {\n const {\n __experimentalGetDirtyEntityRecords,\n isSavingEntityRecord,\n } = select(coreStore);\n\n const dirtyEntityRecords = (\n __experimentalGetDirtyEntityRecords() || []\n ).filter((r) => r.name !== \"webhook\");\n\n return {\n isDirty: dirtyEntityRecords.length > 0,\n isSaving: dirtyEntityRecords.some((record) =>\n isSavingEntityRecord(record.kind, record.name, record.key)\n ),\n };\n }, []);\n\n const disabled = !isDirty || isSaving;\n\n if (loading) {\n return (\n <ScSkeleton\n style={{\n width: \"120px\",\n height: \"35px\",\n display: \"inline-block\",\n }}\n ></ScSkeleton>\n );\n }\n\n return (\n <Button\n isPrimary\n aria-disabled={disabled}\n disabled={disabled || isSaving || busy}\n isBusy={isSaving || busy}\n onClick={disabled ? undefined : onSave}\n {...rest}\n >\n {children}\n </Button>\n );\n}\n","import { SnackbarList } from \"@wordpress/components\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\n\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nexport default ({ className }) => {\n const notices = useSelect((select) => select(noticesStore).getNotices());\n const { removeNotice } = useDispatch(noticesStore);\n const snackbarNotices = notices.filter(({ type }) => type === \"snackbar\");\n\n return (\n <SnackbarList\n notices={snackbarNotices}\n className={className}\n onRemove={removeNotice}\n />\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { select, useDispatch } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\n\nexport default function useSave() {\n const { saveEditedEntityRecord } = useDispatch(coreStore);\n\n /**\n * Handle the form submission\n */\n const save = async () => {\n // build up pending records to save.\n const dirtyRecords = select(\n coreStore\n ).__experimentalGetDirtyEntityRecords();\n const pendingSavedRecords = [];\n\n dirtyRecords.forEach(({ kind, name, key }) => {\n pendingSavedRecords.push(\n saveEditedEntityRecord(kind, name, key, {\n throwOnError: true,\n })\n );\n });\n\n // check values.\n const values = await Promise.all(pendingSavedRecords);\n if (values.some((value) => typeof value === \"undefined\")) {\n throw { message: \"Saving failed.\" };\n }\n\n return true;\n };\n\n return {\n save,\n };\n}\n","const { __ } = wp.i18n;\nconst { useState } = wp.element;\nconst { Modal, Button } = wp.components;\n\nexport default ({ children, disabled }) => {\n const [dialog, setDialog] = useState(false);\n\n if (!disabled) {\n return <div>{children}</div>;\n }\n\n return (\n <div>\n <div\n className=\"presto-options__disabled-overlay\"\n onClick={(e) => {\n setDialog(true);\n e.preventDefault();\n return false;\n }}\n >\n <div>{children}</div>\n </div>\n {!!dialog && (\n <Modal title={disabled?.title} onRequestClose={() => setDialog(false)}>\n <h2>{disabled?.heading}</h2>\n <p>{disabled?.message}</p>\n <Button href={disabled?.link} target=\"_blank\" isPrimary>\n {__(\"Learn More\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nconst { Card, CardBody, CardFooter } = wp.components;\nimport SaveButton from \"./SaveButton\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport Disabled from \"./Disabled\";\nimport useSave from \"../../../hooks/useSave\";\n\nexport default ({ title, description, children, disabled, hideSaveButton }) => {\n const { save } = useSave();\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n /**\n * Form is submitted.\n */\n const onSave = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\")\n );\n }\n };\n\n return (\n <Disabled disabled={disabled}>\n <Card size=\"large\" className=\"presto-options__card\">\n <CardBody className={`presto-options__card-body`}>\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"2em\" }}>\n <div\n className=\"presto-flow\"\n style={{ \"--presto-flow-space\": \"1em\" }}\n >\n {title && (\n <h2 style={{ marginBottom: 0 }}>\n {title}{\" \"}\n {!!disabled && (\n <div className=\"presto-options__pro-badge\">Pro</div>\n )}\n </h2>\n )}\n {description && <p>{description}</p>}\n </div>\n <div>{children}</div>\n </div>\n </CardBody>\n {!hideSaveButton ? (\n <CardFooter isShady>\n <div>\n <SaveButton onSave={onSave}>{__(\"Update Settings\")}</SaveButton>\n </div>\n </CardFooter>\n ) : (\n <br />\n )}\n </Card>\n </Disabled>\n );\n};\n","const { __ } = wp.i18n;\n\nconst { Button, BaseControl } = wp.components;\nconst { MediaUpload } = wp.mediaUtils;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default ({\n option,\n label,\n help,\n allowedTypes,\n value,\n className,\n maxWidth,\n onSelect,\n}) => {\n return (\n <div\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n >\n <BaseControl className=\"editor-video-poster-control\">\n <BaseControl.VisualLabel>{label}</BaseControl.VisualLabel>\n {value && (\n <BaseControl>\n <img\n style={{\n maxWidth,\n border: \"1px solid #dcdcdc\",\n }}\n src={value}\n />\n </BaseControl>\n )}\n <br />\n <MediaUpload\n title={help}\n onSelect={onSelect}\n allowedTypes={allowedTypes}\n render={({ open }) => (\n <Button\n isSecondary\n onClick={open}\n className={!value ? \"button-select\" : \"button-replace\"}\n >\n {!value\n ? __(\"Select\", \"presto-player\")\n : __(\"Replace\", \"presto-player\")}\n </Button>\n )}\n />{\" \"}\n <p id={`video-block__logo-image-description-${option?.id}`} hidden>\n {value\n ? sprintf(\n /* translators: %s: poster image URL. */\n __(\"The current logo image url is %s\", \"presto-player\"),\n value\n )\n : __(\"There is no logo image currently selected\", \"presto-player\")}\n </p>\n {!!value && (\n <Button onClick={() => onSelect(\"\")} isTertiary>\n {__(\"Remove\", \"presto-player\")}\n </Button>\n )}\n </BaseControl>\n <br />\n </div>\n );\n};\n","export default ({ children, title, description }) => {\n return (\n <div className=\"presto-flow presto-settings__page\">\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"1em\" }}>\n {title && <h1>{title}</h1>}\n {description && <p>{description}</p>}\n </div>\n\n <div className=\"presto-settings__body \">\n <div className=\"presto-flow\">{children}</div>\n </div>\n </div>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\nimport { BaseControl } from \"@wordpress/components\";\nimport { useEffect, useRef } from \"@wordpress/element\";\nimport classNames from \"classnames\";\n\nexport default ({ option, value, className, disabled, onChange }) => {\n let codeMirror;\n\n const handleChange = (instance) => {\n if (disabled) {\n return;\n }\n instance.save();\n onChange(textRef.current.value);\n };\n\n const textRef = useRef();\n useEffect(() => {\n if (!wp?.CodeMirror) {\n return;\n }\n codeMirror = wp.CodeMirror.fromTextArea(textRef.current, {\n type: \"text/css\",\n lineNumbers: true,\n });\n\n codeMirror.on(\"change\", handleChange);\n }, []);\n\n return (\n <div className={classNames(className, \"presto-settings__setting\")}>\n <BaseControl\n css={css`\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n `}\n label={option?.name}\n help={option?.help}\n >\n <textarea onChange={handleChange} ref={textRef} rows=\"5\" disabled>\n {value}\n </textarea>\n </BaseControl>\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp, store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport {\n ColorPicker,\n ComboboxControl,\n ToggleControl,\n RangeControl,\n Spinner,\n} from \"@wordpress/components\";\nimport Disabled from \"../components/Disabled\";\nimport Group from \"../components/Group\";\nimport Media from \"../components/Media\";\nimport Page from \"../components/Page\";\nimport CodeMirror from \"../components/CodeMirror\";\n\nexport default () => {\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const {\n presets,\n loadingPresets,\n audioPresets,\n loadingAudioPresets,\n } = useSelect((select) => {\n const presetArgs = [\"presto-player\", \"preset\"];\n const audioPresetArgs = [\"presto-player\", \"audio-preset\"];\n return {\n presets: select(coreStore).getEntityRecords(...presetArgs),\n loadingPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n presetArgs\n ),\n audioPresets: select(coreStore).getEntityRecords(...audioPresetArgs),\n loadingAudioPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n audioPresetArgs\n ),\n };\n }, []);\n\n const [presetSettings, setPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_presets\"\n );\n const updatePresetSettings = (data) => {\n setPresetSettings({\n ...(presetSettings || {}),\n ...data,\n });\n };\n\n const [audioPresetSettings, setAudioPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_audio_presets\"\n );\n const updateAudioPresetSettings = (data) => {\n setAudioPresetSettings({\n ...(audioPresetSettings || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [branding, setBranding] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_branding\"\n );\n const updateBranding = (data) => {\n setBranding({\n ...(branding || {}),\n ...data,\n });\n };\n\n const [uninstall, setUninstall] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_uninstall\"\n );\n const updateUninstall = (data) => {\n setUninstall({\n ...(uninstall || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"General\", \"presto-player\")}\n description={__(\n \"Branding, analytics and uninstall data.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Branding\", \"presto-player\")}\n description={__(\"Global player branding options\", \"presto-player\")}\n >\n <Disabled disabled={disabled()}>\n <Media\n className={\"presto-player__setting--logo\"}\n label={\n <>\n {__(\"Logo\", \"presto-player\")}{\" \"}\n {disabled() && (\n <span className=\"presto-options__pro-badge\">\n {__(\"Pro\", \"presto-player\")}\n </span>\n )}\n </>\n }\n onSelect={(image) => updateBranding({ logo: image?.url })}\n maxWidth={branding?.logo_width || 150}\n value={branding?.logo}\n />\n\n <div style={{ maxWidth: \"500px\" }}>\n <RangeControl\n className={\"presto-player__setting--logo-width\"}\n label={__(\"Logo Max Width\", \"presto-player\")}\n value={branding?.logo_width || 150}\n onChange={(logo_width) => updateBranding({ logo_width })}\n min={1}\n max={400}\n />\n </div>\n </Disabled>\n <ColorPicker\n className={\"presto-player__setting--brand-color\"}\n onChangeComplete={(value) => updateBranding({ color: value.hex })}\n color={branding?.color}\n />\n </Group>\n <Group\n title={__(\"Analytics\", \"presto-player\")}\n disabled={disabled()}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--analytics-enable\"}\n label={__(\"Enable\", \"presto-player\")}\n help={__(\"Enable view analytics for your media\", \"presto-player\")}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n {!!analytics?.enable && (\n <ToggleControl\n label={__(\"Auto-Purge Data (recommended)\")}\n help={__(\n \"Automatically purge data older than 90 days.\",\n \"presto-player\"\n )}\n className={\"presto-player__setting--analytics-enable\"}\n checked={\n analytics?.purge_data !== undefined\n ? analytics?.purge_data\n : true\n }\n onChange={(purge_data) => updateAnalytics({ purge_data })}\n />\n )}\n </div>\n </Group>\n <Group\n title={__(\"Presets\", \"presto-player\")}\n disabled={disabled()}\n description={__(\"Media presets settings.\", \"presto-player\")}\n >\n {!!loadingPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for video.\", \"presto-player\")}\n value={presetSettings?.default_player_preset}\n options={(presets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updatePresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n\n {!!loadingAudioPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for audio.\", \"presto-player\")}\n value={audioPresetSettings?.default_player_preset}\n options={(audioPresets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updateAudioPresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n </Group>\n <Group\n disabled={disabled()}\n title={__(\"Custom CSS\", \"presto-player\")}\n description={__(\n \"Quickly add custom css to the player web component.\",\n \"presto-player\"\n )}\n >\n <CodeMirror\n disabled={!prestoPlayer?.isPremium}\n option={{ id: \"player_css\" }}\n value={branding?.player_css}\n key={branding?.player_css}\n onChange={(player_css) => updateBranding({ player_css })}\n />\n </Group>\n <Group\n title={__(\"Uninstall Options\", \"presto-player\")}\n description={__(\n \"Options to remove data on uninstall.\",\n \"presto-player\"\n )}\n >\n <ToggleControl\n label={__(\"Remove data on uninstall\")}\n help={__(\"This removes all data on uninstall.\", \"presto-player\")}\n className=\"presto-player__setting--uninstall\"\n checked={uninstall?.uninstall_data}\n onChange={(uninstall_data) => {\n if (uninstall_data) {\n const r = confirm(\n __(\n \"Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!\",\n \"presto-player\"\n )\n );\n if (!r) return;\n }\n updateUninstall({ uninstall_data });\n }}\n />\n </Group>\n </Page>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\n\nimport { __ } from \"@wordpress/i18n\";\nimport { Notice, ExternalLink, ToggleControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\n\nexport default () => {\n const [performance, setPerformance] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_performance\"\n );\n const updatePerformance = (data) => {\n setPerformance({\n ...(performance || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"Performance\", \"presto-player\")}\n description={__(\"Player performance preferences.\", \"presto-player\")}\n >\n <Group\n title={__(\"Performance\", \"presto-player\")}\n description={__(\n \"Performance options for player loading.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--module-enabled\"}\n label={__(\"Dynamically Load JavaScript\", \"presto-player\")}\n help={__(\n \"Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.\",\n \"presto-player\"\n )}\n checked={performance?.module_enabled}\n onChange={(module_enabled) => updatePerformance({ module_enabled })}\n />\n\n {!!performance?.module_enabled && (\n <Notice\n css={css`\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n `}\n className=\"presto-notice\"\n status=\"info\"\n isDismissible={false}\n >\n <div>\n <strong>{__(\"Please Note\", \"presto-player\")}</strong>\n </div>\n <div>\n {__(\n \"You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting\">\n {__(\"Learn More\", \"presto-player\")}\n </ExternalLink>\n </div>\n </Notice>\n )}\n </div>\n\n <ToggleControl\n className={\"presto-player__setting--automations\"}\n label={__(\n \"Enable Ajax Requests for Progress Integrations\",\n \"presto-player\"\n )}\n help={__(\n \"Keep this on unless you do not plan on using automation, LMS or membership integrations.\",\n \"presto-player\"\n )}\n checked={performance?.automations}\n onChange={(automations) => updatePerformance({ automations })}\n />\n </Group>\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [classic, setClassic] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_pull_zones\"\n );\n const updateClassic = (data) => {\n setClassic({\n ...(classic || {}),\n ...data,\n });\n };\n\n const {\n public_id,\n public_hostname,\n private_id,\n private_hostname,\n private_security_key,\n } = classic || {};\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Storage (Classic)\", \"presto-player\")}\n </h2>\n <p style={{ fontSize: \"12px\", color: \"#757575\" }}>\n {__(\n 'Note: To Change your API key, please click \"Reconnect\" from a bunny block.',\n \"presto-player\"\n )}\n </p>\n\n <TextControl\n label={__(\"Public ID\", \"presto-player\")}\n help={__(\"The ID of the public pull zone to use.\", \"presto-player\")}\n value={public_id}\n onChange={(public_id) => updateClassic({ public_id })}\n />\n\n <TextControl\n label={__(\"Public Host Name\", \"presto-player\")}\n help={__(\"The hostname to use for this pullzone.\", \"presto-player\")}\n value={public_hostname}\n onChange={(public_hostname) => updateClassic({ public_hostname })}\n />\n\n <TextControl\n label={__(\"Private ID\", \"presto-player\")}\n help={__(\"The ID of the private pull zone to use.\", \"presto-player\")}\n value={private_id}\n onChange={(private_id) => updateClassic({ private_id })}\n />\n\n <TextControl\n label={__(\"Private Host Name\", \"presto-player\")}\n help={__(\n \"The hostname to use for the private pullzone.\",\n \"presto-player\"\n )}\n value={private_hostname}\n onChange={(private_hostname) => updateClassic({ private_hostname })}\n />\n\n <TextControl\n label={__(\"Private Url Token Authentication Key\", \"presto-player\")}\n help={__(\n \"Update the security token used to sign private urls.\",\n \"presto-player\"\n )}\n type=\"password\"\n value={private_security_key}\n onChange={(private_security_key) =>\n updateClassic({ private_security_key })\n }\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const { video_library_api_key, pull_zone_url, video_library_id } =\n stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Public Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Public Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Public Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_private\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const {\n video_library_api_key,\n pull_zone_url,\n video_library_id,\n token_auth_key,\n } = stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Private Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Private Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Private Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n\n <TextControl\n label={__(\"Private Stream Token Authentication Key\", \"presto-player\")}\n help={__(\n \"The token authentication key used to sign private urls.\",\n \"presto-player\"\n )}\n value={token_auth_key}\n onChange={(token_auth_key) => updateStream({ token_auth_key })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport PublicStream from \"./PublicStream\";\nimport PrivateStream from \"./PrivateStream\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n\n if (!stream) return null;\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Stream\", \"presto-player\")}\n </h2>\n <PublicStream />\n <PrivateStream />\n </>\n );\n};\n","const { __ } = wp.i18n;\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n FlexBlock,\n Notice,\n Spinner,\n} = wp.components;\nconst { useState, useEffect } = wp.element;\n\nexport default () => {\n const [step, setStep] = useState(0);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState(\"\");\n const [url, setURL] = useState(0);\n\n const exportEmails = async () => {\n setError(\"\");\n try {\n const {\n percentage,\n step: currentStep,\n url: fetchedURL,\n } = await wp.apiFetch({\n path: \"/presto-player/v1/email/export\",\n method: \"post\",\n data: {\n step,\n },\n });\n\n setStep(currentStep);\n setProgress(percentage);\n setURL(fetchedURL);\n } catch (e) {\n setProgress(0);\n setError(e?.message || __(\"Something went wrong\", \"presto-player\"));\n }\n };\n\n useEffect(() => {\n if (step && step != \"done\") {\n exportEmails();\n }\n }, [step]);\n\n useEffect(() => {\n if (url) {\n window.open(url);\n }\n }, [url]);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Other\", \"presto-player\")}</FlexBlock>\n </Flex>\n }\n initialOpen={false}\n >\n <h2>{__(\"Manual Export\", \"presto-player\")}</h2>\n <p>\n {__(\n \"Using a service not listed here? You can export contacts and manually upload them to a service.\",\n \"presto-player\"\n )}\n </p>\n {error && (\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n )}\n <Flex align=\"center\" justify=\"flex-start\">\n <Button\n isPrimary\n onClick={(e) => {\n setStep(1);\n setProgress(1);\n e.preventDefault();\n }}\n >\n {__(\"Download CSV File\", \"presto-player\")}\n </Button>\n {!!progress && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Spinner style={{ marginTop: 0 }} />\n <span>Exporting... {progress}% Complete</span>\n </div>\n )}\n </Flex>\n </PanelBody>\n </Panel>\n );\n};\n","const { __ } = wp.i18n;\n\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n Modal,\n FlexBlock,\n FlexItem,\n PanelRow,\n} = wp.components;\n\nconst { useState } = wp.element;\n\nexport default ({\n connected,\n title,\n children,\n onConnect,\n isBusy,\n connectButtonText,\n disconnectButtonText,\n onDisconnect,\n}) => {\n const [confirm, setConfirm] = useState(false);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{title}</FlexBlock>\n <FlexItem>\n {connected ? (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {__(\"Connected\", \"presto-player\")}\n </Button>\n ) : (\n <Button isSmall isSecondary style={{ marginRight: \"30px\" }}>\n {__(\"Not Connected\", \"presto-player\")}\n </Button>\n )}\n </FlexItem>\n </Flex>\n }\n initialOpen={false}\n >\n <form\n onSubmit={(e) => {\n e.preventDefault();\n onConnect();\n }}\n disabled={isBusy}\n >\n {children}\n <PanelRow>\n <div>\n {!connected ? (\n <Button\n isPrimary\n isBusy={isBusy}\n disabled={isBusy}\n type=\"submit\"\n >\n {connectButtonText\n ? connectButtonText\n : __(\"Connect\", \"presto-player\")}\n </Button>\n ) : (\n <div>\n {\" \"}\n <Button\n isSecondary\n isBusy={isBusy}\n disabled={isBusy}\n onClick={(e) => {\n e.preventDefault();\n setConfirm(true);\n }}\n >\n {disconnectButtonText\n ? disconnectButtonText\n : __(\"Disconnect\", \"presto-player\")}\n </Button>\n </div>\n )}\n </div>\n </PanelRow>\n </form>\n </PanelBody>\n\n {confirm && (\n <Modal\n className=\"presto-player__modal-confirm\"\n title={__(\"Are you sure?\", \"presto-player\")}\n style={{ \"max-width\": \"350px\" }}\n onRequestClose={() => setConfirm(false)}\n >\n <p>\n {__(\n \"Are you sure you want to disconnect this integration?\",\n \"presto-player\"\n )}\n </p>\n <Button\n className=\"presto-player__modal-confirm-button\"\n isDestructive\n onClick={() => {\n onDisconnect && onDisconnect();\n setConfirm(false);\n }}\n >\n {__(\"Disconnect\", \"presto-player\")}\n </Button>\n <Button onClick={() => setConfirm(false)}>\n {__(\"Cancel\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </Panel>\n );\n};\n","const { TextControl } = wp.components;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default (props) => {\n const { option, value, optionName, className } = props;\n return (\n <div className=\"presto-settings__setting is-text-control\">\n <TextControl\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n label={option?.name}\n value={value}\n type={option?.type}\n help={option?.help}\n placeholder={option?.placeholder}\n onChange={(value) =>\n dispatch(\"presto-player/settings\").updateSetting(\n option.id,\n value,\n optionName\n )\n }\n {...props}\n />\n </div>\n );\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from \"@wordpress/i18n\";\nimport { useState } from \"@wordpress/element\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\n/**\n * Higher order component factory\n *\n * @return {Function} The higher order component.\n */\nexport default ({ name }) =>\n createHigherOrderComponent(\n (WrappedComponent) => (props) => {\n const [error, setError] = useState(\"\");\n const [success, setSuccess] = useState(\"\");\n const [isBusy, setIsBusy] = useState(false);\n\n const [setting, setSetting] = useEntityProp(\"root\", \"site\", name);\n const updateSetting = (data) => {\n setSetting({\n ...(setting || {}),\n ...data,\n });\n };\n\n const makeRequest = async ({\n path,\n data = {},\n message = __(\"Success\", \"presto-player\"),\n success,\n error,\n }) => {\n setError(\"\");\n setSuccess(\"\");\n setIsBusy(true);\n\n try {\n let response = await apiFetch({\n path,\n method: \"post\",\n data,\n });\n success && success(response);\n setSuccess(message);\n } catch (e) {\n if (e?.message) {\n setError(e.message);\n error && error(e);\n }\n } finally {\n setIsBusy(false);\n }\n };\n\n return (\n <WrappedComponent\n success={success}\n setSuccess={setSuccess}\n setError={setError}\n error={error}\n isBusy={isBusy}\n setting={setting}\n updateSetting={updateSetting}\n makeRequest={makeRequest}\n {...props}\n />\n );\n },\n \"withIntegration\"\n );\n","import { __ } from \"@wordpress/i18n\";\nimport { BaseControl, PanelRow, Notice } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([\n withIntegration({ name: \"presto_player_activecampaign\" }),\n])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/connect\",\n data: { api_key: setting?.api_key, url: setting?.url },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"ActiveCampaign\")}\n connected={setting?.connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n label={__(\"Your ActiveCampaign Url\", \"presto-player\")}\n type=\"url\"\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.url}\n onChange={(url) => updateSetting({ url })}\n />\n <TextControl\n label={__(\"Your ActiveCampaign API key\", \"presto-player\")}\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import { Notice, PanelRow } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_fluentcrm\" })])(\n ({ error, setError, isBusy, makeRequest, setting, updateSetting }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const { connected } = setting || {};\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/connect\",\n message: __(\"Installed and connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/disconnect\",\n message: __(\"Deactivated\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"FluentCRM\")}\n connected={connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n connectButtonText={__(\"Install FluentCRM Plugin\", \"presto-player\")}\n disconnectButtonText={__(\n \"Deactivate FluentCRM Plugin\",\n \"presto-player\"\n )}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {connected && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n isDismissible={false}\n >\n {__(\"Installed and connected!\", \"presto-player\")}\n </Notice>\n </PanelRow>\n )}\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailchimp\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n return (\n <Integration\n title={__(\"Mailchimp\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailchimp-api_key\"\n label={__(\"Your Mailchimp API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your mailchimp account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://us11.admin.mailchimp.com/account/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailerlite\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"Mailerlite\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailerlite-api_key\"\n label={__(\"Your MailerLite API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your MailerLite account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://app.mailerlite.com/integrations/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n Button,\n Flex,\n TextControl,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { __ } from \"@wordpress/i18n\";\n\nexport default ({ headers, setHeaders }) => {\n const updateHeaders = (data) => {\n setHeaders([...(headers || []), ...data]);\n };\n\n const addHeader = (header) => {\n setHeaders([...(headers || []), ...[header]]);\n };\n const updateHeader = (data, index) => {\n setHeaders(\n (headers || []).map((item, i) => {\n if (i !== index) {\n // This isn't the item we care about - keep it as-is\n return item;\n }\n\n // Otherwise, this is the one we want - return an updated value\n return {\n ...item,\n ...data,\n };\n })\n );\n };\n\n const removeHeader = (index) =>\n setHeaders((headers || []).filter((_, i) => i !== index));\n\n return (\n <>\n {(headers || []).map(({ name, value }, index) => {\n return (\n <Flex key={index} align=\"center\">\n <TextControl\n placeholder={__(\"Header Name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateHeader({ name }, index)}\n />\n <TextControl\n placeholder={__(\"New Value\", \"presto-player\")}\n value={value}\n onChange={(value) => updateHeader({ value }, index)}\n />\n <BaseControl>\n <ToolbarButton icon=\"trash\" onClick={() => removeHeader(index)} />\n </BaseControl>\n </Flex>\n );\n })}\n\n <div>\n <Button\n isSecondary\n isSmall\n onClick={() => addHeader({ name: \"\", value: \"\" })}\n >\n {__(\"Add Header\", \"presto-player\")}\n </Button>\n </div>\n </>\n );\n};\n","import { css, jsx } from \"@emotion/core\";\n/** @jsx jsx */\nimport {\n BaseControl,\n Button,\n Card,\n CardBody,\n Flex,\n Modal,\n SelectControl,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport Headers from \"./Headers\";\n\nexport default ({ onClose, webhook }) => {\n const { saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [busy, setBusy] = useState(false);\n\n const sectionCSS = { margin: \"0 0 1.5rem\" };\n\n const [form, setForm] = useState(\n webhook || {\n email_name: \"email\",\n method: \"POST\",\n }\n );\n\n const updateForm = (data) => {\n setForm({\n ...(form || {}),\n ...data,\n });\n };\n\n const { name, url, method, email_name, headers, archived } = form;\n\n const submit = async (e) => {\n try {\n e.preventDefault();\n setBusy(true);\n await saveEntityRecord(\"presto-player\", \"webhook\", {\n ...form,\n });\n createSuccessNotice(\n form?.id\n ? __(\"Webhook updated\", \"presto-player\")\n : __(\"Webhook created.\", \"presto-player\"),\n {\n type: \"snackbar\",\n }\n );\n onClose();\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong.\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Modal\n title={\n form?.id\n ? __(\"Edit Webhook\", \"presto-player\")\n : __(\"Add A Webhook\", \"presto-player\")\n }\n onRequestClose={onClose}\n shouldCloseOnClickOutside={false}\n >\n <form onSubmit={submit}>\n <TextControl\n label={__(\"Name\", \"presto-player\")}\n placeholder={__(\"Webhook feed name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateForm({ name })}\n required\n autoFocus\n />\n\n <TextControl\n label={__(\"Request URL\", \"presto-player\")}\n placeholder={__(\"Webhook URL\", \"presto-player\")}\n type=\"url\"\n value={url}\n onChange={(url) => updateForm({ url })}\n required\n />\n\n <SelectControl\n label={__(\"Request Method\", \"presto-player\")}\n value={method}\n options={[\n { label: \"GET\", value: \"GET\" },\n { label: \"POST\", value: \"POST\" },\n { label: \"PUT\", value: \"PUT\" },\n ]}\n onChange={(method) => updateForm({ method })}\n required\n />\n\n <TextControl\n label={__(\"Email Name\", \"presto-player\")}\n placeholder={__(\"The name (key) of the email sent.\", \"presto-player\")}\n value={email_name}\n onChange={(email_name) => updateForm({ email_name })}\n required\n />\n\n <div css={sectionCSS}>\n <BaseControl.VisualLabel>\n {__(\"Headers\", \"presto-player\")}\n </BaseControl.VisualLabel>\n <Headers\n headers={headers}\n setHeaders={(headers) => updateForm({ headers })}\n />\n </div>\n\n <Button isPrimary type=\"submit\" isBusy={busy}>\n {form?.id\n ? __(\"Update\", \"presto-player\")\n : __(\"Create\", \"presto-player\")}\n </Button>\n </form>\n </Modal>\n );\n};\n","import {\n Card,\n CardBody,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { select, useDispatch, useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport NewWebhook from \"./NewWebhook\";\n\nexport default ({ webhook: incomingWebhook }) => {\n const [busy, setBusy] = useState(false);\n const [open, setOpen] = useState(false);\n const { deleteEntityRecord, saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n const { webhook, loading, isSaving, isDeleting } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\", incomingWebhook?.id];\n const {\n getEditedEntityRecord,\n isSavingEntityRecord,\n isDeletingEntityRecord,\n } = select(coreStore);\n return {\n webhook: getEditedEntityRecord(...queryArgs),\n loading: select(coreStore).isResolving(\n \"getEditedEntityRecord\",\n queryArgs\n ),\n isSaving: isSavingEntityRecord(...queryArgs),\n isDeleting: isDeletingEntityRecord(...queryArgs),\n };\n }, []);\n\n const { name, url } = webhook || {};\n\n const deleteWebhook = async () => {\n try {\n const r = confirm(\n __(\"Are you sure you want to delete this webhook?\", \"presto-player\")\n );\n if (!r) return;\n await deleteEntityRecord(\n \"presto-player\",\n \"webhook\",\n webhook?.id,\n undefined,\n { throwOnError: true }\n );\n createSuccessNotice(__(\"Webhook deleted.\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n if (loading) {\n return <Spinner />;\n }\n\n return (\n <Card>\n <CardBody>\n <Flex align=\"center\">\n <FlexBlock>\n <strong>{name || __(\"Untitled webhook\", \"presto-player\")}</strong>\n <br />\n {url}\n </FlexBlock>\n <FlexItem>\n <Flex align=\"center\">\n {isSaving || isDeleting ? (\n <Spinner />\n ) : (\n <>\n <ToolbarButton\n icon=\"edit\"\n label=\"Edit\"\n onClick={() => setOpen(true)}\n />\n <ToolbarButton\n icon=\"trash\"\n label={__(\"Delete\", \"presto-player\")}\n onClick={deleteWebhook}\n />\n </>\n )}\n </Flex>\n </FlexItem>\n </Flex>\n </CardBody>\n {open && (\n <NewWebhook onClose={() => setOpen(false)} webhook={incomingWebhook} />\n )}\n </Card>\n );\n};\n","import {\n Button,\n Flex,\n FlexBlock,\n Panel,\n PanelBody,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __, _n, sprintf } from \"@wordpress/i18n\";\n\nimport NewWebhook from \"./NewWebhook\";\nimport Webhook from \"./Webhook\";\n\nexport default () => {\n const [open, setOpen] = useState(false);\n const { webhooks, loading } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\"];\n return {\n webhooks: select(coreStore).getEntityRecords(...queryArgs),\n loading: select(coreStore).isResolving(\"getEntityRecords\", queryArgs),\n };\n }, []);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Webhooks\", \"presto-player\")}</FlexBlock>\n {!!webhooks?.length && (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {sprintf(__(\"%d connected\"), webhooks?.length)}\n </Button>\n )}\n </Flex>\n }\n initialOpen={false}\n >\n {(webhooks || []).map((webhook) => {\n return (\n <Webhook webhook={webhook} key={webhook?.id} loading={loading} />\n );\n })}\n\n <br />\n\n <Button\n isSecondary\n onClick={() => {\n setOpen(true);\n }}\n >\n {__(\"Create New WebHook\", \"presto-player\")}\n </Button>\n\n {open && <NewWebhook onClose={() => setOpen(false)} />}\n </PanelBody>\n </Panel>\n );\n};\n","import {\n ExternalLink,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\n\nconst semverCompare = require(\"semver/functions/compare\");\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\nimport BunnyClassic from \"./parts/BunnyClassic/index\";\nimport BunnyStream from \"./parts/BunnyStream/index\";\nimport EmailExport from \"./parts/EmailExport\";\n\nimport ActiveCampaign from \"./parts/integration/ActiveCampaign\";\nimport FluentCRM from \"./parts/integration/FluentCRM\";\nimport Mailchimp from \"./parts/integration/Mailchimp\";\nimport MailerLite from \"./parts/integration/MailerLite\";\nimport Webhooks from \"./parts/Webhooks/index.js\";\n\nexport default () => {\n const [editBunny, setEditBunny] = useState(false);\n\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_google_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [youtube, setYoutube] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_youtube\"\n );\n const updateYoutube = (data) => {\n setYoutube({\n ...(youtube || {}),\n ...data,\n });\n };\n\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const showEmailIntegration = () => {\n if (!prestoPlayer?.isPremium) {\n return true;\n }\n\n if (\n prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"0.9.0\") >= 0\n ) {\n return true;\n }\n\n return false;\n };\n\n const bunnySettings = () => {\n return (\n <>\n <Group\n title={__(\"Bunny.net Settings\", \"presto-player\")}\n description={__(\"Modify bunny.net settings.\", \"presto-player\")}\n >\n {!!window?.prestoPlayer?.isSetup?.bunny?.stream && (\n <Fragment>\n <TextControl\n label={__(\"Initial Quality Level\", \"presto-player\")}\n help={__(\n \"You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.\",\n \"presto-player\"\n )}\n placeholder={\"480\"}\n type=\"number\"\n value={stream?.hls_start_level}\n onChange={(hls_start_level) =>\n updateStream({ hls_start_level })\n }\n />\n\n {<br />}\n\n <ToggleControl\n label={__(\"Disable Classic Bunny.net Storage\", \"presto-player\")}\n help={__(\n \"This will disable Bunny.net classic storage in your block UI.\",\n \"presto-player\"\n )}\n checked={stream?.disable_legacy_storage}\n onChange={(disable_legacy_storage) =>\n updateStream({ disable_legacy_storage })\n }\n />\n\n {<br />}\n </Fragment>\n )}\n\n <ToggleControl\n label={__(\"Edit Bunny.net Settings\", \"presto-player\")}\n help={__(\n \"Edit Bunny.net connection settings. Only edit this if you know what you're doing.\",\n \"presto-player\"\n )}\n checked={editBunny}\n onChange={setEditBunny}\n />\n\n {!!editBunny && (\n <>\n <BunnyStream />\n <BunnyClassic />\n </>\n )}\n </Group>\n </>\n );\n };\n\n return (\n <Page\n title={__(\"Integrations\", \"presto-player\")}\n description={__(\n \"Third party integrations and connections.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Google Analytics\", \"presto-player\")}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ToggleControl\n className=\"presto-player__setting--google-analytics\"\n label={__(\"Enable\", \"presto-player\")}\n help={__(\n \"Send analytics events to your Google Analytics account.\",\n \"presto-player\"\n )}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n <ToggleControl\n className=\"presto-player__setting--use-existing-tag\"\n label={__(\"Use existing on-page tag?\", \"presto-player\")}\n help={__(\n \"Should we use an existing google analytics (v4) tag? If not, we'll output one for you.\",\n \"presto-player\"\n )}\n checked={analytics?.use_existing_tag}\n onChange={(use_existing_tag) => updateAnalytics({ use_existing_tag })}\n />\n\n <TextControl\n label={__(\"Measurement ID\", \"presto-player\")}\n help={__(\n \"Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.\",\n \"presto-player\"\n )}\n value={analytics?.measurement_id}\n onChange={(measurement_id) => updateAnalytics({ measurement_id })}\n />\n </Group>\n\n <Group\n title={__(\"YouTube\", \"presto-player\")}\n description={__(\"Settings for YouTube videos.\", \"presto-player\")}\n >\n <ToggleControl\n className=\"presto-player__setting--youtube-nocookie\"\n label={__(\"Privacy-Enhanced Mode\", \"presto-player\")}\n help={__(\n \"Embed YouTube videos without using cookies that track viewing behaviour.\",\n \"presto-player\"\n )}\n checked={youtube?.nocookie}\n onChange={(nocookie) => updateYoutube({ nocookie })}\n />\n\n <TextControl\n label={__(\"Channel ID\", \"presto-player\")}\n help={\n <div>\n {__(\n \"Enter the ID of your channel to enable Youtube Subscribe button functionality.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://support.google.com/youtube/answer/3250431?hl=en\">\n {__(\"Find my channel id\", \"presto-player\")}\n </ExternalLink>\n </div>\n }\n value={youtube?.channel_id}\n onChange={(channel_id) => updateYoutube({ channel_id })}\n />\n </Group>\n\n {showEmailIntegration() && (\n <Group\n hideSaveButton={true}\n title={__(\"Email Capture\", \"presto-player\")}\n description={__(\n \"Integrate Presto Player with an email provider for email capture.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ActiveCampaign />\n <FluentCRM />\n <Mailchimp />\n <MailerLite />\n {prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"1.2.0\") >= 0 && (\n <Webhooks />\n )}\n <EmailExport />\n </Group>\n )}\n\n {!window?.prestoPlayer?.isSetup?.bunny ? (\n <Group>\n <CTA\n className=\"presto-player__setting--bunny-cta\"\n option={{\n name: __(\"Bunny.net Video\", \"presto-player\"),\n help: __(\n \"To get started with Bunny.net, add a Bunny.net video to your page.\",\n \"presto-player\"\n ),\n type: \"cta\",\n button: {\n text: \"Learn More\",\n link: \"https://prestoplayer.com/secure-video-with-bunny-net\",\n target: \"_blank\",\n },\n }}\n />\n </Group>\n ) : (\n bunnySettings()\n )}\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport {\n Card,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n} from \"@wordpress/components\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useState, useEffect } from \"@wordpress/element\";\n\nimport { Router, Link, Route } from \"@/router\";\nimport { routes } from \"./routes\";\n\nimport SaveButton from \"./components/SaveButton\";\nimport Notices from \"./components/Notices\";\nimport useSave from \"../../hooks/useSave\";\nimport General from \"./pages/General\";\nimport Performance from \"./pages/Performance\";\nimport Integrations from \"./pages/Integrations\";\n\nfunction App() {\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [loaded, setLoaded] = useState(false);\n\n // scroll top on history change\n window.onhashchange = () => {\n window.scrollTo(0, 0);\n };\n\n const { save } = useSave();\n\n /**\n * Form is submitted.\n */\n const onSubmit = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n const loading = useSelect((select) => {\n const queryArgs = [\"root\", \"site\"];\n select(coreStore).getEntityRecords(...queryArgs);\n return !select(coreStore)?.hasFinishedResolution?.(\n \"getEntityRecords\",\n queryArgs\n );\n });\n\n useEffect(() => {\n if (!loading) {\n setLoaded(true);\n }\n }, [loading]);\n\n if (!loaded) {\n return (\n <div className=\"presto-settings__loading\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"presto-settings\">\n <Router routes={routes} defaultRoute={routes?.general?.path}>\n <Card className=\"presto-settings__navigation\">\n <Flex>\n <FlexBlock>\n <div\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n className=\"components-tab-panel__tabs\"\n >\n <Link\n to={routes?.general?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-general\"\n >\n {__(\"General\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.integrations?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-integrations\"\n >\n {__(\"Integrations\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.performance?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-performance\"\n >\n {__(\"Performance\", \"presto-player\")}\n </Link>\n </div>\n </FlexBlock>\n <FlexItem>\n <SaveButton onSave={onSubmit} style={{ marginRight: \"8px\" }}>\n {__(\"Update Settings\", \"presto-player\")}\n </SaveButton>\n </FlexItem>\n </Flex>\n </Card>\n\n <Route path={routes?.general?.path}>\n <General />\n </Route>\n <Route path={routes?.integrations?.path}>\n <Integrations />\n </Route>\n <Route path={routes?.performance?.path}>\n <Performance />\n </Route>\n </Router>\n\n <Notices className=\"presto-settings-page-notices\" />\n </div>\n );\n}\n\nexport default App;\n","import { render } from \"@wordpress/element\";\n\n/**\n * Redux entities.\n */\nimport \"./entities\";\n\n/**\n * App\n */\nimport App from \"./app\";\n\n/**\n * styles\n */\nimport \"./settings.scss\";\n\n/**\n * Render\n */\nrender(<App />, document.getElementById(\"presto-settings-page\"));\n","(function() { module.exports = window[\"wp\"][\"data\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());"],"sourceRoot":""}
 
dist/settings/admin-8ab815a4.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ *
3
+ * Presto Player
4
+ *
5
+ * @author Presto Made, Inc
6
+ * @version 0.1.0
7
+ * @link undefined
8
+ * @license GPL
9
+ *
10
+ * Copyright (c) 2022 Presto Made, Inc
11
+ *
12
+ * This software is released under the GPL License
13
+ * https://opensource.org/licenses/GPL
14
+ *
15
+ * Compiled with the help of https://wpack.io
16
+ * A zero setup Webpack Bundler Script for WordPress
17
+ */
18
+ (window.wpackioprestoPlayersettingsJsonp=window.wpackioprestoPlayersettingsJsonp||[]).push([[0],{0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.components},11:function(e,t){e.exports=window.wp.notices},12:function(e,t){e.exports=window.wp.compose},2:function(e,t){e.exports=window.wp.coreData},32:function(e,t){e.exports=window.wp.apiFetch},35:function(e,t,r){r(36),e.exports=r(51)},51:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(2),o=r(7),c=r(0);Object(o.dispatch)(a.store).addEntities([{name:"preset",kind:"presto-player",label:Object(c.__)("Presets","presto-player"),baseURL:"presto-player/v1/preset",baseURLParams:{context:"edit"}},{name:"audio-preset",kind:"presto-player",label:Object(c.__)("Audio Presets","presto-player"),baseURL:"presto-player/v1/audio-preset",baseURLParams:{context:"edit"}},{name:"webhook",kind:"presto-player",label:Object(c.__)("Webhook","presto-player"),baseURL:"presto-player/v1/webhook",baseURLParams:{context:"edit"}}]);var l=r(9),s=r(3),i=r(4),p=r.n(i),u=r(1),b=r(11),m=r(27),y=r(28),d=r(19),O=r(29),_=r(30),f=r(23),v=r(5),h=r(31),j=r.n(h);function g(e){return{path:e.pathname,hash:e.hash,query:j.a.parse(e.search)}}var E=r(34),R=Object(E.a)(),w=wp.element.createContext({route:g(R.location)}),P=r(16),k=wp.element.useContext,C="";function S(e){var t=e.path,r=e.onRoute,n=e.children,a=k(w).route,o=Object(P.a)("".concat(t))("".concat(a.hash.substr(1)));return o?(r&&(C!==o.path&&r(),C=o.path),React.createElement("div",null,wp.element.cloneElement(n,{route:o}))):null}var x=r(14),D=r.n(x);function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var T=wp.element.useContext;function B(e){var t=e.to,r=e.onClick,n=e.children,a=e.activeClassName,o=T(w).route,c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);delete c.activeClassName;return React.createElement("a",Object.assign({},c,{className:D()(Object(v.a)({},a,Object(P.a)("".concat(t))("".concat(o.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),o.path!==t){r&&r(e);var n=R.location.search;R.push("".concat(n,"#").concat(t))}}}),n)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(f.a)(e);if(t){var a=Object(f.a)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Object(_.a)(this,r)}}var I=function(e){Object(O.a)(r,e);var t=F(r);function r(e){var n;Object(m.a)(this,r),n=t.call(this,e),Object(v.a)(Object(d.a)(n),"handleRouteChange",(function(e){var t=g(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=R.listen(n.handleRouteChange);var a=g(R.location),o=R.location.search;return n.state={route:a,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return Object(y.a)(r,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.NotFound,this.state),n=r.route,a=r.defaultRoute;if(!n.hash)return R.push(a),React.createElement("div",null);var o=!1;(this.routes||[]).forEach((function(e){var t=Object(P.a)(n.hash.substr(1))("".concat(n.hash.substr(1)));t&&(o={name:e,data:t})}));var c={route:n,matched:o},l=!o;return React.createElement(w.Provider,{value:c},l?React.createElement("div",null,"Not found"):t)}}]),r}(n.Component),A={general:{path:"general"},integrations:{path:"/integrations"},performance:{path:"/performance"}},L=r(33),M=["onSave","children","busy","loading"];function U(e){var t=e.onSave,r=e.children,n=e.busy,c=e.loading,l=Object(L.a)(e,M),s=Object(o.useSelect)((function(e){var t=e(a.store),r=t.__experimentalGetDirtyEntityRecords,n=t.isSavingEntityRecord,o=(r()||[]).filter((function(e){return"webhook"!==e.name}));return{isDirty:o.length>0,isSaving:o.some((function(e){return n(e.kind,e.name,e.key)}))}}),[]),i=s.isDirty,p=s.isSaving,b=!i||p;return c?React.createElement(ScSkeleton,{style:{width:"120px",height:"35px",display:"inline-block"}}):React.createElement(u.Button,Object.assign({isPrimary:!0,"aria-disabled":b,disabled:b||p||n,isBusy:p||n,onClick:b?void 0:t},l),r)}var q=function(e){var t=e.className,r=Object(o.useSelect)((function(e){return e(b.store).getNotices()})),n=Object(o.useDispatch)(b.store).removeNotice,a=r.filter((function(e){return"snackbar"===e.type}));return React.createElement(u.SnackbarList,{notices:a,className:t,onRemove:n})};function W(){var e=Object(o.useDispatch)(a.store).saveEditedEntityRecord;return{save:function(){var t=Object(l.a)(p.a.mark((function t(){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(o.select)(a.store).__experimentalGetDirtyEntityRecords(),n=[],r.forEach((function(t){var r=t.kind,a=t.name,o=t.key;n.push(e(r,a,o,{throwOnError:!0}))})),t.next=5,Promise.all(n);case 5:if(!t.sent.some((function(e){return void 0===e}))){t.next=8;break}throw{message:"Saving failed."};case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}}var Y,G=wp.i18n.__,z=wp.element.useState,H=wp.components,V=H.Modal,K=H.Button,J=function(e){var t=e.children,r=e.disabled,n=z(!1),a=Object(s.a)(n,2),o=a[0],c=a[1];return r?React.createElement("div",null,React.createElement("div",{className:"presto-options__disabled-overlay",onClick:function(e){return c(!0),e.preventDefault(),!1}},React.createElement("div",null,t)),!!o&&React.createElement(V,{title:null==r?void 0:r.title,onRequestClose:function(){return c(!1)}},React.createElement("h2",null,null==r?void 0:r.heading),React.createElement("p",null,null==r?void 0:r.message),React.createElement(K,{href:null==r?void 0:r.link,target:"_blank",isPrimary:!0},G("Learn More","presto-player")))):React.createElement("div",null,t)},Q=wp.components,X=Q.Card,Z=Q.CardBody,$=Q.CardFooter,ee=function(e){var t=e.title,r=e.description,n=e.children,a=e.disabled,s=e.hideSaveButton,i=W().save,u=Object(o.useDispatch)(b.store),m=u.createSuccessNotice,y=u.createErrorNotice,d=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i();case 3:m(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),y((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"));case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(J,{disabled:a},React.createElement(X,{size:"large",className:"presto-options__card"},React.createElement(Z,{className:"presto-options__card-body"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"2em"}},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},t&&React.createElement("h2",{style:{marginBottom:0}},t," ",!!a&&React.createElement("div",{className:"presto-options__pro-badge"},"Pro")),r&&React.createElement("p",null,r)),React.createElement("div",null,n))),s?React.createElement("br",null):React.createElement($,{isShady:!0},React.createElement("div",null,React.createElement(U,{onSave:d},Object(c.__)("Update Settings"))))))},te=wp.i18n.__,re=wp.components,ne=re.Button,ae=re.BaseControl,oe=wp.mediaUtils.MediaUpload,ce=(wp.data.dispatch,function(e){var t=e.option,r=e.label,n=e.help,a=e.allowedTypes,o=e.value,c=e.className,l=e.maxWidth,s=e.onSelect;return React.createElement("div",{className:D()(c,"presto-settings__setting is-media-control")},React.createElement(ae,{className:"editor-video-poster-control"},React.createElement(ae.VisualLabel,null,r),o&&React.createElement(ae,null,React.createElement("img",{style:{maxWidth:l,border:"1px solid #dcdcdc"},src:o})),React.createElement("br",null),React.createElement(oe,{title:n,onSelect:s,allowedTypes:a,render:function(e){var t=e.open;return React.createElement(ne,{isSecondary:!0,onClick:t,className:o?"button-replace":"button-select"},te(o?"Replace":"Select","presto-player"))}})," ",React.createElement("p",{id:"video-block__logo-image-description-".concat(null==t?void 0:t.id),hidden:!0},o?sprintf(te("The current logo image url is %s","presto-player"),o):te("There is no logo image currently selected","presto-player")),!!o&&React.createElement(ne,{onClick:function(){return s("")},isTertiary:!0},te("Remove","presto-player"))),React.createElement("br",null))}),le=function(e){var t=e.children,r=e.title,n=e.description;return React.createElement("div",{className:"presto-flow presto-settings__page"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},r&&React.createElement("h1",null,r),n&&React.createElement("p",null,n)),React.createElement("div",{className:"presto-settings__body "},React.createElement("div",{className:"presto-flow"},t)))},se=r(21),ie=r(6),pe=function(e){var t=e.option,r=e.value,a=e.className,o=e.disabled,c=e.onChange,l=function(e){o||(e.save(),c(s.current.value))},s=Object(n.useRef)();return Object(n.useEffect)((function(){var e;null!==(e=wp)&&void 0!==e&&e.CodeMirror&&wp.CodeMirror.fromTextArea(s.current,{type:"text/css",lineNumbers:!0}).on("change",l)}),[]),Object(ie.b)("div",{className:D()(a,"presto-settings__setting")},Object(ie.b)(u.BaseControl,{css:Object(ie.a)(Y||(Y=Object(se.a)(["\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n "]))),label:null==t?void 0:t.name,help:null==t?void 0:t.help},Object(ie.b)("textarea",{onChange:l,ref:s,rows:"5",disabled:!0},r)))};function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var me,ye=function(){var e,t=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}},r=Object(o.useSelect)((function(e){var t,r,n=["presto-player","preset"],o=["presto-player","audio-preset"];return{presets:(t=e(a.store)).getEntityRecords.apply(t,n),loadingPresets:e(a.store).isResolving("getEntityRecords",n),audioPresets:(r=e(a.store)).getEntityRecords.apply(r,o),loadingAudioPresets:e(a.store).isResolving("getEntityRecords",o)}}),[]),n=r.presets,l=r.loadingPresets,i=r.audioPresets,p=r.loadingAudioPresets,b=Object(a.useEntityProp)("root","site","presto_player_presets"),m=Object(s.a)(b,2),y=m[0],d=m[1],O=Object(a.useEntityProp)("root","site","presto_player_audio_presets"),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(a.useEntityProp)("root","site","presto_player_analytics"),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(be(be({},g||{}),e))},w=Object(a.useEntityProp)("root","site","presto_player_branding"),P=Object(s.a)(w,2),k=P[0],C=P[1],S=function(e){C(be(be({},k||{}),e))},x=Object(a.useEntityProp)("root","site","presto_player_uninstall"),D=Object(s.a)(x,2),N=D[0],T=D[1];return React.createElement(le,{title:Object(c.__)("General","presto-player"),description:Object(c.__)("Branding, analytics and uninstall data.","presto-player")},React.createElement(ee,{title:Object(c.__)("Branding","presto-player"),description:Object(c.__)("Global player branding options","presto-player")},React.createElement(J,{disabled:t()},React.createElement(ce,{className:"presto-player__setting--logo",label:React.createElement(React.Fragment,null,Object(c.__)("Logo","presto-player")," ",t()&&React.createElement("span",{className:"presto-options__pro-badge"},Object(c.__)("Pro","presto-player"))),onSelect:function(e){return S({logo:null==e?void 0:e.url})},maxWidth:(null==k?void 0:k.logo_width)||150,value:null==k?void 0:k.logo}),React.createElement("div",{style:{maxWidth:"500px"}},React.createElement(u.RangeControl,{className:"presto-player__setting--logo-width",label:Object(c.__)("Logo Max Width","presto-player"),value:(null==k?void 0:k.logo_width)||150,onChange:function(e){return S({logo_width:e})},min:1,max:400}))),React.createElement(u.ColorPicker,{className:"presto-player__setting--brand-color",onChangeComplete:function(e){return S({color:e.hex})},color:null==k?void 0:k.color})),React.createElement(ee,{title:Object(c.__)("Analytics","presto-player"),disabled:t(),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player")},React.createElement("div",null,React.createElement(u.ToggleControl,{className:"presto-player__setting--analytics-enable",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Enable view analytics for your media","presto-player"),checked:null==g?void 0:g.enable,onChange:function(e){return R({enable:e})}}),!(null==g||!g.enable)&&React.createElement(u.ToggleControl,{label:Object(c.__)("Auto-Purge Data (recommended)"),help:Object(c.__)("Automatically purge data older than 90 days.","presto-player"),className:"presto-player__setting--analytics-enable",checked:void 0===(null==g?void 0:g.purge_data)||(null==g?void 0:g.purge_data),onChange:function(e){return R({purge_data:e})}}))),React.createElement(ee,{title:Object(c.__)("Presets","presto-player"),disabled:t(),description:Object(c.__)("Media presets settings.","presto-player")},l?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for video.","presto-player"),value:null==y?void 0:y.default_player_preset,options:(n||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void d(be(be({},y||{}),t));var t}}),p?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for audio.","presto-player"),value:null==f?void 0:f.default_player_preset,options:(i||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void v(be(be({},f||{}),t));var t}})),React.createElement(ee,{disabled:t(),title:Object(c.__)("Custom CSS","presto-player"),description:Object(c.__)("Quickly add custom css to the player web component.","presto-player")},React.createElement(pe,{disabled:!(null!==(e=prestoPlayer)&&void 0!==e&&e.isPremium),option:{id:"player_css"},value:null==k?void 0:k.player_css,key:null==k?void 0:k.player_css,onChange:function(e){return S({player_css:e})}})),React.createElement(ee,{title:Object(c.__)("Uninstall Options","presto-player"),description:Object(c.__)("Options to remove data on uninstall.","presto-player")},React.createElement(u.ToggleControl,{label:Object(c.__)("Remove data on uninstall"),help:Object(c.__)("This removes all data on uninstall.","presto-player"),className:"presto-player__setting--uninstall",checked:null==N?void 0:N.uninstall_data,onChange:function(e){var t;if(e&&!confirm(Object(c.__)("Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!","presto-player")))return;t={uninstall_data:e},T(be(be({},N||{}),t))}})))};function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _e=function(){var e=Object(a.useEntityProp)("root","site","presto_player_performance"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(Oe(Oe({},r||{}),e))};return Object(ie.b)(le,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Player performance preferences.","presto-player")},Object(ie.b)(ee,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Performance options for player loading.","presto-player")},Object(ie.b)("div",null,Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--module-enabled",label:Object(c.__)("Dynamically Load JavaScript","presto-player"),help:Object(c.__)("Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.","presto-player"),checked:null==r?void 0:r.module_enabled,onChange:function(e){return o({module_enabled:e})}}),!(null==r||!r.module_enabled)&&Object(ie.b)(u.Notice,{css:Object(ie.a)(me||(me=Object(se.a)(["\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n "]))),className:"presto-notice",status:"info",isDismissible:!1},Object(ie.b)("div",null,Object(ie.b)("strong",null,Object(c.__)("Please Note","presto-player"))),Object(ie.b)("div",null,Object(c.__)("You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.","presto-player")," ",Object(ie.b)(u.ExternalLink,{href:"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting"},Object(c.__)("Learn More","presto-player"))))),Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--automations",label:Object(c.__)("Enable Ajax Requests for Progress Integrations","presto-player"),help:Object(c.__)("Keep this on unless you do not plan on using automation, LMS or membership integrations.","presto-player"),checked:null==r?void 0:r.automations,onChange:function(e){return o({automations:e})}})))};function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_pull_zones"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ve(ve({},r||{}),e))},l=r||{},i=l.public_id,p=l.public_hostname,b=l.private_id,m=l.private_hostname,y=l.private_security_key;return React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Storage (Classic)","presto-player")),React.createElement("p",{style:{fontSize:"12px",color:"#757575"}},Object(c.__)('Note: To Change your API key, please click "Reconnect" from a bunny block.',"presto-player")),React.createElement(u.TextControl,{label:Object(c.__)("Public ID","presto-player"),help:Object(c.__)("The ID of the public pull zone to use.","presto-player"),value:i,onChange:function(e){return o({public_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Host Name","presto-player"),help:Object(c.__)("The hostname to use for this pullzone.","presto-player"),value:p,onChange:function(e){return o({public_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private ID","presto-player"),help:Object(c.__)("The ID of the private pull zone to use.","presto-player"),value:b,onChange:function(e){return o({private_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Host Name","presto-player"),help:Object(c.__)("The hostname to use for the private pullzone.","presto-player"),value:m,onChange:function(e){return o({private_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Url Token Authentication Key","presto-player"),help:Object(c.__)("Update the security token used to sign private urls.","presto-player"),type:"password",value:y,onChange:function(e){return o({private_security_key:e})}}))};function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ee=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ge(ge({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}))};function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pe=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_private"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(we(we({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id,m=l.token_auth_key;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Token Authentication Key","presto-player"),help:Object(c.__)("The token authentication key used to sign private urls.","presto-player"),value:m,onChange:function(e){return o({token_auth_key:e})}}))},ke=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0];t[1];return r?React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Stream","presto-player")),React.createElement(Ee,null),React.createElement(Pe,null)):null},Ce=wp.i18n.__,Se=wp.components,xe=Se.Button,De=Se.Panel,Ne=Se.PanelBody,Te=Se.Flex,Be=Se.FlexBlock,Fe=Se.Notice,Ie=Se.Spinner,Ae=wp.element,Le=Ae.useState,Me=Ae.useEffect,Ue=function(){var e=Le(0),t=Object(s.a)(e,2),r=t[0],n=t[1],a=Le(0),o=Object(s.a)(a,2),c=o[0],i=o[1],u=Le(""),b=Object(s.a)(u,2),m=b[0],y=b[1],d=Le(0),O=Object(s.a)(d,2),_=O[0],f=O[1],v=function(){var e=Object(l.a)(p.a.mark((function e(){var t,a,o,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(""),e.prev=1,e.next=4,wp.apiFetch({path:"/presto-player/v1/email/export",method:"post",data:{step:r}});case 4:t=e.sent,a=t.percentage,o=t.step,c=t.url,n(o),i(a),f(c),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),i(0),y((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Ce("Something went wrong","presto-player"));case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return Me((function(){r&&"done"!=r&&v()}),[r]),Me((function(){_&&window.open(_)}),[_]),React.createElement(De,null,React.createElement(Ne,{title:React.createElement(Te,null,React.createElement(Be,null,Ce("Other","presto-player"))),initialOpen:!1},React.createElement("h2",null,Ce("Manual Export","presto-player")),React.createElement("p",null,Ce("Using a service not listed here? You can export contacts and manually upload them to a service.","presto-player")),m&&React.createElement(Fe,{className:"presto-notice",status:"error",onRemove:function(){return y("")}},m),React.createElement(Te,{align:"center",justify:"flex-start"},React.createElement(xe,{isPrimary:!0,onClick:function(e){n(1),i(1),e.preventDefault()}},Ce("Download CSV File","presto-player")),!!c&&React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Ie,{style:{marginTop:0}}),React.createElement("span",null,"Exporting... ",c,"% Complete")))))},qe=wp.components,We=qe.Button,Ye=qe.Card,Ge=qe.CardBody,ze=(wp.data.dispatch,function(e){var t,r,n,a=e.option,o=(e.value,e.optionName,e.className);return React.createElement(Ye,{isBorderless:!0,className:o},React.createElement(Ge,{isShady:!0},!(null==a||!a.name)&&React.createElement("h2",null,a.name),!!a.help&&React.createElement("p",null,a.help),!(null==a||null===(t=a.button)||void 0===t||!t.text)&&React.createElement(We,{isPrimary:!0,target:null==a||null===(r=a.button)||void 0===r?void 0:r.target,href:null==a||null===(n=a.button)||void 0===n?void 0:n.link},a.button.text)))}),He=r(12),Ve=wp.i18n.__,Ke=wp.components,Je=Ke.Button,Qe=Ke.Panel,Xe=Ke.PanelBody,Ze=Ke.Flex,$e=Ke.Modal,et=Ke.FlexBlock,tt=Ke.FlexItem,rt=Ke.PanelRow,nt=wp.element.useState,at=function(e){var t=e.connected,r=e.title,n=e.children,a=e.onConnect,o=e.isBusy,c=e.connectButtonText,l=e.disconnectButtonText,i=e.onDisconnect,p=nt(!1),u=Object(s.a)(p,2),b=u[0],m=u[1];return React.createElement(Qe,null,React.createElement(Xe,{title:React.createElement(Ze,null,React.createElement(et,null,r),React.createElement(tt,null,t?React.createElement(Je,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},Ve("Connected","presto-player")):React.createElement(Je,{isSmall:!0,isSecondary:!0,style:{marginRight:"30px"}},Ve("Not Connected","presto-player")))),initialOpen:!1},React.createElement("form",{onSubmit:function(e){e.preventDefault(),a()},disabled:o},n,React.createElement(rt,null,React.createElement("div",null,t?React.createElement("div",null," ",React.createElement(Je,{isSecondary:!0,isBusy:o,disabled:o,onClick:function(e){e.preventDefault(),m(!0)}},l||Ve("Disconnect","presto-player"))):React.createElement(Je,{isPrimary:!0,isBusy:o,disabled:o,type:"submit"},c||Ve("Connect","presto-player")))))),b&&React.createElement($e,{className:"presto-player__modal-confirm",title:Ve("Are you sure?","presto-player"),style:{"max-width":"350px"},onRequestClose:function(){return m(!1)}},React.createElement("p",null,Ve("Are you sure you want to disconnect this integration?","presto-player")),React.createElement(Je,{className:"presto-player__modal-confirm-button",isDestructive:!0,onClick:function(){i&&i(),m(!1)}},Ve("Disconnect","presto-player")),React.createElement(Je,{onClick:function(){return m(!1)}},Ve("Cancel","presto-player"))))},ot=wp.components.TextControl,ct=wp.data.dispatch,lt=function(e){var t=e.option,r=e.value,n=e.optionName,a=e.className;return React.createElement("div",{className:"presto-settings__setting is-text-control"},React.createElement(ot,Object.assign({className:D()(a,"presto-settings__setting is-media-control"),label:null==t?void 0:t.name,value:r,type:null==t?void 0:t.type,help:null==t?void 0:t.help,placeholder:null==t?void 0:t.placeholder,onChange:function(e){return ct("presto-player/settings").updateSetting(t.id,e,n)}},e)))},st=r(32),it=r.n(st);function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ut(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.name;return Object(He.createHigherOrderComponent)((function(e){return function(r){var o=Object(n.useState)(""),i=Object(s.a)(o,2),u=i[0],b=i[1],m=Object(n.useState)(""),y=Object(s.a)(m,2),d=y[0],O=y[1],_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site",t),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(){var e=Object(l.a)(p.a.mark((function e(t){var r,n,a,o,l,s,i,u;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.path,n=t.data,a=void 0===n?{}:n,o=t.message,l=void 0===o?Object(c.__)("Success","presto-player"):o,s=t.success,i=t.error,b(""),O(""),h(!0),e.prev=4,e.next=7,it()({path:r,method:"post",data:a});case 7:u=e.sent,s&&s(u),O(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),null!==e.t0&&void 0!==e.t0&&e.t0.message&&(b(e.t0.message),i&&i(e.t0));case 15:return e.prev=15,h(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[4,12,15,18]])})));return function(t){return e.apply(this,arguments)}}();return React.createElement(e,Object.assign({success:d,setSuccess:O,setError:b,error:u,isBusy:v,setting:E,updateSetting:function(e){R(ut(ut({},E||{}),e))},makeRequest:w},r))}}),"withIntegration")};function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var yt=Object(He.compose)([bt({name:"presto_player_activecampaign"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,m=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},y=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/activecampaign/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:m,error:m});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement(at,{title:Object(c.__)("ActiveCampaign"),connected:null==i?void 0:i.connected,onConnect:function(){s({path:"/presto-player/v1/activecampaign/connect",data:{api_key:null==i?void 0:i.api_key,url:null==i?void 0:i.url},message:Object(c.__)("Connected","presto-player"),success:m,error:m})},onDisconnect:y,isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(lt,{label:Object(c.__)("Your ActiveCampaign Url","presto-player"),type:"url",help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.url,onChange:function(e){return b({url:e})}}),React.createElement(lt,{label:Object(c.__)("Your ActiveCampaign API key","presto-player"),help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.api_key,onChange:function(e){return b({api_key:e})}}))))}));function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ot=Object(He.compose)([bt({name:"presto_player_fluentcrm"})])((function(e){var t=e.error,r=e.setError,n=e.isBusy,a=e.makeRequest,o=e.setting,s=e.updateSetting,i=function(e){s(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},b=(o||{}).connected,m=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a({path:"/presto-player/v1/fluentcrm/disconnect",message:Object(c.__)("Deactivated","presto-player"),success:i,error:i});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement(at,{title:Object(c.__)("FluentCRM"),connected:b,onConnect:function(){a({path:"/presto-player/v1/fluentcrm/connect",message:Object(c.__)("Installed and connected","presto-player"),success:i,error:i})},onDisconnect:m,connectButtonText:Object(c.__)("Install FluentCRM Plugin","presto-player"),disconnectButtonText:Object(c.__)("Deactivate FluentCRM Plugin","presto-player"),isBusy:n},t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return r("")}},t)),b&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",isDismissible:!1},Object(c.__)("Installed and connected!","presto-player"))))}));function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ft=Object(He.compose)([bt({name:"presto_player_mailchimp"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,m=i||{},y=m.api_key,d=m.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailchimp/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement(at,{title:Object(c.__)("Mailchimp"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailchimp/connect",data:{api_key:y},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(lt,{className:"presto-player__setting--mailchimp-api_key",label:Object(c.__)("Your Mailchimp API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your mailchimp account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://us11.admin.mailchimp.com/account/api/"},Object(c.__)("Get My API Key","presto-player"))),value:y,onChange:function(e){return b({api_key:e})}}))))}));function vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ht=Object(He.compose)([bt({name:"presto_player_mailerlite"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,m=i||{},y=m.api_key,d=m.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailerlite/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement(at,{title:Object(c.__)("Mailerlite"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailerlite/connect",data:{api_key:y},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(lt,{className:"presto-player__setting--mailerlite-api_key",label:Object(c.__)("Your MailerLite API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your MailerLite account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://app.mailerlite.com/integrations/api/"},Object(c.__)("Get My API Key","presto-player"))),value:y,onChange:function(e){return b({api_key:e})}}))))})),jt=r(22);function gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Rt=function(e){var t=e.headers,r=e.setHeaders,n=function(e,n){r((t||[]).map((function(t,r){return r!==n?t:Et(Et({},t),e)})))};return React.createElement(React.Fragment,null,(t||[]).map((function(e,a){var o=e.name,l=e.value;return React.createElement(u.Flex,{key:a,align:"center"},React.createElement(u.TextControl,{placeholder:Object(c.__)("Header Name","presto-player"),value:o,onChange:function(e){return n({name:e},a)}}),React.createElement(u.TextControl,{placeholder:Object(c.__)("New Value","presto-player"),value:l,onChange:function(e){return n({value:e},a)}}),React.createElement(u.BaseControl,null,React.createElement(u.ToolbarButton,{icon:"trash",onClick:function(){return function(e){return r((t||[]).filter((function(t,r){return r!==e})))}(a)}})))})),React.createElement("div",null,React.createElement(u.Button,{isSecondary:!0,isSmall:!0,onClick:function(){return e={name:"",value:""},void r([].concat(Object(jt.a)(t||[]),[e]));var e}},Object(c.__)("Add Header","presto-player"))))};function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var kt=function(e){var t=e.onClose,r=e.webhook,i=Object(o.useDispatch)(a.store).saveEntityRecord,m=Object(o.useDispatch)(b.store),y=m.createSuccessNotice,d=m.createErrorNotice,O=Object(n.useState)(!1),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(n.useState)(r||{email_name:"email",method:"POST"}),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(Pt(Pt({},g||{}),e))},w=g.name,P=g.url,k=g.method,C=g.email_name,S=g.headers,x=(g.archived,function(){var e=Object(l.a)(p.a.mark((function e(r){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.preventDefault(),v(!0),e.next=5,i("presto-player","webhook",Pt({},g));case 5:y(null!=g&&g.id?Object(c.__)("Webhook updated","presto-player"):Object(c.__)("Webhook created.","presto-player"),{type:"snackbar"}),t(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),d((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong.","presto-player"),{type:"snackbar"});case 13:return e.prev=13,v(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})));return function(t){return e.apply(this,arguments)}}());return Object(ie.b)(u.Modal,{title:null!=g&&g.id?Object(c.__)("Edit Webhook","presto-player"):Object(c.__)("Add A Webhook","presto-player"),onRequestClose:t,shouldCloseOnClickOutside:!1},Object(ie.b)("form",{onSubmit:x},Object(ie.b)(u.TextControl,{label:Object(c.__)("Name","presto-player"),placeholder:Object(c.__)("Webhook feed name","presto-player"),value:w,onChange:function(e){return R({name:e})},required:!0,autoFocus:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Request URL","presto-player"),placeholder:Object(c.__)("Webhook URL","presto-player"),type:"url",value:P,onChange:function(e){return R({url:e})},required:!0}),Object(ie.b)(u.SelectControl,{label:Object(c.__)("Request Method","presto-player"),value:k,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"}],onChange:function(e){return R({method:e})},required:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Email Name","presto-player"),placeholder:Object(c.__)("The name (key) of the email sent.","presto-player"),value:C,onChange:function(e){return R({email_name:e})},required:!0}),Object(ie.b)("div",{css:{margin:"0 0 1.5rem"}},Object(ie.b)(u.BaseControl.VisualLabel,null,Object(c.__)("Headers","presto-player")),Object(ie.b)(Rt,{headers:S,setHeaders:function(e){return R({headers:e})}})),Object(ie.b)(u.Button,{isPrimary:!0,type:"submit",isBusy:f},null!=g&&g.id?Object(c.__)("Update","presto-player"):Object(c.__)("Create","presto-player"))))},Ct=function(e){var t=e.webhook,r=Object(n.useState)(!1),i=Object(s.a)(r,2),m=(i[0],i[1],Object(n.useState)(!1)),y=Object(s.a)(m,2),d=y[0],O=y[1],_=Object(o.useDispatch)(a.store),f=_.deleteEntityRecord,v=(_.saveEntityRecord,Object(o.useDispatch)(b.store)),h=v.createSuccessNotice,j=v.createErrorNotice,g=Object(o.useSelect)((function(e){var r=["presto-player","webhook",null==t?void 0:t.id],n=e(a.store),o=n.getEditedEntityRecord,c=n.isSavingEntityRecord,l=n.isDeletingEntityRecord;return{webhook:o.apply(void 0,r),loading:e(a.store).isResolving("getEditedEntityRecord",r),isSaving:c.apply(void 0,r),isDeleting:l.apply(void 0,r)}}),[]),E=g.webhook,R=g.loading,w=g.isSaving,P=g.isDeleting,k=E||{},C=k.name,S=k.url,x=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,confirm(Object(c.__)("Are you sure you want to delete this webhook?","presto-player"))){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,f("presto-player","webhook",null==E?void 0:E.id,void 0,{throwOnError:!0});case 6:h(Object(c.__)("Webhook deleted.","presto-player"),{type:"snackbar"}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),j((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return R?React.createElement(u.Spinner,null):React.createElement(u.Card,null,React.createElement(u.CardBody,null,React.createElement(u.Flex,{align:"center"},React.createElement(u.FlexBlock,null,React.createElement("strong",null,C||Object(c.__)("Untitled webhook","presto-player")),React.createElement("br",null),S),React.createElement(u.FlexItem,null,React.createElement(u.Flex,{align:"center"},w||P?React.createElement(u.Spinner,null):React.createElement(React.Fragment,null,React.createElement(u.ToolbarButton,{icon:"edit",label:"Edit",onClick:function(){return O(!0)}}),React.createElement(u.ToolbarButton,{icon:"trash",label:Object(c.__)("Delete","presto-player"),onClick:x})))))),d&&React.createElement(kt,{onClose:function(){return O(!1)},webhook:t}))},St=function(){var e=Object(n.useState)(!1),t=Object(s.a)(e,2),r=t[0],l=t[1],i=Object(o.useSelect)((function(e){var t,r=["presto-player","webhook"];return{webhooks:(t=e(a.store)).getEntityRecords.apply(t,r),loading:e(a.store).isResolving("getEntityRecords",r)}}),[]),p=i.webhooks,b=i.loading;return React.createElement(u.Panel,null,React.createElement(u.PanelBody,{title:React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,Object(c.__)("Webhooks","presto-player")),!(null==p||!p.length)&&React.createElement(u.Button,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},Object(c.sprintf)(Object(c.__)("%d connected"),null==p?void 0:p.length))),initialOpen:!1},(p||[]).map((function(e){return React.createElement(Ct,{webhook:e,key:null==e?void 0:e.id,loading:b})})),React.createElement("br",null),React.createElement(u.Button,{isSecondary:!0,onClick:function(){l(!0)}},Object(c.__)("Create New WebHook","presto-player")),r&&React.createElement(kt,{onClose:function(){return l(!1)}})))};function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Nt=r(43),Tt=function(){var e,t,r,o,l,i,p,b,m,y,d,O,_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site","presto_player_bunny_stream"),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(e){R(Dt(Dt({},E||{}),e))},P=Object(a.useEntityProp)("root","site","presto_player_google_analytics"),k=Object(s.a)(P,2),C=k[0],S=k[1],x=function(e){S(Dt(Dt({},C||{}),e))},D=Object(a.useEntityProp)("root","site","presto_player_youtube"),N=Object(s.a)(D,2),T=N[0],B=N[1],F=function(e){B(Dt(Dt({},T||{}),e))},I=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}};return React.createElement(le,{title:Object(c.__)("Integrations","presto-player"),description:Object(c.__)("Third party integrations and connections.","presto-player")},React.createElement(ee,{title:Object(c.__)("Google Analytics","presto-player"),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player"),disabled:I()},React.createElement(u.ToggleControl,{className:"presto-player__setting--google-analytics",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Send analytics events to your Google Analytics account.","presto-player"),checked:null==C?void 0:C.enable,onChange:function(e){return x({enable:e})}}),React.createElement(u.ToggleControl,{className:"presto-player__setting--use-existing-tag",label:Object(c.__)("Use existing on-page tag?","presto-player"),help:Object(c.__)("Should we use an existing google analytics (v4) tag? If not, we'll output one for you.","presto-player"),checked:null==C?void 0:C.use_existing_tag,onChange:function(e){return x({use_existing_tag:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Measurement ID","presto-player"),help:Object(c.__)("Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.","presto-player"),value:null==C?void 0:C.measurement_id,onChange:function(e){return x({measurement_id:e})}})),React.createElement(ee,{title:Object(c.__)("YouTube","presto-player"),description:Object(c.__)("Settings for YouTube videos.","presto-player")},React.createElement(u.ToggleControl,{className:"presto-player__setting--youtube-nocookie",label:Object(c.__)("Privacy-Enhanced Mode","presto-player"),help:Object(c.__)("Embed YouTube videos without using cookies that track viewing behaviour.","presto-player"),checked:null==T?void 0:T.nocookie,onChange:function(e){return F({nocookie:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Channel ID","presto-player"),help:React.createElement("div",null,Object(c.__)("Enter the ID of your channel to enable Youtube Subscribe button functionality.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://support.google.com/youtube/answer/3250431?hl=en"},Object(c.__)("Find my channel id","presto-player"))),value:null==T?void 0:T.channel_id,onChange:function(e){return F({channel_id:e})}})),(null===(y=prestoPlayer)||void 0===y||!y.isPremium||!!(null!==(d=prestoPlayer)&&void 0!==d&&d.proVersion&&Nt(null===(O=prestoPlayer)||void 0===O?void 0:O.proVersion,"0.9.0")>=0))&&React.createElement(ee,{hideSaveButton:!0,title:Object(c.__)("Email Capture","presto-player"),description:Object(c.__)("Integrate Presto Player with an email provider for email capture.","presto-player"),disabled:I()},React.createElement(yt,null),React.createElement(Ot,null),React.createElement(ft,null),React.createElement(ht,null),(null===(e=prestoPlayer)||void 0===e?void 0:e.proVersion)&&Nt(null===(t=prestoPlayer)||void 0===t?void 0:t.proVersion,"1.2.0")>=0&&React.createElement(St,null),React.createElement(Ue,null)),null!==(r=window)&&void 0!==r&&null!==(o=r.prestoPlayer)&&void 0!==o&&null!==(l=o.isSetup)&&void 0!==l&&l.bunny?React.createElement(React.Fragment,null,React.createElement(ee,{title:Object(c.__)("Bunny.net Settings","presto-player"),description:Object(c.__)("Modify bunny.net settings.","presto-player")},!(null===(i=window)||void 0===i||null===(p=i.prestoPlayer)||void 0===p||null===(b=p.isSetup)||void 0===b||null===(m=b.bunny)||void 0===m||!m.stream)&&React.createElement(n.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Initial Quality Level","presto-player"),help:Object(c.__)("You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.","presto-player"),placeholder:"480",type:"number",value:null==E?void 0:E.hls_start_level,onChange:function(e){return w({hls_start_level:e})}}),React.createElement("br",null),React.createElement(u.ToggleControl,{label:Object(c.__)("Disable Classic Bunny.net Storage","presto-player"),help:Object(c.__)("This will disable Bunny.net classic storage in your block UI.","presto-player"),checked:null==E?void 0:E.disable_legacy_storage,onChange:function(e){return w({disable_legacy_storage:e})}}),React.createElement("br",null)),React.createElement(u.ToggleControl,{label:Object(c.__)("Edit Bunny.net Settings","presto-player"),help:Object(c.__)("Edit Bunny.net connection settings. Only edit this if you know what you're doing.","presto-player"),checked:v,onChange:h}),!!v&&React.createElement(React.Fragment,null,React.createElement(ke,null),React.createElement(he,null)))):React.createElement(ee,null,React.createElement(ze,{className:"presto-player__setting--bunny-cta",option:{name:Object(c.__)("Bunny.net Video","presto-player"),help:Object(c.__)("To get started with Bunny.net, add a Bunny.net video to your page.","presto-player"),type:"cta",button:{text:"Learn More",link:"https://prestoplayer.com/secure-video-with-bunny-net",target:"_blank"}}})))};var Bt=function(){var e,t,r,i,m,y,d,O=Object(o.useDispatch)(b.store),_=O.createSuccessNotice,f=O.createErrorNotice,v=Object(n.useState)(!1),h=Object(s.a)(v,2),j=h[0],g=h[1];window.onhashchange=function(){window.scrollTo(0,0)};var E=W().save,R=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E();case 3:_(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),f((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),w=Object(o.useSelect)((function(e){var t,r,n,o=["root","site"];return(t=e(a.store)).getEntityRecords.apply(t,o),!(null!==(r=e(a.store))&&void 0!==r&&null!==(n=r.hasFinishedResolution)&&void 0!==n&&n.call(r,"getEntityRecords",o))}));return Object(n.useEffect)((function(){w||g(!0)}),[w]),j?React.createElement("div",{className:"presto-settings"},React.createElement(I,{routes:A,defaultRoute:null==A||null===(e=A.general)||void 0===e?void 0:e.path},React.createElement(u.Card,{className:"presto-settings__navigation"},React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,React.createElement("div",{role:"tablist","aria-orientation":"horizontal",className:"components-tab-panel__tabs"},React.createElement(B,{to:null==A||null===(t=A.general)||void 0===t?void 0:t.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-general"},Object(c.__)("General","presto-player")),React.createElement(B,{to:null==A||null===(r=A.integrations)||void 0===r?void 0:r.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-integrations"},Object(c.__)("Integrations","presto-player")),React.createElement(B,{to:null==A||null===(i=A.performance)||void 0===i?void 0:i.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-performance"},Object(c.__)("Performance","presto-player")))),React.createElement(u.FlexItem,null,React.createElement(U,{onSave:R,style:{marginRight:"8px"}},Object(c.__)("Update Settings","presto-player"))))),React.createElement(S,{path:null==A||null===(m=A.general)||void 0===m?void 0:m.path},React.createElement(ye,null)),React.createElement(S,{path:null==A||null===(y=A.integrations)||void 0===y?void 0:y.path},React.createElement(Tt,null)),React.createElement(S,{path:null==A||null===(d=A.performance)||void 0===d?void 0:d.path},React.createElement(_e,null))),React.createElement(q,{className:"presto-settings-page-notices"})):React.createElement("div",{className:"presto-settings__loading"},React.createElement(u.Spinner,null))};Object(n.render)(React.createElement(Bt,null),document.getElementById("presto-settings-page"))},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.wp.element}},[[35,1,2]]]);
19
+ //# sourceMappingURL=admin-8ab815a4.js.map
dist/settings/admin-8ab815a4.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack:///external [\"wp\",\"i18n\"]","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"notices\"]","webpack:///external [\"wp\",\"compose\"]","webpack:///external [\"wp\",\"coreData\"]","webpack:///external [\"wp\",\"apiFetch\"]","webpack:///./src/admin/settings/entities.js","webpack:///./src/router/utils.js","webpack:///./src/router/context.js","webpack:///./src/router/route.js","webpack:///./src/router/link.js","webpack:///./src/router/index.js","webpack:///./src/admin/settings/routes.js","webpack:///./src/admin/settings/components/SaveButton.js","webpack:///./src/admin/settings/components/Notices.js","webpack:///./src/hooks/useSave.js","webpack:///./src/admin/settings/components/Disabled.js","webpack:///./src/admin/settings/components/Group.js","webpack:///./src/admin/settings/components/Media.js","webpack:///./src/admin/settings/components/Page.js","webpack:///./src/admin/settings/components/CodeMirror.js","webpack:///./src/admin/settings/pages/General.js","webpack:///./src/admin/settings/pages/Performance.js","webpack:///./src/admin/settings/pages/parts/BunnyClassic/index.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PublicStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PrivateStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/index.js","webpack:///./src/admin/settings/pages/parts/EmailExport.js","webpack:///./src/admin/settings/components/CTA.js","webpack:///./src/admin/settings/components/Integration.js","webpack:///./src/admin/settings/components/TextControl.js","webpack:///./src/admin/settings/pages/parts/integration/withIntegration.js","webpack:///./src/admin/settings/pages/parts/integration/ActiveCampaign.js","webpack:///./src/admin/settings/pages/parts/integration/FluentCRM.js","webpack:///./src/admin/settings/pages/parts/integration/Mailchimp.js","webpack:///./src/admin/settings/pages/parts/integration/MailerLite.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Headers.js","webpack:///./src/admin/settings/pages/parts/Webhooks/NewWebhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Webhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/index.js","webpack:///./src/admin/settings/pages/Integrations.js","webpack:///./src/admin/settings/app.js","webpack:///./src/admin/settings/index.js","webpack:///external [\"wp\",\"data\"]","webpack:///external [\"wp\",\"element\"]"],"names":["module","exports","window","dispatch","coreStore","addEntities","name","kind","label","__","baseURL","baseURLParams","context","locationToRoute","location","path","pathname","hash","query","qs","parse","search","history","createBrowserHistory","RouterContext","wp","element","createContext","route","useContext","prev","Route","onRoute","children","matched","match","checkMatch","substr","cloneElement","Link","props","to","onClick","activeClassName","state","className","classNames","e","preventDefault","push","Router","setState","routes","Object","keys","map","key","unlisten","listen","handleRouteChange","defaultRoute","this","NotFound","forEach","isMatched","data","routerContextValue","is404","Provider","value","Component","general","integrations","performance","SaveButton","onSave","busy","loading","rest","useSelect","select","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","dirtyEntityRecords","filter","r","isDirty","length","isSaving","some","record","disabled","ScSkeleton","style","width","height","display","isPrimary","aria-disabled","isBusy","undefined","notices","noticesStore","getNotices","removeNotice","useDispatch","snackbarNotices","type","onRemove","useSave","saveEditedEntityRecord","save","a","dirtyRecords","pendingSavedRecords","throwOnError","Promise","all","message","i18n","useState","components","Modal","Button","dialog","setDialog","title","onRequestClose","heading","href","link","target","Card","CardBody","CardFooter","description","hideSaveButton","createSuccessNotice","createErrorNotice","console","error","Disabled","size","marginBottom","isShady","BaseControl","MediaUpload","mediaUtils","option","help","allowedTypes","maxWidth","onSelect","VisualLabel","border","src","render","open","isSecondary","id","hidden","sprintf","isTertiary","onChange","handleChange","instance","textRef","current","useRef","useEffect","CodeMirror","fromTextArea","lineNumbers","on","css","ref","rows","prestoPlayer","isPremium","presetArgs","audioPresetArgs","presets","getEntityRecords","loadingPresets","isResolving","audioPresets","loadingAudioPresets","useEntityProp","presetSettings","setPresetSettings","audioPresetSettings","setAudioPresetSettings","analytics","setAnalytics","updateAnalytics","branding","setBranding","updateBranding","uninstall","setUninstall","Page","Group","Media","image","logo","url","logo_width","min","max","onChangeComplete","color","hex","checked","enable","purge_data","default_player_preset","options","preset","player_css","uninstall_data","confirm","setPerformance","updatePerformance","module_enabled","status","isDismissible","automations","classic","setClassic","updateClassic","public_id","public_hostname","private_id","private_hostname","private_security_key","marginTop","fontSize","stream","setStream","updateStream","video_library_api_key","pull_zone_url","video_library_id","token_auth_key","PublicStream","PrivateStream","Panel","PanelBody","Flex","FlexBlock","Notice","Spinner","step","setStep","progress","setProgress","setError","setURL","exportEmails","apiFetch","method","percentage","currentStep","fetchedURL","initialOpen","align","justify","alignItems","optionName","isBorderless","button","text","FlexItem","PanelRow","connected","onConnect","connectButtonText","disconnectButtonText","onDisconnect","setConfirm","isSmall","marginRight","onSubmit","isDestructive","TextControl","placeholder","updateSetting","createHigherOrderComponent","WrappedComponent","success","setSuccess","setIsBusy","setting","setSetting","makeRequest","response","compose","withIntegration","setData","Integration","api_key","headers","setHeaders","updateHeader","index","item","i","icon","_","removeHeader","header","onClose","webhook","saveEntityRecord","setBusy","email_name","form","setForm","updateForm","submit","archived","shouldCloseOnClickOutside","required","autoFocus","margin","Headers","incomingWebhook","setOpen","deleteEntityRecord","queryArgs","getEditedEntityRecord","isDeletingEntityRecord","isDeleting","deleteWebhook","NewWebhook","webhooks","Webhook","semverCompare","require","editBunny","setEditBunny","youtube","setYoutube","updateYoutube","use_existing_tag","measurement_id","nocookie","channel_id","proVersion","ActiveCampaign","FluentCRM","Mailchimp","MailerLite","Webhooks","EmailExport","isSetup","bunny","hls_start_level","disable_legacy_storage","BunnyStream","BunnyClassic","CTA","App","loaded","setLoaded","onhashchange","scrollTo","hasFinishedResolution","role","aria-orientation","General","Integrations","Performance","Notices","document","getElementById"],"mappings":";;;;;;;;;;;;;;;;;iHAAcA,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAc,Y,iBCA1CF,EAAOC,QAAUC,OAAW,GAAW,S,iBCAvCF,EAAOC,QAAUC,OAAW,GAAW,S,gBCAvCF,EAAOC,QAAUC,OAAW,GAAY,U,iBCAxCF,EAAOC,QAAUC,OAAW,GAAY,U,iHCItDC,mBAASC,SAAWC,YAAY,CAC9B,CACEC,KAAM,SACNC,KAAM,gBACNC,MAAOC,aAAG,UAAW,iBACrBC,QAAS,0BACTC,cAAe,CAAEC,QAAS,SAE5B,CACEN,KAAM,eACNC,KAAM,gBACNC,MAAOC,aAAG,gBAAiB,iBAC3BC,QAAS,gCACTC,cAAe,CAAEC,QAAS,SAE5B,CACEN,KAAM,UACNC,KAAM,gBACNC,MAAOC,aAAG,UAAW,iBACrBC,QAAS,2BACTC,cAAe,CAAEC,QAAS,W,yHCvBvB,SAASC,EAAgBC,GAE9B,MAAO,CACLC,KAAMD,EAASE,SACfC,KAAMH,EAASG,KACfC,MAAOC,IAAGC,MAAMN,EAAS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function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"notices\"]; }());","(function() { module.exports = window[\"wp\"][\"compose\"]; }());","(function() { module.exports = window[\"wp\"][\"coreData\"]; }());","(function() { module.exports = window[\"wp\"][\"apiFetch\"]; }());","import { store as coreStore } from \"@wordpress/core-data\";\nimport { dispatch } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\n\ndispatch(coreStore).addEntities([\n {\n name: \"preset\",\n kind: \"presto-player\",\n label: __(\"Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"audio-preset\",\n kind: \"presto-player\",\n label: __(\"Audio Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/audio-preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"webhook\",\n kind: \"presto-player\",\n label: __(\"Webhook\", \"presto-player\"),\n baseURL: \"presto-player/v1/webhook\",\n baseURLParams: { context: \"edit\" },\n },\n]);\n","import qs from \"querystringify\";\nexport function locationToRoute(location) {\n // location comes from the history package\n return {\n path: location.pathname,\n hash: location.hash,\n query: qs.parse(location.search),\n };\n}\n","import { createBrowserHistory } from \"history\";\nimport { locationToRoute } from \"./utils\";\n\nexport const history = createBrowserHistory();\nexport const RouterContext = wp.element.createContext({\n route: locationToRoute(history.location),\n});\n","import { RouterContext } from \"./context\";\nconst { useContext } = wp.element;\nimport { match } from \"path-to-regexp\";\nlet prev = \"\";\n\nexport function Route({ path, onRoute, children }) {\n // Extract route from RouterContext\n const { route } = useContext(RouterContext);\n\n const checkMatch = match(`${path}`);\n const matched = checkMatch(`${route.hash.substr(1)}`);\n\n if (!matched) {\n return null;\n }\n\n if (onRoute) {\n if (prev !== matched.path) {\n onRoute();\n }\n prev = matched.path;\n }\n\n return <div>{wp.element.cloneElement(children, { route: matched })}</div>;\n}\n","const { useContext } = wp.element;\nimport { RouterContext, history } from \"./context\";\nimport classNames from \"classnames\";\nimport { match } from \"path-to-regexp\";\n\nexport function Link(props) {\n const { to, onClick, children, activeClassName } = props;\n const { route } = useContext(RouterContext);\n\n let state = { ...props };\n delete state.activeClassName;\n\n const isActive = () => {\n const checkMatch = match(`${to}`);\n return checkMatch(`${route.hash.substr(1)}`);\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n // Dont' navigate if current path\n if (route.path === to) {\n return;\n }\n // Trigger onClick prop manually\n if (onClick) {\n onClick(e);\n }\n const { search } = history.location;\n\n // Use history API to navigate page\n history.push(`${search}#${to}`);\n };\n\n return (\n <a\n {...state}\n className={classNames({ [activeClassName]: isActive() }, props.className)}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n}\n","import { Component } from \"@wordpress/element\";\nimport { locationToRoute } from \"./utils\";\nimport { history, RouterContext } from \"./context\";\nimport { Route } from \"./route\";\nimport { Link } from \"./link\";\nimport { match } from \"path-to-regexp\";\n\nclass Router extends Component {\n constructor(props) {\n super(props);\n\n // Convert our routes into an array for easy 404 checking\n this.routes = Object.keys(props.routes).map(\n (key) => props.routes[key].path\n );\n\n // Listen for path changes from the history API\n this.unlisten = history.listen(this.handleRouteChange);\n\n const route = locationToRoute(history.location);\n const { search } = history.location;\n\n // Define the initial RouterContext value\n this.state = {\n route,\n defaultRoute: props?.defaultRoute\n ? `${search}#${props?.defaultRoute}`\n : `${search}#/`,\n };\n }\n\n componentWillUnmount() {\n // Stop listening for changes if the Router component unmounts\n this.unlisten();\n }\n\n handleRouteChange = (location) => {\n const route = locationToRoute(location?.location);\n this.setState({ route: route });\n };\n\n render() {\n // Define our variables\n const { children, NotFound } = this.props;\n const { route, defaultRoute } = this.state;\n\n if (!route.hash) {\n history.push(defaultRoute);\n return <div></div>;\n }\n\n let matched = false;\n // match route\n (this.routes || []).forEach((name) => {\n const checkMatch = match(route.hash.substr(1));\n const isMatched = checkMatch(`${route.hash.substr(1)}`);\n if (!isMatched) {\n return;\n }\n matched = {\n name,\n data: isMatched,\n };\n });\n\n const routerContextValue = { route, matched };\n\n // Check if 404 if no route matched\n const is404 = !matched;\n\n return (\n <RouterContext.Provider value={routerContextValue}>\n {is404 ? <div>Not found</div> : children}\n </RouterContext.Provider>\n );\n }\n}\nexport { history, RouterContext, Router, Route, Link };\n","export const routes = {\n general: {\n path: \"general\",\n },\n integrations: {\n path: \"/integrations\",\n },\n performance: {\n path: \"/performance\",\n },\n};\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { Button } from \"@wordpress/components\";\n\nexport default function SaveButton({\n onSave,\n children,\n busy,\n loading,\n ...rest\n}) {\n const { isDirty, isSaving } = useSelect((select) => {\n const {\n __experimentalGetDirtyEntityRecords,\n isSavingEntityRecord,\n } = select(coreStore);\n\n const dirtyEntityRecords = (\n __experimentalGetDirtyEntityRecords() || []\n ).filter((r) => r.name !== \"webhook\");\n\n return {\n isDirty: dirtyEntityRecords.length > 0,\n isSaving: dirtyEntityRecords.some((record) =>\n isSavingEntityRecord(record.kind, record.name, record.key)\n ),\n };\n }, []);\n\n const disabled = !isDirty || isSaving;\n\n if (loading) {\n return (\n <ScSkeleton\n style={{\n width: \"120px\",\n height: \"35px\",\n display: \"inline-block\",\n }}\n ></ScSkeleton>\n );\n }\n\n return (\n <Button\n isPrimary\n aria-disabled={disabled}\n disabled={disabled || isSaving || busy}\n isBusy={isSaving || busy}\n onClick={disabled ? undefined : onSave}\n {...rest}\n >\n {children}\n </Button>\n );\n}\n","import { SnackbarList } from \"@wordpress/components\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\n\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nexport default ({ className }) => {\n const notices = useSelect((select) => select(noticesStore).getNotices());\n const { removeNotice } = useDispatch(noticesStore);\n const snackbarNotices = notices.filter(({ type }) => type === \"snackbar\");\n\n return (\n <SnackbarList\n notices={snackbarNotices}\n className={className}\n onRemove={removeNotice}\n />\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { select, useDispatch } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\n\nexport default function useSave() {\n const { saveEditedEntityRecord } = useDispatch(coreStore);\n\n /**\n * Handle the form submission\n */\n const save = async () => {\n // build up pending records to save.\n const dirtyRecords = select(\n coreStore\n ).__experimentalGetDirtyEntityRecords();\n const pendingSavedRecords = [];\n\n dirtyRecords.forEach(({ kind, name, key }) => {\n pendingSavedRecords.push(\n saveEditedEntityRecord(kind, name, key, {\n throwOnError: true,\n })\n );\n });\n\n // check values.\n const values = await Promise.all(pendingSavedRecords);\n if (values.some((value) => typeof value === \"undefined\")) {\n throw { message: \"Saving failed.\" };\n }\n\n return true;\n };\n\n return {\n save,\n };\n}\n","const { __ } = wp.i18n;\nconst { useState } = wp.element;\nconst { Modal, Button } = wp.components;\n\nexport default ({ children, disabled }) => {\n const [dialog, setDialog] = useState(false);\n\n if (!disabled) {\n return <div>{children}</div>;\n }\n\n return (\n <div>\n <div\n className=\"presto-options__disabled-overlay\"\n onClick={(e) => {\n setDialog(true);\n e.preventDefault();\n return false;\n }}\n >\n <div>{children}</div>\n </div>\n {!!dialog && (\n <Modal title={disabled?.title} onRequestClose={() => setDialog(false)}>\n <h2>{disabled?.heading}</h2>\n <p>{disabled?.message}</p>\n <Button href={disabled?.link} target=\"_blank\" isPrimary>\n {__(\"Learn More\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nconst { Card, CardBody, CardFooter } = wp.components;\nimport SaveButton from \"./SaveButton\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport Disabled from \"./Disabled\";\nimport useSave from \"../../../hooks/useSave\";\n\nexport default ({ title, description, children, disabled, hideSaveButton }) => {\n const { save } = useSave();\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n /**\n * Form is submitted.\n */\n const onSave = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\")\n );\n }\n };\n\n return (\n <Disabled disabled={disabled}>\n <Card size=\"large\" className=\"presto-options__card\">\n <CardBody className={`presto-options__card-body`}>\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"2em\" }}>\n <div\n className=\"presto-flow\"\n style={{ \"--presto-flow-space\": \"1em\" }}\n >\n {title && (\n <h2 style={{ marginBottom: 0 }}>\n {title}{\" \"}\n {!!disabled && (\n <div className=\"presto-options__pro-badge\">Pro</div>\n )}\n </h2>\n )}\n {description && <p>{description}</p>}\n </div>\n <div>{children}</div>\n </div>\n </CardBody>\n {!hideSaveButton ? (\n <CardFooter isShady>\n <div>\n <SaveButton onSave={onSave}>{__(\"Update Settings\")}</SaveButton>\n </div>\n </CardFooter>\n ) : (\n <br />\n )}\n </Card>\n </Disabled>\n );\n};\n","const { __ } = wp.i18n;\n\nconst { Button, BaseControl } = wp.components;\nconst { MediaUpload } = wp.mediaUtils;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default ({\n option,\n label,\n help,\n allowedTypes,\n value,\n className,\n maxWidth,\n onSelect,\n}) => {\n return (\n <div\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n >\n <BaseControl className=\"editor-video-poster-control\">\n <BaseControl.VisualLabel>{label}</BaseControl.VisualLabel>\n {value && (\n <BaseControl>\n <img\n style={{\n maxWidth,\n border: \"1px solid #dcdcdc\",\n }}\n src={value}\n />\n </BaseControl>\n )}\n <br />\n <MediaUpload\n title={help}\n onSelect={onSelect}\n allowedTypes={allowedTypes}\n render={({ open }) => (\n <Button\n isSecondary\n onClick={open}\n className={!value ? \"button-select\" : \"button-replace\"}\n >\n {!value\n ? __(\"Select\", \"presto-player\")\n : __(\"Replace\", \"presto-player\")}\n </Button>\n )}\n />{\" \"}\n <p id={`video-block__logo-image-description-${option?.id}`} hidden>\n {value\n ? sprintf(\n /* translators: %s: poster image URL. */\n __(\"The current logo image url is %s\", \"presto-player\"),\n value\n )\n : __(\"There is no logo image currently selected\", \"presto-player\")}\n </p>\n {!!value && (\n <Button onClick={() => onSelect(\"\")} isTertiary>\n {__(\"Remove\", \"presto-player\")}\n </Button>\n )}\n </BaseControl>\n <br />\n </div>\n );\n};\n","export default ({ children, title, description }) => {\n return (\n <div className=\"presto-flow presto-settings__page\">\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"1em\" }}>\n {title && <h1>{title}</h1>}\n {description && <p>{description}</p>}\n </div>\n\n <div className=\"presto-settings__body \">\n <div className=\"presto-flow\">{children}</div>\n </div>\n </div>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\nimport { BaseControl } from \"@wordpress/components\";\nimport { useEffect, useRef } from \"@wordpress/element\";\nimport classNames from \"classnames\";\n\nexport default ({ option, value, className, disabled, onChange }) => {\n let codeMirror;\n\n const handleChange = (instance) => {\n if (disabled) {\n return;\n }\n instance.save();\n onChange(textRef.current.value);\n };\n\n const textRef = useRef();\n useEffect(() => {\n if (!wp?.CodeMirror) {\n return;\n }\n codeMirror = wp.CodeMirror.fromTextArea(textRef.current, {\n type: \"text/css\",\n lineNumbers: true,\n });\n\n codeMirror.on(\"change\", handleChange);\n }, []);\n\n return (\n <div className={classNames(className, \"presto-settings__setting\")}>\n <BaseControl\n css={css`\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n `}\n label={option?.name}\n help={option?.help}\n >\n <textarea onChange={handleChange} ref={textRef} rows=\"5\" disabled>\n {value}\n </textarea>\n </BaseControl>\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp, store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport {\n ColorPicker,\n ComboboxControl,\n ToggleControl,\n RangeControl,\n Spinner,\n} from \"@wordpress/components\";\nimport Disabled from \"../components/Disabled\";\nimport Group from \"../components/Group\";\nimport Media from \"../components/Media\";\nimport Page from \"../components/Page\";\nimport CodeMirror from \"../components/CodeMirror\";\n\nexport default () => {\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const {\n presets,\n loadingPresets,\n audioPresets,\n loadingAudioPresets,\n } = useSelect((select) => {\n const presetArgs = [\"presto-player\", \"preset\"];\n const audioPresetArgs = [\"presto-player\", \"audio-preset\"];\n return {\n presets: select(coreStore).getEntityRecords(...presetArgs),\n loadingPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n presetArgs\n ),\n audioPresets: select(coreStore).getEntityRecords(...audioPresetArgs),\n loadingAudioPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n audioPresetArgs\n ),\n };\n }, []);\n\n const [presetSettings, setPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_presets\"\n );\n const updatePresetSettings = (data) => {\n setPresetSettings({\n ...(presetSettings || {}),\n ...data,\n });\n };\n\n const [audioPresetSettings, setAudioPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_audio_presets\"\n );\n const updateAudioPresetSettings = (data) => {\n setAudioPresetSettings({\n ...(audioPresetSettings || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [branding, setBranding] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_branding\"\n );\n const updateBranding = (data) => {\n setBranding({\n ...(branding || {}),\n ...data,\n });\n };\n\n const [uninstall, setUninstall] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_uninstall\"\n );\n const updateUninstall = (data) => {\n setUninstall({\n ...(uninstall || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"General\", \"presto-player\")}\n description={__(\n \"Branding, analytics and uninstall data.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Branding\", \"presto-player\")}\n description={__(\"Global player branding options\", \"presto-player\")}\n >\n <Disabled disabled={disabled()}>\n <Media\n className={\"presto-player__setting--logo\"}\n label={\n <>\n {__(\"Logo\", \"presto-player\")}{\" \"}\n {disabled() && (\n <span className=\"presto-options__pro-badge\">\n {__(\"Pro\", \"presto-player\")}\n </span>\n )}\n </>\n }\n onSelect={(image) => updateBranding({ logo: image?.url })}\n maxWidth={branding?.logo_width || 150}\n value={branding?.logo}\n />\n\n <div style={{ maxWidth: \"500px\" }}>\n <RangeControl\n className={\"presto-player__setting--logo-width\"}\n label={__(\"Logo Max Width\", \"presto-player\")}\n value={branding?.logo_width || 150}\n onChange={(logo_width) => updateBranding({ logo_width })}\n min={1}\n max={400}\n />\n </div>\n </Disabled>\n <ColorPicker\n className={\"presto-player__setting--brand-color\"}\n onChangeComplete={(value) => updateBranding({ color: value.hex })}\n color={branding?.color}\n />\n </Group>\n <Group\n title={__(\"Analytics\", \"presto-player\")}\n disabled={disabled()}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--analytics-enable\"}\n label={__(\"Enable\", \"presto-player\")}\n help={__(\"Enable view analytics for your media\", \"presto-player\")}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n {!!analytics?.enable && (\n <ToggleControl\n label={__(\"Auto-Purge Data (recommended)\")}\n help={__(\n \"Automatically purge data older than 90 days.\",\n \"presto-player\"\n )}\n className={\"presto-player__setting--analytics-enable\"}\n checked={\n analytics?.purge_data !== undefined\n ? analytics?.purge_data\n : true\n }\n onChange={(purge_data) => updateAnalytics({ purge_data })}\n />\n )}\n </div>\n </Group>\n <Group\n title={__(\"Presets\", \"presto-player\")}\n disabled={disabled()}\n description={__(\"Media presets settings.\", \"presto-player\")}\n >\n {!!loadingPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for video.\", \"presto-player\")}\n value={presetSettings?.default_player_preset}\n options={(presets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updatePresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n\n {!!loadingAudioPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for audio.\", \"presto-player\")}\n value={audioPresetSettings?.default_player_preset}\n options={(audioPresets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updateAudioPresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n </Group>\n <Group\n disabled={disabled()}\n title={__(\"Custom CSS\", \"presto-player\")}\n description={__(\n \"Quickly add custom css to the player web component.\",\n \"presto-player\"\n )}\n >\n <CodeMirror\n disabled={!prestoPlayer?.isPremium}\n option={{ id: \"player_css\" }}\n value={branding?.player_css}\n key={branding?.player_css}\n onChange={(player_css) => updateBranding({ player_css })}\n />\n </Group>\n <Group\n title={__(\"Uninstall Options\", \"presto-player\")}\n description={__(\n \"Options to remove data on uninstall.\",\n \"presto-player\"\n )}\n >\n <ToggleControl\n label={__(\"Remove data on uninstall\")}\n help={__(\"This removes all data on uninstall.\", \"presto-player\")}\n className=\"presto-player__setting--uninstall\"\n checked={uninstall?.uninstall_data}\n onChange={(uninstall_data) => {\n if (uninstall_data) {\n const r = confirm(\n __(\n \"Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!\",\n \"presto-player\"\n )\n );\n if (!r) return;\n }\n updateUninstall({ uninstall_data });\n }}\n />\n </Group>\n </Page>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\n\nimport { __ } from \"@wordpress/i18n\";\nimport { Notice, ExternalLink, ToggleControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\n\nexport default () => {\n const [performance, setPerformance] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_performance\"\n );\n const updatePerformance = (data) => {\n setPerformance({\n ...(performance || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"Performance\", \"presto-player\")}\n description={__(\"Player performance preferences.\", \"presto-player\")}\n >\n <Group\n title={__(\"Performance\", \"presto-player\")}\n description={__(\n \"Performance options for player loading.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--module-enabled\"}\n label={__(\"Dynamically Load JavaScript\", \"presto-player\")}\n help={__(\n \"Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.\",\n \"presto-player\"\n )}\n checked={performance?.module_enabled}\n onChange={(module_enabled) => updatePerformance({ module_enabled })}\n />\n\n {!!performance?.module_enabled && (\n <Notice\n css={css`\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n `}\n className=\"presto-notice\"\n status=\"info\"\n isDismissible={false}\n >\n <div>\n <strong>{__(\"Please Note\", \"presto-player\")}</strong>\n </div>\n <div>\n {__(\n \"You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting\">\n {__(\"Learn More\", \"presto-player\")}\n </ExternalLink>\n </div>\n </Notice>\n )}\n </div>\n\n <ToggleControl\n className={\"presto-player__setting--automations\"}\n label={__(\n \"Enable Ajax Requests for Progress Integrations\",\n \"presto-player\"\n )}\n help={__(\n \"Keep this on unless you do not plan on using automation, LMS or membership integrations.\",\n \"presto-player\"\n )}\n checked={performance?.automations}\n onChange={(automations) => updatePerformance({ automations })}\n />\n </Group>\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [classic, setClassic] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_pull_zones\"\n );\n const updateClassic = (data) => {\n setClassic({\n ...(classic || {}),\n ...data,\n });\n };\n\n const {\n public_id,\n public_hostname,\n private_id,\n private_hostname,\n private_security_key,\n } = classic || {};\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Storage (Classic)\", \"presto-player\")}\n </h2>\n <p style={{ fontSize: \"12px\", color: \"#757575\" }}>\n {__(\n 'Note: To Change your API key, please click \"Reconnect\" from a bunny block.',\n \"presto-player\"\n )}\n </p>\n\n <TextControl\n label={__(\"Public ID\", \"presto-player\")}\n help={__(\"The ID of the public pull zone to use.\", \"presto-player\")}\n value={public_id}\n onChange={(public_id) => updateClassic({ public_id })}\n />\n\n <TextControl\n label={__(\"Public Host Name\", \"presto-player\")}\n help={__(\"The hostname to use for this pullzone.\", \"presto-player\")}\n value={public_hostname}\n onChange={(public_hostname) => updateClassic({ public_hostname })}\n />\n\n <TextControl\n label={__(\"Private ID\", \"presto-player\")}\n help={__(\"The ID of the private pull zone to use.\", \"presto-player\")}\n value={private_id}\n onChange={(private_id) => updateClassic({ private_id })}\n />\n\n <TextControl\n label={__(\"Private Host Name\", \"presto-player\")}\n help={__(\n \"The hostname to use for the private pullzone.\",\n \"presto-player\"\n )}\n value={private_hostname}\n onChange={(private_hostname) => updateClassic({ private_hostname })}\n />\n\n <TextControl\n label={__(\"Private Url Token Authentication Key\", \"presto-player\")}\n help={__(\n \"Update the security token used to sign private urls.\",\n \"presto-player\"\n )}\n type=\"password\"\n value={private_security_key}\n onChange={(private_security_key) =>\n updateClassic({ private_security_key })\n }\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const { video_library_api_key, pull_zone_url, video_library_id } =\n stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Public Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Public Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Public Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_private\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const {\n video_library_api_key,\n pull_zone_url,\n video_library_id,\n token_auth_key,\n } = stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Private Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Private Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Private Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n\n <TextControl\n label={__(\"Private Stream Token Authentication Key\", \"presto-player\")}\n help={__(\n \"The token authentication key used to sign private urls.\",\n \"presto-player\"\n )}\n value={token_auth_key}\n onChange={(token_auth_key) => updateStream({ token_auth_key })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport PublicStream from \"./PublicStream\";\nimport PrivateStream from \"./PrivateStream\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n\n if (!stream) return null;\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Stream\", \"presto-player\")}\n </h2>\n <PublicStream />\n <PrivateStream />\n </>\n );\n};\n","const { __ } = wp.i18n;\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n FlexBlock,\n Notice,\n Spinner,\n} = wp.components;\nconst { useState, useEffect } = wp.element;\n\nexport default () => {\n const [step, setStep] = useState(0);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState(\"\");\n const [url, setURL] = useState(0);\n\n const exportEmails = async () => {\n setError(\"\");\n try {\n const {\n percentage,\n step: currentStep,\n url: fetchedURL,\n } = await wp.apiFetch({\n path: \"/presto-player/v1/email/export\",\n method: \"post\",\n data: {\n step,\n },\n });\n\n setStep(currentStep);\n setProgress(percentage);\n setURL(fetchedURL);\n } catch (e) {\n setProgress(0);\n setError(e?.message || __(\"Something went wrong\", \"presto-player\"));\n }\n };\n\n useEffect(() => {\n if (step && step != \"done\") {\n exportEmails();\n }\n }, [step]);\n\n useEffect(() => {\n if (url) {\n window.open(url);\n }\n }, [url]);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Other\", \"presto-player\")}</FlexBlock>\n </Flex>\n }\n initialOpen={false}\n >\n <h2>{__(\"Manual Export\", \"presto-player\")}</h2>\n <p>\n {__(\n \"Using a service not listed here? You can export contacts and manually upload them to a service.\",\n \"presto-player\"\n )}\n </p>\n {error && (\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n )}\n <Flex align=\"center\" justify=\"flex-start\">\n <Button\n isPrimary\n onClick={(e) => {\n setStep(1);\n setProgress(1);\n e.preventDefault();\n }}\n >\n {__(\"Download CSV File\", \"presto-player\")}\n </Button>\n {!!progress && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Spinner style={{ marginTop: 0 }} />\n <span>Exporting... {progress}% Complete</span>\n </div>\n )}\n </Flex>\n </PanelBody>\n </Panel>\n );\n};\n","const { Button, Card, CardBody } = wp.components;\nconst { dispatch } = wp.data;\n\nexport default ({ option, value, optionName, className }) => {\n return (\n <Card isBorderless className={className}>\n <CardBody isShady>\n {!!option?.name && <h2>{option.name}</h2>}\n {!!option.help && <p>{option.help}</p>}\n {!!option?.button?.text && (\n <Button\n isPrimary\n target={option?.button?.target}\n href={option?.button?.link}\n >\n {option.button.text}\n </Button>\n )}\n </CardBody>\n </Card>\n );\n};\n","const { __ } = wp.i18n;\n\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n Modal,\n FlexBlock,\n FlexItem,\n PanelRow,\n} = wp.components;\n\nconst { useState } = wp.element;\n\nexport default ({\n connected,\n title,\n children,\n onConnect,\n isBusy,\n connectButtonText,\n disconnectButtonText,\n onDisconnect,\n}) => {\n const [confirm, setConfirm] = useState(false);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{title}</FlexBlock>\n <FlexItem>\n {connected ? (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {__(\"Connected\", \"presto-player\")}\n </Button>\n ) : (\n <Button isSmall isSecondary style={{ marginRight: \"30px\" }}>\n {__(\"Not Connected\", \"presto-player\")}\n </Button>\n )}\n </FlexItem>\n </Flex>\n }\n initialOpen={false}\n >\n <form\n onSubmit={(e) => {\n e.preventDefault();\n onConnect();\n }}\n disabled={isBusy}\n >\n {children}\n <PanelRow>\n <div>\n {!connected ? (\n <Button\n isPrimary\n isBusy={isBusy}\n disabled={isBusy}\n type=\"submit\"\n >\n {connectButtonText\n ? connectButtonText\n : __(\"Connect\", \"presto-player\")}\n </Button>\n ) : (\n <div>\n {\" \"}\n <Button\n isSecondary\n isBusy={isBusy}\n disabled={isBusy}\n onClick={(e) => {\n e.preventDefault();\n setConfirm(true);\n }}\n >\n {disconnectButtonText\n ? disconnectButtonText\n : __(\"Disconnect\", \"presto-player\")}\n </Button>\n </div>\n )}\n </div>\n </PanelRow>\n </form>\n </PanelBody>\n\n {confirm && (\n <Modal\n className=\"presto-player__modal-confirm\"\n title={__(\"Are you sure?\", \"presto-player\")}\n style={{ \"max-width\": \"350px\" }}\n onRequestClose={() => setConfirm(false)}\n >\n <p>\n {__(\n \"Are you sure you want to disconnect this integration?\",\n \"presto-player\"\n )}\n </p>\n <Button\n className=\"presto-player__modal-confirm-button\"\n isDestructive\n onClick={() => {\n onDisconnect && onDisconnect();\n setConfirm(false);\n }}\n >\n {__(\"Disconnect\", \"presto-player\")}\n </Button>\n <Button onClick={() => setConfirm(false)}>\n {__(\"Cancel\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </Panel>\n );\n};\n","const { TextControl } = wp.components;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default (props) => {\n const { option, value, optionName, className } = props;\n return (\n <div className=\"presto-settings__setting is-text-control\">\n <TextControl\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n label={option?.name}\n value={value}\n type={option?.type}\n help={option?.help}\n placeholder={option?.placeholder}\n onChange={(value) =>\n dispatch(\"presto-player/settings\").updateSetting(\n option.id,\n value,\n optionName\n )\n }\n {...props}\n />\n </div>\n );\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from \"@wordpress/i18n\";\nimport { useState } from \"@wordpress/element\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\n/**\n * Higher order component factory\n *\n * @return {Function} The higher order component.\n */\nexport default ({ name }) =>\n createHigherOrderComponent(\n (WrappedComponent) => (props) => {\n const [error, setError] = useState(\"\");\n const [success, setSuccess] = useState(\"\");\n const [isBusy, setIsBusy] = useState(false);\n\n const [setting, setSetting] = useEntityProp(\"root\", \"site\", name);\n const updateSetting = (data) => {\n setSetting({\n ...(setting || {}),\n ...data,\n });\n };\n\n const makeRequest = async ({\n path,\n data = {},\n message = __(\"Success\", \"presto-player\"),\n success,\n error,\n }) => {\n setError(\"\");\n setSuccess(\"\");\n setIsBusy(true);\n\n try {\n let response = await apiFetch({\n path,\n method: \"post\",\n data,\n });\n success && success(response);\n setSuccess(message);\n } catch (e) {\n if (e?.message) {\n setError(e.message);\n error && error(e);\n }\n } finally {\n setIsBusy(false);\n }\n };\n\n return (\n <WrappedComponent\n success={success}\n setSuccess={setSuccess}\n setError={setError}\n error={error}\n isBusy={isBusy}\n setting={setting}\n updateSetting={updateSetting}\n makeRequest={makeRequest}\n {...props}\n />\n );\n },\n \"withIntegration\"\n );\n","import { __ } from \"@wordpress/i18n\";\nimport { BaseControl, PanelRow, Notice } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([\n withIntegration({ name: \"presto_player_activecampaign\" }),\n])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/connect\",\n data: { api_key: setting?.api_key, url: setting?.url },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"ActiveCampaign\")}\n connected={setting?.connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n label={__(\"Your ActiveCampaign Url\", \"presto-player\")}\n type=\"url\"\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.url}\n onChange={(url) => updateSetting({ url })}\n />\n <TextControl\n label={__(\"Your ActiveCampaign API key\", \"presto-player\")}\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import { Notice, PanelRow } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_fluentcrm\" })])(\n ({ error, setError, isBusy, makeRequest, setting, updateSetting }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const { connected } = setting || {};\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/connect\",\n message: __(\"Installed and connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/disconnect\",\n message: __(\"Deactivated\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"FluentCRM\")}\n connected={connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n connectButtonText={__(\"Install FluentCRM Plugin\", \"presto-player\")}\n disconnectButtonText={__(\n \"Deactivate FluentCRM Plugin\",\n \"presto-player\"\n )}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {connected && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n isDismissible={false}\n >\n {__(\"Installed and connected!\", \"presto-player\")}\n </Notice>\n </PanelRow>\n )}\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailchimp\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n return (\n <Integration\n title={__(\"Mailchimp\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailchimp-api_key\"\n label={__(\"Your Mailchimp API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your mailchimp account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://us11.admin.mailchimp.com/account/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailerlite\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"Mailerlite\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailerlite-api_key\"\n label={__(\"Your MailerLite API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your MailerLite account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://app.mailerlite.com/integrations/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n Button,\n Flex,\n TextControl,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { __ } from \"@wordpress/i18n\";\n\nexport default ({ headers, setHeaders }) => {\n const updateHeaders = (data) => {\n setHeaders([...(headers || []), ...data]);\n };\n\n const addHeader = (header) => {\n setHeaders([...(headers || []), ...[header]]);\n };\n const updateHeader = (data, index) => {\n setHeaders(\n (headers || []).map((item, i) => {\n if (i !== index) {\n // This isn't the item we care about - keep it as-is\n return item;\n }\n\n // Otherwise, this is the one we want - return an updated value\n return {\n ...item,\n ...data,\n };\n })\n );\n };\n\n const removeHeader = (index) =>\n setHeaders((headers || []).filter((_, i) => i !== index));\n\n return (\n <>\n {(headers || []).map(({ name, value }, index) => {\n return (\n <Flex key={index} align=\"center\">\n <TextControl\n placeholder={__(\"Header Name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateHeader({ name }, index)}\n />\n <TextControl\n placeholder={__(\"New Value\", \"presto-player\")}\n value={value}\n onChange={(value) => updateHeader({ value }, index)}\n />\n <BaseControl>\n <ToolbarButton icon=\"trash\" onClick={() => removeHeader(index)} />\n </BaseControl>\n </Flex>\n );\n })}\n\n <div>\n <Button\n isSecondary\n isSmall\n onClick={() => addHeader({ name: \"\", value: \"\" })}\n >\n {__(\"Add Header\", \"presto-player\")}\n </Button>\n </div>\n </>\n );\n};\n","import { css, jsx } from \"@emotion/core\";\n/** @jsx jsx */\nimport {\n BaseControl,\n Button,\n Card,\n CardBody,\n Flex,\n Modal,\n SelectControl,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport Headers from \"./Headers\";\n\nexport default ({ onClose, webhook }) => {\n const { saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [busy, setBusy] = useState(false);\n\n const sectionCSS = { margin: \"0 0 1.5rem\" };\n\n const [form, setForm] = useState(\n webhook || {\n email_name: \"email\",\n method: \"POST\",\n }\n );\n\n const updateForm = (data) => {\n setForm({\n ...(form || {}),\n ...data,\n });\n };\n\n const { name, url, method, email_name, headers, archived } = form;\n\n const submit = async (e) => {\n try {\n e.preventDefault();\n setBusy(true);\n await saveEntityRecord(\"presto-player\", \"webhook\", {\n ...form,\n });\n createSuccessNotice(\n form?.id\n ? __(\"Webhook updated\", \"presto-player\")\n : __(\"Webhook created.\", \"presto-player\"),\n {\n type: \"snackbar\",\n }\n );\n onClose();\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong.\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Modal\n title={\n form?.id\n ? __(\"Edit Webhook\", \"presto-player\")\n : __(\"Add A Webhook\", \"presto-player\")\n }\n onRequestClose={onClose}\n shouldCloseOnClickOutside={false}\n >\n <form onSubmit={submit}>\n <TextControl\n label={__(\"Name\", \"presto-player\")}\n placeholder={__(\"Webhook feed name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateForm({ name })}\n required\n autoFocus\n />\n\n <TextControl\n label={__(\"Request URL\", \"presto-player\")}\n placeholder={__(\"Webhook URL\", \"presto-player\")}\n type=\"url\"\n value={url}\n onChange={(url) => updateForm({ url })}\n required\n />\n\n <SelectControl\n label={__(\"Request Method\", \"presto-player\")}\n value={method}\n options={[\n { label: \"GET\", value: \"GET\" },\n { label: \"POST\", value: \"POST\" },\n { label: \"PUT\", value: \"PUT\" },\n ]}\n onChange={(method) => updateForm({ method })}\n required\n />\n\n <TextControl\n label={__(\"Email Name\", \"presto-player\")}\n placeholder={__(\"The name (key) of the email sent.\", \"presto-player\")}\n value={email_name}\n onChange={(email_name) => updateForm({ email_name })}\n required\n />\n\n <div css={sectionCSS}>\n <BaseControl.VisualLabel>\n {__(\"Headers\", \"presto-player\")}\n </BaseControl.VisualLabel>\n <Headers\n headers={headers}\n setHeaders={(headers) => updateForm({ headers })}\n />\n </div>\n\n <Button isPrimary type=\"submit\" isBusy={busy}>\n {form?.id\n ? __(\"Update\", \"presto-player\")\n : __(\"Create\", \"presto-player\")}\n </Button>\n </form>\n </Modal>\n );\n};\n","import {\n Card,\n CardBody,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { select, useDispatch, useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport NewWebhook from \"./NewWebhook\";\n\nexport default ({ webhook: incomingWebhook }) => {\n const [busy, setBusy] = useState(false);\n const [open, setOpen] = useState(false);\n const { deleteEntityRecord, saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n const { webhook, loading, isSaving, isDeleting } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\", incomingWebhook?.id];\n const {\n getEditedEntityRecord,\n isSavingEntityRecord,\n isDeletingEntityRecord,\n } = select(coreStore);\n return {\n webhook: getEditedEntityRecord(...queryArgs),\n loading: select(coreStore).isResolving(\n \"getEditedEntityRecord\",\n queryArgs\n ),\n isSaving: isSavingEntityRecord(...queryArgs),\n isDeleting: isDeletingEntityRecord(...queryArgs),\n };\n }, []);\n\n const { name, url } = webhook || {};\n\n const deleteWebhook = async () => {\n try {\n const r = confirm(\n __(\"Are you sure you want to delete this webhook?\", \"presto-player\")\n );\n if (!r) return;\n await deleteEntityRecord(\n \"presto-player\",\n \"webhook\",\n webhook?.id,\n undefined,\n { throwOnError: true }\n );\n createSuccessNotice(__(\"Webhook deleted.\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n if (loading) {\n return <Spinner />;\n }\n\n return (\n <Card>\n <CardBody>\n <Flex align=\"center\">\n <FlexBlock>\n <strong>{name || __(\"Untitled webhook\", \"presto-player\")}</strong>\n <br />\n {url}\n </FlexBlock>\n <FlexItem>\n <Flex align=\"center\">\n {isSaving || isDeleting ? (\n <Spinner />\n ) : (\n <>\n <ToolbarButton\n icon=\"edit\"\n label=\"Edit\"\n onClick={() => setOpen(true)}\n />\n <ToolbarButton\n icon=\"trash\"\n label={__(\"Delete\", \"presto-player\")}\n onClick={deleteWebhook}\n />\n </>\n )}\n </Flex>\n </FlexItem>\n </Flex>\n </CardBody>\n {open && (\n <NewWebhook onClose={() => setOpen(false)} webhook={incomingWebhook} />\n )}\n </Card>\n );\n};\n","import {\n Button,\n Flex,\n FlexBlock,\n Panel,\n PanelBody,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __, _n, sprintf } from \"@wordpress/i18n\";\n\nimport NewWebhook from \"./NewWebhook\";\nimport Webhook from \"./Webhook\";\n\nexport default () => {\n const [open, setOpen] = useState(false);\n const { webhooks, loading } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\"];\n return {\n webhooks: select(coreStore).getEntityRecords(...queryArgs),\n loading: select(coreStore).isResolving(\"getEntityRecords\", queryArgs),\n };\n }, []);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Webhooks\", \"presto-player\")}</FlexBlock>\n {!!webhooks?.length && (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {sprintf(__(\"%d connected\"), webhooks?.length)}\n </Button>\n )}\n </Flex>\n }\n initialOpen={false}\n >\n {(webhooks || []).map((webhook) => {\n return (\n <Webhook webhook={webhook} key={webhook?.id} loading={loading} />\n );\n })}\n\n <br />\n\n <Button\n isSecondary\n onClick={() => {\n setOpen(true);\n }}\n >\n {__(\"Create New WebHook\", \"presto-player\")}\n </Button>\n\n {open && <NewWebhook onClose={() => setOpen(false)} />}\n </PanelBody>\n </Panel>\n );\n};\n","import { ExternalLink, TextControl, ToggleControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\n\nconst semverCompare = require(\"semver/functions/compare\");\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\nimport BunnyClassic from \"./parts/BunnyClassic/index\";\nimport BunnyStream from \"./parts/BunnyStream/index\";\nimport EmailExport from \"./parts/EmailExport\";\nimport CTA from \"../components/CTA\";\n\nimport ActiveCampaign from \"./parts/integration/ActiveCampaign\";\nimport FluentCRM from \"./parts/integration/FluentCRM\";\nimport Mailchimp from \"./parts/integration/Mailchimp\";\nimport MailerLite from \"./parts/integration/MailerLite\";\nimport Webhooks from \"./parts/Webhooks/index.js\";\n\nexport default () => {\n const [editBunny, setEditBunny] = useState(false);\n\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_google_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [youtube, setYoutube] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_youtube\"\n );\n const updateYoutube = (data) => {\n setYoutube({\n ...(youtube || {}),\n ...data,\n });\n };\n\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const showEmailIntegration = () => {\n if (!prestoPlayer?.isPremium) {\n return true;\n }\n\n if (\n prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"0.9.0\") >= 0\n ) {\n return true;\n }\n\n return false;\n };\n\n const bunnySettings = () => {\n return (\n <>\n <Group\n title={__(\"Bunny.net Settings\", \"presto-player\")}\n description={__(\"Modify bunny.net settings.\", \"presto-player\")}\n >\n {!!window?.prestoPlayer?.isSetup?.bunny?.stream && (\n <Fragment>\n <TextControl\n label={__(\"Initial Quality Level\", \"presto-player\")}\n help={__(\n \"You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.\",\n \"presto-player\"\n )}\n placeholder={\"480\"}\n type=\"number\"\n value={stream?.hls_start_level}\n onChange={(hls_start_level) =>\n updateStream({ hls_start_level })\n }\n />\n\n {<br />}\n\n <ToggleControl\n label={__(\"Disable Classic Bunny.net Storage\", \"presto-player\")}\n help={__(\n \"This will disable Bunny.net classic storage in your block UI.\",\n \"presto-player\"\n )}\n checked={stream?.disable_legacy_storage}\n onChange={(disable_legacy_storage) =>\n updateStream({ disable_legacy_storage })\n }\n />\n\n {<br />}\n </Fragment>\n )}\n\n <ToggleControl\n label={__(\"Edit Bunny.net Settings\", \"presto-player\")}\n help={__(\n \"Edit Bunny.net connection settings. Only edit this if you know what you're doing.\",\n \"presto-player\"\n )}\n checked={editBunny}\n onChange={setEditBunny}\n />\n\n {!!editBunny && (\n <>\n <BunnyStream />\n <BunnyClassic />\n </>\n )}\n </Group>\n </>\n );\n };\n\n return (\n <Page\n title={__(\"Integrations\", \"presto-player\")}\n description={__(\n \"Third party integrations and connections.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Google Analytics\", \"presto-player\")}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ToggleControl\n className=\"presto-player__setting--google-analytics\"\n label={__(\"Enable\", \"presto-player\")}\n help={__(\n \"Send analytics events to your Google Analytics account.\",\n \"presto-player\"\n )}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n <ToggleControl\n className=\"presto-player__setting--use-existing-tag\"\n label={__(\"Use existing on-page tag?\", \"presto-player\")}\n help={__(\n \"Should we use an existing google analytics (v4) tag? If not, we'll output one for you.\",\n \"presto-player\"\n )}\n checked={analytics?.use_existing_tag}\n onChange={(use_existing_tag) => updateAnalytics({ use_existing_tag })}\n />\n\n <TextControl\n label={__(\"Measurement ID\", \"presto-player\")}\n help={__(\n \"Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.\",\n \"presto-player\"\n )}\n value={analytics?.measurement_id}\n onChange={(measurement_id) => updateAnalytics({ measurement_id })}\n />\n </Group>\n\n <Group\n title={__(\"YouTube\", \"presto-player\")}\n description={__(\"Settings for YouTube videos.\", \"presto-player\")}\n >\n <ToggleControl\n className=\"presto-player__setting--youtube-nocookie\"\n label={__(\"Privacy-Enhanced Mode\", \"presto-player\")}\n help={__(\n \"Embed YouTube videos without using cookies that track viewing behaviour.\",\n \"presto-player\"\n )}\n checked={youtube?.nocookie}\n onChange={(nocookie) => updateYoutube({ nocookie })}\n />\n\n <TextControl\n label={__(\"Channel ID\", \"presto-player\")}\n help={\n <div>\n {__(\n \"Enter the ID of your channel to enable Youtube Subscribe button functionality.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://support.google.com/youtube/answer/3250431?hl=en\">\n {__(\"Find my channel id\", \"presto-player\")}\n </ExternalLink>\n </div>\n }\n value={youtube?.channel_id}\n onChange={(channel_id) => updateYoutube({ channel_id })}\n />\n </Group>\n\n {showEmailIntegration() && (\n <Group\n hideSaveButton={true}\n title={__(\"Email Capture\", \"presto-player\")}\n description={__(\n \"Integrate Presto Player with an email provider for email capture.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ActiveCampaign />\n <FluentCRM />\n <Mailchimp />\n <MailerLite />\n {prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"1.2.0\") >= 0 && (\n <Webhooks />\n )}\n <EmailExport />\n </Group>\n )}\n\n {!window?.prestoPlayer?.isSetup?.bunny ? (\n <Group>\n <CTA\n className=\"presto-player__setting--bunny-cta\"\n option={{\n name: __(\"Bunny.net Video\", \"presto-player\"),\n help: __(\n \"To get started with Bunny.net, add a Bunny.net video to your page.\",\n \"presto-player\"\n ),\n type: \"cta\",\n button: {\n text: \"Learn More\",\n link: \"https://prestoplayer.com/secure-video-with-bunny-net\",\n target: \"_blank\",\n },\n }}\n />\n </Group>\n ) : (\n bunnySettings()\n )}\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport {\n Card,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n} from \"@wordpress/components\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useState, useEffect } from \"@wordpress/element\";\n\nimport { Router, Link, Route } from \"@/router\";\nimport { routes } from \"./routes\";\n\nimport SaveButton from \"./components/SaveButton\";\nimport Notices from \"./components/Notices\";\nimport useSave from \"../../hooks/useSave\";\nimport General from \"./pages/General\";\nimport Performance from \"./pages/Performance\";\nimport Integrations from \"./pages/Integrations\";\n\nfunction App() {\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [loaded, setLoaded] = useState(false);\n\n // scroll top on history change\n window.onhashchange = () => {\n window.scrollTo(0, 0);\n };\n\n const { save } = useSave();\n\n /**\n * Form is submitted.\n */\n const onSubmit = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n const loading = useSelect((select) => {\n const queryArgs = [\"root\", \"site\"];\n select(coreStore).getEntityRecords(...queryArgs);\n return !select(coreStore)?.hasFinishedResolution?.(\n \"getEntityRecords\",\n queryArgs\n );\n });\n\n useEffect(() => {\n if (!loading) {\n setLoaded(true);\n }\n }, [loading]);\n\n if (!loaded) {\n return (\n <div className=\"presto-settings__loading\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"presto-settings\">\n <Router routes={routes} defaultRoute={routes?.general?.path}>\n <Card className=\"presto-settings__navigation\">\n <Flex>\n <FlexBlock>\n <div\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n className=\"components-tab-panel__tabs\"\n >\n <Link\n to={routes?.general?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-general\"\n >\n {__(\"General\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.integrations?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-integrations\"\n >\n {__(\"Integrations\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.performance?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-performance\"\n >\n {__(\"Performance\", \"presto-player\")}\n </Link>\n </div>\n </FlexBlock>\n <FlexItem>\n <SaveButton onSave={onSubmit} style={{ marginRight: \"8px\" }}>\n {__(\"Update Settings\", \"presto-player\")}\n </SaveButton>\n </FlexItem>\n </Flex>\n </Card>\n\n <Route path={routes?.general?.path}>\n <General />\n </Route>\n <Route path={routes?.integrations?.path}>\n <Integrations />\n </Route>\n <Route path={routes?.performance?.path}>\n <Performance />\n </Route>\n </Router>\n\n <Notices className=\"presto-settings-page-notices\" />\n </div>\n );\n}\n\nexport default App;\n","import { render } from \"@wordpress/element\";\n\n/**\n * Redux entities.\n */\nimport \"./entities\";\n\n/**\n * App\n */\nimport App from \"./app\";\n\n/**\n * styles\n */\nimport \"./settings.scss\";\n\n/**\n * Render\n */\nrender(<App />, document.getElementById(\"presto-settings-page\"));\n","(function() { module.exports = window[\"wp\"][\"data\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());"],"sourceRoot":""}
dist/settings/manifest.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "admin.css": "settings/admin-7aab8cd8.css",
3
  "admin.css.map": "settings/admin-7aab8cd8.css.map",
4
- "admin.js": "settings/admin-1aadbb22.js",
5
- "admin.js.map": "settings/admin-1aadbb22.js.map",
6
  "runtime.js": "settings/runtime-e654b653.js",
7
  "runtime.js.map": "settings/runtime-e654b653.js.map",
8
  "vendors--presto-player--admin.js": "settings/vendors--presto-player--admin-23d68b5f.js",
@@ -13,12 +13,12 @@
13
  "js": [
14
  "settings/runtime-e654b653.js",
15
  "settings/vendors--presto-player--admin-23d68b5f.js",
16
- "settings/admin-1aadbb22.js"
17
  ],
18
  "js.map": [
19
  "settings/runtime-e654b653.js.map",
20
  "settings/vendors--presto-player--admin-23d68b5f.js.map",
21
- "settings/admin-1aadbb22.js.map"
22
  ],
23
  "css": [
24
  "settings/admin-7aab8cd8.css"
1
  {
2
  "admin.css": "settings/admin-7aab8cd8.css",
3
  "admin.css.map": "settings/admin-7aab8cd8.css.map",
4
+ "admin.js": "settings/admin-8ab815a4.js",
5
+ "admin.js.map": "settings/admin-8ab815a4.js.map",
6
  "runtime.js": "settings/runtime-e654b653.js",
7
  "runtime.js.map": "settings/runtime-e654b653.js.map",
8
  "vendors--presto-player--admin.js": "settings/vendors--presto-player--admin-23d68b5f.js",
13
  "js": [
14
  "settings/runtime-e654b653.js",
15
  "settings/vendors--presto-player--admin-23d68b5f.js",
16
+ "settings/admin-8ab815a4.js"
17
  ],
18
  "js.map": [
19
  "settings/runtime-e654b653.js.map",
20
  "settings/vendors--presto-player--admin-23d68b5f.js.map",
21
+ "settings/admin-8ab815a4.js.map"
22
  ],
23
  "css": [
24
  "settings/admin-7aab8cd8.css"
languages/presto-player.pot CHANGED
@@ -7,7 +7,7 @@ msgstr ""
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "POT-Creation-Date: 2022-10-21T15:45:55+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.6.0\n"
13
 
@@ -407,7 +407,7 @@ msgstr ""
407
 
408
  #: admin/blocks/blocks/bunny/APIPlaceholder.js:42
409
  #: admin/blocks/blocks/bunny/edit.js:329
410
- #: admin/settings/pages/Integrations.js:264
411
  msgid "Bunny.net Video"
412
  msgstr ""
413
 
@@ -1060,7 +1060,7 @@ msgstr ""
1060
  #: admin/blocks/shared/audioPresets/Edit.js:216
1061
  #: admin/blocks/shared/presets/Edit.js:221
1062
  #: admin/blocks/shared/presets/Email.js:53
1063
- #: admin/settings/pages/Integrations.js:240
1064
  msgid "Email Capture"
1065
  msgstr ""
1066
 
@@ -1430,7 +1430,7 @@ msgstr ""
1430
  #: admin/blocks/shared/presets/Email.js:57
1431
  #: admin/blocks/shared/presets/Watermark.js:57
1432
  #: admin/settings/pages/General.js:173
1433
- #: admin/settings/pages/Integrations.js:173
1434
  msgid "Enable"
1435
  msgstr ""
1436
 
@@ -1806,7 +1806,7 @@ msgid "Youtube Channel ID"
1806
  msgstr ""
1807
 
1808
  #: admin/blocks/shared/presets/parts/YoutubeChannelId.js:72
1809
- #: admin/settings/pages/Integrations.js:228
1810
  msgid "Find my channel id"
1811
  msgstr ""
1812
 
@@ -1995,7 +1995,7 @@ msgid "General"
1995
  msgstr ""
1996
 
1997
  #: admin/settings/app.js:103
1998
- #: admin/settings/pages/Integrations.js:157
1999
  msgid "Integrations"
2000
  msgstr ""
2001
 
@@ -2052,17 +2052,17 @@ msgid "Webhook"
2052
  msgstr ""
2053
 
2054
  #: admin/settings/pages/General.js:23
2055
- #: admin/settings/pages/Integrations.js:68
2056
  msgid "Pro Feature"
2057
  msgstr ""
2058
 
2059
  #: admin/settings/pages/General.js:24
2060
- #: admin/settings/pages/Integrations.js:69
2061
  msgid "Unlock Presto Player Pro"
2062
  msgstr ""
2063
 
2064
  #: admin/settings/pages/General.js:25
2065
- #: admin/settings/pages/Integrations.js:70
2066
  msgid "Get this feature and more with the Pro version of Presto Player!"
2067
  msgstr ""
2068
 
@@ -2083,7 +2083,7 @@ msgid "Logo"
2083
  msgstr ""
2084
 
2085
  #: admin/settings/pages/General.js:165
2086
- #: admin/settings/pages/Integrations.js:165
2087
  msgid "Analytics settings for media plays, watch times and more."
2088
  msgstr ""
2089
 
@@ -2139,96 +2139,96 @@ msgstr ""
2139
  msgid "Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!"
2140
  msgstr ""
2141
 
2142
- #: admin/settings/pages/Integrations.js:97
2143
  msgid "Bunny.net Settings"
2144
  msgstr ""
2145
 
2146
- #: admin/settings/pages/Integrations.js:98
2147
  msgid "Modify bunny.net settings."
2148
  msgstr ""
2149
 
2150
- #: admin/settings/pages/Integrations.js:103
2151
  msgid "Initial Quality Level"
2152
  msgstr ""
2153
 
2154
- #: admin/settings/pages/Integrations.js:104
2155
  msgid "You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream."
2156
  msgstr ""
2157
 
2158
- #: admin/settings/pages/Integrations.js:119
2159
  msgid "Disable Classic Bunny.net Storage"
2160
  msgstr ""
2161
 
2162
- #: admin/settings/pages/Integrations.js:120
2163
  msgid "This will disable Bunny.net classic storage in your block UI."
2164
  msgstr ""
2165
 
2166
- #: admin/settings/pages/Integrations.js:135
2167
  msgid "Edit Bunny.net Settings"
2168
  msgstr ""
2169
 
2170
- #: admin/settings/pages/Integrations.js:136
2171
  msgid "Edit Bunny.net connection settings. Only edit this if you know what you're doing."
2172
  msgstr ""
2173
 
2174
- #: admin/settings/pages/Integrations.js:158
2175
  msgid "Third party integrations and connections."
2176
  msgstr ""
2177
 
2178
- #: admin/settings/pages/Integrations.js:164
2179
  msgid "Google Analytics"
2180
  msgstr ""
2181
 
2182
- #: admin/settings/pages/Integrations.js:174
2183
  msgid "Send analytics events to your Google Analytics account."
2184
  msgstr ""
2185
 
2186
- #: admin/settings/pages/Integrations.js:184
2187
  msgid "Use existing on-page tag?"
2188
  msgstr ""
2189
 
2190
- #: admin/settings/pages/Integrations.js:185
2191
  msgid "Should we use an existing google analytics (v4) tag? If not, we'll output one for you."
2192
  msgstr ""
2193
 
2194
- #: admin/settings/pages/Integrations.js:194
2195
  msgid "Measurement ID"
2196
  msgstr ""
2197
 
2198
- #: admin/settings/pages/Integrations.js:195
2199
  msgid "Enter a Google Analytics Measurement ID, which can be found on your analytics admin page."
2200
  msgstr ""
2201
 
2202
- #: admin/settings/pages/Integrations.js:205
2203
  #: Integrations/Elementor/VideoWidget.php:159
2204
  msgid "YouTube"
2205
  msgstr ""
2206
 
2207
- #: admin/settings/pages/Integrations.js:206
2208
  msgid "Settings for YouTube videos."
2209
  msgstr ""
2210
 
2211
- #: admin/settings/pages/Integrations.js:210
2212
  msgid "Privacy-Enhanced Mode"
2213
  msgstr ""
2214
 
2215
- #: admin/settings/pages/Integrations.js:211
2216
  msgid "Embed YouTube videos without using cookies that track viewing behaviour."
2217
  msgstr ""
2218
 
2219
- #: admin/settings/pages/Integrations.js:220
2220
  msgid "Channel ID"
2221
  msgstr ""
2222
 
2223
- #: admin/settings/pages/Integrations.js:223
2224
  msgid "Enter the ID of your channel to enable Youtube Subscribe button functionality."
2225
  msgstr ""
2226
 
2227
- #: admin/settings/pages/Integrations.js:241
2228
  msgid "Integrate Presto Player with an email provider for email capture."
2229
  msgstr ""
2230
 
2231
- #: admin/settings/pages/Integrations.js:265
2232
  msgid "To get started with Bunny.net, add a Bunny.net video to your page."
2233
  msgstr ""
2234
 
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
+ "POT-Creation-Date: 2022-10-26T14:59:02+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.6.0\n"
13
 
407
 
408
  #: admin/blocks/blocks/bunny/APIPlaceholder.js:42
409
  #: admin/blocks/blocks/bunny/edit.js:329
410
+ #: admin/settings/pages/Integrations.js:261
411
  msgid "Bunny.net Video"
412
  msgstr ""
413
 
1060
  #: admin/blocks/shared/audioPresets/Edit.js:216
1061
  #: admin/blocks/shared/presets/Edit.js:221
1062
  #: admin/blocks/shared/presets/Email.js:53
1063
+ #: admin/settings/pages/Integrations.js:237
1064
  msgid "Email Capture"
1065
  msgstr ""
1066
 
1430
  #: admin/blocks/shared/presets/Email.js:57
1431
  #: admin/blocks/shared/presets/Watermark.js:57
1432
  #: admin/settings/pages/General.js:173
1433
+ #: admin/settings/pages/Integrations.js:170
1434
  msgid "Enable"
1435
  msgstr ""
1436
 
1806
  msgstr ""
1807
 
1808
  #: admin/blocks/shared/presets/parts/YoutubeChannelId.js:72
1809
+ #: admin/settings/pages/Integrations.js:225
1810
  msgid "Find my channel id"
1811
  msgstr ""
1812
 
1995
  msgstr ""
1996
 
1997
  #: admin/settings/app.js:103
1998
+ #: admin/settings/pages/Integrations.js:154
1999
  msgid "Integrations"
2000
  msgstr ""
2001
 
2052
  msgstr ""
2053
 
2054
  #: admin/settings/pages/General.js:23
2055
+ #: admin/settings/pages/Integrations.js:65
2056
  msgid "Pro Feature"
2057
  msgstr ""
2058
 
2059
  #: admin/settings/pages/General.js:24
2060
+ #: admin/settings/pages/Integrations.js:66
2061
  msgid "Unlock Presto Player Pro"
2062
  msgstr ""
2063
 
2064
  #: admin/settings/pages/General.js:25
2065
+ #: admin/settings/pages/Integrations.js:67
2066
  msgid "Get this feature and more with the Pro version of Presto Player!"
2067
  msgstr ""
2068
 
2083
  msgstr ""
2084
 
2085
  #: admin/settings/pages/General.js:165
2086
+ #: admin/settings/pages/Integrations.js:162
2087
  msgid "Analytics settings for media plays, watch times and more."
2088
  msgstr ""
2089
 
2139
  msgid "Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!"
2140
  msgstr ""
2141
 
2142
+ #: admin/settings/pages/Integrations.js:94
2143
  msgid "Bunny.net Settings"
2144
  msgstr ""
2145
 
2146
+ #: admin/settings/pages/Integrations.js:95
2147
  msgid "Modify bunny.net settings."
2148
  msgstr ""
2149
 
2150
+ #: admin/settings/pages/Integrations.js:100
2151
  msgid "Initial Quality Level"
2152
  msgstr ""
2153
 
2154
+ #: admin/settings/pages/Integrations.js:101
2155
  msgid "You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream."
2156
  msgstr ""
2157
 
2158
+ #: admin/settings/pages/Integrations.js:116
2159
  msgid "Disable Classic Bunny.net Storage"
2160
  msgstr ""
2161
 
2162
+ #: admin/settings/pages/Integrations.js:117
2163
  msgid "This will disable Bunny.net classic storage in your block UI."
2164
  msgstr ""
2165
 
2166
+ #: admin/settings/pages/Integrations.js:132
2167
  msgid "Edit Bunny.net Settings"
2168
  msgstr ""
2169
 
2170
+ #: admin/settings/pages/Integrations.js:133
2171
  msgid "Edit Bunny.net connection settings. Only edit this if you know what you're doing."
2172
  msgstr ""
2173
 
2174
+ #: admin/settings/pages/Integrations.js:155
2175
  msgid "Third party integrations and connections."
2176
  msgstr ""
2177
 
2178
+ #: admin/settings/pages/Integrations.js:161
2179
  msgid "Google Analytics"
2180
  msgstr ""
2181
 
2182
+ #: admin/settings/pages/Integrations.js:171
2183
  msgid "Send analytics events to your Google Analytics account."
2184
  msgstr ""
2185
 
2186
+ #: admin/settings/pages/Integrations.js:181
2187
  msgid "Use existing on-page tag?"
2188
  msgstr ""
2189
 
2190
+ #: admin/settings/pages/Integrations.js:182
2191
  msgid "Should we use an existing google analytics (v4) tag? If not, we'll output one for you."
2192
  msgstr ""
2193
 
2194
+ #: admin/settings/pages/Integrations.js:191
2195
  msgid "Measurement ID"
2196
  msgstr ""
2197
 
2198
+ #: admin/settings/pages/Integrations.js:192
2199
  msgid "Enter a Google Analytics Measurement ID, which can be found on your analytics admin page."
2200
  msgstr ""
2201
 
2202
+ #: admin/settings/pages/Integrations.js:202
2203
  #: Integrations/Elementor/VideoWidget.php:159
2204
  msgid "YouTube"
2205
  msgstr ""
2206
 
2207
+ #: admin/settings/pages/Integrations.js:203
2208
  msgid "Settings for YouTube videos."
2209
  msgstr ""
2210
 
2211
+ #: admin/settings/pages/Integrations.js:207
2212
  msgid "Privacy-Enhanced Mode"
2213
  msgstr ""
2214
 
2215
+ #: admin/settings/pages/Integrations.js:208
2216
  msgid "Embed YouTube videos without using cookies that track viewing behaviour."
2217
  msgstr ""
2218
 
2219
+ #: admin/settings/pages/Integrations.js:217
2220
  msgid "Channel ID"
2221
  msgstr ""
2222
 
2223
+ #: admin/settings/pages/Integrations.js:220
2224
  msgid "Enter the ID of your channel to enable Youtube Subscribe button functionality."
2225
  msgstr ""
2226
 
2227
+ #: admin/settings/pages/Integrations.js:238
2228
  msgid "Integrate Presto Player with an email provider for email capture."
2229
  msgstr ""
2230
 
2231
+ #: admin/settings/pages/Integrations.js:262
2232
  msgid "To get started with Bunny.net, add a Bunny.net video to your page."
2233
  msgstr ""
2234
 
presto-player.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
  * Description: A beautiful, fast media player for WordPress.
7
- * Version: 1.10.0
8
  * Author: Presto Made, Inc
9
  * Author URI: https://prestoplayer.com/
10
  * Text Domain: presto-player
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
  * Description: A beautiful, fast media player for WordPress.
7
+ * Version: 1.10.1
8
  * Author: Presto Made, Inc
9
  * Author URI: https://prestoplayer.com/
10
  * Text Domain: presto-player
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://prestoplayer.com
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 6.0
7
- Stable tag: 1.10.0
8
  Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -150,6 +150,9 @@ It is also important to point out that BunnyNet has a $1 per month minimum.
150
 
151
  == Changelog ==
152
 
 
 
 
153
  = 1.10.0 - October 21, 2022 =
154
  * New: Webhooks for email capture.
155
  * Fix: Issue with muted autoplay on iOS devices.
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 6.0
7
+ Stable tag: 1.10.1
8
  Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
150
 
151
  == Changelog ==
152
 
153
+ = 1.10.1 - October 26, 2022 =
154
+ * Fix issue with Integrations settings tab not loading for non-pro users.
155
+
156
  = 1.10.0 - October 21, 2022 =
157
  * New: Webhooks for email capture.
158
  * Fix: Issue with muted autoplay on iOS devices.
src/admin/settings/pages/Integrations.js CHANGED
@@ -1,8 +1,4 @@
1
- import {
2
- ExternalLink,
3
- TextControl,
4
- ToggleControl,
5
- } from "@wordpress/components";
6
  import { useEntityProp } from "@wordpress/core-data";
7
  import { Fragment, useState } from "@wordpress/element";
8
  import { __ } from "@wordpress/i18n";
@@ -14,6 +10,7 @@ import Page from "../components/Page";
14
  import BunnyClassic from "./parts/BunnyClassic/index";
15
  import BunnyStream from "./parts/BunnyStream/index";
16
  import EmailExport from "./parts/EmailExport";
 
17
 
18
  import ActiveCampaign from "./parts/integration/ActiveCampaign";
19
  import FluentCRM from "./parts/integration/FluentCRM";
1
+ import { ExternalLink, TextControl, ToggleControl } from "@wordpress/components";
 
 
 
 
2
  import { useEntityProp } from "@wordpress/core-data";
3
  import { Fragment, useState } from "@wordpress/element";
4
  import { __ } from "@wordpress/i18n";
10
  import BunnyClassic from "./parts/BunnyClassic/index";
11
  import BunnyStream from "./parts/BunnyStream/index";
12
  import EmailExport from "./parts/EmailExport";
13
+ import CTA from "../components/CTA";
14
 
15
  import ActiveCampaign from "./parts/integration/ActiveCampaign";
16
  import FluentCRM from "./parts/integration/FluentCRM";
vendor/composer/installed.php CHANGED
@@ -3,7 +3,7 @@
3
  'name' => 'course/player',
4
  'pretty_version' => 'dev-next',
5
  'version' => 'dev-next',
6
- 'reference' => 'a4a07e51611c332011c2b96a29023b0343810116',
7
  'type' => 'project',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
@@ -31,7 +31,7 @@
31
  'course/player' => array(
32
  'pretty_version' => 'dev-next',
33
  'version' => 'dev-next',
34
- 'reference' => 'a4a07e51611c332011c2b96a29023b0343810116',
35
  'type' => 'project',
36
  'install_path' => __DIR__ . '/../../',
37
  'aliases' => array(),
3
  'name' => 'course/player',
4
  'pretty_version' => 'dev-next',
5
  'version' => 'dev-next',
6
+ 'reference' => '0a6e42d0264a7355dec5408acb341108ed2af876',
7
  'type' => 'project',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
31
  'course/player' => array(
32
  'pretty_version' => 'dev-next',
33
  'version' => 'dev-next',
34
+ 'reference' => '0a6e42d0264a7355dec5408acb341108ed2af876',
35
  'type' => 'project',
36
  'install_path' => __DIR__ . '/../../',
37
  'aliases' => array(),