diff --git a/assets/banner-1544x500.png b/assets/banner-1544x500.png index 9515e805..91a7cfa3 100644 Binary files a/assets/banner-1544x500.png and b/assets/banner-1544x500.png differ diff --git a/assets/banner-772x250.png b/assets/banner-772x250.png index 2d19fcbc..e130143b 100644 Binary files a/assets/banner-772x250.png and b/assets/banner-772x250.png differ diff --git a/assets/icon-128x128.gif b/assets/icon-128x128.gif deleted file mode 100644 index b3dfd9d0..00000000 Binary files a/assets/icon-128x128.gif and /dev/null differ diff --git a/assets/icon-128x128.png b/assets/icon-128x128.png new file mode 100644 index 00000000..4ce946f6 Binary files /dev/null and b/assets/icon-128x128.png differ diff --git a/assets/icon-256x256.gif b/assets/icon-256x256.gif deleted file mode 100644 index 2a10c6b2..00000000 Binary files a/assets/icon-256x256.gif and /dev/null differ diff --git a/assets/icon-256x256.png b/assets/icon-256x256.png new file mode 100644 index 00000000..e1181eae Binary files /dev/null and b/assets/icon-256x256.png differ diff --git a/likecoin/admin/view/view.php b/likecoin/admin/view/view.php index b10f7081..a286b1f1 100644 --- a/likecoin/admin/view/view.php +++ b/likecoin/admin/view/view.php @@ -32,13 +32,13 @@ function likecoin_display_admin_pages() { global $likecoin_admin_main_page; $likecoin_admin_main_page = add_menu_page( - __( 'LikeCoin', 'likecoin' ), - __( 'LikeCoin', 'likecoin' ), + __( 'Web3Press', 'likecoin' ), + __( 'Web3Press', 'likecoin' ), 'edit_posts', 'likecoin', 'likecoin_show_likecoin_admin_main_page_content', // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - 'data:image/svg+xml;base64,' . base64_encode( file_get_contents( LC_DIR . 'assets/icon/likecoin.svg' ) ), + 'data:image/svg+xml;base64,' . base64_encode( file_get_contents( LC_DIR . 'assets/icon/star.svg' ) ), // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode 50 ); @@ -47,7 +47,7 @@ function likecoin_display_admin_pages() { global $likecoin_admin_plugin_page; $likecoin_admin_plugin_page = add_submenu_page( 'likecoin', - __( 'LikeCoin', 'likecoin' ), + __( 'Web3Press', 'likecoin' ), __( 'Plugin Setting', 'likecoin' ), 'edit_posts', 'likecoin', @@ -58,7 +58,7 @@ function likecoin_display_admin_pages() { global $likecoin_button_page; $likecoin_button_page = add_submenu_page( 'likecoin', - __( 'LikeCoin', 'likecoin' ), + __( 'Web3Press', 'likecoin' ), __( 'Liker ID', 'likecoin' ), 'edit_posts', '/likecoin#/liker-id', @@ -69,7 +69,7 @@ function likecoin_display_admin_pages() { global $likecoin_help_page; $likecoin_help_page = add_submenu_page( 'likecoin', - __( 'LikeCoin', 'likecoin' ), + __( 'Web3Press', 'likecoin' ), __( 'Getting Started', 'likecoin' ), 'edit_posts', '/likecoin#/help', diff --git a/likecoin/assets/icon/star.svg b/likecoin/assets/icon/star.svg new file mode 100644 index 00000000..53c36831 --- /dev/null +++ b/likecoin/assets/icon/star.svg @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/likecoin/assets/js/admin-settings/images/logo.6c72ad06.png b/likecoin/assets/js/admin-settings/images/logo.6c72ad06.png deleted file mode 100644 index 3aef411e..00000000 Binary files a/likecoin/assets/js/admin-settings/images/logo.6c72ad06.png and /dev/null differ diff --git a/likecoin/assets/js/admin-settings/images/w3p_banner.13b75e39.png b/likecoin/assets/js/admin-settings/images/w3p_banner.13b75e39.png new file mode 100644 index 00000000..528863a8 Binary files /dev/null and b/likecoin/assets/js/admin-settings/images/w3p_banner.13b75e39.png differ diff --git a/likecoin/assets/js/admin-settings/images/w3p_logo.443a5708.png b/likecoin/assets/js/admin-settings/images/w3p_logo.443a5708.png new file mode 100644 index 00000000..1e8762c6 Binary files /dev/null and b/likecoin/assets/js/admin-settings/images/w3p_logo.443a5708.png differ diff --git a/likecoin/assets/js/admin-settings/index.asset.php b/likecoin/assets/js/admin-settings/index.asset.php index c9e56350..f50b5cec 100644 --- a/likecoin/assets/js/admin-settings/index.asset.php +++ b/likecoin/assets/js/admin-settings/index.asset.php @@ -1,4 +1,4 @@ array( 'lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n' ), - 'version' => '820b7eaceaf0bbfe4080e8a15bafd6f2', + 'version' => 'dd7c4ae8682192f51e40cb6cfd956965', ); diff --git a/likecoin/assets/js/admin-settings/index.js b/likecoin/assets/js/admin-settings/index.js index 930700ec..579d45d8 100644 --- a/likecoin/assets/js/admin-settings/index.js +++ b/likecoin/assets/js/admin-settings/index.js @@ -1 +1 @@ -!function(){var e={669:function(e,t,n){e.exports=n(609)},448:function(e,t,n){"use strict";var r=n(867),a=n(26),i=n(372),o=n(327),s=n(97),l=n(109),c=n(985),u=n(61);e.exports=function(e){return new Promise((function(t,n){var d=e.data,p=e.headers,h=e.responseType;r.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+E)}var _=s(e.baseURL,e.url);function k(){if(f){var r="getAllResponseHeaders"in f?l(f.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f};a(t,n,i),f=null}}if(f.open(e.method.toUpperCase(),o(_,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=k:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(k)},f.onabort=function(){f&&(n(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){n(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var v=(e.withCredentials||c(_))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}"setRequestHeader"in f&&r.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),h&&"json"!==h&&(f.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),n(e),f=null)})),d||(d=null),f.send(d)}))}},609:function(e,t,n){"use strict";var r=n(867),a=n(849),i=n(321),o=n(185);function s(e){var t=new i(e),n=a(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var l=s(n(655));l.Axios=i,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(263),l.CancelToken=n(972),l.isCancel=n(502),l.all=function(e){return Promise.all(e)},l.spread=n(713),l.isAxiosError=n(268),e.exports=l,e.exports.default=l},263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:function(e,t,n){"use strict";var r=n(263);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(867),a=n(327),i=n(782),o=n(572),s=n(185),l=n(875),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var a,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var u=[o,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),a=Promise.resolve(e);u.length;)a=a.then(u.shift(),u.shift());return a}for(var d=e;n.length;){var p=n.shift(),h=n.shift();try{d=p(d)}catch(e){h(e);break}}try{a=o(d)}catch(e){return Promise.reject(e)}for(;i.length;)a=a.then(i.shift(),i.shift());return a},u.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},782:function(e,t,n){"use strict";var r=n(867);function a(){this.handlers=[]}a.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},97:function(e,t,n){"use strict";var r=n(793),a=n(303);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},61:function(e,t,n){"use strict";var r=n(481);e.exports=function(e,t,n,a,i){var o=new Error(e);return r(o,t,n,a,i)}},572:function(e,t,n){"use strict";var r=n(867),a=n(527),i=n(502),o=n(655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,n,r,a){return e.config=t,n&&(e.code=n),e.request=r,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=l(void 0,e[a])):n[a]=l(e[a],t[a])}r.forEach(a,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(i,c),r.forEach(o,(function(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=l(void 0,e[a])):n[a]=l(void 0,t[a])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=a.concat(i).concat(o).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},26:function(e,t,n){"use strict";var r=n(61);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:function(e,t,n){"use strict";var r=n(867),a=n(655);e.exports=function(e,t,n){var i=this||a;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},655:function(e,t,n){"use strict";var r=n(867),a=n(16),i=n(481),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(448)),l),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(o)})),e.exports=c},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:function(e,t,n){"use strict";var r=n(593),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},o=r.version.split(".");function s(e,t){for(var n=t?t.split("."):o,r=e.split("."),a=0;a<3;a++){if(n[a]>r[a])return!0;if(n[a]0;){var i=r[a],o=t[i];if(o){var s=e[i],l=void 0===s||o(s,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:a}},867:function(e,t,n){"use strict";var r=n(849),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function u(e){let t="undefined"!=typeof window&&void 0!==window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"==typeof e?e:l(e);return new URL(n,t)}var d;function p(e,t,n){void 0===n&&(n="/");let r=g(("string"==typeof t?c(t):t).pathname||"/",n);if(null==r)return null;let a=h(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let e=0;null==i&&e{let i={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(y(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let o=I([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(y(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),h(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:E(o,e.index),routesMeta:s})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(d||(d={}));const f=/^:\w+$/,m=e=>"*"===e;function E(e,t){let n=e.split("/"),r=n.length;return n.some(m)&&(r+=-2),t&&(r+=2),n.filter((e=>!m(e))).reduce(((e,t)=>e+(f.test(t)?3:""===t?1:10)),r)}function _(e,t){let{routesMeta:n}=e,r={},a="/",i=[];for(let e=0;e(r.push(t),"([^\\/]+)")));return e.endsWith("*")?(r.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return S(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function v(e){try{return decodeURI(e)}catch(t){return S(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function g(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function y(e,t){if(!1===e||null==e)throw new Error(t)}function S(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function b(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function w(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function L(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=c(e):(i=a({},e),y(!i.pathname||!i.pathname.includes("?"),b("?","pathname","search",i)),y(!i.pathname||!i.pathname.includes("#"),b("#","pathname","hash",i)),y(!i.search||!i.search.includes("#"),b("#","search","hash",i)));let o,s=""===e||""===i.pathname,l=s?"/":i.pathname;if(r||null==l)o=n;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?c(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:D(r),hash:N(a)}}(i,o),d=l&&"/"!==l&&l.endsWith("/"),p=(s||"."===l)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!p||(u.pathname+="/"),u}const I=e=>e.join("/").replace(/\/\/+/g,"/"),A=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),D=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",N=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function P(e){return e instanceof class{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}}const T=["post","put","patch","delete"],O=(new Set(T),["get",...T]);function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;te.pathnameBase))),o=r.useRef(!1);return r.useEffect((()=>{o.current=!0})),r.useCallback((function(n,r){if(void 0===r&&(r={}),!o.current)return;if("number"==typeof n)return void t.go(n);let s=L(n,JSON.parse(i),a,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:I([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)}),[e,t,i,a])}const Y=r.createContext(null);function X(e,t){let{relative:n}=void 0===t?{}:t,{matches:a}=r.useContext($),{pathname:i}=J(),o=JSON.stringify(w(a).map((e=>e.pathnameBase)));return r.useMemo((()=>L(e,JSON.parse(o),i,"path"===n)),[e,o,i,n])}function Q(){let e=function(){var e;let t=r.useContext(q),n=function(e){let t=r.useContext(W);return t||y(!1),t}(ne.UseRouteError),a=r.useContext($),i=a.matches[a.matches.length-1];return t||(a||y(!1),!i.route.id&&y(!1),null==(e=n.errors)?void 0:e[i.route.id])}(),t=P(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unhandled Thrown Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,r.createElement("p",null,"💿 Hey developer 👋"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:o},"errorElement")," props on ",r.createElement("code",{style:o},"")))}class Z extends r.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(q.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}function ee(e){let{routeContext:t,match:n,children:a}=e,i=r.useContext(F);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),r.createElement($.Provider,{value:t},a)}var te,ne,re;function ae(e){let{to:t,replace:n,state:a,relative:i}=e;K()||y(!1);let o=r.useContext(W),s=V();return r.useEffect((()=>{o&&"idle"!==o.navigation.state||s(t,{replace:n,state:a,relative:i})})),null}function ie(e){return function(e){let t=r.useContext($).outlet;return t?r.createElement(Y.Provider,{value:e},t):t}(e.context)}function oe(e){y(!1)}function se(t){let{basename:n="/",children:a=null,location:i,navigationType:o=e.Pop,navigator:s,static:l=!1}=t;K()&&y(!1);let u=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:s,static:l})),[u,s,l]);"string"==typeof i&&(i=c(i));let{pathname:p="/",search:h="",hash:f="",state:m=null,key:E="default"}=i,_=r.useMemo((()=>{let e=g(p,u);return null==e?null:{pathname:e,search:h,hash:f,state:m,key:E}}),[u,p,h,f,m,E]);return null==_?null:r.createElement(G.Provider,{value:d},r.createElement(z.Provider,{children:a,value:{location:_,navigationType:o}}))}function le(t){let{children:n,location:a}=t,i=r.useContext(H);return function(t,n){K()||y(!1);let{navigator:a}=r.useContext(G),i=r.useContext(W),{matches:o}=r.useContext($),s=o[o.length-1],l=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=J();if(n){var f;let e="string"==typeof n?c(n):n;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||y(!1),d=e}else d=h;let m=d.pathname||"/",E=p(t,{pathname:"/"===u?m:m.slice(u.length)||"/"}),_=function(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}let a=e,i=null==n?void 0:n.errors;if(null!=i){let e=a.findIndex((e=>e.route.id&&(null==i?void 0:i[e.route.id])));e>=0||y(!1),a=a.slice(0,Math.min(a.length,e+1))}return a.reduceRight(((e,o,s)=>{let l=o.route.id?null==i?void 0:i[o.route.id]:null,c=n?o.route.errorElement||r.createElement(Q,null):null,u=()=>r.createElement(ee,{match:o,routeContext:{outlet:e,matches:t.concat(a.slice(0,s+1))}},l?c:void 0!==o.route.element?o.route.element:e);return n&&(o.route.errorElement||0===s)?r.createElement(Z,{location:n.location,component:c,error:l,children:u()}):u()}),null)}(E&&E.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:I([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:I([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,i||void 0);return n&&_?r.createElement(z.Provider,{value:{location:x({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},_):_}(i&&!n?i.router.routes:ce(n),a)}function ce(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;if(e.type===r.Fragment)return void n.push.apply(n,ce(e.props.children,t));e.type!==oe&&y(!1),e.props.index&&e.props.children&&y(!1);let i=[...t,a],o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=ce(e.props.children,i)),n.push(o)})),n}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}!function(e){e.UseRevalidator="useRevalidator"}(te||(te={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(ne||(ne={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(re||(re={})),new Promise((()=>{})),r.Component;const pe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],he=["aria-current","caseSensitive","className","end","style","to","children"],fe=r.forwardRef((function(e,t){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:c,to:u,preventScrollReset:d}=e,p=de(e,pe),h=function(e,t){let{relative:n}=void 0===t?{}:t;K()||y(!1);let{basename:a,navigator:i}=r.useContext(G),{hash:o,pathname:s,search:l}=X(e,{relative:n}),c=s;return"/"!==a&&(c="/"===s?a:I([a,s])),i.createHref({pathname:c,search:l,hash:o})}(u,{relative:a}),f=function(e,t){let{target:n,replace:a,state:i,preventScrollReset:o,relative:s}=void 0===t?{}:t,c=V(),u=J(),d=X(e,{relative:s});return r.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==a?a:l(u)===l(d);c(e,{replace:n,state:i,preventScrollReset:o,relative:s})}}),[u,c,d,a,i,n,e,o,s])}(u,{replace:o,state:s,target:c,preventScrollReset:d,relative:a});return r.createElement("a",ue({},p,{href:h,onClick:i?n:function(e){n&&n(e),e.defaultPrevented||f(e)},ref:t,target:c}))})),me=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:c}=e,u=de(e,he),d=X(l,{relative:u.relative}),p=J(),h=r.useContext(W),{navigator:f}=r.useContext(G),m=f.encodeLocation?f.encodeLocation(d).pathname:d.pathname,E=p.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;a||(E=E.toLowerCase(),_=_?_.toLowerCase():null,m=m.toLowerCase());let k,v=E===m||!o&&E.startsWith(m)&&"/"===E.charAt(m.length),g=null!=_&&(_===m||!o&&_.startsWith(m)&&"/"===_.charAt(m.length)),y=v?n:void 0;k="function"==typeof i?i({isActive:v,isPending:g}):[i,v?"active":null,g?"pending":null].filter(Boolean).join(" ");let S="function"==typeof s?s({isActive:v,isPending:g}):s;return r.createElement(fe,ue({},u,{"aria-current":y,className:k,ref:t,style:S,to:l}),"function"==typeof c?c({isActive:v,isPending:g}):c)}));var Ee,_e;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Ee||(Ee={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_e||(_e={}));var ke=window.wp.data,ve=window.wp.apiFetch,ge=n.n(ve);function ye(e,t){if(ke.createReduxStore){const n=(0,ke.createReduxStore)(e,t);return(0,ke.register)(n),n}return(0,ke.registerStore)(e,t),e}const Se="likecoin/site_liker_info",be="/likecoin/v1/options/liker-id",we={DBUserCanEditOption:!0,DBErrorMessage:"",DBSiteLikerId:"",DBSiteLikerAvatar:"",DBSiteLikerDisplayName:"",DBSiteLikerWallet:"",DBDisplayOptionSelected:"none",DBPerPostOptionEnabled:!1},Le={getSiteLikerInfo:e=>({type:"GET_SITE_LIKER_INFO",path:e}),setSiteLikerInfo:e=>({type:"SET_SITE_LIKER_INFO",info:e}),setHTTPError(e){const t=e.response.data||e.message;return 403===e.response.status?{type:"SET_FORBIDDEN_ERROR",errorMsg:t}:{type:"SET_ERROR_MESSAGE",errorMsg:t}},*postSiteLikerInfo(e){yield{type:"POST_SITE_LIKER_INFO_TO_DB",data:e},e.siteLikerInfos&&(yield{type:"CHANGE_SITE_LIKER_INFO_GLOBAL_STATE",data:e})}},Ie={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SITE_LIKER_INFO":return{...e,DBSiteLikerId:t.info.site_likecoin_user.likecoin_id,DBSiteLikerAvatar:t.info.site_likecoin_user.avatar,DBSiteLikerDisplayName:t.info.site_likecoin_user.display_name,DBSiteLikerWallet:t.info.site_likecoin_user.wallet,DBDisplayOptionSelected:t.info.button_display_option,DBPerPostOptionEnabled:t.info.button_display_author_override,DBUserCanEditOption:t.info.user_can_edit};case"CHANGE_SITE_LIKER_INFO_GLOBAL_STATE":return{...e,DBSiteLikerId:t.data.siteLikerInfos.likecoin_id,DBSiteLikerAvatar:t.data.siteLikerInfos.avatar,DBSiteLikerDisplayName:t.data.siteLikerInfos.display_name,DBSiteLikerWallet:t.data.siteLikerInfos.wallet};case"SET_FORBIDDEN_ERROR":return{DBUserCanEditOption:!1,DBErrorMessage:t.errorMsg};case"SET_ERROR_MESSAGE":return{DBErrorMessage:t.errorMsg};default:return e}},controls:{GET_SITE_LIKER_INFO:()=>ge()({path:be}),POST_SITE_LIKER_INFO_TO_DB:e=>ge()({method:"POST",path:be,data:e.data})},selectors:{selectSiteLikerInfo:e=>e},resolvers:{*selectSiteLikerInfo(){try{const e=(yield Le.getSiteLikerInfo()).data,t=!("1"!==e.button_display_author_override&&!0!==e.button_display_author_override);return e.button_display_author_override=t,e.button_display_option||(e.button_display_option=we.DBDisplayOptionSelected),e.site_likecoin_user||(e.site_likecoin_user={}),Le.setSiteLikerInfo(e)}catch(e){return Le.setHTTPError(e)}}},actions:Le};ye(Se,Ie);var Ae=window.wp.i18n,De=n.p+"images/logo.6c72ad06.png",Ne=function(){return(0,t.createElement)("header",{className:"lcp-admin-header"},(0,t.createElement)("img",{src:De,alt:(0,Ae.__)("liker.land logo","likecoin")}),(0,t.createElement)("a",{className:"lcp-admin-header__portfolio-button",href:"https://liker.land/dashboard",rel:"noopener noreferrer",target:"_blank"},(0,Ae.__)("Your Portfolio","likecoin")," ",(0,t.createElement)("span",{className:"dashicons dashicons-external"})))};const Pe=e=>{let{isActive:t}=e;return"nav-tab"+(t?" nav-tab-active":"")};var Te=function(e){return(0,t.createElement)("nav",{className:"lcp-nav-tab-wrapper nav-tab-wrapper wp-clearfix"},e.children)},Oe=function(){const{DBUserCanEditOption:e}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo()));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Te,null,e&&(0,t.createElement)(me,{className:Pe,to:"",end:!0},(0,Ae.__)("General","likecoin")),e&&(0,t.createElement)(me,{className:Pe,to:"advanced"},(0,Ae.__)("Advanced","likecoin")),(0,t.createElement)(me,{className:Pe,to:"about"},(0,Ae.__)("About","likecoin"))),(0,t.createElement)("div",{className:"lcp-nav-tab-panel"},(0,t.createElement)(ie,null)))},xe=function(e){return(0,t.createElement)("tr",null,(0,t.createElement)("th",{className:"optionTitle",scope:"row"},(0,t.createElement)("label",null,e.title)),(0,t.createElement)("td",null,(0,t.createElement)("select",{ref:e.selectRef,onChange:t=>{e.handleSelect(t.target.value)},value:e.selected},e.options.map((e=>(0,t.createElement)("option",{value:e.value,key:e.label}," ",e.label," "))))))},Re=function(e){return(0,t.createElement)("h2",{className:"title"},e.title)},Ce=function(e){return(0,t.createElement)("div",{className:`notice ${e.className} is-dismissable`},(0,t.createElement)("p",null,(0,t.createElement)("strong",null,e.text)),(0,t.createElement)("button",{className:"notice-dismiss",id:"notice-dismiss",onClick:e.handleNoticeDismiss},(0,t.createElement)("span",{className:"screen-reader-text"})))};const Be="likecoin/site_publish",Me="/likecoin/v1/option/publish/settings/matters",Ue={DBSiteMattersId:"",DBSiteMattersToken:"",DBSiteMattersAutoSaveDraft:!1,DBSiteMattersAutoPublish:!1,DBSiteMattersAddFooterLink:!1,DBSiteInternetArchiveEnabled:!1,DBSiteInternetArchiveAccessKey:"",DBISCNBadgeStyleOption:"none"},je={getSitePublishOptions:e=>({type:"GET_SITE_PUBLISH_OPTIONS",path:e}),setSitePublishOptions:e=>({type:"SET_SITE_PUBLISH_OPTIONS",options:e}),setHTTPErrors:e=>({type:"SET_ERROR_MESSAGE",errorMsg:e}),*siteMattersLogin(e){try{return yield{type:"MATTERS_LOGIN",data:e}}catch(e){return console.error(e),e}},*siteMattersLogout(){try{return yield{type:"MATTERS_LOGOUT"}}catch(e){return console.error(e),e}},*postSitePublishOptions(e){yield{type:"POST_SITE_PUBLISH_OPTIONS_TO_DB",data:e},yield{type:"CHANGE_SITE_PUBLISH_OPTIONS_GLOBAL_STATE",data:e}},*updateSiteMattersLoginGlobalState(e){yield{type:"CHANGE_SITE_MATTERS_USER_GLOBAL_STATE",data:e}}},Fe={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SITE_PUBLISH_OPTIONS":return{DBSiteMattersId:t.options.matters_id,DBSiteMattersToken:t.options.access_token,DBSiteMattersAutoSaveDraft:t.options.site_matters_auto_save_draft,DBSiteMattersAutoPublish:t.options.site_matters_auto_publish,DBSiteMattersAddFooterLink:t.options.site_matters_add_footer_link,DBSiteInternetArchiveEnabled:t.options.lc_internet_archive_enabled,DBSiteInternetArchiveAccessKey:t.options.lc_internet_archive_access_key,DBISCNBadgeStyleOption:t.options.iscn_badge_style_option};case"CHANGE_SITE_PUBLISH_OPTIONS_GLOBAL_STATE":{const n=JSON.parse(JSON.stringify({DBSiteMattersAutoSaveDraft:t.data.siteMattersAutoSaveDraft,DBSiteMattersAutoPublish:t.data.siteMattersAutoPublish,DBSiteMattersAddFooterLink:t.data.siteMattersAddFooterLink,DBSiteInternetArchiveEnabled:t.data.siteInternetArchiveEnabled,DBSiteInternetArchiveAccessKey:t.data.siteInternetArchiveAccessKey,DBISCNBadgeStyleOption:t.data.ISCNBadgeStyleOption}));return{...e,...n}}case"CHANGE_SITE_MATTERS_USER_GLOBAL_STATE":return{...e,DBSiteMattersId:t.data.mattersId,DBSiteMattersToken:t.data.accessToken};default:return e}},controls:{GET_SITE_PUBLISH_OPTIONS:e=>ge()({path:e.path}),MATTERS_LOGIN:e=>ge()({method:"POST",path:Me,data:e.data}),POST_SITE_PUBLISH_OPTIONS_TO_DB:e=>ge()({method:"POST",path:"/likecoin/v1/option/publish",data:e.data}),MATTERS_LOGOUT:()=>ge()({method:"DELETE",path:Me})},selectors:{selectSitePublishOptions:e=>e},resolvers:{*selectSitePublishOptions(){try{const e=yield je.getSitePublishOptions("/likecoin/v1/option/publish"),t=e.data,n=e.data.site_matters_user?e.data.site_matters_user.matters_id:"",r=e.data.site_matters_user?e.data.site_matters_user.access_token:"",a=!("1"!==t.site_matters_auto_save_draft&&!0!==t.site_matters_auto_save_draft),i=!("1"!==t.site_matters_auto_publish&&!0!==t.site_matters_auto_publish),o=!("1"!==t.site_matters_add_footer_link&&!0!==t.site_matters_add_footer_link);return t.matters_id=n,t.access_token=r,t.site_matters_auto_save_draft=a,t.site_matters_auto_publish=i,t.site_matters_add_footer_link=o,t.iscn_badge_style_option||(t.iscn_badge_style_option=Ue.DBISCNBadgeStyleOption),je.setSitePublishOptions(t)}catch(e){return je.setHTTPErrors(e.message)}}},actions:je};ye(Be,Fe);var He=function(e){return(0,t.createElement)("tr",null,(0,t.createElement)("th",{scope:"row",className:"optionTitle"},(0,t.createElement)("label",null,e.title)),(0,t.createElement)("td",null,e.children,!!e.details&&(0,t.createElement)("p",{class:"description"},e.details)))},We=function(e){return(0,t.createElement)(He,{title:e.title,details:e.details},(0,t.createElement)("input",{type:"checkbox",checked:e.checked,disabled:e.disabled,onChange:()=>{e.handleCheck(!e.checked)},ref:e.checkRef}),e.append)},Ge=function(e){let{children:n}=e;return(0,t.createElement)("table",{className:"form-table",role:"presentation"},(0,t.createElement)("tbody",null,n))},ze=function(e){let{children:n}=e;return(0,t.createElement)("div",{className:"submit"},(0,t.createElement)("button",{className:"button button-primary"},(0,Ae.__)("Confirm","likecoin")),n)},$e=function(){const{postSiteLikerInfo:e}=(0,ke.useDispatch)(Se),{postSitePublishOptions:n}=(0,ke.useDispatch)(Be),{DBUserCanEditOption:a,DBDisplayOptionSelected:i}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo())),{DBISCNBadgeStyleOption:o}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),[s,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)("post"===i||"always"===i),[d,p]=(0,r.useState)("page"===i||"always"===i),h=(0,r.useRef)(),f=[{value:"light",label:(0,Ae.__)("Light Mode","likecoin")},{value:"dark",label:(0,Ae.__)("Dark Mode","likecoin")},{value:"none",label:(0,Ae.__)("Not shown","likecoin")}],[m,E]=(0,r.useState)(o);(0,r.useEffect)((()=>{E(o)}),[o]),(0,r.useEffect)((()=>{u("post"===i||"always"===i),p("page"===i||"always"===i)}),[i]);const _=(0,Ae.__)("Sorry, you are not allowed to access this page.","likecoin");return a?(0,t.createElement)("div",{className:"likecoin"},s&&(0,t.createElement)(Ce,{text:(0,Ae.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),l(!1)}}),(0,t.createElement)("form",{onSubmit:async function(t){l(!1),t.preventDefault();const r=h.current.value;let a="none";c&&d?a="always":c?a="post":d&&(a="page");const i={displayOption:a},o={ISCNBadgeStyleOption:r};try{await Promise.all([e(i),n(o)]),l(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error(e)}}},(0,t.createElement)(Re,{title:(0,Ae.__)("LikeCoin widget","likecoin")}),(0,t.createElement)("p",null,(0,Ae.__)("Display LikeCoin Button/Widget when author has a Liker ID, or if post is registered on ISCN","likecoin")),(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:c,handleCheck:u,title:(0,Ae.__)("Show in Posts","likecoin"),append:(0,Ae.__)(" *Recommended","likecoin")}),(0,t.createElement)(We,{checked:d,handleCheck:p,title:(0,Ae.__)("Show in Pages","likecoin")})),(0,t.createElement)("hr",null),(0,t.createElement)(Re,{title:(0,Ae.__)("ISCN Badge","likecoin")}),(0,t.createElement)("p",null,(0,Ae.__)("Display a badge for ISCN registered post","likecoin")),(0,t.createElement)(Ge,null,(0,t.createElement)(xe,{selected:m,handleSelect:E,title:(0,Ae.__)("Display style","likecoin"),selectRef:h,options:f})),(0,t.createElement)(ze,null," ",(0,t.createElement)("a",{className:"button",href:"#",onClick:function(e){e.preventDefault(),u(!0),p(!1),E("none")}},(0,Ae.__)("Reset to default","likecoin"))))):(0,t.createElement)("p",null,_)},qe=function(){const{DBUserCanEditOption:e}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo()));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Te,null,e&&(0,t.createElement)(me,{className:Pe,to:"",end:!0},(0,Ae.__)("Website Liker ID","likecoin")),(0,t.createElement)(me,{className:Pe,to:"user"},(0,Ae.__)("Your Liker ID","likecoin"))),(0,t.createElement)("div",{className:"lcp-nav-tab-panel"},(0,t.createElement)(ie,null)))},Ke=(0,r.forwardRef)((function(e,n){const{postSiteLikerInfo:a}=(0,ke.useDispatch)(Se),{DBPerPostOptionEnabled:i}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo())),o=(0,r.useRef)();(0,r.useEffect)((()=>{l(i)}),[i]);const[s,l]=(0,r.useState)(i);async function c(e){const t={perPostOptionEnabled:o.current.checked};await a(t)}return(0,r.useImperativeHandle)(n,(()=>({submit:c}))),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Re,{title:(0,Ae.__)("LikeCoin widget advanced settings","likecoin")}),(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:s,handleCheck:l,title:(0,Ae.__)("Post option","likecoin"),details:(0,Ae.__)("Allow editors to customize display setting per post","likecoin"),append:(0,t.createElement)("a",{href:"#",onClick:function(e){e.preventDefault(),l(!1)}},(0,Ae.__)("Reset to default","likecoin")),checkRef:o})))})),Je=function(e){return(0,t.createElement)("a",{rel:"noopener noreferrer",target:"_blank",href:e.linkAddress},e.text)},Ve=function(){const e=(0,t.createInterpolateElement)((0,Ae.__)(" is a decentralized, cryptocurrency driven content creation and discussion platform. ","likecoin"),{Matters:(0,t.createElement)(Je,{text:(0,Ae.__)("Matters","likecoin"),linkAddress:"https://matters.news"})}),n=(0,t.createInterpolateElement)((0,Ae.__)("By publishing on Matters, your articles will be stored to the distributed InterPlanetary File System () nodes and get rewarded. Take the first step to publish your creation and reclaim your ownership of data!","likecoin"),{IPFS:(0,t.createElement)(Je,{text:(0,Ae.__)("IPFS","likecoin"),linkAddress:"https://ipfs.io"})});return(0,t.createElement)("div",null,(0,t.createElement)("p",null,e),(0,t.createElement)("p",null,n))},Ye=function(e){return(0,t.createElement)(Ge,null,(0,t.createElement)(He,{title:(0,Ae.__)("Connect to Matters","likecoin")},(0,t.createElement)("p",{className:"description"},(0,Ae.__)("Login with Matters ID","likecoin")),(0,t.createElement)(Ge,null,(0,t.createElement)(He,{title:(0,Ae.__)("Matters login email ","likecoin")},(0,t.createElement)("input",{ref:e.mattersIdRef,id:"matters_id",name:"lc_matters_id",type:"text"})),(0,t.createElement)(He,{title:(0,Ae.__)("Password ","likecoin")},(0,t.createElement)("input",{ref:e.mattersPasswordRef,id:"matters_password",name:"lc_matters_password",type:"password"})),(0,t.createElement)(He,null,(0,t.createElement)("input",{id:"lcMattersIdLoginBtn",className:"button button-primary",type:"button",value:(0,Ae.__)("Login","likecoin"),onClick:e.loginHandler}),e.mattersLoginError&&(0,t.createElement)("p",{id:"lcMattersErrorMessage"},e.mattersLoginError)))))},Xe=function(e){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h4",null,(0,Ae.__)("Matters connection status","likecoin")),(0,t.createElement)("table",{className:"form-table",role:"presentation"},(0,t.createElement)("tbody",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",{scope:"row"},(0,t.createElement)("label",{for:"site_matters_user"},(0,Ae.__)("Connection Status","likecoin"))),(0,t.createElement)("td",null,(0,t.createElement)("div",null,(0,t.createElement)("span",null,(0,t.createElement)("b",null,e.siteMattersId.length>0&&(0,t.createElement)(t.Fragment,null,(0,Ae.__)("Logged in as ","likecoin"),(0,t.createElement)("a",{rel:"noopener noreferrer",target:"_blank",href:`https://matters.news/@${e.siteMattersId}`},e.siteMattersId," ")),0===e.siteMattersId.length&&(0,t.createElement)("b",null," ",(0,Ae.__)("Not connected","likecoin")," "))),e.siteMattersId.length>0&&(0,t.createElement)("span",{className:"actionWrapper",style:{paddingLeft:"20px"}},(0,t.createElement)("a",{id:"lcMattersIdLogoutButton",type:"button",onClick:e.handleMattersLogout,target:"_blank",href:"#"},(0,Ae.__)("Logout","likecoin")))))))))},Qe=(0,r.forwardRef)((function(e,n){const{DBSiteMattersId:a,DBSiteMattersAutoSaveDraft:i,DBSiteMattersAutoPublish:o,DBSiteMattersAddFooterLink:s}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),[l,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(i),[p,h]=(0,r.useState)(o),[f,m]=(0,r.useState)(s),[E,_]=(0,r.useState)(""),k=(0,r.useRef)(),v=(0,r.useRef)(),g=(0,r.useRef)(),y=(0,r.useRef)(),S=(0,r.useRef)(),{postSitePublishOptions:b,siteMattersLogin:w,siteMattersLogout:L,updateSiteMattersLoginGlobalState:I}=(0,ke.useDispatch)(Be);async function A(){const e=g.current.checked,t=y.current.checked,n=S.current.checked;b({siteMattersAutoSaveDraft:e,siteMattersAutoPublish:t,siteMattersAddFooterLink:n})}return(0,r.useImperativeHandle)(n,(()=>({submit:A}))),(0,r.useEffect)((()=>{c(a),d(i),h(o),m(s)}),[a,i,o,s]),(0,t.createElement)(t.Fragment,null,!l&&(0,t.createElement)(Ye,{loginHandler:async function(e){e.preventDefault();const t={mattersId:k.current.value,mattersPassword:v.current.value};await async function(e){try{const t=await w(e);if(!t)throw new Error("Calling Server failed.");if(t.errors){let e="ERROR:";return t.errors.length>0&&t.errors.forEach((t=>{if(t.message.indexOf("password")>0){const n=t.message.search("password");e=e.concat(t.message.slice(0,n).concat('password: "***"}'))}else e=e.concat(t.message)})),void _(e)}const n={mattersId:t.viewer.userName,accessToken:t.userLogin.token};I(n),_((0,Ae.__)("Success","likecoin")),c(n.mattersId)}catch(e){console.error(e)}}(t)},mattersIdRef:k,mattersPasswordRef:v,mattersLoginError:E}),l&&(0,t.createElement)(Xe,{siteMattersId:l,handleMattersLogout:async function(e){e.preventDefault(),c(""),await L(),I({mattersId:"",accessToken:""})}}),(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:u,handleCheck:d,title:(0,Ae.__)("Auto save draft to Matters","likecoin"),details:(0,Ae.__)("Auto save draft to Matters","likecoin"),checkRef:g}),(0,t.createElement)(We,{checked:p,handleCheck:h,title:(0,Ae.__)("Auto publish post to Matters","likecoin"),details:(0,Ae.__)("Auto publish post to Matters","likecoin"),checkRef:y}),(0,t.createElement)(We,{checked:f,handleCheck:m,title:(0,Ae.__)("Add post link in footer","likecoin"),details:(0,Ae.__)("Add post link in footer","likecoin"),checkRef:S})))})),Ze=function(){const e=(0,t.createInterpolateElement)((0,Ae.__)(" is a non-profit digital library offering free universal access to books, movies & music, as well as 624 billion archived web pages.","likecoin"),{InternetArchive:(0,t.createElement)(Je,{text:(0,Ae.__)("Internet Archive (archive.org)","likecoin"),linkAddress:"https://archive.org/"})});return(0,t.createElement)("p",null,e)},et=(0,r.forwardRef)((function(e,n){const{DBSiteInternetArchiveEnabled:a,DBSiteInternetArchiveAccessKey:i}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),[o,s]=(0,r.useState)(a),[l,c]=(0,r.useState)(i),[u,d]=(0,r.useState)(""),[p,h]=(0,r.useState)(!i);(0,r.useEffect)((()=>{s(a),c(i),h(!i)}),[i,a]);const{postSitePublishOptions:f}=(0,ke.useDispatch)(Be),m=(0,r.useCallback)((()=>{let e={siteInternetArchiveEnabled:o};p&&(e={...e,siteInternetArchiveAccessKey:l,siteInternetArchiveSecret:u}),f(e)}),[p,o,l,u,f]);(0,r.useImperativeHandle)(n,(()=>({submit:m})));const E=(0,t.createInterpolateElement)((0,Ae.__)("An is needed for auto publishing your post to Internet Archive.","likecoin"),{Register:(0,t.createElement)(Je,{text:(0,Ae.__)("Internet Archive S3 API Key","likecoin"),linkAddress:"https://archive.org/account/s3.php"})});return(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:o,handleCheck:s,title:(0,Ae.__)("Auto archive","likecoin"),details:(0,Ae.__)("Auto publish post to Internet Archive","likecoin"),disabled:p&&!(l&&u)}),(0,t.createElement)(He,{title:(0,Ae.__)("Internet Archive S3 Config","likecoin")},(0,t.createElement)("p",null,E),(0,t.createElement)(Ge,null,(0,t.createElement)(He,{title:(0,Ae.__)("S3 Access Key","likecoin")},(0,t.createElement)("input",{id:"internet_archive_access_key",type:"text",value:l,disabled:!p,onChange:e=>c(e.target.value)})),(0,t.createElement)(He,{title:(0,Ae.__)("S3 Secret","likecoin")},p?(0,t.createElement)("input",{id:"internet_archive_secret",type:"password",value:u,onChange:e=>d(e.target.value)}):(0,t.createElement)("button",{class:"button",onClick:h},(0,Ae.__)("Edit","likecoin"))))))})),tt=(0,r.forwardRef)((function(e,n){const{DBSiteMattersId:a,DBSiteMattersAutoSaveDraft:i,DBSiteMattersAutoPublish:o,DBSiteInternetArchiveEnabled:s}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),l=(0,r.useRef)(),c=(0,r.useRef)(),[u,d]=(0,r.useState)(!!(a||i||o)),[p,h]=(0,r.useState)(!!s);async function f(){const e=[];u&&e.push(l.current.submit()),p&&e.push(c.current.submit()),await Promise.all(e)}return(0,r.useEffect)((()=>{d(!!(a||i||o))}),[a,i,o]),(0,r.useEffect)((()=>{h(!!s)}),[s]),(0,r.useImperativeHandle)(n,(()=>({submit:f}))),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",null,(0,Ae.__)("Publish to Matters","likecoin")),(0,t.createElement)(Ve,null),u?(0,t.createElement)(Qe,{ref:l}):(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:u,handleCheck:d,title:(0,Ae.__)("Show settings","likecoin")})),(0,t.createElement)("hr",null),(0,t.createElement)("h2",null,(0,Ae.__)("Publish to Internet Archive","likecoin")),(0,t.createElement)(Ze,null),!p&&(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:p,handleCheck:h,title:(0,Ae.__)("Show settings","likecoin")})),p&&(0,t.createElement)(et,{ref:c}))}));const nt="likecoin/other_settings",rt="/likecoin/v1/option/web-monetization",at={DBPaymentPointer:""},it={setPaymentPointer:e=>({type:"SET_PAYMENT_POINTER",paymentPointer:e}),getPaymentPointer:()=>({type:"GET_PAYMENT_POINTER"}),setHTTPErrors:e=>({type:"SET_ERROR_MESSAGE",errorMsg:e}),*postPaymentPointer(e){yield{type:"POST_PAYMENT_POINTER",paymentPointer:e},yield{type:"CHANGE_PAYMENT_POINTER_GLOBAL_STATE",paymentPointer:e}}},ot={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PAYMENT_POINTER":case"CHANGE_PAYMENT_POINTER_GLOBAL_STATE":return{DBPaymentPointer:t.paymentPointer};default:return e}},controls:{GET_PAYMENT_POINTER:()=>ge()({path:rt}),POST_PAYMENT_POINTER:e=>ge()({method:"POST",path:rt,data:{paymentPointer:e.paymentPointer}})},selectors:{selectPaymentPointer:e=>e.DBPaymentPointer},resolvers:{*selectPaymentPointer(){try{const e=(yield it.getPaymentPointer()).data.site_payment_pointer;return it.setPaymentPointer(e)}catch(e){return it.setHTTPErrors(e.message)}}},actions:it};ye(nt,ot);const st=(0,t.createInterpolateElement)((0,Ae.__)(" is an API that allows websites to request small payments from users facilitated by the browser and the user's Web Monetization provider.","likecoin"),{WebMonetization:(0,t.createElement)(Je,{text:(0,Ae.__)("Web Monetization","likecoin"),linkAddress:"https://webmonetization.org/"})}),lt=(0,t.createInterpolateElement)((0,Ae.__)("You would need to register a to enable web monetization. However LikeCoin is working hard to integrate web monetization natively into our ecosystem. Follow our latest progress !","likecoin"),{PaymentPointer:(0,t.createElement)(Je,{text:(0,Ae.__)("payment pointer","likecoin"),linkAddress:"https://webmonetization.org/docs/ilp-wallets"}),Here:(0,t.createElement)(Je,{text:(0,Ae.__)("here","likecoin"),linkAddress:"https://community.webmonetization.org/likecoinprotocol"})});var ct=function(){return(0,t.createElement)("div",null,(0,t.createElement)("p",null,st),(0,t.createElement)("p",null,lt))},ut=(0,r.forwardRef)((function(e,n){const a=(0,ke.useSelect)((e=>e(nt).selectPaymentPointer())),{postPaymentPointer:i}=(0,ke.useDispatch)(nt),[o,s]=(0,r.useState)(!!a);(0,r.useEffect)((()=>{s(!!a)}),[a]);const l=(0,r.useRef)();async function c(){if(o)try{i(l.current.value)}catch(e){console.error(e)}}return(0,r.useImperativeHandle)(n,(()=>({submit:c}))),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Re,{title:(0,Ae.__)("Web Monetization","likecoin")}),(0,t.createElement)(ct,null),(0,t.createElement)(Ge,null,(0,t.createElement)(We,{checked:o,handleCheck:s,title:(0,Ae.__)("Web Monetization","likecoin"),details:(0,Ae.__)("Enable","likecoin")})),o&&(0,t.createElement)(Ge,null,(0,t.createElement)("tr",null,(0,t.createElement)("th",{scope:"row"},(0,t.createElement)("label",{for:"site_payment_pointer"},(0,Ae.__)("Payment pointer","likecoin"))),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",placeholder:"$wallet.example.com/alice",defaultValue:a,ref:l})," ",(0,t.createElement)("a",{rel:"noopener noreferrer",target:"_blank",href:"https://webmonetization.org/docs/ilp-wallets/"},(0,Ae.__)("What is payment pointer?","likecoin"))))))})),dt=function(){const[e,n]=(0,r.useState)(!1),a=(0,r.useRef)(),i=(0,r.useRef)(),o=(0,r.useRef)();return(0,t.createElement)("form",{className:"likecoin",onSubmit:async function(e){n(!1),e.preventDefault();try{await Promise.all([a.current.submit(),i.current.submit(),o.current.submit()]),n(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error(e)}}},e&&(0,t.createElement)(Ce,{text:(0,Ae.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),n(!1)}}),(0,t.createElement)(Ke,{ref:a}),(0,t.createElement)("hr",null),(0,t.createElement)(tt,{ref:i}),(0,t.createElement)("hr",null),(0,t.createElement)(ut,{ref:o}),(0,t.createElement)(ze,null))},pt=n(669),ht=n.n(pt),ft=window.lodash,mt=function(e){const n=(0,r.useRef)(),[a,i]=(0,r.useState)(e.defaultLikerId),[o,s]=(0,r.useState)(e.defaultLikerDisplayName),[l,c]=(0,r.useState)(e.defaultLikerWalletAddress),[u,d]=(0,r.useState)(e.defaultLikerAvatar),[p,h]=(0,r.useState)(!1),[f,m]=(0,r.useState)(!1),[E,_]=(0,r.useState)(!0),[k,v]=(0,r.useState)(!1),g=(0,r.useMemo)((()=>(0,ft.debounce)((async t=>{if(t)try{const n=await ht().get(`https://api.${e.likecoHost}/users/id/${t}/min`),{user:r,displayName:a,likeWallet:o,avatar:l}=n.data;i(r),s(a),c(o),d(l),h(!1),e.onLikerIdUpdate({likerIdValue:r,likerDisplayName:a,likerWalletAddress:o,likerAvatar:l})}catch(e){h(!1),i(""),s(""),c(""),d("")}}),500)),[]);return(0,r.useEffect)((()=>{g(a)}),[g,a]),(0,r.useEffect)((()=>{i(e.defaultLikerId),s(e.defaultLikerDisplayName),c(e.defaultLikerWalletAddress),d(e.defaultLikerAvatar),_(!!e.defaultLikerId),v(!!e.defaultLikerId),m(!e.defaultLikerId)}),[e.defaultLikerId,e.defaultLikerDisplayName,e.defaultLikerWalletAddress,e.defaultLikerAvatar]),(0,r.useEffect)((()=>{v(!!a),_(!!a)}),[a]),(0,t.createElement)(t.Fragment,null,e.editable&&(!a||f)&&(0,t.createElement)("div",{className:"tablenav top"},(0,t.createElement)("div",{className:"alignleft actions"},(0,t.createElement)("input",{ref:n,id:"likecoinIdInputBox",className:"likecoinInputBox",type:"text",placeholder:(0,Ae.__)("Search your Liker ID","likecoin"),onChange:function(e){e.preventDefault(),m(!0),h(!0);const t=e.target.value;i(t)}})," ",(0,t.createElement)("a",{id:"likecoinInputLabel",className:"likecoinInputLabel",target:"_blank",rel:"noopener noreferrer",href:`https://${e.likecoHost}/in`},(0,Ae.__)("Sign Up / Find my Liker ID","likecoin"))),(0,t.createElement)("br",{className:"clear"})),p?a&&(0,t.createElement)("p",{className:"description"},(0,Ae.__)("Loading...","likecoin")):o&&(0,t.createElement)("table",{className:"wp-list-table widefat fixed striped table-view-list"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,Ae.__)("Liker ID","likecoin")),(0,t.createElement)("th",null,(0,Ae.__)("Wallet","likecoin")),(0,t.createElement)("th",null))),(0,t.createElement)("tbody",null,(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"column-username"},u&&(0,t.createElement)("img",{id:"likecoinAvatar",src:u,width:"48",height:"48",alt:"Avatar"}),(0,t.createElement)("strong",null,(0,t.createElement)("a",{id:"likecoinId",rel:"noopener noreferrer",target:"_blank",href:`https://${e.likecoHost}/${a}`,className:"likecoin"},o))),(0,t.createElement)("td",null,l),(0,t.createElement)("td",null,e.editable&&(0,t.createElement)(t.Fragment,null,E&&(0,t.createElement)("button",{className:"button",type:"button",onClick:function(e){e.preventDefault(),m(!0)}},(0,Ae.__)("Change","likecoin")),k&&(0,t.createElement)(t.Fragment,null," ",(0,t.createElement)("button",{className:"button button-danger",type:"button",onClick:function(t){t.preventDefault(),i(""),s(""),c(""),d(""),e.onLikerIdUpdate({likerIdValue:"",likerDisplayName:"",likerWalletAddress:"",likerAvatar:""})}},(0,Ae.__)("Disconnect","likecoin")))))))),(0,t.createElement)("section",null,a&&!p&&!u&&(0,t.createElement)("div",{className:"likecoin likecoinError userNotFound"},(0,t.createElement)("h4",null,(0,Ae.__)("Liker ID not found","likecoin")))))};const Et="likecoin/user_liker_info",_t="/likecoin/v1/options/liker-id/user",kt={DBUserLikerId:"",DBUserLikerAvatar:"",DBUserLikerDisplayName:"",DBUserLikerWallet:""},vt={getUserLikerInfo:e=>({type:"GET_USER_LIKER_INFO",path:e}),setUserLikerInfo:e=>({type:"SET_USER_LIKER_INFO",info:e}),setHTTPErrors:e=>({type:"SET_ERROR_MESSAGE",errorMsg:e}),*postUserLikerInfo(e){yield{type:"POST_USER_LIKER_INFO_TO_DB",data:e},e.likecoin_user&&(yield{type:"CHANGE_USER_LIKER_INFO_GLOBAL_STATE",data:e})}},gt={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_USER_LIKER_INFO":return{DBUserLikerId:t.info?t.info.likecoin_user.likecoin_id:"",DBUserLikerAvatar:t.info?t.info.likecoin_user.avatar:"",DBUserLikerDisplayName:t.info?t.info.likecoin_user.display_name:"",DBUserLikerWallet:t.info?t.info.likecoin_user.wallet:""};case"CHANGE_USER_LIKER_INFO_GLOBAL_STATE":return{DBUserLikerId:t.data.userLikerInfos.likecoin_id,DBUserLikerAvatar:t.data.userLikerInfos.avatar,DBUserLikerDisplayName:t.data.userLikerInfos.display_name,DBUserLikerWallet:t.data.userLikerInfos.wallet};default:return e}},controls:{GET_USER_LIKER_INFO:e=>ge()({path:e.path}),POST_USER_LIKER_INFO_TO_DB:e=>ge()({method:"POST",path:_t,data:e.data})},selectors:{selectUserLikerInfo:e=>e},resolvers:{*selectUserLikerInfo(){try{const e=(yield vt.getUserLikerInfo(_t)).data;return vt.setUserLikerInfo(e)}catch(e){return vt.setHTTPErrors(e.message)}}},actions:vt};ye(Et,gt);const{likecoHost:yt}=window.likecoinReactAppData;var St=function(){const{DBUserLikerId:e,DBUserLikerAvatar:n,DBUserLikerDisplayName:a,DBUserLikerWallet:i}=(0,ke.useSelect)((e=>e(Et).selectUserLikerInfo())),{postUserLikerInfo:o}=(0,ke.useDispatch)(Et),[s,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)({});return(0,t.createElement)("div",{className:"likecoin"},s&&(0,t.createElement)(Ce,{text:(0,Ae.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),l(!1)}}),(0,t.createElement)("form",{onSubmit:function(e){l(!1),e.preventDefault();const t={userLikerInfos:{likecoin_id:c.likerIdValue,display_name:c.likerDisplayName,wallet:c.likerWalletAddress,avatar:c.likerAvatar}};try{o(t),l(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error("Error occured when saving to Wordpress DB: ",e)}}},(0,t.createElement)(Re,{title:(0,Ae.__)("Your Liker ID","likecoin")}),(0,t.createElement)("p",null,(0,Ae.__)("This is your Liker ID, which is used to display LikeCoin button when post is not registered on ISCN yet.","likecoin")),(0,t.createElement)(mt,{likecoHost:yt,defaultLikerId:e,defaultLikerDisplayName:a,defaultLikerWalletAddress:i,defaultLikerAvatar:n,editable:!0,onLikerIdUpdate:function(e){u(e)}}),(0,t.createElement)(ze,null)))};const{likecoHost:bt}=window.likecoinReactAppData;var wt=function(){const{DBUserCanEditOption:e,DBSiteLikerId:n,DBSiteLikerAvatar:a,DBSiteLikerDisplayName:i,DBSiteLikerWallet:o}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo())),{postSiteLikerInfo:s}=(0,ke.useDispatch)(Se),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({});return(0,t.createElement)("div",{className:"likecoin"},l&&(0,t.createElement)(Ce,{text:(0,Ae.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),c(!1)}}),(0,t.createElement)("form",{onSubmit:function(t){c(!1),t.preventDefault();const n={siteLikerInfos:{likecoin_id:u.likerIdValue,display_name:u.likerDisplayName,wallet:u.likerWalletAddress,avatar:u.likerAvatar}};try{e&&s(n),c(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error("Error occured when saving to Wordpress DB: ",e)}}},(0,t.createElement)(Re,{title:(0,Ae.__)("Site Default Liker ID","likecoin")}),(0,t.createElement)("p",null,(0,Ae.__)("This will be the site default Liker ID if any author has not set one.","likecoin")),(0,t.createElement)(mt,{likecoHost:bt,defaultLikerId:n,defaultLikerDisplayName:i,defaultLikerWalletAddress:o,defaultLikerAvatar:a,editable:e,onLikerIdUpdate:function(e){d(e)}}),e&&(0,t.createElement)(ze,null)))},Lt=function(e){return(0,t.createElement)("h2",null,e.text)};const{likerlandHost:It}=window.likecoinReactAppData;var At=function(){const e=(0,t.createInterpolateElement)((0,Ae.__)(" is a Decentralized Publishing Infrastructure. It reinvents the publishing industry with decentralized registry, rewards, editorial, and governance.","likecoin"),{LikeCoin:(0,t.createElement)(Je,{text:(0,Ae.__)("LikeCoin","likecoin"),linkAddress:"https://like.co"})}),n=(0,t.createInterpolateElement)((0,Ae.__)("The heart of Decentralized Publishing is decentralized registry powered by , a specification we drafted in collaboration with the industry. Inspired by ISBN for books, ISCN is a unique number assigned to content such as articles and images, and comes with metadata such as author, publisher, content address, license terms and creation footprint. Stored on , ISCN is immutable and censorship resilient. The content, on the other hand, is stored on for tamper resistance and peer-to-peer distribution.","likecoin"),{ISCN:(0,t.createElement)(Je,{text:(0,Ae.__)("ISCN","likecoin"),linkAddress:"https://iscn.io"}),LikeCoinChain:(0,t.createElement)(Je,{text:(0,Ae.__)("LikeCoin chain","likecoin"),linkAddress:"https://likecoin.bigdipper.live/"}),IPFS:(0,t.createElement)(Je,{text:(0,Ae.__)("IPFS","likecoin"),linkAddress:"https://ipfs.io/"})}),r=(0,t.createInterpolateElement)((0,Ae.__)("By simply attaching a LikeCoin button beneath your content and without setting up a paywall, every Like by readers is turned into measurable rewards in . The movement encourages readers to contribute USD5/mo to reward creativity and journalism, while the matching fund, distributed according to the Likes of all users, doubles the rewarding pool. With decentralized rewards, every Like counts.","likecoin"),{LikeCoinTokens:(0,t.createElement)(Je,{text:(0,Ae.__)("LikeCoin tokens","likecoin"),linkAddress:"https://www.coingecko.com/en/coins/likecoin"}),CivicLiker:(0,t.createElement)(Je,{text:(0,Ae.__)("Civic Liker","likecoin"),linkAddress:`https://${It}/civic`})}),a=(0,t.createInterpolateElement)((0,Ae.__)("Not only is LikeCoin token a reward to creators and Content Jockeys, it also serves doubly as the governing token for the decentralized autonomous organization (DAO), namely the . Likers participate in liquid democracy by delegating their LikeCoin tokens to validators they trust, and freely switch among them without a fixed term of office. Issues such as default Content Jockeys, inflation rate and protocol updates require passing a corresponding by the Republic.","likecoin"),{RepublicOfLikerLand:(0,t.createElement)(Je,{text:(0,Ae.__)("Republic of Liker Land","likecoin"),linkAddress:"https://likecoin.bigdipper.live"}),Proposal:(0,t.createElement)(Je,{text:(0,Ae.__)("proposal","likecoin"),linkAddress:"https://likecoin.bigdipper.live/proposalsc"})});return(0,t.createElement)("div",{className:"likecoin"},(0,t.createElement)(Lt,{text:(0,Ae.__)("What is LikeCoin?","likecoin")}),(0,t.createElement)("p",null,e),(0,t.createElement)(Lt,{text:(0,Ae.__)("Decentralized Registry","likecoin")}),(0,t.createElement)("p",null,n),(0,t.createElement)(Lt,{text:(0,Ae.__)("Decentralized Rewards","likecoin")}),(0,t.createElement)("p",null,r),(0,t.createElement)(Lt,{text:(0,Ae.__)("Decentralized Editorials","likecoin")}),(0,t.createElement)("p",null,(0,Ae.__)("Apart from rewarding creators as a Liker, readers may go further to become a Content Jockey. Content Jockeys help curate creative stories and insightful commentaries with Super Like, which is purposely designed to be scarce to cut out noise from signals. When a story gets popular, LikeCoin's unique distribution footprint rewards both creator and Content Jockey, creating an all win situation for the content ecosystem.","likecoin")),(0,t.createElement)(Lt,{text:(0,Ae.__)("Decentralized Governance","likecoin")}),(0,t.createElement)("p",null,a),(0,t.createElement)("iframe",{className:"lcp-github-sponsor-card",src:"https://github.com/sponsors/likecoin/card",title:"Sponsor likecoin",height:"225",width:"660"}))},Dt=function(){const e=(0,t.createInterpolateElement)((0,Ae.__)("Please refer to for help on using this plugin","likecoin"),{Help:(0,t.createElement)(Je,{text:(0,Ae.__)("this guide","likecoin"),linkAddress:"https://docs.like.co/user-guide/wordpress"})}),n=(0,t.createInterpolateElement)((0,Ae.__)("Never heard of LikeCoin? Don’t worry, here are some for you to get started.","likecoin"),{LikeCoin:(0,t.createElement)(Je,{text:(0,Ae.__)("LikeCoin","likecoin"),linkAddress:"https://like.co"}),Link:(0,t.createElement)(Je,{text:(0,Ae.__)("here","likecoin"),linkAddress:`https://faucet.like.co/?platform=wordpress&referrer=${encodeURIComponent(document.location.origin)}`})});return(0,t.createElement)("div",{className:"lcp-nav-tab-panel likecoin"},(0,t.createElement)(Re,{title:(0,Ae.__)("Getting Started","likecoin")}),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h2",null,(0,Ae.__)("1. Get some LikeCoin token to get started","likecoin")),(0,t.createElement)("p",null,n)),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h2",null,(0,Ae.__)("2. You are ready, let’s publish.","likecoin")),(0,t.createElement)("p",null,(0,Ae.__)("Here is a video to help you understand how to publish a Writing NFT","likecoin")),(0,t.createElement)("iframe",{height:"315",src:"https://www.youtube.com/embed/iyquF_ClMeQ",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0,style:{width:"100%",maxWidth:"560px"}}),(0,t.createElement)("p",null,e)),(0,t.createElement)("hr",null),(0,t.createElement)(Re,{title:(0,Ae.__)("Useful Tips","likecoin")}),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h3",null,(0,Ae.__)("Publish your post before you mint Writing NFT","likecoin")),(0,t.createElement)("p",null,(0,Ae.__)("You need to publish your post first, then you can find the Publish button on the editing sidebar.","likecoin"))),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h3",null,(0,Ae.__)("Publish alone with licence","likecoin")),(0,t.createElement)("p",null,(0,Ae.__)("You can set your preferred licence on the editing sidebar.","likecoin"))),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h3",null,(0,Ae.__)("Encourage your readers to collect Writing NFT of your works","likecoin")),(0,t.createElement)("p",null,(0,Ae.__)("Let your readers aware they can collect Writing NFT of your works. Let them know it is meaningful to support you.","likecoin"))))};const Nt=window.likecoinReactAppData||{},{appSelector:Pt}=Nt,Tt=document.querySelector(Pt);Tt&&(0,t.render)((0,t.createElement)((function(t){let{basename:n,children:a,window:d}=t,p=r.useRef();var h;null==p.current&&(p.current=(void 0===(h={window:d,v5Compat:!0})&&(h={}),function(t,n,r,a){void 0===a&&(a={});let{window:c=document.defaultView,v5Compat:d=!1}=a,p=c.history,h=e.Pop,f=null;function m(){h=e.Pop,f&&f({action:h,location:E.location})}let E={get action(){return h},get location(){return t(c,p)},listen(e){if(f)throw new Error("A history only accepts one active listener");return c.addEventListener(i,m),f=e,()=>{c.removeEventListener(i,m),f=null}},createHref:e=>n(c,e),encodeLocation(e){let t=u("string"==typeof e?e:l(e));return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){h=e.Push;let a=s(E.location,t,n);r&&r(a,t);let i=o(a),l=E.createHref(a);try{p.pushState(i,"",l)}catch(e){c.location.assign(l)}d&&f&&f({action:h,location:E.location})},replace:function(t,n){h=e.Replace;let a=s(E.location,t,n);r&&r(a,t);let i=o(a),l=E.createHref(a);p.replaceState(i,"",l),d&&f&&f({action:h,location:E.location})},go:e=>p.go(e)};return E}((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=c(e.location.hash.substr(1));return s("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:l(t))}),(function(e,t){!function(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),h)));let f=p.current,[m,E]=r.useState({action:f.action,location:f.location});return r.useLayoutEffect((()=>f.listen(E)),[f]),r.createElement(se,{basename:n,children:a,location:m.location,navigationType:m.action,navigator:f})}),null,(0,t.createElement)((function(){const{DBUserCanEditOption:e}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo()));return(0,t.createElement)("div",{className:"wrap"},(0,t.createElement)("h2",null," "),(0,t.createElement)(Ne,null),(0,t.createElement)(le,null,(0,t.createElement)(oe,{path:"",element:(0,t.createElement)(Oe,null)},(0,t.createElement)(oe,{index:!0,element:e?(0,t.createElement)($e,null):(0,t.createElement)(ae,{to:"/about",replace:!0})}),(0,t.createElement)(oe,{path:"advanced",element:(0,t.createElement)(dt,null)}),(0,t.createElement)(oe,{path:"about",element:(0,t.createElement)(At,null)})),(0,t.createElement)(oe,{path:"liker-id",element:(0,t.createElement)(qe,null)},(0,t.createElement)(oe,{index:!0,element:e?(0,t.createElement)(wt,null):(0,t.createElement)(ae,{to:"user",replace:!0})}),(0,t.createElement)(oe,{path:"user",element:(0,t.createElement)(St,null)})),(0,t.createElement)(oe,{path:"help",element:(0,t.createElement)(Dt,null)})))}),null)),Tt)}()}(); \ No newline at end of file +!function(){var e={669:function(e,t,n){e.exports=n(609)},448:function(e,t,n){"use strict";var r=n(867),a=n(26),i=n(372),o=n(327),s=n(97),l=n(109),c=n(985),u=n(61);e.exports=function(e){return new Promise((function(t,n){var d=e.data,p=e.headers,h=e.responseType;r.isFormData(d)&&delete p["Content-Type"];var m=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(f+":"+E)}var _=s(e.baseURL,e.url);function k(){if(m){var r="getAllResponseHeaders"in m?l(m.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m};a(t,n,i),m=null}}if(m.open(e.method.toUpperCase(),o(_,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,"onloadend"in m?m.onloadend=k:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(k)},m.onabort=function(){m&&(n(u("Request aborted",e,"ECONNABORTED",m)),m=null)},m.onerror=function(){n(u("Network Error",e,null,m)),m=null},m.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",m)),m=null},r.isStandardBrowserEnv()){var v=(e.withCredentials||c(_))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}"setRequestHeader"in m&&r.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:m.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),h&&"json"!==h&&(m.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&m.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){m&&(m.abort(),n(e),m=null)})),d||(d=null),m.send(d)}))}},609:function(e,t,n){"use strict";var r=n(867),a=n(849),i=n(321),o=n(185);function s(e){var t=new i(e),n=a(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var l=s(n(655));l.Axios=i,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(263),l.CancelToken=n(972),l.isCancel=n(502),l.all=function(e){return Promise.all(e)},l.spread=n(713),l.isAxiosError=n(268),e.exports=l,e.exports.default=l},263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:function(e,t,n){"use strict";var r=n(263);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(867),a=n(327),i=n(782),o=n(572),s=n(185),l=n(875),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var a,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var u=[o,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),a=Promise.resolve(e);u.length;)a=a.then(u.shift(),u.shift());return a}for(var d=e;n.length;){var p=n.shift(),h=n.shift();try{d=p(d)}catch(e){h(e);break}}try{a=o(d)}catch(e){return Promise.reject(e)}for(;i.length;)a=a.then(i.shift(),i.shift());return a},u.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},782:function(e,t,n){"use strict";var r=n(867);function a(){this.handlers=[]}a.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},97:function(e,t,n){"use strict";var r=n(793),a=n(303);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},61:function(e,t,n){"use strict";var r=n(481);e.exports=function(e,t,n,a,i){var o=new Error(e);return r(o,t,n,a,i)}},572:function(e,t,n){"use strict";var r=n(867),a=n(527),i=n(502),o=n(655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,n,r,a){return e.config=t,n&&(e.code=n),e.request=r,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:function(e,t,n){"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=l(void 0,e[a])):n[a]=l(e[a],t[a])}r.forEach(a,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(i,c),r.forEach(o,(function(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=l(void 0,e[a])):n[a]=l(void 0,t[a])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=a.concat(i).concat(o).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},26:function(e,t,n){"use strict";var r=n(61);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:function(e,t,n){"use strict";var r=n(867),a=n(655);e.exports=function(e,t,n){var i=this||a;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},655:function(e,t,n){"use strict";var r=n(867),a=n(16),i=n(481),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(448)),l),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(o)})),e.exports=c},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:function(e,t,n){"use strict";var r=n(593),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},o=r.version.split(".");function s(e,t){for(var n=t?t.split("."):o,r=e.split("."),a=0;a<3;a++){if(n[a]>r[a])return!0;if(n[a]0;){var i=r[a],o=t[i];if(o){var s=e[i],l=void 0===s||o(s,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:a}},867:function(e,t,n){"use strict";var r=n(849),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function u(e){let t="undefined"!=typeof window&&void 0!==window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"==typeof e?e:l(e);return new URL(n,t)}var d;function p(e,t,n){void 0===n&&(n="/");let r=g(("string"==typeof t?c(t):t).pathname||"/",n);if(null==r)return null;let a=h(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let e=0;null==i&&e{let i={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(y(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let o=L([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(y(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),h(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:E(o,e.index),routesMeta:s})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(d||(d={}));const m=/^:\w+$/,f=e=>"*"===e;function E(e,t){let n=e.split("/"),r=n.length;return n.some(f)&&(r+=-2),t&&(r+=2),n.filter((e=>!f(e))).reduce(((e,t)=>e+(m.test(t)?3:""===t?1:10)),r)}function _(e,t){let{routesMeta:n}=e,r={},a="/",i=[];for(let e=0;e(r.push(t),"([^\\/]+)")));return e.endsWith("*")?(r.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return S(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function v(e){try{return decodeURI(e)}catch(t){return S(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function g(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function y(e,t){if(!1===e||null==e)throw new Error(t)}function S(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function b(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function w(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=c(e):(i=a({},e),y(!i.pathname||!i.pathname.includes("?"),b("?","pathname","search",i)),y(!i.pathname||!i.pathname.includes("#"),b("#","pathname","hash",i)),y(!i.search||!i.search.includes("#"),b("#","search","hash",i)));let o,s=""===e||""===i.pathname,l=s?"/":i.pathname;if(r||null==l)o=n;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?c(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:A(r),hash:N(a)}}(i,o),d=l&&"/"!==l&&l.endsWith("/"),p=(s||"."===l)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!p||(u.pathname+="/"),u}const L=e=>e.join("/").replace(/\/\/+/g,"/"),P=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",N=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function T(e){return e instanceof class{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}}const D=["post","put","patch","delete"],O=(new Set(D),["get",...D]);function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;te.pathnameBase))),o=r.useRef(!1);return r.useEffect((()=>{o.current=!0})),r.useCallback((function(n,r){if(void 0===r&&(r={}),!o.current)return;if("number"==typeof n)return void t.go(n);let s=I(n,JSON.parse(i),a,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:L([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)}),[e,t,i,a])}const V=r.createContext(null);function X(e,t){let{relative:n}=void 0===t?{}:t,{matches:a}=r.useContext(K),{pathname:i}=J(),o=JSON.stringify(w(a).map((e=>e.pathnameBase)));return r.useMemo((()=>I(e,JSON.parse(o),i,"path"===n)),[e,o,i,n])}function Q(){let e=function(){var e;let t=r.useContext(z),n=function(e){let t=r.useContext(H);return t||y(!1),t}(ne.UseRouteError),a=r.useContext(K),i=a.matches[a.matches.length-1];return t||(a||y(!1),!i.route.id&&y(!1),null==(e=n.errors)?void 0:e[i.route.id])}(),t=T(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unhandled Thrown Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,r.createElement("p",null,"💿 Hey developer 👋"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:o},"errorElement")," props on ",r.createElement("code",{style:o},"")))}class Z extends r.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(z.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}function ee(e){let{routeContext:t,match:n,children:a}=e,i=r.useContext(W);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),r.createElement(K.Provider,{value:t},a)}var te,ne,re;function ae(e){let{to:t,replace:n,state:a,relative:i}=e;q()||y(!1);let o=r.useContext(H),s=Y();return r.useEffect((()=>{o&&"idle"!==o.navigation.state||s(t,{replace:n,state:a,relative:i})})),null}function ie(e){return function(e){let t=r.useContext(K).outlet;return t?r.createElement(V.Provider,{value:e},t):t}(e.context)}function oe(e){y(!1)}function se(t){let{basename:n="/",children:a=null,location:i,navigationType:o=e.Pop,navigator:s,static:l=!1}=t;q()&&y(!1);let u=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:s,static:l})),[u,s,l]);"string"==typeof i&&(i=c(i));let{pathname:p="/",search:h="",hash:m="",state:f=null,key:E="default"}=i,_=r.useMemo((()=>{let e=g(p,u);return null==e?null:{pathname:e,search:h,hash:m,state:f,key:E}}),[u,p,h,m,f,E]);return null==_?null:r.createElement(G.Provider,{value:d},r.createElement($.Provider,{children:a,value:{location:_,navigationType:o}}))}function le(t){let{children:n,location:a}=t,i=r.useContext(F);return function(t,n){q()||y(!1);let{navigator:a}=r.useContext(G),i=r.useContext(H),{matches:o}=r.useContext(K),s=o[o.length-1],l=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=J();if(n){var m;let e="string"==typeof n?c(n):n;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||y(!1),d=e}else d=h;let f=d.pathname||"/",E=p(t,{pathname:"/"===u?f:f.slice(u.length)||"/"}),_=function(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}let a=e,i=null==n?void 0:n.errors;if(null!=i){let e=a.findIndex((e=>e.route.id&&(null==i?void 0:i[e.route.id])));e>=0||y(!1),a=a.slice(0,Math.min(a.length,e+1))}return a.reduceRight(((e,o,s)=>{let l=o.route.id?null==i?void 0:i[o.route.id]:null,c=n?o.route.errorElement||r.createElement(Q,null):null,u=()=>r.createElement(ee,{match:o,routeContext:{outlet:e,matches:t.concat(a.slice(0,s+1))}},l?c:void 0!==o.route.element?o.route.element:e);return n&&(o.route.errorElement||0===s)?r.createElement(Z,{location:n.location,component:c,error:l,children:u()}):u()}),null)}(E&&E.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:L([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:L([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,i||void 0);return n&&_?r.createElement($.Provider,{value:{location:x({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},_):_}(i&&!n?i.router.routes:ce(n),a)}function ce(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;if(e.type===r.Fragment)return void n.push.apply(n,ce(e.props.children,t));e.type!==oe&&y(!1),e.props.index&&e.props.children&&y(!1);let i=[...t,a],o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=ce(e.props.children,i)),n.push(o)})),n}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}!function(e){e.UseRevalidator="useRevalidator"}(te||(te={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(ne||(ne={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(re||(re={})),new Promise((()=>{})),r.Component;const pe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],he=["aria-current","caseSensitive","className","end","style","to","children"],me=r.forwardRef((function(e,t){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:c,to:u,preventScrollReset:d}=e,p=de(e,pe),h=function(e,t){let{relative:n}=void 0===t?{}:t;q()||y(!1);let{basename:a,navigator:i}=r.useContext(G),{hash:o,pathname:s,search:l}=X(e,{relative:n}),c=s;return"/"!==a&&(c="/"===s?a:L([a,s])),i.createHref({pathname:c,search:l,hash:o})}(u,{relative:a}),m=function(e,t){let{target:n,replace:a,state:i,preventScrollReset:o,relative:s}=void 0===t?{}:t,c=Y(),u=J(),d=X(e,{relative:s});return r.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==a?a:l(u)===l(d);c(e,{replace:n,state:i,preventScrollReset:o,relative:s})}}),[u,c,d,a,i,n,e,o,s])}(u,{replace:o,state:s,target:c,preventScrollReset:d,relative:a});return r.createElement("a",ue({},p,{href:h,onClick:i?n:function(e){n&&n(e),e.defaultPrevented||m(e)},ref:t,target:c}))})),fe=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:c}=e,u=de(e,he),d=X(l,{relative:u.relative}),p=J(),h=r.useContext(H),{navigator:m}=r.useContext(G),f=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,E=p.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;a||(E=E.toLowerCase(),_=_?_.toLowerCase():null,f=f.toLowerCase());let k,v=E===f||!o&&E.startsWith(f)&&"/"===E.charAt(f.length),g=null!=_&&(_===f||!o&&_.startsWith(f)&&"/"===_.charAt(f.length)),y=v?n:void 0;k="function"==typeof i?i({isActive:v,isPending:g}):[i,v?"active":null,g?"pending":null].filter(Boolean).join(" ");let S="function"==typeof s?s({isActive:v,isPending:g}):s;return r.createElement(me,ue({},u,{"aria-current":y,className:k,ref:t,style:S,to:l}),"function"==typeof c?c({isActive:v,isPending:g}):c)}));var Ee,_e;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Ee||(Ee={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_e||(_e={}));var ke=window.wp.data,ve=window.wp.apiFetch,ge=n.n(ve);function ye(e,t){if(ke.createReduxStore){const n=(0,ke.createReduxStore)(e,t);return(0,ke.register)(n),n}return(0,ke.registerStore)(e,t),e}const Se="likecoin/site_liker_info",be="/likecoin/v1/options/liker-id",we={DBUserCanEditOption:!0,DBErrorMessage:"",DBSiteLikerId:"",DBSiteLikerAvatar:"",DBSiteLikerDisplayName:"",DBSiteLikerWallet:"",DBDisplayOptionSelected:"none",DBPerPostOptionEnabled:!1},Ie={getSiteLikerInfo:e=>({type:"GET_SITE_LIKER_INFO",path:e}),setSiteLikerInfo:e=>({type:"SET_SITE_LIKER_INFO",info:e}),setHTTPError(e){const t=e.response.data||e.message;return 403===e.response.status?{type:"SET_FORBIDDEN_ERROR",errorMsg:t}:{type:"SET_ERROR_MESSAGE",errorMsg:t}},*postSiteLikerInfo(e){yield{type:"POST_SITE_LIKER_INFO_TO_DB",data:e},e.siteLikerInfos&&(yield{type:"CHANGE_SITE_LIKER_INFO_GLOBAL_STATE",data:e})}},Le={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SITE_LIKER_INFO":return{...e,DBSiteLikerId:t.info.site_likecoin_user.likecoin_id,DBSiteLikerAvatar:t.info.site_likecoin_user.avatar,DBSiteLikerDisplayName:t.info.site_likecoin_user.display_name,DBSiteLikerWallet:t.info.site_likecoin_user.wallet,DBDisplayOptionSelected:t.info.button_display_option,DBPerPostOptionEnabled:t.info.button_display_author_override,DBUserCanEditOption:t.info.user_can_edit};case"CHANGE_SITE_LIKER_INFO_GLOBAL_STATE":return{...e,DBSiteLikerId:t.data.siteLikerInfos.likecoin_id,DBSiteLikerAvatar:t.data.siteLikerInfos.avatar,DBSiteLikerDisplayName:t.data.siteLikerInfos.display_name,DBSiteLikerWallet:t.data.siteLikerInfos.wallet};case"SET_FORBIDDEN_ERROR":return{DBUserCanEditOption:!1,DBErrorMessage:t.errorMsg};case"SET_ERROR_MESSAGE":return{DBErrorMessage:t.errorMsg};default:return e}},controls:{GET_SITE_LIKER_INFO:()=>ge()({path:be}),POST_SITE_LIKER_INFO_TO_DB:e=>ge()({method:"POST",path:be,data:e.data})},selectors:{selectSiteLikerInfo:e=>e},resolvers:{*selectSiteLikerInfo(){try{const e=(yield Ie.getSiteLikerInfo()).data,t=!("1"!==e.button_display_author_override&&!0!==e.button_display_author_override);return e.button_display_author_override=t,e.button_display_option||(e.button_display_option=we.DBDisplayOptionSelected),e.site_likecoin_user||(e.site_likecoin_user={}),Ie.setSiteLikerInfo(e)}catch(e){return Ie.setHTTPError(e)}}},actions:Ie};ye(Se,Le);var Pe=window.wp.i18n,Ae=n.p+"images/w3p_logo.443a5708.png",Ne=function(){return(0,t.createElement)("header",{className:"lcp-admin-header"},(0,t.createElement)("img",{src:Ae,alt:(0,Pe.__)("Web3Press logo","likecoin")}),(0,t.createElement)("a",{className:"lcp-admin-header__portfolio-button",href:"https://liker.land/dashboard",rel:"noopener noreferrer",target:"_blank"},(0,Pe.__)("Your Portfolio","likecoin")," ",(0,t.createElement)("span",{className:"dashicons dashicons-external"})))};const Te=e=>{let{isActive:t}=e;return"nav-tab"+(t?" nav-tab-active":"")};var De=function(e){return(0,t.createElement)("nav",{className:"lcp-nav-tab-wrapper nav-tab-wrapper wp-clearfix"},e.children)},Oe=function(){const{DBUserCanEditOption:e}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo()));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(De,null,e&&(0,t.createElement)(fe,{className:Te,to:"",end:!0},(0,Pe.__)("General","likecoin")),e&&(0,t.createElement)(fe,{className:Te,to:"advanced"},(0,Pe.__)("Advanced","likecoin")),(0,t.createElement)(fe,{className:Te,to:"about"},(0,Pe.__)("About","likecoin"))),(0,t.createElement)("div",{className:"lcp-nav-tab-panel"},(0,t.createElement)(ie,null)))},xe=function(e){return(0,t.createElement)("tr",null,(0,t.createElement)("th",{className:"optionTitle",scope:"row"},(0,t.createElement)("label",null,e.title)),(0,t.createElement)("td",null,(0,t.createElement)("select",{ref:e.selectRef,onChange:t=>{e.handleSelect(t.target.value)},value:e.selected},e.options.map((e=>(0,t.createElement)("option",{value:e.value,key:e.label}," ",e.label," "))))))},Re=function(e){return(0,t.createElement)("h2",{className:"title"},e.title)},Ce=function(e){return(0,t.createElement)("div",{className:`notice ${e.className} is-dismissable`},(0,t.createElement)("p",null,(0,t.createElement)("strong",null,e.text)),(0,t.createElement)("button",{className:"notice-dismiss",id:"notice-dismiss",onClick:e.handleNoticeDismiss},(0,t.createElement)("span",{className:"screen-reader-text"})))};const Be="likecoin/site_publish",Me="/likecoin/v1/option/publish/settings/matters",Ue={DBSiteMattersId:"",DBSiteMattersToken:"",DBSiteMattersAutoSaveDraft:!1,DBSiteMattersAutoPublish:!1,DBSiteMattersAddFooterLink:!1,DBSiteInternetArchiveEnabled:!1,DBSiteInternetArchiveAccessKey:"",DBISCNBadgeStyleOption:"none"},je={getSitePublishOptions:e=>({type:"GET_SITE_PUBLISH_OPTIONS",path:e}),setSitePublishOptions:e=>({type:"SET_SITE_PUBLISH_OPTIONS",options:e}),setHTTPErrors:e=>({type:"SET_ERROR_MESSAGE",errorMsg:e}),*siteMattersLogin(e){try{return yield{type:"MATTERS_LOGIN",data:e}}catch(e){return console.error(e),e}},*siteMattersLogout(){try{return yield{type:"MATTERS_LOGOUT"}}catch(e){return console.error(e),e}},*postSitePublishOptions(e){yield{type:"POST_SITE_PUBLISH_OPTIONS_TO_DB",data:e},yield{type:"CHANGE_SITE_PUBLISH_OPTIONS_GLOBAL_STATE",data:e}},*updateSiteMattersLoginGlobalState(e){yield{type:"CHANGE_SITE_MATTERS_USER_GLOBAL_STATE",data:e}}},We={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SITE_PUBLISH_OPTIONS":return{DBSiteMattersId:t.options.matters_id,DBSiteMattersToken:t.options.access_token,DBSiteMattersAutoSaveDraft:t.options.site_matters_auto_save_draft,DBSiteMattersAutoPublish:t.options.site_matters_auto_publish,DBSiteMattersAddFooterLink:t.options.site_matters_add_footer_link,DBSiteInternetArchiveEnabled:t.options.lc_internet_archive_enabled,DBSiteInternetArchiveAccessKey:t.options.lc_internet_archive_access_key,DBISCNBadgeStyleOption:t.options.iscn_badge_style_option};case"CHANGE_SITE_PUBLISH_OPTIONS_GLOBAL_STATE":{const n=JSON.parse(JSON.stringify({DBSiteMattersAutoSaveDraft:t.data.siteMattersAutoSaveDraft,DBSiteMattersAutoPublish:t.data.siteMattersAutoPublish,DBSiteMattersAddFooterLink:t.data.siteMattersAddFooterLink,DBSiteInternetArchiveEnabled:t.data.siteInternetArchiveEnabled,DBSiteInternetArchiveAccessKey:t.data.siteInternetArchiveAccessKey,DBISCNBadgeStyleOption:t.data.ISCNBadgeStyleOption}));return{...e,...n}}case"CHANGE_SITE_MATTERS_USER_GLOBAL_STATE":return{...e,DBSiteMattersId:t.data.mattersId,DBSiteMattersToken:t.data.accessToken};default:return e}},controls:{GET_SITE_PUBLISH_OPTIONS:e=>ge()({path:e.path}),MATTERS_LOGIN:e=>ge()({method:"POST",path:Me,data:e.data}),POST_SITE_PUBLISH_OPTIONS_TO_DB:e=>ge()({method:"POST",path:"/likecoin/v1/option/publish",data:e.data}),MATTERS_LOGOUT:()=>ge()({method:"DELETE",path:Me})},selectors:{selectSitePublishOptions:e=>e},resolvers:{*selectSitePublishOptions(){try{const e=yield je.getSitePublishOptions("/likecoin/v1/option/publish"),t=e.data,n=e.data.site_matters_user?e.data.site_matters_user.matters_id:"",r=e.data.site_matters_user?e.data.site_matters_user.access_token:"",a=!("1"!==t.site_matters_auto_save_draft&&!0!==t.site_matters_auto_save_draft),i=!("1"!==t.site_matters_auto_publish&&!0!==t.site_matters_auto_publish),o=!("1"!==t.site_matters_add_footer_link&&!0!==t.site_matters_add_footer_link);return t.matters_id=n,t.access_token=r,t.site_matters_auto_save_draft=a,t.site_matters_auto_publish=i,t.site_matters_add_footer_link=o,t.iscn_badge_style_option||(t.iscn_badge_style_option=Ue.DBISCNBadgeStyleOption),je.setSitePublishOptions(t)}catch(e){return je.setHTTPErrors(e.message)}}},actions:je};ye(Be,We);var Fe=function(e){return(0,t.createElement)("tr",null,(0,t.createElement)("th",{scope:"row",className:"optionTitle"},(0,t.createElement)("label",null,e.title)),(0,t.createElement)("td",null,e.children,!!e.details&&(0,t.createElement)("p",{class:"description"},e.details)))},He=function(e){return(0,t.createElement)(Fe,{title:e.title,details:e.details},(0,t.createElement)("input",{type:"checkbox",checked:e.checked,disabled:e.disabled,onChange:()=>{e.handleCheck(!e.checked)},ref:e.checkRef}),e.append)},Ge=function(e){let{children:n}=e;return(0,t.createElement)("table",{className:"form-table",role:"presentation"},(0,t.createElement)("tbody",null,n))},$e=function(e){let{children:n}=e;return(0,t.createElement)("div",{className:"submit"},(0,t.createElement)("button",{className:"button button-primary"},(0,Pe.__)("Confirm","likecoin")),n)},Ke=function(){const{postSiteLikerInfo:e}=(0,ke.useDispatch)(Se),{postSitePublishOptions:n}=(0,ke.useDispatch)(Be),{DBUserCanEditOption:a,DBDisplayOptionSelected:i}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo())),{DBISCNBadgeStyleOption:o}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),[s,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)("post"===i||"always"===i),[d,p]=(0,r.useState)("page"===i||"always"===i),h=(0,r.useRef)(),m=[{value:"light",label:(0,Pe.__)("Light Mode","likecoin")},{value:"dark",label:(0,Pe.__)("Dark Mode","likecoin")},{value:"none",label:(0,Pe.__)("Not shown","likecoin")}],[f,E]=(0,r.useState)(o);(0,r.useEffect)((()=>{E(o)}),[o]),(0,r.useEffect)((()=>{u("post"===i||"always"===i),p("page"===i||"always"===i)}),[i]);const _=(0,Pe.__)("Sorry, you are not allowed to access this page.","likecoin");return a?(0,t.createElement)("div",{className:"likecoin"},s&&(0,t.createElement)(Ce,{text:(0,Pe.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),l(!1)}}),(0,t.createElement)("form",{onSubmit:async function(t){l(!1),t.preventDefault();const r=h.current.value;let a="none";c&&d?a="always":c?a="post":d&&(a="page");const i={displayOption:a},o={ISCNBadgeStyleOption:r};try{await Promise.all([e(i),n(o)]),l(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error(e)}}},(0,t.createElement)(Re,{title:(0,Pe.__)("LikeCoin widget","likecoin")}),(0,t.createElement)("p",null,(0,Pe.__)("Display LikeCoin Button/Widget when author has a Liker ID, or if post is registered on ISCN","likecoin")),(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:c,handleCheck:u,title:(0,Pe.__)("Show in Posts","likecoin"),append:(0,Pe.__)(" *Recommended","likecoin")}),(0,t.createElement)(He,{checked:d,handleCheck:p,title:(0,Pe.__)("Show in Pages","likecoin")})),(0,t.createElement)("hr",null),(0,t.createElement)(Re,{title:(0,Pe.__)("ISCN Badge","likecoin")}),(0,t.createElement)("p",null,(0,Pe.__)("Display a badge for ISCN registered post","likecoin")),(0,t.createElement)(Ge,null,(0,t.createElement)(xe,{selected:f,handleSelect:E,title:(0,Pe.__)("Display style","likecoin"),selectRef:h,options:m})),(0,t.createElement)($e,null," ",(0,t.createElement)("a",{className:"button",href:"#",onClick:function(e){e.preventDefault(),u(!0),p(!1),E("none")}},(0,Pe.__)("Reset to default","likecoin"))))):(0,t.createElement)("p",null,_)},ze=function(){const{DBUserCanEditOption:e}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo()));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(De,null,e&&(0,t.createElement)(fe,{className:Te,to:"",end:!0},(0,Pe.__)("Website Liker ID","likecoin")),(0,t.createElement)(fe,{className:Te,to:"user"},(0,Pe.__)("Your Liker ID","likecoin"))),(0,t.createElement)("div",{className:"lcp-nav-tab-panel"},(0,t.createElement)(ie,null)))},qe=(0,r.forwardRef)((function(e,n){const{postSiteLikerInfo:a}=(0,ke.useDispatch)(Se),{DBPerPostOptionEnabled:i}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo())),o=(0,r.useRef)();(0,r.useEffect)((()=>{l(i)}),[i]);const[s,l]=(0,r.useState)(i);async function c(e){const t={perPostOptionEnabled:o.current.checked};await a(t)}return(0,r.useImperativeHandle)(n,(()=>({submit:c}))),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Re,{title:(0,Pe.__)("LikeCoin widget advanced settings","likecoin")}),(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:s,handleCheck:l,title:(0,Pe.__)("Post option","likecoin"),details:(0,Pe.__)("Allow editors to customize display setting per post","likecoin"),append:(0,t.createElement)("a",{href:"#",onClick:function(e){e.preventDefault(),l(!1)}},(0,Pe.__)("Reset to default","likecoin")),checkRef:o})))})),Je=function(e){return(0,t.createElement)("a",{rel:"noopener noreferrer",target:"_blank",href:e.linkAddress},e.text)},Ye=function(){const e=(0,t.createInterpolateElement)((0,Pe.__)(" is a decentralized, cryptocurrency driven content creation and discussion platform. ","likecoin"),{Matters:(0,t.createElement)(Je,{text:(0,Pe.__)("Matters","likecoin"),linkAddress:"https://matters.news"})}),n=(0,t.createInterpolateElement)((0,Pe.__)("By publishing on Matters, your articles will be stored to the distributed InterPlanetary File System () nodes and get rewarded. Take the first step to publish your creation and reclaim your ownership of data!","likecoin"),{IPFS:(0,t.createElement)(Je,{text:(0,Pe.__)("IPFS","likecoin"),linkAddress:"https://ipfs.io"})});return(0,t.createElement)("div",null,(0,t.createElement)("p",null,e),(0,t.createElement)("p",null,n))},Ve=function(e){return(0,t.createElement)(Ge,null,(0,t.createElement)(Fe,{title:(0,Pe.__)("Connect to Matters","likecoin")},(0,t.createElement)("p",{className:"description"},(0,Pe.__)("Login with Matters ID","likecoin")),(0,t.createElement)(Ge,null,(0,t.createElement)(Fe,{title:(0,Pe.__)("Matters login email ","likecoin")},(0,t.createElement)("input",{ref:e.mattersIdRef,id:"matters_id",name:"lc_matters_id",type:"text"})),(0,t.createElement)(Fe,{title:(0,Pe.__)("Password ","likecoin")},(0,t.createElement)("input",{ref:e.mattersPasswordRef,id:"matters_password",name:"lc_matters_password",type:"password"})),(0,t.createElement)(Fe,null,(0,t.createElement)("input",{id:"lcMattersIdLoginBtn",className:"button button-primary",type:"button",value:(0,Pe.__)("Login","likecoin"),onClick:e.loginHandler}),e.mattersLoginError&&(0,t.createElement)("p",{id:"lcMattersErrorMessage"},e.mattersLoginError)))))},Xe=function(e){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h4",null,(0,Pe.__)("Matters connection status","likecoin")),(0,t.createElement)("table",{className:"form-table",role:"presentation"},(0,t.createElement)("tbody",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",{scope:"row"},(0,t.createElement)("label",{for:"site_matters_user"},(0,Pe.__)("Connection Status","likecoin"))),(0,t.createElement)("td",null,(0,t.createElement)("div",null,(0,t.createElement)("span",null,(0,t.createElement)("b",null,e.siteMattersId.length>0&&(0,t.createElement)(t.Fragment,null,(0,Pe.__)("Logged in as ","likecoin"),(0,t.createElement)("a",{rel:"noopener noreferrer",target:"_blank",href:`https://matters.news/@${e.siteMattersId}`},e.siteMattersId," ")),0===e.siteMattersId.length&&(0,t.createElement)("b",null," ",(0,Pe.__)("Not connected","likecoin")," "))),e.siteMattersId.length>0&&(0,t.createElement)("span",{className:"actionWrapper",style:{paddingLeft:"20px"}},(0,t.createElement)("a",{id:"lcMattersIdLogoutButton",type:"button",onClick:e.handleMattersLogout,target:"_blank",href:"#"},(0,Pe.__)("Logout","likecoin")))))))))},Qe=(0,r.forwardRef)((function(e,n){const{DBSiteMattersId:a,DBSiteMattersAutoSaveDraft:i,DBSiteMattersAutoPublish:o,DBSiteMattersAddFooterLink:s}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),[l,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(i),[p,h]=(0,r.useState)(o),[m,f]=(0,r.useState)(s),[E,_]=(0,r.useState)(""),k=(0,r.useRef)(),v=(0,r.useRef)(),g=(0,r.useRef)(),y=(0,r.useRef)(),S=(0,r.useRef)(),{postSitePublishOptions:b,siteMattersLogin:w,siteMattersLogout:I,updateSiteMattersLoginGlobalState:L}=(0,ke.useDispatch)(Be);async function P(){const e=g.current.checked,t=y.current.checked,n=S.current.checked;b({siteMattersAutoSaveDraft:e,siteMattersAutoPublish:t,siteMattersAddFooterLink:n})}return(0,r.useImperativeHandle)(n,(()=>({submit:P}))),(0,r.useEffect)((()=>{c(a),d(i),h(o),f(s)}),[a,i,o,s]),(0,t.createElement)(t.Fragment,null,!l&&(0,t.createElement)(Ve,{loginHandler:async function(e){e.preventDefault();const t={mattersId:k.current.value,mattersPassword:v.current.value};await async function(e){try{const t=await w(e);if(!t)throw new Error("Calling Server failed.");if(t.errors){let e="ERROR:";return t.errors.length>0&&t.errors.forEach((t=>{if(t.message.indexOf("password")>0){const n=t.message.search("password");e=e.concat(t.message.slice(0,n).concat('password: "***"}'))}else e=e.concat(t.message)})),void _(e)}const n={mattersId:t.viewer.userName,accessToken:t.userLogin.token};L(n),_((0,Pe.__)("Success","likecoin")),c(n.mattersId)}catch(e){console.error(e)}}(t)},mattersIdRef:k,mattersPasswordRef:v,mattersLoginError:E}),l&&(0,t.createElement)(Xe,{siteMattersId:l,handleMattersLogout:async function(e){e.preventDefault(),c(""),await I(),L({mattersId:"",accessToken:""})}}),(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:u,handleCheck:d,title:(0,Pe.__)("Auto save draft to Matters","likecoin"),details:(0,Pe.__)("Auto save draft to Matters","likecoin"),checkRef:g}),(0,t.createElement)(He,{checked:p,handleCheck:h,title:(0,Pe.__)("Auto publish post to Matters","likecoin"),details:(0,Pe.__)("Auto publish post to Matters","likecoin"),checkRef:y}),(0,t.createElement)(He,{checked:m,handleCheck:f,title:(0,Pe.__)("Add post link in footer","likecoin"),details:(0,Pe.__)("Add post link in footer","likecoin"),checkRef:S})))})),Ze=function(){const e=(0,t.createInterpolateElement)((0,Pe.__)(" is a non-profit digital library offering free universal access to books, movies & music, as well as 624 billion archived web pages.","likecoin"),{InternetArchive:(0,t.createElement)(Je,{text:(0,Pe.__)("Internet Archive (archive.org)","likecoin"),linkAddress:"https://archive.org/"})});return(0,t.createElement)("p",null,e)},et=(0,r.forwardRef)((function(e,n){const{DBSiteInternetArchiveEnabled:a,DBSiteInternetArchiveAccessKey:i}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),[o,s]=(0,r.useState)(a),[l,c]=(0,r.useState)(i),[u,d]=(0,r.useState)(""),[p,h]=(0,r.useState)(!i);(0,r.useEffect)((()=>{s(a),c(i),h(!i)}),[i,a]);const{postSitePublishOptions:m}=(0,ke.useDispatch)(Be),f=(0,r.useCallback)((()=>{let e={siteInternetArchiveEnabled:o};p&&(e={...e,siteInternetArchiveAccessKey:l,siteInternetArchiveSecret:u}),m(e)}),[p,o,l,u,m]);(0,r.useImperativeHandle)(n,(()=>({submit:f})));const E=(0,t.createInterpolateElement)((0,Pe.__)("An is needed for auto publishing your post to Internet Archive.","likecoin"),{Register:(0,t.createElement)(Je,{text:(0,Pe.__)("Internet Archive S3 API Key","likecoin"),linkAddress:"https://archive.org/account/s3.php"})});return(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:o,handleCheck:s,title:(0,Pe.__)("Auto archive","likecoin"),details:(0,Pe.__)("Auto publish post to Internet Archive","likecoin"),disabled:p&&!(l&&u)}),(0,t.createElement)(Fe,{title:(0,Pe.__)("Internet Archive S3 Config","likecoin")},(0,t.createElement)("p",null,E),(0,t.createElement)(Ge,null,(0,t.createElement)(Fe,{title:(0,Pe.__)("S3 Access Key","likecoin")},(0,t.createElement)("input",{id:"internet_archive_access_key",type:"text",value:l,disabled:!p,onChange:e=>c(e.target.value)})),(0,t.createElement)(Fe,{title:(0,Pe.__)("S3 Secret","likecoin")},p?(0,t.createElement)("input",{id:"internet_archive_secret",type:"password",value:u,onChange:e=>d(e.target.value)}):(0,t.createElement)("button",{class:"button",onClick:h},(0,Pe.__)("Edit","likecoin"))))))})),tt=(0,r.forwardRef)((function(e,n){const{DBSiteMattersId:a,DBSiteMattersAutoSaveDraft:i,DBSiteMattersAutoPublish:o,DBSiteInternetArchiveEnabled:s}=(0,ke.useSelect)((e=>e(Be).selectSitePublishOptions())),l=(0,r.useRef)(),c=(0,r.useRef)(),[u,d]=(0,r.useState)(!!(a||i||o)),[p,h]=(0,r.useState)(!!s);async function m(){const e=[];u&&e.push(l.current.submit()),p&&e.push(c.current.submit()),await Promise.all(e)}return(0,r.useEffect)((()=>{d(!!(a||i||o))}),[a,i,o]),(0,r.useEffect)((()=>{h(!!s)}),[s]),(0,r.useImperativeHandle)(n,(()=>({submit:m}))),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",null,(0,Pe.__)("Publish to Matters","likecoin")),(0,t.createElement)(Ye,null),u?(0,t.createElement)(Qe,{ref:l}):(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:u,handleCheck:d,title:(0,Pe.__)("Show settings","likecoin")})),(0,t.createElement)("hr",null),(0,t.createElement)("h2",null,(0,Pe.__)("Publish to Internet Archive","likecoin")),(0,t.createElement)(Ze,null),!p&&(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:p,handleCheck:h,title:(0,Pe.__)("Show settings","likecoin")})),p&&(0,t.createElement)(et,{ref:c}))}));const nt="likecoin/other_settings",rt="/likecoin/v1/option/web-monetization",at={DBPaymentPointer:""},it={setPaymentPointer:e=>({type:"SET_PAYMENT_POINTER",paymentPointer:e}),getPaymentPointer:()=>({type:"GET_PAYMENT_POINTER"}),setHTTPErrors:e=>({type:"SET_ERROR_MESSAGE",errorMsg:e}),*postPaymentPointer(e){yield{type:"POST_PAYMENT_POINTER",paymentPointer:e},yield{type:"CHANGE_PAYMENT_POINTER_GLOBAL_STATE",paymentPointer:e}}},ot={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PAYMENT_POINTER":case"CHANGE_PAYMENT_POINTER_GLOBAL_STATE":return{DBPaymentPointer:t.paymentPointer};default:return e}},controls:{GET_PAYMENT_POINTER:()=>ge()({path:rt}),POST_PAYMENT_POINTER:e=>ge()({method:"POST",path:rt,data:{paymentPointer:e.paymentPointer}})},selectors:{selectPaymentPointer:e=>e.DBPaymentPointer},resolvers:{*selectPaymentPointer(){try{const e=(yield it.getPaymentPointer()).data.site_payment_pointer;return it.setPaymentPointer(e)}catch(e){return it.setHTTPErrors(e.message)}}},actions:it};ye(nt,ot);const st=(0,t.createInterpolateElement)((0,Pe.__)(" is an API that allows websites to request small payments from users facilitated by the browser and the user's Web Monetization provider.","likecoin"),{WebMonetization:(0,t.createElement)(Je,{text:(0,Pe.__)("Web Monetization","likecoin"),linkAddress:"https://webmonetization.org/"})}),lt=(0,t.createInterpolateElement)((0,Pe.__)("You would need to register a to enable web monetization. However LikeCoin is working hard to integrate web monetization natively into our ecosystem. Follow our latest progress !","likecoin"),{PaymentPointer:(0,t.createElement)(Je,{text:(0,Pe.__)("payment pointer","likecoin"),linkAddress:"https://webmonetization.org/docs/ilp-wallets"}),Here:(0,t.createElement)(Je,{text:(0,Pe.__)("here","likecoin"),linkAddress:"https://community.webmonetization.org/likecoinprotocol"})});var ct=function(){return(0,t.createElement)("div",null,(0,t.createElement)("p",null,st),(0,t.createElement)("p",null,lt))},ut=(0,r.forwardRef)((function(e,n){const a=(0,ke.useSelect)((e=>e(nt).selectPaymentPointer())),{postPaymentPointer:i}=(0,ke.useDispatch)(nt),[o,s]=(0,r.useState)(!!a);(0,r.useEffect)((()=>{s(!!a)}),[a]);const l=(0,r.useRef)();async function c(){if(o)try{i(l.current.value)}catch(e){console.error(e)}}return(0,r.useImperativeHandle)(n,(()=>({submit:c}))),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Re,{title:(0,Pe.__)("Web Monetization","likecoin")}),(0,t.createElement)(ct,null),(0,t.createElement)(Ge,null,(0,t.createElement)(He,{checked:o,handleCheck:s,title:(0,Pe.__)("Web Monetization","likecoin"),details:(0,Pe.__)("Enable","likecoin")})),o&&(0,t.createElement)(Ge,null,(0,t.createElement)("tr",null,(0,t.createElement)("th",{scope:"row"},(0,t.createElement)("label",{for:"site_payment_pointer"},(0,Pe.__)("Payment pointer","likecoin"))),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",placeholder:"$wallet.example.com/alice",defaultValue:a,ref:l})," ",(0,t.createElement)("a",{rel:"noopener noreferrer",target:"_blank",href:"https://webmonetization.org/docs/ilp-wallets/"},(0,Pe.__)("What is payment pointer?","likecoin"))))))})),dt=function(){const[e,n]=(0,r.useState)(!1),a=(0,r.useRef)(),i=(0,r.useRef)(),o=(0,r.useRef)();return(0,t.createElement)("form",{className:"likecoin",onSubmit:async function(e){n(!1),e.preventDefault();try{await Promise.all([a.current.submit(),i.current.submit(),o.current.submit()]),n(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error(e)}}},e&&(0,t.createElement)(Ce,{text:(0,Pe.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),n(!1)}}),(0,t.createElement)(qe,{ref:a}),(0,t.createElement)("hr",null),(0,t.createElement)(tt,{ref:i}),(0,t.createElement)("hr",null),(0,t.createElement)(ut,{ref:o}),(0,t.createElement)($e,null))},pt=n(669),ht=n.n(pt),mt=window.lodash,ft=function(e){const n=(0,r.useRef)(),[a,i]=(0,r.useState)(e.defaultLikerId),[o,s]=(0,r.useState)(e.defaultLikerDisplayName),[l,c]=(0,r.useState)(e.defaultLikerWalletAddress),[u,d]=(0,r.useState)(e.defaultLikerAvatar),[p,h]=(0,r.useState)(!1),[m,f]=(0,r.useState)(!1),[E,_]=(0,r.useState)(!0),[k,v]=(0,r.useState)(!1),g=(0,r.useMemo)((()=>(0,mt.debounce)((async t=>{if(t)try{const n=await ht().get(`https://api.${e.likecoHost}/users/id/${t}/min`),{user:r,displayName:a,likeWallet:o,avatar:l}=n.data;i(r),s(a),c(o),d(l),h(!1),e.onLikerIdUpdate({likerIdValue:r,likerDisplayName:a,likerWalletAddress:o,likerAvatar:l})}catch(e){h(!1),i(""),s(""),c(""),d("")}}),500)),[]);return(0,r.useEffect)((()=>{g(a)}),[g,a]),(0,r.useEffect)((()=>{i(e.defaultLikerId),s(e.defaultLikerDisplayName),c(e.defaultLikerWalletAddress),d(e.defaultLikerAvatar),_(!!e.defaultLikerId),v(!!e.defaultLikerId),f(!e.defaultLikerId)}),[e.defaultLikerId,e.defaultLikerDisplayName,e.defaultLikerWalletAddress,e.defaultLikerAvatar]),(0,r.useEffect)((()=>{v(!!a),_(!!a)}),[a]),(0,t.createElement)(t.Fragment,null,e.editable&&(!a||m)&&(0,t.createElement)("div",{className:"tablenav top"},(0,t.createElement)("div",{className:"alignleft actions"},(0,t.createElement)("input",{ref:n,id:"likecoinIdInputBox",className:"likecoinInputBox",type:"text",placeholder:(0,Pe.__)("Search your Liker ID","likecoin"),onChange:function(e){e.preventDefault(),f(!0),h(!0);const t=e.target.value;i(t)}})," ",(0,t.createElement)("a",{id:"likecoinInputLabel",className:"likecoinInputLabel",target:"_blank",rel:"noopener noreferrer",href:`https://${e.likecoHost}/in`},(0,Pe.__)("Sign Up / Find my Liker ID","likecoin"))),(0,t.createElement)("br",{className:"clear"})),p?a&&(0,t.createElement)("p",{className:"description"},(0,Pe.__)("Loading...","likecoin")):o&&(0,t.createElement)("table",{className:"wp-list-table widefat fixed striped table-view-list"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,Pe.__)("Liker ID","likecoin")),(0,t.createElement)("th",null,(0,Pe.__)("Wallet","likecoin")),(0,t.createElement)("th",null))),(0,t.createElement)("tbody",null,(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"column-username"},u&&(0,t.createElement)("img",{id:"likecoinAvatar",src:u,width:"48",height:"48",alt:"Avatar"}),(0,t.createElement)("strong",null,(0,t.createElement)("a",{id:"likecoinId",rel:"noopener noreferrer",target:"_blank",href:`https://${e.likecoHost}/${a}`,className:"likecoin"},o))),(0,t.createElement)("td",null,l),(0,t.createElement)("td",null,e.editable&&(0,t.createElement)(t.Fragment,null,E&&(0,t.createElement)("button",{className:"button",type:"button",onClick:function(e){e.preventDefault(),f(!0)}},(0,Pe.__)("Change","likecoin")),k&&(0,t.createElement)(t.Fragment,null," ",(0,t.createElement)("button",{className:"button button-danger",type:"button",onClick:function(t){t.preventDefault(),i(""),s(""),c(""),d(""),e.onLikerIdUpdate({likerIdValue:"",likerDisplayName:"",likerWalletAddress:"",likerAvatar:""})}},(0,Pe.__)("Disconnect","likecoin")))))))),(0,t.createElement)("section",null,a&&!p&&!u&&(0,t.createElement)("div",{className:"likecoin likecoinError userNotFound"},(0,t.createElement)("h4",null,(0,Pe.__)("Liker ID not found","likecoin")))))};const Et="likecoin/user_liker_info",_t="/likecoin/v1/options/liker-id/user",kt={DBUserLikerId:"",DBUserLikerAvatar:"",DBUserLikerDisplayName:"",DBUserLikerWallet:""},vt={getUserLikerInfo:e=>({type:"GET_USER_LIKER_INFO",path:e}),setUserLikerInfo:e=>({type:"SET_USER_LIKER_INFO",info:e}),setHTTPErrors:e=>({type:"SET_ERROR_MESSAGE",errorMsg:e}),*postUserLikerInfo(e){yield{type:"POST_USER_LIKER_INFO_TO_DB",data:e},e.likecoin_user&&(yield{type:"CHANGE_USER_LIKER_INFO_GLOBAL_STATE",data:e})}},gt={reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_USER_LIKER_INFO":return{DBUserLikerId:t.info?t.info.likecoin_user.likecoin_id:"",DBUserLikerAvatar:t.info?t.info.likecoin_user.avatar:"",DBUserLikerDisplayName:t.info?t.info.likecoin_user.display_name:"",DBUserLikerWallet:t.info?t.info.likecoin_user.wallet:""};case"CHANGE_USER_LIKER_INFO_GLOBAL_STATE":return{DBUserLikerId:t.data.userLikerInfos.likecoin_id,DBUserLikerAvatar:t.data.userLikerInfos.avatar,DBUserLikerDisplayName:t.data.userLikerInfos.display_name,DBUserLikerWallet:t.data.userLikerInfos.wallet};default:return e}},controls:{GET_USER_LIKER_INFO:e=>ge()({path:e.path}),POST_USER_LIKER_INFO_TO_DB:e=>ge()({method:"POST",path:_t,data:e.data})},selectors:{selectUserLikerInfo:e=>e},resolvers:{*selectUserLikerInfo(){try{const e=(yield vt.getUserLikerInfo(_t)).data;return vt.setUserLikerInfo(e)}catch(e){return vt.setHTTPErrors(e.message)}}},actions:vt};ye(Et,gt);const{likecoHost:yt}=window.likecoinReactAppData;var St=function(){const{DBUserLikerId:e,DBUserLikerAvatar:n,DBUserLikerDisplayName:a,DBUserLikerWallet:i}=(0,ke.useSelect)((e=>e(Et).selectUserLikerInfo())),{postUserLikerInfo:o}=(0,ke.useDispatch)(Et),[s,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)({});return(0,t.createElement)("div",{className:"likecoin"},s&&(0,t.createElement)(Ce,{text:(0,Pe.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),l(!1)}}),(0,t.createElement)("form",{onSubmit:function(e){l(!1),e.preventDefault();const t={userLikerInfos:{likecoin_id:c.likerIdValue,display_name:c.likerDisplayName,wallet:c.likerWalletAddress,avatar:c.likerAvatar}};try{o(t),l(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error("Error occured when saving to Wordpress DB: ",e)}}},(0,t.createElement)(Re,{title:(0,Pe.__)("Your Liker ID","likecoin")}),(0,t.createElement)("p",null,(0,Pe.__)("This is your Liker ID, which is used to display LikeCoin button when post is not registered on ISCN yet.","likecoin")),(0,t.createElement)(ft,{likecoHost:yt,defaultLikerId:e,defaultLikerDisplayName:a,defaultLikerWalletAddress:i,defaultLikerAvatar:n,editable:!0,onLikerIdUpdate:function(e){u(e)}}),(0,t.createElement)($e,null)))};const{likecoHost:bt}=window.likecoinReactAppData;var wt=function(){const{DBUserCanEditOption:e,DBSiteLikerId:n,DBSiteLikerAvatar:a,DBSiteLikerDisplayName:i,DBSiteLikerWallet:o}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo())),{postSiteLikerInfo:s}=(0,ke.useDispatch)(Se),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({});return(0,t.createElement)("div",{className:"likecoin"},l&&(0,t.createElement)(Ce,{text:(0,Pe.__)("Settings Saved","likecoin"),className:"notice-success",handleNoticeDismiss:function(e){e.preventDefault(),c(!1)}}),(0,t.createElement)("form",{onSubmit:function(t){c(!1),t.preventDefault();const n={siteLikerInfos:{likecoin_id:u.likerIdValue,display_name:u.likerDisplayName,wallet:u.likerWalletAddress,avatar:u.likerAvatar}};try{e&&s(n),c(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(e){console.error("Error occured when saving to Wordpress DB: ",e)}}},(0,t.createElement)(Re,{title:(0,Pe.__)("Site Default Liker ID","likecoin")}),(0,t.createElement)("p",null,(0,Pe.__)("This will be the site default Liker ID if any author has not set one.","likecoin")),(0,t.createElement)(ft,{likecoHost:bt,defaultLikerId:n,defaultLikerDisplayName:i,defaultLikerWalletAddress:o,defaultLikerAvatar:a,editable:e,onLikerIdUpdate:function(e){d(e)}}),e&&(0,t.createElement)($e,null)))},It=n.p+"images/w3p_banner.13b75e39.png",Lt=function(){const e=(0,t.createInterpolateElement)((0,Pe.__)("Web3Press provides a creative business model, especially for open content. No paywall or advertisement anymore.\n Web3Press is based on , an application-specific blockchain that the community and infrastructure focus on the creator’s economy.","likecoin"),{LikeCoin:(0,t.createElement)(Je,{text:(0,Pe.__)("LikeCoin","likecoin"),linkAddress:"https://like.co"})}),n=(0,t.createInterpolateElement)((0,Pe.__)("Idea is the best product for your readers. Your readers buy your posts because they love your words. Web3Press helps you to productize your posts as . Let readers support you by buying your posts while reading.","likecoin"),{WNFT:(0,t.createElement)(Je,{text:(0,Pe.__)("NFTs","likecoin"),linkAddress:"https://liker.land/writing-nft/about"})}),r=(0,t.createInterpolateElement)((0,Pe.__)("You know who has bought your NFTs with . You can connect with your fans by sending NFT gifts with warm greetings is not only possible but convenient. Conditional offers can be made according to the open data on-chain.","likecoin"),{Explorer:(0,t.createElement)(Je,{text:(0,Pe.__)("on-chain data","likecoin"),linkAddress:"https://www.mintscan.io/likecoin"})}),a=(0,t.createInterpolateElement)((0,Pe.__)("“You are what you read”. Share your with pride. Collect the rare and valuable articles into your wallet.","likecoin"),{Portfolio:(0,t.createElement)(Je,{text:(0,Pe.__)("NFT portfolio","likecoin"),linkAddress:"https://liker.land/dashboard?tab=collected"})}),i=(0,t.createInterpolateElement)((0,Pe.__)("Web3Press is based on , an application-specific blockchain that the community and infrastructure focus on the creator’s economy.","likecoin"),{LikeCoin:(0,t.createElement)(Je,{text:(0,Pe.__)("LikeCoin","likecoin"),linkAddress:"https://like.co"})}),o=(0,t.createInterpolateElement)((0,Pe.__)("Register metadata () on the , store content on the decentralized file system ( and ), and backup on Internet Archive, all in one plugin.","likecoin"),{ISCN:(0,t.createElement)(Je,{text:(0,Pe.__)("ISCN","likecoin"),linkAddress:"https://iscn.io"}),LikeCoinChain:(0,t.createElement)(Je,{text:(0,Pe.__)("LikeCoin chain","likecoin"),linkAddress:"https://www.mintscan.io/likecoin"}),IPFS:(0,t.createElement)(Je,{text:(0,Pe.__)("IPFS","likecoin"),linkAddress:"https://ipfs.io/"}),Arweave:(0,t.createElement)(Je,{text:(0,Pe.__)("Arweave","likecoin"),linkAddress:"https://arweave.io/"})}),s=(0,t.createInterpolateElement)((0,Pe.__)("Web3 is a new standard of the Internet. The Internet has been evolving in the past decades and becoming increasingly decentralized. In Web1, information was 1-way-broadcast; in Web2, information was user-generated. In Web3, the concept of ownership applies to every piece of data. Echoing , the vision of WordPress, Web3Press pushes one more step forward: the freedom to OWN. Oh yes, it’s free, as in freedom.","likecoin"),{WordPress:(0,t.createElement)(Je,{text:(0,Pe.__)("Democratise Publishing","likecoin"),linkAddress:"https://wordpress.org/about/"})});return(0,t.createElement)("div",{className:"likecoin"},(0,t.createElement)("img",{src:It,alt:"Word3Press Banner"}),(0,t.createElement)("h2",null,(0,Pe.__)("What is Web3Press?","likecoin")),(0,t.createElement)("p",null,e),(0,t.createElement)("p",null,(0,Pe.__)("With Web3Press, you can:","likecoin")),(0,t.createElement)("h3",null,(0,Pe.__)("Sell your posts","likecoin")),(0,t.createElement)("p",null,n),(0,t.createElement)("h3",null,(0,Pe.__)("Be proud of your work","likecoin")),(0,t.createElement)("p",null,a),(0,t.createElement)("h3",null,(0,Pe.__)("Build Community","likecoin")),(0,t.createElement)("p",null,r),(0,t.createElement)("h3",null,(0,Pe.__)("Preserve Content","likecoin")),(0,t.createElement)("p",null,o),(0,t.createElement)("h2",null,(0,Pe.__)("What is LikeCoin","likecoin")),(0,t.createElement)("p",null,i),(0,t.createElement)("h2",null,(0,Pe.__)("Why Web3","likecoin")),(0,t.createElement)("p",null,s),(0,t.createElement)("iframe",{className:"lcp-github-sponsor-card",src:"https://github.com/sponsors/likecoin/card",title:"Sponsor likecoin",height:"225",width:"660"}))},Pt=function(){const e=(0,t.createInterpolateElement)((0,Pe.__)("Please refer to for help on using this plugin","likecoin"),{Help:(0,t.createElement)(Je,{text:(0,Pe.__)("this guide","likecoin"),linkAddress:"https://docs.like.co/user-guide/wordpress"})}),n=(0,t.createInterpolateElement)((0,Pe.__)("Never heard of LikeCoin? Don’t worry, here are some for you to get started.","likecoin"),{LikeCoin:(0,t.createElement)(Je,{text:(0,Pe.__)("LikeCoin","likecoin"),linkAddress:"https://like.co"}),Link:(0,t.createElement)(Je,{text:(0,Pe.__)("here","likecoin"),linkAddress:`https://faucet.like.co/?platform=wordpress&referrer=${encodeURIComponent(document.location.origin)}`})});return(0,t.createElement)("div",{className:"lcp-nav-tab-panel likecoin"},(0,t.createElement)(Re,{title:(0,Pe.__)("Getting Started","likecoin")}),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h2",null,(0,Pe.__)("1. Get some LikeCoin tokens to get started","likecoin")),(0,t.createElement)("p",null,n)),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h2",null,(0,Pe.__)("2. You are ready, let’s publish.","likecoin")),(0,t.createElement)("p",null,(0,Pe.__)("Here is a video to help you understand how to publish a Writing NFT","likecoin")),(0,t.createElement)("iframe",{height:"315",src:"https://www.youtube.com/embed/iyquF_ClMeQ",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0,style:{width:"100%",maxWidth:"560px"}}),(0,t.createElement)("p",null,e)),(0,t.createElement)("hr",null),(0,t.createElement)(Re,{title:(0,Pe.__)("Useful Tips","likecoin")}),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h3",null,(0,Pe.__)("Publish your post before you mint Writing NFT","likecoin")),(0,t.createElement)("p",null,(0,Pe.__)("You need to publish your post first, then you can find the Publish button on the editing sidebar.","likecoin"))),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h3",null,(0,Pe.__)("Publish alone with licence","likecoin")),(0,t.createElement)("p",null,(0,Pe.__)("You can set your preferred licence on the editing sidebar.","likecoin"))),(0,t.createElement)("div",{className:"lcp-card"},(0,t.createElement)("h3",null,(0,Pe.__)("Encourage your readers to collect Writing NFT of your works","likecoin")),(0,t.createElement)("p",null,(0,Pe.__)("Let your readers aware they can collect Writing NFT of your works. Let them know it is meaningful to support you.","likecoin"))))};const At=window.likecoinReactAppData||{},{appSelector:Nt}=At,Tt=document.querySelector(Nt);Tt&&(0,t.render)((0,t.createElement)((function(t){let{basename:n,children:a,window:d}=t,p=r.useRef();var h;null==p.current&&(p.current=(void 0===(h={window:d,v5Compat:!0})&&(h={}),function(t,n,r,a){void 0===a&&(a={});let{window:c=document.defaultView,v5Compat:d=!1}=a,p=c.history,h=e.Pop,m=null;function f(){h=e.Pop,m&&m({action:h,location:E.location})}let E={get action(){return h},get location(){return t(c,p)},listen(e){if(m)throw new Error("A history only accepts one active listener");return c.addEventListener(i,f),m=e,()=>{c.removeEventListener(i,f),m=null}},createHref:e=>n(c,e),encodeLocation(e){let t=u("string"==typeof e?e:l(e));return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){h=e.Push;let a=s(E.location,t,n);r&&r(a,t);let i=o(a),l=E.createHref(a);try{p.pushState(i,"",l)}catch(e){c.location.assign(l)}d&&m&&m({action:h,location:E.location})},replace:function(t,n){h=e.Replace;let a=s(E.location,t,n);r&&r(a,t);let i=o(a),l=E.createHref(a);p.replaceState(i,"",l),d&&m&&m({action:h,location:E.location})},go:e=>p.go(e)};return E}((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=c(e.location.hash.substr(1));return s("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:l(t))}),(function(e,t){!function(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),h)));let m=p.current,[f,E]=r.useState({action:m.action,location:m.location});return r.useLayoutEffect((()=>m.listen(E)),[m]),r.createElement(se,{basename:n,children:a,location:f.location,navigationType:f.action,navigator:m})}),null,(0,t.createElement)((function(){const{DBUserCanEditOption:e}=(0,ke.useSelect)((e=>e(Se).selectSiteLikerInfo()));return(0,t.createElement)("div",{className:"wrap"},(0,t.createElement)("h2",null," "),(0,t.createElement)(Ne,null),(0,t.createElement)(le,null,(0,t.createElement)(oe,{path:"",element:(0,t.createElement)(Oe,null)},(0,t.createElement)(oe,{index:!0,element:e?(0,t.createElement)(Ke,null):(0,t.createElement)(ae,{to:"/about",replace:!0})}),(0,t.createElement)(oe,{path:"advanced",element:(0,t.createElement)(dt,null)}),(0,t.createElement)(oe,{path:"about",element:(0,t.createElement)(Lt,null)})),(0,t.createElement)(oe,{path:"liker-id",element:(0,t.createElement)(ze,null)},(0,t.createElement)(oe,{index:!0,element:e?(0,t.createElement)(wt,null):(0,t.createElement)(ae,{to:"user",replace:!0})}),(0,t.createElement)(oe,{path:"user",element:(0,t.createElement)(St,null)})),(0,t.createElement)(oe,{path:"help",element:(0,t.createElement)(Pt,null)})))}),null)),Tt)}()}(); \ No newline at end of file diff --git a/likecoin/js/admin-settings/src/assets/w3p_banner.png b/likecoin/js/admin-settings/src/assets/w3p_banner.png new file mode 100644 index 00000000..528863a8 Binary files /dev/null and b/likecoin/js/admin-settings/src/assets/w3p_banner.png differ diff --git a/likecoin/js/admin-settings/src/assets/w3p_logo.png b/likecoin/js/admin-settings/src/assets/w3p_logo.png new file mode 100644 index 00000000..1e8762c6 Binary files /dev/null and b/likecoin/js/admin-settings/src/assets/w3p_logo.png differ diff --git a/likecoin/js/admin-settings/src/components/Header.js b/likecoin/js/admin-settings/src/components/Header.js index 392940b4..64f6b410 100644 --- a/likecoin/js/admin-settings/src/components/Header.js +++ b/likecoin/js/admin-settings/src/components/Header.js @@ -1,10 +1,10 @@ import { __ } from '@wordpress/i18n'; -import Logo from '../assets/logo.png'; +import Logo from '../assets/w3p_logo.png'; function Header() { return (
- {__('liker.land + {__('Web3Press {props.text} - ); -} - -export default ParagraphTitle; diff --git a/likecoin/js/admin-settings/src/pages/SponsorLikecoinPage.js b/likecoin/js/admin-settings/src/pages/SponsorLikecoinPage.js index c81c6ebb..d420e71c 100644 --- a/likecoin/js/admin-settings/src/pages/SponsorLikecoinPage.js +++ b/likecoin/js/admin-settings/src/pages/SponsorLikecoinPage.js @@ -1,14 +1,52 @@ import { __ } from '@wordpress/i18n'; import { createInterpolateElement, createElement } from '@wordpress/element'; -import ParagraphTitle from '../components/ParagraphTitle'; import Link from '../components/Link'; - -const { likerlandHost } = window.likecoinReactAppData; +import Banner from '../assets/w3p_banner.png'; function SponsorLikecoinPage() { const localizedIntroduction = createInterpolateElement( __( - ' is a Decentralized Publishing Infrastructure. It reinvents the publishing industry with decentralized registry, rewards, editorial, and governance.', + `Web3Press provides a creative business model, especially for open content. No paywall or advertisement anymore. + Web3Press is based on , an application-specific blockchain that the community and infrastructure focus on the creator’s economy.`, + 'likecoin', + ), + { + LikeCoin: createElement(Link, { + text: __('LikeCoin', 'likecoin'), + linkAddress: 'https://like.co', + }), + }, + ); + const localizedNFTIntroduction = createInterpolateElement( + __('Idea is the best product for your readers. Your readers buy your posts because they love your words. Web3Press helps you to productize your posts as . Let readers support you by buying your posts while reading.', 'likecoin'), + { + WNFT: createElement(Link, { + text: __('NFTs', 'likecoin'), + linkAddress: 'https://liker.land/writing-nft/about', + }), + }, + ); + const localizedOnChainIntroduction = createInterpolateElement( + __('You know who has bought your NFTs with . You can connect with your fans by sending NFT gifts with warm greetings is not only possible but convenient. Conditional offers can be made according to the open data on-chain.', 'likecoin'), + { + Explorer: createElement(Link, { + text: __('on-chain data', 'likecoin'), + linkAddress: 'https://www.mintscan.io/likecoin', + }), + }, + ); + const localizedPortfolioIntroduction = createInterpolateElement( + __('“You are what you read”. Share your with pride. Collect the rare and valuable articles into your wallet.', 'likecoin'), + { + Portfolio: createElement(Link, { + text: __('NFT portfolio', 'likecoin'), + linkAddress: 'https://liker.land/dashboard?tab=collected', + }), + }, + ); + const localizedLikeCoinIntroduction = createInterpolateElement( + __( + 'Web3Press is based on , an application-specific blockchain that the community and infrastructure focus on the creator’s economy.', 'likecoin', ), { @@ -20,7 +58,7 @@ function SponsorLikecoinPage() { ); const localizedDecentralizedRegistry = createInterpolateElement( __( - 'The heart of Decentralized Publishing is decentralized registry powered by , a specification we drafted in collaboration with the industry. Inspired by ISBN for books, ISCN is a unique number assigned to content such as articles and images, and comes with metadata such as author, publisher, content address, license terms and creation footprint. Stored on , ISCN is immutable and censorship resilient. The content, on the other hand, is stored on for tamper resistance and peer-to-peer distribution.', + 'Register metadata () on the , store content on the decentralized file system ( and ), and backup on Internet Archive, all in one plugin.', 'likecoin', ), { @@ -30,66 +68,52 @@ function SponsorLikecoinPage() { }), LikeCoinChain: createElement(Link, { text: __('LikeCoin chain', 'likecoin'), - linkAddress: 'https://likecoin.bigdipper.live/', + linkAddress: 'https://www.mintscan.io/likecoin', }), IPFS: createElement(Link, { text: __('IPFS', 'likecoin'), linkAddress: 'https://ipfs.io/', }), - }, - ); - - const localizedDecentralizedRewards = createInterpolateElement( - __( - 'By simply attaching a LikeCoin button beneath your content and without setting up a paywall, every Like by readers is turned into measurable rewards in . The movement encourages readers to contribute USD5/mo to reward creativity and journalism, while the matching fund, distributed according to the Likes of all users, doubles the rewarding pool. With decentralized rewards, every Like counts.', - 'likecoin', - ), - { - LikeCoinTokens: createElement(Link, { - text: __('LikeCoin tokens', 'likecoin'), - linkAddress: 'https://www.coingecko.com/en/coins/likecoin', - }), - CivicLiker: createElement(Link, { - text: __('Civic Liker', 'likecoin'), - linkAddress: `https://${likerlandHost}/civic`, + Arweave: createElement(Link, { + text: __('Arweave', 'likecoin'), + linkAddress: 'https://arweave.io/', }), }, ); - - const localizedDecentralizedGovernance = createInterpolateElement( + const localizedWeb3Introduction = createInterpolateElement( __( - 'Not only is LikeCoin token a reward to creators and Content Jockeys, it also serves doubly as the governing token for the decentralized autonomous organization (DAO), namely the . Likers participate in liquid democracy by delegating their LikeCoin tokens to validators they trust, and freely switch among them without a fixed term of office. Issues such as default Content Jockeys, inflation rate and protocol updates require passing a corresponding by the Republic.', + 'Web3 is a new standard of the Internet. The Internet has been evolving in the past decades and becoming increasingly decentralized. In Web1, information was 1-way-broadcast; in Web2, information was user-generated. In Web3, the concept of ownership applies to every piece of data. Echoing , the vision of WordPress, Web3Press pushes one more step forward: the freedom to OWN. Oh yes, it’s free, as in freedom.', 'likecoin', ), { - RepublicOfLikerLand: createElement(Link, { - text: __('Republic of Liker Land', 'likecoin'), - linkAddress: 'https://likecoin.bigdipper.live', - }), - Proposal: createElement(Link, { - text: __('proposal', 'likecoin'), - linkAddress: 'https://likecoin.bigdipper.live/proposalsc', + WordPress: createElement(Link, { + text: __('Democratise Publishing', 'likecoin'), + linkAddress: 'https://wordpress.org/about/', }), }, ); return (
- + Word3Press Banner +

{__('What is Web3Press?', 'likecoin')}

{localizedIntroduction}

- +

{__('With Web3Press, you can:', 'likecoin')}

+

{__('Sell your posts', 'likecoin')}

+

{localizedNFTIntroduction}

+

{__('Be proud of your work', 'likecoin')}

+

{localizedPortfolioIntroduction}

+

{__('Build Community', 'likecoin')}

+

{localizedOnChainIntroduction}

+

{__('Preserve Content', 'likecoin')}

{localizedDecentralizedRegistry}

- -

{localizedDecentralizedRewards}

- -

- {__( - "Apart from rewarding creators as a Liker, readers may go further to become a Content Jockey. Content Jockeys help curate creative stories and insightful commentaries with Super Like, which is purposely designed to be scarce to cut out noise from signals. When a story gets popular, LikeCoin's unique distribution footprint rewards both creator and Content Jockey, creating an all win situation for the content ecosystem.", - 'likecoin', - )} -

- -

{localizedDecentralizedGovernance}

+ +

{__('What is LikeCoin', 'likecoin')}

+

{localizedLikeCoinIntroduction}

+ +

{__('Why Web3', 'likecoin')}

+

{localizedWeb3Introduction}

+