Version Description
2020-06-16 =
Add - Allow WooCommerce Payments set up without Jetpack plugin
Fix - Orders missing after payment processing error
Fix - Clearing pagination when selecting transactions advanced filters
Fix - After onboarding, redirect to the WCPay task of the task list, instead of to the task list
Download this release
Release Info
Developer | automattic |
Plugin | WooCommerce Payments – Fully Integrated Solution Built and Supported by Woo |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.1.0
- changelog.txt +7 -0
- dist/index.asset.php +1 -1
- dist/index.css +4 -0
- dist/index.js +2 -2
- dist/settings.asset.php +1 -1
- dist/settings.js +1 -1
- includes/admin/class-wc-payments-admin.php +6 -1
- includes/class-wc-payment-gateway-wcpay.php +17 -6
- includes/class-wc-payments-account.php +94 -24
- includes/class-wc-payments.php +1 -46
- includes/wc-payment-api/class-wc-payments-api-client.php +41 -0
- includes/wc-payment-api/class-wc-payments-http.php +77 -28
- readme.txt +9 -10
- vendor/autoload.php +1 -1
- vendor/autoload_packages.php +206 -0
- vendor/automattic/jetpack-autoloader/README.md +44 -0
- vendor/automattic/jetpack-autoloader/composer.json +28 -0
- vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php +357 -0
- vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php +90 -0
- vendor/automattic/jetpack-autoloader/src/autoload.php +178 -0
- vendor/automattic/jetpack-config/README.md +126 -0
- vendor/automattic/jetpack-config/composer.json +13 -0
- vendor/automattic/jetpack-config/src/class-config.php +266 -0
- vendor/automattic/jetpack-connection/README.md +21 -0
- vendor/automattic/jetpack-connection/composer.json +38 -0
- vendor/automattic/jetpack-connection/docs/authorize-user.md +50 -0
- vendor/automattic/jetpack-connection/docs/register-site.md +112 -0
- vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php +122 -0
- vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php +68 -0
- vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php +344 -0
- vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php +943 -0
- vendor/automattic/jetpack-connection/legacy/load-ixr.php +13 -0
- vendor/automattic/jetpack-connection/src/class-client.php +462 -0
- vendor/automattic/jetpack-connection/src/class-manager.php +2279 -0
- vendor/automattic/jetpack-connection/src/class-plugin-storage.php +179 -0
- vendor/automattic/jetpack-connection/src/class-plugin.php +82 -0
- vendor/automattic/jetpack-connection/src/class-rest-connector.php +54 -0
- vendor/automattic/jetpack-connection/src/class-utils.php +85 -0
- vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php +80 -0
- vendor/automattic/jetpack-connection/src/interface-manager.php +17 -0
- vendor/automattic/jetpack-constants/README.md +56 -0
- vendor/automattic/jetpack-constants/composer.json +24 -0
- vendor/automattic/jetpack-constants/src/class-constants.php +124 -0
- vendor/automattic/jetpack-options/README.md +17 -0
- vendor/automattic/jetpack-options/composer.json +26 -0
- vendor/automattic/jetpack-options/legacy/class-jetpack-options.php +646 -0
- vendor/automattic/jetpack-roles/README.md +35 -0
- vendor/automattic/jetpack-roles/composer.json +30 -0
- vendor/automattic/jetpack-roles/src/class-roles.php +81 -0
- vendor/composer/autoload_classmap.php +16 -0
- vendor/composer/autoload_classmap_package.php +82 -0
- vendor/composer/autoload_files.php +10 -0
- vendor/composer/autoload_files_package.php +14 -0
- vendor/composer/autoload_psr4.php +1 -0
- vendor/composer/autoload_real.php +22 -4
- vendor/composer/autoload_static.php +41 -1
- vendor/composer/installed.json +213 -1
- woocommerce-payments.php +20 -1
changelog.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
*** WooCommerce Payments Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.1 - 2020-06-01 =
|
4 |
* Add - Support 3D Secure verification
|
5 |
* Add - Transaction date and type filters to transactions list
|
1 |
*** WooCommerce Payments Changelog ***
|
2 |
|
3 |
+
= 1.1.0 - 2020-06-16 =
|
4 |
+
|
5 |
+
* Add - Allow WooCommerce Payments set up without Jetpack plugin
|
6 |
+
* Fix - Orders missing after payment processing error
|
7 |
+
* Fix - Clearing pagination when selecting transactions advanced filters
|
8 |
+
* Fix - After onboarding, redirect to the WCPay task of the task list, instead of to the task list
|
9 |
+
|
10 |
= 1.0.1 - 2020-06-01 =
|
11 |
* Add - Support 3D Secure verification
|
12 |
* Add - Transaction date and type filters to transactions list
|
dist/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wc-components', 'wc-currency', 'wc-navigation', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wc-components', 'wc-currency', 'wc-navigation', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url'), 'version' => '61c01b61995315cb012a84b2f6f0ff85');
|
dist/index.css
CHANGED
@@ -119,6 +119,10 @@
|
|
119 |
padding: 12px;
|
120 |
background-color: #f5e1b3; }
|
121 |
|
|
|
|
|
|
|
|
|
122 |
.wcpay-payment-details .woocommerce-card__header {
|
123 |
border-bottom: 1px solid #dcdcde; }
|
124 |
|
119 |
padding: 12px;
|
120 |
background-color: #f5e1b3; }
|
121 |
|
122 |
+
.wcpay-connect-error-notice.components-notice {
|
123 |
+
margin: 24px 0;
|
124 |
+
padding: 12px; }
|
125 |
+
|
126 |
.wcpay-payment-details .woocommerce-card__header {
|
127 |
border-bottom: 1px solid #dcdcde; }
|
128 |
|
dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(e,t){for(var c in t)e[c]=t[c]}(this,function(e){var t={};function c(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,c),n.l=!0,n.exports}return c.m=e,c.c=t,c.d=function(e,t,a){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(c.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(a,n,function(t){return e[t]}.bind(null,n));return a},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="",c(c.s=
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
@@ -9,4 +9,4 @@
|
|
9 |
Licensed under the MIT License (MIT), see
|
10 |
http://jedwatson.github.io/classnames
|
11 |
*/
|
12 |
-
!function(){"use strict";var c={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var r=typeof a;if("string"===r||"number"===r)e.push(a);else if(Array.isArray(a)&&a.length){var o=n.apply(null,a);o&&e.push(o)}else if("object"===r)for(var s in a)c.call(a,s)&&a[s]&&e.push(s)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()},function(e,t){!function(){e.exports=this.wc.currency}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,c){var a=c(54),n=c(55),r=c(56);e.exports=function(e,t){return a(e)||n(e,t)||r()}},function(e,t){function c(e,t,c,a,n,r,o){try{var s=e[r](o),l=s.value}catch(e){return void c(e)}s.done?t(l):Promise.resolve(l).then(a,n)}e.exports=function(e){return function(){var t=this,a=arguments;return new Promise(function(n,r){var o=e.apply(t,a);function s(e){c(o,n,r,s,l,"next",e)}function l(e){c(o,n,r,s,l,"throw",e)}s(void 0)})}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,c){"use strict";var a=c(0),n=(c(28),["primary","light","warning","alert"]);t.a=function(e){var t=e.message,c=e.type,r=e.isCompact,o=["chip","chip-".concat(n.find(function(e){return e===c})||"primary"),r?"is-compact":""];return Object(a.createElement)("span",{className:o.join(" ").trim()},t)}},function(e,t,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t,c=1;c<arguments.length;c++)for(var a in t=arguments[c])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n=function(){function e(e,t){for(var c,a=0;a<t.length;a++)(c=t[a]).enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}return function(t,c,a){return c&&e(t.prototype,c),a&&e(t,a),t}}(),r=c(12),o=l(r),s=l(c(42));function l(e){return e&&e.__esModule?e:{default:e}}var i=function(e,t){return 0<=t.indexOf(e)},m=function(e){return 0==e%18},h=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle","gridicons-reader-follow","gridicons-reader-following"],u=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"],d=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"],v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.PureComponent),n(t,[{key:"render",value:function(){var e=this.props,t=e.size,c=e.onClick,n=e.icon,r=e.className,s=function(e,t){var c={};for(var a in e)0<=t.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(c[a]=e[a]);return c}(e,["size","onClick","icon","className"]),l="gridicons-"+n,v=void 0,p=["gridicon",l,r,!!(i(l,h)&&m(t))&&"needs-offset",!!(i(l,u)&&m(t))&&"needs-offset-x",!!(i(l,d)&&m(t))&&"needs-offset-y"].filter(Boolean).join(" ");switch(l){default:v=o.default.createElement("svg",a({height:t,width:t},s));break;case"gridicons-add-image":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-bell":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 15h-4v-2H2v6c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2v-6h-8v2zm6-9h-2V4c0-1.105-.895-2-2-2H8c-1.105 0-2 .895-2 2v2H4c-1.105 0-2 .895-2 2v4h20V8c0-1.105-.895-2-2-2zm-4 0H8V4h8v2z"})));break;case"gridicons-bug":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14h4v-2h-4v-2h1a2 2 0 0 0 2-2V6h-2v2H5V6H3v2a2 2 0 0 0 2 2h1v2H2v2h4v1a6 6 0 0 0 .09 1H5a2 2 0 0 0-2 2v2h2v-2h1.81A6 6 0 0 0 11 20.91V10h2v10.91A6 6 0 0 0 17.19 18H19v2h2v-2a2 2 0 0 0-2-2h-1.09a6 6 0 0 0 .09-1zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z"})));break;case"gridicons-calendar":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-caption":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 15l2-2v5c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h13l-2 2H4v12h16v-3zm2.44-8.56l-.88-.88c-.586-.585-1.534-.585-2.12 0L12 13v2H6v2h9v-1l7.44-7.44c.585-.586.585-1.534 0-2.12z"})));break;case"gridicons-cart":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-chat":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 12c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H9v3l-3-3H3zM21 18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-6v1c0 2.2-1.8 4-4 4v2c0 1.1.9 2 2 2h2v3l3-3h3z"})));break;case"gridicons-checkmark-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 12l-5.45 6.5L16 17.21 20.39 12 16 6.79l1.55-1.29zM8 6.79L6.45 5.5 1 12l5.45 6.5L8 17.21 3.61 12zm.45 14.61l1.93.52L15.55 2.6l-1.93-.52z"})));break;case"gridicons-cog":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"})));break;case"gridicons-computer":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-coupon":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 16v2h-2v-2h2zm3-3h2v-2h-2v2zm2 8h-2v2h2v-2zm3-5v2h2v-2h-2zm-1-3c.552 0 1 .448 1 1h2c0-1.657-1.343-3-3-3v2zm1 7c0 .552-.448 1-1 1v2c1.657 0 3-1.343 3-3h-2zm-7 1c-.552 0-1-.448-1-1h-2c0 1.657 1.343 3 3 3v-2zm3.21-5.21c-.78.78-2.047.782-2.828.002l-.002-.002L10 11.41l-1.43 1.44c.28.506.427 1.073.43 1.65C9 16.433 7.433 18 5.5 18S2 16.433 2 14.5 3.567 11 5.5 11c.577.003 1.144.15 1.65.43L8.59 10 7.15 8.57c-.506.28-1.073.427-1.65.43C3.567 9 2 7.433 2 5.5S3.567 2 5.5 2 9 3.567 9 5.5c-.003.577-.15 1.144-.43 1.65L10 8.59l3.88-3.88c.78-.78 2.047-.782 2.828-.002l.002.002-5.3 5.29 5.8 5.79zM5.5 7C6.328 7 7 6.328 7 5.5S6.328 4 5.5 4 4 4.672 4 5.5 4.672 7 5.5 7zM7 14.5c0-.828-.672-1.5-1.5-1.5S4 13.672 4 14.5 4.672 16 5.5 16 7 15.328 7 14.5z"})));break;case"gridicons-create":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"}),o.default.createElement("path",{d:"M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"})));break;case"gridicons-credit-card":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})));break;case"gridicons-cross-small":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"})));break;case"gridicons-custom-post-type":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-domains":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm6.918 6h-3.215c-.188-1.424-.42-2.65-.565-3.357 1.593.682 2.916 1.87 3.78 3.357zm-5.904-3.928c.068.352.387 2.038.645 3.928h-3.32c.26-1.89.578-3.576.646-3.928C11.32 4.03 11.656 4 12 4s.68.03 1.014.072zM14 12c0 .598-.043 1.286-.11 2h-3.78c-.067-.714-.11-1.402-.11-2s.043-1.286.11-2h3.78c.067.714.11 1.402.11 2zM8.862 4.643C8.717 5.35 8.485 6.576 8.297 8H5.082c.864-1.487 2.187-2.675 3.78-3.357zM4.262 10h3.822c-.05.668-.084 1.344-.084 2s.033 1.332.085 2H4.263C4.097 13.36 4 12.692 4 12s.098-1.36.263-2zm.82 6h3.215c.188 1.424.42 2.65.565 3.357-1.593-.682-2.916-1.87-3.78-3.357zm5.904 3.928c-.068-.353-.388-2.038-.645-3.928h3.32c-.26 1.89-.578 3.576-.646 3.928-.333.043-.67.072-1.014.072s-.68-.03-1.014-.072zm4.152-.57c.145-.708.377-1.934.565-3.358h3.215c-.864 1.487-2.187 2.675-3.78 3.357zm4.6-5.358h-3.822c.05-.668.084-1.344.084-2s-.033-1.332-.085-2h3.82c.167.64.265 1.308.265 2s-.097 1.36-.263 2z"})));break;case"gridicons-dropdown":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM7.5 13.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5S9 11.2 9 12s-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z"})));break;case"gridicons-ellipsis":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-filter":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"})));break;case"gridicons-flag":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-fullscreen-exit":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 10V4h2v2.59l3.29-3.29 1.41 1.41L17.41 8H20v2zM4 10V8h2.59l-3.3-3.29 1.42-1.42L8 6.59V4h2v6zm16 4v2h-2.59l3.29 3.29-1.41 1.41L16 17.41V20h-2v-6zm-10 0v6H8v-2.59l-3.29 3.3-1.42-1.42L6.59 16H4v-2z"})));break;case"gridicons-fullscreen":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})));break;case"gridicons-gift":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 6h-4.8c.5-.5.8-1.2.8-2 0-1.7-1.3-3-3-3s-3 1.3-3 3c0-1.7-1.3-3-3-3S6 2.3 6 4c0 .8.3 1.5.8 2H2v6h1v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h1V6zm-2 4h-7V8h7v2zm-5-7c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM9 3c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM4 8h7v2H4V8zm1 4h6v8H5v-8zm14 8h-6v-8h6v8z"})));break;case"gridicons-globe":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading-h1":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 7h2v10h-2v-4H7v4H5V7h2v4h4V7zm6.57 0c-.594.95-1.504 1.658-2.57 2v1h2v7h2V7h-1.43z"})));break;case"gridicons-heading-h2":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 7h2v10H9v-4H5v4H3V7h2v4h4V7zm8 8c.51-.41.6-.62 1.06-1.05.437-.4.848-.828 1.23-1.28.334-.39.62-.82.85-1.28.2-.39.305-.822.31-1.26.005-.44-.087-.878-.27-1.28-.177-.385-.437-.726-.76-1-.346-.283-.743-.497-1.17-.63-.485-.153-.99-.227-1.5-.22-.36 0-.717.033-1.07.1-.343.06-.678.158-1 .29-.304.13-.593.295-.86.49-.287.21-.56.437-.82.68l1.24 1.22c.308-.268.643-.502 1-.7.35-.2.747-.304 1.15-.3.455-.03.906.106 1.27.38.31.278.477.684.45 1.1-.014.396-.14.78-.36 1.11-.285.453-.62.872-1 1.25-.44.43-.98.92-1.59 1.43-.61.51-1.41 1.06-2.16 1.65V17h8v-2h-4z"})));break;case"gridicons-heading-h3":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.11 14.218c.355.287.75.523 1.17.7.434.18.9.273 1.37.27.484.017.965-.086 1.4-.3.333-.146.55-.476.55-.84.003-.203-.05-.403-.15-.58-.123-.19-.3-.34-.51-.43-.32-.137-.655-.228-1-.27-.503-.073-1.012-.106-1.52-.1v-1.57c.742.052 1.485-.07 2.17-.36.37-.164.615-.525.63-.93.026-.318-.12-.627-.38-.81-.34-.203-.734-.3-1.13-.28-.395.013-.784.108-1.14.28-.375.167-.73.375-1.06.62l-1.22-1.39c.5-.377 1.053-.68 1.64-.9.608-.224 1.252-.336 1.9-.33.525-.007 1.05.05 1.56.17.43.1.84.277 1.21.52.325.21.595.495.79.83.19.342.287.73.28 1.12.01.48-.177.943-.52 1.28-.417.39-.916.685-1.46.86v.06c.61.14 1.175.425 1.65.83.437.382.68.94.66 1.52.005.42-.113.835-.34 1.19-.23.357-.538.657-.9.88-.408.253-.853.44-1.32.55-.514.128-1.04.192-1.57.19-.786.02-1.57-.106-2.31-.37-.59-.214-1.126-.556-1.57-1l1.12-1.41zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})));break;case"gridicons-heading-h4":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm10-2h-1v2h-2v-2h-5v-2l4.05-6H20v6h1v2zm-3-2V9l-2.79 4H18z"})));break;case"gridicons-heading-h5":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.09 14.19c.352.27.73.5 1.13.69.42.196.877.296 1.34.29.51.014 1.01-.125 1.44-.4.378-.253.594-.686.57-1.14.02-.45-.197-.877-.57-1.13-.406-.274-.89-.41-1.38-.39h-.47c-.135.014-.27.04-.4.08l-.41.15-.48.23-1.02-.57.28-5h6.4v1.92h-4.31L16 10.76c.222-.077.45-.138.68-.18.235-.037.472-.054.71-.05.463-.004.924.057 1.37.18.41.115.798.305 1.14.56.33.248.597.57.78.94.212.422.322.888.32 1.36.007.497-.11.99-.34 1.43-.224.417-.534.782-.91 1.07-.393.3-.837.527-1.31.67-.497.164-1.016.252-1.54.26-.788.023-1.573-.11-2.31-.39-.584-.238-1.122-.577-1.59-1l1.09-1.42zM11 17H9v-4H5v4H3V7h2v4h4V7h2v10z"})));break;case"gridicons-heading-h6":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm8.58-7.508c-.248-.204-.524-.37-.82-.49-.625-.242-1.317-.242-1.94 0-.3.11-.566.287-.78.52-.245.27-.432.586-.55.93-.16.46-.243.943-.25 1.43.367-.33.79-.59 1.25-.77.405-.17.84-.262 1.28-.27.415-.006.83.048 1.23.16.364.118.704.304 1 .55.295.253.528.57.68.93.193.403.302.843.32 1.29.01.468-.094.93-.3 1.35-.206.387-.49.727-.83 1-.357.287-.764.504-1.2.64-.98.31-2.033.293-3-.05-.507-.182-.968-.472-1.35-.85-.437-.416-.778-.92-1-1.48-.243-.693-.352-1.426-.32-2.16-.02-.797.11-1.59.38-2.34.215-.604.556-1.156 1-1.62.406-.416.897-.74 1.44-.95.54-.21 1.118-.314 1.7-.31.682-.02 1.36.096 2 .34.5.19.962.464 1.37.81l-1.31 1.34zm-2.39 5.84c.202 0 .405-.03.6-.09.183-.046.356-.128.51-.24.15-.136.27-.303.35-.49.092-.225.136-.467.13-.71.037-.405-.123-.804-.43-1.07-.328-.23-.72-.347-1.12-.33-.346-.002-.687.07-1 .21-.383.17-.724.418-1 .73.046.346.143.683.29 1 .108.23.257.44.44.62.152.15.337.26.54.33.225.055.46.068.69.04z"})));break;case"gridicons-heading":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"})));break;case"gridicons-help":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"})));break;case"gridicons-history":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),o.default.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image-remove":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20.587 3.423L22 4.837 20 6.84V18c0 1.105-.895 2-2 2H6.84l-2.007 2.006-1.414-1.414 17.167-17.17zM12.42 14.42l1 1 1-1c.63-.504 1.536-.456 2.11.11L18 16V8.84l-5.58 5.58zM15.16 6H6v6.38l2.19-2.19 1.39 1.39L4 17.163V6c0-1.105.895-2 2-2h11.162l-2 2z"})));break;case"gridicons-image":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 6v12c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H6v6.38l2.19-2.19 5.23 5.23 1-1c.63-.504 1.536-.456 2.11.11L18 16V6zm-5 3.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5z"})));break;case"gridicons-indent-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-line-graph":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v2H3zm3-3c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3L8.8 10H9c.5 0 1-.2 1.3-.5l2.7 1.4v.1c0 1.1.9 2 2 2s2-.9 2-2c0-.5-.2-.9-.5-1.3L17.8 7h.2c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2c0 .5.2 1 .5 1.3L15.2 9H15c-.5 0-1 .2-1.3.5L11 8.2V8c0-1.1-.9-2-2-2s-2 .9-2 2c0 .5.2 1 .5 1.3L6.2 12H6c-1.1 0-2 .9-2 2s.9 2 2 2z"})));break;case"gridicons-link-break":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered-rtl":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h13v-2H3v2zm0-6h13v-2H3v2zm0-8v2h13V5H3zm16.587.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H19.97L18.5 4.915l.6.738.487-.4zm.448 7.826c.475-.426.785-.715.93-.867.146-.15.262-.296.35-.434.088-.138.153-.278.195-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608-.12-.18-.29-.32-.507-.417-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067-.177.045-.34.11-.49.195-.15.084-.337.225-.558.422l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.03.304.096.072.064.108.152.108.264 0 .09-.018.176-.054.258-.035.082-.1.18-.19.294-.093.114-.288.328-.587.64L18.547 13.3v.762h3.108v-.955h-1.62v-.03zm.46 4.747v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.175-.6-.263-1.043-.263-.308 0-.58.033-.817.1s-.47.178-.696.334l.48.774c.293-.184.576-.275.85-.275.147 0 .263.026.35.08.087.056.13.14.13.253 0 .3-.294.45-.882.45h-.27v.87h.264c.216 0 .392.017.526.05.135.03.232.08.293.143.06.064.09.154.09.27 0 .153-.058.265-.174.337-.116.07-.3.106-.555.106-.163 0-.342-.023-.537-.07-.194-.045-.385-.116-.573-.212v.96c.228.09.44.15.637.183.196.034.41.05.64.05.56 0 .998-.113 1.314-.342.316-.228.474-.542.474-.94.003-.585-.355-.923-1.07-1.013z"})));break;case"gridicons-list-ordered":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 0 0 0 20v-2a8 8 0 1 1 8-8v.5a1.5 1.5 0 0 1-3 0V7h-2v1a5 5 0 1 0 1 7 3.5 3.5 0 0 0 6-2.46V12A10 10 0 0 0 12 2zm0 13a3 3 0 1 1 3-3 3 3 0 0 1-3 3z"})));break;case"gridicons-menu":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9v1a7 7 0 0 1-6 6.92V20h3v2H8v-2h3v-3.08A7 7 0 0 1 5 10V9h2v1a5 5 0 0 0 10 0V9zm-7 4a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3z"})));break;case"gridicons-minus-small":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-money":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 5v14h20V5H2zm5 12c0-1.657-1.343-3-3-3v-4c1.657 0 3-1.343 3-3h10c0 1.657 1.343 3 3 3v4c-1.657 0-3 1.343-3 3H7zm5-8c1.1 0 2 1.3 2 3s-.9 3-2 3-2-1.3-2-3 .9-3 2-3z"})));break;case"gridicons-multiple-users":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M24 14.6c0 .6-1.2 1-2.6 1.2-.9-1.7-2.7-3-4.8-3.9.2-.3.4-.5.6-.8h.8c3.1-.1 6 1.8 6 3.5zM6.8 11H6c-3.1 0-6 1.9-6 3.6 0 .6 1.2 1 2.6 1.2.9-1.7 2.7-3 4.8-3.9l-.6-.9zm5.2 1c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0 1c-4.1 0-8 2.6-8 5 0 2 8 2 8 2s8 0 8-2c0-2.4-3.9-5-8-5zm5.7-3h.3c1.7 0 3-1.3 3-3s-1.3-3-3-3c-.5 0-.9.1-1.3.3.8 1 1.3 2.3 1.3 3.7 0 .7-.1 1.4-.3 2zM6 10h.3C6.1 9.4 6 8.7 6 8c0-1.4.5-2.7 1.3-3.7C6.9 4.1 6.5 4 6 4 4.3 4 3 5.3 3 7s1.3 3 3 3z"})));break;case"gridicons-my-sites-horizon":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-nametag":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6a1 1 0 1 1-1 1 1 1 0 0 1 1-1zm-6 8h12v3H6zm14-8h-4V3H8v3H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM10 5h4v5h-4zm10 14H4v-9h4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h4z"})));break;case"gridicons-next-page":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-8V6h8v2zm4-4v8l-6 6H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H8v12h6v-4c0-1.105.895-2 2-2h4V4zM4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6z"})));break;case"gridicons-not-visible":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-offline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 3h8l-4 6h4L6 21l4-9H6l4-9"})));break;case"gridicons-pages":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pause":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"})));break;case"gridicons-pencil":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-pin":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 17c0-2.038-1.188-3.836-3-4.92V5h.5c.828 0 1.5-.672 1.5-1.5S17.328 2 16.5 2h-9C6.672 2 6 2.672 6 3.5S6.672 5 7.5 5H8v7.08C6.188 13.164 5 14.962 5 17h6v4c0 .55.45 1 1 1s1-.45 1-1v-4h6z"})));break;case"gridicons-plans":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm-1 12H6l5-10v10zm2 6V10h5l-5 10z"})));break;case"gridicons-play":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"})));break;case"gridicons-plugins":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 13h-8v8h-2v-8H3v-2h8V3h2v8h8v2z"})));break;case"gridicons-popout":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-product-downloadable":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-6-10v5.17l2.59-2.58L17 14l-5 5-5-5 1.41-1.42L11 15.17V10h2z"})));break;case"gridicons-product-external":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-2-9v6h-2v-2.59l-3.29 3.29-1.41-1.41L13.59 13H11v-2h6z"})));break;case"gridicons-product-virtual":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM7 16.45c0-1.005.815-1.82 1.82-1.82h.09c-.335-1.59.68-3.148 2.27-3.483s3.148.68 3.483 2.27c.02.097.036.195.046.293 1.252-.025 2.29.97 2.314 2.224.017.868-.462 1.67-1.235 2.066H7.87c-.54-.33-.87-.917-.87-1.55z"})));break;case"gridicons-product":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM9 11h6c0 1.105-.895 2-2 2h-2c-1.105 0-2-.895-2-2z"})));break;case"gridicons-quote":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-read-more":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"})));break;case"gridicons-reader-follow-conversation":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 14v-3h-2v3h-3v2h3v3h2v-3h3v-2"}),o.default.createElement("path",{d:"M13 16h-2l-5 5v-5H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v4h-4v3h-3v4z"})));break;case"gridicons-reader-follow":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 16v2h-3v3h-2v-3h-3v-2h3v-3h2v3h3zM20 2v9h-4v3h-3v4H4c-1.1 0-2-.9-2-2V2h18zM8 13v-1H4v1h4zm3-3H4v1h7v-1zm0-2H4v1h7V8zm7-4H4v2h14V4z"})));break;case"gridicons-reader-following-conversation":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.8 14.5l3.2-3.2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h2v5l8.7-8.7 2.1 2.2z"}),o.default.createElement("path",{d:"M22.6 11.1l-6.1 6.1-2.1-2.2-1.4 1.4 3.5 3.6 7.5-7.6"})));break;case"gridicons-reader-following":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 13.482L15.508 21 12 17.4l1.412-1.388 2.106 2.188 6.094-6.094L23 13.482zm-7.455 1.862L20 10.89V2H2v14c0 1.1.9 2 2 2h4.538l4.913-4.832 2.095 2.176zM8 13H4v-1h4v1zm3-2H4v-1h7v1zm0-2H4V8h7v1zm7-3H4V4h14v2z"})));break;case"gridicons-reader":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reblog":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-refund":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13.91 2.91L11.83 5H14c4.418 0 8 3.582 8 8h-2c0-3.314-2.686-6-6-6h-2.17l2.09 2.09-1.42 1.41L8 6l1.41-1.41L12.5 1.5l1.41 1.41zM2 12v10h16V12H2zm2 6.56v-3.11c.6-.35 1.1-.85 1.45-1.45h9.1c.35.6.85 1.1 1.45 1.45v3.11c-.593.35-1.085.845-1.43 1.44H5.45c-.35-.597-.85-1.094-1.45-1.44zm6 .44c.828 0 1.5-.895 1.5-2s-.672-2-1.5-2-1.5.895-1.5 2 .672 2 1.5 2z"})));break;case"gridicons-reply":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h7.2l-2.6 2.6L15 20l5-5-5-5-1.4 1.4 2.6 2.6H9c-2.2 0-4-1.8-4-4s1.8-4 4-4h2V4H9c-3.3 0-6 2.7-6 6s2.7 6 6 6z"})));break;case"gridicons-resize":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));break;case"gridicons-rotate":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-computer":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6v2H7v2h10v-2h-3v-2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 14H4V4h16zm-3.25-3a1.75 1.75 0 0 1-3.5 0L10 11.36a1.71 1.71 0 1 1 0-2.71L13.25 7a1.77 1.77 0 1 1 .68 1.37L10.71 10l3.22 1.61A1.74 1.74 0 0 1 16.75 13z"})));break;case"gridicons-share-ios":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-shipping":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-2V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10h2c0 1.657 1.343 3 3 3s3-1.343 3-3h4c0 1.657 1.343 3 3 3s3-1.343 3-3h2v-5l-4-4zM7 18.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5zM4 14V7h10v7H4zm13 4.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5z"})));break;case"gridicons-shutter":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.9 4.8s-.7 5.6-3.5 10.2c1.7-.3 3.9-.9 6.6-2 0 0 .7-4.6-3.1-8.2zm-6 2.8c-1.1-1.3-2.7-3-5-4.7C5.1 4.2 3 6.6 2.3 9.6 7 7.7 11 7.5 12.9 7.6zm3.4 2.9c.6-1.6 1.2-3.9 1.6-6.7-4.1-3-8.6-1.5-8.6-1.5s4.4 3.4 7 8.2zm-5.2 6c1.1 1.3 2.7 3 5 4.7 0 0 4.3-1.6 5.6-6.7 0-.1-5.3 2.1-10.6 2zm-3.4-3.1c-.6 1.6-1.2 3.8-1.5 6.7 0 0 3.6 2.9 8.6 1.5 0 0-4.6-3.4-7.1-8.2zM2 11.1s-.7 4.5 3.1 8.2c0 0 .7-5.7 3.5-10.3-1.7.3-4 .9-6.6 2.1z"})));break;case"gridicons-sign-out":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-site":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm-5 14H6v-7h7zm5 0h-3v-7h3zm0-9H6V6h12z"})));break;case"gridicons-spam":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats-down-alt":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 3H4v14h4V3zm6 3h-4v11h4V6zm6 4h-4v7h4v-7z"})));break;case"gridicons-stats-down":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7V7h2v10zm4 0h-2v-7h2v7zm4 0h-2v-5h2v5z"})));break;case"gridicons-stats-up-alt":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-4h-4v11h4V6zm6-3h-4v14h4V3z"})));break;case"gridicons-stats-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2v-7h2v7zm4 0h-2V7h2v10z"})));break;case"gridicons-stats":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-add":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("circle",{cx:"15",cy:"8",r:"4"}),o.default.createElement("path",{d:"M15 20s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2zM6 10V7H4v3H1v2h3v3h2v-3h3v-2z"})));break;case"gridicons-user-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video-remove":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.42 4.59l1.167-1.167L22 4.837 20 6.84V18c0 1.105-.895 2-2 2v-2h-2v2H6.84l-2.007 2.006-1.414-1.414 1.17-1.172-.01-.01L8 16 18 6l1.41-1.42.01.01zM15.84 11H18V8.84L15.84 11zM16 8.01l.01-.01H16v.01zM6 15.17l-2 2V6c0-1.105.895-2 2-2v2h2V4h9.17l-9 9H6v2.17zM6 8v3h2V8H6zm12 8v-3h-2v3h2z"})));break;case"gridicons-video":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4h8v1.997h2V4c1.105 0 2 .896 2 2v12c0 1.104-.895 2-2 2v-2.003h-2V20H8v-2.003H6V20c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2v1.997h2V4zm2 11l4.5-3L10 9v6zm8 .997v-3h-2v3h2zm0-5v-3h-2v3h2zm-10 5v-3H6v3h2zm0-5v-3H6v3h2z"})));break;case"gridicons-visible":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})));break;case"gridicons-zoom-in":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15.8 13.8c.7-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7 3.1 7 7 7c1.4 0 2.7-.4 3.8-1.2L19 21l2-2-5.2-5.2zM10 15c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z"}),o.default.createElement("path",{d:"M11 7H9v2H7v2h2v2h2v-2h2V9h-2"})));break;case"gridicons-zoom-out":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 10c0 3.9 3.1 7 7 7 1.4 0 2.7-.5 3.8-1.2L19 21l2-2-5.2-5.2c.8-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7zm2 0c0-2.8 2.2-5 5-5s5 2.2 5 5-2.2 5-5 5-5-2.2-5-5z"}),o.default.createElement("path",{d:"M7 9h6v2H7z"})))}return v}}]),t}();v.defaultProps={size:24},v.propTypes={icon:s.default.string.isRequired,size:s.default.number,onClick:s.default.func,className:s.default.string},t.default=v,e.exports=t.default},function(e,t){function c(){return e.exports=c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var c=arguments[t];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a])}return e},c.apply(this,arguments)}e.exports=c},,function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,c){var a=c(46);e.exports=function(e,t){if(null==e)return{};var c,n,r=a(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)c=o[n],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(r[c]=e[c])}return r}},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,c){},function(e,t){function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(t){return"function"==typeof Symbol&&"symbol"===c(Symbol.iterator)?e.exports=a=function(e){return c(e)}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":c(e)},a(t)}e.exports=a},,,,function(e,t,c){},function(e,t,c){(function(e){var a=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),c={},a=0;a<t.length;a++)c[t[a]]=Object.getOwnPropertyDescriptor(e,t[a]);return c},n=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],c=0;c<arguments.length;c++)t.push(s(arguments[c]));return t.join(" ")}c=1;for(var a=arguments,r=a.length,o=String(e).replace(n,function(e){if("%%"===e)return"%";if(c>=r)return e;switch(e){case"%s":return String(a[c++]);case"%d":return Number(a[c++]);case"%j":try{return JSON.stringify(a[c++])}catch(e){return"[Circular]"}default:return e}}),l=a[c];c<r;l=a[++c])p(l)||!y(l)?o+=" "+l:o+=" "+s(l);return o},t.deprecate=function(c,a){if(void 0!==e&&!0===e.noDeprecation)return c;if(void 0===e)return function(){return t.deprecate(c,a).apply(this,arguments)};var n=!1;return function(){if(!n){if(e.throwDeprecation)throw new Error(a);e.traceDeprecation?console.trace(a):console.error(a),n=!0}return c.apply(this,arguments)}};var r,o={};function s(e,c){var a={seen:[],stylize:i};return arguments.length>=3&&(a.depth=arguments[2]),arguments.length>=4&&(a.colors=arguments[3]),v(c)?a.showHidden=c:c&&t._extend(a,c),w(a.showHidden)&&(a.showHidden=!1),w(a.depth)&&(a.depth=2),w(a.colors)&&(a.colors=!1),w(a.customInspect)&&(a.customInspect=!0),a.colors&&(a.stylize=l),m(a,e,a.depth)}function l(e,t){var c=s.styles[t];return c?"["+s.colors[c][0]+"m"+e+"["+s.colors[c][1]+"m":e}function i(e,t){return e}function m(e,c,a){if(e.customInspect&&c&&E(c.inspect)&&c.inspect!==t.inspect&&(!c.constructor||c.constructor.prototype!==c)){var n=c.inspect(a,e);return g(n)||(n=m(e,n,a)),n}var r=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(g(t)){var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(c,"string")}if(f(t))return e.stylize(""+t,"number");if(v(t))return e.stylize(""+t,"boolean");if(p(t))return e.stylize("null","null")}(e,c);if(r)return r;var o=Object.keys(c),s=function(e){var t={};return e.forEach(function(e,c){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(c)),_(c)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(c);if(0===o.length){if(E(c)){var l=c.name?": "+c.name:"";return e.stylize("[Function"+l+"]","special")}if(b(c))return e.stylize(RegExp.prototype.toString.call(c),"regexp");if(z(c))return e.stylize(Date.prototype.toString.call(c),"date");if(_(c))return h(c)}var i,y="",O=!1,k=["{","}"];(d(c)&&(O=!0,k=["[","]"]),E(c))&&(y=" [Function"+(c.name?": "+c.name:"")+"]");return b(c)&&(y=" "+RegExp.prototype.toString.call(c)),z(c)&&(y=" "+Date.prototype.toUTCString.call(c)),_(c)&&(y=" "+h(c)),0!==o.length||O&&0!=c.length?a<0?b(c)?e.stylize(RegExp.prototype.toString.call(c),"regexp"):e.stylize("[Object]","special"):(e.seen.push(c),i=O?function(e,t,c,a,n){for(var r=[],o=0,s=t.length;o<s;++o)M(t,String(o))?r.push(u(e,t,c,a,String(o),!0)):r.push("");return n.forEach(function(n){n.match(/^\d+$/)||r.push(u(e,t,c,a,n,!0))}),r}(e,c,a,s,o):o.map(function(t){return u(e,c,a,s,t,O)}),e.seen.pop(),function(e,t,c){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return c[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+c[1];return c[0]+t+" "+e.join(", ")+" "+c[1]}(i,y,k)):k[0]+y+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,c,a,n,r){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),M(a,n)||(o="["+n+"]"),s||(e.seen.indexOf(l.value)<0?(s=p(c)?m(e,l.value,null):m(e,l.value,c-1)).indexOf("\n")>-1&&(s=r?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),w(o)){if(r&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function p(e){return null===e}function f(e){return"number"==typeof e}function g(e){return"string"==typeof e}function w(e){return void 0===e}function b(e){return y(e)&&"[object RegExp]"===O(e)}function y(e){return"object"==typeof e&&null!==e}function z(e){return y(e)&&"[object Date]"===O(e)}function _(e){return y(e)&&("[object Error]"===O(e)||e instanceof Error)}function E(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(c){if(w(r)&&(r=e.env.NODE_DEBUG||""),c=c.toUpperCase(),!o[c])if(new RegExp("\\b"+c+"\\b","i").test(r)){var a=e.pid;o[c]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",c,a,e)}}else o[c]=function(){};return o[c]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=v,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=f,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=b,t.isObject=y,t.isDate=z,t.isError=_,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=c(49);var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),H[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",V(),t.format.apply(t,arguments))},t.inherits=c(50),t._extend=function(e,t){if(!t||!y(t))return e;for(var c=Object.keys(t),a=c.length;a--;)e[c[a]]=t[c[a]];return e};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var c=new Error("Promise was rejected with a falsy value");c.reason=e,e=c}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t;if("function"!=typeof(t=e[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,c,a=new Promise(function(e,a){t=e,c=a}),n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);n.push(function(e,a){e?c(e):t(a)});try{e.apply(this,n)}catch(e){c(e)}return a}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,a(e))},t.promisify.custom=j,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function c(){for(var c=[],a=0;a<arguments.length;a++)c.push(arguments[a]);var n=c.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var r=this,o=function(){return n.apply(r,arguments)};t.apply(this,c).then(function(t){e.nextTick(o,null,t)},function(t){e.nextTick(x,t,o)})}return Object.setPrototypeOf(c,Object.getPrototypeOf(t)),Object.defineProperties(c,a(t)),c}}).call(this,c(48))},function(e,t){!function(){e.exports=this.wp.deprecated}()},,,,function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){e.exports=c(43)()},function(e,t,c){"use strict";var a=c(44);function n(){}function r(){}r.resetWarningCache=n,e.exports=function(){function e(e,t,c,n,r,o){if(o!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var c={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:n};return c.PropTypes=c,c}},function(e,t,c){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,c){},function(e,t){e.exports=function(e,t){if(null==e)return{};var c,a,n={},r=Object.keys(e);for(a=0;a<r.length;a++)c=r[a],t.indexOf(c)>=0||(n[c]=e[c]);return n}},function(e,t,c){},function(e,t){var c,a,n=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{a="function"==typeof clearTimeout?clearTimeout:o}catch(e){a=o}}();var l,i=[],m=!1,h=-1;function u(){m&&l&&(m=!1,l.length?i=l.concat(i):h=-1,i.length&&d())}function d(){if(!m){var e=s(u);m=!0;for(var t=i.length;t;){for(l=i,i=[];++h<t;)l&&l[h].run();h=-1,t=i.length}l=null,m=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===o||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)t[c-1]=arguments[c];i.push(new v(e,t)),1!==i.length||m||s(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var c=function(){};c.prototype=t.prototype,e.prototype=new c,e.prototype.constructor=e}},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var c=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(c.push(o.value),!t||c.length!==t);a=!0);}catch(e){n=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return c}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},,,,,function(e,t,c){"use strict";c.r(t);var a={};c.r(a),c.d(a,"getDeposit",function(){return Q}),c.d(a,"getDepositsOverview",function(){return G}),c.d(a,"getDepositsOverviewError",function(){return $}),c.d(a,"getDeposits",function(){return K}),c.d(a,"getDepositQueryError",function(){return X});var n={};c.r(n),c.d(n,"updateDeposit",function(){return ee}),c.d(n,"updateDepositsOverview",function(){return te}),c.d(n,"updateErrorForDepositsOverview",function(){return ce}),c.d(n,"updateDeposits",function(){return ae}),c.d(n,"updateErrorForDepositQuery",function(){return ne});var r={};c.r(r),c.d(r,"getDeposit",function(){return ue}),c.d(r,"getDepositsOverview",function(){return de}),c.d(r,"getDeposits",function(){return ve});var o={};c.r(o),c.d(o,"getTransactions",function(){return ye}),c.d(o,"getTransactionsError",function(){return ze}),c.d(o,"getTransactionsSummary",function(){return Ee}),c.d(o,"getTransactionsSummaryError",function(){return Oe});var s={};c.r(s),c.d(s,"updateTransactions",function(){return ke}),c.d(s,"updateErrorForTransactions",function(){return He}),c.d(s,"updateTransactionsSummary",function(){return Ve}),c.d(s,"updateErrorForTransactionsSummary",function(){return Me});var l={};c.r(l),c.d(l,"getTransactions",function(){return Se}),c.d(l,"getTransactionsSummary",function(){return Te});var i={};c.r(i),c.d(i,"getCharge",function(){return Ie}),c.d(i,"getChargeError",function(){return De});var m={};c.r(m),c.d(m,"updateCharge",function(){return Ae}),c.d(m,"updateErrorForCharge",function(){return Pe});var h={};c.r(h),c.d(h,"getCharge",function(){return qe});var u=c(1),d=c(24),v=(c(39),c(0)),p=c(2);function f(e,t,c){return t in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}function g(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{},a=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(c).filter(function(e){return Object.getOwnPropertyDescriptor(c,e).enumerable}))),a.forEach(function(t){f(e,t,c[t])})}return e}function w(e,t){if(null==e)return{};var c,a,n=function(e,t){if(null==e)return{};var c,a,n={},r=Object.keys(e);for(a=0;a<r.length;a++)c=r[a],t.indexOf(c)>=0||(n[c]=e[c]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)c=r[a],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(n[c]=e[c])}return n}var b=c(14),y=c.n(b);var z=Object(v.forwardRef)(function(e,t){var c=e.href,a=e.target,n=e.isPrimary,r=e.isLarge,o=e.isSmall,s=e.isTertiary,l=e.isToggled,i=e.isBusy,m=e.isDefault,h=e.isLink,u=e.isDestructive,d=e.className,p=e.disabled,f=w(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),b=y()("components-button",d,{"is-button":m||n||r||o,"is-default":m||!n&&(r||o),"is-primary":n,"is-large":r,"is-small":o,"is-tertiary":s,"is-toggled":l,"is-busy":i,"is-link":h,"is-destructive":u}),z=void 0===c||p?"button":"a",_="a"===z?{href:c,target:a}:{type:"button",disabled:p};return Object(v.createElement)(z,g({},_,f,{className:b,ref:t}))}),_=c(67),E=(c(40),function(){Object(v.useEffect)(function(){var e=document.createElement("script");e.src="https://js.stripe.com/v3",e.async=!0,document.querySelector('[src="'.concat(e.src,'"]'))||document.body.appendChild(e)},[])}),O=(c(41),function(e){var t=e.children,c=e.maxWidth,a=e.isNarrow,n=e.className,r=c?{maxWidth:c}:null,o=[void 0===n?"":n,"woocommerce-payments-page"];return a&&o.push("is-narrow"),E(),Object(v.createElement)("div",{className:o.join(" "),style:r},t)}),k=function(){return Object(v.createElement)("svg",{width:"260",height:"193",viewBox:"0 0 260 193",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)("g",{clipPath:"url(#clip0)"},Object(v.createElement)("path",{d:"M188.147 0.353976L5.49328 57.1468C1.37508 58.4273 -0.926025 62.806 0.353615 66.9269L33.2129 172.746C34.4926 176.867 38.8684 179.169 42.9866 177.889L225.64 121.096C229.758 119.815 232.059 115.437 230.78 111.316L197.92 5.49701C196.641 1.37611 192.265 -0.926507 188.147 0.353976Z",fill:"url(#paint0_linear)"}),Object(v.createElement)("path",{d:"M187.201 2.02519L8.57824 57.5647C4.46004 58.8451 2.15894 63.2238 3.43858 67.3447L34.9709 168.89C36.2505 173.011 40.6264 175.314 44.7446 174.033L223.367 118.494C227.485 117.213 229.786 112.835 228.507 108.714L196.974 7.16823C195.695 3.04733 191.319 0.744715 187.201 2.02519Z",fill:"white"}),Object(v.createElement)("path",{d:"M199.423 15.0552L5.8877 75.2317L11.0743 91.9346L204.61 31.7581L199.423 15.0552Z",fill:"#674399"}),Object(v.createElement)("path",{d:"M95.0713 134.624L45.8979 149.914L48.1408 157.137L97.3142 141.847L95.0713 134.624Z",fill:"#BDBDBD"}),Object(v.createElement)("path",{d:"M127.377 111.214L42.1133 137.725L44.3562 144.948L129.62 118.437L127.377 111.214Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M252.192 66.439H59.7576C55.4451 66.439 51.9492 69.9372 51.9492 74.2524V185.187C51.9492 189.502 55.4451 193 59.7576 193H252.192C256.504 193 260 189.502 260 185.187V74.2524C260 69.9372 256.504 66.439 252.192 66.439Z",fill:"url(#paint1_linear)"}),Object(v.createElement)("path",{d:"M249.166 67.7293H62.1194C57.8069 67.7293 54.311 71.2275 54.311 75.5428V181.877C54.311 186.193 57.8069 189.691 62.1194 189.691H249.166C253.479 189.691 256.975 186.193 256.975 181.877V75.5428C256.975 71.2275 253.479 67.7293 249.166 67.7293Z",fill:"white"}),Object(v.createElement)("path",{d:"M108.411 126.936H102.506V143.718H108.411V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M115.97 126.936H110.064V143.718H115.97V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M123.528 126.936H117.623V143.718H123.528V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M136.756 126.936H130.851V143.718H136.756V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M144.314 126.936H138.409V143.718H144.314V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M151.872 126.936H145.967V143.718H151.872V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M165.1 126.936H159.195V143.718H165.1V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M172.659 126.936H166.753V143.718H172.659V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M180.217 126.936H174.312V143.718H180.217V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M193.445 126.936H187.54V143.718H193.445V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M201.003 126.936H195.098V143.718H201.003V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M208.562 126.936H202.657V143.718H208.562V126.936Z",fill:"#E0E0E0"}),Object(v.createElement)("path",{d:"M102.414 99.6817H67.2051V119.002H102.414V99.6817Z",fill:"#674399"}),Object(v.createElement)("path",{opacity:"0.1",d:"M225.643 163.042H204.064V184.635H225.643V163.042Z",fill:"#674399"}),Object(v.createElement)("path",{opacity:"0.1",d:"M236.433 163.042H214.854V184.635H236.433V163.042Z",fill:"#674399"})),Object(v.createElement)("defs",null,Object(v.createElement)("linearGradient",{id:"paint0_linear",x1:"115.955",y1:"178.574",x2:"116.743",y2:"-0.324663",gradientUnits:"userSpaceOnUse"},Object(v.createElement)("stop",{stopColor:"#808080",stopOpacity:"0.25"}),Object(v.createElement)("stop",{offset:"0.53514",stopColor:"#808080",stopOpacity:"0.12"}),Object(v.createElement)("stop",{offset:"1",stopColor:"#808080",stopOpacity:"0.1"})),Object(v.createElement)("linearGradient",{id:"paint1_linear",x1:"114339",y1:"86036.4",x2:"114339",y2:"29661",gradientUnits:"userSpaceOnUse"},Object(v.createElement)("stop",{stopColor:"#808080",stopOpacity:"0.25"}),Object(v.createElement)("stop",{offset:"0.53514",stopColor:"#808080",stopOpacity:"0.12"}),Object(v.createElement)("stop",{offset:"1",stopColor:"#808080",stopOpacity:"0.1"})),Object(v.createElement)("clipPath",{id:"clip0"},Object(v.createElement)("rect",{width:"260",height:"193",fill:"white"}))))},H=function(){return Object(v.createElement)(O,{isNarrow:!0,className:"connect-account"},Object(v.createElement)(p.Card,{className:"connect-account__card"},Object(v.createElement)(k,null),Object(v.createElement)("h2",null," ",Object(u.__)("WooCommerce Payments","woocommerce-payments")," "),Object(v.createElement)("p",{className:"connect-account__description"},Object(u.__)("Accept credit card payments the easy way! No set up fees. No monthly fees. Just 2.9% + $0.30 per transaction on U.S.-issued cards.","woocommerce-payments")),wcpaySettings.onBoardingDisabled?Object(v.createElement)("p",null,Object(u.__)("We've temporarily paused new account creation.","woocommmerce-payments"),Object(v.createElement)("br",null),Object(u.__)("We'll notify you when we resume!","woocommmerce-payments")):Object(v.createElement)(v.Fragment,null,Object(v.createElement)("p",{className:"connect-account__terms"},Object(_.a)(Object(u.__)("By clicking “Set up,” you agree to the <a>Terms of Service</a>","woocommerce-payments"),{a:Object(v.createElement)("a",{href:"https://wordpress.com/tos"})})),Object(v.createElement)("hr",{className:"full-width"}),Object(v.createElement)("p",{className:"connect-account__action"},Object(v.createElement)(z,{isPrimary:!0,isLarge:!0,href:wcpaySettings.connectUrl},Object(u.__)("Set up","woocommerce-payments"))))))},V=c(15),M=c.n(V),j=c(8),x=c(21),C=c.n(x),L=c(6),N=c.n(L),S=(c(45),"/wc/v3/payments"),T="wc/payments",B=c(4),R=c.n(B),I=c(11),D=c(13),A=c(7),P=c.n(A),F=c(3),q={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS_OVERVIEW:"SET_DEPOSITS_OVERVIEW",SET_ERROR_FOR_DEPOSITS_OVERVIEW:"SET_ERROR_FOR_DEPOSITS_OVERVIEW",SET_DEPOSITS:"SET_DEPOSITS",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY"},U=function(e){return JSON.stringify(e,Object.keys(e).sort())},W={byId:{},queries:{}},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.query,n=void 0===a?{}:a,r=t.data,o=void 0===r?[]:r,s=t.error,l=U(n);switch(c){case q.SET_DEPOSIT:return R()({},e,{byId:R()({},e.byId,P()({},o.id,o))});case q.SET_DEPOSITS_OVERVIEW:return R()({},e,{overview:R()({},e.overview,{data:o})});case q.SET_ERROR_FOR_DEPOSITS_OVERVIEW:return R()({},e,{overview:R()({},e.overview,{error:s})});case q.SET_DEPOSITS:return R()({},e,{byId:R()({},e.byId,{},Object(F.keyBy)(o,"id")),queries:R()({},e.queries,P()({},l,{data:Object(F.map)(o,"id")}))});case q.SET_ERROR_FOR_DEPOSIT_QUERY:return R()({},e,{queries:R()({},e.queries,P()({},l,{error:s}))})}return e},Z=function(e){return e&&e.deposits||{}},Q=function(e,t){return(Z(e).byId||{})[t]},G=function(e){return(Z(e).overview||{}).data},$=function(e){return(Z(e).overview||{}).error},J=function(e,t){var c=U(t);return(Z(e).queries||{})[c]||{}},K=function(e,t){return(J(e,t).data||[]).map(Q.bind(void 0,e))},X=function(e,t){return J(e,t).error||{}};function ee(e){return{type:q.SET_DEPOSIT,data:e}}function te(e){return{type:q.SET_DEPOSITS_OVERVIEW,data:e}}function ce(e,t){return{type:q.SET_ERROR_FOR_DEPOSITS_OVERVIEW,error:t}}function ae(e,t){return{type:q.SET_DEPOSITS,query:e,data:t}}function ne(e,t,c){return{type:q.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:c}}var re=c(5),oe=c.n(re),se=c(10),le=oe.a.mark(ue),ie=oe.a.mark(de),me=oe.a.mark(ve),he=function(e){return{id:e.id,date:+new Date(1e3*e.arrival_date),type:e.amount>0?"deposit":"withdrawal",amount:e.amount,status:e.status,bankAccount:e.destination.bank_name&&"".concat(e.destination.bank_name," ")+"•••• ".concat(e.destination.last4," ")+"(".concat(e.destination.currency.toUpperCase(),")")}};function ue(e){var t,c;return oe.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=Object(se.addQueryArgs)("".concat(S,"/deposits/").concat(e)),a.prev=1,a.next=4,Object(D.apiFetch)({path:t});case 4:return"payout"===(c=a.sent).object&&(c=he(c)),a.next=8,ee(c);case 8:a.next=14;break;case 10:return a.prev=10,a.t0=a.catch(1),a.next=14,Object(D.dispatch)("core/notices","createErrorNotice",Object(u.__)("Error retrieving deposit.","woocommerce-payments"));case 14:case"end":return a.stop()}},le,null,[[1,10]])}function de(){var e,t;return oe.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e=Object(se.addQueryArgs)("".concat(S,"/deposits/overview")),c.prev=1,c.next=4,Object(D.apiFetch)({path:e});case 4:return(t=c.sent).last_deposit&&"payout"===t.last_deposit.object&&(t.last_deposit=he(t.last_deposit)),t.next_deposit&&"payout"===t.next_deposit.object&&(t.next_deposit=he(t.next_deposit)),c.next=9,te(t);case 9:c.next=17;break;case 11:return c.prev=11,c.t0=c.catch(1),c.next=15,Object(D.dispatch)("core/notices","createErrorNotice",Object(u.__)("Error retrieving deposits overview.","woocommerce-payments"));case 15:return c.next=17,ce(c.t0);case 17:case"end":return c.stop()}},ie,null,[[1,11]])}function ve(e){var t,c,a;return oe.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=Object(se.addQueryArgs)("".concat(S,"/deposits"),{page:e.paged,pagesize:e.perPage}),n.prev=1,n.next=4,Object(D.apiFetch)({path:t})||{};case 4:return(c=n.sent).data&&c.data.length&&"payout"===c.data[0].object&&(c.data=c.data.map(he)),n.next=8,ae(e,c.data);case 8:n.t0=oe.a.keys(c.data);case 9:if((n.t1=n.t0()).done){n.next=15;break}return a=n.t1.value,n.next=13,Object(D.dispatch)(T,"finishResolution","getDeposit",[c.data[a].id]);case 13:n.next=9;break;case 15:n.next=23;break;case 17:return n.prev=17,n.t2=n.catch(1),n.next=21,Object(D.dispatch)("core/notices","createErrorNotice",Object(u.__)("Error retrieving deposits.","woocommerce-payments"));case 21:return n.next=23,ne(e,null,n.t2);case 23:case"end":return n.stop()}},me,null,[[1,17]])}var pe={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY"},fe={summary:{}},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe,t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.query,n=void 0===a?{}:a,r=t.data,o=void 0===r?[]:r,s=t.error,l=U(n);switch(c){case pe.SET_TRANSACTIONS:return R()({},e,P()({},l,{data:o}));case pe.SET_ERROR_FOR_TRANSACTIONS:return R()({},e,P()({},l,{error:s}));case pe.SET_TRANSACTIONS_SUMMARY:return R()({},e,{summary:R()({},e.summary,P()({},l,{data:o}))});case pe.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return R()({},e,{summary:R()({},e.summary,P()({},l,{error:s}))})}return e},we=function(e){return e&&e.transactions||{}},be=function(e,t){var c=U(t);return we(e)[c]||{}},ye=function(e,t){return be(e,t).data||[]},ze=function(e,t){return be(e,t).error||{}},_e=function(e,t){var c=U(t);return we(e).summary[c]||{}},Ee=function(e,t){return _e(e,t).data||{}},Oe=function(e,t){return _e(e,t).error||{}};function ke(e,t){return{type:pe.SET_TRANSACTIONS,query:e,data:t}}function He(e,t,c){return{type:pe.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:c}}function Ve(e,t){return{type:pe.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function Me(e,t,c){return{type:pe.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:c}}var je=function(e){return Object(F.capitalize)(e).replace(/_/g," ")},xe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=t?N()(e).endOf("day").utc():N()(e).startOf("day").utc();return e&&Object(j.dateI18n)("Y-m-d H:i:s",c)},Ce=oe.a.mark(Se),Le=oe.a.mark(Te),Ne=function(e){return{match:e.match,date_before:xe(e.dateBefore),date_after:xe(e.dateAfter,!0),date_between:e.dateBetween&&[xe(e.dateBetween[0]),xe(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,deposit_id:e.depositId}};function Se(e){var t,c;return oe.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=Object(se.addQueryArgs)("".concat(S,"/transactions"),R()({page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order},Ne(e))),a.prev=1,a.next=4,Object(D.apiFetch)({path:t});case 4:return c=a.sent,a.next=7,ke(e,c.data||[]);case 7:a.next=13;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,He(e,null,a.t0);case 13:case"end":return a.stop()}},Ce,null,[[1,9]])}function Te(e){var t,c;return oe.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=Object(se.addQueryArgs)("".concat(S,"/transactions/summary"),Ne(e)),a.prev=1,a.next=4,Object(D.apiFetch)({path:t});case 4:return c=a.sent,a.next=7,Ve(e,c);case 7:a.next=13;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,Me(e,null,a.t0);case 13:case"end":return a.stop()}},Le,null,[[1,9]])}var Be={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.id,n=t.data,r=t.error;switch(c){case Be.SET_CHARGE:e=R()({},e,P()({},a,R()({},e[a],{data:n})));break;case Be.SET_ERROR_FOR_CHARGE:e=R()({},e,P()({},a,R()({},e[a],{error:r})))}return e},Ie=function(e,t){return e.charges[t]&&e.charges[t].data?e.charges[t].data:{}},De=function(e,t){return e.charges[t]&&e.charges[t].error?e.charges[t].error:{}};function Ae(e,t){return{type:Be.SET_CHARGE,id:e,data:t}}function Pe(e,t,c){return{type:Be.SET_ERROR_FOR_CHARGE,id:e,data:t,error:c}}var Fe=oe.a.mark(qe);function qe(e){var t;return oe.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,Object(D.apiFetch)({path:"".concat(S,"/charges/").concat(e)});case 3:return t=c.sent,c.next=6,Ae(e,t);case 6:c.next=12;break;case 8:return c.prev=8,c.t0=c.catch(0),c.next=12,Pe(e,null,c.t0);case 12:case"end":return c.stop()}},Fe,null,[[0,8]])}Object(I.registerStore)(T,{reducer:Object(I.combineReducers)({deposits:Y,transactions:ge,charges:Re}),actions:R()({},n,{},s,{},m),controls:D.controls,selectors:R()({},a,{},o,{},i),resolvers:R()({},r,{},l,{},h)});var Ue=c(22),We=c.n(Ue),Ye=c(26),Ze=c.n(Ye),Qe=(c(47),function(e){var t=e.isLoading,c=e.display,a=e.placeholder,n=e.value,r=e.children;return t?Object(v.createElement)("span",{className:c?"is-loadable-placeholder is-".concat(c):"is-loadable-placeholder","aria-busy":"true"},void 0===a?r||n:a):r||n||null}),Ge=function(e){var t=e.numLines,c=void 0===t?1:t,a=Ze()(e,["numLines"]),n=Object(v.createElement)("p",{style:{lineHeight:c}},"Block placeholder");return Object(v.createElement)(Qe,We()({},a,{placeholder:n,display:"block"}))},$e=Qe,Je=function(e,t){return Object(se.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/".concat(t,"/details"),id:e})},Ke=function(e){var t=e.id,c=e.parentSegment;return t?Object(v.createElement)(p.Link,{href:Je(t,c)},Object(v.createElement)(C.a,{icon:"info-outline",size:18})):null},Xe=new M.a,et=function(e,t){return Object(j.dateI18n)(e,N.a.utc(t))},tt=function(e){return Xe.formatCurrency((e?e.amount:0)/100)},ct=function(e){var t=e?"".concat(Object(u.__)("Est.","woocommerce-payments")," ").concat(et("M j, Y",e.date)):"—";return e&&"in_transit"===e.status?"".concat(t," - ").concat(Object(u.__)("In transit","woocommerce-payments")):t},at=function(e){switch(e.interval){case"daily":return Object(u.__)("Automatic, every business day","woocommerce-payments");case"weekly":return Object(u.sprintf)(Object(u.__)("Automatic, every week on %s","woocommerce-payments"),N()().locale("en").day(e.weekly_anchor).locale(N.a.locale()).format("dddd"));case"monthly":var t=N.a.locale().startsWith("en")?"en":N.a.locale();return Object(u.sprintf)(Object(u.__)("Automatic, every month on the %s","woocommerce-payments"),N()().locale(t).date(e.monthly_anchor).format("Do"))}},nt=function(){var e=Object(I.useSelect)(function(e){var t=e(T),c=t.getDepositsOverview,a=t.getDepositsOverviewError,n=t.isResolving;return{overview:c(),overviewError:a(),isLoading:n("getDepositsOverview")}}),t=e.overview,c=e.isLoading;return Object(v.createElement)("div",{className:"wcpay-deposits-overview"},Object(v.createElement)("p",{className:"wcpay-deposits-overview__schedule"},Object(v.createElement)(C.a,{icon:"calendar",className:"wcpay-deposits-overview__schedule-icon"}),Object(v.createElement)("span",{className:"wcpay-deposits-overview__schedule-label"},Object(u.__)("Deposit schedule:","woocommerce-payments"))," ",Object(v.createElement)("span",{className:"wcpay-deposits-overview__schedule-value"},Object(v.createElement)($e,{isLoading:c||!t,display:"inline",placeholder:"Deposit schedule placeholder"},t?(a=t,n=a.account,r=n.deposits_schedule,o=n.deposits_disabled,s=a.last_deposit,o||"manual"===r.interval?Object(_.a)(Object(u.__)("Temporarily suspended (<a>learn more</a>)","woocommerce-payments"),{a:Object(v.createElement)("a",{href:"https://docs.woocommerce.com/document/payments/faq/deposits-suspended/",target:"_blank",rel:"noopener noreferrer"})}):s?at(r):Object(_.a)(Object(u.sprintf)(Object(u.__)("%s – your first deposit is held for seven days (<a>learn more</a>)","woocommerce-payments"),at({interval:"daily"})),{a:Object(v.createElement)("a",{href:"https://docs.woocommerce.com/document/payments/faq/deposit-schedule/",target:"_blank",rel:"noopener noreferrer"})})):""))),c||!t?Object(v.createElement)(p.SummaryListPlaceholder,{numberOfItems:4}):Object(v.createElement)(p.SummaryList,{label:Object(u.__)("Deposits overview","woocommerce-payments")},function(){return[Object(v.createElement)(p.SummaryNumber,{key:"lastDeposit",label:Object(u.__)("Last deposit","woocommerce-payments"),value:tt(t.last_deposit),prevLabel:(c=t.last_deposit,c?et("F j, Y",c.date):"—"),href:t.last_deposit?Je(t.last_deposit.id,"deposits"):""}),Object(v.createElement)(p.SummaryNumber,{key:"nextDeposit",label:Object(u.__)("Next deposit","woocommerce-payments"),value:tt(t.next_deposit),prevLabel:ct(t.next_deposit),href:t.next_deposit?Je(t.next_deposit.id,"deposits"):""}),Object(v.createElement)(p.SummaryNumber,{key:"pendingBalance",label:Object(u.__)("Pending balance","woocommerce-payments"),value:tt(t.balance.pending),prevLabel:(e=t.balance.pending,Object(u.sprintf)(Object(u._n)("%d deposit","%d deposits",e.deposits_count,"woocommerce-payments"),e.deposits_count))}),Object(v.createElement)(p.SummaryNumber,{key:"availableBalance",label:Object(u.__)("Available balance","woocommerce-payments"),value:tt(t.balance.available),prevLabel:""})];var e,c}));var a,n,r,o,s},rt=c(9),ot={deposit:Object(u.__)("Deposit","woocommerce-payments"),withdrawal:Object(u.__)("Withdrawal","woocommerce-payments")},st={paid:Object(u.__)("Paid","woocommerce-payments"),pending:Object(u.__)("Pending","woocommerce-payments"),in_transit:Object(u.__)("In transit","woocommerce-payments"),canceled:Object(u.__)("Canceled","woocommerce-payments"),failed:Object(u.__)("Failed","woocommerce-payments"),estimated:Object(u.__)("Estimated","woocommerce-payments")},lt=c(34),it=(c(51),function(e){var t=e.href,c=e.children;return t?Object(v.createElement)(p.Link,{href:t,className:"woocommerce-table__clickable-cell",tabIndex:"-1"},c):c}),mt=new M.a,ht=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"date",label:Object(u.__)("Date","woocommerce-payments"),required:!0,isLeftAligned:!0,defaultOrder:"desc",cellClassName:"date-time"},{key:"type",label:Object(u.__)("Type","woocommerce-payments"),required:!0},{key:"amount",label:Object(u.__)("Amount","woocommerce-payments"),isNumeric:!0,required:!0},{key:"status",label:Object(u.__)("Status","woocommerce-payments"),required:!0},{key:"bankAccount",label:Object(u.__)("Bank account","woocommerce-payments")}],ut=function(){var e,t,c,a=(e=Object(rt.getQuery)(),t=e.paged,c=e.per_page,Object(I.useSelect)(function(e){var a=e(T),n=a.getDeposits,r=a.getDepositQueryError,o=a.isResolving,s={paged:Number.isNaN(parseInt(t,10))?"1":t,perPage:Number.isNaN(parseInt(c,10))?"25":c};return{deposits:n(s),depositsError:r(s),isLoading:o("getDeposits",[s])}},[t,c])),n=a.deposits,r=a.isLoading,o=n.map(function(e){var t=function(t){return Object(v.createElement)(it,{href:Je(e.id,"deposits")},t)},c=Object(v.createElement)(Ke,{id:e.id,parentSegment:"deposits"}),a=Object(v.createElement)(p.Link,{href:Je(e.id,"deposits")},Object(j.dateI18n)("M j, Y",N.a.utc(e.date))),n={details:{value:e.id,display:c},date:{value:e.date,display:a},type:{value:e.type,display:t(ot[e.type])},amount:{value:e.amount/100,display:t(mt.formatCurrency(e.amount/100))},status:{value:e.status,display:t(st[e.status]||Object(lt.formatStringValue)(e.status))},bankAccount:{value:e.bankAccount,display:t(e.bankAccount)}};return ht.map(function(e){var t=e.key;return n[t]||{display:null}})});return Object(v.createElement)(p.TableCard,{title:Object(u.__)("Deposit history","woocommerce-payments"),isLoading:r,rowsPerPage:10,totalRows:10,headers:ht,rows:o,query:Object(rt.getQuery)(),onQueryChange:rt.onQueryChange})},dt=function(){return Object(v.createElement)(O,null,Object(v.createElement)(nt,null),Object(v.createElement)(ut,null))},vt=function(e){var t=e.order;return t?Object(v.createElement)(p.Link,{href:t.url,type:"external"},t.number):Object(v.createElement)("span",null,"–")},pt={normal:Object(u.__)("Normal","woocommerce-payments"),elevated:Object(u.__)("Elevated","woocommerce-payments"),highest:Object(u.__)("Highest","woocommerce-payments")},ft=["normal","elevated","highest"],gt={normal:"green",elevated:"orange",highest:"red"},wt=function(e){var t=e.risk,c=ft[t];return Object(v.createElement)("span",{style:{color:gt[c]}},pt[c])},bt={charge:Object(u.__)("Charge","woocommerce-payments"),payment:Object(u.__)("Payment","woocommerce-payments"),payment_failure_refund:Object(u.__)("Payment failure refund","woocommerce-payments"),payment_refund:Object(u.__)("Payment refund","woocommerce-payments"),refund:Object(u.__)("Refund","woocommerce-payments"),refund_failure:Object(u.__)("Refund failure","woocommerce-payments"),dispute:Object(u.__)("Dispute","woocommerce-payments"),dispute_reversal:Object(u.__)("Dispute reversal","woocommerce-payments")},yt=function(e){var t=e.depositId,c=e.dateAvailable,a=Object(se.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/deposits/details",id:t}),n=null!=c&&Object(j.dateI18n)("M j, Y",N.a.utc(c));return t?Object(v.createElement)(p.Link,{href:a},n||Object(u.__)("Deposit details","woocommerce-payments")):n||Object(u.__)("Pending","woocommerce-payments")},zt=(c(52),new M.a),_t=[{key:"details",label:"",required:!0},{key:"date",label:Object(u.__)("Date / Time","woocommerce-payments"),screenReaderLabel:Object(u.__)("Date and time","woocommerce-payments"),required:!0,isLeftAligned:!0,defaultOrder:"desc",cellClassName:"date-time",isSortable:!0,defaultSort:!0},{key:"type",label:Object(u.__)("Type","woocommerce-payments"),screenReaderLabel:Object(u.__)("Type","woocommerce-payments"),required:!0},{key:"amount",label:Object(u.__)("Amount","woocommerce-payments"),screenReaderLabel:Object(u.__)("Amount","woocommerce-payments"),isNumeric:!0,isSortable:!0},{key:"fees",label:Object(u.__)("Fees","woocommerce-payments"),screenReaderLabel:Object(u.__)("Fees","woocommerce-payments"),isNumeric:!0,isSortable:!0},{key:"net",label:Object(u.__)("Net","woocommerce-payments"),screenReaderLabel:Object(u.__)("Net","woocommerce-payments"),isNumeric:!0,required:!0,isSortable:!0},{key:"order",label:Object(u.__)("Order #","woocommerce-payments"),screenReaderLabel:Object(u.__)("Order number","woocommerce-payments"),required:!0},{key:"source",label:Object(u.__)("Source","woocommerce-payments"),screenReaderLabel:Object(u.__)("Source","woocommerce-payments")},{key:"customer_name",label:Object(u.__)("Customer","woocommerce-payments"),screenReaderLabel:Object(u.__)("Customer","woocommerce-payments")},{key:"customer_email",label:Object(u.__)("Email","woocommerce-payments"),screenReaderLabel:Object(u.__)("Email","woocommerce-payments"),visible:!1},{key:"customer_country",label:Object(u.__)("Country","woocommerce-payments"),screenReaderLabel:Object(u.__)("Country","woocommerce-payments"),visible:!1},{key:"risk_level",label:Object(u.__)("Risk level","woocommerce-payments"),screenReaderLabel:Object(u.__)("Risk level","woocommerce-payments"),visible:!1}],Et={key:"deposit",label:Object(u.__)("Deposit","woocommerce-payments"),screenReaderLabel:Object(u.__)("Deposit","woocommerce-payments"),cellClassName:"deposit"},Ot=function(e){var t,c,a,n,r,o,s,l,i,m,h,d,f=(t=Object(rt.getQuery)(),c=e.depositId,a=t.paged,n=t.per_page,r=t.orderby,o=t.order,s=t.match,l=t.date_before,i=t.date_after,m=t.date_between,h=t.type_is,d=t.type_is_not,Object(I.useSelect)(function(e){var t=e(T),u=t.getTransactions,v=t.getTransactionsError,p=t.isResolving,f={paged:Number.isNaN(parseInt(a,10))?"1":a,perPage:Number.isNaN(parseInt(n,10))?"25":n,orderby:r||"date",order:o||"desc",match:s,dateBefore:l,dateAfter:i,dateBetween:m&&m.sort(function(e,t){return N()(e).diff(N()(t))}),typeIs:h,typeIsNot:d,depositId:c};return{transactions:u(f),transactionsError:v(f),isLoading:p("getTransactions",[f])}},[a,n,r,o,s,l,i,m,h,d,c])),g=f.transactions,w=f.isLoading,b=function(e,t){var c=e.match,a=e.date_before,n=e.date_after,r=e.date_between,o=e.type_is,s=e.type_is_not;return Object(I.useSelect)(function(e){var l=e(T),i=l.getTransactionsSummary,m=l.isResolving,h={match:c,dateBefore:a,dateAfter:n,dateBetween:r,typeIs:o,typeIsNot:s,depositId:t};return{transactionsSummary:i(h),isLoading:m("getTransactionsSummary",[h])}},[c,a,n,r,o,s,t])}(Object(rt.getQuery)(),e.depositId),y=b.transactionsSummary,z=b.isLoading,_=e.depositId?_t:[].concat(_t,[Et]),E=_.find(function(e){return"details"===e.key})||{};Object(rt.getQuery)().orderby&&"date"!==Object(rt.getQuery)().orderby?E.cellClassName="info-button":E.cellClassName="info-button is-sorted";var O=g.map(function(e){var t=Je(e.charge_id,"transactions"),c=function(e){return Object(v.createElement)(it,{href:t},e)},a=Object(v.createElement)(Ke,{id:e.charge_id,parentSegment:"transactions"}),n=Object(v.createElement)(vt,{order:e.order}),r=Object(v.createElement)(wt,{risk:e.risk_level}),o=Object(v.createElement)(yt,{depositId:e.deposit_id,dateAvailable:e.date_available}),s={details:{value:e.transaction_id,display:a},date:{value:e.date,display:c(Object(j.dateI18n)("M j, Y / g:iA",N.a.utc(e.date).local()))},type:{value:e.type,display:c(bt[e.type]||je(e.type))},source:{value:e.source,display:c(Object(v.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(e.source)}))},order:{value:e.order_id,display:n},customer_name:{value:e.customer_name,display:c(e.customer_name)},customer_email:{value:e.customer_email,display:c(e.customer_email)},customer_country:{value:e.customer_country,display:c(e.customer_country)},amount:{value:e.amount/100,display:c(zt.formatCurrency(e.amount/100))},fees:{value:e.fees/100,display:c(zt.formatCurrency(e.fees/100*-1))},net:{value:e.net/100,display:c(zt.formatCurrency(e.net/100))},risk_level:{value:e.risk_level,display:c(r)},deposit:{value:e.deposit_id,display:o}};return _.map(function(e){var t=e.key;return s[t]||{display:null}})}),k=[{label:"transactions",value:"".concat(y.count)},{label:"total",value:"".concat(zt.formatCurrency(y.total/100))},{label:"fees",value:"".concat(zt.formatCurrency(y.fees/100))},{label:"net",value:"".concat(zt.formatCurrency(y.net/100))}];return Object(v.createElement)(p.TableCard,{className:"transactions-list",title:e.depositId?Object(u.__)("Deposit transactions","woocommerce-payments"):Object(u.__)("Transactions","woocommerce-payments"),isLoading:w,rowsPerPage:Object(rt.getQuery)().per_page||25,totalRows:y.count||0,headers:_,rows:O,summary:z?null:k,query:Object(rt.getQuery)(),onQueryChange:rt.onQueryChange})},kt=(c(53),new M.a),Ht=function(e){var t=e.status;return Object(v.createElement)(p.OrderStatus,{order:{status:t},orderStatusMap:st})},Vt=function(e){var t,c=e.depositId,a=(t=c,Object(I.useSelect)(function(e){var c=e(T),a=c.getDeposit,n=c.isResolving;return{deposit:a(t),isLoading:n("getDeposit",[t])}},[t])),n=a.deposit,r=void 0===n?{}:n,o=a.isLoading;return Object(v.createElement)(p.Card,{className:"wcpay-deposit-overview"},Object(v.createElement)("div",{className:"wcpay-deposit-detail"},Object(v.createElement)("div",{className:"wcpay-deposit-date"},Object(v.createElement)($e,{isLoading:o,placeholder:"Date placeholder"},"".concat(Object(u.__)("Deposit date","woocommerce-payments"),": "),Object(j.dateI18n)("M j, Y",N.a.utc(r.date)))),Object(v.createElement)("div",{className:"wcpay-deposit-status"},Object(v.createElement)($e,{isLoading:o,placeholder:"Status"},Object(v.createElement)(Ht,{status:r.status}))),Object(v.createElement)("div",{className:"wcpay-deposit-bank-account"},Object(v.createElement)($e,{isLoading:o,placeholder:"Bank account placeholder"},r.bankAccount))),Object(v.createElement)("div",{className:"wcpay-deposit-hero"},Object(v.createElement)("div",{className:"wcpay-deposit-amount"},Object(v.createElement)($e,{isLoading:o,placeholder:"Amount",display:"inline"},kt.formatCurrency(r.amount/100)))))},Mt=function(e){var t=e.query.id;return Object(v.createElement)(O,null,Object(v.createElement)(Vt,{depositId:t}),Object(v.createElement)(Ot,{depositId:t}))},jt=c(17),xt=c.n(jt),Ct=Object.entries(bt).filter(function(e){return!xt()(e,1)[0].startsWith("payment")}).map(function(e){var t=xt()(e,2),c=t[0];return{label:t[1],value:c}}),Lt=[{label:Object(u.__)("Show","woocommerce-payments"),param:"filter",staticParams:[],showFilters:function(){return!0},filters:[{label:Object(u.__)("All transactions","woocommerce-payments"),value:"all"},{label:Object(u.__)("Advanced filters","woocommerce-payments"),value:"advanced"}]}],Nt={title:Object(u.__)("Transactions match {{select /}} filters","woocommerce-payments"),filters:{date:{labels:{add:Object(u.__)("Date","woocommerce-payments"),remove:Object(u.__)("Remove transaction date filter","woocommerce-payments"),rule:Object(u.__)("Select a transaction date filter match","woocommerce-payments"),title:Object(u.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),filter:Object(u.__)("Select a transaction date","woocommerce-payments")},rules:[{value:"before",label:Object(u.__)("Before","woocommerce-admin")},{value:"after",label:Object(u.__)("After","woocommerce-admin")},{value:"between",label:Object(u.__)("Between","woocommerce-admin")}],input:{component:"Date"}},type:{labels:{add:Object(u.__)("Type","woocommerce-payments"),remove:Object(u.__)("Remove transaction type filter","woocommerce-payments"),rule:Object(u.__)("Select a transaction type filter match","woocommerce-payments"),title:Object(u.__)("{{title}}Type{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),filter:Object(u.__)("Select a transaction type","woocommerce-payments")},rules:[{value:"is",label:Object(u._x)("Is","transaction type","woocommerce-payments")},{value:"is_not",label:Object(u._x)("Is not","transaction type","woocommerce-payments")}],input:{component:"SelectControl",options:Ct}}}},St=function(){return Object(v.createElement)(p.ReportFilters,{filters:Lt,advancedFilters:Nt,showDatePicker:!1,path:"/payments/transactions",query:Object(rt.getQuery)()})},Tt=function(){return Object(v.createElement)(O,null,Object(v.createElement)(St,null),Object(v.createElement)(Ot,null))},Bt=["issuer_declined","invalid"],Rt=["blocked"],It=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.status||null},Dt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.outcome?e.outcome.type:null},At=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"succeeded"===e.status&&!0===e.paid},Pt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"failed"===e.status&&Bt.includes(Dt(e))},Ft=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"failed"===e.status&&Rt.includes(Dt(e))},qt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.captured},Ut=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.disputed},Wt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.amount_refunded>0},Yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.refunded},Zt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Wt(e)&&!Yt(e)},Qt=function(e){switch(e){case"warning_needs_response":case"needs_response":return"disputed_needs_response";case"warning_under_review":case"under_review":return"disputed_under_review";case"won":return"disputed_won";case"lost":return"disputed_lost";default:return"disputed"}},Gt=c(20),$t={refunded_partial:{type:"light",message:Object(u.__)("Partial refund","woocommerce-payments")},refunded_full:{type:"light",message:Object(u.__)("Refunded","woocommerce-payments")},paid:{type:"light",message:Object(u.__)("Paid","woocommerce-payments")},authorized:{type:"primary",message:Object(u.__)("Payment authorized","woocommerce-payments")},failed:{type:"alert",message:Object(u.__)("Payment failed","woocommerce-payments")},blocked:{type:"alert",message:Object(u.__)("Payment blocked","woocommerce-payments")},disputed_needs_response:{type:"primary",message:Object(u.__)("Disputed: Needs response","woocommerce-payments")},disputed_under_review:{type:"light",message:Object(u.__)("Disputed: In review","woocommerce-payments")},disputed_won:{type:"light",message:Object(u.__)("Disputed: Won","woocommerce-payments")},disputed_lost:{type:"light",message:Object(u.__)("Disputed: Lost","woocommerce-payments")},default:{type:"light",message:""}},Jt=function(e){var t=e.charge,c=$t[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pt(e)?"failed":Ft(e)?"blocked":Ut(e)?Qt(It(e.dispute)):Zt(e)?"refunded_partial":Yt(e)?"refunded_full":At(e)?qt(e)?"paid":"authorized":""}(t)]||$t.default;return Object(v.createElement)(Gt.a,{message:c.message,type:c.type})},Kt=(c(57),function(e){var t=e.payment,c=t?t[t.type]:null;return c?Object(v.createElement)("span",{className:"payment-method-details"},Object(v.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(c.brand)})," •••• ",c.last4):Object(v.createElement)("span",null,"–")}),Xt=(c(58),function(e){var t=e.items;return Object(v.createElement)(p.List,{className:"woocommerce-list--horizontal",items:t})}),ec=(c(59),new M.a),tc={net:0,fee:0,refunded:null},cc=function(e){var t=e.charge;return[{title:Object(u.__)("Date","woocommerce-payments"),content:t.created?Object(j.dateI18n)("M j, Y, g:ia",N()(1e3*t.created)):"–"},{title:Object(u.__)("Customer","woocommerce-payments"),content:Object(F.get)(t,"billing_details.name")||"–"},{title:Object(u.__)("Payment method","woocommerce-payments"),content:Object(v.createElement)(Kt,{payment:t.payment_method_details})},{title:Object(u.__)("Risk evaluation","woocommerce-payments"),content:pt[Object(F.get)(t,"outcome.risk_level")]||"–"},{title:"",content:t.id||"–"}]},ac=function(e){var t=e.charge,c=void 0===t?{}:t,a=e.isLoading,n=c.amount?function(e){var t,c;return c=e.application_fee_amount,t=0,Ut(e)&&"won"!==e.dispute.status?(c+=1500,t=e.dispute.amount):Wt(e)&&(t=e.amount_refunded),{net:e.amount-c-(t||0),fee:c,refunded:t}}(c):tc,r=n.net,o=n.fee,s=n.refunded;return Object(v.createElement)(p.Card,{className:"payment-details-summary-details"},Object(v.createElement)("div",{className:"payment-details-summary"},Object(v.createElement)("div",{className:"payment-details-summary__section"},Object(v.createElement)("p",{className:"payment-details-summary__amount"},Object(v.createElement)($e,{isLoading:a,placeholder:"Amount placeholder"},ec.formatCurrency((c.amount||0)/100),Object(v.createElement)("span",{className:"payment-details-summary__amount-currency"},c.currency||"cur"),Object(v.createElement)(Jt,{charge:c}))),Object(v.createElement)("div",{className:"payment-details-summary__breakdown"},s?Object(v.createElement)("p",null,"".concat(Object(u.__)("Refunded","woocommerce-payments"),": "),ec.formatCurrency(-s/100)):"",Object(v.createElement)("p",null,Object(v.createElement)($e,{isLoading:a,placeholder:"Fee amount"},"".concat(Object(u.__)("Fee","woocommerce-payments"),": "),ec.formatCurrency(-o/100))),Object(v.createElement)("p",null,Object(v.createElement)($e,{isLoading:a,placeholder:"Net amount"},"".concat(Object(u.__)("Net","woocommerce-payments"),": "),ec.formatCurrency(r/100))))),Object(v.createElement)("div",{className:"payment-details-summary__section"},Object(v.createElement)("div",{className:"payment-details-summary__actions"},c.order?Object(v.createElement)(z,{className:"payment-details-summary__actions-item",isDefault:!0,isLarge:!0,href:c.order.url},"".concat(Object(u.__)("View order")," #").concat(c.order.number)):""))),Object(v.createElement)("hr",{className:"full-width"}),Object(v.createElement)(Ge,{isLoading:a,numLines:4},Object(v.createElement)(Xt,{items:cc({charge:c})})))},nc=function(){return null},rc=function(e){var t=e.label,c=e.children,a=e.isLoading;return Object(v.createElement)("div",{className:"payment-method-detail"},Object(v.createElement)("h4",{className:"payment-method-detail__label"},Object(v.createElement)($e,{isLoading:a,display:"block",value:t})),Object(v.createElement)("p",{className:"payment-method-detail__value"},Object(v.createElement)($e,{isLoading:a,value:c})))},oc=function(e){switch(e.checked){case"pass":return Object(u.__)("Passed","woocommerce-payments");case"fail":return Object(u.__)("Failed","woocommerce-payments");case"unavailable":return Object(u.__)("Unavailable","woocommerce-payments");default:return Object(u.__)("Not checked","woocommerce-payments")}},sc={last4:"0000",fingerprint:"fingerprint placeholder",date:"date placeholder",cardType:"card type placeholder",id:"id placeholder",name:"name placeholder",email:"email placeholder",formattedAddress:"address placeholder",country:"country placeholder",cvcCheck:null,line1Check:null,postalCodeCheck:null},lc=function(e){var t=e.charge,c=void 0===t?{}:t,a=e.isLoading,n=c&&c.payment_method_details?function(e){var t=e.billing_details,c=e.payment_method,a=e.payment_method_details.card,n=a.last4,r=a.fingerprint,o=a.exp_month,s=a.exp_year,l=a.funding,i=a.network,m=a.country,h=a.checks,d=t.name,v=t.email,p=t.formatted_address,f=h.cvc_check,g=h.address_line1_check,w=h.address_postal_code_check,b=o+" / "+s,y={credit:Object(u.__)("credit","woocommerce-payments"),debit:Object(u.__)("debit","woocommerce-payments"),prepaid:Object(u.__)("prepaid","woocommerce-payments"),unknown:Object(u.__)("unknown","woocommerce-payments")};return{last4:n,fingerprint:r,date:b,cardType:Object(u.sprintf)(Object(u.__)("%1$s %2$s card","woocommerce-payments"),i.charAt(0).toUpperCase()+i.slice(1),y[l]),id:c,name:d,email:v,country:wcSettings.countries[m],cvcCheck:f,line1Check:g,postalCodeCheck:w,formattedAddress:p}}(c):sc,r=n.last4,o=n.fingerprint,s=n.date,l=n.cardType,i=n.id,m=n.name,h=n.email,d=n.country,f=n.cvcCheck,g=n.line1Check,w=n.postalCodeCheck,b=n.formattedAddress,y=rc,z=oc;return Object(v.createElement)(p.Card,{title:Object(v.createElement)($e,{isLoading:a,value:Object(u.__)("Payment method","woocommerce-payments")})},Object(v.createElement)("div",{className:"payment-method-details"},Object(v.createElement)("div",{className:"payment-method-details__column"},Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Number","woocommerce-payments")},"•••• ",r),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Fingerprint","woocommerce-payments")},o),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Expires","woocommerce-payments")},s),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Type","woocommerce-payments")},l),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("ID","woocommerce-payments")},i)),Object(v.createElement)("div",{className:"payment-method-details__column"},Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Owner","woocommerce-payments")},m),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Owner email","woocommerce-payments")},h),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Address","woocommerce-payments")},Object(v.createElement)("span",{dangerouslySetInnerHTML:{__html:b}})),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Origin","woocommerce-payments")},d),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("CVC check","woocommerce-payments")},Object(v.createElement)(z,{checked:f})),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Street check","woocommerce-payments")},Object(v.createElement)(z,{checked:g})),Object(v.createElement)(y,{isLoading:a,label:Object(u.__)("Zip check","woocommerce-payments")},Object(v.createElement)(z,{checked:w})))))},ic=function(e){var t=function(e){return Object(I.useSelect)(function(t){var c=t(T),a=c.getCharge,n=c.getChargeError,r=c.isResolving;return{charge:a(e),chargeError:n(e),isLoading:r("getCharge",[e])}},[e])}(e.query.id),c=t.charge,a=t.isLoading,n=t.chargeError;return!a&&n instanceof Error?Object(v.createElement)(O,{maxWidth:1032,className:"wcpay-payment-details"},Object(v.createElement)(p.Card,null,Object(v.createElement)("div",null,Object(u.__)("Payment details not loaded","woocommerce-payments")))):Object(v.createElement)(O,{maxWidth:1032,className:"wcpay-payment-details"},Object(v.createElement)(ac,{charge:c,isLoading:a}),Object(v.createElement)(nc,{charge:c}),!1,Object(v.createElement)(lc,{charge:c,isLoading:a}),!1)},mc=c(18),hc=c.n(mc),uc=c(19),dc=c.n(uc),vc={warning_needs_response:{type:"primary",message:Object(u.__)("Inquiry: Needs response","woocommerce-payments")},warning_under_review:{type:"light",message:Object(u.__)("Inquiry: Under review","woocommerce-payments")},warning_closed:{type:"light",message:Object(u.__)("Inquiry: Closed","woocommerce-payments")},needs_response:{type:"primary",message:Object(u.__)("Needs response","woocommerce-payments")},under_review:{type:"light",message:Object(u.__)("Under review","woocommerce-payments")},charge_refunded:{type:"light",message:Object(u.__)("Charge refunded","woocommerce-payments")},won:{type:"light",message:Object(u.__)("Won","woocommerce-payments")},lost:{type:"light",message:Object(u.__)("Lost","woocommerce-payments")}},pc=function(e){var t=e.status,c=vc[t]||{},a=c.message||je(t),n=c.type||"light";return Object(v.createElement)(Gt.a,{message:a,type:n,isCompact:!0})},fc={bank_cannot_process:{display:Object(u.__)("Bank cannot process","woocommerce-payments")},check_returned:{display:Object(u.__)("Check returned","woocommerce-payments")},credit_not_processed:{display:Object(u.__)("Credit not processed","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments")],required:[Object(u.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments")],respond:[Object(u.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),Object(u.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments")]},customer_initiated:{display:Object(u.__)("Customer initiated","woocommerce-payments")},debit_not_authorized:{display:Object(u.__)("Debit not authorized","woocommerce-payments")},duplicate:{display:Object(u.__)("Duplicate","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments")],required:[Object(u.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments")],respond:[Object(u.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),Object(u.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),Object(u.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),Object(u.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments")]},fraudulent:{display:Object(u.__)("Fraudulent","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting fraudulent payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make a fraudulent purchase. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments")],required:[Object(u.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments")],respond:[Object(u.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),Object(u.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(u.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments")]},general:{display:Object(u.__)("General","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments")],summary:[Object(u.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments")]},incorrect_account_details:{display:Object(u.__)("Incorrect account details","woocommerce-payments")},insufficient_funds:{display:Object(u.__)("Insufficient funds","woocommerce-payments")},product_not_received:{display:Object(u.__)("Product not received","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments")],required:[Object(u.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments")],respond:[Object(u.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),Object(u.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments")]},product_unacceptable:{display:Object(u.__)("Product unacceptable","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments")],required:[Object(u.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments")],respond:[Object(u.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),Object(u.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),Object(u.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),Object(u.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),Object(u.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments")]},subscription_canceled:{display:Object(u.__)("Subscription canceled","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments")],required:[Object(u.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")],respond:[Object(u.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),Object(u.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(u.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")]},unrecognized:{display:Object(u.__)("Unrecognized","woocommerce-payments"),overview:[Object(u.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(u.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(u.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments")],required:[Object(u.__)("As with fraudulent disputes, get your customer to withdraw the dispute by helping them identify the payment. Otherwise challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments")],respond:[Object(u.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(u.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments")]}},gc=new M.a,wc=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"amount",label:Object(u.__)("Amount","woocommerce-payments"),required:!0},{key:"status",label:Object(u.__)("Status","woocommerce-payments"),required:!0},{key:"reason",label:Object(u.__)("Reason","woocommerce-payments"),required:!0},{key:"source",label:Object(u.__)("Source","woocommerce-payments"),required:!0},{key:"order",label:Object(u.__)("Order #","woocommerce-payments"),required:!0},{key:"customer",label:Object(u.__)("Customer","woocommerce-payments")},{key:"email",label:Object(u.__)("Email","woocommerce-payments"),visible:!1},{key:"country",label:Object(u.__)("Country","woocommerce-payments"),visible:!1},{key:"created",label:Object(u.__)("Disputed on","woocommerce-payments"),required:!0},{key:"dueBy",label:Object(u.__)("Respond by","woocommerce-payments"),required:!0}],bc=function(e){var t=e.disputes,c=e.showPlaceholder,a=(t.data||[]).map(function(e){var t=e.order?{value:e.order.number,display:Object(v.createElement)(vt,{order:e.order})}:null,c=function(t){return Object(v.createElement)(it,{href:Je(e.id,"disputes")},t)},a=Object(v.createElement)(Ke,{id:e.id,parentSegment:"disputes"}),n=fc[e.reason],r=n?n.display:je(e.reason),o=e.charge||{},s=((o.payment_method_details||{}).card||{}).brand,l=o.billing_details||{},i={amount:{value:e.amount/100,display:c(gc.formatCurrency(e.amount/100))},status:{value:e.status,display:c(Object(v.createElement)(pc,{status:e.status}))},reason:{value:e.reason,display:c(r)},source:{value:s,display:c(Object(v.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(s)}))},created:{value:1e3*e.created,display:c(Object(j.dateI18n)("M j, Y",N()(1e3*e.created)))},dueBy:{value:1e3*e.evidence_details.due_by,display:c(Object(j.dateI18n)("M j, Y / g:iA",N()(1e3*e.evidence_details.due_by)))},order:t,customer:{value:l.name,display:c(l.name)},email:{value:l.email,display:c(l.email)},country:{value:(l.address||{}).country,display:c((l.address||{}).country)},details:{value:e.id,display:a}};return wc.map(function(e){var t=e.key;return i[t]||{display:null}})});return Object(v.createElement)(O,null,Object(v.createElement)(p.TableCard,{title:Object(u.__)("Disputes","woocommerce-payments"),isLoading:c,rowsPerPage:10,totalRows:10,headers:wc,rows:a}))},yc=function(){var e=Object(v.useState)([]),t=xt()(e,2),c=t[0],a=t[1],n=Object(v.useState)(!1),r=xt()(n,2),o=r[0],s=r[1],l=function(){var e=hc()(oe.a.mark(function e(){return oe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.t0=a,e.next=5,dc()({path:"/wc/v3/payments/disputes"});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,s(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();return Object(v.useEffect)(function(){l()},[]),Object(v.createElement)(bc,{disputes:c,showPlaceholder:o})},zc=(c(60),function(e){var t=e.children;return Object(v.createElement)("div",{className:"woocommerce-card__footer"},t)}),_c=function(e){var t=e.id,c=e.needsResponse,a=e.isSubmitted,n=e.onAccept;if(!c&&!a)return null;var r=Object(se.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes/challenge",id:t}),o=Object(u.__)("Are you sure you'd like to accept this dispute? This action can not be undone.","woocommerce-payments");return Object(v.createElement)(zc,null,Object(v.createElement)(p.Link,{href:r,className:"components-button is-button is-primary is-large"},c?Object(u.__)("Challenge dispute","woocommerce-payments"):Object(u.__)("View submitted evidence","woocommerce-payments")),c&&Object(v.createElement)(z,{isDefault:!0,isLarge:!0,onClick:function(){return window.confirm(o)&&n()}},Object(u.__)("Accept dispute","woocommerce-payments")))},Ec=c(29),Oc=c.n(Ec),kc=(c(61),new M.a),Hc=[{key:"created",label:Object(u.__)("Dispute date","woocommerce-payments")},{key:"amount",label:Object(u.__)("Disputed amount","woocommerce-payments")},{key:"dueBy",label:Object(u.__)("Respond by","woocommerce-payments")},{key:"reason",label:Object(u.__)("Reason","woocommerce-payments")},{key:"order",label:Object(u.__)("Order","woocommerce-payments")},{key:"customer",label:Object(u.__)("Customer","woocommerce-payments")},{key:"transactionId",label:Object(u.__)("Transaction ID","woocommerce-payments")}],Vc=function(e){var t="object"===Oc()(e.charge)?e.charge.id:e.charge;return Object(v.createElement)(p.Link,{href:Je(t,"transactions")},t)},Mc=function(e){var t=fc[e.reason];return t?t.display:je(e.reason)},jc=function(e){var t=e.dispute,c=e.isLoading,a=c?{created:"Created date",amount:"Amount",dueBy:"Due by date",reason:"Dispute reason",order:"Order link",customer:"Customer name",transactionId:"Transaction link"}:{created:Object(j.dateI18n)("M j, Y",N()(1e3*t.created)),amount:"".concat(kc.formatCurrency(t.amount/100)," ").concat(t.currency.toUpperCase()),dueBy:Object(j.dateI18n)("M j, Y - g:iA",N()(1e3*t.evidence_details.due_by)),reason:Mc(t),order:t.order?Object(v.createElement)(vt,{order:t.order}):null,customer:"object"===Oc()(t.charge)?t.charge.billing_details.name:null,transactionId:Vc(t)};return Object(v.createElement)("div",{className:"wcpay-dispute-info"},Hc.map(function(e){var t=e.key,n=e.label;return null==a[t]?null:Object(v.createElement)("div",{key:t,className:"wcpay-dispute-info-item"},Object(v.createElement)($e,{isLoading:c,display:"inline"},Object(v.createElement)("span",{className:"wcpay-dispute-info-key"},"".concat(n,": ")),Object(v.createElement)("span",{className:"wcpay-dispute-info-value"},a[t])))}))},xc=function(e){var t=e.children;return(void 0===t?[]:t).map(function(e,t){return Object(v.createElement)("p",{key:t},e)})},Cc=(c(33),function(e){var t=e.isLoading,c=e.dispute,a=void 0===c?{}:c,n=e.onAccept,r=!t&&a.id,o=r&&Object(v.createElement)(_c,{id:a.id,needsResponse:"needs_response"===a.status||"warning_needs_response"===a.status,isSubmitted:a.evidence_details&&a.evidence_details.submission_count>0,onAccept:n}),s=fc[a.reason]||{};return t||r?Object(v.createElement)(O,{isNarrow:!0,className:"wcpay-dispute-details"},Object(v.createElement)(p.Card,{title:Object(v.createElement)($e,{isLoading:t,value:Object(u.__)("Dispute overview","woocommerce-payments")})},Object(v.createElement)(jc,{dispute:a,isLoading:t}),Object(v.createElement)(Ge,{isLoading:t,numLines:4},Object(v.createElement)(xc,null,s.overview)),Object(v.createElement)(Ge,{isLoading:t,numLines:6},o)),Object(v.createElement)(p.Card,{title:Object(v.createElement)($e,{isLoading:t,value:s.display?Object(u.sprintf)(Object(u.__)("Dispute: %s","woocommerce-payments"),s.display):Object(u.__)("Dispute type","woocommerce-payments")})},Object(v.createElement)(Ge,{isLoading:t,numLines:4},Object(v.createElement)(xc,null,s.summary)),Object(v.createElement)(Ge,{isLoading:t,numLines:6},s.required&&Object(v.createElement)("h3",null," ",Object(u.__)("Required to overturn dispute","woocommerce-payments")," "),Object(v.createElement)(xc,null,s.required)),Object(v.createElement)(Ge,{isLoading:t,numLines:6},s.respond&&Object(v.createElement)("h3",null,Object(u.__)("How to respond","woocommerce-payments")),Object(v.createElement)(xc,null,s.respond),o))):Object(v.createElement)(O,{isNarrow:!0,className:"wcpay-dispute-details"},Object(v.createElement)(p.Card,null,Object(v.createElement)("div",null,Object(u.__)("Dispute not loaded","woocommerce-payments"))))}),Lc=function(e){var t=e.query,c="/wc/v3/payments/disputes/".concat(t.id),a=Object(v.useState)(),n=xt()(a,2),r=n[0],o=n[1],s=Object(v.useState)(!0),l=xt()(s,2),i=l[0],m=l[1],h=Object(I.useDispatch)("core/notices"),d=h.createSuccessNotice,p=h.createErrorNotice,f=function(){var e=hc()(oe.a.mark(function e(){return oe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,dc()({path:c});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,m(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();Object(v.useEffect)(function(){f()},[]);var g=function(){var e=hc()(oe.a.mark(function e(){return oe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,dc()({path:"".concat(c,"/close"),method:"post"});case 5:e.t1=e.sent,(0,e.t0)(e.t1),t=void 0,t=r.order?Object(u.sprintf)(Object(u.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),r.order.number):Object(u.__)("You have accepted the dispute.","woocommerce-payments"),d(t),Object(rt.getHistory)().push(Object(se.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes"})),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(1),p(Object(u.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments"));case 13:return e.prev=13,m(!1),e.finish(13);case 16:case"end":return e.stop()}var t},e,null,[[1,10,13,16]])}));return function(){return e.apply(this,arguments)}}();return Object(v.createElement)(Cc,{isLoading:i,dispute:r,onAccept:g})};function Nc(){return(Nc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var c=arguments[t];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a])}return e}).apply(this,arguments)}var Sc=c(16);var Tc=function(e){var t=e.as;return function(e){var t=e.as,c=void 0===t?"div":t,a=w(e,["as"]);return"function"==typeof a.children?a.children(a):Object(v.createElement)(c,a)}(g({as:void 0===t?"div":t,className:"components-visually-hidden"},w(e,["as"])))};function Bc(e){var t=e.id,c=e.label,a=e.hideLabelFromVision,n=e.help,r=e.className,o=e.children;return Object(v.createElement)("div",{className:y()("components-base-control",r)},Object(v.createElement)("div",{className:"components-base-control__field"},c&&t&&(a?Object(v.createElement)(Tc,{as:"label",htmlFor:t},c):Object(v.createElement)("label",{className:"components-base-control__label",htmlFor:t},c)),c&&!t&&(a?Object(v.createElement)(Tc,{as:"label"},c):Object(v.createElement)(Bc.VisualLabel,null,c)),o),!!n&&Object(v.createElement)("p",{id:t+"__help",className:"components-base-control__help"},n))}Bc.VisualLabel=function(e){var t=e.className,c=e.children;return t=y()("components-base-control__label",t),Object(v.createElement)("span",{className:t},c)};var Rc=Bc;var Ic=Object(Sc.withInstanceId)(function(e){var t=e.label,c=e.hideLabelFromVision,a=e.value,n=e.help,r=e.className,o=e.instanceId,s=e.onChange,l=e.type,i=void 0===l?"text":l,m=w(e,["label","hideLabelFromVision","value","help","className","instanceId","onChange","type"]),h="inspector-text-control-".concat(o);return Object(v.createElement)(Rc,{label:t,hideLabelFromVision:c,id:h,help:n,className:r},Object(v.createElement)("input",Nc({className:"components-text-control__input",type:i,id:h,value:a,onChange:function(e){return s(e.target.value)},"aria-describedby":n?h+"__help":void 0},m)))});var Dc=Object(Sc.withInstanceId)(function(e){var t=e.label,c=e.hideLabelFromVision,a=e.value,n=e.help,r=e.instanceId,o=e.onChange,s=e.rows,l=void 0===s?4:s,i=e.className,m=w(e,["label","hideLabelFromVision","value","help","instanceId","onChange","rows","className"]),h="inspector-textarea-control-".concat(r);return Object(v.createElement)(Rc,{label:t,hideLabelFromVision:c,id:h,help:n,className:i},Object(v.createElement)("textarea",Nc({className:"components-textarea-control__input",id:h,rows:l,onChange:function(e){return o(e.target.value)},"aria-describedby":n?h+"__help":void 0,value:a},m)))});function Ac(e){return function(e){if(Array.isArray(e)){for(var t=0,c=new Array(e.length);t<e.length;t++)c[t]=e[t];return c}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Pc=Object(Sc.withInstanceId)(function(e){var t=e.help,c=e.instanceId,a=e.label,n=e.multiple,r=void 0!==n&&n,o=e.onChange,s=e.options,l=void 0===s?[]:s,i=e.className,m=e.hideLabelFromVision,h=w(e,["help","instanceId","label","multiple","onChange","options","className","hideLabelFromVision"]),u="inspector-select-control-".concat(c);return!Object(F.isEmpty)(l)&&Object(v.createElement)(Rc,{label:a,hideLabelFromVision:m,id:u,help:t,className:i},Object(v.createElement)("select",Nc({id:u,className:"components-select-control__input",onChange:function(e){if(r){var t=Ac(e.target.options).filter(function(e){return e.selected}).map(function(e){return e.value});o(t)}else o(e.target.value)},"aria-describedby":t?"".concat(u,"__help"):void 0,multiple:r},h),l.map(function(e,t){return Object(v.createElement)("option",{key:"".concat(e.label,"-").concat(e.value,"-").concat(t),value:e.value,disabled:e.disabled},e.label)})))}),Fc=[{key:"general",title:Object(u.__)("General evidence","woocommerce-payments"),description:Object(u.__)("Provide general evidence about the customer and the order.","woocommerce-payments"),fields:[{key:"product_description",label:Object(u.__)("Product description","woocommerce-payments"),type:"textarea",description:Object(u.__)("A description of the product or service and any relevant details on how this was presented to the customer at the time of purchase.","woocommerce-payments")},{key:"customer_name",label:Object(u.__)("Customer name","woocommerce-payments"),type:"text"},{key:"customer_email_address",label:Object(u.__)("Customer email","woocommerce-payments"),type:"text"},{key:"customer_signature",label:Object(u.__)("Customer signature","woocommerce-payments"),type:"file",description:Object(u.__)("A relevant document or contract showing the customer's signature (if available).","woocommerce-payments")},{key:"billing_address",label:Object(u.__)("Customer billing address","woocommerce-payments"),type:"textarea"},{key:"customer_purchase_ip",label:Object(u.__)("Customer IP address","woocommerce-payments"),type:"text"},{key:"receipt",label:Object(u.__)("Receipt","woocommerce-payments"),type:"file",description:Object(u.__)("Any receipt or message sent to the customer notifying them of the charge. This field will be automatically filled with a Stripe generated email receipt if any such receipt was sent.","woocommerce-payments")},{key:"customer_communication",label:Object(u.__)("Customer communication","woocommerce-payments"),type:"file",description:Object(u.__)("Any communication with the customer that you feel is relevant to your case (e.g. emails proving that they received the product or service, or demonstrating their use of or satisfaction with the product or service).","woocommerce-payments")}]},{key:"refund_policy_info",title:Object(u.__)("Refund policy info","woocommerce-payments"),fields:[{key:"refund_policy",label:Object(u.__)("Refund policy","woocommerce-payments"),type:"file",description:Object(u.__)("Your refund policy, as shown or provided to the customer.","woocommerce-payments")},{key:"refund_policy_disclosure",label:Object(u.__)("Refund policy disclosure","woocommerce-payments"),type:"textarea",description:Object(u.__)("An explanation of how and when the customer was shown or provided your refund policy prior to purchase.","woocommerce-payments")},{key:"refund_refusal_explanation",label:Object(u.__)("Refund refusal explanation","woocommerce-payments"),type:"textarea",description:Object(u.__)("Your explanation for why the customer is not entitled to a refund.","woocommerce-payments")}],reason:"credit_not_processed"},{key:"duplicate_charge_info",title:Object(u.__)("Duplicate charge info","woocommerce-payments"),fields:[{key:"duplicate_charge_id",label:Object(u.__)("Duplicate charge ID","woocommerce-payments"),type:"text",description:Object(u.__)("The charge ID for the previous payment that appears to be a duplicate of the one that is disputed.","woocommerce-payments")},{key:"duplicate_charge_explanation",label:Object(u.__)("Explanation of duplicate charge","woocommerce-payments"),type:"textarea",description:Object(u.__)("An explanation of the difference between the disputed payment and the prior one that appears to be a duplicate.","woocommerce-payments")},{key:"duplicate_charge_documentation",label:Object(u.__)("Duplicate charge documentation","woocommerce-payments"),type:"file",description:Object(u.__)("Upload documentation for the prior payment that can uniquely identify it, such as a separate receipt. This document should be paired with a similar document from the disputed payment that proves the two are separate. This should also include a separate shipping label or receipt for the other payment. If multiple products were shipped together, provide a packing list that shows each purchase.","woocommerce-payments")},{key:"shipping_documentation",label:Object(u.__)("Shipping documentation","woocommerce-payments"),type:"file",description:Object(u.__)("A shipping label or receipt for the disputed payment.","woocommerce-payments"),denormalized:!0,productType:"physical_product"},{key:"service_documentation",label:Object(u.__)("Service documentation","woocommerce-payments"),type:"file",description:Object(u.__)("A copy of a service agreement or documentation for the disputed payment.","woocommerce-payments"),denormalized:!0,productType:"offline_service"}],reason:"duplicate"},{key:"shipping_information",title:Object(u.__)("Shipping information","woocommerce-payments"),fields:[{key:"shipping_carrier",label:Object(u.__)("Shipping carrier","woocommerce-payments"),type:"text",description:Object(u.__)("The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.","woocommerce-payments")},{key:"shipping_tracking_number",label:Object(u.__)("Tracking number","woocommerce-payments"),type:"text",description:Object(u.__)("The tracking number (if available) for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. When we compile your evidence into a single document, these tracking numbers will be expanded to include detailed delivery information from the carrier.","woocommerce-payments")},{key:"shipping_documentation",label:Object(u.__)("Proof of shipping","woocommerce-payments"),type:"file",description:Object(u.__)("Provide documentation as proof that a product was shipped to the cardholder at the same address the cardholder provided to you. This could include a copy of the shipment receipt or label, and show the full shipping address of the cardholder, if possible.","woocommerce-payments")},{key:"shipping_date",label:Object(u.__)("Date of shipment","woocommerce-payments"),type:"text",description:Object(u.__)("The date on which a physical product began its route to the shipping address. This date should be prior to the date of the dispute.","woocommerce-payments")},{key:"shipping_address",label:Object(u.__)("Shipping address","woocommerce-payments"),type:"textarea",description:Object(u.__)("The address to which a physical product was shipped. The shipping address must match a billing address verified with AVS. (A signature is not required as evidence of delivery).","woocommerce-payments")}],reason:["fraudulent","product_not_received","product_unacceptable","unrecognized"],productType:"physical_product"},{key:"cancellation_policy_info",title:Object(u.__)("Cancellation policy info","woocommerce-payments"),fields:[{key:"cancellation_policy",label:Object(u.__)("Cancellation policy","woocommerce-payments"),type:"file",description:Object(u.__)("Your subscription cancellation policy, as shown to the customer.","woocommerce-payments")},{key:"cancellation_policy_disclosure",label:Object(u.__)("Cancellation policy disclosure","woocommerce-payments"),type:"textarea",description:Object(u.__)("An explanation of how and when the customer was shown your cancellation policy prior to purchase.","woocommerce-payments")},{key:"cancellation_rebuttal",label:Object(u.__)("Cancellation rebuttal","woocommerce-payments"),type:"textarea",description:Object(u.__)("A justification for why the customer's subscription was not canceled.","woocommerce-payments")}],reason:"subscription_canceled"},{key:"download_and_activity_logs",title:Object(u.__)("Download and activity logs","woocommerce-payments"),fields:[{key:"access_activity_log",type:"file",description:[Object(u.__)("Provide at least two of the following pieces of information:","woocommerce-payments"),Object(u.__)("• Customer's IP address and their device's geographical location at the time of purchase","woocommerce-payments"),Object(u.__)("• Device ID and name of the device","woocommerce-payments"),Object(u.__)("• Customer name and email address linked to their customer profile","woocommerce-payments"),Object(u.__)("• Evidence that the customer logged into their account for your business before the transaction date","woocommerce-payments"),Object(u.__)("• Evidence that your website or app was accessed by the cardholder for purchase or services on or after the transaction date","woocommerce-payments"),Object(u.__)("• Evidence that the same device and card used in the disputed payment was used in a previous payment that was not disputed","woocommerce-payments")]}],reason:["fraudulent","product_not_received"],productType:"digital_product_or_service"},{key:"download_and_activity_logs",title:Object(u.__)("Download and activity logs","woocommerce-payments"),fields:[{key:"access_activity_log",type:"file",description:Object(u.__)("Any server or activity logs showing proof that the cardholder accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.","woocommerce-payments")}],reason:["product_unacceptable","subscription_canceled","unrecognized"],productType:"digital_product_or_service",denormalized:!0},{key:"service_details",title:Object(u.__)("Service details","woocommerce-payments"),fields:[{key:"service_date",label:Object(u.__)("Service date","woocommerce-payments"),type:"text",description:Object(u.__)("The date on which the cardholder received or began receiving the purchased service.","woocommerce-payments")},{key:"service_documentation",label:Object(u.__)("Proof of service","woocommerce-payments"),type:"file",description:Object(u.__)("Documentation showing proof that a service was provided to the cardholder. This could include a copy of a signed contract, work order, or other form of written agreement.","woocommerce-payments")}],reason:["fraudulent","product_not_received","product_unacceptable","subscription_canceled","unrecognized"],productType:"offline_service"},{key:"uncategorized",title:Object(u.__)("Additional details","woocommerce-payments"),description:Object(u.__)("Provide any extra evidence or statements you'd like the bank to see, either as text or by uploading a document.","woocommerce-payments"),fields:[{key:"uncategorized_text",label:Object(u.__)("Additional details","woocommerce-payments"),type:"textarea"},{key:"uncategorized_file",type:"file"}]}];function qc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uc(e,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Wc(e,t,c){return t&&Uc(e.prototype,t),c&&Uc(e,c),e}function Yc(e){return(Yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zc(e){return(Zc="function"==typeof Symbol&&"symbol"===Yc(Symbol.iterator)?function(e){return Yc(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Yc(e)})(e)}function Qc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gc(e,t){return!t||"object"!==Zc(t)&&"function"!=typeof t?Qc(e):t}function $c(e){return($c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jc(e,t){return(Jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jc(e,t)}function Xc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var c=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(c.push(o.value),!t||c.length!==t);a=!0);}catch(e){n=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return c}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ea=c(25),ta=c(27),ca=c(35),aa=c.n(ca),na=10,ra=function(){return"rtl"===document.documentElement.dir};function oa(e,t){var c=Xc((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top").split(" "),2),a=c[0],n=c[1],r=void 0===n?"center":n,o=function(e,t,c){var a,n=t.height,r=e.top+e.height/2,o={popoverTop:r,contentHeight:(r-n/2>0?n/2:r)+(r+n/2>window.innerHeight?window.innerHeight-r:n/2)},s={popoverTop:e.top,contentHeight:e.top-na-n>0?n:e.top-na},l={popoverTop:e.bottom,contentHeight:e.bottom+na+n>window.innerHeight?window.innerHeight-na-e.bottom:n},i=null;if("middle"===c&&o.contentHeight===n)a="middle";else if("top"===c&&s.contentHeight===n)a="top";else if("bottom"===c&&l.contentHeight===n)a="bottom";else{var m="top"==(a=s.contentHeight>l.contentHeight?"top":"bottom")?s.contentHeight:l.contentHeight;i=m!==n?m:null}return{yAxis:a,popoverTop:"middle"===a?o.popoverTop:"top"===a?s.popoverTop:l.popoverTop,contentHeight:i}}(e,t,a);return g({},function(e,t,c,a){var n=t.width;"left"===c&&ra()?c="right":"right"===c&&ra()&&(c="left");var r,o=Math.round(e.left+e.width/2),s={popoverLeft:o,contentWidth:(o-n/2>0?n/2:o)+(o+n/2>window.innerWidth?window.innerWidth-o:n/2)},l="middle"===a?e.left:o,i={popoverLeft:l,contentWidth:l-n>0?n:l},m="middle"===a?e.right:o,h={popoverLeft:m,contentWidth:m+n>window.innerWidth?window.innerWidth-m:n},u=null;if("center"===c&&s.contentWidth===n)r="center";else if("left"===c&&i.contentWidth===n)r="left";else if("right"===c&&h.contentWidth===n)r="right";else{var d="left"==(r=i.contentWidth>h.contentWidth?"left":"right")?i.contentWidth:h.contentWidth;u=d!==n?d:null}return{xAxis:r,popoverLeft:"center"===r?s.popoverLeft:"left"===r?i.popoverLeft:h.popoverLeft,contentWidth:u}}(e,t,r,o.yAxis),o)}var sa=Object(v.createContext)({focusHistory:[]}),la=sa.Provider,ia=sa.Consumer;la.displayName="FocusReturnProvider",ia.displayName="FocusReturnConsumer";var ma=Object(Sc.createHigherOrderComponent)(function e(t){if((a=t)instanceof v.Component||"function"==typeof a){var c=t;return e({})(c)}var a,n=t.onFocusReturn,r=void 0===n?F.stubTrue:n;return function(e){var t=function(t){function c(){var e;return qc(this,c),(e=Gc(this,$c(c).apply(this,arguments))).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Kc(c,v.Component),Wc(c,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,c=this.ownFocusedElements;if(t&&!1!==r())for(var a,n=[].concat(Ac(F.without.apply(void 0,[this.props.focus.focusHistory].concat(Ac(c)))),[e]);a=n.pop();)if(document.body.contains(a))return void a.focus()}},{key:"render",value:function(){return Object(v.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(v.createElement)(e,this.props.childProps))}}]),c}();return function(e){return Object(v.createElement)(ia,null,function(c){return Object(v.createElement)(t,{childProps:e,focus:c})})}}},"withFocusReturn"),ha=Object(Sc.createHigherOrderComponent)(function(e){return function(t){function c(){var e;return qc(this,c),(e=Gc(this,$c(c).apply(this,arguments))).focusContainRef=Object(v.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Qc(e)),e}return Kc(c,v["Component"]),Wc(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===ta.TAB){var t=ea.focus.tabbable.find(this.focusContainRef.current);if(t.length){var c=t[0],a=t[t.length-1];e.shiftKey&&e.target===c?(e.preventDefault(),a.focus()):(e.shiftKey||e.target!==a)&&t.includes(e.target)||(e.preventDefault(),c.focus())}}}},{key:"render",value:function(){return Object(v.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(v.createElement)(e,this.props))}}]),c}()},"withConstrainedTabbing"),ua=["button","submit"];var da=Object(Sc.createHigherOrderComponent)(function(e){return function(t){function c(){var e;return qc(this,c),(e=Gc(this,$c(c).apply(this,arguments))).bindNode=e.bindNode.bind(Qc(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Qc(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Qc(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Qc(e)),e}return Kc(c,v["Component"]),Wc(c,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout(function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()},0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,c=e.target;Object(F.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(F.includes)(ua,e.type)}return!1}(c)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(v.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(v.createElement)(e,Nc({ref:this.bindNode},this.props)))}}]),c}()},"withFocusOutside")(function(e){function t(){return qc(this,t),Gc(this,$c(t).apply(this,arguments))}return Kc(t,v["Component"]),Wc(t,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),t}());var va=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,c=void 0===t?document:t,a=e.className,n=void 0===a?"lockscroll":a,r=0,o=0;function s(e){var t=c.scrollingElement||c.body;e&&(o=t.scrollTop);var a=e?"add":"remove";t.classList[a](n),c.documentElement.classList[a](n),e||(t.scrollTop=o)}return function(e){function t(){return qc(this,t),Gc(this,$c(t).apply(this,arguments))}return Kc(t,v.Component),Wc(t,[{key:"componentDidMount",value:function(){0===r&&s(!0),++r}},{key:"componentWillUnmount",value:function(){1===r&&s(!1),--r}},{key:"render",value:function(){return null}}]),t}()}();function pa(e){e.stopPropagation()}var fa=Object(v.forwardRef)(function(e,t){var c=e.children,a=w(e,["children"]);return Object(v.createElement)("div",Nc({},a,{ref:t,onMouseDown:pa}),c)}),ga=Object(v.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),wa=(ga.Provider,ga.Consumer),ba=function(e){var t=Object(v.useContext)(ga),c=t.getSlot,a=t.subscribe,n=Xc(Object(v.useState)(c(e)),2),r=n[0],o=n[1];return Object(v.useEffect)(function(){return o(c(e)),a(function(){o(c(e))})},[e]),r},ya=0;function za(e){var t=e.name,c=e.children,a=e.registerFill,n=e.unregisterFill,r=ba(t),o=Object(v.useRef)({name:t,children:c});return o.current.occurrence||(o.current.occurrence=++ya),Object(v.useLayoutEffect)(function(){return a(t,o.current),function(){return n(t,o.current)}},[]),Object(v.useLayoutEffect)(function(){o.current.children=c,r&&!r.props.bubblesVirtually&&r.forceUpdate()},[c]),Object(v.useLayoutEffect)(function(){t!==o.current.name&&(n(o.current.name,o.current),o.current.name=t,a(t,o.current))},[t]),r&&r.node&&r.props.bubblesVirtually?(Object(F.isFunction)(c)&&(c=c(r.props.fillProps)),Object(v.createPortal)(c,r.node)):null}var _a=function(e){return Object(v.createElement)(wa,null,function(t){var c=t.registerFill,a=t.unregisterFill;return Object(v.createElement)(za,Nc({},e,{registerFill:c,unregisterFill:a}))})},Ea=function(e){function t(){var e;return qc(this,t),(e=Gc(this,$c(t).apply(this,arguments))).bindNode=e.bindNode.bind(Qc(e)),e}return Kc(t,v["Component"]),Wc(t,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){(0,this.props.unregisterSlot)(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,c=t.name,a=t.unregisterSlot,n=t.registerSlot;e.name!==c&&(a(e.name),n(c,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"render",value:function(){var e=this.props,t=e.children,c=e.name,a=e.bubblesVirtually,n=void 0!==a&&a,r=e.fillProps,o=void 0===r?{}:r,s=e.getFills,l=e.className;if(n)return Object(v.createElement)("div",{ref:this.bindNode,className:l});var i=Object(F.map)(s(c,this),function(e){var t=e.occurrence,c=Object(F.isFunction)(e.children)?e.children(o):e.children;return v.Children.map(c,function(e,c){if(!e||Object(F.isString)(e))return e;var a="".concat(t,"---").concat(e.key||c);return Object(v.cloneElement)(e,{key:a})})}).filter(Object(F.negate)(v.isEmptyElement));return Object(v.createElement)(v.Fragment,null,Object(F.isFunction)(t)?t(i):i)}}]),t}(),Oa=function(e){return Object(v.createElement)(wa,null,function(t){var c=t.registerSlot,a=t.unregisterSlot,n=t.getFills;return Object(v.createElement)(Ea,Nc({},e,{registerSlot:c,unregisterSlot:a,getFills:n}))})};var ka=function(e){var t=e.type,c=e.options,a=void 0===c?{}:c,n=e.children;if("appear"===t){var r,o=a.origin,s=Xc((void 0===o?"top":o).split(" "),2),l=s[0],i=s[1],m=void 0===i?"center":i;return n({className:y()("components-animate__appear",(r={},f(r,"is-from-"+m,"center"!==m),f(r,"is-from-"+l,"middle"!==l),r))})}if("slide-in"===t){var h=a.origin,u=void 0===h?"left":h;return n({className:y()("components-animate__slide-in","is-from-"+u)})}return n("loading"===t?{className:y()("components-animate__loading")}:{})},Ha=ha(ma(function(e){return e.children}));function Va(e,t){var c=window.getComputedStyle(t),a=c.paddingTop,n=c.paddingBottom,r=c.paddingLeft,o=c.paddingRight,s=a?parseInt(a,10):0,l=n?parseInt(n,10):0,i=r?parseInt(r,10):0,m=o?parseInt(o,10):0;return{x:e.left+i,y:e.top+s,width:e.width-i-m,height:e.height-s-l,left:e.left+i,right:e.right-m,top:e.top+s,bottom:e.bottom-l}}function Ma(e,t,c){c?e.getAttribute(t)!==c&&e.setAttribute(t,c):e.hasAttribute(t)&&e.removeAttribute(t)}function ja(e,t){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==c&&(e.style[t]=c)}function xa(e,t,c){c?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Ca=function(e){var t=e.headerTitle,c=e.onClose,a=e.onKeyDown,n=e.children,r=e.className,o=e.noArrow,s=void 0!==o&&o,l=e.position,i=void 0===l?"top":l,m=(e.range,e.focusOnMount),h=void 0===m?"firstElement":m,u=e.anchorRef,d=e.shouldAnchorIncludePadding,p=e.anchorVerticalBuffer,f=e.anchorHorizontalBuffer,g=e.anchorRect,b=e.getAnchorRect,z=e.expandOnMobile,_=e.animate,E=void 0===_||_,O=e.onClickOutside,k=e.onFocusOutside,H=w(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),V=Object(v.useRef)(null),M=Object(v.useRef)(null),j=Object(v.useRef)(),x=Object(v.useRef)(),C=Object(Sc.useViewportMatch)("medium","<"),L=Xc(Object(v.useState)(),2),N=L[0],S=L[1],T=z&&C;s=T||s,Object(v.useEffect)(function(){var e=j.current,t=M.current;if(T)return xa(e,"is-without-arrow",s),Ma(e,"data-x-axis"),Ma(e,"data-y-axis"),ja(e,"top"),ja(e,"left"),ja(t,"maxHeight"),void ja(t,"maxWidth");var c=function(){var c=function(e,t,c){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;if(t)return t;if(c){if(!e.current)return;return c(e.current)}if(!1!==a){if(!a)return;if(a instanceof window.Range)return Object(ea.getRectangleFromRange)(a);var r=a.getBoundingClientRect();return n?r:Va(r,a)}if(e.current){var o=e.current.parentNode,s=o.getBoundingClientRect();return n?s:Va(s,o)}}(V,g,b,u,d);if(c){c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{x:e.left-c,y:e.top-t,width:e.width+2*c,height:e.height+2*t,left:e.left-c,right:e.right+c,top:e.top-t,bottom:e.bottom+t}}(c,p,f),x.current||(x.current=t.getBoundingClientRect());var a=oa(c,x.current,i),n=a.popoverTop,r=a.popoverLeft,o=a.xAxis,l=a.yAxis,m=a.contentHeight,h=a.contentWidth;xa(e,"is-without-arrow",s||"center"===o&&"middle"===l),Ma(e,"data-x-axis",o),Ma(e,"data-y-axis",l),ja(e,"top","number"==typeof n?n+"px":""),ja(e,"left","number"==typeof r?r+"px":""),ja(t,"maxHeight","number"==typeof m?m+"px":""),ja(t,"maxWidth","number"==typeof h?h+"px":""),S(({left:"right",right:"left"}[o]||"center")+" "+({top:"bottom",bottom:"top"}[l]||"middle"))}},a=window.setTimeout(c),n=window.setInterval(c,500);return window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),function(){window.clearTimeout(a),window.clearInterval(n),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[T,g,b,u,d,p,f,i]),function(e,t){Object(v.useEffect)(function(){var c=setTimeout(function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var c=ea.focus.tabbable.find(t.current)[0];c?c.focus():t.current.focus()}},0);return function(){return clearTimeout(c)}},[])}(h,M);var B=function(e){e.keyCode===ta.ESCAPE&&c&&(e.stopPropagation(),c()),a&&a(e)};var R=Object(v.createElement)(da,{onFocusOutside:function(e){if(k)k(e);else if(O){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),aa()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),O(t)}else c&&c()}},Object(v.createElement)(ka,{type:E&&N?"appear":null,options:{origin:N}},function(e){var a=e.className;return Object(v.createElement)(fa,Nc({className:y()("components-popover",r,a,{"is-expanded":T,"is-without-arrow":s})},H,{onKeyDown:B,ref:j}),T&&Object(v.createElement)("div",{className:"components-popover__header"},Object(v.createElement)("span",{className:"components-popover__header-title"},t),Object(v.createElement)(Aa,{className:"components-popover__close",icon:"no-alt",onClick:c})),Object(v.createElement)("div",{ref:M,className:"components-popover__content",tabIndex:"-1"},n))}));return h&&(R=Object(v.createElement)(Ha,null,R)),Object(v.createElement)(wa,null,function(e){var t=e.getSlot;return t&&t("Popover")&&(R=Object(v.createElement)(_a,{name:"Popover"},R)),Object(v.createElement)("span",{ref:V},R,C&&z&&Object(v.createElement)(va,null))})};Ca.Slot=function(){return Object(v.createElement)(Oa,{bubblesVirtually:!0,name:"Popover"})};var La=Ca;var Na=function(e){var t,c,a=e.shortcut,n=e.className;return a?(Object(F.isString)(a)&&(t=a),Object(F.isObject)(a)&&(t=a.display,c=a.ariaLabel),Object(v.createElement)("span",{className:n,"aria-label":c},t)):null},Sa=700,Ta=function(e){function t(){var e;return qc(this,t),(e=Gc(this,$c(t).apply(this,arguments))).delayedSetIsOver=Object(F.debounce)(function(t){return e.setState({isOver:t})},Sa),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Kc(t,v["Component"]),Wc(t,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var c=this.props.children;if(1===v.Children.count(c)){var a=v.Children.only(c);"function"==typeof a.props[e]&&a.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var c=this;return function(a){if(c.emitToChild(e,a),!(a.currentTarget.disabled||"focus"===a.type&&c.isInMouseDown)){c.delayedSetIsOver.cancel();var n=Object(F.includes)(["focus","mouseenter"],a.type);n!==c.state.isOver&&(t?c.delayedSetIsOver(n):c.setState({isOver:n}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(c){t.emitToChild(e?"onMouseDown":"onMouseUp",c),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,c=e.position,a=e.text,n=e.shortcut;if(1!==v.Children.count(t))return t;var r=v.Children.only(t),o=this.state.isOver;return Object(v.cloneElement)(r,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(v.concatChildren)(r.props.children,o&&Object(v.createElement)(La,{focusOnMount:!1,position:c,className:"components-tooltip","aria-hidden":"true",animate:!1},a,Object(v.createElement)(Na,{className:"components-tooltip__shortcut",shortcut:n})))})}}]),t}(),Ba=function(e){return Object(v.createElement)("path",e)},Ra=function(e){var t=g({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(v.createElement)("svg",Object(F.omit)(t,"__unstableActive"))},Ia=function(e){function t(){return qc(this,t),Gc(this,$c(t).apply(this,arguments))}return Kc(t,v["Component"]),Wc(t,[{key:"render",value:function(){var e,t=this.props,c=t.icon,a=t.size,n=void 0===a?20:a,r=t.className,o=w(t,["icon","size","className"]);switch(c){case"admin-appearance":e="M14.48 11.06L7.41 3.99l1.5-1.5c.5-.56 2.3-.47 3.51.32 1.21.8 1.43 1.28 2.91 2.1 1.18.64 2.45 1.26 4.45.85zm-.71.71L6.7 4.7 4.93 6.47c-.39.39-.39 1.02 0 1.41l1.06 1.06c.39.39.39 1.03 0 1.42-.6.6-1.43 1.11-2.21 1.69-.35.26-.7.53-1.01.84C1.43 14.23.4 16.08 1.4 17.07c.99 1 2.84-.03 4.18-1.36.31-.31.58-.66.85-1.02.57-.78 1.08-1.61 1.69-2.21.39-.39 1.02-.39 1.41 0l1.06 1.06c.39.39 1.02.39 1.41 0z";break;case"admin-collapse":e="M10 2.16c4.33 0 7.84 3.51 7.84 7.84s-3.51 7.84-7.84 7.84S2.16 14.33 2.16 10 5.71 2.16 10 2.16zm2 11.72V6.12L6.18 9.97z";break;case"admin-comments":e="M5 2h9c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2z";break;case"admin-customizer":e="M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z";break;case"admin-generic":e="M18 12h-2.18c-.17.7-.44 1.35-.81 1.93l1.54 1.54-2.1 2.1-1.54-1.54c-.58.36-1.23.63-1.91.79V19H8v-2.18c-.68-.16-1.33-.43-1.91-.79l-1.54 1.54-2.12-2.12 1.54-1.54c-.36-.58-.63-1.23-.79-1.91H1V9.03h2.17c.16-.7.44-1.35.8-1.94L2.43 5.55l2.1-2.1 1.54 1.54c.58-.37 1.24-.64 1.93-.81V2h3v2.18c.68.16 1.33.43 1.91.79l1.54-1.54 2.12 2.12-1.54 1.54c.36.59.64 1.24.8 1.94H18V12zm-8.5 1.5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z";break;case"admin-home":e="M16 8.5l1.53 1.53-1.06 1.06L10 4.62l-6.47 6.47-1.06-1.06L10 2.5l4 4v-2h2v4zm-6-2.46l6 5.99V18H4v-5.97zM12 17v-5H8v5h4z";break;case"admin-links":e="M17.74 2.76c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-1.12 1.12-2.7 1.47-4.14 1.09l2.62-2.61.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-3.38 3.38c-.37-1.44-.02-3.02 1.1-4.14l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM8.59 13.43l5.34-5.34c.42-.42.42-1.1 0-1.52-.44-.43-1.13-.39-1.53 0l-5.33 5.34c-.42.42-.42 1.1 0 1.52.44.43 1.13.39 1.52 0zm-.76 2.29l4.14-4.15c.38 1.44.03 3.02-1.09 4.14l-1.52 1.53c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.53-1.52c1.12-1.12 2.7-1.47 4.14-1.1l-4.14 4.15c-.85.84-.85 2.2 0 3.05.84.84 2.2.84 3.04 0z";break;case"admin-media":e="M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z";break;case"admin-multisite":e="M14.27 6.87L10 3.14 5.73 6.87 5 6.14l5-4.38 5 4.38zM14 8.42l-4.05 3.43L6 8.38v-.74l4-3.5 4 3.5v.78zM11 9.7V8H9v1.7h2zm-1.73 4.03L5 10 .73 13.73 0 13l5-4.38L10 13zm10 0L15 10l-4.27 3.73L10 13l5-4.38L20 13zM5 11l4 3.5V18H1v-3.5zm10 0l4 3.5V18h-8v-3.5zm-9 6v-2H4v2h2zm10 0v-2h-2v2h2z";break;case"admin-network":e="M16.95 2.58c1.96 1.95 1.96 5.12 0 7.07-1.51 1.51-3.75 1.84-5.59 1.01l-1.87 3.31-2.99.31L5 18H2l-1-2 7.95-7.69c-.92-1.87-.62-4.18.93-5.73 1.95-1.96 5.12-1.96 7.07 0zm-2.51 3.79c.74 0 1.33-.6 1.33-1.34 0-.73-.59-1.33-1.33-1.33-.73 0-1.33.6-1.33 1.33 0 .74.6 1.34 1.33 1.34z";break;case"admin-page":e="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z";break;case"admin-plugins":e="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z";break;case"admin-post":e="M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z";break;case"admin-settings":e="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z";break;case"admin-site-alt":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm7.5 6.48c-.274.896-.908 1.64-1.75 2.05-.45-1.69-1.658-3.074-3.27-3.75.13-.444.41-.83.79-1.09-.43-.28-1-.42-1.34.07-.53.69 0 1.61.21 2v.14c-.555-.337-.99-.84-1.24-1.44-.966-.03-1.922.208-2.76.69-.087-.565-.032-1.142.16-1.68.733.07 1.453-.23 1.92-.8.46-.52-.13-1.18-.59-1.58h.36c1.36-.01 2.702.335 3.89 1 1.36 1.005 2.194 2.57 2.27 4.26.24 0 .7-.55.91-.92.172.34.32.69.44 1.05zM9 16.84c-2.05-2.08.25-3.75-1-5.24-.92-.85-2.29-.26-3.11-1.23-.282-1.473.267-2.982 1.43-3.93.52-.44 4-1 5.42.22.83.715 1.415 1.674 1.67 2.74.46.035.918-.066 1.32-.29.41 2.98-3.15 6.74-5.73 7.73zM5.15 2.09c.786-.3 1.676-.028 2.16.66-.42.38-.94.63-1.5.72.02-.294.085-.584.19-.86l-.85-.52z";break;case"admin-site-alt2":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm2.92 12.34c0 .35.14.63.36.66.22.03.47-.22.58-.6l.2.08c.718.384 1.07 1.22.84 2-.15.69-.743 1.198-1.45 1.24-.49-1.21-2.11.06-3.56-.22-.612-.154-1.11-.6-1.33-1.19 1.19-.11 2.85-1.73 4.36-1.97zM8 11.27c.918 0 1.695-.68 1.82-1.59.44.54.41 1.324-.07 1.83-.255.223-.594.325-.93.28-.335-.047-.635-.236-.82-.52zm3-.76c.41.39 3-.06 3.52 1.09-.95-.2-2.95.61-3.47-1.08l-.05-.01zM9.73 5.45v.27c-.65-.77-1.33-1.07-1.61-.57-.28.5 1 1.11.76 1.88-.24.77-1.27.56-1.88 1.61-.61 1.05-.49 2.42 1.24 3.67-1.192-.132-2.19-.962-2.54-2.11-.4-1.2-.09-2.26-.78-2.46C4 7.46 3 8.71 3 9.8c-1.26-1.26.05-2.86-1.2-4.18C3.5 1.998 7.644.223 11.44 1.49c-1.1 1.02-1.722 2.458-1.71 3.96z";break;case"admin-site-alt3":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z";break;case"admin-site":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm3.46 11.95c0 1.47-.8 3.3-4.06 4.7.3-4.17-2.52-3.69-3.2-5 .126-1.1.804-2.063 1.8-2.55-1.552-.266-3-.96-4.18-2 .05.47.28.904.64 1.21-.782-.295-1.458-.817-1.94-1.5.977-3.225 3.883-5.482 7.25-5.63-.84 1.38-1.5 4.13 0 5.57C7.23 7 6.26 5 5.41 5.79c-1.13 1.06.33 2.51 3.42 3.08 3.29.59 3.66 1.58 3.63 3.08zm1.34-4c-.32-1.11.62-2.23 1.69-3.14 1.356 1.955 1.67 4.45.84 6.68-.77-1.89-2.17-2.32-2.53-3.57v.03z";break;case"admin-tools":e="M16.68 9.77c-1.34 1.34-3.3 1.67-4.95.99l-5.41 6.52c-.99.99-2.59.99-3.58 0s-.99-2.59 0-3.57l6.52-5.42c-.68-1.65-.35-3.61.99-4.95 1.28-1.28 3.12-1.62 4.72-1.06l-2.89 2.89 2.82 2.82 2.86-2.87c.53 1.58.18 3.39-1.08 4.65zM3.81 16.21c.4.39 1.04.39 1.43 0 .4-.4.4-1.04 0-1.43-.39-.4-1.03-.4-1.43 0-.39.39-.39 1.03 0 1.43z";break;case"admin-users":e="M10 9.25c-2.27 0-2.73-3.44-2.73-3.44C7 4.02 7.82 2 9.97 2c2.16 0 2.98 2.02 2.71 3.81 0 0-.41 3.44-2.68 3.44zm0 2.57L12.72 10c2.39 0 4.52 2.33 4.52 4.53v2.49s-3.65 1.13-7.24 1.13c-3.65 0-7.24-1.13-7.24-1.13v-2.49c0-2.25 1.94-4.48 4.47-4.48z";break;case"album":e="M0 18h10v-.26c1.52.4 3.17.35 4.76-.24 4.14-1.52 6.27-6.12 4.75-10.26-1.43-3.89-5.58-6-9.51-4.98V2H0v16zM9 3v14H1V3h8zm5.45 8.22c-.68 1.35-2.32 1.9-3.67 1.23-.31-.15-.57-.35-.78-.59V8.13c.8-.86 2.11-1.13 3.22-.58 1.35.68 1.9 2.32 1.23 3.67zm-2.75-.82c.22.16.53.12.7-.1.16-.22.12-.53-.1-.7s-.53-.12-.7.1c-.16.21-.12.53.1.7zm3.01 3.67c-1.17.78-2.56.99-3.83.69-.27-.06-.44-.34-.37-.61s.34-.43.62-.36l.17.04c.96.17 1.98-.01 2.86-.59.47-.32.86-.72 1.14-1.18.15-.23.45-.3.69-.16.23.15.3.46.16.69-.36.57-.84 1.08-1.44 1.48zm1.05 1.57c-1.48.99-3.21 1.32-4.84 1.06-.28-.05-.47-.32-.41-.6.05-.27.32-.45.61-.39l.22.04c1.31.15 2.68-.14 3.87-.94.71-.47 1.27-1.07 1.7-1.74.14-.24.45-.31.68-.16.24.14.31.45.16.69-.49.79-1.16 1.49-1.99 2.04z";break;case"align-center":e="M3 5h14V3H3v2zm12 8V7H5v6h10zM3 17h14v-2H3v2z";break;case"align-full-width":e="M17 13V3H3v10h14zM5 17h10v-2H5v2z";break;case"align-left":e="M3 5h14V3H3v2zm9 8V7H3v6h9zm2-4h3V7h-3v2zm0 4h3v-2h-3v2zM3 17h14v-2H3v2z";break;case"align-none":e="M3 5h14V3H3v2zm10 8V7H3v6h10zM3 17h14v-2H3v2z";break;case"align-pull-left":e="M9 16V4H3v12h6zm2-7h6V7h-6v2zm0 4h6v-2h-6v2z";break;case"align-pull-right":e="M17 16V4h-6v12h6zM9 7H3v2h6V7zm0 4H3v2h6v-2z";break;case"align-right":e="M3 5h14V3H3v2zm0 4h3V7H3v2zm14 4V7H8v6h9zM3 13h3v-2H3v2zm0 4h14v-2H3v2z";break;case"align-wide":e="M5 5h10V3H5v2zm12 8V7H3v6h14zM5 17h10v-2H5v2z";break;case"analytics":e="M18 18V2H2v16h16zM16 5H4V4h12v1zM7 7v3h3c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3zm1 2V7c1.1 0 2 .9 2 2H8zm8-1h-4V7h4v1zm0 3h-4V9h4v2zm0 2h-4v-1h4v1zm0 3H4v-1h12v1z";break;case"archive":e="M19 4v2H1V4h18zM2 7h16v10H2V7zm11 3V9H7v1h6z";break;case"arrow-down-alt":e="M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4V2z";break;case"arrow-down-alt2":e="M5 6l5 5 5-5 2 1-7 7-7-7z";break;case"arrow-down":e="M15 8l-4.03 6L7 8h8z";break;case"arrow-left-alt":e="M18 9v2H6l4 4-1 2-7-7 7-7 1 2-4 4h12z";break;case"arrow-left-alt2":e="M14 5l-5 5 5 5-1 2-7-7 7-7z";break;case"arrow-left":e="M13 14L7 9.97 13 6v8z";break;case"arrow-right-alt":e="M2 11V9h12l-4-4 1-2 7 7-7 7-1-2 4-4H2z";break;case"arrow-right-alt2":e="M6 15l5-5-5-5 1-2 7 7-7 7z";break;case"arrow-right":e="M8 6l6 4.03L8 14V6z";break;case"arrow-up-alt":e="M11 18H9V6l-4 4-2-1 7-7 7 7-2 1-4-4v12z";break;case"arrow-up-alt2":e="M15 14l-5-5-5 5-2-1 7-7 7 7z";break;case"arrow-up":e="M7 13l4.03-6L15 13H7z";break;case"art":e="M8.55 3.06c1.01.34-1.95 2.01-.1 3.13 1.04.63 3.31-2.22 4.45-2.86.97-.54 2.67-.65 3.53 1.23 1.09 2.38.14 8.57-3.79 11.06-3.97 2.5-8.97 1.23-10.7-2.66-2.01-4.53 3.12-11.09 6.61-9.9zm1.21 6.45c.73 1.64 4.7-.5 3.79-2.8-.59-1.49-4.48 1.25-3.79 2.8z";break;case"awards":e="M4.46 5.16L5 7.46l-.54 2.29 2.01 1.24L7.7 13l2.3-.54 2.3.54 1.23-2.01 2.01-1.24L15 7.46l.54-2.3-2-1.24-1.24-2.01-2.3.55-2.29-.54-1.25 2zm5.55 6.34C7.79 11.5 6 9.71 6 7.49c0-2.2 1.79-3.99 4.01-3.99 2.2 0 3.99 1.79 3.99 3.99 0 2.22-1.79 4.01-3.99 4.01zm-.02-1C8.33 10.5 7 9.16 7 7.5c0-1.65 1.33-3 2.99-3S13 5.85 13 7.5c0 1.66-1.35 3-3.01 3zm3.84 1.1l-1.28 2.24-2.08-.47L13 19.2l1.4-2.2h2.5zm-7.7.07l1.25 2.25 2.13-.51L7 19.2 5.6 17H3.1z";break;case"backup":e="M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z";break;case"block-default":e="M15 6V4h-3v2H8V4H5v2H4c-.6 0-1 .4-1 1v8h14V7c0-.6-.4-1-1-1h-1z";break;case"book-alt":e="M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z";break;case"book":e="M16 3h2v16H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h9v14H5c-.55 0-1 .45-1 1s.45 1 1 1h11V3z";break;case"buddicons-activity":e="M8 1v7h2V6c0-1.52 1.45-3 3-3v.86c.55-.52 1.26-.86 2-.86v3h1c1.1 0 2 .9 2 2s-.9 2-2 2h-1v6c0 .55-.45 1-1 1s-1-.45-1-1v-2.18c-.31.11-.65.18-1 .18v2c0 .55-.45 1-1 1s-1-.45-1-1v-2H8v2c0 .55-.45 1-1 1s-1-.45-1-1v-2c-.35 0-.69-.07-1-.18V16c0 .55-.45 1-1 1s-1-.45-1-1v-4H2v-1c0-1.66 1.34-3 3-3h2V1h1zm5 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z";break;case"buddicons-bbpress-logo":e="M8.5 12.6c.3-1.3 0-2.3-1.1-2.3-.8 0-1.6.6-1.8 1.5l-.3 1.7c-.3 1 .3 1.5 1 1.5 1.2 0 1.9-1.1 2.2-2.4zm-4-6.4C3.7 7.3 3.3 8.6 3.3 10c0 1 .2 1.9.6 2.8l1-4.6c.3-1.7.4-2-.4-2zm9.3 6.4c.3-1.3 0-2.3-1.1-2.3-.8 0-1.6.6-1.8 1.5l-.4 1.7c-.2 1.1.4 1.6 1.1 1.6 1.1-.1 1.9-1.2 2.2-2.5zM10 3.3c-2 0-3.9.9-5.1 2.3.6-.1 1.4-.2 1.8-.3.2 0 .2.1.2.2 0 .2-1 4.8-1 4.8.5-.3 1.2-.7 1.8-.7.9 0 1.5.4 1.9.9l.5-2.4c.4-1.6.4-1.9-.4-1.9-.4 0-.4-.5 0-.6.6-.1 1.8-.2 2.3-.3.2 0 .2.1.2.2l-1 4.8c.5-.4 1.2-.7 1.9-.7 1.7 0 2.5 1.3 2.1 3-.3 1.7-2 3-3.8 3-1.3 0-2.1-.7-2.3-1.4-.7.8-1.7 1.3-2.8 1.4 1.1.7 2.4 1.1 3.7 1.1 3.7 0 6.7-3 6.7-6.7s-3-6.7-6.7-6.7zM10 2c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 15.5c-2.1 0-4-.8-5.3-2.2-.3-.4-.7-.8-1-1.2-.7-1.2-1.2-2.6-1.2-4.1 0-4.1 3.4-7.5 7.5-7.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5z";break;case"buddicons-buddypress-logo":e="M10 0c5.52 0 10 4.48 10 10s-4.48 10-10 10S0 15.52 0 10 4.48 0 10 0zm0 .5C4.75.5.5 4.75.5 10s4.25 9.5 9.5 9.5 9.5-4.25 9.5-9.5S15.25.5 10 .5zm0 1c4.7 0 8.5 3.8 8.5 8.5s-3.8 8.5-8.5 8.5-8.5-3.8-8.5-8.5S5.3 1.5 10 1.5zm1.8 1.71c-.57 0-1.1.17-1.55.45 1.56.37 2.73 1.77 2.73 3.45 0 .69-.21 1.33-.55 1.87 1.31-.29 2.29-1.45 2.29-2.85 0-1.61-1.31-2.92-2.92-2.92zm-2.38 1c-1.61 0-2.92 1.31-2.92 2.93 0 1.61 1.31 2.92 2.92 2.92 1.62 0 2.93-1.31 2.93-2.92 0-1.62-1.31-2.93-2.93-2.93zm4.25 5.01l-.51.59c2.34.69 2.45 3.61 2.45 3.61h1.28c0-4.71-3.22-4.2-3.22-4.2zm-2.1.8l-2.12 2.09-2.12-2.09C3.12 10.24 3.89 15 3.89 15h11.08c.47-4.98-3.4-4.98-3.4-4.98z";break;case"buddicons-community":e="M9 3c0-.67-.47-1.43-1-2-.5.5-1 1.38-1 2 0 .48.45 1 1 1s1-.47 1-1zm4 0c0-.67-.47-1.43-1-2-.5.5-1 1.38-1 2 0 .48.45 1 1 1s1-.47 1-1zM9 9V5.5c0-.55-.45-1-1-1-.57 0-1 .49-1 1V9c0 .55.45 1 1 1 .57 0 1-.49 1-1zm4 0V5.5c0-.55-.45-1-1-1-.57 0-1 .49-1 1V9c0 .55.45 1 1 1 .57 0 1-.49 1-1zm4 1c0-1.48-1.41-2.77-3.5-3.46V9c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5V6.01c-.17 0-.33-.01-.5-.01s-.33.01-.5.01V9c0 .83-.67 1.5-1.5 1.5S6.5 9.83 6.5 9V6.54C4.41 7.23 3 8.52 3 10c0 1.41.95 2.65 3.21 3.37 1.11.35 2.39 1.12 3.79 1.12s2.69-.78 3.79-1.13C16.04 12.65 17 11.41 17 10zm-7 5.43c1.43 0 2.74-.79 3.88-1.11 1.9-.53 2.49-1.34 3.12-2.32v3c0 2.21-3.13 4-7 4s-7-1.79-7-4v-3c.64.99 1.32 1.8 3.15 2.33 1.13.33 2.44 1.1 3.85 1.1z";break;case"buddicons-forums":e="M13.5 7h-7C5.67 7 5 6.33 5 5.5S5.67 4 6.5 4h1.59C8.04 3.84 8 3.68 8 3.5 8 2.67 8.67 2 9.5 2h1c.83 0 1.5.67 1.5 1.5 0 .18-.04.34-.09.5h1.59c.83 0 1.5.67 1.5 1.5S14.33 7 13.5 7zM4 8h12c.55 0 1 .45 1 1s-.45 1-1 1H4c-.55 0-1-.45-1-1s.45-1 1-1zm1 3h10c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1s.45-1 1-1zm2 3h6c.55 0 1 .45 1 1s-.45 1-1 1h-1.09c.05.16.09.32.09.5 0 .83-.67 1.5-1.5 1.5h-1c-.83 0-1.5-.67-1.5-1.5 0-.18.04-.34.09-.5H7c-.55 0-1-.45-1-1s.45-1 1-1z";break;case"buddicons-friends":e="M8.75 5.77C8.75 4.39 7 2 7 2S5.25 4.39 5.25 5.77 5.9 7.5 7 7.5s1.75-.35 1.75-1.73zm6 0C14.75 4.39 13 2 13 2s-1.75 2.39-1.75 3.77S11.9 7.5 13 7.5s1.75-.35 1.75-1.73zM9 17V9c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm6 0V9c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-9-6l2-1v2l-2 1v-2zm6 0l2-1v2l-2 1v-2zm-6 3l2-1v2l-2 1v-2zm6 0l2-1v2l-2 1v-2z";break;case"buddicons-groups":e="M15.45 6.25c1.83.94 1.98 3.18.7 4.98-.8 1.12-2.33 1.88-3.46 1.78L10.05 18H9l-2.65-4.99c-1.13.16-2.73-.63-3.55-1.79-1.28-1.8-1.13-4.04.71-4.97.48-.24.96-.33 1.43-.31-.01.4.01.8.07 1.21.26 1.69 1.41 3.53 2.86 4.37-.19.55-.49.99-.88 1.25L9 16.58v-5.66C7.64 10.55 6.26 8.76 6 7c-.4-2.65 1-5 3.5-5s3.9 2.35 3.5 5c-.26 1.76-1.64 3.55-3 3.92v5.77l2.07-3.84c-.44-.23-.77-.71-.99-1.3 1.48-.83 2.65-2.69 2.91-4.4.06-.41.08-.82.07-1.22.46-.01.92.08 1.39.32z";break;case"buddicons-pm":e="M10 2c3 0 8 5 8 5v11H2V7s5-5 8-5zm7 14.72l-3.73-2.92L17 11l-.43-.37-2.26 1.3.24-4.31-8.77-.52-.46 4.54-1.99-.95L3 11l3.73 2.8-3.44 2.85.4.43L10 13l6.53 4.15z";break;case"buddicons-replies":e="M17.54 10.29c1.17 1.17 1.17 3.08 0 4.25-1.18 1.17-3.08 1.17-4.25 0l-.34-.52c0 3.66-2 4.38-2.95 4.98-.82-.6-2.95-1.28-2.95-4.98l-.34.52c-1.17 1.17-3.07 1.17-4.25 0-1.17-1.17-1.17-3.08 0-4.25 0 0 1.02-.67 2.1-1.3C3.71 7.84 3.2 6.42 3.2 4.88c0-.34.03-.67.08-1C3.53 5.66 4.47 7.22 5.8 8.3c.67-.35 1.85-.83 2.37-.92H8c-1.1 0-2-.9-2-2s.9-2 2-2v-.5c0-.28.22-.5.5-.5s.5.22.5.5v.5h2v-.5c0-.28.22-.5.5-.5s.5.22.5.5v.5c1.1 0 2 .9 2 2s-.9 2-2 2h-.17c.51.09 1.78.61 2.38.92 1.33-1.08 2.27-2.64 2.52-4.42.05.33.08.66.08 1 0 1.54-.51 2.96-1.36 4.11 1.08.63 2.09 1.3 2.09 1.3zM8.5 6.38c.5 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm3-2c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-2.3 5.73c-.12.11-.19.26-.19.43.02.25.23.46.49.46h1c.26 0 .47-.21.49-.46 0-.15-.07-.29-.19-.43-.08-.06-.18-.11-.3-.11h-1c-.12 0-.22.05-.3.11zM12 12.5c0-.12-.06-.28-.19-.38-.09-.07-.19-.12-.31-.12h-3c-.12 0-.22.05-.31.12-.11.1-.19.25-.19.38 0 .28.22.5.5.5h3c.28 0 .5-.22.5-.5zM8.5 15h3c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-3c-.28 0-.5.22-.5.5s.22.5.5.5zm1 2h1c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-1c-.28 0-.5.22-.5.5s.22.5.5.5z";break;case"buddicons-topics":e="M10.44 1.66c-.59-.58-1.54-.58-2.12 0L2.66 7.32c-.58.58-.58 1.53 0 2.12.6.6 1.56.56 2.12 0l5.66-5.66c.58-.58.59-1.53 0-2.12zm2.83 2.83c-.59-.59-1.54-.59-2.12 0l-5.66 5.66c-.59.58-.59 1.53 0 2.12.6.6 1.56.55 2.12 0l5.66-5.66c.58-.58.58-1.53 0-2.12zm1.06 6.72l4.18 4.18c.59.58.59 1.53 0 2.12s-1.54.59-2.12 0l-4.18-4.18-1.77 1.77c-.59.58-1.54.58-2.12 0-.59-.59-.59-1.54 0-2.13l5.66-5.65c.58-.59 1.53-.59 2.12 0 .58.58.58 1.53 0 2.12zM5 15c0-1.59-1.66-4-1.66-4S2 13.78 2 15s.6 2 1.34 2h.32C4.4 17 5 16.59 5 15z";break;case"buddicons-tracking":e="M10.98 6.78L15.5 15c-1 2-3.5 3-5.5 3s-4.5-1-5.5-3L9 6.82c-.75-1.23-2.28-1.98-4.29-2.03l2.46-2.92c1.68 1.19 2.46 2.32 2.97 3.31.56-.87 1.2-1.68 2.7-2.12l1.83 2.86c-1.42-.34-2.64.08-3.69.86zM8.17 10.4l-.93 1.69c.49.11 1 .16 1.54.16 1.35 0 2.58-.36 3.55-.95l-1.01-1.82c-.87.53-1.96.86-3.15.92zm.86 5.38c1.99 0 3.73-.74 4.74-1.86l-.98-1.76c-1 1.12-2.74 1.87-4.74 1.87-.62 0-1.21-.08-1.76-.21l-.63 1.15c.94.5 2.1.81 3.37.81z";break;case"building":e="M3 20h14V0H3v20zM7 3H5V1h2v2zm4 0H9V1h2v2zm4 0h-2V1h2v2zM7 6H5V4h2v2zm4 0H9V4h2v2zm4 0h-2V4h2v2zM7 9H5V7h2v2zm4 0H9V7h2v2zm4 0h-2V7h2v2zm-8 3H5v-2h2v2zm4 0H9v-2h2v2zm4 0h-2v-2h2v2zm-4 7H5v-6h6v6zm4-4h-2v-2h2v2zm0 3h-2v-2h2v2z";break;case"businessman":e="M7.3 6l-.03-.19c-.04-.37-.05-.73-.03-1.08.02-.36.1-.71.25-1.04.14-.32.31-.61.52-.86s.49-.46.83-.6c.34-.15.72-.23 1.13-.23.69 0 1.26.2 1.71.59s.76.87.91 1.44.18 1.16.09 1.78l-.03.19c-.01.09-.05.25-.11.48-.05.24-.12.47-.2.69-.08.21-.19.45-.34.72-.14.27-.3.49-.47.69-.18.19-.4.34-.67.48-.27.13-.55.19-.86.19s-.59-.06-.87-.19c-.26-.13-.49-.29-.67-.5-.18-.2-.34-.42-.49-.66-.15-.25-.26-.49-.34-.73-.09-.25-.16-.47-.21-.67-.06-.21-.1-.37-.12-.5zm9.2 6.24c.41.7.5 1.41.5 2.14v2.49c0 .03-.12.08-.29.13-.18.04-.42.13-.97.27-.55.12-1.1.24-1.65.34s-1.19.19-1.95.27c-.75.08-1.46.12-2.13.12-.68 0-1.39-.04-2.14-.12-.75-.07-1.4-.17-1.98-.27-.58-.11-1.08-.23-1.56-.34-.49-.11-.8-.21-1.06-.29L3 16.87v-2.49c0-.75.07-1.46.46-2.15s.81-1.25 1.5-1.68C5.66 10.12 7.19 10 8 10l1.67 1.67L9 13v3l1.02 1.08L11 16v-3l-.68-1.33L11.97 10c.77 0 2.2.07 2.9.52.71.45 1.21 1.02 1.63 1.72z";break;case"button":e="M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z";break;case"calendar-alt":e="M15 4h3v15H2V4h3V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1h4V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1zM6 3v2.5c0 .14.05.26.15.36.09.09.21.14.35.14s.26-.05.35-.14c.1-.1.15-.22.15-.36V3c0-.14-.05-.26-.15-.35-.09-.1-.21-.15-.35-.15s-.26.05-.35.15c-.1.09-.15.21-.15.35zm7 0v2.5c0 .14.05.26.14.36.1.09.22.14.36.14s.26-.05.36-.14c.09-.1.14-.22.14-.36V3c0-.14-.05-.26-.14-.35-.1-.1-.22-.15-.36-.15s-.26.05-.36.15c-.09.09-.14.21-.14.35zm4 15V8H3v10h14zM7 9v2H5V9h2zm2 0h2v2H9V9zm4 2V9h2v2h-2zm-6 1v2H5v-2h2zm2 0h2v2H9v-2zm4 2v-2h2v2h-2zm-6 1v2H5v-2h2zm4 2H9v-2h2v2zm4 0h-2v-2h2v2z";break;case"calendar":e="M15 4h3v14H2V4h3V3c0-.83.67-1.5 1.5-1.5S8 2.17 8 3v1h4V3c0-.83.67-1.5 1.5-1.5S15 2.17 15 3v1zM6 3v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5S6 2.72 6 3zm7 0v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5s-.5.22-.5.5zm4 14V8H3v9h14zM7 16V9H5v7h2zm4 0V9H9v7h2zm4 0V9h-2v7h2z";break;case"camera":e="M6 5V3H3v2h3zm12 10V4H9L7 6H2v9h16zm-7-8c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z";break;case"carrot":e="M2 18.43c1.51 1.36 11.64-4.67 13.14-7.21.72-1.22-.13-3.01-1.52-4.44C15.2 5.73 16.59 9 17.91 8.31c.6-.32.99-1.31.7-1.92-.52-1.08-2.25-1.08-3.42-1.21.83-.2 2.82-1.05 2.86-2.25.04-.92-1.13-1.97-2.05-1.86-1.21.14-1.65 1.88-2.06 3-.05-.71-.2-2.27-.98-2.95-1.04-.91-2.29-.05-2.32 1.05-.04 1.33 2.82 2.07 1.92 3.67C11.04 4.67 9.25 4.03 8.1 4.7c-.49.31-1.05.91-1.63 1.69.89.94 2.12 2.07 3.09 2.72.2.14.26.42.11.62-.14.21-.42.26-.62.12-.99-.67-2.2-1.78-3.1-2.71-.45.67-.91 1.43-1.34 2.23.85.86 1.93 1.83 2.79 2.41.2.14.25.42.11.62-.14.21-.42.26-.63.12-.85-.58-1.86-1.48-2.71-2.32C2.4 13.69 1.1 17.63 2 18.43z";break;case"cart":e="M6 13h9c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1V4H2c-.55 0-1-.45-1-1s.45-1 1-1h3c.55 0 1 .45 1 1v2h13l-4 7H6v1zm-.5 3c.83 0 1.5.67 1.5 1.5S6.33 19 5.5 19 4 18.33 4 17.5 4.67 16 5.5 16zm9 0c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z";break;case"category":e="M5 7h13v10H2V4h7l2 2H4v9h1V7z";break;case"chart-area":e="M18 18l.01-12.28c.59-.35.99-.99.99-1.72 0-1.1-.9-2-2-2s-2 .9-2 2c0 .8.47 1.48 1.14 1.8l-4.13 6.58c-.33-.24-.73-.38-1.16-.38-.84 0-1.55.51-1.85 1.24l-2.14-1.53c.09-.22.14-.46.14-.71 0-1.11-.89-2-2-2-1.1 0-2 .89-2 2 0 .73.4 1.36.98 1.71L1 18h17zM17 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM5 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5.85 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z";break;case"chart-bar":e="M18 18V2h-4v16h4zm-6 0V7H8v11h4zm-6 0v-8H2v8h4z";break;case"chart-line":e="M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z";break;case"chart-pie":e="M10 10V3c3.87 0 7 3.13 7 7h-7zM9 4v7h7c0 3.87-3.13 7-7 7s-7-3.13-7-7 3.13-7 7-7z";break;case"clipboard":e="M11.9.39l1.4 1.4c1.61.19 3.5-.74 4.61.37s.18 3 .37 4.61l1.4 1.4c.39.39.39 1.02 0 1.41l-9.19 9.2c-.4.39-1.03.39-1.42 0L1.29 11c-.39-.39-.39-1.02 0-1.42l9.2-9.19c.39-.39 1.02-.39 1.41 0zm.58 2.25l-.58.58 4.95 4.95.58-.58c-.19-.6-.2-1.22-.15-1.82.02-.31.05-.62.09-.92.12-1 .18-1.63-.17-1.98s-.98-.29-1.98-.17c-.3.04-.61.07-.92.09-.6.05-1.22.04-1.82-.15zm4.02.93c.39.39.39 1.03 0 1.42s-1.03.39-1.42 0-.39-1.03 0-1.42 1.03-.39 1.42 0zm-6.72.36l-.71.7L15.44 11l.7-.71zM8.36 5.34l-.7.71 6.36 6.36.71-.7zM6.95 6.76l-.71.7 6.37 6.37.7-.71zM5.54 8.17l-.71.71 6.36 6.36.71-.71zM4.12 9.58l-.71.71 6.37 6.37.71-.71z";break;case"clock":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 14c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm-.71-5.29c.07.05.14.1.23.15l-.02.02L14 13l-3.03-3.19L10 5l-.97 4.81h.01c0 .02-.01.05-.02.09S9 9.97 9 10c0 .28.1.52.29.71z";break;case"cloud-saved":e="M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16h10c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5zm-6.3 5.9l-3.2-3.2 1.4-1.4 1.8 1.8 3.8-3.8 1.4 1.4-5.2 5.2z";break;case"cloud-upload":e="M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z";break;case"cloud":e="M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z";break;case"columns":e="M3 15h6V5H3v10zm8 0h6V5h-6v10z";break;case"controls-back":e="M2 10l10-6v3.6L18 4v12l-6-3.6V16z";break;case"controls-forward":e="M18 10L8 16v-3.6L2 16V4l6 3.6V4z";break;case"controls-pause":e="M5 16V4h3v12H5zm7-12h3v12h-3V4z";break;case"controls-play":e="M5 4l10 6-10 6V4z";break;case"controls-repeat":e="M5 7v3l-2 1.5V5h11V3l4 3.01L14 9V7H5zm10 6v-3l2-1.5V15H6v2l-4-3.01L6 11v2h9z";break;case"controls-skipback":e="M11.98 7.63l6-3.6v12l-6-3.6v3.6l-8-4.8v4.8h-2v-12h2v4.8l8-4.8v3.6z";break;case"controls-skipforward":e="M8 12.4L2 16V4l6 3.6V4l8 4.8V4h2v12h-2v-4.8L8 16v-3.6z";break;case"controls-volumeoff":e="M2 7h4l5-4v14l-5-4H2V7z";break;case"controls-volumeon":e="M2 7h4l5-4v14l-5-4H2V7zm12.69-2.46C14.82 4.59 18 5.92 18 10s-3.18 5.41-3.31 5.46c-.06.03-.13.04-.19.04-.2 0-.39-.12-.46-.31-.11-.26.02-.55.27-.65.11-.05 2.69-1.15 2.69-4.54 0-3.41-2.66-4.53-2.69-4.54-.25-.1-.38-.39-.27-.65.1-.25.39-.38.65-.27zM16 10c0 2.57-2.23 3.43-2.32 3.47-.06.02-.12.03-.18.03-.2 0-.39-.12-.47-.32-.1-.26.04-.55.29-.65.07-.02 1.68-.67 1.68-2.53s-1.61-2.51-1.68-2.53c-.25-.1-.38-.39-.29-.65.1-.25.39-.39.65-.29.09.04 2.32.9 2.32 3.47z";break;case"cover-image":e="M2.2 1h15.5c.7 0 1.3.6 1.3 1.2v11.5c0 .7-.6 1.2-1.2 1.2H2.2c-.6.1-1.2-.5-1.2-1.1V2.2C1 1.6 1.6 1 2.2 1zM17 13V3H3v10h14zm-4-4s0-5 3-5v7c0 .6-.4 1-1 1H5c-.6 0-1-.4-1-1V7c2 0 3 4 3 4s1-4 3-4 3 2 3 2zM4 17h12v2H4z";break;case"dashboard":e="M3.76 16h12.48c1.1-1.37 1.76-3.11 1.76-5 0-4.42-3.58-8-8-8s-8 3.58-8 8c0 1.89.66 3.63 1.76 5zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 6c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5.37 5.55L12 7v6c0 1.1-.9 2-2 2s-2-.9-2-2c0-.57.24-1.08.63-1.45zM4 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm12 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5 3c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1z";break;case"desktop":e="M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z";break;case"dismiss":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm5 11l-3-3 3-3-2-2-3 3-3-3-2 2 3 3-3 3 2 2 3-3 3 3z";break;case"download":e="M14.01 4v6h2V2H4v8h2.01V4h8zm-2 2v6h3l-5 6-5-6h3V6h4z";break;case"edit":e="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z";break;case"editor-aligncenter":e="M14 5V3H6v2h8zm3 4V7H3v2h14zm-3 4v-2H6v2h8zm3 4v-2H3v2h14z";break;case"editor-alignleft":e="M12 5V3H3v2h9zm5 4V7H3v2h14zm-5 4v-2H3v2h9zm5 4v-2H3v2h14z";break;case"editor-alignright":e="M17 5V3H8v2h9zm0 4V7H3v2h14zm0 4v-2H8v2h9zm0 4v-2H3v2h14z";break;case"editor-bold":e="M6 4v13h4.54c1.37 0 2.46-.33 3.26-1 .8-.66 1.2-1.58 1.2-2.77 0-.84-.17-1.51-.51-2.01s-.9-.85-1.67-1.03v-.09c.57-.1 1.02-.4 1.36-.9s.51-1.13.51-1.91c0-1.14-.39-1.98-1.17-2.5C12.75 4.26 11.5 4 9.78 4H6zm2.57 5.15V6.26h1.36c.73 0 1.27.11 1.61.32.34.22.51.58.51 1.07 0 .54-.16.92-.47 1.15s-.82.35-1.51.35h-1.5zm0 2.19h1.6c1.44 0 2.16.53 2.16 1.61 0 .6-.17 1.05-.51 1.34s-.86.43-1.57.43H8.57v-3.38z";break;case"editor-break":e="M16 4h2v9H7v3l-5-4 5-4v3h9V4z";break;case"editor-code":e="M9 6l-4 4 4 4-1 2-6-6 6-6zm2 8l4-4-4-4 1-2 6 6-6 6z";break;case"editor-contract":e="M15.75 6.75L18 3v14l-2.25-3.75L17 12h-4v4l1.25-1.25L18 17H2l3.75-2.25L7 16v-4H3l1.25 1.25L2 17V3l2.25 3.75L3 8h4V4L5.75 5.25 2 3h16l-3.75 2.25L13 4v4h4z";break;case"editor-customchar":e="M10 5.4c1.27 0 2.24.36 2.91 1.08.66.71 1 1.76 1 3.13 0 1.28-.23 2.37-.69 3.27-.47.89-1.27 1.52-2.22 2.12v2h6v-2h-3.69c.92-.64 1.62-1.34 2.12-2.34.49-1.01.74-2.13.74-3.35 0-1.78-.55-3.19-1.65-4.22S11.92 3.54 10 3.54s-3.43.53-4.52 1.57c-1.1 1.04-1.65 2.44-1.65 4.2 0 1.21.24 2.31.73 3.33.48 1.01 1.19 1.71 2.1 2.36H3v2h6v-2c-.98-.64-1.8-1.28-2.24-2.17-.45-.89-.67-1.96-.67-3.22 0-1.37.33-2.41 1-3.13C7.75 5.76 8.72 5.4 10 5.4z";break;case"editor-expand":e="M7 8h6v4H7zm-5 5v4h4l-1.2-1.2L7 12l-3.8 2.2M14 17h4v-4l-1.2 1.2L13 12l2.2 3.8M14 3l1.3 1.3L13 8l3.8-2.2L18 7V3M6 3H2v4l1.2-1.2L7 8 4.7 4.3";break;case"editor-help":e="M17 10c0-3.87-3.14-7-7-7-3.87 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7zm-6.3 1.48H9.14v-.43c0-.38.08-.7.24-.98s.46-.57.88-.89c.41-.29.68-.53.81-.71.14-.18.2-.39.2-.62 0-.25-.09-.44-.28-.58-.19-.13-.45-.19-.79-.19-.58 0-1.25.19-2 .57l-.64-1.28c.87-.49 1.8-.74 2.77-.74.81 0 1.45.2 1.92.58.48.39.71.91.71 1.55 0 .43-.09.8-.29 1.11-.19.32-.57.67-1.11 1.06-.38.28-.61.49-.71.63-.1.15-.15.34-.15.57v.35zm-1.47 2.74c-.18-.17-.27-.42-.27-.73 0-.33.08-.58.26-.75s.43-.25.77-.25c.32 0 .57.09.75.26s.27.42.27.74c0 .3-.09.55-.27.72-.18.18-.43.27-.75.27-.33 0-.58-.09-.76-.26z";break;case"editor-indent":e="M3 5V3h9v2H3zm10-1V3h4v1h-4zm0 3h2V5l4 3.5-4 3.5v-2h-2V7zM3 8V6h9v2H3zm2 3V9h7v2H5zm-2 3v-2h9v2H3zm10 0v-1h4v1h-4zm-4 3v-2h3v2H9z";break;case"editor-insertmore":e="M17 7V3H3v4h14zM6 11V9H3v2h3zm6 0V9H8v2h4zm5 0V9h-3v2h3zm0 6v-4H3v4h14z";break;case"editor-italic":e="M14.78 6h-2.13l-2.8 9h2.12l-.62 2H4.6l.62-2h2.14l2.8-9H8.03l.62-2h6.75z";break;case"editor-justify":e="M2 3h16v2H2V3zm0 4h16v2H2V7zm0 4h16v2H2v-2zm0 4h16v2H2v-2z";break;case"editor-kitchensink":e="M19 2v6H1V2h18zm-1 5V3H2v4h16zM5 4v2H3V4h2zm3 0v2H6V4h2zm3 0v2H9V4h2zm3 0v2h-2V4h2zm3 0v2h-2V4h2zm2 5v9H1V9h18zm-1 8v-7H2v7h16zM5 11v2H3v-2h2zm3 0v2H6v-2h2zm3 0v2H9v-2h2zm6 0v2h-5v-2h5zm-6 3v2H3v-2h8zm3 0v2h-2v-2h2zm3 0v2h-2v-2h2z";break;case"editor-ltr":e="M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z";break;case"editor-ol-rtl":e="M15.025 8.75a1.048 1.048 0 0 1 .45-.1.507.507 0 0 1 .35.11.455.455 0 0 1 .13.36.803.803 0 0 1-.06.3 1.448 1.448 0 0 1-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76v-.7h-1.72v-.04l.51-.48a7.276 7.276 0 0 0 .7-.71 1.75 1.75 0 0 0 .3-.49 1.254 1.254 0 0 0 .1-.51.968.968 0 0 0-.16-.56 1.007 1.007 0 0 0-.44-.37 1.512 1.512 0 0 0-.65-.14 1.98 1.98 0 0 0-.51.06 1.9 1.9 0 0 0-.42.15 3.67 3.67 0 0 0-.48.35l.45.54a2.505 2.505 0 0 1 .45-.3zM16.695 15.29a1.29 1.29 0 0 0-.74-.3v-.02a1.203 1.203 0 0 0 .65-.37.973.973 0 0 0 .23-.65.81.81 0 0 0-.37-.71 1.72 1.72 0 0 0-1-.26 2.185 2.185 0 0 0-1.33.4l.4.6a1.79 1.79 0 0 1 .46-.23 1.18 1.18 0 0 1 .41-.07c.38 0 .58.15.58.46a.447.447 0 0 1-.22.43 1.543 1.543 0 0 1-.7.12h-.31v.66h.31a1.764 1.764 0 0 1 .75.12.433.433 0 0 1 .23.41.55.55 0 0 1-.2.47 1.084 1.084 0 0 1-.63.15 2.24 2.24 0 0 1-.57-.08 2.671 2.671 0 0 1-.52-.2v.74a2.923 2.923 0 0 0 1.18.22 1.948 1.948 0 0 0 1.22-.33 1.077 1.077 0 0 0 .43-.92.836.836 0 0 0-.26-.64zM15.005 4.17c.06-.05.16-.14.3-.28l-.02.42V7h.84V3h-.69l-1.29 1.03.4.51zM4.02 5h9v1h-9zM4.02 10h9v1h-9zM4.02 15h9v1h-9z";break;case"editor-ol":e="M6 7V3h-.69L4.02 4.03l.4.51.46-.37c.06-.05.16-.14.3-.28l-.02.42V7H6zm2-2h9v1H8V5zm-1.23 6.95v-.7H5.05v-.04l.51-.48c.33-.31.57-.54.7-.71.14-.17.24-.33.3-.49.07-.16.1-.33.1-.51 0-.21-.05-.4-.16-.56-.1-.16-.25-.28-.44-.37s-.41-.14-.65-.14c-.19 0-.36.02-.51.06-.15.03-.29.09-.42.15-.12.07-.29.19-.48.35l.45.54c.16-.13.31-.23.45-.3.15-.07.3-.1.45-.1.14 0 .26.03.35.11s.13.2.13.36c0 .1-.02.2-.06.3s-.1.21-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76zM8 10h9v1H8v-1zm-1.29 3.95c0-.3-.12-.54-.37-.71-.24-.17-.58-.26-1-.26-.52 0-.96.13-1.33.4l.4.6c.17-.11.32-.19.46-.23.14-.05.27-.07.41-.07.38 0 .58.15.58.46 0 .2-.07.35-.22.43s-.38.12-.7.12h-.31v.66h.31c.34 0 .59.04.75.12.15.08.23.22.23.41 0 .22-.07.37-.2.47-.14.1-.35.15-.63.15-.19 0-.38-.03-.57-.08s-.36-.12-.52-.2v.74c.34.15.74.22 1.18.22.53 0 .94-.11 1.22-.33.29-.22.43-.52.43-.92 0-.27-.09-.48-.26-.64s-.42-.26-.74-.3v-.02c.27-.06.49-.19.65-.37.15-.18.23-.39.23-.65zM8 15h9v1H8v-1z";break;case"editor-outdent":e="M7 4V3H3v1h4zm10 1V3H8v2h9zM7 7H5V5L1 8.5 5 12v-2h2V7zm10 1V6H8v2h9zm-2 3V9H8v2h7zm2 3v-2H8v2h9zM7 14v-1H3v1h4zm4 3v-2H8v2h3z";break;case"editor-paragraph":e="M15 2H7.54c-.83 0-1.59.2-2.28.6-.7.41-1.25.96-1.65 1.65C3.2 4.94 3 5.7 3 6.52s.2 1.58.61 2.27c.4.69.95 1.24 1.65 1.64.69.41 1.45.61 2.28.61h.43V17c0 .27.1.51.29.71.2.19.44.29.71.29.28 0 .51-.1.71-.29.2-.2.3-.44.3-.71V5c0-.27.09-.51.29-.71.2-.19.44-.29.71-.29s.51.1.71.29c.19.2.29.44.29.71v12c0 .27.1.51.3.71.2.19.43.29.71.29.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71V4H15c.27 0 .5-.1.7-.3.2-.19.3-.43.3-.7s-.1-.51-.3-.71C15.5 2.1 15.27 2 15 2z";break;case"editor-paste-text":e="M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.44 1-1 0-.55-.45-1-1-1s-1 .45-1 1c0 .56.45 1 1 1zm5.45-1H17c.55 0 1 .45 1 1v12c0 .56-.45 1-1 1H3c-.55 0-1-.44-1-1V5c0-.55.45-1 1-1h1.55L4 4.63V7h12V4.63zM14 11V9H6v2h3v5h2v-5h3z";break;case"editor-paste-word":e="M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 12V5c0-.55-.45-1-1-1h-1.54l.54.63V7H4V4.62L4.55 4H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-3-8l-2 7h-2l-1-5-1 5H6.92L5 9h2l1 5 1-5h2l1 5 1-5h2z";break;case"editor-quote":e="M9.49 13.22c0-.74-.2-1.38-.61-1.9-.62-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L7.88 4c-2.73 1.3-5.42 4.28-4.96 8.05C3.21 14.43 4.59 16 6.54 16c.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03zm8.05 0c0-.74-.2-1.38-.61-1.9-.63-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L15.93 4c-2.73 1.3-5.41 4.28-4.95 8.05.29 2.38 1.66 3.95 3.61 3.95.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03z";break;case"editor-removeformatting":e="M14.29 4.59l1.1 1.11c.41.4.61.94.61 1.47v2.12c0 .53-.2 1.07-.61 1.47l-6.63 6.63c-.4.41-.94.61-1.47.61s-1.07-.2-1.47-.61l-1.11-1.1-1.1-1.11c-.41-.4-.61-.94-.61-1.47v-2.12c0-.54.2-1.07.61-1.48l6.63-6.62c.4-.41.94-.61 1.47-.61s1.06.2 1.47.61zm-6.21 9.7l6.42-6.42c.39-.39.39-1.03 0-1.43L12.36 4.3c-.19-.19-.45-.29-.72-.29s-.52.1-.71.29l-6.42 6.42c-.39.4-.39 1.04 0 1.43l2.14 2.14c.38.38 1.04.38 1.43 0z";break;case"editor-rtl":e="M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM19 6l-5 4 5 4V6z";break;case"editor-spellcheck":e="M15.84 2.76c.25 0 .49.04.71.11.23.07.44.16.64.25l.35-.81c-.52-.26-1.08-.39-1.69-.39-.58 0-1.09.13-1.52.37-.43.25-.76.61-.99 1.08C13.11 3.83 13 4.38 13 5c0 .99.23 1.75.7 2.28s1.15.79 2.02.79c.6 0 1.13-.09 1.6-.26v-.84c-.26.08-.51.14-.74.19-.24.05-.49.08-.74.08-.59 0-1.04-.19-1.34-.57-.32-.37-.47-.93-.47-1.66 0-.7.16-1.25.48-1.65.33-.4.77-.6 1.33-.6zM6.5 8h1.04L5.3 2H4.24L2 8h1.03l.58-1.66H5.9zM8 2v6h2.17c.67 0 1.19-.15 1.57-.46.38-.3.56-.72.56-1.26 0-.4-.1-.72-.3-.95-.19-.24-.5-.39-.93-.47v-.04c.35-.06.6-.21.78-.44.18-.24.28-.53.28-.88 0-.52-.19-.9-.56-1.14-.36-.24-.96-.36-1.79-.36H8zm.98 2.48V2.82h.85c.44 0 .77.06.97.19.21.12.31.33.31.61 0 .31-.1.53-.29.66-.18.13-.48.2-.89.2h-.95zM5.64 5.5H3.9l.54-1.56c.14-.4.25-.76.32-1.1l.15.52c.07.23.13.4.17.51zm3.34-.23h.99c.44 0 .76.08.98.23.21.15.32.38.32.69 0 .34-.11.59-.32.75s-.52.24-.93.24H8.98V5.27zM4 13l5 5 9-8-1-1-8 6-4-3z";break;case"editor-strikethrough":e="M15.82 12.25c.26 0 .5-.02.74-.07.23-.05.48-.12.73-.2v.84c-.46.17-.99.26-1.58.26-.88 0-1.54-.26-2.01-.79-.39-.44-.62-1.04-.68-1.79h-.94c.12.21.18.48.18.79 0 .54-.18.95-.55 1.26-.38.3-.9.45-1.56.45H8v-2.5H6.59l.93 2.5H6.49l-.59-1.67H3.62L3.04 13H2l.93-2.5H2v-1h1.31l.93-2.49H5.3l.92 2.49H8V7h1.77c1 0 1.41.17 1.77.41.37.24.55.62.55 1.13 0 .35-.09.64-.27.87l-.08.09h1.29c.05-.4.15-.77.31-1.1.23-.46.55-.82.98-1.06.43-.25.93-.37 1.51-.37.61 0 1.17.12 1.69.38l-.35.81c-.2-.1-.42-.18-.64-.25s-.46-.11-.71-.11c-.55 0-.99.2-1.31.59-.23.29-.38.66-.44 1.11H17v1h-2.95c.06.5.2.9.44 1.19.3.37.75.56 1.33.56zM4.44 8.96l-.18.54H5.3l-.22-.61c-.04-.11-.09-.28-.17-.51-.07-.24-.12-.41-.14-.51-.08.33-.18.69-.33 1.09zm4.53-1.09V9.5h1.19c.28-.02.49-.09.64-.18.19-.13.28-.35.28-.66 0-.28-.1-.48-.3-.61-.2-.12-.53-.18-.97-.18h-.84zm-3.33 2.64v-.01H3.91v.01h1.73zm5.28.01l-.03-.02H8.97v1.68h1.04c.4 0 .71-.08.92-.23.21-.16.31-.4.31-.74 0-.31-.11-.54-.32-.69z";break;case"editor-table":e="M18 17V3H2v14h16zM16 7H4V5h12v2zm-7 4H4V9h5v2zm7 0h-5V9h5v2zm-7 4H4v-2h5v2zm7 0h-5v-2h5v2z";break;case"editor-textcolor":e="M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z";break;case"editor-ul":e="M5.5 7C4.67 7 4 6.33 4 5.5 4 4.68 4.67 4 5.5 4 6.32 4 7 4.68 7 5.5 7 6.33 6.32 7 5.5 7zM8 5h9v1H8V5zm-2.5 7c-.83 0-1.5-.67-1.5-1.5C4 9.68 4.67 9 5.5 9c.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 10h9v1H8v-1zm-2.5 7c-.83 0-1.5-.67-1.5-1.5 0-.82.67-1.5 1.5-1.5.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 15h9v1H8v-1z";break;case"editor-underline":e="M14 5h-2v5.71c0 1.99-1.12 2.98-2.45 2.98-1.32 0-2.55-1-2.55-2.96V5H5v5.87c0 1.91 1 4.54 4.48 4.54 3.49 0 4.52-2.58 4.52-4.5V5zm0 13v-2H5v2h9z";break;case"editor-unlink":e="M17.74 2.26c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-.32.33-.69.58-1.08.77L13 10l1.69-1.64.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-.76.76L10 7l-.65-2.14c.19-.38.44-.75.77-1.07l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM2 4l8 6-6-8zm4-2l4 8-2-8H6zM2 6l8 4-8-2V6zm7.36 7.69L10 13l.74 2.35-1.38 1.39c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.39-1.38L7 10l-.69.64-1.52 1.53c-.85.84-.85 2.2 0 3.04.84.85 2.2.85 3.04 0zM18 16l-8-6 6 8zm-4 2l-4-8 2 8h2zm4-4l-8-4 8 2v2z";break;case"editor-video":e="M16 2h-3v1H7V2H4v15h3v-1h6v1h3V2zM6 3v1H5V3h1zm9 0v1h-1V3h1zm-2 1v5H7V4h6zM6 5v1H5V5h1zm9 0v1h-1V5h1zM6 7v1H5V7h1zm9 0v1h-1V7h1zM6 9v1H5V9h1zm9 0v1h-1V9h1zm-2 1v5H7v-5h6zm-7 1v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1z";break;case"ellipsis":e="M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z";break;case"email-alt":e="M19 14.5v-9c0-.83-.67-1.5-1.5-1.5H3.49c-.83 0-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5H17.5c.83 0 1.5-.67 1.5-1.5zm-1.31-9.11c.33.33.15.67-.03.84L13.6 9.95l3.9 4.06c.12.14.2.36.06.51-.13.16-.43.15-.56.05l-4.37-3.73-2.14 1.95-2.13-1.95-4.37 3.73c-.13.1-.43.11-.56-.05-.14-.15-.06-.37.06-.51l3.9-4.06-4.06-3.72c-.18-.17-.36-.51-.03-.84s.67-.17.95.07l6.24 5.04 6.25-5.04c.28-.24.62-.4.95-.07z";break;case"email-alt2":e="M18.01 11.18V2.51c0-1.19-.9-1.81-2-1.37L4 5.91c-1.1.44-2 1.77-2 2.97v8.66c0 1.2.9 1.81 2 1.37l12.01-4.77c1.1-.44 2-1.76 2-2.96zm-1.43-7.46l-6.04 9.33-6.65-4.6c-.1-.07-.36-.32-.17-.64.21-.36.65-.21.65-.21l6.3 2.32s4.83-6.34 5.11-6.7c.13-.17.43-.34.73-.13.29.2.16.49.07.63z";break;case"email":e="M3.87 4h13.25C18.37 4 19 4.59 19 5.79v8.42c0 1.19-.63 1.79-1.88 1.79H3.87c-1.25 0-1.88-.6-1.88-1.79V5.79c0-1.2.63-1.79 1.88-1.79zm6.62 8.6l6.74-5.53c.24-.2.43-.66.13-1.07-.29-.41-.82-.42-1.17-.17l-5.7 3.86L4.8 5.83c-.35-.25-.88-.24-1.17.17-.3.41-.11.87.13 1.07z";break;case"embed-audio":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 3H7v4c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.4 0 .7.1 1 .3V5h4v2zm4 3.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"embed-generic":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3 6.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"embed-photo":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 8H3V6h7v6zm4-1.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3zm-6-4V8.5L7.2 10 6 9.2 4 11h5zM4.6 8.6c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z";break;case"embed-post":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.6 9l-.4.3c-.4.4-.5 1.1-.2 1.6l-.8.8-1.1-1.1-1.3 1.3c-.2.2-1.6 1.3-1.8 1.1-.2-.2.9-1.6 1.1-1.8l1.3-1.3-1.1-1.1.8-.8c.5.3 1.2.3 1.6-.2l.3-.3c.5-.5.5-1.2.2-1.7L8 5l3 2.9-.8.8c-.5-.2-1.2-.2-1.6.3zm5.4 1.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"embed-video":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 6.5L8 9.1V11H3V6h5v1.8l2-1.3v4zm4 0L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"excerpt-view":e="M19 18V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6V3h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6v-6h11z";break;case"exit":e="M13 3v2h2v10h-2v2h4V3h-4zm0 8V9H5.4l4.3-4.3-1.4-1.4L1.6 10l6.7 6.7 1.4-1.4L5.4 11H13z";break;case"external":e="M9 3h8v8l-2-1V6.92l-5.6 5.59-1.41-1.41L14.08 5H10zm3 12v-3l2-2v7H3V6h8L9 8H5v7h7z";break;case"facebook-alt":e="M8.46 18h2.93v-7.3h2.45l.37-2.84h-2.82V6.04c0-.82.23-1.38 1.41-1.38h1.51V2.11c-.26-.03-1.15-.11-2.19-.11-2.18 0-3.66 1.33-3.66 3.76v2.1H6v2.84h2.46V18z";break;case"facebook":e="M2.89 2h14.23c.49 0 .88.39.88.88v14.24c0 .48-.39.88-.88.88h-4.08v-6.2h2.08l.31-2.41h-2.39V7.85c0-.7.2-1.18 1.2-1.18h1.28V4.51c-.22-.03-.98-.09-1.86-.09-1.85 0-3.11 1.12-3.11 3.19v1.78H8.46v2.41h2.09V18H2.89c-.49 0-.89-.4-.89-.88V2.88c0-.49.4-.88.89-.88z";break;case"feedback":e="M2 2h16c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm15 14V7H3v9h14zM4 8v1h3V8H4zm4 0v3h8V8H8zm-4 4v1h3v-1H4zm4 0v3h8v-3H8z";break;case"filter":e="M3 4.5v-2s3.34-1 7-1 7 1 7 1v2l-5 7.03v6.97s-1.22-.09-2.25-.59S8 16.5 8 16.5v-4.97z";break;case"flag":e="M5 18V3H3v15h2zm1-6V4c3-1 7 1 11 0v8c-3 1.27-8-1-11 0z";break;case"format-aside":e="M1 1h18v12l-6 6H1V1zm3 3v1h12V4H4zm0 4v1h12V8H4zm6 5v-1H4v1h6zm2 4l5-5h-5v5z";break;case"format-audio":e="M6.99 3.08l11.02-2c.55-.08.99.45.99 1V14.5c0 1.94-1.57 3.5-3.5 3.5S12 16.44 12 14.5c0-1.93 1.57-3.5 3.5-3.5.54 0 1.04.14 1.5.35V5.08l-9 2V16c-.24 1.7-1.74 3-3.5 3C2.57 19 1 17.44 1 15.5 1 13.57 2.57 12 4.5 12c.54 0 1.04.14 1.5.35V4.08c0-.55.44-.91.99-1z";break;case"format-chat":e="M11 6h-.82C9.07 6 8 7.2 8 8.16V10l-3 3v-3H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v3zm0 1h6c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2h-2v3l-3-3h-1c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2z";break;case"format-gallery":e="M16 4h1.96c.57 0 1.04.47 1.04 1.04v12.92c0 .57-.47 1.04-1.04 1.04H5.04C4.47 19 4 18.53 4 17.96V16H2.04C1.47 16 1 15.53 1 14.96V2.04C1 1.47 1.47 1 2.04 1h12.92c.57 0 1.04.47 1.04 1.04V4zM3 14h11V3H3v11zm5-8.5C8 4.67 7.33 4 6.5 4S5 4.67 5 5.5 5.67 7 6.5 7 8 6.33 8 5.5zm2 4.5s1-5 3-5v8H4V7c2 0 2 3 2 3s.33-2 2-2 2 2 2 2zm7 7V6h-1v8.96c0 .57-.47 1.04-1.04 1.04H6v1h11z";break;case"format-image":e="M2.25 1h15.5c.69 0 1.25.56 1.25 1.25v15.5c0 .69-.56 1.25-1.25 1.25H2.25C1.56 19 1 18.44 1 17.75V2.25C1 1.56 1.56 1 2.25 1zM17 17V3H3v14h14zM10 6c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm3 5s0-6 3-6v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V8c2 0 3 4 3 4s1-3 3-3 3 2 3 2z";break;case"format-quote":e="M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z";break;case"format-status":e="M10 1c7 0 9 2.91 9 6.5S17 14 10 14s-9-2.91-9-6.5S3 1 10 1zM5.5 9C6.33 9 7 8.33 7 7.5S6.33 6 5.5 6 4 6.67 4 7.5 4.67 9 5.5 9zM10 9c.83 0 1.5-.67 1.5-1.5S10.83 6 10 6s-1.5.67-1.5 1.5S9.17 9 10 9zm4.5 0c.83 0 1.5-.67 1.5-1.5S15.33 6 14.5 6 13 6.67 13 7.5 13.67 9 14.5 9zM6 14.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm-3 2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z";break;case"format-video":e="M2 1h16c.55 0 1 .45 1 1v16l-18-.02V2c0-.55.45-1 1-1zm4 1L4 5h1l2-3H6zm4 0H9L7 5h1zm3 0h-1l-2 3h1zm3 0h-1l-2 3h1zm1 14V6H3v10h14zM8 7l6 4-6 4V7z";break;case"forms":e="M2 2h7v7H2V2zm9 0v7h7V2h-7zM5.5 4.5L7 3H4zM12 8V3h5v5h-5zM4.5 5.5L3 4v3zM8 4L6.5 5.5 8 7V4zM5.5 6.5L4 8h3zM9 18v-7H2v7h7zm9 0h-7v-7h7v7zM8 12v5H3v-5h5zm6.5 1.5L16 12h-3zM12 16l1.5-1.5L12 13v3zm3.5-1.5L17 16v-3zm-1 1L13 17h3z";break;case"googleplus":e="M6.73 10h5.4c.05.29.09.57.09.95 0 3.27-2.19 5.6-5.49 5.6-3.17 0-5.73-2.57-5.73-5.73 0-3.17 2.56-5.73 5.73-5.73 1.54 0 2.84.57 3.83 1.5l-1.55 1.5c-.43-.41-1.17-.89-2.28-.89-1.96 0-3.55 1.62-3.55 3.62 0 1.99 1.59 3.61 3.55 3.61 2.26 0 3.11-1.62 3.24-2.47H6.73V10zM19 10v1.64h-1.64v1.63h-1.63v-1.63h-1.64V10h1.64V8.36h1.63V10H19z";break;case"grid-view":e="M2 1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1zm7.01 7.99v-6H3v6h6.01zm8 0v-6h-6v6h6zm-8 8.01v-6H3v6h6.01zm8 0v-6h-6v6h6z";break;case"groups":e="M8.03 4.46c-.29 1.28.55 3.46 1.97 3.46 1.41 0 2.25-2.18 1.96-3.46-.22-.98-1.08-1.63-1.96-1.63-.89 0-1.74.65-1.97 1.63zm-4.13.9c-.25 1.08.47 2.93 1.67 2.93s1.92-1.85 1.67-2.93c-.19-.83-.92-1.39-1.67-1.39s-1.48.56-1.67 1.39zm8.86 0c-.25 1.08.47 2.93 1.66 2.93 1.2 0 1.92-1.85 1.67-2.93-.19-.83-.92-1.39-1.67-1.39-.74 0-1.47.56-1.66 1.39zm-.59 11.43l1.25-4.3C14.2 10 12.71 8.47 10 8.47c-2.72 0-4.21 1.53-3.44 4.02l1.26 4.3C8.05 17.51 9 18 10 18c.98 0 1.94-.49 2.17-1.21zm-6.1-7.63c-.49.67-.96 1.83-.42 3.59l1.12 3.79c-.34.2-.77.31-1.2.31-.85 0-1.65-.41-1.85-1.03l-1.07-3.65c-.65-2.11.61-3.4 2.92-3.4.27 0 .54.02.79.06-.1.1-.2.22-.29.33zm8.35-.39c2.31 0 3.58 1.29 2.92 3.4l-1.07 3.65c-.2.62-1 1.03-1.85 1.03-.43 0-.86-.11-1.2-.31l1.11-3.77c.55-1.78.08-2.94-.42-3.61-.08-.11-.18-.23-.28-.33.25-.04.51-.06.79-.06z";break;case"hammer":e="M17.7 6.32l1.41 1.42-3.47 3.41-1.42-1.42.84-.82c-.32-.76-.81-1.57-1.51-2.31l-4.61 6.59-5.26 4.7c-.39.39-1.02.39-1.42 0l-1.2-1.21c-.39-.39-.39-1.02 0-1.41l10.97-9.92c-1.37-.86-3.21-1.46-5.67-1.48 2.7-.82 4.95-.93 6.58-.3 1.7.66 2.82 2.2 3.91 3.58z";break;case"heading":e="M12.5 4v5.2h-5V4H5v13h2.5v-5.2h5V17H15V4";break;case"heart":e="M10 17.12c3.33-1.4 5.74-3.79 7.04-6.21 1.28-2.41 1.46-4.81.32-6.25-1.03-1.29-2.37-1.78-3.73-1.74s-2.68.63-3.63 1.46c-.95-.83-2.27-1.42-3.63-1.46s-2.7.45-3.73 1.74c-1.14 1.44-.96 3.84.34 6.25 1.28 2.42 3.69 4.81 7.02 6.21z";break;case"hidden":e="M17.2 3.3l.16.17c.39.39.39 1.02 0 1.41L4.55 17.7c-.39.39-1.03.39-1.41 0l-.17-.17c-.39-.39-.39-1.02 0-1.41l1.59-1.6c-1.57-1-2.76-2.3-3.56-3.93.81-1.65 2.03-2.98 3.64-3.99S8.04 5.09 10 5.09c1.2 0 2.33.21 3.4.6l2.38-2.39c.39-.39 1.03-.39 1.42 0zm-7.09 4.01c-.23.25-.34.54-.34.88 0 .31.12.58.31.81l1.8-1.79c-.13-.12-.28-.21-.45-.26-.11-.01-.28-.03-.49-.04-.33.03-.6.16-.83.4zM2.4 10.59c.69 1.23 1.71 2.25 3.05 3.05l1.28-1.28c-.51-.69-.77-1.47-.77-2.36 0-1.06.36-1.98 1.09-2.76-1.04.27-1.96.7-2.76 1.26-.8.58-1.43 1.27-1.89 2.09zm13.22-2.13l.96-.96c1.02.86 1.83 1.89 2.42 3.09-.81 1.65-2.03 2.98-3.64 3.99s-3.4 1.51-5.36 1.51c-.63 0-1.24-.07-1.83-.18l1.07-1.07c.25.02.5.05.76.05 1.63 0 3.13-.4 4.5-1.21s2.4-1.84 3.1-3.09c-.46-.82-1.09-1.51-1.89-2.09-.03-.01-.06-.03-.09-.04zm-5.58 5.58l4-4c-.01 1.1-.41 2.04-1.18 2.81-.78.78-1.72 1.18-2.82 1.19z";break;case"html":e="M4 16v-2H2v2H1v-5h1v2h2v-2h1v5H4zM7 16v-4H5.6v-1h3.7v1H8v4H7zM10 16v-5h1l1.4 3.4h.1L14 11h1v5h-1v-3.1h-.1l-1.1 2.5h-.6l-1.1-2.5H11V16h-1zM19 16h-3v-5h1v4h2v1zM9.4 4.2L7.1 6.5l2.3 2.3-.6 1.2-3.5-3.5L8.8 3l.6 1.2zm1.2 4.6l2.3-2.3-2.3-2.3.6-1.2 3.5 3.5-3.5 3.5-.6-1.2z";break;case"id-alt":e="M18 18H2V2h16v16zM8.05 7.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L8.95 6c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C8.23 4.1 7.95 4 7.6 4c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM16 5V4h-5v1h5zm0 2V6h-5v1h5zM7.62 8.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM16 9V8h-3v1h3zm0 2v-1h-3v1h3zm0 3v-1H4v1h12zm0 2v-1H4v1h12z";break;case"id":e="M18 16H2V4h16v12zM7.05 8.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L7.95 7c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C7.23 5.1 6.95 5 6.6 5c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM17 9V5h-5v4h5zm-10.38.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM17 11v-1h-5v1h5zm0 2v-1h-5v1h5zm0 2v-1H3v1h14z";break;case"image-crop":e="M19 12v3h-4v4h-3v-4H4V7H0V4h4V0h3v4h7l3-3 1 1-3 3v7h4zm-8-5H7v4zm-3 5h4V8z";break;case"image-filter":e="M14 5.87c0-2.2-1.79-4-4-4s-4 1.8-4 4c0 2.21 1.79 4 4 4s4-1.79 4-4zM3.24 10.66c-1.92 1.1-2.57 3.55-1.47 5.46 1.11 1.92 3.55 2.57 5.47 1.47 1.91-1.11 2.57-3.55 1.46-5.47-1.1-1.91-3.55-2.56-5.46-1.46zm9.52 6.93c1.92 1.1 4.36.45 5.47-1.46 1.1-1.92.45-4.36-1.47-5.47-1.91-1.1-4.36-.45-5.46 1.46-1.11 1.92-.45 4.36 1.46 5.47z";break;case"image-flip-horizontal":e="M19 3v14h-8v3H9v-3H1V3h8V0h2v3h8zm-8.5 14V3h-1v14h1zM7 6.5L3 10l4 3.5v-7zM17 10l-4-3.5v7z";break;case"image-flip-vertical":e="M20 9v2h-3v8H3v-8H0V9h3V1h14v8h3zM6.5 7h7L10 3zM17 9.5H3v1h14v-1zM13.5 13h-7l3.5 4z";break;case"image-rotate-left":e="M7 5H5.05c0-1.74.85-2.9 2.95-2.9V0C4.85 0 2.96 2.11 2.96 5H1.18L3.8 8.39zm13-4v14h-5v5H1V10h9V1h10zm-2 2h-6v7h3v3h3V3zm-5 9H3v6h10v-6z";break;case"image-rotate-right":e="M15.95 5H14l3.2 3.39L19.82 5h-1.78c0-2.89-1.89-5-5.04-5v2.1c2.1 0 2.95 1.16 2.95 2.9zM1 1h10v9h9v10H6v-5H1V1zm2 2v10h3v-3h3V3H3zm5 9v6h10v-6H8z";break;case"image-rotate":e="M10.25 1.02c5.1 0 8.75 4.04 8.75 9s-3.65 9-8.75 9c-3.2 0-6.02-1.59-7.68-3.99l2.59-1.52c1.1 1.5 2.86 2.51 4.84 2.51 3.3 0 6-2.79 6-6s-2.7-6-6-6c-1.97 0-3.72 1-4.82 2.49L7 8.02l-6 2v-7L2.89 4.6c1.69-2.17 4.36-3.58 7.36-3.58z";break;case"images-alt":e="M4 15v-3H2V2h12v3h2v3h2v10H6v-3H4zm7-12c-1.1 0-2 .9-2 2h4c0-1.1-.89-2-2-2zm-7 8V6H3v5h1zm7-3h4c0-1.1-.89-2-2-2-1.1 0-2 .9-2 2zm-5 6V9H5v5h1zm9-1c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2s-2 .9-2 2c0 1.11.9 2 2 2zm2 4v-2c-5 0-5-3-10-3v5h10z";break;case"images-alt2":e="M5 3h14v11h-2v2h-2v2H1V7h2V5h2V3zm13 10V4H6v9h12zm-3-4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm1 6v-1H5V6H4v9h12zM7 6l10 6H7V6zm7 11v-1H3V8H2v9h12z";break;case"index-card":e="M1 3.17V18h18V4H8v-.83c0-.32-.12-.6-.35-.83S7.14 2 6.82 2H2.18c-.33 0-.6.11-.83.34-.24.23-.35.51-.35.83zM10 6v2H3V6h7zm7 0v10h-5V6h5zm-7 4v2H3v-2h7zm0 4v2H3v-2h7z";break;case"info-outline":e="M9 15h2V9H9v6zm1-10c-.5 0-1 .5-1 1s.5 1 1 1 1-.5 1-1-.5-1-1-1zm0-4c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z";break;case"info":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1 4c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zm0 9V9H9v6h2z";break;case"insert-after":e="M9 12h2v-2h2V8h-2V6H9v2H7v2h2v2zm1 4c3.9 0 7-3.1 7-7s-3.1-7-7-7-7 3.1-7 7 3.1 7 7 7zm0-12c2.8 0 5 2.2 5 5s-2.2 5-5 5-5-2.2-5-5 2.2-5 5-5zM3 19h14v-2H3v2z";break;case"insert-before":e="M11 8H9v2H7v2h2v2h2v-2h2v-2h-2V8zm-1-4c-3.9 0-7 3.1-7 7s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 12c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zM3 1v2h14V1H3z";break;case"insert":e="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z";break;case"instagram":e="M12.67 10A2.67 2.67 0 1 0 10 12.67 2.68 2.68 0 0 0 12.67 10zm1.43 0A4.1 4.1 0 1 1 10 5.9a4.09 4.09 0 0 1 4.1 4.1zm1.13-4.27a1 1 0 1 1-1-1 1 1 0 0 1 1 1zM10 3.44c-1.17 0-3.67-.1-4.72.32a2.67 2.67 0 0 0-1.52 1.52c-.42 1-.32 3.55-.32 4.72s-.1 3.67.32 4.72a2.74 2.74 0 0 0 1.52 1.52c1 .42 3.55.32 4.72.32s3.67.1 4.72-.32a2.83 2.83 0 0 0 1.52-1.52c.42-1.05.32-3.55.32-4.72s.1-3.67-.32-4.72a2.74 2.74 0 0 0-1.52-1.52c-1.05-.42-3.55-.32-4.72-.32zM18 10c0 1.1 0 2.2-.05 3.3a4.84 4.84 0 0 1-1.29 3.36A4.8 4.8 0 0 1 13.3 18H6.7a4.84 4.84 0 0 1-3.36-1.29 4.84 4.84 0 0 1-1.29-3.41C2 12.2 2 11.1 2 10V6.7a4.84 4.84 0 0 1 1.34-3.36A4.8 4.8 0 0 1 6.7 2.05C7.8 2 8.9 2 10 2h3.3a4.84 4.84 0 0 1 3.36 1.29A4.8 4.8 0 0 1 18 6.7V10z";break;case"keyboard-hide":e="M18,0 L2,0 C0.9,0 0.01,0.9 0.01,2 L0,12 C0,13.1 0.9,14 2,14 L18,14 C19.1,14 20,13.1 20,12 L20,2 C20,0.9 19.1,0 18,0 Z M18,12 L2,12 L2,2 L18,2 L18,12 Z M9,3 L11,3 L11,5 L9,5 L9,3 Z M9,6 L11,6 L11,8 L9,8 L9,6 Z M6,3 L8,3 L8,5 L6,5 L6,3 Z M6,6 L8,6 L8,8 L6,8 L6,6 Z M3,6 L5,6 L5,8 L3,8 L3,6 Z M3,3 L5,3 L5,5 L3,5 L3,3 Z M6,9 L14,9 L14,11 L6,11 L6,9 Z M12,6 L14,6 L14,8 L12,8 L12,6 Z M12,3 L14,3 L14,5 L12,5 L12,3 Z M15,6 L17,6 L17,8 L15,8 L15,6 Z M15,3 L17,3 L17,5 L15,5 L15,3 Z M10,20 L14,16 L6,16 L10,20 Z";break;case"laptop":e="M3 3h14c.6 0 1 .4 1 1v10c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1zm13 2H4v8h12V5zm-3 1H5v4zm6 11v-1H1v1c0 .6.5 1 1.1 1h15.8c.6 0 1.1-.4 1.1-1z";break;case"layout":e="M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z";break;case"leftright":e="M3 10.03L9 6v8zM11 6l6 4.03L11 14V6z";break;case"lightbulb":e="M10 1c3.11 0 5.63 2.52 5.63 5.62 0 1.84-2.03 4.58-2.03 4.58-.33.44-.6 1.25-.6 1.8v1c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-1c0-.55-.27-1.36-.6-1.8 0 0-2.02-2.74-2.02-4.58C4.38 3.52 6.89 1 10 1zM7 16.87V16h6v.87c0 .62-.13 1.13-.75 1.13H12c0 .62-.4 1-1.02 1h-2c-.61 0-.98-.38-.98-1h-.25c-.62 0-.75-.51-.75-1.13z";break;case"list-view":e="M2 19h16c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V3h11zM4 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V7h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11zM4 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11z";break;case"location-alt":e="M13 13.14l1.17-5.94c.79-.43 1.33-1.25 1.33-2.2 0-1.38-1.12-2.5-2.5-2.5S10.5 3.62 10.5 5c0 .95.54 1.77 1.33 2.2zm0-9.64c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm1.72 4.8L18 6.97v9L13.12 18 7 15.97l-5 2v-9l5-2 4.27 1.41 1.73 7.3z";break;case"location":e="M10 2C6.69 2 4 4.69 4 8c0 2.02 1.17 3.71 2.53 4.89.43.37 1.18.96 1.85 1.83.74.97 1.41 2.01 1.62 2.71.21-.7.88-1.74 1.62-2.71.67-.87 1.42-1.46 1.85-1.83C14.83 11.71 16 10.02 16 8c0-3.31-2.69-6-6-6zm0 2.56c1.9 0 3.44 1.54 3.44 3.44S11.9 11.44 10 11.44 6.56 9.9 6.56 8 8.1 4.56 10 4.56z";break;case"lock":e="M14 9h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h1V6c0-2.21 1.79-4 4-4s4 1.79 4 4v3zm-2 0V6c0-1.1-.9-2-2-2s-2 .9-2 2v3h4zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z";break;case"marker":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z";break;case"media-archive":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zM8 3.5v2l1.8-1zM11 5L9.2 6 11 7V5zM8 6.5v2l1.8-1zM11 8L9.2 9l1.8 1V8zM8 9.5v2l1.8-1zm3 1.5l-1.8 1 1.8 1v-2zm-1.5 6c.83 0 1.62-.72 1.5-1.63-.05-.38-.49-1.61-.49-1.61l-1.99-1.1s-.45 1.95-.52 2.71c-.07.77.67 1.63 1.5 1.63zm0-2.39c.42 0 .76.34.76.76 0 .43-.34.77-.76.77s-.76-.34-.76-.77c0-.42.34-.76.76-.76z";break;case"media-audio":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm1 7.26V8.09c0-.11-.04-.21-.12-.29-.07-.08-.16-.11-.27-.1 0 0-3.97.71-4.25.78C8.07 8.54 8 8.8 8 9v3.37c-.2-.09-.42-.07-.6-.07-.38 0-.7.13-.96.39-.26.27-.4.58-.4.96 0 .37.14.69.4.95.26.27.58.4.96.4.34 0 .7-.04.96-.26.26-.23.64-.65.64-1.12V10.3l3-.6V12c-.67-.2-1.17.04-1.44.31-.26.26-.39.58-.39.95 0 .38.13.69.39.96.27.26.71.39 1.08.39.38 0 .7-.13.96-.39.26-.27.4-.58.4-.96z";break;case"media-code":e="M12 2l4 4v12H4V2h8zM9 13l-2-2 2-2-1-1-3 3 3 3zm3 1l3-3-3-3-1 1 2 2-2 2z";break;case"media-default":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3z";break;case"media-document":e="M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zM5 9v1h4V9H5zm10 3V9h-5v3h5zM5 11v1h4v-1H5zm10 3v-1H5v1h10zm-3 2v-1H5v1h7z";break;case"media-interactive":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm2 8V8H6v6h3l-1 2h1l1-2 1 2h1l-1-2h3zm-6-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm5-2v2h-3V9h3zm0 3v1H7v-1h6z";break;case"media-spreadsheet":e="M12 2l4 4v12H4V2h8zm-1 4V3H5v3h6zM8 8V7H5v1h3zm3 0V7H9v1h2zm4 0V7h-3v1h3zm-7 2V9H5v1h3zm3 0V9H9v1h2zm4 0V9h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2z";break;case"media-text":e="M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zm0 2V9H5v1h10zm0 2v-1H5v1h10zm-4 2v-1H5v1h6z";break;case"media-video":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm-1 8v-3c0-.27-.1-.51-.29-.71-.2-.19-.44-.29-.71-.29H7c-.27 0-.51.1-.71.29-.19.2-.29.44-.29.71v3c0 .27.1.51.29.71.2.19.44.29.71.29h3c.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71zm3 1v-5l-2 2v1z";break;case"megaphone":e="M18.15 5.94c.46 1.62.38 3.22-.02 4.48-.42 1.28-1.26 2.18-2.3 2.48-.16.06-.26.06-.4.06-.06.02-.12.02-.18.02-.06.02-.14.02-.22.02h-6.8l2.22 5.5c.02.14-.06.26-.14.34-.08.1-.24.16-.34.16H6.95c-.1 0-.26-.06-.34-.16-.08-.08-.16-.2-.14-.34l-1-5.5H4.25l-.02-.02c-.5.06-1.08-.18-1.54-.62s-.88-1.08-1.06-1.88c-.24-.8-.2-1.56-.02-2.2.18-.62.58-1.08 1.06-1.3l.02-.02 9-5.4c.1-.06.18-.1.24-.16.06-.04.14-.08.24-.12.16-.08.28-.12.5-.18 1.04-.3 2.24.1 3.22.98s1.84 2.24 2.26 3.86zm-2.58 5.98h-.02c.4-.1.74-.34 1.04-.7.58-.7.86-1.76.86-3.04 0-.64-.1-1.3-.28-1.98-.34-1.36-1.02-2.5-1.78-3.24s-1.68-1.1-2.46-.88c-.82.22-1.4.96-1.7 2-.32 1.04-.28 2.36.06 3.72.38 1.36 1 2.5 1.8 3.24.78.74 1.62 1.1 2.48.88zm-2.54-7.08c.22-.04.42-.02.62.04.38.16.76.48 1.02 1s.42 1.2.42 1.78c0 .3-.04.56-.12.8-.18.48-.44.84-.86.94-.34.1-.8-.06-1.14-.4s-.64-.86-.78-1.5c-.18-.62-.12-1.24.02-1.72s.48-.84.82-.94z";break;case"menu-alt":e="M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h14v2H3v-2z";break;case"menu":e="M17 7V5H3v2h14zm0 4V9H3v2h14zm0 4v-2H3v2h14z";break;case"microphone":e="M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z";break;case"migrate":e="M4 6h6V4H2v12.01h8V14H4V6zm2 2h6V5l6 5-6 5v-3H6V8z";break;case"minus":e="M4 9h12v2H4V9z";break;case"money":e="M0 3h20v12h-.75c0-1.79-1.46-3.25-3.25-3.25-1.31 0-2.42.79-2.94 1.91-.25-.1-.52-.16-.81-.16-.98 0-1.8.63-2.11 1.5H0V3zm8.37 3.11c-.06.15-.1.31-.11.47s-.01.33.01.5l.02.08c.01.06.02.14.05.23.02.1.06.2.1.31.03.11.09.22.15.33.07.12.15.22.23.31s.18.17.31.23c.12.06.25.09.4.09.14 0 .27-.03.39-.09s.22-.14.3-.22c.09-.09.16-.2.22-.32.07-.12.12-.23.16-.33s.07-.2.09-.31c.03-.11.04-.18.05-.22s.01-.07.01-.09c.05-.29.03-.56-.04-.82s-.21-.48-.41-.66c-.21-.18-.47-.27-.79-.27-.19 0-.36.03-.52.1-.15.07-.28.16-.38.28-.09.11-.17.25-.24.4zm4.48 6.04v-1.14c0-.33-.1-.66-.29-.98s-.45-.59-.77-.79c-.32-.21-.66-.31-1.02-.31l-1.24.84-1.28-.82c-.37 0-.72.1-1.04.3-.31.2-.56.46-.74.77-.18.32-.27.65-.27.99v1.14l.18.05c.12.04.29.08.51.14.23.05.47.1.74.15.26.05.57.09.91.13.34.03.67.05.99.05.3 0 .63-.02.98-.05.34-.04.64-.08.89-.13.25-.04.5-.1.76-.16l.5-.12c.08-.02.14-.04.19-.06zm3.15.1c1.52 0 2.75 1.23 2.75 2.75s-1.23 2.75-2.75 2.75c-.73 0-1.38-.3-1.87-.77.23-.35.37-.78.37-1.23 0-.77-.39-1.46-.99-1.86.43-.96 1.37-1.64 2.49-1.64zm-5.5 3.5c0-.96.79-1.75 1.75-1.75s1.75.79 1.75 1.75-.79 1.75-1.75 1.75-1.75-.79-1.75-1.75z";break;case"move":e="M19 10l-4 4v-3h-4v4h3l-4 4-4-4h3v-4H5v3l-4-4 4-4v3h4V5H6l4-4 4 4h-3v4h4V6z";break;case"nametag":e="M12 5V2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-2-3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 13V7c0-1.1-.9-2-2-2h-3v.33C13 6.25 12.25 7 11.33 7H8.67C7.75 7 7 6.25 7 5.33V5H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-1-6v6H3V9h14zm-8 2c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm3 0c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm-5.96 1.21c.92.48 2.34.79 3.96.79s3.04-.31 3.96-.79c-.21 1-1.89 1.79-3.96 1.79s-3.75-.79-3.96-1.79z";break;case"networking":e="M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z";break;case"no-alt":e="M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z";break;case"no":e="M12.12 10l3.53 3.53-2.12 2.12L10 12.12l-3.54 3.54-2.12-2.12L7.88 10 4.34 6.46l2.12-2.12L10 7.88l3.54-3.53 2.12 2.12z";break;case"palmtree":e="M8.58 2.39c.32 0 .59.05.81.14 1.25.55 1.69 2.24 1.7 3.97.59-.82 2.15-2.29 3.41-2.29s2.94.73 3.53 3.55c-1.13-.65-2.42-.94-3.65-.94-1.26 0-2.45.32-3.29.89.4-.11.86-.16 1.33-.16 1.39 0 2.9.45 3.4 1.31.68 1.16.47 3.38-.76 4.14-.14-2.1-1.69-4.12-3.47-4.12-.44 0-.88.12-1.33.38C8 10.62 7 14.56 7 19H2c0-5.53 4.21-9.65 7.68-10.79-.56-.09-1.17-.15-1.82-.15C6.1 8.06 4.05 8.5 2 10c.76-2.96 2.78-4.1 4.69-4.1 1.25 0 2.45.5 3.2 1.29-.66-2.24-2.49-2.86-4.08-2.86-.8 0-1.55.16-2.05.35.91-1.29 3.31-2.29 4.82-2.29zM13 11.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5.67 1.5 1.5 1.5 1.5-.67 1.5-1.5z";break;case"paperclip":e="M17.05 2.7c1.93 1.94 1.93 5.13 0 7.07L10 16.84c-1.88 1.89-4.91 1.93-6.86.15-.06-.05-.13-.09-.19-.15-1.93-1.94-1.93-5.12 0-7.07l4.94-4.95c.91-.92 2.28-1.1 3.39-.58.3.15.59.33.83.58 1.17 1.17 1.17 3.07 0 4.24l-4.93 4.95c-.39.39-1.02.39-1.41 0s-.39-1.02 0-1.41l4.93-4.95c.39-.39.39-1.02 0-1.41-.38-.39-1.02-.39-1.4 0l-4.94 4.95c-.91.92-1.1 2.29-.57 3.4.14.3.32.59.57.84s.54.43.84.57c1.11.53 2.47.35 3.39-.57l7.05-7.07c1.16-1.17 1.16-3.08 0-4.25-.56-.55-1.28-.83-2-.86-.08.01-.16.01-.24 0-.22-.03-.43-.11-.6-.27-.39-.4-.38-1.05.02-1.45.16-.16.36-.24.56-.28.14-.02.27-.01.4.02 1.19.06 2.36.52 3.27 1.43z";break;case"performance":e="M3.76 17.01h12.48C17.34 15.63 18 13.9 18 12c0-4.41-3.58-8-8-8s-8 3.59-8 8c0 1.9.66 3.63 1.76 5.01zM9 6c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zM4 8c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm4.52 3.4c.84-.83 6.51-3.5 6.51-3.5s-2.66 5.68-3.49 6.51c-.84.84-2.18.84-3.02 0-.83-.83-.83-2.18 0-3.01zM3 13c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1z";break;case"phone":e="M12.06 6l-.21-.2c-.52-.54-.43-.79.08-1.3l2.72-2.75c.81-.82.96-1.21 1.73-.48l.21.2zm.53.45l4.4-4.4c.7.94 2.34 3.47 1.53 5.34-.73 1.67-1.09 1.75-2 3-1.85 2.11-4.18 4.37-6 6.07-1.26.91-1.31 1.33-3 2-1.8.71-4.4-.89-5.38-1.56l4.4-4.4 1.18 1.62c.34.46 1.2-.06 1.8-.66 1.04-1.05 3.18-3.18 4-4.07.59-.59 1.12-1.45.66-1.8zM1.57 16.5l-.21-.21c-.68-.74-.29-.9.52-1.7l2.74-2.72c.51-.49.75-.6 1.27-.11l.2.21z";break;case"playlist-audio":e="M17 3V1H2v2h15zm0 4V5H2v2h15zm-7 4V9H2v2h8zm7.45-1.96l-6 1.12c-.16.02-.19.03-.29.13-.11.09-.16.22-.16.37v4.59c-.29-.13-.66-.14-.93-.14-.54 0-1 .19-1.38.57s-.56.84-.56 1.38c0 .53.18.99.56 1.37s.84.57 1.38.57c.49 0 .92-.16 1.29-.48s.59-.71.65-1.19v-4.95L17 11.27v3.48c-.29-.13-.56-.19-.83-.19-.54 0-1.11.19-1.49.57-.38.37-.57.83-.57 1.37s.19.99.57 1.37.84.57 1.38.57c.53 0 .99-.19 1.37-.57s.57-.83.57-1.37V9.6c0-.16-.05-.3-.16-.41-.11-.12-.24-.17-.39-.15zM8 15v-2H2v2h6zm-2 4v-2H2v2h4z";break;case"playlist-video":e="M17 3V1H2v2h15zm0 4V5H2v2h15zM6 11V9H2v2h4zm2-2h9c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm3 7l3.33-2L11 12v4zm-5-1v-2H2v2h4zm0 4v-2H2v2h4z";break;case"plus-alt":e="M15.8 4.2c3.2 3.21 3.2 8.39 0 11.6-3.21 3.2-8.39 3.2-11.6 0C1 12.59 1 7.41 4.2 4.2 7.41 1 12.59 1 15.8 4.2zm-4.3 11.3v-4h4v-3h-4v-4h-3v4h-4v3h4v4h3z";break;case"plus-light":e="M17 9v2h-6v6H9v-6H3V9h6V3h2v6h6z";break;case"plus":e="M17 7v3h-5v5H9v-5H4V7h5V2h3v5h5z";break;case"portfolio":e="M4 5H.78c-.37 0-.74.32-.69.84l1.56 9.99S3.5 8.47 3.86 6.7c.11-.53.61-.7.98-.7H10s-.7-2.08-.77-2.31C9.11 3.25 8.89 3 8.45 3H5.14c-.36 0-.7.23-.8.64C4.25 4.04 4 5 4 5zm4.88 0h-4s.42-1 .87-1h2.13c.48 0 1 1 1 1zM2.67 16.25c-.31.47-.76.75-1.26.75h15.73c.54 0 .92-.31 1.03-.83.44-2.19 1.68-8.44 1.68-8.44.07-.5-.3-.73-.62-.73H16V5.53c0-.16-.26-.53-.66-.53h-3.76c-.52 0-.87.58-.87.58L10 7H5.59c-.32 0-.63.19-.69.5 0 0-1.59 6.7-1.72 7.33-.07.37-.22.99-.51 1.42zM15.38 7H11s.58-1 1.13-1h2.29c.71 0 .96 1 .96 1z";break;case"post-status":e="M14 6c0 1.86-1.28 3.41-3 3.86V16c0 1-2 2-2 2V9.86c-1.72-.45-3-2-3-3.86 0-2.21 1.79-4 4-4s4 1.79 4 4zM8 5c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z";break;case"pressthis":e="M14.76 1C16.55 1 18 2.46 18 4.25c0 1.78-1.45 3.24-3.24 3.24-.23 0-.47-.03-.7-.08L13 8.47V19H2V4h9.54c.13-2 1.52-3 3.22-3zm0 5.49C16 6.49 17 5.48 17 4.25 17 3.01 16 2 14.76 2s-2.24 1.01-2.24 2.25c0 .37.1.72.27 1.03L9.57 8.5c-.28.28-1.77 2.22-1.5 2.49.02.03.06.04.1.04.49 0 2.14-1.28 2.39-1.53l3.24-3.24c.29.14.61.23.96.23z";break;case"products":e="M17 8h1v11H2V8h1V6c0-2.76 2.24-5 5-5 .71 0 1.39.15 2 .42.61-.27 1.29-.42 2-.42 2.76 0 5 2.24 5 5v2zM5 6v2h2V6c0-1.13.39-2.16 1.02-3H8C6.35 3 5 4.35 5 6zm10 2V6c0-1.65-1.35-3-3-3h-.02c.63.84 1.02 1.87 1.02 3v2h2zm-5-4.22C9.39 4.33 9 5.12 9 6v2h2V6c0-.88-.39-1.67-1-2.22z";break;case"randomize":e="M18 6.01L14 9V7h-4l-5 8H2v-2h2l5-8h5V3zM2 5h3l1.15 2.17-1.12 1.8L4 7H2V5zm16 9.01L14 17v-2H9l-1.15-2.17 1.12-1.8L10 13h4v-2z";break;case"redo":e="M8 5h5V2l6 4-6 4V7H8c-2.2 0-4 1.8-4 4s1.8 4 4 4h5v2H8c-3.3 0-6-2.7-6-6s2.7-6 6-6z";break;case"rest-api":e="M3 4h2v12H3z";break;case"rss":e="M14.92 18H18C18 9.32 10.82 2.25 2 2.25v3.02c7.12 0 12.92 5.71 12.92 12.73zm-5.44 0h3.08C12.56 12.27 7.82 7.6 2 7.6v3.02c2 0 3.87.77 5.29 2.16C8.7 14.17 9.48 16.03 9.48 18zm-5.35-.02c1.17 0 2.13-.93 2.13-2.09 0-1.15-.96-2.09-2.13-2.09-1.18 0-2.13.94-2.13 2.09 0 1.16.95 2.09 2.13 2.09z";break;case"saved":e="M15.3 5.3l-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2 8.2-8.2";break;case"schedule":e="M2 2h16v4H2V2zm0 10V8h4v4H2zm6-2V8h4v2H8zm6 3V8h4v5h-4zm-6 5v-6h4v6H8zm-6 0v-4h4v4H2zm12 0v-3h4v3h-4z";break;case"screenoptions":e="M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z";break;case"search":e="M12.14 4.18c1.87 1.87 2.11 4.75.72 6.89.12.1.22.21.36.31.2.16.47.36.81.59.34.24.56.39.66.47.42.31.73.57.94.78.32.32.6.65.84 1 .25.35.44.69.59 1.04.14.35.21.68.18 1-.02.32-.14.59-.36.81s-.49.34-.81.36c-.31.02-.65-.04-.99-.19-.35-.14-.7-.34-1.04-.59-.35-.24-.68-.52-1-.84-.21-.21-.47-.52-.77-.93-.1-.13-.25-.35-.47-.66-.22-.32-.4-.57-.56-.78-.16-.2-.29-.35-.44-.5-2.07 1.09-4.69.76-6.44-.98-2.14-2.15-2.14-5.64 0-7.78 2.15-2.15 5.63-2.15 7.78 0zm-1.41 6.36c1.36-1.37 1.36-3.58 0-4.95-1.37-1.37-3.59-1.37-4.95 0-1.37 1.37-1.37 3.58 0 4.95 1.36 1.37 3.58 1.37 4.95 0z";break;case"share-alt":e="M16.22 5.8c.47.69.29 1.62-.4 2.08-.69.47-1.62.29-2.08-.4-.16-.24-.35-.46-.55-.67-.21-.2-.43-.39-.67-.55s-.5-.3-.77-.41c-.27-.12-.55-.21-.84-.26-.59-.13-1.23-.13-1.82-.01-.29.06-.57.15-.84.27-.27.11-.53.25-.77.41s-.46.35-.66.55c-.21.21-.4.43-.56.67s-.3.5-.41.76c-.01.02-.01.03-.01.04-.1.24-.17.48-.23.72H1V6h2.66c.04-.07.07-.13.12-.2.27-.4.57-.77.91-1.11s.72-.65 1.11-.91c.4-.27.83-.51 1.28-.7s.93-.34 1.41-.43c.99-.21 2.03-.21 3.02 0 .48.09.96.24 1.41.43s.88.43 1.28.7c.39.26.77.57 1.11.91s.64.71.91 1.11zM12.5 10c0-1.38-1.12-2.5-2.5-2.5S7.5 8.62 7.5 10s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5zm-8.72 4.2c-.47-.69-.29-1.62.4-2.09.69-.46 1.62-.28 2.08.41.16.24.35.46.55.67.21.2.43.39.67.55s.5.3.77.41c.27.12.55.2.84.26.59.13 1.23.12 1.82 0 .29-.06.57-.14.84-.26.27-.11.53-.25.77-.41s.46-.35.66-.55c.21-.21.4-.44.56-.67.16-.25.3-.5.41-.76.01-.02.01-.03.01-.04.1-.24.17-.48.23-.72H19v3h-2.66c-.04.06-.07.13-.12.2-.27.4-.57.77-.91 1.11s-.72.65-1.11.91c-.4.27-.83.51-1.28.7s-.93.33-1.41.43c-.99.21-2.03.21-3.02 0-.48-.1-.96-.24-1.41-.43s-.88-.43-1.28-.7c-.39-.26-.77-.57-1.11-.91s-.64-.71-.91-1.11z";break;case"share-alt2":e="M18 8l-5 4V9.01c-2.58.06-4.88.45-7 2.99.29-3.57 2.66-5.66 7-5.94V3zM4 14h11v-2l2-1.6V16H2V5h9.43c-1.83.32-3.31 1-4.41 2H4v7z";break;case"share":e="M14.5 12c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.24.03-.46.09-.69l-4.38-2.3c-.55.61-1.33.99-2.21.99-1.66 0-3-1.34-3-3s1.34-3 3-3c.88 0 1.66.39 2.21.99l4.38-2.3c-.06-.23-.09-.45-.09-.69 0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-.88 0-1.66-.39-2.21-.99l-4.38 2.3c.06.23.09.45.09.69s-.03.46-.09.69l4.38 2.3c.55-.61 1.33-.99 2.21-.99z";break;case"shield-alt":e="M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2z";break;case"shield":e="M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2zm0 8h5s1-1 1-5c0 0-5-1-6-2v7H5c1 4 5 7 5 7v-7z";break;case"shortcode":e="M6 14H4V6h2V4H2v12h4M7.1 17h2.1l3.7-14h-2.1M14 4v2h2v8h-2v2h4V4";break;case"slides":e="M5 14V6h10v8H5zm-3-1V7h2v6H2zm4-6v6h8V7H6zm10 0h2v6h-2V7zm-3 2V8H7v1h6zm0 3v-2H7v2h6z";break;case"smartphone":e="M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z";break;case"smiley":e="M7 5.2c1.1 0 2 .89 2 2 0 .37-.11.71-.28 1C8.72 8.2 8 8 7 8s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.9-2 2-2zm6 0c1.11 0 2 .89 2 2 0 .37-.11.71-.28 1 0 0-.72-.2-1.72-.2s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.89-2 2-2zm-3 13.7c3.72 0 7.03-2.36 8.23-5.88l-1.32-.46C15.9 15.52 13.12 17.5 10 17.5s-5.9-1.98-6.91-4.94l-1.32.46c1.2 3.52 4.51 5.88 8.23 5.88z";break;case"sort":e="M11 7H1l5 7zm-2 7h10l-5-7z";break;case"sos":e="M18 10c0-4.42-3.58-8-8-8s-8 3.58-8 8 3.58 8 8 8 8-3.58 8-8zM7.23 3.57L8.72 7.3c-.62.29-1.13.8-1.42 1.42L3.57 7.23c.71-1.64 2.02-2.95 3.66-3.66zm9.2 3.66L12.7 8.72c-.29-.62-.8-1.13-1.42-1.42l1.49-3.73c1.64.71 2.95 2.02 3.66 3.66zM10 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-6.43.77l3.73-1.49c.29.62.8 1.13 1.42 1.42l-1.49 3.73c-1.64-.71-2.95-2.02-3.66-3.66zm9.2 3.66l-1.49-3.73c.62-.29 1.13-.8 1.42-1.42l3.73 1.49c-.71 1.64-2.02 2.95-3.66 3.66z";break;case"star-empty":e="M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88l-4.68 2.34.87-5.15-3.18-3.56 4.65-.58z";break;case"star-filled":e="M10 1l3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z";break;case"star-half":e="M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88V3.24z";break;case"sticky":e="M5 3.61V1.04l8.99-.01-.01 2.58c-1.22.26-2.16 1.35-2.16 2.67v.5c.01 1.31.93 2.4 2.17 2.66l-.01 2.58h-3.41l-.01 2.57c0 .6-.47 4.41-1.06 4.41-.6 0-1.08-3.81-1.08-4.41v-2.56L5 12.02l.01-2.58c1.23-.25 2.15-1.35 2.15-2.66v-.5c0-1.31-.92-2.41-2.16-2.67z";break;case"store":e="M1 10c.41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.51.43.54 0 1.08-.14 1.49-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.63-.46 1-1.17 1-2V7l-3-7H4L0 7v1c0 .83.37 1.54 1 2zm2 8.99h5v-5h4v5h5v-7c-.37-.05-.72-.22-1-.43-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.49.44-.55 0-1.1-.14-1.51-.44-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.5.44-.54 0-1.09-.14-1.5-.44-.63-.45-1-.73-1-1.57 0 .84-.38 1.12-1 1.57-.29.21-.63.38-1 .44v6.99z";break;case"table-col-after":e="M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z";break;case"table-col-before":e="M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z";break;case"table-col-delete":e="M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z";break;case"table-row-after":e="M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z";break;case"table-row-before":e="M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z";break;case"table-row-delete":e="M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z";break;case"tablet":e="M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z";break;case"tag":e="M11 2h7v7L8 19l-7-7zm3 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z";break;case"tagcloud":e="M11 3v4H1V3h10zm8 0v4h-7V3h7zM7 8v3H1V8h6zm12 0v3H8V8h11zM9 12v2H1v-2h8zm10 0v2h-9v-2h9zM6 15v1H1v-1h5zm5 0v1H7v-1h4zm3 0v1h-2v-1h2zm5 0v1h-4v-1h4z";break;case"testimonial":e="M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z";break;case"text":e="M18 3v2H2V3h16zm-6 4v2H2V7h10zm6 0v2h-4V7h4zM8 11v2H2v-2h6zm10 0v2h-8v-2h8zm-4 4v2H2v-2h12z";break;case"thumbs-down":e="M7.28 18c-.15.02-.26-.02-.41-.07-.56-.19-.83-.79-.66-1.35.17-.55 1-3.04 1-3.58 0-.53-.75-1-1.35-1h-3c-.6 0-1-.4-1-1s2-7 2-7c.17-.39.55-1 1-1H14v9h-2.14c-.41.41-3.3 4.71-3.58 5.27-.21.41-.6.68-1 .73zM18 12h-2V3h2v9z";break;case"thumbs-up":e="M12.72 2c.15-.02.26.02.41.07.56.19.83.79.66 1.35-.17.55-1 3.04-1 3.58 0 .53.75 1 1.35 1h3c.6 0 1 .4 1 1s-2 7-2 7c-.17.39-.55 1-1 1H6V8h2.14c.41-.41 3.3-4.71 3.58-5.27.21-.41.6-.68 1-.73zM2 8h2v9H2V8z";break;case"tickets-alt":e="M20 6.38L18.99 9.2v-.01c-.52-.19-1.03-.16-1.53.08s-.85.62-1.04 1.14-.16 1.03.07 1.53c.24.5.62.84 1.15 1.03v.01l-1.01 2.82-15.06-5.38.99-2.79c.52.19 1.03.16 1.53-.08.5-.23.84-.61 1.03-1.13s.16-1.03-.08-1.53c-.23-.49-.61-.83-1.13-1.02L4.93 1zm-4.97 5.69l1.37-3.76c.12-.31.1-.65-.04-.95s-.39-.53-.7-.65L8.14 3.98c-.64-.23-1.37.12-1.6.74L5.17 8.48c-.24.65.1 1.37.74 1.6l7.52 2.74c.14.05.28.08.43.08.52 0 1-.33 1.17-.83zM7.97 4.45l7.51 2.73c.19.07.34.21.43.39.08.18.09.38.02.57l-1.37 3.76c-.13.38-.58.59-.96.45L6.09 9.61c-.39-.14-.59-.57-.45-.96l1.37-3.76c.1-.29.39-.49.7-.49.09 0 .17.02.26.05zm6.82 12.14c.35.27.75.41 1.2.41H16v3H0v-2.96c.55 0 1.03-.2 1.41-.59.39-.38.59-.86.59-1.41s-.2-1.02-.59-1.41-.86-.59-1.41-.59V10h1.05l-.28.8 2.87 1.02c-.51.16-.89.62-.89 1.18v4c0 .69.56 1.25 1.25 1.25h8c.69 0 1.25-.56 1.25-1.25v-1.75l.83.3c.12.43.36.78.71 1.04zM3.25 17v-4c0-.41.34-.75.75-.75h.83l7.92 2.83V17c0 .41-.34.75-.75.75H4c-.41 0-.75-.34-.75-.75z";break;case"tickets":e="M20 5.38L18.99 8.2v-.01c-1.04-.37-2.19.18-2.57 1.22-.37 1.04.17 2.19 1.22 2.56v.01l-1.01 2.82L1.57 9.42l.99-2.79c1.04.38 2.19-.17 2.56-1.21s-.17-2.18-1.21-2.55L4.93 0zm-5.45 3.37c.74-2.08-.34-4.37-2.42-5.12-2.08-.74-4.37.35-5.11 2.42-.74 2.08.34 4.38 2.42 5.12 2.07.74 4.37-.35 5.11-2.42zm-2.56-4.74c.89.32 1.57.94 1.97 1.71-.01-.01-.02-.01-.04-.02-.33-.12-.67.09-.78.4-.1.28-.03.57.05.91.04.27.09.62-.06 1.04-.1.29-.33.58-.65 1l-.74 1.01.08-4.08.4.11c.19.04.26-.24.08-.29 0 0-.57-.15-.92-.28-.34-.12-.88-.36-.88-.36-.18-.08-.3.19-.12.27 0 0 .16.08.34.16l.01 1.63L9.2 9.18l.08-4.11c.2.06.4.11.4.11.19.04.26-.23.07-.29 0 0-.56-.15-.91-.28-.07-.02-.14-.05-.22-.08.93-.7 2.19-.94 3.37-.52zM7.4 6.19c.17-.49.44-.92.78-1.27l.04 5c-.94-.95-1.3-2.39-.82-3.73zm4.04 4.75l2.1-2.63c.37-.41.57-.77.69-1.12.05-.12.08-.24.11-.35.09.57.04 1.18-.17 1.77-.45 1.25-1.51 2.1-2.73 2.33zm-.7-3.22l.02 3.22c0 .02 0 .04.01.06-.4 0-.8-.07-1.2-.21-.33-.12-.63-.28-.9-.48zm1.24 6.08l2.1.75c.24.84 1 1.45 1.91 1.45H16v3H0v-2.96c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2V9h1.05l-.28.8 4.28 1.52C4.4 12.03 4 12.97 4 14c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.07-.02-.13-.02-.2zm-6.53-2.33l1.48.53c-.14.04-.15.27.03.28 0 0 .18.02.37.03l.56 1.54-.78 2.36-1.31-3.9c.21-.01.41-.03.41-.03.19-.02.17-.31-.02-.3 0 0-.59.05-.96.05-.07 0-.15 0-.23-.01.13-.2.28-.38.45-.55zM4.4 14c0-.52.12-1.02.32-1.46l1.71 4.7C5.23 16.65 4.4 15.42 4.4 14zm4.19-1.41l1.72.62c.07.17.12.37.12.61 0 .31-.12.66-.28 1.16l-.35 1.2zM11.6 14c0 1.33-.72 2.49-1.79 3.11l1.1-3.18c.06-.17.1-.31.14-.46l.52.19c.02.11.03.22.03.34zm-4.62 3.45l1.08-3.14 1.11 3.03c.01.02.01.04.02.05-.37.13-.77.21-1.19.21-.35 0-.69-.06-1.02-.15z";break;case"tide":e="M17 7.2V3H3v7.1c2.6-.5 4.5-1.5 6.4-2.6.2-.2.4-.3.6-.5v3c-1.9 1.1-4 2.2-7 2.8V17h14V9.9c-2.6.5-4.4 1.5-6.2 2.6-.3.1-.5.3-.8.4V10c2-1.1 4-2.2 7-2.8z";break;case"translation":e="M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z";break;case"trash":e="M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z";break;case"twitter":e="M18.94 4.46c-.49.73-1.11 1.38-1.83 1.9.01.15.01.31.01.47 0 4.85-3.69 10.44-10.43 10.44-2.07 0-4-.61-5.63-1.65.29.03.58.05.88.05 1.72 0 3.3-.59 4.55-1.57-1.6-.03-2.95-1.09-3.42-2.55.22.04.45.07.69.07.33 0 .66-.05.96-.13-1.67-.34-2.94-1.82-2.94-3.6v-.04c.5.27 1.06.44 1.66.46-.98-.66-1.63-1.78-1.63-3.06 0-.67.18-1.3.5-1.84 1.81 2.22 4.51 3.68 7.56 3.83-.06-.27-.1-.55-.1-.84 0-2.02 1.65-3.66 3.67-3.66 1.06 0 2.01.44 2.68 1.16.83-.17 1.62-.47 2.33-.89-.28.85-.86 1.57-1.62 2.02.75-.08 1.45-.28 2.11-.57z";break;case"undo":e="M12 5H7V2L1 6l6 4V7h5c2.2 0 4 1.8 4 4s-1.8 4-4 4H7v2h5c3.3 0 6-2.7 6-6s-2.7-6-6-6z";break;case"universal-access-alt":e="M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-9-7.4c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z";break;case"universal-access":e="M10 2.6c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z";break;case"unlock":e="M12 9V6c0-1.1-.9-2-2-2s-2 .9-2 2H6c0-2.21 1.79-4 4-4s4 1.79 4 4v3h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h7zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z";break;case"update":e="M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z";break;case"upload":e="M8 14V8H5l5-6 5 6h-3v6H8zm-2 2v-6H4v8h12.01v-8H14v6H6z";break;case"vault":e="M18 17V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-1 0H3V3h14v14zM4.75 4h10.5c.41 0 .75.34.75.75V6h-1v3h1v2h-1v3h1v1.25c0 .41-.34.75-.75.75H4.75c-.41 0-.75-.34-.75-.75V4.75c0-.41.34-.75.75-.75zM13 10c0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4 4-1.79 4-4zM9 7l.77 1.15C10.49 8.46 11 9.17 11 10c0 1.1-.9 2-2 2s-2-.9-2-2c0-.83.51-1.54 1.23-1.85z";break;case"video-alt":e="M8 5c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1 0 .57.49 1 1 1h5c.55 0 1-.45 1-1zm6 5l4-4v10l-4-4v-2zm-1 4V8c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z";break;case"video-alt2":e="M12 13V7c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2zm1-2.5l6 4.5V5l-6 4.5v1z";break;case"video-alt3":e="M19 15V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2zM8 14V6l6 4z";break;case"visibility":e="M19.7 9.4C17.7 6 14 3.9 10 3.9S2.3 6 .3 9.4L0 10l.3.6c2 3.4 5.7 5.5 9.7 5.5s7.7-2.1 9.7-5.5l.3-.6-.3-.6zM10 14.1c-3.1 0-6-1.6-7.7-4.1C3.6 8 5.7 6.6 8 6.1c-.9.6-1.5 1.7-1.5 2.9 0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5c0-1.2-.6-2.3-1.5-2.9 2.3.5 4.4 1.9 5.7 3.9-1.7 2.5-4.6 4.1-7.7 4.1z";break;case"warning":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z";break;case"welcome-add-page":e="M17 7V4h-2V2h-3v1H3v15h11V9h1V7h2zm-1-2v1h-2v2h-1V6h-2V5h2V3h1v2h2z";break;case"welcome-comments":e="M5 2h10c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2zm8.5 8.5L11 8l2.5-2.5-1-1L10 7 7.5 4.5l-1 1L9 8l-2.5 2.5 1 1L10 9l2.5 2.5z";break;case"welcome-learn-more":e="M10 10L2.54 7.02 3 18H1l.48-11.41L0 6l10-4 10 4zm0-5c-.55 0-1 .22-1 .5s.45.5 1 .5 1-.22 1-.5-.45-.5-1-.5zm0 6l5.57-2.23c.71.94 1.2 2.07 1.36 3.3-.3-.04-.61-.07-.93-.07-2.55 0-4.78 1.37-6 3.41C8.78 13.37 6.55 12 4 12c-.32 0-.63.03-.93.07.16-1.23.65-2.36 1.36-3.3z";break;case"welcome-view-site":e="M18 14V4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-8-8c2.3 0 4.4 1.14 6 3-1.6 1.86-3.7 3-6 3s-4.4-1.14-6-3c1.6-1.86 3.7-3 6-3zm2 3c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm2 8h3v1H3v-1h3v-1h8v1z";break;case"welcome-widgets-menus":e="M19 16V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h15c.55 0 1-.45 1-1zM4 4h13v4H4V4zm1 1v2h3V5H5zm4 0v2h3V5H9zm4 0v2h3V5h-3zm-8.5 5c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 10h4v1H6v-1zm6 0h5v5h-5v-5zm-7.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 12h4v1H6v-1zm7 0v2h3v-2h-3zm-8.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 14h4v1H6v-1z";break;case"welcome-write-blog":e="M16.89 1.2l1.41 1.41c.39.39.39 1.02 0 1.41L14 8.33V18H3V3h10.67l1.8-1.8c.4-.39 1.03-.4 1.42 0zm-5.66 8.48l5.37-5.36-1.42-1.42-5.36 5.37-.71 2.12z";break;case"wordpress-alt":e="M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z";break;case"wordpress":e="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z";break;case"yes-alt":e="M10 2c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm-.615 12.66h-1.34l-3.24-4.54 1.34-1.25 2.57 2.4 5.14-5.93 1.34.94-5.81 8.38z";break;case"yes":e="M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z"}if(!e)return null;var s=["dashicon","dashicons-"+c,r].filter(Boolean).join(" ");return Object(v.createElement)(Ra,Nc({"aria-hidden":!0,role:"img",focusable:"false",className:s,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 20 20"},o),Object(v.createElement)(Ba,{d:e}))}}]),t}();var Da=function(e){var t=e.icon,c=void 0===t?null:t,a=e.size,n=w(e,["icon","size"]),r=a||20;if("string"==typeof c)return Object(v.createElement)(Ia,Nc({icon:c,size:r},n));if(c&&Ia===c.type)return Object(v.cloneElement)(c,g({size:r},n));var o=a||24;if("function"==typeof c)return c.prototype instanceof v.Component?Object(v.createElement)(c,g({size:o},n)):c(g({size:o},n));if(c&&("svg"===c.type||c.type===Ra)){var s=g({width:o,height:o},c.props,n);return Object(v.createElement)(Ra,s)}return Object(v.isValidElement)(c)?Object(v.cloneElement)(c,g({size:o},n)):c};var Aa=Object(v.forwardRef)(function(e,t){var c=e.icon,a=e.children,n=e.label,r=e.className,o=e.tooltip,s=e.shortcut,l=e.labelPosition,i=e.size,m=w(e,["icon","children","label","className","tooltip","shortcut","labelPosition","size"]),h=y()("components-icon-button",r,{"has-text":a}),u=o||n,d=!m.disabled&&(o||s||!!n&&(!a||Object(F.isArray)(a)&&!a.length)&&!1!==o),p=Object(v.createElement)(z,Nc({"aria-label":n},m,{className:h,ref:t}),Object(v.createElement)(Da,{icon:c,size:i}),a);return d&&(p=Object(v.createElement)(Ta,{text:u,shortcut:s,position:l},p)),p}),Pa=function(e){function t(){var e;return qc(this,t),(e=Gc(this,$c(t).apply(this,arguments))).openFileDialog=e.openFileDialog.bind(Qc(e)),e.bindInput=e.bindInput.bind(Qc(e)),e}return Kc(t,v["Component"]),Wc(t,[{key:"openFileDialog",value:function(){this.input.click()}},{key:"bindInput",value:function(e){this.input=e}},{key:"render",value:function(){var e=this.props,t=e.accept,c=e.children,a=e.icon,n=void 0===a?"upload":a,r=e.multiple,o=void 0!==r&&r,s=e.onChange,l=e.render,i=w(e,["accept","children","icon","multiple","onChange","render"]),m=l?l({openFileDialog:this.openFileDialog}):Object(v.createElement)(Aa,Nc({icon:n,onClick:this.openFileDialog},i),c);return Object(v.createElement)("div",{className:"components-form-file-upload"},m,Object(v.createElement)("input",{type:"file",ref:this.bindInput,multiple:o,style:{display:"none"},accept:t,onChange:s}))}}]),t}(),Fa=function(e){var t=e.fileName,c=e.field,a=e.disabled,n=e.isDone,r=e.isLoading,o=e.accept,s=e.error,l=e.onFileChange,i=e.onFileRemove,m=e.help,h=s&&s.length>0;return Object(v.createElement)(Rc,{id:"form-file-upload-base-control-".concat(c.key),label:c.label,help:m},Object(v.createElement)("div",{className:"file-upload"},Object(v.createElement)(Pa,{id:"form-file-upload-".concat(c.key),className:n&&!h?"is-success":null,isLarge:!0,isPrimary:!0,isDestructive:h,isBusy:r,disabled:a||r,icon:Object(v.createElement)(C.a,{icon:n&&!h?"checkmark":"add-outline",size:18}),accept:o,onChange:function(e){return l(c.key,e.target.files[0])}},Object(u.__)("Upload file","woocommerce-payments")),h?Object(v.createElement)("span",{className:"upload-message is-destructive"},s):Object(v.createElement)("span",{className:"upload-message"},t),n&&!a?Object(v.createElement)(Aa,{className:"delete-uploaded-file-button",icon:Object(v.createElement)(C.a,{icon:"trash",size:18}),onClick:function(){return i(c.key)}}):null))},qa=function(e,t){Object(v.useEffect)(function(){var t=e();if(t){var c=function(e){e.preventDefault(),e.returnValue=""};window.addEventListener("beforeunload",c);var a=Object(rt.getHistory)().block(t);return function(){window.removeEventListener("beforeunload",c),a()}}},t)},Ua=function(e){return Array.isArray(e)?Object(F.flatten)(e.map(function(e,t){return[e,Object(v.createElement)("br",{key:t})]})):e},Wa=function(e){var t=e.fields,c=e.evidence,a=e.onChange,n=e.onFileChange,r=e.onFileRemove,o=e.onSave,s=e.readOnly;if(!t||!t.length)return null;var l=function(e){return{label:e.label,value:c[e.key]||"",onChange:function(t){return a(e.key,t)},disabled:s,help:Ua(e.description)}},i=function(e){switch(e.type){case"file":return Object(v.createElement)(Fa,We()({key:e.key},function(e){var t=c.metadata&&c.metadata[e.key]||"",a=c.isUploading&&(c.isUploading[e.key]||!1),o=c.uploadingErrors&&(c.uploadingErrors[e.key]||""),l=!a&&t.length>0;return{field:e,fileName:t,accept:".pdf, image/png, image/jpeg",onFileChange:n,onFileRemove:r,disabled:s,isLoading:a,isDone:l,error:o,help:Ua(e.description)}}(e)));case"text":return Object(v.createElement)(Ic,We()({key:e.key},l(e)));default:return Object(v.createElement)(Dc,We()({key:e.key},l(e)))}},m=t.map(function(e){return Object(v.createElement)(p.Card,{key:e.key,title:e.title},e.description&&Object(v.createElement)("p",null,e.description),e.fields.map(i))}),h=Object(u.__)("Are you sure you're ready to submit this evidence? Evidence submissions are final.","woocommerce-payments");return Object(v.createElement)(v.Fragment,null,m,s?null:Object(v.createElement)(p.Card,null,Object(v.createElement)("p",null,Object(u.__)("When you submit your evidence, we'll format it and send it to the cardholder's bank, then email you once the dispute has been decided.","woocommerce-payments")),Object(v.createElement)("p",null,Object(v.createElement)("strong",null,Object(u.__)("Evidence submission is final.","woocommerce-payments"))," ",Object(u.__)("You can also save this evidence for later instead of submitting it immediately.","woocommerce-payments")," ",Object(v.createElement)("strong",null,Object(u.__)("We will automatically submit any saved evidence at the due date.","woocommerce-payments"))),Object(v.createElement)(zc,null,Object(v.createElement)(z,{isPrimary:!0,isLarge:!0,onClick:function(){return window.confirm(h)&&o(!0)}},Object(u.__)("Submit evidence","woocommerce-payments")),Object(v.createElement)(z,{isDefault:!0,isLarge:!0,onClick:function(){return o(!1)}},Object(u.__)("Save for later","woocommerce-payments")))))},Ya=function(e){var t=e.isLoading,c=e.dispute,a=void 0===c?{}:c,n=e.productType,r=e.onChangeProductType,o=Ze()(e,["isLoading","dispute","productType","onChangeProductType"]),s=a&&"needs_response"!==a.status&&"warning_needs_response"!==a.status,l=!t&&a.id;return t||l?Object(v.createElement)(O,{isNarrow:!0,className:"wcpay-dispute-evidence"},Object(v.createElement)(p.Card,{title:Object(v.createElement)($e,{isLoading:t,value:Object(u.__)("Challenge dispute","woocommerce-payments")})},Object(v.createElement)(jc,{dispute:a,isLoading:t})),Object(v.createElement)(p.Card,{title:Object(v.createElement)($e,{isLoading:t,value:Object(u.__)("Product type","woocommerce-payments")})},Object(v.createElement)(Ge,{isLoading:t,numLines:2},Object(v.createElement)(Pc,{value:n,onChange:r,options:[{label:Object(u.__)("Select one…","woocommerce-payments"),disabled:!0,value:""},{label:Object(u.__)("Physical product","woocommerce-payments"),value:"physical_product"},{label:Object(u.__)("Digital product or service","woocommerce-payments"),value:"digital_product_or_service"},{label:Object(u.__)("Offline service","woocommerce-payments"),value:"offline_service"},{label:Object(u.__)("Multiple product types","woocommerce-payments"),value:"multiple"}],disabled:s}))),!t&&Object(v.createElement)(Wa,We()({},o,{readOnly:s}))):Object(v.createElement)(O,{isNarrow:!0,className:"wcpay-dispute-details"},Object(v.createElement)("div",null,Object(u.__)("Dispute not loaded","woocommerce-payments")))},Za=function(e){var t=e.query,c="/wc/v3/payments/disputes/".concat(t.id),a=Object(v.useState)(),n=xt()(a,2),r=n[0],o=n[1],s=Object(v.useState)(!1),l=xt()(s,2),i=l[0],m=l[1],h=Object(v.useState)({}),d=xt()(h,2),p=d[0],f=d[1],g=Object(I.useDispatch)("core/notices"),w=g.createSuccessNotice,b=g.createErrorNotice,y=g.createInfoNotice,z=!r||Object(F.isMatchWith)(r.evidence,p,function(e,t){if(null===e&&!t)return!0});qa(function(){if(!z)return Object(u.__)("There are unsaved changes on this page. Are you sure you want to leave and discard the unsaved changes?","woocommerce-payments")},[z]);var _=function(){var e=hc()(oe.a.mark(function e(){return oe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,dc()({path:c});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,m(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();Object(v.useEffect)(function(){_()},[]);var E=function(e,t){return f(function(c){return R()({},c,P()({},e,t))})},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(function(t){return Object(F.merge)({},t,e)})},k=function(){var e=hc()(oe.a.mark(function e(t,c){var a,n;return oe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=2;break}return e.abrupt("return");case 2:return(a=new FormData).append("file",c),a.append("purpose","dispute_evidence"),O({isUploading:P()({},t,!0),uploadingErrors:P()({},t,"")}),E(t,""),e.prev=7,e.next=10,dc()({path:"/wc/v3/payments/file",method:"post",body:a});case 10:n=e.sent,O({metadata:P()({},t,n.filename),isUploading:P()({},t,!1)}),E(t,n.id),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(7),O({isUploading:P()({},t,!1),uploadingErrors:P()({},t,e.t0.message)}),E(t,"");case 19:case"end":return e.stop()}},e,null,[[7,15]])}));return function(t,c){return e.apply(this,arguments)}}(),H=function(e){var t=e?Object(u.__)("Evidence submitted!","woocommerce-payments"):Object(u.__)("Evidence saved!","woocommerce-payments"),c=Object(se.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes"});w(t),Object(rt.getHistory)().push(c)},V=function(e){var t=e?Object(u.__)("Failed to submit evidence!","woocommerce-payments"):Object(u.__)("Failed to save evidence!","woocommerce-payments");b(t)},M=function(){var e=hc()(oe.a.mark(function e(t){var a,n;return oe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(F.some)(r.isUploading)){e.next=3;break}return y(Object(u.__)("Please wait until file upload is finished"),"woocommerce-payments"),e.abrupt("return");case 3:return m(!0),e.prev=4,a=r.metadata,e.next=8,dc()({path:c,method:"post",data:{evidence:R()({},r.evidence,{},p),metadata:a,submit:t}});case 8:n=e.sent,o(n),H(t),f({}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),V(t);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}},e,null,[[4,14,17,20]])}));return function(t){return e.apply(this,arguments)}}(),j=function(e){if(!e)return"";var t=e.metadata.__product_type||"";return!t&&e.evidence_details&&e.evidence_details.has_evidence&&(t="multiple"),t}(r),x=Object(v.useMemo)(function(){return function(e,t){return e&&t?"multiple"===t?Fc.map(function(e){return e.denormalized?null:R()({},e,{fields:e.fields.filter(function(e){return!e.denormalized})})}).filter(Boolean):Fc.map(function(c){var a=c.reason&&!Object(F.includes)(c.reason,e),n=c.productType&&c.productType!==t;if(a||n)return null;var r=c.fields.filter(function(e){return!e.productType||e.productType===t});return R()({},c,{fields:r})}).filter(Boolean):[]}(r&&r.reason,j)},[r&&r.reason,j]);return Object(v.createElement)(Ya,{isLoading:i,dispute:r,evidence:r?R()({},r.evidence,{},p,{metadata:r.metadata||{},isUploading:r.isUploading||{},uploadingErrors:r.uploadingErrors||{}}):{},onChange:E,onFileChange:k,onFileRemove:function(e){E(e,""),O({metadata:P()({},e,""),uploadingErrors:P()({},e,"")})},onSave:M,productType:j,onChangeProductType:function(e){return O({metadata:P()({},"__product_type",e)})},fields:x})};var Qa=function(e){var t=e.className,c=e.status,a=e.children,n=e.onRemove,r=void 0===n?F.noop:n,o=e.isDismissible,s=void 0===o||o,l=e.actions,i=void 0===l?[]:l,m=e.__unstableHTML,h=y()(t,"components-notice","is-"+c,{"is-dismissible":s});return m&&(a=Object(v.createElement)(v.RawHTML,null,a)),Object(v.createElement)("div",{className:h},Object(v.createElement)("div",{className:"components-notice__content"},a,i.map(function(e,t){var c=e.className,a=e.label,n=e.noDefaultClasses,r=void 0!==n&&n,o=e.onClick,s=e.url;return Object(v.createElement)(z,{key:t,href:s,isDefault:!r&&!s,isLink:!r&&!!s,onClick:s?void 0:o,className:y()("components-notice__action",c)},a)})),s&&Object(v.createElement)(Aa,{className:"components-notice__dismiss",icon:"no-alt",label:Object(u.__)("Dismiss this notice"),onClick:r,tooltip:!1}))},Ga={transactions:Object(u.__)("Viewing test transactions. To view live transactions, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),paymentDetails:Object(u.__)("Test payment:","woocommerce-payments"),deposits:Object(u.__)("Viewing test deposits. To view live deposits, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),depositDetails:Object(u.__)("Test deposit:","woocommerce-payments"),disputes:Object(u.__)("Viewing test disputes. To view live disputes, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),disputeDetails:Object(u.__)("Test dispute:","woocommerce-payments")},$a=[Ga.paymentDetails,Ga.disputeDetails,Ga.depositDetails],Ja=function(e){var t=Object(v.createElement)("a",{href:Object(se.addQueryArgs)("admin.php",{page:"wc-settings",tab:"checkout",section:"woocommerce_payments"})},Object(u.__)("View WooCommerce Payments settings.","woocommerce-payments"));return $a.includes(e)?Object(v.createElement)("span",null,Object(v.createElement)("b",null,e)," ",function(e){return Object(u._n)("WooCommerce Payments was in test mode when this order was placed.","WooCommerce Payments was in test mode when these orders were placed.",Ga.depositDetails===e?2:1,"woocommerce-payments")}(e)," ",t):Object(v.createElement)("span",null,e," ",t)},Ka=function(e,t){return function(c,a){return Object(v.createElement)("div",null,function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"undefined"==typeof wcpaySettings?e:"1"===wcpaySettings.testMode||e}()?(n=t,Object(v.createElement)(Qa,{className:"wcpay-test-mode-notice",status:"warning",isDismissible:!1},Ja(n))):null,e(c,a));var n}};Object(d.addFilter)("woocommerce_admin_pages_list","woocommerce-payments",function(e){var t,c=(t=document.querySelector("#toplevel_page_wc-admin-path--payments-connect")?"connect":"deposits",{menuID:"toplevel_page_wc-admin-path--payments-".concat(t),rootLink:["/payments/".concat(t),Object(u.__)("Payments","woocommerce-payments")]}),a=c.menuID,n=c.rootLink;return e.push({container:H,path:"/payments/connect",wpOpenMenu:a,breadcrumbs:[n,Object(u.__)("Connect","woocommerce-payments")]}),e.push({container:Ka(dt,Ga.deposits),path:"/payments/deposits",wpOpenMenu:a,breadcrumbs:[n,Object(u.__)("Deposits","woocommerce-payments")]}),e.push({container:Ka(Mt,Ga.depositDetails),path:"/payments/deposits/details",wpOpenMenu:a,breadcrumbs:[n,["/payments/deposits",Object(u.__)("Deposits","woocommerce-payments")],Object(u.__)("Deposit details","woocommerce-payments")]}),e.push({container:Ka(Tt,Ga.transactions),path:"/payments/transactions",wpOpenMenu:a,breadcrumbs:[n,Object(u.__)("Transactions","woocommerce-payments")]}),e.push({container:Ka(ic,Ga.paymentDetails),path:"/payments/transactions/details",wpOpenMenu:a,breadcrumbs:[n,["/payments/transactions",Object(u.__)("Transactions","woocommerce-payments")],Object(u.__)("Payment details","woocommerce-payments")]}),e.push({container:Ka(yc,Ga.disputes),path:"/payments/disputes",wpOpenMenu:a,breadcrumbs:[n,Object(u.__)("Disputes","woocommerce-payments")]}),e.push({container:Ka(Lc,Ga.disputeDetails),path:"/payments/disputes/details",wpOpenMenu:a,breadcrumbs:[n,["/payments/disputes",Object(u.__)("Disputes","woocommerce-payments")],Object(u.__)("Dispute details","woocommerce-payments")]}),e.push({container:Ka(Za,Ga.disputeDetails),path:"/payments/disputes/challenge",wpOpenMenu:a,breadcrumbs:[n,["/payments/disputes",Object(u.__)("Disputes","woocommerce-payments")],Object(u.__)("Challenge dispute","woocommerce-payments")]}),e})},function(e,t,c){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var c=0,a=new Array(t);c<t;c++)a[c]=e[c];return a}function n(e,t){if(e){if("string"==typeof e)return a(e,t);var c=Object.prototype.toString.call(e).slice(8,-1);return"Object"===c&&e.constructor&&(c=e.constructor.name),"Map"===c||"Set"===c?Array.from(c):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?a(e,t):void 0}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var c=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(c.push(o.value),!t||c.length!==t);a=!0);}catch(e){n=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return c}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l,i,m,h,u=c(12),d=/<(\/)?(\w+)\s*(\/)?>/g;function v(e,t,c,a,n){return{element:e,tokenStart:t,tokenLength:c,prevOffset:a,leadingTextStart:n,children:[]}}var p=function(e){var t="object"===o(e),c=t&&Object.values(e);return t&&c.length&&c.every(function(e){return Object(u.isValidElement)(e)})};function f(e){var t=function(){var e=d.exec(l);if(null===e)return["no-more-tokens"];var t=e.index,c=r(e,4),a=c[0],n=c[1],o=c[2],s=c[3],i=a.length;if(s)return["self-closed",o,t,i];if(n)return["closer",o,t,i];return["opener",o,t,i]}(),c=r(t,4),a=c[0],n=c[1],o=c[2],p=c[3],f=h.length,b=o>i?i:null;if(!e[n])return g(),!1;switch(a){case"no-more-tokens":if(0!==f){var y=h.pop(),z=y.leadingTextStart,_=y.tokenStart;m.push(l.substr(z,_))}return g(),!1;case"self-closed":return 0===f?(null!==b&&m.push(l.substr(b,o-b)),m.push(e[n]),i=o+p,!0):(w(new v(e[n],o,p)),i=o+p,!0);case"opener":return h.push(new v(e[n],o,p,o+p,b)),i=o+p,!0;case"closer":if(1===f)return function(e){var t=h.pop(),c=t.element,a=t.leadingTextStart,n=t.prevOffset,r=t.tokenStart,o=t.children,i=e?l.substr(n,e-n):l.substr(n);i&&o.push(i);null!==a&&m.push(l.substr(a,r-a));m.push(u.cloneElement.apply(void 0,[c,null].concat(s(o))))}(o),i=o+p,!0;var E=h.pop(),O=l.substr(E.prevOffset,o-E.prevOffset);E.children.push(O),E.prevOffset=o+p;var k=new v(E.element,E.tokenStart,E.tokenLength,o+p);return k.children=E.children,w(k),i=o+p,!0;default:return g(),!1}}function g(){var e=l.length-i;0!==e&&m.push(l.substr(i,e))}function w(e){var t=e.element,c=e.tokenStart,a=e.tokenLength,n=e.prevOffset,r=e.children,o=h[h.length-1],i=l.substr(o.prevOffset,c-o.prevOffset);i&&o.children.push(i),o.children.push(u.cloneElement.apply(void 0,[t,null].concat(s(r)))),o.prevOffset=n||c+a}t.a=function(e,t){if(l=e,i=0,m=[],h=[],d.lastIndex=0,!p(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(f(t));return u.createElement.apply(void 0,[u.Fragment,null].concat(s(m)))}}]));
|
1 |
+
!function(e,t){for(var c in t)e[c]=t[c]}(this,function(e){var t={};function c(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,c),n.l=!0,n.exports}return c.m=e,c.c=t,c.d=function(e,t,a){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(c.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(a,n,function(t){return e[t]}.bind(null,n));return a},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="",c(c.s=62)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wc.components}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,c){var a=c(7);e.exports=function(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{},n=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(c).filter(function(e){return Object.getOwnPropertyDescriptor(c,e).enumerable}))),n.forEach(function(t){a(e,t,c[t])})}return e}},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){!function(){e.exports=this.moment}()},function(e,t){e.exports=function(e,t,c){return t in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){!function(){e.exports=this.wc.navigation}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.dataControls}()},function(e,t,c){var a;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
9 |
Licensed under the MIT License (MIT), see
|
10 |
http://jedwatson.github.io/classnames
|
11 |
*/
|
12 |
+
!function(){"use strict";var c={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var r=typeof a;if("string"===r||"number"===r)e.push(a);else if(Array.isArray(a)&&a.length){var o=n.apply(null,a);o&&e.push(o)}else if("object"===r)for(var s in a)c.call(a,s)&&a[s]&&e.push(s)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()},function(e,t,c){var a=c(39),n=c(40),r=c(41);e.exports=function(e,t){return a(e)||n(e,t)||r()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wc.currency}()},function(e,t){function c(e,t,c,a,n,r,o){try{var s=e[r](o),l=s.value}catch(e){return void c(e)}s.done?t(l):Promise.resolve(l).then(a,n)}e.exports=function(e){return function(){var t=this,a=arguments;return new Promise(function(n,r){var o=e.apply(t,a);function s(e){c(o,n,r,s,l,"next",e)}function l(e){c(o,n,r,s,l,"throw",e)}s(void 0)})}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,c){"use strict";var a=c(0),n=(c(27),["primary","light","warning","alert"]);t.a=function(e){var t=e.message,c=e.type,r=e.isCompact,o=["chip","chip-".concat(n.find(function(e){return e===c})||"primary"),r?"is-compact":""];return Object(a.createElement)("span",{className:o.join(" ").trim()},t)}},function(e,t,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t,c=1;c<arguments.length;c++)for(var a in t=arguments[c])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n=function(){function e(e,t){for(var c,a=0;a<t.length;a++)(c=t[a]).enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}return function(t,c,a){return c&&e(t.prototype,c),a&&e(t,a),t}}(),r=c(12),o=l(r),s=l(c(44));function l(e){return e&&e.__esModule?e:{default:e}}var i=function(e,t){return 0<=t.indexOf(e)},m=function(e){return 0==e%18},h=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle","gridicons-reader-follow","gridicons-reader-following"],u=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"],d=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"],v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.PureComponent),n(t,[{key:"render",value:function(){var e=this.props,t=e.size,c=e.onClick,n=e.icon,r=e.className,s=function(e,t){var c={};for(var a in e)0<=t.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(c[a]=e[a]);return c}(e,["size","onClick","icon","className"]),l="gridicons-"+n,v=void 0,p=["gridicon",l,r,!!(i(l,h)&&m(t))&&"needs-offset",!!(i(l,u)&&m(t))&&"needs-offset-x",!!(i(l,d)&&m(t))&&"needs-offset-y"].filter(Boolean).join(" ");switch(l){default:v=o.default.createElement("svg",a({height:t,width:t},s));break;case"gridicons-add-image":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-bell":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 15h-4v-2H2v6c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2v-6h-8v2zm6-9h-2V4c0-1.105-.895-2-2-2H8c-1.105 0-2 .895-2 2v2H4c-1.105 0-2 .895-2 2v4h20V8c0-1.105-.895-2-2-2zm-4 0H8V4h8v2z"})));break;case"gridicons-bug":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14h4v-2h-4v-2h1a2 2 0 0 0 2-2V6h-2v2H5V6H3v2a2 2 0 0 0 2 2h1v2H2v2h4v1a6 6 0 0 0 .09 1H5a2 2 0 0 0-2 2v2h2v-2h1.81A6 6 0 0 0 11 20.91V10h2v10.91A6 6 0 0 0 17.19 18H19v2h2v-2a2 2 0 0 0-2-2h-1.09a6 6 0 0 0 .09-1zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z"})));break;case"gridicons-calendar":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-caption":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 15l2-2v5c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h13l-2 2H4v12h16v-3zm2.44-8.56l-.88-.88c-.586-.585-1.534-.585-2.12 0L12 13v2H6v2h9v-1l7.44-7.44c.585-.586.585-1.534 0-2.12z"})));break;case"gridicons-cart":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-chat":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 12c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H9v3l-3-3H3zM21 18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-6v1c0 2.2-1.8 4-4 4v2c0 1.1.9 2 2 2h2v3l3-3h3z"})));break;case"gridicons-checkmark-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 12l-5.45 6.5L16 17.21 20.39 12 16 6.79l1.55-1.29zM8 6.79L6.45 5.5 1 12l5.45 6.5L8 17.21 3.61 12zm.45 14.61l1.93.52L15.55 2.6l-1.93-.52z"})));break;case"gridicons-cog":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"})));break;case"gridicons-computer":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-coupon":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 16v2h-2v-2h2zm3-3h2v-2h-2v2zm2 8h-2v2h2v-2zm3-5v2h2v-2h-2zm-1-3c.552 0 1 .448 1 1h2c0-1.657-1.343-3-3-3v2zm1 7c0 .552-.448 1-1 1v2c1.657 0 3-1.343 3-3h-2zm-7 1c-.552 0-1-.448-1-1h-2c0 1.657 1.343 3 3 3v-2zm3.21-5.21c-.78.78-2.047.782-2.828.002l-.002-.002L10 11.41l-1.43 1.44c.28.506.427 1.073.43 1.65C9 16.433 7.433 18 5.5 18S2 16.433 2 14.5 3.567 11 5.5 11c.577.003 1.144.15 1.65.43L8.59 10 7.15 8.57c-.506.28-1.073.427-1.65.43C3.567 9 2 7.433 2 5.5S3.567 2 5.5 2 9 3.567 9 5.5c-.003.577-.15 1.144-.43 1.65L10 8.59l3.88-3.88c.78-.78 2.047-.782 2.828-.002l.002.002-5.3 5.29 5.8 5.79zM5.5 7C6.328 7 7 6.328 7 5.5S6.328 4 5.5 4 4 4.672 4 5.5 4.672 7 5.5 7zM7 14.5c0-.828-.672-1.5-1.5-1.5S4 13.672 4 14.5 4.672 16 5.5 16 7 15.328 7 14.5z"})));break;case"gridicons-create":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"}),o.default.createElement("path",{d:"M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"})));break;case"gridicons-credit-card":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})));break;case"gridicons-cross-small":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"})));break;case"gridicons-custom-post-type":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-domains":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm6.918 6h-3.215c-.188-1.424-.42-2.65-.565-3.357 1.593.682 2.916 1.87 3.78 3.357zm-5.904-3.928c.068.352.387 2.038.645 3.928h-3.32c.26-1.89.578-3.576.646-3.928C11.32 4.03 11.656 4 12 4s.68.03 1.014.072zM14 12c0 .598-.043 1.286-.11 2h-3.78c-.067-.714-.11-1.402-.11-2s.043-1.286.11-2h3.78c.067.714.11 1.402.11 2zM8.862 4.643C8.717 5.35 8.485 6.576 8.297 8H5.082c.864-1.487 2.187-2.675 3.78-3.357zM4.262 10h3.822c-.05.668-.084 1.344-.084 2s.033 1.332.085 2H4.263C4.097 13.36 4 12.692 4 12s.098-1.36.263-2zm.82 6h3.215c.188 1.424.42 2.65.565 3.357-1.593-.682-2.916-1.87-3.78-3.357zm5.904 3.928c-.068-.353-.388-2.038-.645-3.928h3.32c-.26 1.89-.578 3.576-.646 3.928-.333.043-.67.072-1.014.072s-.68-.03-1.014-.072zm4.152-.57c.145-.708.377-1.934.565-3.358h3.215c-.864 1.487-2.187 2.675-3.78 3.357zm4.6-5.358h-3.822c.05-.668.084-1.344.084-2s-.033-1.332-.085-2h3.82c.167.64.265 1.308.265 2s-.097 1.36-.263 2z"})));break;case"gridicons-dropdown":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM7.5 13.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5S9 11.2 9 12s-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z"})));break;case"gridicons-ellipsis":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-filter":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"})));break;case"gridicons-flag":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-fullscreen-exit":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 10V4h2v2.59l3.29-3.29 1.41 1.41L17.41 8H20v2zM4 10V8h2.59l-3.3-3.29 1.42-1.42L8 6.59V4h2v6zm16 4v2h-2.59l3.29 3.29-1.41 1.41L16 17.41V20h-2v-6zm-10 0v6H8v-2.59l-3.29 3.3-1.42-1.42L6.59 16H4v-2z"})));break;case"gridicons-fullscreen":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})));break;case"gridicons-gift":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 6h-4.8c.5-.5.8-1.2.8-2 0-1.7-1.3-3-3-3s-3 1.3-3 3c0-1.7-1.3-3-3-3S6 2.3 6 4c0 .8.3 1.5.8 2H2v6h1v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h1V6zm-2 4h-7V8h7v2zm-5-7c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM9 3c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM4 8h7v2H4V8zm1 4h6v8H5v-8zm14 8h-6v-8h6v8z"})));break;case"gridicons-globe":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading-h1":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 7h2v10h-2v-4H7v4H5V7h2v4h4V7zm6.57 0c-.594.95-1.504 1.658-2.57 2v1h2v7h2V7h-1.43z"})));break;case"gridicons-heading-h2":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 7h2v10H9v-4H5v4H3V7h2v4h4V7zm8 8c.51-.41.6-.62 1.06-1.05.437-.4.848-.828 1.23-1.28.334-.39.62-.82.85-1.28.2-.39.305-.822.31-1.26.005-.44-.087-.878-.27-1.28-.177-.385-.437-.726-.76-1-.346-.283-.743-.497-1.17-.63-.485-.153-.99-.227-1.5-.22-.36 0-.717.033-1.07.1-.343.06-.678.158-1 .29-.304.13-.593.295-.86.49-.287.21-.56.437-.82.68l1.24 1.22c.308-.268.643-.502 1-.7.35-.2.747-.304 1.15-.3.455-.03.906.106 1.27.38.31.278.477.684.45 1.1-.014.396-.14.78-.36 1.11-.285.453-.62.872-1 1.25-.44.43-.98.92-1.59 1.43-.61.51-1.41 1.06-2.16 1.65V17h8v-2h-4z"})));break;case"gridicons-heading-h3":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.11 14.218c.355.287.75.523 1.17.7.434.18.9.273 1.37.27.484.017.965-.086 1.4-.3.333-.146.55-.476.55-.84.003-.203-.05-.403-.15-.58-.123-.19-.3-.34-.51-.43-.32-.137-.655-.228-1-.27-.503-.073-1.012-.106-1.52-.1v-1.57c.742.052 1.485-.07 2.17-.36.37-.164.615-.525.63-.93.026-.318-.12-.627-.38-.81-.34-.203-.734-.3-1.13-.28-.395.013-.784.108-1.14.28-.375.167-.73.375-1.06.62l-1.22-1.39c.5-.377 1.053-.68 1.64-.9.608-.224 1.252-.336 1.9-.33.525-.007 1.05.05 1.56.17.43.1.84.277 1.21.52.325.21.595.495.79.83.19.342.287.73.28 1.12.01.48-.177.943-.52 1.28-.417.39-.916.685-1.46.86v.06c.61.14 1.175.425 1.65.83.437.382.68.94.66 1.52.005.42-.113.835-.34 1.19-.23.357-.538.657-.9.88-.408.253-.853.44-1.32.55-.514.128-1.04.192-1.57.19-.786.02-1.57-.106-2.31-.37-.59-.214-1.126-.556-1.57-1l1.12-1.41zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})));break;case"gridicons-heading-h4":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm10-2h-1v2h-2v-2h-5v-2l4.05-6H20v6h1v2zm-3-2V9l-2.79 4H18z"})));break;case"gridicons-heading-h5":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.09 14.19c.352.27.73.5 1.13.69.42.196.877.296 1.34.29.51.014 1.01-.125 1.44-.4.378-.253.594-.686.57-1.14.02-.45-.197-.877-.57-1.13-.406-.274-.89-.41-1.38-.39h-.47c-.135.014-.27.04-.4.08l-.41.15-.48.23-1.02-.57.28-5h6.4v1.92h-4.31L16 10.76c.222-.077.45-.138.68-.18.235-.037.472-.054.71-.05.463-.004.924.057 1.37.18.41.115.798.305 1.14.56.33.248.597.57.78.94.212.422.322.888.32 1.36.007.497-.11.99-.34 1.43-.224.417-.534.782-.91 1.07-.393.3-.837.527-1.31.67-.497.164-1.016.252-1.54.26-.788.023-1.573-.11-2.31-.39-.584-.238-1.122-.577-1.59-1l1.09-1.42zM11 17H9v-4H5v4H3V7h2v4h4V7h2v10z"})));break;case"gridicons-heading-h6":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm8.58-7.508c-.248-.204-.524-.37-.82-.49-.625-.242-1.317-.242-1.94 0-.3.11-.566.287-.78.52-.245.27-.432.586-.55.93-.16.46-.243.943-.25 1.43.367-.33.79-.59 1.25-.77.405-.17.84-.262 1.28-.27.415-.006.83.048 1.23.16.364.118.704.304 1 .55.295.253.528.57.68.93.193.403.302.843.32 1.29.01.468-.094.93-.3 1.35-.206.387-.49.727-.83 1-.357.287-.764.504-1.2.64-.98.31-2.033.293-3-.05-.507-.182-.968-.472-1.35-.85-.437-.416-.778-.92-1-1.48-.243-.693-.352-1.426-.32-2.16-.02-.797.11-1.59.38-2.34.215-.604.556-1.156 1-1.62.406-.416.897-.74 1.44-.95.54-.21 1.118-.314 1.7-.31.682-.02 1.36.096 2 .34.5.19.962.464 1.37.81l-1.31 1.34zm-2.39 5.84c.202 0 .405-.03.6-.09.183-.046.356-.128.51-.24.15-.136.27-.303.35-.49.092-.225.136-.467.13-.71.037-.405-.123-.804-.43-1.07-.328-.23-.72-.347-1.12-.33-.346-.002-.687.07-1 .21-.383.17-.724.418-1 .73.046.346.143.683.29 1 .108.23.257.44.44.62.152.15.337.26.54.33.225.055.46.068.69.04z"})));break;case"gridicons-heading":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"})));break;case"gridicons-help":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"})));break;case"gridicons-history":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),o.default.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image-remove":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20.587 3.423L22 4.837 20 6.84V18c0 1.105-.895 2-2 2H6.84l-2.007 2.006-1.414-1.414 17.167-17.17zM12.42 14.42l1 1 1-1c.63-.504 1.536-.456 2.11.11L18 16V8.84l-5.58 5.58zM15.16 6H6v6.38l2.19-2.19 1.39 1.39L4 17.163V6c0-1.105.895-2 2-2h11.162l-2 2z"})));break;case"gridicons-image":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 6v12c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H6v6.38l2.19-2.19 5.23 5.23 1-1c.63-.504 1.536-.456 2.11.11L18 16V6zm-5 3.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5z"})));break;case"gridicons-indent-left":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-line-graph":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v2H3zm3-3c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3L8.8 10H9c.5 0 1-.2 1.3-.5l2.7 1.4v.1c0 1.1.9 2 2 2s2-.9 2-2c0-.5-.2-.9-.5-1.3L17.8 7h.2c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2c0 .5.2 1 .5 1.3L15.2 9H15c-.5 0-1 .2-1.3.5L11 8.2V8c0-1.1-.9-2-2-2s-2 .9-2 2c0 .5.2 1 .5 1.3L6.2 12H6c-1.1 0-2 .9-2 2s.9 2 2 2z"})));break;case"gridicons-link-break":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered-rtl":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h13v-2H3v2zm0-6h13v-2H3v2zm0-8v2h13V5H3zm16.587.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H19.97L18.5 4.915l.6.738.487-.4zm.448 7.826c.475-.426.785-.715.93-.867.146-.15.262-.296.35-.434.088-.138.153-.278.195-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608-.12-.18-.29-.32-.507-.417-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067-.177.045-.34.11-.49.195-.15.084-.337.225-.558.422l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.03.304.096.072.064.108.152.108.264 0 .09-.018.176-.054.258-.035.082-.1.18-.19.294-.093.114-.288.328-.587.64L18.547 13.3v.762h3.108v-.955h-1.62v-.03zm.46 4.747v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.175-.6-.263-1.043-.263-.308 0-.58.033-.817.1s-.47.178-.696.334l.48.774c.293-.184.576-.275.85-.275.147 0 .263.026.35.08.087.056.13.14.13.253 0 .3-.294.45-.882.45h-.27v.87h.264c.216 0 .392.017.526.05.135.03.232.08.293.143.06.064.09.154.09.27 0 .153-.058.265-.174.337-.116.07-.3.106-.555.106-.163 0-.342-.023-.537-.07-.194-.045-.385-.116-.573-.212v.96c.228.09.44.15.637.183.196.034.41.05.64.05.56 0 .998-.113 1.314-.342.316-.228.474-.542.474-.94.003-.585-.355-.923-1.07-1.013z"})));break;case"gridicons-list-ordered":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 0 0 0 20v-2a8 8 0 1 1 8-8v.5a1.5 1.5 0 0 1-3 0V7h-2v1a5 5 0 1 0 1 7 3.5 3.5 0 0 0 6-2.46V12A10 10 0 0 0 12 2zm0 13a3 3 0 1 1 3-3 3 3 0 0 1-3 3z"})));break;case"gridicons-menu":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9v1a7 7 0 0 1-6 6.92V20h3v2H8v-2h3v-3.08A7 7 0 0 1 5 10V9h2v1a5 5 0 0 0 10 0V9zm-7 4a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3z"})));break;case"gridicons-minus-small":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-money":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 5v14h20V5H2zm5 12c0-1.657-1.343-3-3-3v-4c1.657 0 3-1.343 3-3h10c0 1.657 1.343 3 3 3v4c-1.657 0-3 1.343-3 3H7zm5-8c1.1 0 2 1.3 2 3s-.9 3-2 3-2-1.3-2-3 .9-3 2-3z"})));break;case"gridicons-multiple-users":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M24 14.6c0 .6-1.2 1-2.6 1.2-.9-1.7-2.7-3-4.8-3.9.2-.3.4-.5.6-.8h.8c3.1-.1 6 1.8 6 3.5zM6.8 11H6c-3.1 0-6 1.9-6 3.6 0 .6 1.2 1 2.6 1.2.9-1.7 2.7-3 4.8-3.9l-.6-.9zm5.2 1c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0 1c-4.1 0-8 2.6-8 5 0 2 8 2 8 2s8 0 8-2c0-2.4-3.9-5-8-5zm5.7-3h.3c1.7 0 3-1.3 3-3s-1.3-3-3-3c-.5 0-.9.1-1.3.3.8 1 1.3 2.3 1.3 3.7 0 .7-.1 1.4-.3 2zM6 10h.3C6.1 9.4 6 8.7 6 8c0-1.4.5-2.7 1.3-3.7C6.9 4.1 6.5 4 6 4 4.3 4 3 5.3 3 7s1.3 3 3 3z"})));break;case"gridicons-my-sites-horizon":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-nametag":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6a1 1 0 1 1-1 1 1 1 0 0 1 1-1zm-6 8h12v3H6zm14-8h-4V3H8v3H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM10 5h4v5h-4zm10 14H4v-9h4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h4z"})));break;case"gridicons-next-page":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-8V6h8v2zm4-4v8l-6 6H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H8v12h6v-4c0-1.105.895-2 2-2h4V4zM4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6z"})));break;case"gridicons-not-visible":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-offline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 3h8l-4 6h4L6 21l4-9H6l4-9"})));break;case"gridicons-pages":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pause":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"})));break;case"gridicons-pencil":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-pin":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 17c0-2.038-1.188-3.836-3-4.92V5h.5c.828 0 1.5-.672 1.5-1.5S17.328 2 16.5 2h-9C6.672 2 6 2.672 6 3.5S6.672 5 7.5 5H8v7.08C6.188 13.164 5 14.962 5 17h6v4c0 .55.45 1 1 1s1-.45 1-1v-4h6z"})));break;case"gridicons-plans":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm-1 12H6l5-10v10zm2 6V10h5l-5 10z"})));break;case"gridicons-play":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"})));break;case"gridicons-plugins":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 13h-8v8h-2v-8H3v-2h8V3h2v8h8v2z"})));break;case"gridicons-popout":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-product-downloadable":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-6-10v5.17l2.59-2.58L17 14l-5 5-5-5 1.41-1.42L11 15.17V10h2z"})));break;case"gridicons-product-external":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-2-9v6h-2v-2.59l-3.29 3.29-1.41-1.41L13.59 13H11v-2h6z"})));break;case"gridicons-product-virtual":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM7 16.45c0-1.005.815-1.82 1.82-1.82h.09c-.335-1.59.68-3.148 2.27-3.483s3.148.68 3.483 2.27c.02.097.036.195.046.293 1.252-.025 2.29.97 2.314 2.224.017.868-.462 1.67-1.235 2.066H7.87c-.54-.33-.87-.917-.87-1.55z"})));break;case"gridicons-product":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM9 11h6c0 1.105-.895 2-2 2h-2c-1.105 0-2-.895-2-2z"})));break;case"gridicons-quote":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-read-more":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"})));break;case"gridicons-reader-follow-conversation":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 14v-3h-2v3h-3v2h3v3h2v-3h3v-2"}),o.default.createElement("path",{d:"M13 16h-2l-5 5v-5H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v4h-4v3h-3v4z"})));break;case"gridicons-reader-follow":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 16v2h-3v3h-2v-3h-3v-2h3v-3h2v3h3zM20 2v9h-4v3h-3v4H4c-1.1 0-2-.9-2-2V2h18zM8 13v-1H4v1h4zm3-3H4v1h7v-1zm0-2H4v1h7V8zm7-4H4v2h14V4z"})));break;case"gridicons-reader-following-conversation":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.8 14.5l3.2-3.2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h2v5l8.7-8.7 2.1 2.2z"}),o.default.createElement("path",{d:"M22.6 11.1l-6.1 6.1-2.1-2.2-1.4 1.4 3.5 3.6 7.5-7.6"})));break;case"gridicons-reader-following":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 13.482L15.508 21 12 17.4l1.412-1.388 2.106 2.188 6.094-6.094L23 13.482zm-7.455 1.862L20 10.89V2H2v14c0 1.1.9 2 2 2h4.538l4.913-4.832 2.095 2.176zM8 13H4v-1h4v1zm3-2H4v-1h7v1zm0-2H4V8h7v1zm7-3H4V4h14v2z"})));break;case"gridicons-reader":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reblog":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-refund":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13.91 2.91L11.83 5H14c4.418 0 8 3.582 8 8h-2c0-3.314-2.686-6-6-6h-2.17l2.09 2.09-1.42 1.41L8 6l1.41-1.41L12.5 1.5l1.41 1.41zM2 12v10h16V12H2zm2 6.56v-3.11c.6-.35 1.1-.85 1.45-1.45h9.1c.35.6.85 1.1 1.45 1.45v3.11c-.593.35-1.085.845-1.43 1.44H5.45c-.35-.597-.85-1.094-1.45-1.44zm6 .44c.828 0 1.5-.895 1.5-2s-.672-2-1.5-2-1.5.895-1.5 2 .672 2 1.5 2z"})));break;case"gridicons-reply":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h7.2l-2.6 2.6L15 20l5-5-5-5-1.4 1.4 2.6 2.6H9c-2.2 0-4-1.8-4-4s1.8-4 4-4h2V4H9c-3.3 0-6 2.7-6 6s2.7 6 6 6z"})));break;case"gridicons-resize":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));break;case"gridicons-rotate":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-computer":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6v2H7v2h10v-2h-3v-2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 14H4V4h16zm-3.25-3a1.75 1.75 0 0 1-3.5 0L10 11.36a1.71 1.71 0 1 1 0-2.71L13.25 7a1.77 1.77 0 1 1 .68 1.37L10.71 10l3.22 1.61A1.74 1.74 0 0 1 16.75 13z"})));break;case"gridicons-share-ios":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-shipping":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-2V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10h2c0 1.657 1.343 3 3 3s3-1.343 3-3h4c0 1.657 1.343 3 3 3s3-1.343 3-3h2v-5l-4-4zM7 18.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5zM4 14V7h10v7H4zm13 4.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5z"})));break;case"gridicons-shutter":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.9 4.8s-.7 5.6-3.5 10.2c1.7-.3 3.9-.9 6.6-2 0 0 .7-4.6-3.1-8.2zm-6 2.8c-1.1-1.3-2.7-3-5-4.7C5.1 4.2 3 6.6 2.3 9.6 7 7.7 11 7.5 12.9 7.6zm3.4 2.9c.6-1.6 1.2-3.9 1.6-6.7-4.1-3-8.6-1.5-8.6-1.5s4.4 3.4 7 8.2zm-5.2 6c1.1 1.3 2.7 3 5 4.7 0 0 4.3-1.6 5.6-6.7 0-.1-5.3 2.1-10.6 2zm-3.4-3.1c-.6 1.6-1.2 3.8-1.5 6.7 0 0 3.6 2.9 8.6 1.5 0 0-4.6-3.4-7.1-8.2zM2 11.1s-.7 4.5 3.1 8.2c0 0 .7-5.7 3.5-10.3-1.7.3-4 .9-6.6 2.1z"})));break;case"gridicons-sign-out":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-site":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm-5 14H6v-7h7zm5 0h-3v-7h3zm0-9H6V6h12z"})));break;case"gridicons-spam":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats-down-alt":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 3H4v14h4V3zm6 3h-4v11h4V6zm6 4h-4v7h4v-7z"})));break;case"gridicons-stats-down":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7V7h2v10zm4 0h-2v-7h2v7zm4 0h-2v-5h2v5z"})));break;case"gridicons-stats-up-alt":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-4h-4v11h4V6zm6-3h-4v14h4V3z"})));break;case"gridicons-stats-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2v-7h2v7zm4 0h-2V7h2v10z"})));break;case"gridicons-stats":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-add":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("circle",{cx:"15",cy:"8",r:"4"}),o.default.createElement("path",{d:"M15 20s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2zM6 10V7H4v3H1v2h3v3h2v-3h3v-2z"})));break;case"gridicons-user-circle":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video-remove":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.42 4.59l1.167-1.167L22 4.837 20 6.84V18c0 1.105-.895 2-2 2v-2h-2v2H6.84l-2.007 2.006-1.414-1.414 1.17-1.172-.01-.01L8 16 18 6l1.41-1.42.01.01zM15.84 11H18V8.84L15.84 11zM16 8.01l.01-.01H16v.01zM6 15.17l-2 2V6c0-1.105.895-2 2-2v2h2V4h9.17l-9 9H6v2.17zM6 8v3h2V8H6zm12 8v-3h-2v3h2z"})));break;case"gridicons-video":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4h8v1.997h2V4c1.105 0 2 .896 2 2v12c0 1.104-.895 2-2 2v-2.003h-2V20H8v-2.003H6V20c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2v1.997h2V4zm2 11l4.5-3L10 9v6zm8 .997v-3h-2v3h2zm0-5v-3h-2v3h2zm-10 5v-3H6v3h2zm0-5v-3H6v3h2z"})));break;case"gridicons-visible":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})));break;case"gridicons-zoom-in":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15.8 13.8c.7-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7 3.1 7 7 7c1.4 0 2.7-.4 3.8-1.2L19 21l2-2-5.2-5.2zM10 15c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z"}),o.default.createElement("path",{d:"M11 7H9v2H7v2h2v2h2v-2h2V9h-2"})));break;case"gridicons-zoom-out":v=o.default.createElement("svg",a({className:p,height:t,width:t,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 10c0 3.9 3.1 7 7 7 1.4 0 2.7-.5 3.8-1.2L19 21l2-2-5.2-5.2c.8-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7zm2 0c0-2.8 2.2-5 5-5s5 2.2 5 5-2.2 5-5 5-5-2.2-5-5z"}),o.default.createElement("path",{d:"M7 9h6v2H7z"})))}return v}}]),t}();v.defaultProps={size:24},v.propTypes={icon:s.default.string.isRequired,size:s.default.number,onClick:s.default.func,className:s.default.string},t.default=v,e.exports=t.default},function(e,t){function c(){return e.exports=c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var c=arguments[t];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a])}return e},c.apply(this,arguments)}e.exports=c},,function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,c){var a=c(48);e.exports=function(e,t){if(null==e)return{};var c,n,r=a(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)c=o[n],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(r[c]=e[c])}return r}},function(e,t,c){},function(e,t){function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(t){return"function"==typeof Symbol&&"symbol"===c(Symbol.iterator)?e.exports=a=function(e){return c(e)}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":c(e)},a(t)}e.exports=a},,,,function(e,t,c){},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,c){(function(e){var a=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),c={},a=0;a<t.length;a++)c[t[a]]=Object.getOwnPropertyDescriptor(e,t[a]);return c},n=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],c=0;c<arguments.length;c++)t.push(s(arguments[c]));return t.join(" ")}c=1;for(var a=arguments,r=a.length,o=String(e).replace(n,function(e){if("%%"===e)return"%";if(c>=r)return e;switch(e){case"%s":return String(a[c++]);case"%d":return Number(a[c++]);case"%j":try{return JSON.stringify(a[c++])}catch(e){return"[Circular]"}default:return e}}),l=a[c];c<r;l=a[++c])p(l)||!y(l)?o+=" "+l:o+=" "+s(l);return o},t.deprecate=function(c,a){if(void 0!==e&&!0===e.noDeprecation)return c;if(void 0===e)return function(){return t.deprecate(c,a).apply(this,arguments)};var n=!1;return function(){if(!n){if(e.throwDeprecation)throw new Error(a);e.traceDeprecation?console.trace(a):console.error(a),n=!0}return c.apply(this,arguments)}};var r,o={};function s(e,c){var a={seen:[],stylize:i};return arguments.length>=3&&(a.depth=arguments[2]),arguments.length>=4&&(a.colors=arguments[3]),v(c)?a.showHidden=c:c&&t._extend(a,c),w(a.showHidden)&&(a.showHidden=!1),w(a.depth)&&(a.depth=2),w(a.colors)&&(a.colors=!1),w(a.customInspect)&&(a.customInspect=!0),a.colors&&(a.stylize=l),m(a,e,a.depth)}function l(e,t){var c=s.styles[t];return c?"["+s.colors[c][0]+"m"+e+"["+s.colors[c][1]+"m":e}function i(e,t){return e}function m(e,c,a){if(e.customInspect&&c&&_(c.inspect)&&c.inspect!==t.inspect&&(!c.constructor||c.constructor.prototype!==c)){var n=c.inspect(a,e);return g(n)||(n=m(e,n,a)),n}var r=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(g(t)){var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(c,"string")}if(f(t))return e.stylize(""+t,"number");if(v(t))return e.stylize(""+t,"boolean");if(p(t))return e.stylize("null","null")}(e,c);if(r)return r;var o=Object.keys(c),s=function(e){var t={};return e.forEach(function(e,c){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(c)),E(c)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(c);if(0===o.length){if(_(c)){var l=c.name?": "+c.name:"";return e.stylize("[Function"+l+"]","special")}if(b(c))return e.stylize(RegExp.prototype.toString.call(c),"regexp");if(z(c))return e.stylize(Date.prototype.toString.call(c),"date");if(E(c))return h(c)}var i,y="",O=!1,k=["{","}"];(d(c)&&(O=!0,k=["[","]"]),_(c))&&(y=" [Function"+(c.name?": "+c.name:"")+"]");return b(c)&&(y=" "+RegExp.prototype.toString.call(c)),z(c)&&(y=" "+Date.prototype.toUTCString.call(c)),E(c)&&(y=" "+h(c)),0!==o.length||O&&0!=c.length?a<0?b(c)?e.stylize(RegExp.prototype.toString.call(c),"regexp"):e.stylize("[Object]","special"):(e.seen.push(c),i=O?function(e,t,c,a,n){for(var r=[],o=0,s=t.length;o<s;++o)M(t,String(o))?r.push(u(e,t,c,a,String(o),!0)):r.push("");return n.forEach(function(n){n.match(/^\d+$/)||r.push(u(e,t,c,a,n,!0))}),r}(e,c,a,s,o):o.map(function(t){return u(e,c,a,s,t,O)}),e.seen.pop(),function(e,t,c){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return c[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+c[1];return c[0]+t+" "+e.join(", ")+" "+c[1]}(i,y,k)):k[0]+y+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,c,a,n,r){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),M(a,n)||(o="["+n+"]"),s||(e.seen.indexOf(l.value)<0?(s=p(c)?m(e,l.value,null):m(e,l.value,c-1)).indexOf("\n")>-1&&(s=r?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),w(o)){if(r&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function p(e){return null===e}function f(e){return"number"==typeof e}function g(e){return"string"==typeof e}function w(e){return void 0===e}function b(e){return y(e)&&"[object RegExp]"===O(e)}function y(e){return"object"==typeof e&&null!==e}function z(e){return y(e)&&"[object Date]"===O(e)}function E(e){return y(e)&&("[object Error]"===O(e)||e instanceof Error)}function _(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(c){if(w(r)&&(r=e.env.NODE_DEBUG||""),c=c.toUpperCase(),!o[c])if(new RegExp("\\b"+c+"\\b","i").test(r)){var a=e.pid;o[c]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",c,a,e)}}else o[c]=function(){};return o[c]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=v,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=f,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=b,t.isObject=y,t.isDate=z,t.isError=E,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=c(51);var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),H[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",V(),t.format.apply(t,arguments))},t.inherits=c(52),t._extend=function(e,t){if(!t||!y(t))return e;for(var c=Object.keys(t),a=c.length;a--;)e[c[a]]=t[c[a]];return e};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var c=new Error("Promise was rejected with a falsy value");c.reason=e,e=c}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t;if("function"!=typeof(t=e[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,c,a=new Promise(function(e,a){t=e,c=a}),n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);n.push(function(e,a){e?c(e):t(a)});try{e.apply(this,n)}catch(e){c(e)}return a}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,a(e))},t.promisify.custom=j,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function c(){for(var c=[],a=0;a<arguments.length;a++)c.push(arguments[a]);var n=c.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var r=this,o=function(){return n.apply(r,arguments)};t.apply(this,c).then(function(t){e.nextTick(o,null,t)},function(t){e.nextTick(x,t,o)})}return Object.setPrototypeOf(c,Object.getPrototypeOf(t)),Object.defineProperties(c,a(t)),c}}).call(this,c(50))},,,function(e,t,c){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var c=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(c.push(o.value),!t||c.length!==t);a=!0);}catch(e){n=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return c}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,c){},function(e,t,c){},function(e,t,c){e.exports=c(45)()},function(e,t,c){"use strict";var a=c(46);function n(){}function r(){}r.resetWarningCache=n,e.exports=function(){function e(e,t,c,n,r,o){if(o!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var c={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:n};return c.PropTypes=c,c}},function(e,t,c){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,c){},function(e,t){e.exports=function(e,t){if(null==e)return{};var c,a,n={},r=Object.keys(e);for(a=0;a<r.length;a++)c=r[a],t.indexOf(c)>=0||(n[c]=e[c]);return n}},function(e,t,c){},function(e,t){var c,a,n=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{a="function"==typeof clearTimeout?clearTimeout:o}catch(e){a=o}}();var l,i=[],m=!1,h=-1;function u(){m&&l&&(m=!1,l.length?i=l.concat(i):h=-1,i.length&&d())}function d(){if(!m){var e=s(u);m=!0;for(var t=i.length;t;){for(l=i,i=[];++h<t;)l&&l[h].run();h=-1,t=i.length}l=null,m=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===o||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)t[c-1]=arguments[c];i.push(new v(e,t)),1!==i.length||m||s(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var c=function(){};c.prototype=t.prototype,e.prototype=new c,e.prototype.constructor=e}},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},function(e,t,c){},,function(e,t,c){"use strict";c.r(t);var a={};c.r(a),c.d(a,"getDeposit",function(){return tt}),c.d(a,"getDepositsOverview",function(){return ct}),c.d(a,"getDepositsOverviewError",function(){return at}),c.d(a,"getDeposits",function(){return rt}),c.d(a,"getDepositQueryError",function(){return ot});var n={};c.r(n),c.d(n,"updateDeposit",function(){return st}),c.d(n,"updateDepositsOverview",function(){return lt}),c.d(n,"updateErrorForDepositsOverview",function(){return it}),c.d(n,"updateDeposits",function(){return mt}),c.d(n,"updateErrorForDepositQuery",function(){return ht});var r={};c.r(r),c.d(r,"getDeposit",function(){return bt}),c.d(r,"getDepositsOverview",function(){return yt}),c.d(r,"getDeposits",function(){return zt});var o={};c.r(o),c.d(o,"getTransactions",function(){return Vt}),c.d(o,"getTransactionsError",function(){return Mt}),c.d(o,"getTransactionsSummary",function(){return xt}),c.d(o,"getTransactionsSummaryError",function(){return Ct});var s={};c.r(s),c.d(s,"updateTransactions",function(){return Lt}),c.d(s,"updateErrorForTransactions",function(){return Nt}),c.d(s,"updateTransactionsSummary",function(){return St}),c.d(s,"updateErrorForTransactionsSummary",function(){return Tt});var l={};c.r(l),c.d(l,"getTransactions",function(){return Pt}),c.d(l,"getTransactionsSummary",function(){return Ft});var i={};c.r(i),c.d(i,"getCharge",function(){return Wt}),c.d(i,"getChargeError",function(){return Yt});var m={};c.r(m),c.d(m,"updateCharge",function(){return Zt}),c.d(m,"updateErrorForCharge",function(){return Qt});var h={};c.r(h),c.d(h,"getCharge",function(){return $t});var u={};c.r(u),c.d(u,"getTimeline",function(){return Xt}),c.d(u,"getTimelineError",function(){return ec});var d={};c.r(d),c.d(d,"updateTimeline",function(){return tc}),c.d(d,"updateErrorForTimeline",function(){return cc});var v={};c.r(v),c.d(v,"getTimeline",function(){return nc});var p=c(1),f=c(33),g=(c(38),c(15)),w=c.n(g),b=c(0),y=c(2),z=c(3),E=c(14),_=c.n(E);function O(e,t,c){return t in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}function k(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{},a=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(c).filter(function(e){return Object.getOwnPropertyDescriptor(c,e).enumerable}))),a.forEach(function(t){O(e,t,c[t])})}return e}function H(e,t){if(null==e)return{};var c,a,n=function(e,t){if(null==e)return{};var c,a,n={},r=Object.keys(e);for(a=0;a<r.length;a++)c=r[a],t.indexOf(c)>=0||(n[c]=e[c]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)c=r[a],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(n[c]=e[c])}return n}var V=Object(b.forwardRef)(function(e,t){var c=e.href,a=e.target,n=e.isPrimary,r=e.isLarge,o=e.isSmall,s=e.isTertiary,l=e.isToggled,i=e.isBusy,m=e.isDefault,h=e.isLink,u=e.isDestructive,d=e.className,v=e.disabled,p=H(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),f=_()("components-button",d,{"is-button":m||n||r||o,"is-default":m||!n&&(r||o),"is-primary":n,"is-large":r,"is-small":o,"is-tertiary":s,"is-toggled":l,"is-busy":i,"is-link":h,"is-destructive":u}),g=void 0===c||v?"button":"a",w="a"===g?{href:c,target:a}:{type:"button",disabled:v};return Object(b.createElement)(g,k({},w,p,{className:f,ref:t}))});function M(){return(M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var c=arguments[t];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a])}return e}).apply(this,arguments)}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function C(e,t,c){return t&&x(e.prototype,t),c&&x(e,c),e}function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e){return(N="function"==typeof Symbol&&"symbol"===L(Symbol.iterator)?function(e){return L(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":L(e)})(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?S(e):t}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var c=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(c.push(o.value),!t||c.length!==t);a=!0);}catch(e){n=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return c}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var A=c(24),P=c(25),F=c(34),q=c.n(F),U=c(16),W=10,Y=function(){return"rtl"===document.documentElement.dir};function Z(e,t){var c=D((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top").split(" "),2),a=c[0],n=c[1],r=void 0===n?"center":n,o=function(e,t,c){var a,n=t.height,r=e.top+e.height/2,o={popoverTop:r,contentHeight:(r-n/2>0?n/2:r)+(r+n/2>window.innerHeight?window.innerHeight-r:n/2)},s={popoverTop:e.top,contentHeight:e.top-W-n>0?n:e.top-W},l={popoverTop:e.bottom,contentHeight:e.bottom+W+n>window.innerHeight?window.innerHeight-W-e.bottom:n},i=null;if("middle"===c&&o.contentHeight===n)a="middle";else if("top"===c&&s.contentHeight===n)a="top";else if("bottom"===c&&l.contentHeight===n)a="bottom";else{var m="top"==(a=s.contentHeight>l.contentHeight?"top":"bottom")?s.contentHeight:l.contentHeight;i=m!==n?m:null}return{yAxis:a,popoverTop:"middle"===a?o.popoverTop:"top"===a?s.popoverTop:l.popoverTop,contentHeight:i}}(e,t,a);return k({},function(e,t,c,a){var n=t.width;"left"===c&&Y()?c="right":"right"===c&&Y()&&(c="left");var r,o=Math.round(e.left+e.width/2),s={popoverLeft:o,contentWidth:(o-n/2>0?n/2:o)+(o+n/2>window.innerWidth?window.innerWidth-o:n/2)},l="middle"===a?e.left:o,i={popoverLeft:l,contentWidth:l-n>0?n:l},m="middle"===a?e.right:o,h={popoverLeft:m,contentWidth:m+n>window.innerWidth?window.innerWidth-m:n},u=null;if("center"===c&&s.contentWidth===n)r="center";else if("left"===c&&i.contentWidth===n)r="left";else if("right"===c&&h.contentWidth===n)r="right";else{var d="left"==(r=i.contentWidth>h.contentWidth?"left":"right")?i.contentWidth:h.contentWidth;u=d!==n?d:null}return{xAxis:r,popoverLeft:"center"===r?s.popoverLeft:"left"===r?i.popoverLeft:h.popoverLeft,contentWidth:u}}(e,t,r,o.yAxis),o)}function Q(e){return function(e){if(Array.isArray(e)){for(var t=0,c=new Array(e.length);t<e.length;t++)c[t]=e[t];return c}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var G=Object(b.createContext)({focusHistory:[]}),$=G.Provider,J=G.Consumer;$.displayName="FocusReturnProvider",J.displayName="FocusReturnConsumer";var K=Object(U.createHigherOrderComponent)(function e(t){if((a=t)instanceof b.Component||"function"==typeof a){var c=t;return e({})(c)}var a,n=t.onFocusReturn,r=void 0===n?z.stubTrue:n;return function(e){var t=function(t){function c(){var e;return j(this,c),(e=T(this,B(c).apply(this,arguments))).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return I(c,b.Component),C(c,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,c=this.ownFocusedElements;if(t&&!1!==r())for(var a,n=[].concat(Q(z.without.apply(void 0,[this.props.focus.focusHistory].concat(Q(c)))),[e]);a=n.pop();)if(document.body.contains(a))return void a.focus()}},{key:"render",value:function(){return Object(b.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(b.createElement)(e,this.props.childProps))}}]),c}();return function(e){return Object(b.createElement)(J,null,function(c){return Object(b.createElement)(t,{childProps:e,focus:c})})}}},"withFocusReturn"),X=Object(U.createHigherOrderComponent)(function(e){return function(t){function c(){var e;return j(this,c),(e=T(this,B(c).apply(this,arguments))).focusContainRef=Object(b.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(S(e)),e}return I(c,b["Component"]),C(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===P.TAB){var t=A.focus.tabbable.find(this.focusContainRef.current);if(t.length){var c=t[0],a=t[t.length-1];e.shiftKey&&e.target===c?(e.preventDefault(),a.focus()):(e.shiftKey||e.target!==a)&&t.includes(e.target)||(e.preventDefault(),c.focus())}}}},{key:"render",value:function(){return Object(b.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(b.createElement)(e,this.props))}}]),c}()},"withConstrainedTabbing"),ee=["button","submit"];var te=Object(U.createHigherOrderComponent)(function(e){return function(t){function c(){var e;return j(this,c),(e=T(this,B(c).apply(this,arguments))).bindNode=e.bindNode.bind(S(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(S(e)),e.queueBlurCheck=e.queueBlurCheck.bind(S(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(S(e)),e}return I(c,b["Component"]),C(c,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout(function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()},0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,c=e.target;Object(z.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(z.includes)(ee,e.type)}return!1}(c)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(b.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(b.createElement)(e,M({ref:this.bindNode},this.props)))}}]),c}()},"withFocusOutside")(function(e){function t(){return j(this,t),T(this,B(t).apply(this,arguments))}return I(t,b["Component"]),C(t,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),t}());var ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,c=void 0===t?document:t,a=e.className,n=void 0===a?"lockscroll":a,r=0,o=0;function s(e){var t=c.scrollingElement||c.body;e&&(o=t.scrollTop);var a=e?"add":"remove";t.classList[a](n),c.documentElement.classList[a](n),e||(t.scrollTop=o)}return function(e){function t(){return j(this,t),T(this,B(t).apply(this,arguments))}return I(t,b.Component),C(t,[{key:"componentDidMount",value:function(){0===r&&s(!0),++r}},{key:"componentWillUnmount",value:function(){1===r&&s(!1),--r}},{key:"render",value:function(){return null}}]),t}()}();function ae(e){e.stopPropagation()}var ne=Object(b.forwardRef)(function(e,t){var c=e.children,a=H(e,["children"]);return Object(b.createElement)("div",M({},a,{ref:t,onMouseDown:ae}),c)}),re=Object(b.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),oe=(re.Provider,re.Consumer),se=function(e){var t=Object(b.useContext)(re),c=t.getSlot,a=t.subscribe,n=D(Object(b.useState)(c(e)),2),r=n[0],o=n[1];return Object(b.useEffect)(function(){return o(c(e)),a(function(){o(c(e))})},[e]),r},le=0;function ie(e){var t=e.name,c=e.children,a=e.registerFill,n=e.unregisterFill,r=se(t),o=Object(b.useRef)({name:t,children:c});return o.current.occurrence||(o.current.occurrence=++le),Object(b.useLayoutEffect)(function(){return a(t,o.current),function(){return n(t,o.current)}},[]),Object(b.useLayoutEffect)(function(){o.current.children=c,r&&!r.props.bubblesVirtually&&r.forceUpdate()},[c]),Object(b.useLayoutEffect)(function(){t!==o.current.name&&(n(o.current.name,o.current),o.current.name=t,a(t,o.current))},[t]),r&&r.node&&r.props.bubblesVirtually?(Object(z.isFunction)(c)&&(c=c(r.props.fillProps)),Object(b.createPortal)(c,r.node)):null}var me=function(e){return Object(b.createElement)(oe,null,function(t){var c=t.registerFill,a=t.unregisterFill;return Object(b.createElement)(ie,M({},e,{registerFill:c,unregisterFill:a}))})},he=function(e){function t(){var e;return j(this,t),(e=T(this,B(t).apply(this,arguments))).bindNode=e.bindNode.bind(S(e)),e}return I(t,b["Component"]),C(t,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){(0,this.props.unregisterSlot)(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,c=t.name,a=t.unregisterSlot,n=t.registerSlot;e.name!==c&&(a(e.name),n(c,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"render",value:function(){var e=this.props,t=e.children,c=e.name,a=e.bubblesVirtually,n=void 0!==a&&a,r=e.fillProps,o=void 0===r?{}:r,s=e.getFills,l=e.className;if(n)return Object(b.createElement)("div",{ref:this.bindNode,className:l});var i=Object(z.map)(s(c,this),function(e){var t=e.occurrence,c=Object(z.isFunction)(e.children)?e.children(o):e.children;return b.Children.map(c,function(e,c){if(!e||Object(z.isString)(e))return e;var a="".concat(t,"---").concat(e.key||c);return Object(b.cloneElement)(e,{key:a})})}).filter(Object(z.negate)(b.isEmptyElement));return Object(b.createElement)(b.Fragment,null,Object(z.isFunction)(t)?t(i):i)}}]),t}(),ue=function(e){return Object(b.createElement)(oe,null,function(t){var c=t.registerSlot,a=t.unregisterSlot,n=t.getFills;return Object(b.createElement)(he,M({},e,{registerSlot:c,unregisterSlot:a,getFills:n}))})};var de=function(e){var t=e.type,c=e.options,a=void 0===c?{}:c,n=e.children;if("appear"===t){var r,o=a.origin,s=D((void 0===o?"top":o).split(" "),2),l=s[0],i=s[1],m=void 0===i?"center":i;return n({className:_()("components-animate__appear",(r={},O(r,"is-from-"+m,"center"!==m),O(r,"is-from-"+l,"middle"!==l),r))})}if("slide-in"===t){var h=a.origin,u=void 0===h?"left":h;return n({className:_()("components-animate__slide-in","is-from-"+u)})}return n("loading"===t?{className:_()("components-animate__loading")}:{})},ve=X(K(function(e){return e.children}));function pe(e,t){var c=window.getComputedStyle(t),a=c.paddingTop,n=c.paddingBottom,r=c.paddingLeft,o=c.paddingRight,s=a?parseInt(a,10):0,l=n?parseInt(n,10):0,i=r?parseInt(r,10):0,m=o?parseInt(o,10):0;return{x:e.left+i,y:e.top+s,width:e.width-i-m,height:e.height-s-l,left:e.left+i,right:e.right-m,top:e.top+s,bottom:e.bottom-l}}function fe(e,t,c){c?e.getAttribute(t)!==c&&e.setAttribute(t,c):e.hasAttribute(t)&&e.removeAttribute(t)}function ge(e,t){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==c&&(e.style[t]=c)}function we(e,t,c){c?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var be=function(e){var t=e.headerTitle,c=e.onClose,a=e.onKeyDown,n=e.children,r=e.className,o=e.noArrow,s=void 0!==o&&o,l=e.position,i=void 0===l?"top":l,m=(e.range,e.focusOnMount),h=void 0===m?"firstElement":m,u=e.anchorRef,d=e.shouldAnchorIncludePadding,v=e.anchorVerticalBuffer,p=e.anchorHorizontalBuffer,f=e.anchorRect,g=e.getAnchorRect,w=e.expandOnMobile,y=e.animate,z=void 0===y||y,E=e.onClickOutside,O=e.onFocusOutside,k=H(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),V=Object(b.useRef)(null),j=Object(b.useRef)(null),x=Object(b.useRef)(),C=Object(b.useRef)(),L=Object(U.useViewportMatch)("medium","<"),N=D(Object(b.useState)(),2),S=N[0],T=N[1],B=w&&L;s=B||s,Object(b.useEffect)(function(){var e=x.current,t=j.current;if(B)return we(e,"is-without-arrow",s),fe(e,"data-x-axis"),fe(e,"data-y-axis"),ge(e,"top"),ge(e,"left"),ge(t,"maxHeight"),void ge(t,"maxWidth");var c=function(){var c=function(e,t,c){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;if(t)return t;if(c){if(!e.current)return;return c(e.current)}if(!1!==a){if(!a)return;if(a instanceof window.Range)return Object(A.getRectangleFromRange)(a);var r=a.getBoundingClientRect();return n?r:pe(r,a)}if(e.current){var o=e.current.parentNode,s=o.getBoundingClientRect();return n?s:pe(s,o)}}(V,f,g,u,d);if(c){c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{x:e.left-c,y:e.top-t,width:e.width+2*c,height:e.height+2*t,left:e.left-c,right:e.right+c,top:e.top-t,bottom:e.bottom+t}}(c,v,p),C.current||(C.current=t.getBoundingClientRect());var a=Z(c,C.current,i),n=a.popoverTop,r=a.popoverLeft,o=a.xAxis,l=a.yAxis,m=a.contentHeight,h=a.contentWidth;we(e,"is-without-arrow",s||"center"===o&&"middle"===l),fe(e,"data-x-axis",o),fe(e,"data-y-axis",l),ge(e,"top","number"==typeof n?n+"px":""),ge(e,"left","number"==typeof r?r+"px":""),ge(t,"maxHeight","number"==typeof m?m+"px":""),ge(t,"maxWidth","number"==typeof h?h+"px":""),T(({left:"right",right:"left"}[o]||"center")+" "+({top:"bottom",bottom:"top"}[l]||"middle"))}},a=window.setTimeout(c),n=window.setInterval(c,500);return window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),function(){window.clearTimeout(a),window.clearInterval(n),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[B,f,g,u,d,v,p,i]),function(e,t){Object(b.useEffect)(function(){var c=setTimeout(function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var c=A.focus.tabbable.find(t.current)[0];c?c.focus():t.current.focus()}},0);return function(){return clearTimeout(c)}},[])}(h,j);var R=function(e){e.keyCode===P.ESCAPE&&c&&(e.stopPropagation(),c()),a&&a(e)};var I=Object(b.createElement)(te,{onFocusOutside:function(e){if(O)O(e);else if(E){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),q()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),E(t)}else c&&c()}},Object(b.createElement)(de,{type:z&&S?"appear":null,options:{origin:S}},function(e){var a=e.className;return Object(b.createElement)(ne,M({className:_()("components-popover",r,a,{"is-expanded":B,"is-without-arrow":s})},k,{onKeyDown:R,ref:x}),B&&Object(b.createElement)("div",{className:"components-popover__header"},Object(b.createElement)("span",{className:"components-popover__header-title"},t),Object(b.createElement)(Me,{className:"components-popover__close",icon:"no-alt",onClick:c})),Object(b.createElement)("div",{ref:j,className:"components-popover__content",tabIndex:"-1"},n))}));return h&&(I=Object(b.createElement)(ve,null,I)),Object(b.createElement)(oe,null,function(e){var t=e.getSlot;return t&&t("Popover")&&(I=Object(b.createElement)(me,{name:"Popover"},I)),Object(b.createElement)("span",{ref:V},I,L&&w&&Object(b.createElement)(ce,null))})};be.Slot=function(){return Object(b.createElement)(ue,{bubblesVirtually:!0,name:"Popover"})};var ye=be;var ze=function(e){var t,c,a=e.shortcut,n=e.className;return a?(Object(z.isString)(a)&&(t=a),Object(z.isObject)(a)&&(t=a.display,c=a.ariaLabel),Object(b.createElement)("span",{className:n,"aria-label":c},t)):null},Ee=700,_e=function(e){function t(){var e;return j(this,t),(e=T(this,B(t).apply(this,arguments))).delayedSetIsOver=Object(z.debounce)(function(t){return e.setState({isOver:t})},Ee),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return I(t,b["Component"]),C(t,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var c=this.props.children;if(1===b.Children.count(c)){var a=b.Children.only(c);"function"==typeof a.props[e]&&a.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var c=this;return function(a){if(c.emitToChild(e,a),!(a.currentTarget.disabled||"focus"===a.type&&c.isInMouseDown)){c.delayedSetIsOver.cancel();var n=Object(z.includes)(["focus","mouseenter"],a.type);n!==c.state.isOver&&(t?c.delayedSetIsOver(n):c.setState({isOver:n}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(c){t.emitToChild(e?"onMouseDown":"onMouseUp",c),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,c=e.position,a=e.text,n=e.shortcut;if(1!==b.Children.count(t))return t;var r=b.Children.only(t),o=this.state.isOver;return Object(b.cloneElement)(r,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(b.concatChildren)(r.props.children,o&&Object(b.createElement)(ye,{focusOnMount:!1,position:c,className:"components-tooltip","aria-hidden":"true",animate:!1},a,Object(b.createElement)(ze,{className:"components-tooltip__shortcut",shortcut:n})))})}}]),t}(),Oe=function(e){return Object(b.createElement)("path",e)},ke=function(e){var t=k({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(b.createElement)("svg",Object(z.omit)(t,"__unstableActive"))},He=function(e){function t(){return j(this,t),T(this,B(t).apply(this,arguments))}return I(t,b["Component"]),C(t,[{key:"render",value:function(){var e,t=this.props,c=t.icon,a=t.size,n=void 0===a?20:a,r=t.className,o=H(t,["icon","size","className"]);switch(c){case"admin-appearance":e="M14.48 11.06L7.41 3.99l1.5-1.5c.5-.56 2.3-.47 3.51.32 1.21.8 1.43 1.28 2.91 2.1 1.18.64 2.45 1.26 4.45.85zm-.71.71L6.7 4.7 4.93 6.47c-.39.39-.39 1.02 0 1.41l1.06 1.06c.39.39.39 1.03 0 1.42-.6.6-1.43 1.11-2.21 1.69-.35.26-.7.53-1.01.84C1.43 14.23.4 16.08 1.4 17.07c.99 1 2.84-.03 4.18-1.36.31-.31.58-.66.85-1.02.57-.78 1.08-1.61 1.69-2.21.39-.39 1.02-.39 1.41 0l1.06 1.06c.39.39 1.02.39 1.41 0z";break;case"admin-collapse":e="M10 2.16c4.33 0 7.84 3.51 7.84 7.84s-3.51 7.84-7.84 7.84S2.16 14.33 2.16 10 5.71 2.16 10 2.16zm2 11.72V6.12L6.18 9.97z";break;case"admin-comments":e="M5 2h9c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2z";break;case"admin-customizer":e="M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z";break;case"admin-generic":e="M18 12h-2.18c-.17.7-.44 1.35-.81 1.93l1.54 1.54-2.1 2.1-1.54-1.54c-.58.36-1.23.63-1.91.79V19H8v-2.18c-.68-.16-1.33-.43-1.91-.79l-1.54 1.54-2.12-2.12 1.54-1.54c-.36-.58-.63-1.23-.79-1.91H1V9.03h2.17c.16-.7.44-1.35.8-1.94L2.43 5.55l2.1-2.1 1.54 1.54c.58-.37 1.24-.64 1.93-.81V2h3v2.18c.68.16 1.33.43 1.91.79l1.54-1.54 2.12 2.12-1.54 1.54c.36.59.64 1.24.8 1.94H18V12zm-8.5 1.5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z";break;case"admin-home":e="M16 8.5l1.53 1.53-1.06 1.06L10 4.62l-6.47 6.47-1.06-1.06L10 2.5l4 4v-2h2v4zm-6-2.46l6 5.99V18H4v-5.97zM12 17v-5H8v5h4z";break;case"admin-links":e="M17.74 2.76c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-1.12 1.12-2.7 1.47-4.14 1.09l2.62-2.61.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-3.38 3.38c-.37-1.44-.02-3.02 1.1-4.14l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM8.59 13.43l5.34-5.34c.42-.42.42-1.1 0-1.52-.44-.43-1.13-.39-1.53 0l-5.33 5.34c-.42.42-.42 1.1 0 1.52.44.43 1.13.39 1.52 0zm-.76 2.29l4.14-4.15c.38 1.44.03 3.02-1.09 4.14l-1.52 1.53c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.53-1.52c1.12-1.12 2.7-1.47 4.14-1.1l-4.14 4.15c-.85.84-.85 2.2 0 3.05.84.84 2.2.84 3.04 0z";break;case"admin-media":e="M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z";break;case"admin-multisite":e="M14.27 6.87L10 3.14 5.73 6.87 5 6.14l5-4.38 5 4.38zM14 8.42l-4.05 3.43L6 8.38v-.74l4-3.5 4 3.5v.78zM11 9.7V8H9v1.7h2zm-1.73 4.03L5 10 .73 13.73 0 13l5-4.38L10 13zm10 0L15 10l-4.27 3.73L10 13l5-4.38L20 13zM5 11l4 3.5V18H1v-3.5zm10 0l4 3.5V18h-8v-3.5zm-9 6v-2H4v2h2zm10 0v-2h-2v2h2z";break;case"admin-network":e="M16.95 2.58c1.96 1.95 1.96 5.12 0 7.07-1.51 1.51-3.75 1.84-5.59 1.01l-1.87 3.31-2.99.31L5 18H2l-1-2 7.95-7.69c-.92-1.87-.62-4.18.93-5.73 1.95-1.96 5.12-1.96 7.07 0zm-2.51 3.79c.74 0 1.33-.6 1.33-1.34 0-.73-.59-1.33-1.33-1.33-.73 0-1.33.6-1.33 1.33 0 .74.6 1.34 1.33 1.34z";break;case"admin-page":e="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z";break;case"admin-plugins":e="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z";break;case"admin-post":e="M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z";break;case"admin-settings":e="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z";break;case"admin-site-alt":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm7.5 6.48c-.274.896-.908 1.64-1.75 2.05-.45-1.69-1.658-3.074-3.27-3.75.13-.444.41-.83.79-1.09-.43-.28-1-.42-1.34.07-.53.69 0 1.61.21 2v.14c-.555-.337-.99-.84-1.24-1.44-.966-.03-1.922.208-2.76.69-.087-.565-.032-1.142.16-1.68.733.07 1.453-.23 1.92-.8.46-.52-.13-1.18-.59-1.58h.36c1.36-.01 2.702.335 3.89 1 1.36 1.005 2.194 2.57 2.27 4.26.24 0 .7-.55.91-.92.172.34.32.69.44 1.05zM9 16.84c-2.05-2.08.25-3.75-1-5.24-.92-.85-2.29-.26-3.11-1.23-.282-1.473.267-2.982 1.43-3.93.52-.44 4-1 5.42.22.83.715 1.415 1.674 1.67 2.74.46.035.918-.066 1.32-.29.41 2.98-3.15 6.74-5.73 7.73zM5.15 2.09c.786-.3 1.676-.028 2.16.66-.42.38-.94.63-1.5.72.02-.294.085-.584.19-.86l-.85-.52z";break;case"admin-site-alt2":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm2.92 12.34c0 .35.14.63.36.66.22.03.47-.22.58-.6l.2.08c.718.384 1.07 1.22.84 2-.15.69-.743 1.198-1.45 1.24-.49-1.21-2.11.06-3.56-.22-.612-.154-1.11-.6-1.33-1.19 1.19-.11 2.85-1.73 4.36-1.97zM8 11.27c.918 0 1.695-.68 1.82-1.59.44.54.41 1.324-.07 1.83-.255.223-.594.325-.93.28-.335-.047-.635-.236-.82-.52zm3-.76c.41.39 3-.06 3.52 1.09-.95-.2-2.95.61-3.47-1.08l-.05-.01zM9.73 5.45v.27c-.65-.77-1.33-1.07-1.61-.57-.28.5 1 1.11.76 1.88-.24.77-1.27.56-1.88 1.61-.61 1.05-.49 2.42 1.24 3.67-1.192-.132-2.19-.962-2.54-2.11-.4-1.2-.09-2.26-.78-2.46C4 7.46 3 8.71 3 9.8c-1.26-1.26.05-2.86-1.2-4.18C3.5 1.998 7.644.223 11.44 1.49c-1.1 1.02-1.722 2.458-1.71 3.96z";break;case"admin-site-alt3":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z";break;case"admin-site":e="M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm3.46 11.95c0 1.47-.8 3.3-4.06 4.7.3-4.17-2.52-3.69-3.2-5 .126-1.1.804-2.063 1.8-2.55-1.552-.266-3-.96-4.18-2 .05.47.28.904.64 1.21-.782-.295-1.458-.817-1.94-1.5.977-3.225 3.883-5.482 7.25-5.63-.84 1.38-1.5 4.13 0 5.57C7.23 7 6.26 5 5.41 5.79c-1.13 1.06.33 2.51 3.42 3.08 3.29.59 3.66 1.58 3.63 3.08zm1.34-4c-.32-1.11.62-2.23 1.69-3.14 1.356 1.955 1.67 4.45.84 6.68-.77-1.89-2.17-2.32-2.53-3.57v.03z";break;case"admin-tools":e="M16.68 9.77c-1.34 1.34-3.3 1.67-4.95.99l-5.41 6.52c-.99.99-2.59.99-3.58 0s-.99-2.59 0-3.57l6.52-5.42c-.68-1.65-.35-3.61.99-4.95 1.28-1.28 3.12-1.62 4.72-1.06l-2.89 2.89 2.82 2.82 2.86-2.87c.53 1.58.18 3.39-1.08 4.65zM3.81 16.21c.4.39 1.04.39 1.43 0 .4-.4.4-1.04 0-1.43-.39-.4-1.03-.4-1.43 0-.39.39-.39 1.03 0 1.43z";break;case"admin-users":e="M10 9.25c-2.27 0-2.73-3.44-2.73-3.44C7 4.02 7.82 2 9.97 2c2.16 0 2.98 2.02 2.71 3.81 0 0-.41 3.44-2.68 3.44zm0 2.57L12.72 10c2.39 0 4.52 2.33 4.52 4.53v2.49s-3.65 1.13-7.24 1.13c-3.65 0-7.24-1.13-7.24-1.13v-2.49c0-2.25 1.94-4.48 4.47-4.48z";break;case"album":e="M0 18h10v-.26c1.52.4 3.17.35 4.76-.24 4.14-1.52 6.27-6.12 4.75-10.26-1.43-3.89-5.58-6-9.51-4.98V2H0v16zM9 3v14H1V3h8zm5.45 8.22c-.68 1.35-2.32 1.9-3.67 1.23-.31-.15-.57-.35-.78-.59V8.13c.8-.86 2.11-1.13 3.22-.58 1.35.68 1.9 2.32 1.23 3.67zm-2.75-.82c.22.16.53.12.7-.1.16-.22.12-.53-.1-.7s-.53-.12-.7.1c-.16.21-.12.53.1.7zm3.01 3.67c-1.17.78-2.56.99-3.83.69-.27-.06-.44-.34-.37-.61s.34-.43.62-.36l.17.04c.96.17 1.98-.01 2.86-.59.47-.32.86-.72 1.14-1.18.15-.23.45-.3.69-.16.23.15.3.46.16.69-.36.57-.84 1.08-1.44 1.48zm1.05 1.57c-1.48.99-3.21 1.32-4.84 1.06-.28-.05-.47-.32-.41-.6.05-.27.32-.45.61-.39l.22.04c1.31.15 2.68-.14 3.87-.94.71-.47 1.27-1.07 1.7-1.74.14-.24.45-.31.68-.16.24.14.31.45.16.69-.49.79-1.16 1.49-1.99 2.04z";break;case"align-center":e="M3 5h14V3H3v2zm12 8V7H5v6h10zM3 17h14v-2H3v2z";break;case"align-full-width":e="M17 13V3H3v10h14zM5 17h10v-2H5v2z";break;case"align-left":e="M3 5h14V3H3v2zm9 8V7H3v6h9zm2-4h3V7h-3v2zm0 4h3v-2h-3v2zM3 17h14v-2H3v2z";break;case"align-none":e="M3 5h14V3H3v2zm10 8V7H3v6h10zM3 17h14v-2H3v2z";break;case"align-pull-left":e="M9 16V4H3v12h6zm2-7h6V7h-6v2zm0 4h6v-2h-6v2z";break;case"align-pull-right":e="M17 16V4h-6v12h6zM9 7H3v2h6V7zm0 4H3v2h6v-2z";break;case"align-right":e="M3 5h14V3H3v2zm0 4h3V7H3v2zm14 4V7H8v6h9zM3 13h3v-2H3v2zm0 4h14v-2H3v2z";break;case"align-wide":e="M5 5h10V3H5v2zm12 8V7H3v6h14zM5 17h10v-2H5v2z";break;case"analytics":e="M18 18V2H2v16h16zM16 5H4V4h12v1zM7 7v3h3c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3zm1 2V7c1.1 0 2 .9 2 2H8zm8-1h-4V7h4v1zm0 3h-4V9h4v2zm0 2h-4v-1h4v1zm0 3H4v-1h12v1z";break;case"archive":e="M19 4v2H1V4h18zM2 7h16v10H2V7zm11 3V9H7v1h6z";break;case"arrow-down-alt":e="M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4V2z";break;case"arrow-down-alt2":e="M5 6l5 5 5-5 2 1-7 7-7-7z";break;case"arrow-down":e="M15 8l-4.03 6L7 8h8z";break;case"arrow-left-alt":e="M18 9v2H6l4 4-1 2-7-7 7-7 1 2-4 4h12z";break;case"arrow-left-alt2":e="M14 5l-5 5 5 5-1 2-7-7 7-7z";break;case"arrow-left":e="M13 14L7 9.97 13 6v8z";break;case"arrow-right-alt":e="M2 11V9h12l-4-4 1-2 7 7-7 7-1-2 4-4H2z";break;case"arrow-right-alt2":e="M6 15l5-5-5-5 1-2 7 7-7 7z";break;case"arrow-right":e="M8 6l6 4.03L8 14V6z";break;case"arrow-up-alt":e="M11 18H9V6l-4 4-2-1 7-7 7 7-2 1-4-4v12z";break;case"arrow-up-alt2":e="M15 14l-5-5-5 5-2-1 7-7 7 7z";break;case"arrow-up":e="M7 13l4.03-6L15 13H7z";break;case"art":e="M8.55 3.06c1.01.34-1.95 2.01-.1 3.13 1.04.63 3.31-2.22 4.45-2.86.97-.54 2.67-.65 3.53 1.23 1.09 2.38.14 8.57-3.79 11.06-3.97 2.5-8.97 1.23-10.7-2.66-2.01-4.53 3.12-11.09 6.61-9.9zm1.21 6.45c.73 1.64 4.7-.5 3.79-2.8-.59-1.49-4.48 1.25-3.79 2.8z";break;case"awards":e="M4.46 5.16L5 7.46l-.54 2.29 2.01 1.24L7.7 13l2.3-.54 2.3.54 1.23-2.01 2.01-1.24L15 7.46l.54-2.3-2-1.24-1.24-2.01-2.3.55-2.29-.54-1.25 2zm5.55 6.34C7.79 11.5 6 9.71 6 7.49c0-2.2 1.79-3.99 4.01-3.99 2.2 0 3.99 1.79 3.99 3.99 0 2.22-1.79 4.01-3.99 4.01zm-.02-1C8.33 10.5 7 9.16 7 7.5c0-1.65 1.33-3 2.99-3S13 5.85 13 7.5c0 1.66-1.35 3-3.01 3zm3.84 1.1l-1.28 2.24-2.08-.47L13 19.2l1.4-2.2h2.5zm-7.7.07l1.25 2.25 2.13-.51L7 19.2 5.6 17H3.1z";break;case"backup":e="M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z";break;case"block-default":e="M15 6V4h-3v2H8V4H5v2H4c-.6 0-1 .4-1 1v8h14V7c0-.6-.4-1-1-1h-1z";break;case"book-alt":e="M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z";break;case"book":e="M16 3h2v16H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h9v14H5c-.55 0-1 .45-1 1s.45 1 1 1h11V3z";break;case"buddicons-activity":e="M8 1v7h2V6c0-1.52 1.45-3 3-3v.86c.55-.52 1.26-.86 2-.86v3h1c1.1 0 2 .9 2 2s-.9 2-2 2h-1v6c0 .55-.45 1-1 1s-1-.45-1-1v-2.18c-.31.11-.65.18-1 .18v2c0 .55-.45 1-1 1s-1-.45-1-1v-2H8v2c0 .55-.45 1-1 1s-1-.45-1-1v-2c-.35 0-.69-.07-1-.18V16c0 .55-.45 1-1 1s-1-.45-1-1v-4H2v-1c0-1.66 1.34-3 3-3h2V1h1zm5 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z";break;case"buddicons-bbpress-logo":e="M8.5 12.6c.3-1.3 0-2.3-1.1-2.3-.8 0-1.6.6-1.8 1.5l-.3 1.7c-.3 1 .3 1.5 1 1.5 1.2 0 1.9-1.1 2.2-2.4zm-4-6.4C3.7 7.3 3.3 8.6 3.3 10c0 1 .2 1.9.6 2.8l1-4.6c.3-1.7.4-2-.4-2zm9.3 6.4c.3-1.3 0-2.3-1.1-2.3-.8 0-1.6.6-1.8 1.5l-.4 1.7c-.2 1.1.4 1.6 1.1 1.6 1.1-.1 1.9-1.2 2.2-2.5zM10 3.3c-2 0-3.9.9-5.1 2.3.6-.1 1.4-.2 1.8-.3.2 0 .2.1.2.2 0 .2-1 4.8-1 4.8.5-.3 1.2-.7 1.8-.7.9 0 1.5.4 1.9.9l.5-2.4c.4-1.6.4-1.9-.4-1.9-.4 0-.4-.5 0-.6.6-.1 1.8-.2 2.3-.3.2 0 .2.1.2.2l-1 4.8c.5-.4 1.2-.7 1.9-.7 1.7 0 2.5 1.3 2.1 3-.3 1.7-2 3-3.8 3-1.3 0-2.1-.7-2.3-1.4-.7.8-1.7 1.3-2.8 1.4 1.1.7 2.4 1.1 3.7 1.1 3.7 0 6.7-3 6.7-6.7s-3-6.7-6.7-6.7zM10 2c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 15.5c-2.1 0-4-.8-5.3-2.2-.3-.4-.7-.8-1-1.2-.7-1.2-1.2-2.6-1.2-4.1 0-4.1 3.4-7.5 7.5-7.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5z";break;case"buddicons-buddypress-logo":e="M10 0c5.52 0 10 4.48 10 10s-4.48 10-10 10S0 15.52 0 10 4.48 0 10 0zm0 .5C4.75.5.5 4.75.5 10s4.25 9.5 9.5 9.5 9.5-4.25 9.5-9.5S15.25.5 10 .5zm0 1c4.7 0 8.5 3.8 8.5 8.5s-3.8 8.5-8.5 8.5-8.5-3.8-8.5-8.5S5.3 1.5 10 1.5zm1.8 1.71c-.57 0-1.1.17-1.55.45 1.56.37 2.73 1.77 2.73 3.45 0 .69-.21 1.33-.55 1.87 1.31-.29 2.29-1.45 2.29-2.85 0-1.61-1.31-2.92-2.92-2.92zm-2.38 1c-1.61 0-2.92 1.31-2.92 2.93 0 1.61 1.31 2.92 2.92 2.92 1.62 0 2.93-1.31 2.93-2.92 0-1.62-1.31-2.93-2.93-2.93zm4.25 5.01l-.51.59c2.34.69 2.45 3.61 2.45 3.61h1.28c0-4.71-3.22-4.2-3.22-4.2zm-2.1.8l-2.12 2.09-2.12-2.09C3.12 10.24 3.89 15 3.89 15h11.08c.47-4.98-3.4-4.98-3.4-4.98z";break;case"buddicons-community":e="M9 3c0-.67-.47-1.43-1-2-.5.5-1 1.38-1 2 0 .48.45 1 1 1s1-.47 1-1zm4 0c0-.67-.47-1.43-1-2-.5.5-1 1.38-1 2 0 .48.45 1 1 1s1-.47 1-1zM9 9V5.5c0-.55-.45-1-1-1-.57 0-1 .49-1 1V9c0 .55.45 1 1 1 .57 0 1-.49 1-1zm4 0V5.5c0-.55-.45-1-1-1-.57 0-1 .49-1 1V9c0 .55.45 1 1 1 .57 0 1-.49 1-1zm4 1c0-1.48-1.41-2.77-3.5-3.46V9c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5V6.01c-.17 0-.33-.01-.5-.01s-.33.01-.5.01V9c0 .83-.67 1.5-1.5 1.5S6.5 9.83 6.5 9V6.54C4.41 7.23 3 8.52 3 10c0 1.41.95 2.65 3.21 3.37 1.11.35 2.39 1.12 3.79 1.12s2.69-.78 3.79-1.13C16.04 12.65 17 11.41 17 10zm-7 5.43c1.43 0 2.74-.79 3.88-1.11 1.9-.53 2.49-1.34 3.12-2.32v3c0 2.21-3.13 4-7 4s-7-1.79-7-4v-3c.64.99 1.32 1.8 3.15 2.33 1.13.33 2.44 1.1 3.85 1.1z";break;case"buddicons-forums":e="M13.5 7h-7C5.67 7 5 6.33 5 5.5S5.67 4 6.5 4h1.59C8.04 3.84 8 3.68 8 3.5 8 2.67 8.67 2 9.5 2h1c.83 0 1.5.67 1.5 1.5 0 .18-.04.34-.09.5h1.59c.83 0 1.5.67 1.5 1.5S14.33 7 13.5 7zM4 8h12c.55 0 1 .45 1 1s-.45 1-1 1H4c-.55 0-1-.45-1-1s.45-1 1-1zm1 3h10c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1s.45-1 1-1zm2 3h6c.55 0 1 .45 1 1s-.45 1-1 1h-1.09c.05.16.09.32.09.5 0 .83-.67 1.5-1.5 1.5h-1c-.83 0-1.5-.67-1.5-1.5 0-.18.04-.34.09-.5H7c-.55 0-1-.45-1-1s.45-1 1-1z";break;case"buddicons-friends":e="M8.75 5.77C8.75 4.39 7 2 7 2S5.25 4.39 5.25 5.77 5.9 7.5 7 7.5s1.75-.35 1.75-1.73zm6 0C14.75 4.39 13 2 13 2s-1.75 2.39-1.75 3.77S11.9 7.5 13 7.5s1.75-.35 1.75-1.73zM9 17V9c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm6 0V9c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-9-6l2-1v2l-2 1v-2zm6 0l2-1v2l-2 1v-2zm-6 3l2-1v2l-2 1v-2zm6 0l2-1v2l-2 1v-2z";break;case"buddicons-groups":e="M15.45 6.25c1.83.94 1.98 3.18.7 4.98-.8 1.12-2.33 1.88-3.46 1.78L10.05 18H9l-2.65-4.99c-1.13.16-2.73-.63-3.55-1.79-1.28-1.8-1.13-4.04.71-4.97.48-.24.96-.33 1.43-.31-.01.4.01.8.07 1.21.26 1.69 1.41 3.53 2.86 4.37-.19.55-.49.99-.88 1.25L9 16.58v-5.66C7.64 10.55 6.26 8.76 6 7c-.4-2.65 1-5 3.5-5s3.9 2.35 3.5 5c-.26 1.76-1.64 3.55-3 3.92v5.77l2.07-3.84c-.44-.23-.77-.71-.99-1.3 1.48-.83 2.65-2.69 2.91-4.4.06-.41.08-.82.07-1.22.46-.01.92.08 1.39.32z";break;case"buddicons-pm":e="M10 2c3 0 8 5 8 5v11H2V7s5-5 8-5zm7 14.72l-3.73-2.92L17 11l-.43-.37-2.26 1.3.24-4.31-8.77-.52-.46 4.54-1.99-.95L3 11l3.73 2.8-3.44 2.85.4.43L10 13l6.53 4.15z";break;case"buddicons-replies":e="M17.54 10.29c1.17 1.17 1.17 3.08 0 4.25-1.18 1.17-3.08 1.17-4.25 0l-.34-.52c0 3.66-2 4.38-2.95 4.98-.82-.6-2.95-1.28-2.95-4.98l-.34.52c-1.17 1.17-3.07 1.17-4.25 0-1.17-1.17-1.17-3.08 0-4.25 0 0 1.02-.67 2.1-1.3C3.71 7.84 3.2 6.42 3.2 4.88c0-.34.03-.67.08-1C3.53 5.66 4.47 7.22 5.8 8.3c.67-.35 1.85-.83 2.37-.92H8c-1.1 0-2-.9-2-2s.9-2 2-2v-.5c0-.28.22-.5.5-.5s.5.22.5.5v.5h2v-.5c0-.28.22-.5.5-.5s.5.22.5.5v.5c1.1 0 2 .9 2 2s-.9 2-2 2h-.17c.51.09 1.78.61 2.38.92 1.33-1.08 2.27-2.64 2.52-4.42.05.33.08.66.08 1 0 1.54-.51 2.96-1.36 4.11 1.08.63 2.09 1.3 2.09 1.3zM8.5 6.38c.5 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm3-2c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-2.3 5.73c-.12.11-.19.26-.19.43.02.25.23.46.49.46h1c.26 0 .47-.21.49-.46 0-.15-.07-.29-.19-.43-.08-.06-.18-.11-.3-.11h-1c-.12 0-.22.05-.3.11zM12 12.5c0-.12-.06-.28-.19-.38-.09-.07-.19-.12-.31-.12h-3c-.12 0-.22.05-.31.12-.11.1-.19.25-.19.38 0 .28.22.5.5.5h3c.28 0 .5-.22.5-.5zM8.5 15h3c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-3c-.28 0-.5.22-.5.5s.22.5.5.5zm1 2h1c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-1c-.28 0-.5.22-.5.5s.22.5.5.5z";break;case"buddicons-topics":e="M10.44 1.66c-.59-.58-1.54-.58-2.12 0L2.66 7.32c-.58.58-.58 1.53 0 2.12.6.6 1.56.56 2.12 0l5.66-5.66c.58-.58.59-1.53 0-2.12zm2.83 2.83c-.59-.59-1.54-.59-2.12 0l-5.66 5.66c-.59.58-.59 1.53 0 2.12.6.6 1.56.55 2.12 0l5.66-5.66c.58-.58.58-1.53 0-2.12zm1.06 6.72l4.18 4.18c.59.58.59 1.53 0 2.12s-1.54.59-2.12 0l-4.18-4.18-1.77 1.77c-.59.58-1.54.58-2.12 0-.59-.59-.59-1.54 0-2.13l5.66-5.65c.58-.59 1.53-.59 2.12 0 .58.58.58 1.53 0 2.12zM5 15c0-1.59-1.66-4-1.66-4S2 13.78 2 15s.6 2 1.34 2h.32C4.4 17 5 16.59 5 15z";break;case"buddicons-tracking":e="M10.98 6.78L15.5 15c-1 2-3.5 3-5.5 3s-4.5-1-5.5-3L9 6.82c-.75-1.23-2.28-1.98-4.29-2.03l2.46-2.92c1.68 1.19 2.46 2.32 2.97 3.31.56-.87 1.2-1.68 2.7-2.12l1.83 2.86c-1.42-.34-2.64.08-3.69.86zM8.17 10.4l-.93 1.69c.49.11 1 .16 1.54.16 1.35 0 2.58-.36 3.55-.95l-1.01-1.82c-.87.53-1.96.86-3.15.92zm.86 5.38c1.99 0 3.73-.74 4.74-1.86l-.98-1.76c-1 1.12-2.74 1.87-4.74 1.87-.62 0-1.21-.08-1.76-.21l-.63 1.15c.94.5 2.1.81 3.37.81z";break;case"building":e="M3 20h14V0H3v20zM7 3H5V1h2v2zm4 0H9V1h2v2zm4 0h-2V1h2v2zM7 6H5V4h2v2zm4 0H9V4h2v2zm4 0h-2V4h2v2zM7 9H5V7h2v2zm4 0H9V7h2v2zm4 0h-2V7h2v2zm-8 3H5v-2h2v2zm4 0H9v-2h2v2zm4 0h-2v-2h2v2zm-4 7H5v-6h6v6zm4-4h-2v-2h2v2zm0 3h-2v-2h2v2z";break;case"businessman":e="M7.3 6l-.03-.19c-.04-.37-.05-.73-.03-1.08.02-.36.1-.71.25-1.04.14-.32.31-.61.52-.86s.49-.46.83-.6c.34-.15.72-.23 1.13-.23.69 0 1.26.2 1.71.59s.76.87.91 1.44.18 1.16.09 1.78l-.03.19c-.01.09-.05.25-.11.48-.05.24-.12.47-.2.69-.08.21-.19.45-.34.72-.14.27-.3.49-.47.69-.18.19-.4.34-.67.48-.27.13-.55.19-.86.19s-.59-.06-.87-.19c-.26-.13-.49-.29-.67-.5-.18-.2-.34-.42-.49-.66-.15-.25-.26-.49-.34-.73-.09-.25-.16-.47-.21-.67-.06-.21-.1-.37-.12-.5zm9.2 6.24c.41.7.5 1.41.5 2.14v2.49c0 .03-.12.08-.29.13-.18.04-.42.13-.97.27-.55.12-1.1.24-1.65.34s-1.19.19-1.95.27c-.75.08-1.46.12-2.13.12-.68 0-1.39-.04-2.14-.12-.75-.07-1.4-.17-1.98-.27-.58-.11-1.08-.23-1.56-.34-.49-.11-.8-.21-1.06-.29L3 16.87v-2.49c0-.75.07-1.46.46-2.15s.81-1.25 1.5-1.68C5.66 10.12 7.19 10 8 10l1.67 1.67L9 13v3l1.02 1.08L11 16v-3l-.68-1.33L11.97 10c.77 0 2.2.07 2.9.52.71.45 1.21 1.02 1.63 1.72z";break;case"button":e="M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z";break;case"calendar-alt":e="M15 4h3v15H2V4h3V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1h4V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1zM6 3v2.5c0 .14.05.26.15.36.09.09.21.14.35.14s.26-.05.35-.14c.1-.1.15-.22.15-.36V3c0-.14-.05-.26-.15-.35-.09-.1-.21-.15-.35-.15s-.26.05-.35.15c-.1.09-.15.21-.15.35zm7 0v2.5c0 .14.05.26.14.36.1.09.22.14.36.14s.26-.05.36-.14c.09-.1.14-.22.14-.36V3c0-.14-.05-.26-.14-.35-.1-.1-.22-.15-.36-.15s-.26.05-.36.15c-.09.09-.14.21-.14.35zm4 15V8H3v10h14zM7 9v2H5V9h2zm2 0h2v2H9V9zm4 2V9h2v2h-2zm-6 1v2H5v-2h2zm2 0h2v2H9v-2zm4 2v-2h2v2h-2zm-6 1v2H5v-2h2zm4 2H9v-2h2v2zm4 0h-2v-2h2v2z";break;case"calendar":e="M15 4h3v14H2V4h3V3c0-.83.67-1.5 1.5-1.5S8 2.17 8 3v1h4V3c0-.83.67-1.5 1.5-1.5S15 2.17 15 3v1zM6 3v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5S6 2.72 6 3zm7 0v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5s-.5.22-.5.5zm4 14V8H3v9h14zM7 16V9H5v7h2zm4 0V9H9v7h2zm4 0V9h-2v7h2z";break;case"camera":e="M6 5V3H3v2h3zm12 10V4H9L7 6H2v9h16zm-7-8c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z";break;case"carrot":e="M2 18.43c1.51 1.36 11.64-4.67 13.14-7.21.72-1.22-.13-3.01-1.52-4.44C15.2 5.73 16.59 9 17.91 8.31c.6-.32.99-1.31.7-1.92-.52-1.08-2.25-1.08-3.42-1.21.83-.2 2.82-1.05 2.86-2.25.04-.92-1.13-1.97-2.05-1.86-1.21.14-1.65 1.88-2.06 3-.05-.71-.2-2.27-.98-2.95-1.04-.91-2.29-.05-2.32 1.05-.04 1.33 2.82 2.07 1.92 3.67C11.04 4.67 9.25 4.03 8.1 4.7c-.49.31-1.05.91-1.63 1.69.89.94 2.12 2.07 3.09 2.72.2.14.26.42.11.62-.14.21-.42.26-.62.12-.99-.67-2.2-1.78-3.1-2.71-.45.67-.91 1.43-1.34 2.23.85.86 1.93 1.83 2.79 2.41.2.14.25.42.11.62-.14.21-.42.26-.63.12-.85-.58-1.86-1.48-2.71-2.32C2.4 13.69 1.1 17.63 2 18.43z";break;case"cart":e="M6 13h9c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1V4H2c-.55 0-1-.45-1-1s.45-1 1-1h3c.55 0 1 .45 1 1v2h13l-4 7H6v1zm-.5 3c.83 0 1.5.67 1.5 1.5S6.33 19 5.5 19 4 18.33 4 17.5 4.67 16 5.5 16zm9 0c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z";break;case"category":e="M5 7h13v10H2V4h7l2 2H4v9h1V7z";break;case"chart-area":e="M18 18l.01-12.28c.59-.35.99-.99.99-1.72 0-1.1-.9-2-2-2s-2 .9-2 2c0 .8.47 1.48 1.14 1.8l-4.13 6.58c-.33-.24-.73-.38-1.16-.38-.84 0-1.55.51-1.85 1.24l-2.14-1.53c.09-.22.14-.46.14-.71 0-1.11-.89-2-2-2-1.1 0-2 .89-2 2 0 .73.4 1.36.98 1.71L1 18h17zM17 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM5 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5.85 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z";break;case"chart-bar":e="M18 18V2h-4v16h4zm-6 0V7H8v11h4zm-6 0v-8H2v8h4z";break;case"chart-line":e="M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z";break;case"chart-pie":e="M10 10V3c3.87 0 7 3.13 7 7h-7zM9 4v7h7c0 3.87-3.13 7-7 7s-7-3.13-7-7 3.13-7 7-7z";break;case"clipboard":e="M11.9.39l1.4 1.4c1.61.19 3.5-.74 4.61.37s.18 3 .37 4.61l1.4 1.4c.39.39.39 1.02 0 1.41l-9.19 9.2c-.4.39-1.03.39-1.42 0L1.29 11c-.39-.39-.39-1.02 0-1.42l9.2-9.19c.39-.39 1.02-.39 1.41 0zm.58 2.25l-.58.58 4.95 4.95.58-.58c-.19-.6-.2-1.22-.15-1.82.02-.31.05-.62.09-.92.12-1 .18-1.63-.17-1.98s-.98-.29-1.98-.17c-.3.04-.61.07-.92.09-.6.05-1.22.04-1.82-.15zm4.02.93c.39.39.39 1.03 0 1.42s-1.03.39-1.42 0-.39-1.03 0-1.42 1.03-.39 1.42 0zm-6.72.36l-.71.7L15.44 11l.7-.71zM8.36 5.34l-.7.71 6.36 6.36.71-.7zM6.95 6.76l-.71.7 6.37 6.37.7-.71zM5.54 8.17l-.71.71 6.36 6.36.71-.71zM4.12 9.58l-.71.71 6.37 6.37.71-.71z";break;case"clock":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 14c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm-.71-5.29c.07.05.14.1.23.15l-.02.02L14 13l-3.03-3.19L10 5l-.97 4.81h.01c0 .02-.01.05-.02.09S9 9.97 9 10c0 .28.1.52.29.71z";break;case"cloud-saved":e="M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16h10c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5zm-6.3 5.9l-3.2-3.2 1.4-1.4 1.8 1.8 3.8-3.8 1.4 1.4-5.2 5.2z";break;case"cloud-upload":e="M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z";break;case"cloud":e="M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z";break;case"columns":e="M3 15h6V5H3v10zm8 0h6V5h-6v10z";break;case"controls-back":e="M2 10l10-6v3.6L18 4v12l-6-3.6V16z";break;case"controls-forward":e="M18 10L8 16v-3.6L2 16V4l6 3.6V4z";break;case"controls-pause":e="M5 16V4h3v12H5zm7-12h3v12h-3V4z";break;case"controls-play":e="M5 4l10 6-10 6V4z";break;case"controls-repeat":e="M5 7v3l-2 1.5V5h11V3l4 3.01L14 9V7H5zm10 6v-3l2-1.5V15H6v2l-4-3.01L6 11v2h9z";break;case"controls-skipback":e="M11.98 7.63l6-3.6v12l-6-3.6v3.6l-8-4.8v4.8h-2v-12h2v4.8l8-4.8v3.6z";break;case"controls-skipforward":e="M8 12.4L2 16V4l6 3.6V4l8 4.8V4h2v12h-2v-4.8L8 16v-3.6z";break;case"controls-volumeoff":e="M2 7h4l5-4v14l-5-4H2V7z";break;case"controls-volumeon":e="M2 7h4l5-4v14l-5-4H2V7zm12.69-2.46C14.82 4.59 18 5.92 18 10s-3.18 5.41-3.31 5.46c-.06.03-.13.04-.19.04-.2 0-.39-.12-.46-.31-.11-.26.02-.55.27-.65.11-.05 2.69-1.15 2.69-4.54 0-3.41-2.66-4.53-2.69-4.54-.25-.1-.38-.39-.27-.65.1-.25.39-.38.65-.27zM16 10c0 2.57-2.23 3.43-2.32 3.47-.06.02-.12.03-.18.03-.2 0-.39-.12-.47-.32-.1-.26.04-.55.29-.65.07-.02 1.68-.67 1.68-2.53s-1.61-2.51-1.68-2.53c-.25-.1-.38-.39-.29-.65.1-.25.39-.39.65-.29.09.04 2.32.9 2.32 3.47z";break;case"cover-image":e="M2.2 1h15.5c.7 0 1.3.6 1.3 1.2v11.5c0 .7-.6 1.2-1.2 1.2H2.2c-.6.1-1.2-.5-1.2-1.1V2.2C1 1.6 1.6 1 2.2 1zM17 13V3H3v10h14zm-4-4s0-5 3-5v7c0 .6-.4 1-1 1H5c-.6 0-1-.4-1-1V7c2 0 3 4 3 4s1-4 3-4 3 2 3 2zM4 17h12v2H4z";break;case"dashboard":e="M3.76 16h12.48c1.1-1.37 1.76-3.11 1.76-5 0-4.42-3.58-8-8-8s-8 3.58-8 8c0 1.89.66 3.63 1.76 5zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 6c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5.37 5.55L12 7v6c0 1.1-.9 2-2 2s-2-.9-2-2c0-.57.24-1.08.63-1.45zM4 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm12 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5 3c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1z";break;case"desktop":e="M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z";break;case"dismiss":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm5 11l-3-3 3-3-2-2-3 3-3-3-2 2 3 3-3 3 2 2 3-3 3 3z";break;case"download":e="M14.01 4v6h2V2H4v8h2.01V4h8zm-2 2v6h3l-5 6-5-6h3V6h4z";break;case"edit":e="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z";break;case"editor-aligncenter":e="M14 5V3H6v2h8zm3 4V7H3v2h14zm-3 4v-2H6v2h8zm3 4v-2H3v2h14z";break;case"editor-alignleft":e="M12 5V3H3v2h9zm5 4V7H3v2h14zm-5 4v-2H3v2h9zm5 4v-2H3v2h14z";break;case"editor-alignright":e="M17 5V3H8v2h9zm0 4V7H3v2h14zm0 4v-2H8v2h9zm0 4v-2H3v2h14z";break;case"editor-bold":e="M6 4v13h4.54c1.37 0 2.46-.33 3.26-1 .8-.66 1.2-1.58 1.2-2.77 0-.84-.17-1.51-.51-2.01s-.9-.85-1.67-1.03v-.09c.57-.1 1.02-.4 1.36-.9s.51-1.13.51-1.91c0-1.14-.39-1.98-1.17-2.5C12.75 4.26 11.5 4 9.78 4H6zm2.57 5.15V6.26h1.36c.73 0 1.27.11 1.61.32.34.22.51.58.51 1.07 0 .54-.16.92-.47 1.15s-.82.35-1.51.35h-1.5zm0 2.19h1.6c1.44 0 2.16.53 2.16 1.61 0 .6-.17 1.05-.51 1.34s-.86.43-1.57.43H8.57v-3.38z";break;case"editor-break":e="M16 4h2v9H7v3l-5-4 5-4v3h9V4z";break;case"editor-code":e="M9 6l-4 4 4 4-1 2-6-6 6-6zm2 8l4-4-4-4 1-2 6 6-6 6z";break;case"editor-contract":e="M15.75 6.75L18 3v14l-2.25-3.75L17 12h-4v4l1.25-1.25L18 17H2l3.75-2.25L7 16v-4H3l1.25 1.25L2 17V3l2.25 3.75L3 8h4V4L5.75 5.25 2 3h16l-3.75 2.25L13 4v4h4z";break;case"editor-customchar":e="M10 5.4c1.27 0 2.24.36 2.91 1.08.66.71 1 1.76 1 3.13 0 1.28-.23 2.37-.69 3.27-.47.89-1.27 1.52-2.22 2.12v2h6v-2h-3.69c.92-.64 1.62-1.34 2.12-2.34.49-1.01.74-2.13.74-3.35 0-1.78-.55-3.19-1.65-4.22S11.92 3.54 10 3.54s-3.43.53-4.52 1.57c-1.1 1.04-1.65 2.44-1.65 4.2 0 1.21.24 2.31.73 3.33.48 1.01 1.19 1.71 2.1 2.36H3v2h6v-2c-.98-.64-1.8-1.28-2.24-2.17-.45-.89-.67-1.96-.67-3.22 0-1.37.33-2.41 1-3.13C7.75 5.76 8.72 5.4 10 5.4z";break;case"editor-expand":e="M7 8h6v4H7zm-5 5v4h4l-1.2-1.2L7 12l-3.8 2.2M14 17h4v-4l-1.2 1.2L13 12l2.2 3.8M14 3l1.3 1.3L13 8l3.8-2.2L18 7V3M6 3H2v4l1.2-1.2L7 8 4.7 4.3";break;case"editor-help":e="M17 10c0-3.87-3.14-7-7-7-3.87 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7zm-6.3 1.48H9.14v-.43c0-.38.08-.7.24-.98s.46-.57.88-.89c.41-.29.68-.53.81-.71.14-.18.2-.39.2-.62 0-.25-.09-.44-.28-.58-.19-.13-.45-.19-.79-.19-.58 0-1.25.19-2 .57l-.64-1.28c.87-.49 1.8-.74 2.77-.74.81 0 1.45.2 1.92.58.48.39.71.91.71 1.55 0 .43-.09.8-.29 1.11-.19.32-.57.67-1.11 1.06-.38.28-.61.49-.71.63-.1.15-.15.34-.15.57v.35zm-1.47 2.74c-.18-.17-.27-.42-.27-.73 0-.33.08-.58.26-.75s.43-.25.77-.25c.32 0 .57.09.75.26s.27.42.27.74c0 .3-.09.55-.27.72-.18.18-.43.27-.75.27-.33 0-.58-.09-.76-.26z";break;case"editor-indent":e="M3 5V3h9v2H3zm10-1V3h4v1h-4zm0 3h2V5l4 3.5-4 3.5v-2h-2V7zM3 8V6h9v2H3zm2 3V9h7v2H5zm-2 3v-2h9v2H3zm10 0v-1h4v1h-4zm-4 3v-2h3v2H9z";break;case"editor-insertmore":e="M17 7V3H3v4h14zM6 11V9H3v2h3zm6 0V9H8v2h4zm5 0V9h-3v2h3zm0 6v-4H3v4h14z";break;case"editor-italic":e="M14.78 6h-2.13l-2.8 9h2.12l-.62 2H4.6l.62-2h2.14l2.8-9H8.03l.62-2h6.75z";break;case"editor-justify":e="M2 3h16v2H2V3zm0 4h16v2H2V7zm0 4h16v2H2v-2zm0 4h16v2H2v-2z";break;case"editor-kitchensink":e="M19 2v6H1V2h18zm-1 5V3H2v4h16zM5 4v2H3V4h2zm3 0v2H6V4h2zm3 0v2H9V4h2zm3 0v2h-2V4h2zm3 0v2h-2V4h2zm2 5v9H1V9h18zm-1 8v-7H2v7h16zM5 11v2H3v-2h2zm3 0v2H6v-2h2zm3 0v2H9v-2h2zm6 0v2h-5v-2h5zm-6 3v2H3v-2h8zm3 0v2h-2v-2h2zm3 0v2h-2v-2h2z";break;case"editor-ltr":e="M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z";break;case"editor-ol-rtl":e="M15.025 8.75a1.048 1.048 0 0 1 .45-.1.507.507 0 0 1 .35.11.455.455 0 0 1 .13.36.803.803 0 0 1-.06.3 1.448 1.448 0 0 1-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76v-.7h-1.72v-.04l.51-.48a7.276 7.276 0 0 0 .7-.71 1.75 1.75 0 0 0 .3-.49 1.254 1.254 0 0 0 .1-.51.968.968 0 0 0-.16-.56 1.007 1.007 0 0 0-.44-.37 1.512 1.512 0 0 0-.65-.14 1.98 1.98 0 0 0-.51.06 1.9 1.9 0 0 0-.42.15 3.67 3.67 0 0 0-.48.35l.45.54a2.505 2.505 0 0 1 .45-.3zM16.695 15.29a1.29 1.29 0 0 0-.74-.3v-.02a1.203 1.203 0 0 0 .65-.37.973.973 0 0 0 .23-.65.81.81 0 0 0-.37-.71 1.72 1.72 0 0 0-1-.26 2.185 2.185 0 0 0-1.33.4l.4.6a1.79 1.79 0 0 1 .46-.23 1.18 1.18 0 0 1 .41-.07c.38 0 .58.15.58.46a.447.447 0 0 1-.22.43 1.543 1.543 0 0 1-.7.12h-.31v.66h.31a1.764 1.764 0 0 1 .75.12.433.433 0 0 1 .23.41.55.55 0 0 1-.2.47 1.084 1.084 0 0 1-.63.15 2.24 2.24 0 0 1-.57-.08 2.671 2.671 0 0 1-.52-.2v.74a2.923 2.923 0 0 0 1.18.22 1.948 1.948 0 0 0 1.22-.33 1.077 1.077 0 0 0 .43-.92.836.836 0 0 0-.26-.64zM15.005 4.17c.06-.05.16-.14.3-.28l-.02.42V7h.84V3h-.69l-1.29 1.03.4.51zM4.02 5h9v1h-9zM4.02 10h9v1h-9zM4.02 15h9v1h-9z";break;case"editor-ol":e="M6 7V3h-.69L4.02 4.03l.4.51.46-.37c.06-.05.16-.14.3-.28l-.02.42V7H6zm2-2h9v1H8V5zm-1.23 6.95v-.7H5.05v-.04l.51-.48c.33-.31.57-.54.7-.71.14-.17.24-.33.3-.49.07-.16.1-.33.1-.51 0-.21-.05-.4-.16-.56-.1-.16-.25-.28-.44-.37s-.41-.14-.65-.14c-.19 0-.36.02-.51.06-.15.03-.29.09-.42.15-.12.07-.29.19-.48.35l.45.54c.16-.13.31-.23.45-.3.15-.07.3-.1.45-.1.14 0 .26.03.35.11s.13.2.13.36c0 .1-.02.2-.06.3s-.1.21-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76zM8 10h9v1H8v-1zm-1.29 3.95c0-.3-.12-.54-.37-.71-.24-.17-.58-.26-1-.26-.52 0-.96.13-1.33.4l.4.6c.17-.11.32-.19.46-.23.14-.05.27-.07.41-.07.38 0 .58.15.58.46 0 .2-.07.35-.22.43s-.38.12-.7.12h-.31v.66h.31c.34 0 .59.04.75.12.15.08.23.22.23.41 0 .22-.07.37-.2.47-.14.1-.35.15-.63.15-.19 0-.38-.03-.57-.08s-.36-.12-.52-.2v.74c.34.15.74.22 1.18.22.53 0 .94-.11 1.22-.33.29-.22.43-.52.43-.92 0-.27-.09-.48-.26-.64s-.42-.26-.74-.3v-.02c.27-.06.49-.19.65-.37.15-.18.23-.39.23-.65zM8 15h9v1H8v-1z";break;case"editor-outdent":e="M7 4V3H3v1h4zm10 1V3H8v2h9zM7 7H5V5L1 8.5 5 12v-2h2V7zm10 1V6H8v2h9zm-2 3V9H8v2h7zm2 3v-2H8v2h9zM7 14v-1H3v1h4zm4 3v-2H8v2h3z";break;case"editor-paragraph":e="M15 2H7.54c-.83 0-1.59.2-2.28.6-.7.41-1.25.96-1.65 1.65C3.2 4.94 3 5.7 3 6.52s.2 1.58.61 2.27c.4.69.95 1.24 1.65 1.64.69.41 1.45.61 2.28.61h.43V17c0 .27.1.51.29.71.2.19.44.29.71.29.28 0 .51-.1.71-.29.2-.2.3-.44.3-.71V5c0-.27.09-.51.29-.71.2-.19.44-.29.71-.29s.51.1.71.29c.19.2.29.44.29.71v12c0 .27.1.51.3.71.2.19.43.29.71.29.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71V4H15c.27 0 .5-.1.7-.3.2-.19.3-.43.3-.7s-.1-.51-.3-.71C15.5 2.1 15.27 2 15 2z";break;case"editor-paste-text":e="M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.44 1-1 0-.55-.45-1-1-1s-1 .45-1 1c0 .56.45 1 1 1zm5.45-1H17c.55 0 1 .45 1 1v12c0 .56-.45 1-1 1H3c-.55 0-1-.44-1-1V5c0-.55.45-1 1-1h1.55L4 4.63V7h12V4.63zM14 11V9H6v2h3v5h2v-5h3z";break;case"editor-paste-word":e="M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 12V5c0-.55-.45-1-1-1h-1.54l.54.63V7H4V4.62L4.55 4H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-3-8l-2 7h-2l-1-5-1 5H6.92L5 9h2l1 5 1-5h2l1 5 1-5h2z";break;case"editor-quote":e="M9.49 13.22c0-.74-.2-1.38-.61-1.9-.62-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L7.88 4c-2.73 1.3-5.42 4.28-4.96 8.05C3.21 14.43 4.59 16 6.54 16c.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03zm8.05 0c0-.74-.2-1.38-.61-1.9-.63-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L15.93 4c-2.73 1.3-5.41 4.28-4.95 8.05.29 2.38 1.66 3.95 3.61 3.95.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03z";break;case"editor-removeformatting":e="M14.29 4.59l1.1 1.11c.41.4.61.94.61 1.47v2.12c0 .53-.2 1.07-.61 1.47l-6.63 6.63c-.4.41-.94.61-1.47.61s-1.07-.2-1.47-.61l-1.11-1.1-1.1-1.11c-.41-.4-.61-.94-.61-1.47v-2.12c0-.54.2-1.07.61-1.48l6.63-6.62c.4-.41.94-.61 1.47-.61s1.06.2 1.47.61zm-6.21 9.7l6.42-6.42c.39-.39.39-1.03 0-1.43L12.36 4.3c-.19-.19-.45-.29-.72-.29s-.52.1-.71.29l-6.42 6.42c-.39.4-.39 1.04 0 1.43l2.14 2.14c.38.38 1.04.38 1.43 0z";break;case"editor-rtl":e="M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM19 6l-5 4 5 4V6z";break;case"editor-spellcheck":e="M15.84 2.76c.25 0 .49.04.71.11.23.07.44.16.64.25l.35-.81c-.52-.26-1.08-.39-1.69-.39-.58 0-1.09.13-1.52.37-.43.25-.76.61-.99 1.08C13.11 3.83 13 4.38 13 5c0 .99.23 1.75.7 2.28s1.15.79 2.02.79c.6 0 1.13-.09 1.6-.26v-.84c-.26.08-.51.14-.74.19-.24.05-.49.08-.74.08-.59 0-1.04-.19-1.34-.57-.32-.37-.47-.93-.47-1.66 0-.7.16-1.25.48-1.65.33-.4.77-.6 1.33-.6zM6.5 8h1.04L5.3 2H4.24L2 8h1.03l.58-1.66H5.9zM8 2v6h2.17c.67 0 1.19-.15 1.57-.46.38-.3.56-.72.56-1.26 0-.4-.1-.72-.3-.95-.19-.24-.5-.39-.93-.47v-.04c.35-.06.6-.21.78-.44.18-.24.28-.53.28-.88 0-.52-.19-.9-.56-1.14-.36-.24-.96-.36-1.79-.36H8zm.98 2.48V2.82h.85c.44 0 .77.06.97.19.21.12.31.33.31.61 0 .31-.1.53-.29.66-.18.13-.48.2-.89.2h-.95zM5.64 5.5H3.9l.54-1.56c.14-.4.25-.76.32-1.1l.15.52c.07.23.13.4.17.51zm3.34-.23h.99c.44 0 .76.08.98.23.21.15.32.38.32.69 0 .34-.11.59-.32.75s-.52.24-.93.24H8.98V5.27zM4 13l5 5 9-8-1-1-8 6-4-3z";break;case"editor-strikethrough":e="M15.82 12.25c.26 0 .5-.02.74-.07.23-.05.48-.12.73-.2v.84c-.46.17-.99.26-1.58.26-.88 0-1.54-.26-2.01-.79-.39-.44-.62-1.04-.68-1.79h-.94c.12.21.18.48.18.79 0 .54-.18.95-.55 1.26-.38.3-.9.45-1.56.45H8v-2.5H6.59l.93 2.5H6.49l-.59-1.67H3.62L3.04 13H2l.93-2.5H2v-1h1.31l.93-2.49H5.3l.92 2.49H8V7h1.77c1 0 1.41.17 1.77.41.37.24.55.62.55 1.13 0 .35-.09.64-.27.87l-.08.09h1.29c.05-.4.15-.77.31-1.1.23-.46.55-.82.98-1.06.43-.25.93-.37 1.51-.37.61 0 1.17.12 1.69.38l-.35.81c-.2-.1-.42-.18-.64-.25s-.46-.11-.71-.11c-.55 0-.99.2-1.31.59-.23.29-.38.66-.44 1.11H17v1h-2.95c.06.5.2.9.44 1.19.3.37.75.56 1.33.56zM4.44 8.96l-.18.54H5.3l-.22-.61c-.04-.11-.09-.28-.17-.51-.07-.24-.12-.41-.14-.51-.08.33-.18.69-.33 1.09zm4.53-1.09V9.5h1.19c.28-.02.49-.09.64-.18.19-.13.28-.35.28-.66 0-.28-.1-.48-.3-.61-.2-.12-.53-.18-.97-.18h-.84zm-3.33 2.64v-.01H3.91v.01h1.73zm5.28.01l-.03-.02H8.97v1.68h1.04c.4 0 .71-.08.92-.23.21-.16.31-.4.31-.74 0-.31-.11-.54-.32-.69z";break;case"editor-table":e="M18 17V3H2v14h16zM16 7H4V5h12v2zm-7 4H4V9h5v2zm7 0h-5V9h5v2zm-7 4H4v-2h5v2zm7 0h-5v-2h5v2z";break;case"editor-textcolor":e="M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z";break;case"editor-ul":e="M5.5 7C4.67 7 4 6.33 4 5.5 4 4.68 4.67 4 5.5 4 6.32 4 7 4.68 7 5.5 7 6.33 6.32 7 5.5 7zM8 5h9v1H8V5zm-2.5 7c-.83 0-1.5-.67-1.5-1.5C4 9.68 4.67 9 5.5 9c.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 10h9v1H8v-1zm-2.5 7c-.83 0-1.5-.67-1.5-1.5 0-.82.67-1.5 1.5-1.5.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 15h9v1H8v-1z";break;case"editor-underline":e="M14 5h-2v5.71c0 1.99-1.12 2.98-2.45 2.98-1.32 0-2.55-1-2.55-2.96V5H5v5.87c0 1.91 1 4.54 4.48 4.54 3.49 0 4.52-2.58 4.52-4.5V5zm0 13v-2H5v2h9z";break;case"editor-unlink":e="M17.74 2.26c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-.32.33-.69.58-1.08.77L13 10l1.69-1.64.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-.76.76L10 7l-.65-2.14c.19-.38.44-.75.77-1.07l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM2 4l8 6-6-8zm4-2l4 8-2-8H6zM2 6l8 4-8-2V6zm7.36 7.69L10 13l.74 2.35-1.38 1.39c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.39-1.38L7 10l-.69.64-1.52 1.53c-.85.84-.85 2.2 0 3.04.84.85 2.2.85 3.04 0zM18 16l-8-6 6 8zm-4 2l-4-8 2 8h2zm4-4l-8-4 8 2v2z";break;case"editor-video":e="M16 2h-3v1H7V2H4v15h3v-1h6v1h3V2zM6 3v1H5V3h1zm9 0v1h-1V3h1zm-2 1v5H7V4h6zM6 5v1H5V5h1zm9 0v1h-1V5h1zM6 7v1H5V7h1zm9 0v1h-1V7h1zM6 9v1H5V9h1zm9 0v1h-1V9h1zm-2 1v5H7v-5h6zm-7 1v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1z";break;case"ellipsis":e="M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z";break;case"email-alt":e="M19 14.5v-9c0-.83-.67-1.5-1.5-1.5H3.49c-.83 0-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5H17.5c.83 0 1.5-.67 1.5-1.5zm-1.31-9.11c.33.33.15.67-.03.84L13.6 9.95l3.9 4.06c.12.14.2.36.06.51-.13.16-.43.15-.56.05l-4.37-3.73-2.14 1.95-2.13-1.95-4.37 3.73c-.13.1-.43.11-.56-.05-.14-.15-.06-.37.06-.51l3.9-4.06-4.06-3.72c-.18-.17-.36-.51-.03-.84s.67-.17.95.07l6.24 5.04 6.25-5.04c.28-.24.62-.4.95-.07z";break;case"email-alt2":e="M18.01 11.18V2.51c0-1.19-.9-1.81-2-1.37L4 5.91c-1.1.44-2 1.77-2 2.97v8.66c0 1.2.9 1.81 2 1.37l12.01-4.77c1.1-.44 2-1.76 2-2.96zm-1.43-7.46l-6.04 9.33-6.65-4.6c-.1-.07-.36-.32-.17-.64.21-.36.65-.21.65-.21l6.3 2.32s4.83-6.34 5.11-6.7c.13-.17.43-.34.73-.13.29.2.16.49.07.63z";break;case"email":e="M3.87 4h13.25C18.37 4 19 4.59 19 5.79v8.42c0 1.19-.63 1.79-1.88 1.79H3.87c-1.25 0-1.88-.6-1.88-1.79V5.79c0-1.2.63-1.79 1.88-1.79zm6.62 8.6l6.74-5.53c.24-.2.43-.66.13-1.07-.29-.41-.82-.42-1.17-.17l-5.7 3.86L4.8 5.83c-.35-.25-.88-.24-1.17.17-.3.41-.11.87.13 1.07z";break;case"embed-audio":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 3H7v4c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.4 0 .7.1 1 .3V5h4v2zm4 3.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"embed-generic":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3 6.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"embed-photo":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 8H3V6h7v6zm4-1.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3zm-6-4V8.5L7.2 10 6 9.2 4 11h5zM4.6 8.6c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z";break;case"embed-post":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.6 9l-.4.3c-.4.4-.5 1.1-.2 1.6l-.8.8-1.1-1.1-1.3 1.3c-.2.2-1.6 1.3-1.8 1.1-.2-.2.9-1.6 1.1-1.8l1.3-1.3-1.1-1.1.8-.8c.5.3 1.2.3 1.6-.2l.3-.3c.5-.5.5-1.2.2-1.7L8 5l3 2.9-.8.8c-.5-.2-1.2-.2-1.6.3zm5.4 1.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"embed-video":e="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 6.5L8 9.1V11H3V6h5v1.8l2-1.3v4zm4 0L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z";break;case"excerpt-view":e="M19 18V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6V3h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6v-6h11z";break;case"exit":e="M13 3v2h2v10h-2v2h4V3h-4zm0 8V9H5.4l4.3-4.3-1.4-1.4L1.6 10l6.7 6.7 1.4-1.4L5.4 11H13z";break;case"external":e="M9 3h8v8l-2-1V6.92l-5.6 5.59-1.41-1.41L14.08 5H10zm3 12v-3l2-2v7H3V6h8L9 8H5v7h7z";break;case"facebook-alt":e="M8.46 18h2.93v-7.3h2.45l.37-2.84h-2.82V6.04c0-.82.23-1.38 1.41-1.38h1.51V2.11c-.26-.03-1.15-.11-2.19-.11-2.18 0-3.66 1.33-3.66 3.76v2.1H6v2.84h2.46V18z";break;case"facebook":e="M2.89 2h14.23c.49 0 .88.39.88.88v14.24c0 .48-.39.88-.88.88h-4.08v-6.2h2.08l.31-2.41h-2.39V7.85c0-.7.2-1.18 1.2-1.18h1.28V4.51c-.22-.03-.98-.09-1.86-.09-1.85 0-3.11 1.12-3.11 3.19v1.78H8.46v2.41h2.09V18H2.89c-.49 0-.89-.4-.89-.88V2.88c0-.49.4-.88.89-.88z";break;case"feedback":e="M2 2h16c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm15 14V7H3v9h14zM4 8v1h3V8H4zm4 0v3h8V8H8zm-4 4v1h3v-1H4zm4 0v3h8v-3H8z";break;case"filter":e="M3 4.5v-2s3.34-1 7-1 7 1 7 1v2l-5 7.03v6.97s-1.22-.09-2.25-.59S8 16.5 8 16.5v-4.97z";break;case"flag":e="M5 18V3H3v15h2zm1-6V4c3-1 7 1 11 0v8c-3 1.27-8-1-11 0z";break;case"format-aside":e="M1 1h18v12l-6 6H1V1zm3 3v1h12V4H4zm0 4v1h12V8H4zm6 5v-1H4v1h6zm2 4l5-5h-5v5z";break;case"format-audio":e="M6.99 3.08l11.02-2c.55-.08.99.45.99 1V14.5c0 1.94-1.57 3.5-3.5 3.5S12 16.44 12 14.5c0-1.93 1.57-3.5 3.5-3.5.54 0 1.04.14 1.5.35V5.08l-9 2V16c-.24 1.7-1.74 3-3.5 3C2.57 19 1 17.44 1 15.5 1 13.57 2.57 12 4.5 12c.54 0 1.04.14 1.5.35V4.08c0-.55.44-.91.99-1z";break;case"format-chat":e="M11 6h-.82C9.07 6 8 7.2 8 8.16V10l-3 3v-3H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v3zm0 1h6c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2h-2v3l-3-3h-1c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2z";break;case"format-gallery":e="M16 4h1.96c.57 0 1.04.47 1.04 1.04v12.92c0 .57-.47 1.04-1.04 1.04H5.04C4.47 19 4 18.53 4 17.96V16H2.04C1.47 16 1 15.53 1 14.96V2.04C1 1.47 1.47 1 2.04 1h12.92c.57 0 1.04.47 1.04 1.04V4zM3 14h11V3H3v11zm5-8.5C8 4.67 7.33 4 6.5 4S5 4.67 5 5.5 5.67 7 6.5 7 8 6.33 8 5.5zm2 4.5s1-5 3-5v8H4V7c2 0 2 3 2 3s.33-2 2-2 2 2 2 2zm7 7V6h-1v8.96c0 .57-.47 1.04-1.04 1.04H6v1h11z";break;case"format-image":e="M2.25 1h15.5c.69 0 1.25.56 1.25 1.25v15.5c0 .69-.56 1.25-1.25 1.25H2.25C1.56 19 1 18.44 1 17.75V2.25C1 1.56 1.56 1 2.25 1zM17 17V3H3v14h14zM10 6c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm3 5s0-6 3-6v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V8c2 0 3 4 3 4s1-3 3-3 3 2 3 2z";break;case"format-quote":e="M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z";break;case"format-status":e="M10 1c7 0 9 2.91 9 6.5S17 14 10 14s-9-2.91-9-6.5S3 1 10 1zM5.5 9C6.33 9 7 8.33 7 7.5S6.33 6 5.5 6 4 6.67 4 7.5 4.67 9 5.5 9zM10 9c.83 0 1.5-.67 1.5-1.5S10.83 6 10 6s-1.5.67-1.5 1.5S9.17 9 10 9zm4.5 0c.83 0 1.5-.67 1.5-1.5S15.33 6 14.5 6 13 6.67 13 7.5 13.67 9 14.5 9zM6 14.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm-3 2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z";break;case"format-video":e="M2 1h16c.55 0 1 .45 1 1v16l-18-.02V2c0-.55.45-1 1-1zm4 1L4 5h1l2-3H6zm4 0H9L7 5h1zm3 0h-1l-2 3h1zm3 0h-1l-2 3h1zm1 14V6H3v10h14zM8 7l6 4-6 4V7z";break;case"forms":e="M2 2h7v7H2V2zm9 0v7h7V2h-7zM5.5 4.5L7 3H4zM12 8V3h5v5h-5zM4.5 5.5L3 4v3zM8 4L6.5 5.5 8 7V4zM5.5 6.5L4 8h3zM9 18v-7H2v7h7zm9 0h-7v-7h7v7zM8 12v5H3v-5h5zm6.5 1.5L16 12h-3zM12 16l1.5-1.5L12 13v3zm3.5-1.5L17 16v-3zm-1 1L13 17h3z";break;case"googleplus":e="M6.73 10h5.4c.05.29.09.57.09.95 0 3.27-2.19 5.6-5.49 5.6-3.17 0-5.73-2.57-5.73-5.73 0-3.17 2.56-5.73 5.73-5.73 1.54 0 2.84.57 3.83 1.5l-1.55 1.5c-.43-.41-1.17-.89-2.28-.89-1.96 0-3.55 1.62-3.55 3.62 0 1.99 1.59 3.61 3.55 3.61 2.26 0 3.11-1.62 3.24-2.47H6.73V10zM19 10v1.64h-1.64v1.63h-1.63v-1.63h-1.64V10h1.64V8.36h1.63V10H19z";break;case"grid-view":e="M2 1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1zm7.01 7.99v-6H3v6h6.01zm8 0v-6h-6v6h6zm-8 8.01v-6H3v6h6.01zm8 0v-6h-6v6h6z";break;case"groups":e="M8.03 4.46c-.29 1.28.55 3.46 1.97 3.46 1.41 0 2.25-2.18 1.96-3.46-.22-.98-1.08-1.63-1.96-1.63-.89 0-1.74.65-1.97 1.63zm-4.13.9c-.25 1.08.47 2.93 1.67 2.93s1.92-1.85 1.67-2.93c-.19-.83-.92-1.39-1.67-1.39s-1.48.56-1.67 1.39zm8.86 0c-.25 1.08.47 2.93 1.66 2.93 1.2 0 1.92-1.85 1.67-2.93-.19-.83-.92-1.39-1.67-1.39-.74 0-1.47.56-1.66 1.39zm-.59 11.43l1.25-4.3C14.2 10 12.71 8.47 10 8.47c-2.72 0-4.21 1.53-3.44 4.02l1.26 4.3C8.05 17.51 9 18 10 18c.98 0 1.94-.49 2.17-1.21zm-6.1-7.63c-.49.67-.96 1.83-.42 3.59l1.12 3.79c-.34.2-.77.31-1.2.31-.85 0-1.65-.41-1.85-1.03l-1.07-3.65c-.65-2.11.61-3.4 2.92-3.4.27 0 .54.02.79.06-.1.1-.2.22-.29.33zm8.35-.39c2.31 0 3.58 1.29 2.92 3.4l-1.07 3.65c-.2.62-1 1.03-1.85 1.03-.43 0-.86-.11-1.2-.31l1.11-3.77c.55-1.78.08-2.94-.42-3.61-.08-.11-.18-.23-.28-.33.25-.04.51-.06.79-.06z";break;case"hammer":e="M17.7 6.32l1.41 1.42-3.47 3.41-1.42-1.42.84-.82c-.32-.76-.81-1.57-1.51-2.31l-4.61 6.59-5.26 4.7c-.39.39-1.02.39-1.42 0l-1.2-1.21c-.39-.39-.39-1.02 0-1.41l10.97-9.92c-1.37-.86-3.21-1.46-5.67-1.48 2.7-.82 4.95-.93 6.58-.3 1.7.66 2.82 2.2 3.91 3.58z";break;case"heading":e="M12.5 4v5.2h-5V4H5v13h2.5v-5.2h5V17H15V4";break;case"heart":e="M10 17.12c3.33-1.4 5.74-3.79 7.04-6.21 1.28-2.41 1.46-4.81.32-6.25-1.03-1.29-2.37-1.78-3.73-1.74s-2.68.63-3.63 1.46c-.95-.83-2.27-1.42-3.63-1.46s-2.7.45-3.73 1.74c-1.14 1.44-.96 3.84.34 6.25 1.28 2.42 3.69 4.81 7.02 6.21z";break;case"hidden":e="M17.2 3.3l.16.17c.39.39.39 1.02 0 1.41L4.55 17.7c-.39.39-1.03.39-1.41 0l-.17-.17c-.39-.39-.39-1.02 0-1.41l1.59-1.6c-1.57-1-2.76-2.3-3.56-3.93.81-1.65 2.03-2.98 3.64-3.99S8.04 5.09 10 5.09c1.2 0 2.33.21 3.4.6l2.38-2.39c.39-.39 1.03-.39 1.42 0zm-7.09 4.01c-.23.25-.34.54-.34.88 0 .31.12.58.31.81l1.8-1.79c-.13-.12-.28-.21-.45-.26-.11-.01-.28-.03-.49-.04-.33.03-.6.16-.83.4zM2.4 10.59c.69 1.23 1.71 2.25 3.05 3.05l1.28-1.28c-.51-.69-.77-1.47-.77-2.36 0-1.06.36-1.98 1.09-2.76-1.04.27-1.96.7-2.76 1.26-.8.58-1.43 1.27-1.89 2.09zm13.22-2.13l.96-.96c1.02.86 1.83 1.89 2.42 3.09-.81 1.65-2.03 2.98-3.64 3.99s-3.4 1.51-5.36 1.51c-.63 0-1.24-.07-1.83-.18l1.07-1.07c.25.02.5.05.76.05 1.63 0 3.13-.4 4.5-1.21s2.4-1.84 3.1-3.09c-.46-.82-1.09-1.51-1.89-2.09-.03-.01-.06-.03-.09-.04zm-5.58 5.58l4-4c-.01 1.1-.41 2.04-1.18 2.81-.78.78-1.72 1.18-2.82 1.19z";break;case"html":e="M4 16v-2H2v2H1v-5h1v2h2v-2h1v5H4zM7 16v-4H5.6v-1h3.7v1H8v4H7zM10 16v-5h1l1.4 3.4h.1L14 11h1v5h-1v-3.1h-.1l-1.1 2.5h-.6l-1.1-2.5H11V16h-1zM19 16h-3v-5h1v4h2v1zM9.4 4.2L7.1 6.5l2.3 2.3-.6 1.2-3.5-3.5L8.8 3l.6 1.2zm1.2 4.6l2.3-2.3-2.3-2.3.6-1.2 3.5 3.5-3.5 3.5-.6-1.2z";break;case"id-alt":e="M18 18H2V2h16v16zM8.05 7.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L8.95 6c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C8.23 4.1 7.95 4 7.6 4c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM16 5V4h-5v1h5zm0 2V6h-5v1h5zM7.62 8.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM16 9V8h-3v1h3zm0 2v-1h-3v1h3zm0 3v-1H4v1h12zm0 2v-1H4v1h12z";break;case"id":e="M18 16H2V4h16v12zM7.05 8.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L7.95 7c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C7.23 5.1 6.95 5 6.6 5c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM17 9V5h-5v4h5zm-10.38.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM17 11v-1h-5v1h5zm0 2v-1h-5v1h5zm0 2v-1H3v1h14z";break;case"image-crop":e="M19 12v3h-4v4h-3v-4H4V7H0V4h4V0h3v4h7l3-3 1 1-3 3v7h4zm-8-5H7v4zm-3 5h4V8z";break;case"image-filter":e="M14 5.87c0-2.2-1.79-4-4-4s-4 1.8-4 4c0 2.21 1.79 4 4 4s4-1.79 4-4zM3.24 10.66c-1.92 1.1-2.57 3.55-1.47 5.46 1.11 1.92 3.55 2.57 5.47 1.47 1.91-1.11 2.57-3.55 1.46-5.47-1.1-1.91-3.55-2.56-5.46-1.46zm9.52 6.93c1.92 1.1 4.36.45 5.47-1.46 1.1-1.92.45-4.36-1.47-5.47-1.91-1.1-4.36-.45-5.46 1.46-1.11 1.92-.45 4.36 1.46 5.47z";break;case"image-flip-horizontal":e="M19 3v14h-8v3H9v-3H1V3h8V0h2v3h8zm-8.5 14V3h-1v14h1zM7 6.5L3 10l4 3.5v-7zM17 10l-4-3.5v7z";break;case"image-flip-vertical":e="M20 9v2h-3v8H3v-8H0V9h3V1h14v8h3zM6.5 7h7L10 3zM17 9.5H3v1h14v-1zM13.5 13h-7l3.5 4z";break;case"image-rotate-left":e="M7 5H5.05c0-1.74.85-2.9 2.95-2.9V0C4.85 0 2.96 2.11 2.96 5H1.18L3.8 8.39zm13-4v14h-5v5H1V10h9V1h10zm-2 2h-6v7h3v3h3V3zm-5 9H3v6h10v-6z";break;case"image-rotate-right":e="M15.95 5H14l3.2 3.39L19.82 5h-1.78c0-2.89-1.89-5-5.04-5v2.1c2.1 0 2.95 1.16 2.95 2.9zM1 1h10v9h9v10H6v-5H1V1zm2 2v10h3v-3h3V3H3zm5 9v6h10v-6H8z";break;case"image-rotate":e="M10.25 1.02c5.1 0 8.75 4.04 8.75 9s-3.65 9-8.75 9c-3.2 0-6.02-1.59-7.68-3.99l2.59-1.52c1.1 1.5 2.86 2.51 4.84 2.51 3.3 0 6-2.79 6-6s-2.7-6-6-6c-1.97 0-3.72 1-4.82 2.49L7 8.02l-6 2v-7L2.89 4.6c1.69-2.17 4.36-3.58 7.36-3.58z";break;case"images-alt":e="M4 15v-3H2V2h12v3h2v3h2v10H6v-3H4zm7-12c-1.1 0-2 .9-2 2h4c0-1.1-.89-2-2-2zm-7 8V6H3v5h1zm7-3h4c0-1.1-.89-2-2-2-1.1 0-2 .9-2 2zm-5 6V9H5v5h1zm9-1c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2s-2 .9-2 2c0 1.11.9 2 2 2zm2 4v-2c-5 0-5-3-10-3v5h10z";break;case"images-alt2":e="M5 3h14v11h-2v2h-2v2H1V7h2V5h2V3zm13 10V4H6v9h12zm-3-4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm1 6v-1H5V6H4v9h12zM7 6l10 6H7V6zm7 11v-1H3V8H2v9h12z";break;case"index-card":e="M1 3.17V18h18V4H8v-.83c0-.32-.12-.6-.35-.83S7.14 2 6.82 2H2.18c-.33 0-.6.11-.83.34-.24.23-.35.51-.35.83zM10 6v2H3V6h7zm7 0v10h-5V6h5zm-7 4v2H3v-2h7zm0 4v2H3v-2h7z";break;case"info-outline":e="M9 15h2V9H9v6zm1-10c-.5 0-1 .5-1 1s.5 1 1 1 1-.5 1-1-.5-1-1-1zm0-4c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z";break;case"info":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1 4c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zm0 9V9H9v6h2z";break;case"insert-after":e="M9 12h2v-2h2V8h-2V6H9v2H7v2h2v2zm1 4c3.9 0 7-3.1 7-7s-3.1-7-7-7-7 3.1-7 7 3.1 7 7 7zm0-12c2.8 0 5 2.2 5 5s-2.2 5-5 5-5-2.2-5-5 2.2-5 5-5zM3 19h14v-2H3v2z";break;case"insert-before":e="M11 8H9v2H7v2h2v2h2v-2h2v-2h-2V8zm-1-4c-3.9 0-7 3.1-7 7s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 12c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zM3 1v2h14V1H3z";break;case"insert":e="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z";break;case"instagram":e="M12.67 10A2.67 2.67 0 1 0 10 12.67 2.68 2.68 0 0 0 12.67 10zm1.43 0A4.1 4.1 0 1 1 10 5.9a4.09 4.09 0 0 1 4.1 4.1zm1.13-4.27a1 1 0 1 1-1-1 1 1 0 0 1 1 1zM10 3.44c-1.17 0-3.67-.1-4.72.32a2.67 2.67 0 0 0-1.52 1.52c-.42 1-.32 3.55-.32 4.72s-.1 3.67.32 4.72a2.74 2.74 0 0 0 1.52 1.52c1 .42 3.55.32 4.72.32s3.67.1 4.72-.32a2.83 2.83 0 0 0 1.52-1.52c.42-1.05.32-3.55.32-4.72s.1-3.67-.32-4.72a2.74 2.74 0 0 0-1.52-1.52c-1.05-.42-3.55-.32-4.72-.32zM18 10c0 1.1 0 2.2-.05 3.3a4.84 4.84 0 0 1-1.29 3.36A4.8 4.8 0 0 1 13.3 18H6.7a4.84 4.84 0 0 1-3.36-1.29 4.84 4.84 0 0 1-1.29-3.41C2 12.2 2 11.1 2 10V6.7a4.84 4.84 0 0 1 1.34-3.36A4.8 4.8 0 0 1 6.7 2.05C7.8 2 8.9 2 10 2h3.3a4.84 4.84 0 0 1 3.36 1.29A4.8 4.8 0 0 1 18 6.7V10z";break;case"keyboard-hide":e="M18,0 L2,0 C0.9,0 0.01,0.9 0.01,2 L0,12 C0,13.1 0.9,14 2,14 L18,14 C19.1,14 20,13.1 20,12 L20,2 C20,0.9 19.1,0 18,0 Z M18,12 L2,12 L2,2 L18,2 L18,12 Z M9,3 L11,3 L11,5 L9,5 L9,3 Z M9,6 L11,6 L11,8 L9,8 L9,6 Z M6,3 L8,3 L8,5 L6,5 L6,3 Z M6,6 L8,6 L8,8 L6,8 L6,6 Z M3,6 L5,6 L5,8 L3,8 L3,6 Z M3,3 L5,3 L5,5 L3,5 L3,3 Z M6,9 L14,9 L14,11 L6,11 L6,9 Z M12,6 L14,6 L14,8 L12,8 L12,6 Z M12,3 L14,3 L14,5 L12,5 L12,3 Z M15,6 L17,6 L17,8 L15,8 L15,6 Z M15,3 L17,3 L17,5 L15,5 L15,3 Z M10,20 L14,16 L6,16 L10,20 Z";break;case"laptop":e="M3 3h14c.6 0 1 .4 1 1v10c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1zm13 2H4v8h12V5zm-3 1H5v4zm6 11v-1H1v1c0 .6.5 1 1.1 1h15.8c.6 0 1.1-.4 1.1-1z";break;case"layout":e="M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z";break;case"leftright":e="M3 10.03L9 6v8zM11 6l6 4.03L11 14V6z";break;case"lightbulb":e="M10 1c3.11 0 5.63 2.52 5.63 5.62 0 1.84-2.03 4.58-2.03 4.58-.33.44-.6 1.25-.6 1.8v1c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-1c0-.55-.27-1.36-.6-1.8 0 0-2.02-2.74-2.02-4.58C4.38 3.52 6.89 1 10 1zM7 16.87V16h6v.87c0 .62-.13 1.13-.75 1.13H12c0 .62-.4 1-1.02 1h-2c-.61 0-.98-.38-.98-1h-.25c-.62 0-.75-.51-.75-1.13z";break;case"list-view":e="M2 19h16c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V3h11zM4 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V7h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11zM4 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11z";break;case"location-alt":e="M13 13.14l1.17-5.94c.79-.43 1.33-1.25 1.33-2.2 0-1.38-1.12-2.5-2.5-2.5S10.5 3.62 10.5 5c0 .95.54 1.77 1.33 2.2zm0-9.64c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm1.72 4.8L18 6.97v9L13.12 18 7 15.97l-5 2v-9l5-2 4.27 1.41 1.73 7.3z";break;case"location":e="M10 2C6.69 2 4 4.69 4 8c0 2.02 1.17 3.71 2.53 4.89.43.37 1.18.96 1.85 1.83.74.97 1.41 2.01 1.62 2.71.21-.7.88-1.74 1.62-2.71.67-.87 1.42-1.46 1.85-1.83C14.83 11.71 16 10.02 16 8c0-3.31-2.69-6-6-6zm0 2.56c1.9 0 3.44 1.54 3.44 3.44S11.9 11.44 10 11.44 6.56 9.9 6.56 8 8.1 4.56 10 4.56z";break;case"lock":e="M14 9h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h1V6c0-2.21 1.79-4 4-4s4 1.79 4 4v3zm-2 0V6c0-1.1-.9-2-2-2s-2 .9-2 2v3h4zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z";break;case"marker":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z";break;case"media-archive":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zM8 3.5v2l1.8-1zM11 5L9.2 6 11 7V5zM8 6.5v2l1.8-1zM11 8L9.2 9l1.8 1V8zM8 9.5v2l1.8-1zm3 1.5l-1.8 1 1.8 1v-2zm-1.5 6c.83 0 1.62-.72 1.5-1.63-.05-.38-.49-1.61-.49-1.61l-1.99-1.1s-.45 1.95-.52 2.71c-.07.77.67 1.63 1.5 1.63zm0-2.39c.42 0 .76.34.76.76 0 .43-.34.77-.76.77s-.76-.34-.76-.77c0-.42.34-.76.76-.76z";break;case"media-audio":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm1 7.26V8.09c0-.11-.04-.21-.12-.29-.07-.08-.16-.11-.27-.1 0 0-3.97.71-4.25.78C8.07 8.54 8 8.8 8 9v3.37c-.2-.09-.42-.07-.6-.07-.38 0-.7.13-.96.39-.26.27-.4.58-.4.96 0 .37.14.69.4.95.26.27.58.4.96.4.34 0 .7-.04.96-.26.26-.23.64-.65.64-1.12V10.3l3-.6V12c-.67-.2-1.17.04-1.44.31-.26.26-.39.58-.39.95 0 .38.13.69.39.96.27.26.71.39 1.08.39.38 0 .7-.13.96-.39.26-.27.4-.58.4-.96z";break;case"media-code":e="M12 2l4 4v12H4V2h8zM9 13l-2-2 2-2-1-1-3 3 3 3zm3 1l3-3-3-3-1 1 2 2-2 2z";break;case"media-default":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3z";break;case"media-document":e="M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zM5 9v1h4V9H5zm10 3V9h-5v3h5zM5 11v1h4v-1H5zm10 3v-1H5v1h10zm-3 2v-1H5v1h7z";break;case"media-interactive":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm2 8V8H6v6h3l-1 2h1l1-2 1 2h1l-1-2h3zm-6-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm5-2v2h-3V9h3zm0 3v1H7v-1h6z";break;case"media-spreadsheet":e="M12 2l4 4v12H4V2h8zm-1 4V3H5v3h6zM8 8V7H5v1h3zm3 0V7H9v1h2zm4 0V7h-3v1h3zm-7 2V9H5v1h3zm3 0V9H9v1h2zm4 0V9h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2z";break;case"media-text":e="M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zm0 2V9H5v1h10zm0 2v-1H5v1h10zm-4 2v-1H5v1h6z";break;case"media-video":e="M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm-1 8v-3c0-.27-.1-.51-.29-.71-.2-.19-.44-.29-.71-.29H7c-.27 0-.51.1-.71.29-.19.2-.29.44-.29.71v3c0 .27.1.51.29.71.2.19.44.29.71.29h3c.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71zm3 1v-5l-2 2v1z";break;case"megaphone":e="M18.15 5.94c.46 1.62.38 3.22-.02 4.48-.42 1.28-1.26 2.18-2.3 2.48-.16.06-.26.06-.4.06-.06.02-.12.02-.18.02-.06.02-.14.02-.22.02h-6.8l2.22 5.5c.02.14-.06.26-.14.34-.08.1-.24.16-.34.16H6.95c-.1 0-.26-.06-.34-.16-.08-.08-.16-.2-.14-.34l-1-5.5H4.25l-.02-.02c-.5.06-1.08-.18-1.54-.62s-.88-1.08-1.06-1.88c-.24-.8-.2-1.56-.02-2.2.18-.62.58-1.08 1.06-1.3l.02-.02 9-5.4c.1-.06.18-.1.24-.16.06-.04.14-.08.24-.12.16-.08.28-.12.5-.18 1.04-.3 2.24.1 3.22.98s1.84 2.24 2.26 3.86zm-2.58 5.98h-.02c.4-.1.74-.34 1.04-.7.58-.7.86-1.76.86-3.04 0-.64-.1-1.3-.28-1.98-.34-1.36-1.02-2.5-1.78-3.24s-1.68-1.1-2.46-.88c-.82.22-1.4.96-1.7 2-.32 1.04-.28 2.36.06 3.72.38 1.36 1 2.5 1.8 3.24.78.74 1.62 1.1 2.48.88zm-2.54-7.08c.22-.04.42-.02.62.04.38.16.76.48 1.02 1s.42 1.2.42 1.78c0 .3-.04.56-.12.8-.18.48-.44.84-.86.94-.34.1-.8-.06-1.14-.4s-.64-.86-.78-1.5c-.18-.62-.12-1.24.02-1.72s.48-.84.82-.94z";break;case"menu-alt":e="M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h14v2H3v-2z";break;case"menu":e="M17 7V5H3v2h14zm0 4V9H3v2h14zm0 4v-2H3v2h14z";break;case"microphone":e="M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z";break;case"migrate":e="M4 6h6V4H2v12.01h8V14H4V6zm2 2h6V5l6 5-6 5v-3H6V8z";break;case"minus":e="M4 9h12v2H4V9z";break;case"money":e="M0 3h20v12h-.75c0-1.79-1.46-3.25-3.25-3.25-1.31 0-2.42.79-2.94 1.91-.25-.1-.52-.16-.81-.16-.98 0-1.8.63-2.11 1.5H0V3zm8.37 3.11c-.06.15-.1.31-.11.47s-.01.33.01.5l.02.08c.01.06.02.14.05.23.02.1.06.2.1.31.03.11.09.22.15.33.07.12.15.22.23.31s.18.17.31.23c.12.06.25.09.4.09.14 0 .27-.03.39-.09s.22-.14.3-.22c.09-.09.16-.2.22-.32.07-.12.12-.23.16-.33s.07-.2.09-.31c.03-.11.04-.18.05-.22s.01-.07.01-.09c.05-.29.03-.56-.04-.82s-.21-.48-.41-.66c-.21-.18-.47-.27-.79-.27-.19 0-.36.03-.52.1-.15.07-.28.16-.38.28-.09.11-.17.25-.24.4zm4.48 6.04v-1.14c0-.33-.1-.66-.29-.98s-.45-.59-.77-.79c-.32-.21-.66-.31-1.02-.31l-1.24.84-1.28-.82c-.37 0-.72.1-1.04.3-.31.2-.56.46-.74.77-.18.32-.27.65-.27.99v1.14l.18.05c.12.04.29.08.51.14.23.05.47.1.74.15.26.05.57.09.91.13.34.03.67.05.99.05.3 0 .63-.02.98-.05.34-.04.64-.08.89-.13.25-.04.5-.1.76-.16l.5-.12c.08-.02.14-.04.19-.06zm3.15.1c1.52 0 2.75 1.23 2.75 2.75s-1.23 2.75-2.75 2.75c-.73 0-1.38-.3-1.87-.77.23-.35.37-.78.37-1.23 0-.77-.39-1.46-.99-1.86.43-.96 1.37-1.64 2.49-1.64zm-5.5 3.5c0-.96.79-1.75 1.75-1.75s1.75.79 1.75 1.75-.79 1.75-1.75 1.75-1.75-.79-1.75-1.75z";break;case"move":e="M19 10l-4 4v-3h-4v4h3l-4 4-4-4h3v-4H5v3l-4-4 4-4v3h4V5H6l4-4 4 4h-3v4h4V6z";break;case"nametag":e="M12 5V2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-2-3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 13V7c0-1.1-.9-2-2-2h-3v.33C13 6.25 12.25 7 11.33 7H8.67C7.75 7 7 6.25 7 5.33V5H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-1-6v6H3V9h14zm-8 2c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm3 0c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm-5.96 1.21c.92.48 2.34.79 3.96.79s3.04-.31 3.96-.79c-.21 1-1.89 1.79-3.96 1.79s-3.75-.79-3.96-1.79z";break;case"networking":e="M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z";break;case"no-alt":e="M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z";break;case"no":e="M12.12 10l3.53 3.53-2.12 2.12L10 12.12l-3.54 3.54-2.12-2.12L7.88 10 4.34 6.46l2.12-2.12L10 7.88l3.54-3.53 2.12 2.12z";break;case"palmtree":e="M8.58 2.39c.32 0 .59.05.81.14 1.25.55 1.69 2.24 1.7 3.97.59-.82 2.15-2.29 3.41-2.29s2.94.73 3.53 3.55c-1.13-.65-2.42-.94-3.65-.94-1.26 0-2.45.32-3.29.89.4-.11.86-.16 1.33-.16 1.39 0 2.9.45 3.4 1.31.68 1.16.47 3.38-.76 4.14-.14-2.1-1.69-4.12-3.47-4.12-.44 0-.88.12-1.33.38C8 10.62 7 14.56 7 19H2c0-5.53 4.21-9.65 7.68-10.79-.56-.09-1.17-.15-1.82-.15C6.1 8.06 4.05 8.5 2 10c.76-2.96 2.78-4.1 4.69-4.1 1.25 0 2.45.5 3.2 1.29-.66-2.24-2.49-2.86-4.08-2.86-.8 0-1.55.16-2.05.35.91-1.29 3.31-2.29 4.82-2.29zM13 11.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5.67 1.5 1.5 1.5 1.5-.67 1.5-1.5z";break;case"paperclip":e="M17.05 2.7c1.93 1.94 1.93 5.13 0 7.07L10 16.84c-1.88 1.89-4.91 1.93-6.86.15-.06-.05-.13-.09-.19-.15-1.93-1.94-1.93-5.12 0-7.07l4.94-4.95c.91-.92 2.28-1.1 3.39-.58.3.15.59.33.83.58 1.17 1.17 1.17 3.07 0 4.24l-4.93 4.95c-.39.39-1.02.39-1.41 0s-.39-1.02 0-1.41l4.93-4.95c.39-.39.39-1.02 0-1.41-.38-.39-1.02-.39-1.4 0l-4.94 4.95c-.91.92-1.1 2.29-.57 3.4.14.3.32.59.57.84s.54.43.84.57c1.11.53 2.47.35 3.39-.57l7.05-7.07c1.16-1.17 1.16-3.08 0-4.25-.56-.55-1.28-.83-2-.86-.08.01-.16.01-.24 0-.22-.03-.43-.11-.6-.27-.39-.4-.38-1.05.02-1.45.16-.16.36-.24.56-.28.14-.02.27-.01.4.02 1.19.06 2.36.52 3.27 1.43z";break;case"performance":e="M3.76 17.01h12.48C17.34 15.63 18 13.9 18 12c0-4.41-3.58-8-8-8s-8 3.59-8 8c0 1.9.66 3.63 1.76 5.01zM9 6c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zM4 8c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm4.52 3.4c.84-.83 6.51-3.5 6.51-3.5s-2.66 5.68-3.49 6.51c-.84.84-2.18.84-3.02 0-.83-.83-.83-2.18 0-3.01zM3 13c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1z";break;case"phone":e="M12.06 6l-.21-.2c-.52-.54-.43-.79.08-1.3l2.72-2.75c.81-.82.96-1.21 1.73-.48l.21.2zm.53.45l4.4-4.4c.7.94 2.34 3.47 1.53 5.34-.73 1.67-1.09 1.75-2 3-1.85 2.11-4.18 4.37-6 6.07-1.26.91-1.31 1.33-3 2-1.8.71-4.4-.89-5.38-1.56l4.4-4.4 1.18 1.62c.34.46 1.2-.06 1.8-.66 1.04-1.05 3.18-3.18 4-4.07.59-.59 1.12-1.45.66-1.8zM1.57 16.5l-.21-.21c-.68-.74-.29-.9.52-1.7l2.74-2.72c.51-.49.75-.6 1.27-.11l.2.21z";break;case"playlist-audio":e="M17 3V1H2v2h15zm0 4V5H2v2h15zm-7 4V9H2v2h8zm7.45-1.96l-6 1.12c-.16.02-.19.03-.29.13-.11.09-.16.22-.16.37v4.59c-.29-.13-.66-.14-.93-.14-.54 0-1 .19-1.38.57s-.56.84-.56 1.38c0 .53.18.99.56 1.37s.84.57 1.38.57c.49 0 .92-.16 1.29-.48s.59-.71.65-1.19v-4.95L17 11.27v3.48c-.29-.13-.56-.19-.83-.19-.54 0-1.11.19-1.49.57-.38.37-.57.83-.57 1.37s.19.99.57 1.37.84.57 1.38.57c.53 0 .99-.19 1.37-.57s.57-.83.57-1.37V9.6c0-.16-.05-.3-.16-.41-.11-.12-.24-.17-.39-.15zM8 15v-2H2v2h6zm-2 4v-2H2v2h4z";break;case"playlist-video":e="M17 3V1H2v2h15zm0 4V5H2v2h15zM6 11V9H2v2h4zm2-2h9c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm3 7l3.33-2L11 12v4zm-5-1v-2H2v2h4zm0 4v-2H2v2h4z";break;case"plus-alt":e="M15.8 4.2c3.2 3.21 3.2 8.39 0 11.6-3.21 3.2-8.39 3.2-11.6 0C1 12.59 1 7.41 4.2 4.2 7.41 1 12.59 1 15.8 4.2zm-4.3 11.3v-4h4v-3h-4v-4h-3v4h-4v3h4v4h3z";break;case"plus-light":e="M17 9v2h-6v6H9v-6H3V9h6V3h2v6h6z";break;case"plus":e="M17 7v3h-5v5H9v-5H4V7h5V2h3v5h5z";break;case"portfolio":e="M4 5H.78c-.37 0-.74.32-.69.84l1.56 9.99S3.5 8.47 3.86 6.7c.11-.53.61-.7.98-.7H10s-.7-2.08-.77-2.31C9.11 3.25 8.89 3 8.45 3H5.14c-.36 0-.7.23-.8.64C4.25 4.04 4 5 4 5zm4.88 0h-4s.42-1 .87-1h2.13c.48 0 1 1 1 1zM2.67 16.25c-.31.47-.76.75-1.26.75h15.73c.54 0 .92-.31 1.03-.83.44-2.19 1.68-8.44 1.68-8.44.07-.5-.3-.73-.62-.73H16V5.53c0-.16-.26-.53-.66-.53h-3.76c-.52 0-.87.58-.87.58L10 7H5.59c-.32 0-.63.19-.69.5 0 0-1.59 6.7-1.72 7.33-.07.37-.22.99-.51 1.42zM15.38 7H11s.58-1 1.13-1h2.29c.71 0 .96 1 .96 1z";break;case"post-status":e="M14 6c0 1.86-1.28 3.41-3 3.86V16c0 1-2 2-2 2V9.86c-1.72-.45-3-2-3-3.86 0-2.21 1.79-4 4-4s4 1.79 4 4zM8 5c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z";break;case"pressthis":e="M14.76 1C16.55 1 18 2.46 18 4.25c0 1.78-1.45 3.24-3.24 3.24-.23 0-.47-.03-.7-.08L13 8.47V19H2V4h9.54c.13-2 1.52-3 3.22-3zm0 5.49C16 6.49 17 5.48 17 4.25 17 3.01 16 2 14.76 2s-2.24 1.01-2.24 2.25c0 .37.1.72.27 1.03L9.57 8.5c-.28.28-1.77 2.22-1.5 2.49.02.03.06.04.1.04.49 0 2.14-1.28 2.39-1.53l3.24-3.24c.29.14.61.23.96.23z";break;case"products":e="M17 8h1v11H2V8h1V6c0-2.76 2.24-5 5-5 .71 0 1.39.15 2 .42.61-.27 1.29-.42 2-.42 2.76 0 5 2.24 5 5v2zM5 6v2h2V6c0-1.13.39-2.16 1.02-3H8C6.35 3 5 4.35 5 6zm10 2V6c0-1.65-1.35-3-3-3h-.02c.63.84 1.02 1.87 1.02 3v2h2zm-5-4.22C9.39 4.33 9 5.12 9 6v2h2V6c0-.88-.39-1.67-1-2.22z";break;case"randomize":e="M18 6.01L14 9V7h-4l-5 8H2v-2h2l5-8h5V3zM2 5h3l1.15 2.17-1.12 1.8L4 7H2V5zm16 9.01L14 17v-2H9l-1.15-2.17 1.12-1.8L10 13h4v-2z";break;case"redo":e="M8 5h5V2l6 4-6 4V7H8c-2.2 0-4 1.8-4 4s1.8 4 4 4h5v2H8c-3.3 0-6-2.7-6-6s2.7-6 6-6z";break;case"rest-api":e="M3 4h2v12H3z";break;case"rss":e="M14.92 18H18C18 9.32 10.82 2.25 2 2.25v3.02c7.12 0 12.92 5.71 12.92 12.73zm-5.44 0h3.08C12.56 12.27 7.82 7.6 2 7.6v3.02c2 0 3.87.77 5.29 2.16C8.7 14.17 9.48 16.03 9.48 18zm-5.35-.02c1.17 0 2.13-.93 2.13-2.09 0-1.15-.96-2.09-2.13-2.09-1.18 0-2.13.94-2.13 2.09 0 1.16.95 2.09 2.13 2.09z";break;case"saved":e="M15.3 5.3l-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2 8.2-8.2";break;case"schedule":e="M2 2h16v4H2V2zm0 10V8h4v4H2zm6-2V8h4v2H8zm6 3V8h4v5h-4zm-6 5v-6h4v6H8zm-6 0v-4h4v4H2zm12 0v-3h4v3h-4z";break;case"screenoptions":e="M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z";break;case"search":e="M12.14 4.18c1.87 1.87 2.11 4.75.72 6.89.12.1.22.21.36.31.2.16.47.36.81.59.34.24.56.39.66.47.42.31.73.57.94.78.32.32.6.65.84 1 .25.35.44.69.59 1.04.14.35.21.68.18 1-.02.32-.14.59-.36.81s-.49.34-.81.36c-.31.02-.65-.04-.99-.19-.35-.14-.7-.34-1.04-.59-.35-.24-.68-.52-1-.84-.21-.21-.47-.52-.77-.93-.1-.13-.25-.35-.47-.66-.22-.32-.4-.57-.56-.78-.16-.2-.29-.35-.44-.5-2.07 1.09-4.69.76-6.44-.98-2.14-2.15-2.14-5.64 0-7.78 2.15-2.15 5.63-2.15 7.78 0zm-1.41 6.36c1.36-1.37 1.36-3.58 0-4.95-1.37-1.37-3.59-1.37-4.95 0-1.37 1.37-1.37 3.58 0 4.95 1.36 1.37 3.58 1.37 4.95 0z";break;case"share-alt":e="M16.22 5.8c.47.69.29 1.62-.4 2.08-.69.47-1.62.29-2.08-.4-.16-.24-.35-.46-.55-.67-.21-.2-.43-.39-.67-.55s-.5-.3-.77-.41c-.27-.12-.55-.21-.84-.26-.59-.13-1.23-.13-1.82-.01-.29.06-.57.15-.84.27-.27.11-.53.25-.77.41s-.46.35-.66.55c-.21.21-.4.43-.56.67s-.3.5-.41.76c-.01.02-.01.03-.01.04-.1.24-.17.48-.23.72H1V6h2.66c.04-.07.07-.13.12-.2.27-.4.57-.77.91-1.11s.72-.65 1.11-.91c.4-.27.83-.51 1.28-.7s.93-.34 1.41-.43c.99-.21 2.03-.21 3.02 0 .48.09.96.24 1.41.43s.88.43 1.28.7c.39.26.77.57 1.11.91s.64.71.91 1.11zM12.5 10c0-1.38-1.12-2.5-2.5-2.5S7.5 8.62 7.5 10s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5zm-8.72 4.2c-.47-.69-.29-1.62.4-2.09.69-.46 1.62-.28 2.08.41.16.24.35.46.55.67.21.2.43.39.67.55s.5.3.77.41c.27.12.55.2.84.26.59.13 1.23.12 1.82 0 .29-.06.57-.14.84-.26.27-.11.53-.25.77-.41s.46-.35.66-.55c.21-.21.4-.44.56-.67.16-.25.3-.5.41-.76.01-.02.01-.03.01-.04.1-.24.17-.48.23-.72H19v3h-2.66c-.04.06-.07.13-.12.2-.27.4-.57.77-.91 1.11s-.72.65-1.11.91c-.4.27-.83.51-1.28.7s-.93.33-1.41.43c-.99.21-2.03.21-3.02 0-.48-.1-.96-.24-1.41-.43s-.88-.43-1.28-.7c-.39-.26-.77-.57-1.11-.91s-.64-.71-.91-1.11z";break;case"share-alt2":e="M18 8l-5 4V9.01c-2.58.06-4.88.45-7 2.99.29-3.57 2.66-5.66 7-5.94V3zM4 14h11v-2l2-1.6V16H2V5h9.43c-1.83.32-3.31 1-4.41 2H4v7z";break;case"share":e="M14.5 12c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.24.03-.46.09-.69l-4.38-2.3c-.55.61-1.33.99-2.21.99-1.66 0-3-1.34-3-3s1.34-3 3-3c.88 0 1.66.39 2.21.99l4.38-2.3c-.06-.23-.09-.45-.09-.69 0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-.88 0-1.66-.39-2.21-.99l-4.38 2.3c.06.23.09.45.09.69s-.03.46-.09.69l4.38 2.3c.55-.61 1.33-.99 2.21-.99z";break;case"shield-alt":e="M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2z";break;case"shield":e="M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2zm0 8h5s1-1 1-5c0 0-5-1-6-2v7H5c1 4 5 7 5 7v-7z";break;case"shortcode":e="M6 14H4V6h2V4H2v12h4M7.1 17h2.1l3.7-14h-2.1M14 4v2h2v8h-2v2h4V4";break;case"slides":e="M5 14V6h10v8H5zm-3-1V7h2v6H2zm4-6v6h8V7H6zm10 0h2v6h-2V7zm-3 2V8H7v1h6zm0 3v-2H7v2h6z";break;case"smartphone":e="M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z";break;case"smiley":e="M7 5.2c1.1 0 2 .89 2 2 0 .37-.11.71-.28 1C8.72 8.2 8 8 7 8s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.9-2 2-2zm6 0c1.11 0 2 .89 2 2 0 .37-.11.71-.28 1 0 0-.72-.2-1.72-.2s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.89-2 2-2zm-3 13.7c3.72 0 7.03-2.36 8.23-5.88l-1.32-.46C15.9 15.52 13.12 17.5 10 17.5s-5.9-1.98-6.91-4.94l-1.32.46c1.2 3.52 4.51 5.88 8.23 5.88z";break;case"sort":e="M11 7H1l5 7zm-2 7h10l-5-7z";break;case"sos":e="M18 10c0-4.42-3.58-8-8-8s-8 3.58-8 8 3.58 8 8 8 8-3.58 8-8zM7.23 3.57L8.72 7.3c-.62.29-1.13.8-1.42 1.42L3.57 7.23c.71-1.64 2.02-2.95 3.66-3.66zm9.2 3.66L12.7 8.72c-.29-.62-.8-1.13-1.42-1.42l1.49-3.73c1.64.71 2.95 2.02 3.66 3.66zM10 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-6.43.77l3.73-1.49c.29.62.8 1.13 1.42 1.42l-1.49 3.73c-1.64-.71-2.95-2.02-3.66-3.66zm9.2 3.66l-1.49-3.73c.62-.29 1.13-.8 1.42-1.42l3.73 1.49c-.71 1.64-2.02 2.95-3.66 3.66z";break;case"star-empty":e="M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88l-4.68 2.34.87-5.15-3.18-3.56 4.65-.58z";break;case"star-filled":e="M10 1l3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z";break;case"star-half":e="M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88V3.24z";break;case"sticky":e="M5 3.61V1.04l8.99-.01-.01 2.58c-1.22.26-2.16 1.35-2.16 2.67v.5c.01 1.31.93 2.4 2.17 2.66l-.01 2.58h-3.41l-.01 2.57c0 .6-.47 4.41-1.06 4.41-.6 0-1.08-3.81-1.08-4.41v-2.56L5 12.02l.01-2.58c1.23-.25 2.15-1.35 2.15-2.66v-.5c0-1.31-.92-2.41-2.16-2.67z";break;case"store":e="M1 10c.41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.51.43.54 0 1.08-.14 1.49-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.63-.46 1-1.17 1-2V7l-3-7H4L0 7v1c0 .83.37 1.54 1 2zm2 8.99h5v-5h4v5h5v-7c-.37-.05-.72-.22-1-.43-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.49.44-.55 0-1.1-.14-1.51-.44-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.5.44-.54 0-1.09-.14-1.5-.44-.63-.45-1-.73-1-1.57 0 .84-.38 1.12-1 1.57-.29.21-.63.38-1 .44v6.99z";break;case"table-col-after":e="M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z";break;case"table-col-before":e="M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z";break;case"table-col-delete":e="M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z";break;case"table-row-after":e="M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z";break;case"table-row-before":e="M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z";break;case"table-row-delete":e="M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z";break;case"tablet":e="M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z";break;case"tag":e="M11 2h7v7L8 19l-7-7zm3 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z";break;case"tagcloud":e="M11 3v4H1V3h10zm8 0v4h-7V3h7zM7 8v3H1V8h6zm12 0v3H8V8h11zM9 12v2H1v-2h8zm10 0v2h-9v-2h9zM6 15v1H1v-1h5zm5 0v1H7v-1h4zm3 0v1h-2v-1h2zm5 0v1h-4v-1h4z";break;case"testimonial":e="M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z";break;case"text":e="M18 3v2H2V3h16zm-6 4v2H2V7h10zm6 0v2h-4V7h4zM8 11v2H2v-2h6zm10 0v2h-8v-2h8zm-4 4v2H2v-2h12z";break;case"thumbs-down":e="M7.28 18c-.15.02-.26-.02-.41-.07-.56-.19-.83-.79-.66-1.35.17-.55 1-3.04 1-3.58 0-.53-.75-1-1.35-1h-3c-.6 0-1-.4-1-1s2-7 2-7c.17-.39.55-1 1-1H14v9h-2.14c-.41.41-3.3 4.71-3.58 5.27-.21.41-.6.68-1 .73zM18 12h-2V3h2v9z";break;case"thumbs-up":e="M12.72 2c.15-.02.26.02.41.07.56.19.83.79.66 1.35-.17.55-1 3.04-1 3.58 0 .53.75 1 1.35 1h3c.6 0 1 .4 1 1s-2 7-2 7c-.17.39-.55 1-1 1H6V8h2.14c.41-.41 3.3-4.71 3.58-5.27.21-.41.6-.68 1-.73zM2 8h2v9H2V8z";break;case"tickets-alt":e="M20 6.38L18.99 9.2v-.01c-.52-.19-1.03-.16-1.53.08s-.85.62-1.04 1.14-.16 1.03.07 1.53c.24.5.62.84 1.15 1.03v.01l-1.01 2.82-15.06-5.38.99-2.79c.52.19 1.03.16 1.53-.08.5-.23.84-.61 1.03-1.13s.16-1.03-.08-1.53c-.23-.49-.61-.83-1.13-1.02L4.93 1zm-4.97 5.69l1.37-3.76c.12-.31.1-.65-.04-.95s-.39-.53-.7-.65L8.14 3.98c-.64-.23-1.37.12-1.6.74L5.17 8.48c-.24.65.1 1.37.74 1.6l7.52 2.74c.14.05.28.08.43.08.52 0 1-.33 1.17-.83zM7.97 4.45l7.51 2.73c.19.07.34.21.43.39.08.18.09.38.02.57l-1.37 3.76c-.13.38-.58.59-.96.45L6.09 9.61c-.39-.14-.59-.57-.45-.96l1.37-3.76c.1-.29.39-.49.7-.49.09 0 .17.02.26.05zm6.82 12.14c.35.27.75.41 1.2.41H16v3H0v-2.96c.55 0 1.03-.2 1.41-.59.39-.38.59-.86.59-1.41s-.2-1.02-.59-1.41-.86-.59-1.41-.59V10h1.05l-.28.8 2.87 1.02c-.51.16-.89.62-.89 1.18v4c0 .69.56 1.25 1.25 1.25h8c.69 0 1.25-.56 1.25-1.25v-1.75l.83.3c.12.43.36.78.71 1.04zM3.25 17v-4c0-.41.34-.75.75-.75h.83l7.92 2.83V17c0 .41-.34.75-.75.75H4c-.41 0-.75-.34-.75-.75z";break;case"tickets":e="M20 5.38L18.99 8.2v-.01c-1.04-.37-2.19.18-2.57 1.22-.37 1.04.17 2.19 1.22 2.56v.01l-1.01 2.82L1.57 9.42l.99-2.79c1.04.38 2.19-.17 2.56-1.21s-.17-2.18-1.21-2.55L4.93 0zm-5.45 3.37c.74-2.08-.34-4.37-2.42-5.12-2.08-.74-4.37.35-5.11 2.42-.74 2.08.34 4.38 2.42 5.12 2.07.74 4.37-.35 5.11-2.42zm-2.56-4.74c.89.32 1.57.94 1.97 1.71-.01-.01-.02-.01-.04-.02-.33-.12-.67.09-.78.4-.1.28-.03.57.05.91.04.27.09.62-.06 1.04-.1.29-.33.58-.65 1l-.74 1.01.08-4.08.4.11c.19.04.26-.24.08-.29 0 0-.57-.15-.92-.28-.34-.12-.88-.36-.88-.36-.18-.08-.3.19-.12.27 0 0 .16.08.34.16l.01 1.63L9.2 9.18l.08-4.11c.2.06.4.11.4.11.19.04.26-.23.07-.29 0 0-.56-.15-.91-.28-.07-.02-.14-.05-.22-.08.93-.7 2.19-.94 3.37-.52zM7.4 6.19c.17-.49.44-.92.78-1.27l.04 5c-.94-.95-1.3-2.39-.82-3.73zm4.04 4.75l2.1-2.63c.37-.41.57-.77.69-1.12.05-.12.08-.24.11-.35.09.57.04 1.18-.17 1.77-.45 1.25-1.51 2.1-2.73 2.33zm-.7-3.22l.02 3.22c0 .02 0 .04.01.06-.4 0-.8-.07-1.2-.21-.33-.12-.63-.28-.9-.48zm1.24 6.08l2.1.75c.24.84 1 1.45 1.91 1.45H16v3H0v-2.96c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2V9h1.05l-.28.8 4.28 1.52C4.4 12.03 4 12.97 4 14c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.07-.02-.13-.02-.2zm-6.53-2.33l1.48.53c-.14.04-.15.27.03.28 0 0 .18.02.37.03l.56 1.54-.78 2.36-1.31-3.9c.21-.01.41-.03.41-.03.19-.02.17-.31-.02-.3 0 0-.59.05-.96.05-.07 0-.15 0-.23-.01.13-.2.28-.38.45-.55zM4.4 14c0-.52.12-1.02.32-1.46l1.71 4.7C5.23 16.65 4.4 15.42 4.4 14zm4.19-1.41l1.72.62c.07.17.12.37.12.61 0 .31-.12.66-.28 1.16l-.35 1.2zM11.6 14c0 1.33-.72 2.49-1.79 3.11l1.1-3.18c.06-.17.1-.31.14-.46l.52.19c.02.11.03.22.03.34zm-4.62 3.45l1.08-3.14 1.11 3.03c.01.02.01.04.02.05-.37.13-.77.21-1.19.21-.35 0-.69-.06-1.02-.15z";break;case"tide":e="M17 7.2V3H3v7.1c2.6-.5 4.5-1.5 6.4-2.6.2-.2.4-.3.6-.5v3c-1.9 1.1-4 2.2-7 2.8V17h14V9.9c-2.6.5-4.4 1.5-6.2 2.6-.3.1-.5.3-.8.4V10c2-1.1 4-2.2 7-2.8z";break;case"translation":e="M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z";break;case"trash":e="M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z";break;case"twitter":e="M18.94 4.46c-.49.73-1.11 1.38-1.83 1.9.01.15.01.31.01.47 0 4.85-3.69 10.44-10.43 10.44-2.07 0-4-.61-5.63-1.65.29.03.58.05.88.05 1.72 0 3.3-.59 4.55-1.57-1.6-.03-2.95-1.09-3.42-2.55.22.04.45.07.69.07.33 0 .66-.05.96-.13-1.67-.34-2.94-1.82-2.94-3.6v-.04c.5.27 1.06.44 1.66.46-.98-.66-1.63-1.78-1.63-3.06 0-.67.18-1.3.5-1.84 1.81 2.22 4.51 3.68 7.56 3.83-.06-.27-.1-.55-.1-.84 0-2.02 1.65-3.66 3.67-3.66 1.06 0 2.01.44 2.68 1.16.83-.17 1.62-.47 2.33-.89-.28.85-.86 1.57-1.62 2.02.75-.08 1.45-.28 2.11-.57z";break;case"undo":e="M12 5H7V2L1 6l6 4V7h5c2.2 0 4 1.8 4 4s-1.8 4-4 4H7v2h5c3.3 0 6-2.7 6-6s-2.7-6-6-6z";break;case"universal-access-alt":e="M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-9-7.4c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z";break;case"universal-access":e="M10 2.6c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z";break;case"unlock":e="M12 9V6c0-1.1-.9-2-2-2s-2 .9-2 2H6c0-2.21 1.79-4 4-4s4 1.79 4 4v3h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h7zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z";break;case"update":e="M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z";break;case"upload":e="M8 14V8H5l5-6 5 6h-3v6H8zm-2 2v-6H4v8h12.01v-8H14v6H6z";break;case"vault":e="M18 17V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-1 0H3V3h14v14zM4.75 4h10.5c.41 0 .75.34.75.75V6h-1v3h1v2h-1v3h1v1.25c0 .41-.34.75-.75.75H4.75c-.41 0-.75-.34-.75-.75V4.75c0-.41.34-.75.75-.75zM13 10c0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4 4-1.79 4-4zM9 7l.77 1.15C10.49 8.46 11 9.17 11 10c0 1.1-.9 2-2 2s-2-.9-2-2c0-.83.51-1.54 1.23-1.85z";break;case"video-alt":e="M8 5c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1 0 .57.49 1 1 1h5c.55 0 1-.45 1-1zm6 5l4-4v10l-4-4v-2zm-1 4V8c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z";break;case"video-alt2":e="M12 13V7c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2zm1-2.5l6 4.5V5l-6 4.5v1z";break;case"video-alt3":e="M19 15V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2zM8 14V6l6 4z";break;case"visibility":e="M19.7 9.4C17.7 6 14 3.9 10 3.9S2.3 6 .3 9.4L0 10l.3.6c2 3.4 5.7 5.5 9.7 5.5s7.7-2.1 9.7-5.5l.3-.6-.3-.6zM10 14.1c-3.1 0-6-1.6-7.7-4.1C3.6 8 5.7 6.6 8 6.1c-.9.6-1.5 1.7-1.5 2.9 0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5c0-1.2-.6-2.3-1.5-2.9 2.3.5 4.4 1.9 5.7 3.9-1.7 2.5-4.6 4.1-7.7 4.1z";break;case"warning":e="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z";break;case"welcome-add-page":e="M17 7V4h-2V2h-3v1H3v15h11V9h1V7h2zm-1-2v1h-2v2h-1V6h-2V5h2V3h1v2h2z";break;case"welcome-comments":e="M5 2h10c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2zm8.5 8.5L11 8l2.5-2.5-1-1L10 7 7.5 4.5l-1 1L9 8l-2.5 2.5 1 1L10 9l2.5 2.5z";break;case"welcome-learn-more":e="M10 10L2.54 7.02 3 18H1l.48-11.41L0 6l10-4 10 4zm0-5c-.55 0-1 .22-1 .5s.45.5 1 .5 1-.22 1-.5-.45-.5-1-.5zm0 6l5.57-2.23c.71.94 1.2 2.07 1.36 3.3-.3-.04-.61-.07-.93-.07-2.55 0-4.78 1.37-6 3.41C8.78 13.37 6.55 12 4 12c-.32 0-.63.03-.93.07.16-1.23.65-2.36 1.36-3.3z";break;case"welcome-view-site":e="M18 14V4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-8-8c2.3 0 4.4 1.14 6 3-1.6 1.86-3.7 3-6 3s-4.4-1.14-6-3c1.6-1.86 3.7-3 6-3zm2 3c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm2 8h3v1H3v-1h3v-1h8v1z";break;case"welcome-widgets-menus":e="M19 16V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h15c.55 0 1-.45 1-1zM4 4h13v4H4V4zm1 1v2h3V5H5zm4 0v2h3V5H9zm4 0v2h3V5h-3zm-8.5 5c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 10h4v1H6v-1zm6 0h5v5h-5v-5zm-7.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 12h4v1H6v-1zm7 0v2h3v-2h-3zm-8.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 14h4v1H6v-1z";break;case"welcome-write-blog":e="M16.89 1.2l1.41 1.41c.39.39.39 1.02 0 1.41L14 8.33V18H3V3h10.67l1.8-1.8c.4-.39 1.03-.4 1.42 0zm-5.66 8.48l5.37-5.36-1.42-1.42-5.36 5.37-.71 2.12z";break;case"wordpress-alt":e="M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z";break;case"wordpress":e="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z";break;case"yes-alt":e="M10 2c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm-.615 12.66h-1.34l-3.24-4.54 1.34-1.25 2.57 2.4 5.14-5.93 1.34.94-5.81 8.38z";break;case"yes":e="M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z"}if(!e)return null;var s=["dashicon","dashicons-"+c,r].filter(Boolean).join(" ");return Object(b.createElement)(ke,M({"aria-hidden":!0,role:"img",focusable:"false",className:s,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 20 20"},o),Object(b.createElement)(Oe,{d:e}))}}]),t}();var Ve=function(e){var t=e.icon,c=void 0===t?null:t,a=e.size,n=H(e,["icon","size"]),r=a||20;if("string"==typeof c)return Object(b.createElement)(He,M({icon:c,size:r},n));if(c&&He===c.type)return Object(b.cloneElement)(c,k({size:r},n));var o=a||24;if("function"==typeof c)return c.prototype instanceof b.Component?Object(b.createElement)(c,k({size:o},n)):c(k({size:o},n));if(c&&("svg"===c.type||c.type===ke)){var s=k({width:o,height:o},c.props,n);return Object(b.createElement)(ke,s)}return Object(b.isValidElement)(c)?Object(b.cloneElement)(c,k({size:o},n)):c};var Me=Object(b.forwardRef)(function(e,t){var c=e.icon,a=e.children,n=e.label,r=e.className,o=e.tooltip,s=e.shortcut,l=e.labelPosition,i=e.size,m=H(e,["icon","children","label","className","tooltip","shortcut","labelPosition","size"]),h=_()("components-icon-button",r,{"has-text":a}),u=o||n,d=!m.disabled&&(o||s||!!n&&(!a||Object(z.isArray)(a)&&!a.length)&&!1!==o),v=Object(b.createElement)(V,M({"aria-label":n},m,{className:h,ref:t}),Object(b.createElement)(Ve,{icon:c,size:i}),a);return d&&(v=Object(b.createElement)(_e,{text:u,shortcut:s,position:l},v)),v});var je=function(e){var t=e.className,c=e.status,a=e.children,n=e.onRemove,r=void 0===n?z.noop:n,o=e.isDismissible,s=void 0===o||o,l=e.actions,i=void 0===l?[]:l,m=e.__unstableHTML,h=_()(t,"components-notice","is-"+c,{"is-dismissible":s});return m&&(a=Object(b.createElement)(b.RawHTML,null,a)),Object(b.createElement)("div",{className:h},Object(b.createElement)("div",{className:"components-notice__content"},a,i.map(function(e,t){var c=e.className,a=e.label,n=e.noDefaultClasses,r=void 0!==n&&n,o=e.onClick,s=e.url;return Object(b.createElement)(V,{key:t,href:s,isDefault:!r&&!s,isLink:!r&&!!s,onClick:s?void 0:o,className:_()("components-notice__action",c)},a)})),s&&Object(b.createElement)(Me,{className:"components-notice__dismiss",icon:"no-alt",label:Object(p.__)("Dismiss this notice"),onClick:r,tooltip:!1}))},xe=c(63),Ce=(c(42),function(){Object(b.useEffect)(function(){var e=document.createElement("script");e.src="https://js.stripe.com/v3",e.async=!0,document.querySelector('[src="'.concat(e.src,'"]'))||document.body.appendChild(e)},[])}),Le=(c(43),function(e){var t=e.children,c=e.maxWidth,a=e.isNarrow,n=e.className,r=c?{maxWidth:c}:null,o=[void 0===n?"":n,"woocommerce-payments-page"];return a&&o.push("is-narrow"),Ce(),Object(b.createElement)("div",{className:o.join(" "),style:r},t)}),Ne=function(){return Object(b.createElement)("svg",{width:"260",height:"193",viewBox:"0 0 260 193",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(b.createElement)("g",{clipPath:"url(#clip0)"},Object(b.createElement)("path",{d:"M188.147 0.353976L5.49328 57.1468C1.37508 58.4273 -0.926025 62.806 0.353615 66.9269L33.2129 172.746C34.4926 176.867 38.8684 179.169 42.9866 177.889L225.64 121.096C229.758 119.815 232.059 115.437 230.78 111.316L197.92 5.49701C196.641 1.37611 192.265 -0.926507 188.147 0.353976Z",fill:"url(#paint0_linear)"}),Object(b.createElement)("path",{d:"M187.201 2.02519L8.57824 57.5647C4.46004 58.8451 2.15894 63.2238 3.43858 67.3447L34.9709 168.89C36.2505 173.011 40.6264 175.314 44.7446 174.033L223.367 118.494C227.485 117.213 229.786 112.835 228.507 108.714L196.974 7.16823C195.695 3.04733 191.319 0.744715 187.201 2.02519Z",fill:"white"}),Object(b.createElement)("path",{d:"M199.423 15.0552L5.8877 75.2317L11.0743 91.9346L204.61 31.7581L199.423 15.0552Z",fill:"#674399"}),Object(b.createElement)("path",{d:"M95.0713 134.624L45.8979 149.914L48.1408 157.137L97.3142 141.847L95.0713 134.624Z",fill:"#BDBDBD"}),Object(b.createElement)("path",{d:"M127.377 111.214L42.1133 137.725L44.3562 144.948L129.62 118.437L127.377 111.214Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M252.192 66.439H59.7576C55.4451 66.439 51.9492 69.9372 51.9492 74.2524V185.187C51.9492 189.502 55.4451 193 59.7576 193H252.192C256.504 193 260 189.502 260 185.187V74.2524C260 69.9372 256.504 66.439 252.192 66.439Z",fill:"url(#paint1_linear)"}),Object(b.createElement)("path",{d:"M249.166 67.7293H62.1194C57.8069 67.7293 54.311 71.2275 54.311 75.5428V181.877C54.311 186.193 57.8069 189.691 62.1194 189.691H249.166C253.479 189.691 256.975 186.193 256.975 181.877V75.5428C256.975 71.2275 253.479 67.7293 249.166 67.7293Z",fill:"white"}),Object(b.createElement)("path",{d:"M108.411 126.936H102.506V143.718H108.411V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M115.97 126.936H110.064V143.718H115.97V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M123.528 126.936H117.623V143.718H123.528V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M136.756 126.936H130.851V143.718H136.756V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M144.314 126.936H138.409V143.718H144.314V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M151.872 126.936H145.967V143.718H151.872V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M165.1 126.936H159.195V143.718H165.1V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M172.659 126.936H166.753V143.718H172.659V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M180.217 126.936H174.312V143.718H180.217V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M193.445 126.936H187.54V143.718H193.445V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M201.003 126.936H195.098V143.718H201.003V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M208.562 126.936H202.657V143.718H208.562V126.936Z",fill:"#E0E0E0"}),Object(b.createElement)("path",{d:"M102.414 99.6817H67.2051V119.002H102.414V99.6817Z",fill:"#674399"}),Object(b.createElement)("path",{opacity:"0.1",d:"M225.643 163.042H204.064V184.635H225.643V163.042Z",fill:"#674399"}),Object(b.createElement)("path",{opacity:"0.1",d:"M236.433 163.042H214.854V184.635H236.433V163.042Z",fill:"#674399"})),Object(b.createElement)("defs",null,Object(b.createElement)("linearGradient",{id:"paint0_linear",x1:"115.955",y1:"178.574",x2:"116.743",y2:"-0.324663",gradientUnits:"userSpaceOnUse"},Object(b.createElement)("stop",{stopColor:"#808080",stopOpacity:"0.25"}),Object(b.createElement)("stop",{offset:"0.53514",stopColor:"#808080",stopOpacity:"0.12"}),Object(b.createElement)("stop",{offset:"1",stopColor:"#808080",stopOpacity:"0.1"})),Object(b.createElement)("linearGradient",{id:"paint1_linear",x1:"114339",y1:"86036.4",x2:"114339",y2:"29661",gradientUnits:"userSpaceOnUse"},Object(b.createElement)("stop",{stopColor:"#808080",stopOpacity:"0.25"}),Object(b.createElement)("stop",{offset:"0.53514",stopColor:"#808080",stopOpacity:"0.12"}),Object(b.createElement)("stop",{offset:"1",stopColor:"#808080",stopOpacity:"0.1"})),Object(b.createElement)("clipPath",{id:"clip0"},Object(b.createElement)("rect",{width:"260",height:"193",fill:"white"}))))},Se=function(){var e=Object(b.useState)(!1),t=w()(e,2),c=t[0],a=t[1];return Object(b.createElement)(Le,{isNarrow:!0,className:"connect-account"},wcpaySettings.errorMessage&&Object(b.createElement)(je,{className:"wcpay-connect-error-notice",status:"error",isDismissible:!1},wcpaySettings.errorMessage),Object(b.createElement)(y.Card,{className:"connect-account__card"},Object(b.createElement)(Ne,null),Object(b.createElement)("h2",null," ",Object(p.__)("WooCommerce Payments","woocommerce-payments")," "),Object(b.createElement)("p",{className:"connect-account__description"},Object(p.__)("Accept credit card payments the easy way! No set up fees. No monthly fees. Just 2.9% + $0.30 per transaction on U.S.-issued cards.","woocommerce-payments")),wcpaySettings.onBoardingDisabled?Object(b.createElement)("p",null,Object(p.__)("We've temporarily paused new account creation.","woocommmerce-payments"),Object(b.createElement)("br",null),Object(p.__)("We'll notify you when we resume!","woocommmerce-payments")):Object(b.createElement)(b.Fragment,null,Object(b.createElement)("p",{className:"connect-account__terms"},Object(xe.a)(Object(p.__)("By clicking “Set up,” you agree to the <a>Terms of Service</a>","woocommerce-payments"),{a:Object(b.createElement)("a",{href:"https://wordpress.com/tos"})})),Object(b.createElement)("hr",{className:"full-width"}),Object(b.createElement)("p",{className:"connect-account__action"},Object(b.createElement)(V,{isPrimary:!0,isLarge:!0,isBusy:c,disabled:c,onClick:function(){return a(!0)},href:wcpaySettings.connectUrl},Object(p.__)("Set up","woocommerce-payments"))))))},Te=c(17),Be=c.n(Te),Re=c(8),Ie=c(21),De=c.n(Ie),Ae=c(6),Pe=c.n(Ae),Fe=(c(47),"/wc/v3/payments"),qe="wc/payments",Ue=c(4),We=c.n(Ue),Ye=c(11),Ze=c(13),Qe=c(7),Ge=c.n(Qe),$e={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS_OVERVIEW:"SET_DEPOSITS_OVERVIEW",SET_ERROR_FOR_DEPOSITS_OVERVIEW:"SET_ERROR_FOR_DEPOSITS_OVERVIEW",SET_DEPOSITS:"SET_DEPOSITS",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY"},Je=function(e){return JSON.stringify(e,Object.keys(e).sort())},Ke={byId:{},queries:{}},Xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ke,t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.query,n=void 0===a?{}:a,r=t.data,o=void 0===r?[]:r,s=t.error,l=Je(n);switch(c){case $e.SET_DEPOSIT:return We()({},e,{byId:We()({},e.byId,Ge()({},o.id,o))});case $e.SET_DEPOSITS_OVERVIEW:return We()({},e,{overview:We()({},e.overview,{data:o})});case $e.SET_ERROR_FOR_DEPOSITS_OVERVIEW:return We()({},e,{overview:We()({},e.overview,{error:s})});case $e.SET_DEPOSITS:return We()({},e,{byId:We()({},e.byId,{},Object(z.keyBy)(o,"id")),queries:We()({},e.queries,Ge()({},l,{data:Object(z.map)(o,"id")}))});case $e.SET_ERROR_FOR_DEPOSIT_QUERY:return We()({},e,{queries:We()({},e.queries,Ge()({},l,{error:s}))})}return e},et=function(e){return e&&e.deposits||{}},tt=function(e,t){return(et(e).byId||{})[t]},ct=function(e){return(et(e).overview||{}).data},at=function(e){return(et(e).overview||{}).error},nt=function(e,t){var c=Je(t);return(et(e).queries||{})[c]||{}},rt=function(e,t){return(nt(e,t).data||[]).map(tt.bind(void 0,e))},ot=function(e,t){return nt(e,t).error||{}};function st(e){return{type:$e.SET_DEPOSIT,data:e}}function lt(e){return{type:$e.SET_DEPOSITS_OVERVIEW,data:e}}function it(e,t){return{type:$e.SET_ERROR_FOR_DEPOSITS_OVERVIEW,error:t}}function mt(e,t){return{type:$e.SET_DEPOSITS,query:e,data:t}}function ht(e,t,c){return{type:$e.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:c}}var ut=c(5),dt=c.n(ut),vt=c(10),pt=dt.a.mark(bt),ft=dt.a.mark(yt),gt=dt.a.mark(zt),wt=function(e){return{id:e.id,date:+new Date(1e3*e.arrival_date),type:e.amount>0?"deposit":"withdrawal",amount:e.amount,status:e.status,bankAccount:e.destination.bank_name&&"".concat(e.destination.bank_name," ")+"•••• ".concat(e.destination.last4," ")+"(".concat(e.destination.currency.toUpperCase(),")")}};function bt(e){var t,c;return dt.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=Object(vt.addQueryArgs)("".concat(Fe,"/deposits/").concat(e)),a.prev=1,a.next=4,Object(Ze.apiFetch)({path:t});case 4:return"payout"===(c=a.sent).object&&(c=wt(c)),a.next=8,st(c);case 8:a.next=14;break;case 10:return a.prev=10,a.t0=a.catch(1),a.next=14,Object(Ze.dispatch)("core/notices","createErrorNotice",Object(p.__)("Error retrieving deposit.","woocommerce-payments"));case 14:case"end":return a.stop()}},pt,null,[[1,10]])}function yt(){var e,t;return dt.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e=Object(vt.addQueryArgs)("".concat(Fe,"/deposits/overview")),c.prev=1,c.next=4,Object(Ze.apiFetch)({path:e});case 4:return(t=c.sent).last_deposit&&"payout"===t.last_deposit.object&&(t.last_deposit=wt(t.last_deposit)),t.next_deposit&&"payout"===t.next_deposit.object&&(t.next_deposit=wt(t.next_deposit)),c.next=9,lt(t);case 9:c.next=17;break;case 11:return c.prev=11,c.t0=c.catch(1),c.next=15,Object(Ze.dispatch)("core/notices","createErrorNotice",Object(p.__)("Error retrieving deposits overview.","woocommerce-payments"));case 15:return c.next=17,it(c.t0);case 17:case"end":return c.stop()}},ft,null,[[1,11]])}function zt(e){var t,c,a;return dt.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=Object(vt.addQueryArgs)("".concat(Fe,"/deposits"),{page:e.paged,pagesize:e.perPage}),n.prev=1,n.next=4,Object(Ze.apiFetch)({path:t})||{};case 4:return(c=n.sent).data&&c.data.length&&"payout"===c.data[0].object&&(c.data=c.data.map(wt)),n.next=8,mt(e,c.data);case 8:n.t0=dt.a.keys(c.data);case 9:if((n.t1=n.t0()).done){n.next=15;break}return a=n.t1.value,n.next=13,Object(Ze.dispatch)(qe,"finishResolution","getDeposit",[c.data[a].id]);case 13:n.next=9;break;case 15:n.next=23;break;case 17:return n.prev=17,n.t2=n.catch(1),n.next=21,Object(Ze.dispatch)("core/notices","createErrorNotice",Object(p.__)("Error retrieving deposits.","woocommerce-payments"));case 21:return n.next=23,ht(e,null,n.t2);case 23:case"end":return n.stop()}},gt,null,[[1,17]])}var Et={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY"},_t={summary:{}},Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_t,t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.query,n=void 0===a?{}:a,r=t.data,o=void 0===r?[]:r,s=t.error,l=Je(n);switch(c){case Et.SET_TRANSACTIONS:return We()({},e,Ge()({},l,{data:o}));case Et.SET_ERROR_FOR_TRANSACTIONS:return We()({},e,Ge()({},l,{error:s}));case Et.SET_TRANSACTIONS_SUMMARY:return We()({},e,{summary:We()({},e.summary,Ge()({},l,{data:o}))});case Et.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return We()({},e,{summary:We()({},e.summary,Ge()({},l,{error:s}))})}return e},kt=function(e){return e&&e.transactions||{}},Ht=function(e,t){var c=Je(t);return kt(e)[c]||{}},Vt=function(e,t){return Ht(e,t).data||[]},Mt=function(e,t){return Ht(e,t).error||{}},jt=function(e,t){var c=Je(t);return kt(e).summary[c]||{}},xt=function(e,t){return jt(e,t).data||{}},Ct=function(e,t){return jt(e,t).error||{}};function Lt(e,t){return{type:Et.SET_TRANSACTIONS,query:e,data:t}}function Nt(e,t,c){return{type:Et.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:c}}function St(e,t){return{type:Et.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function Tt(e,t,c){return{type:Et.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:c}}var Bt=function(e){return Object(z.capitalize)(e).replace(/_/g," ")},Rt=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=t?Pe()(e).endOf("day").utc():Pe()(e).startOf("day").utc();return e&&Object(Re.dateI18n)("Y-m-d H:i:s",c)},It=dt.a.mark(Pt),Dt=dt.a.mark(Ft),At=function(e){return{match:e.match,date_before:Rt(e.dateBefore),date_after:Rt(e.dateAfter,!0),date_between:e.dateBetween&&[Rt(e.dateBetween[0]),Rt(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,deposit_id:e.depositId}};function Pt(e){var t,c;return dt.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=Object(vt.addQueryArgs)("".concat(Fe,"/transactions"),We()({page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order},At(e))),a.prev=1,a.next=4,Object(Ze.apiFetch)({path:t});case 4:return c=a.sent,a.next=7,Lt(e,c.data||[]);case 7:a.next=13;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,Nt(e,null,a.t0);case 13:case"end":return a.stop()}},It,null,[[1,9]])}function Ft(e){var t,c;return dt.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=Object(vt.addQueryArgs)("".concat(Fe,"/transactions/summary"),At(e)),a.prev=1,a.next=4,Object(Ze.apiFetch)({path:t});case 4:return c=a.sent,a.next=7,St(e,c);case 7:a.next=13;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,Tt(e,null,a.t0);case 13:case"end":return a.stop()}},Dt,null,[[1,9]])}var qt={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},Ut=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.id,n=t.data,r=t.error;switch(c){case qt.SET_CHARGE:e=We()({},e,Ge()({},a,We()({},e[a],{data:n})));break;case qt.SET_ERROR_FOR_CHARGE:e=We()({},e,Ge()({},a,We()({},e[a],{error:r})))}return e},Wt=function(e,t){return e.charges[t]&&e.charges[t].data?e.charges[t].data:{}},Yt=function(e,t){return e.charges[t]&&e.charges[t].error?e.charges[t].error:{}};function Zt(e,t){return{type:qt.SET_CHARGE,id:e,data:t}}function Qt(e,t,c){return{type:qt.SET_ERROR_FOR_CHARGE,id:e,data:t,error:c}}var Gt=dt.a.mark($t);function $t(e){var t;return dt.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,Object(Ze.apiFetch)({path:"".concat(Fe,"/charges/").concat(e)});case 3:return t=c.sent,c.next=6,Zt(e,t);case 6:c.next=12;break;case 8:return c.prev=8,c.t0=c.catch(0),c.next=12,Qt(e,null,c.t0);case 12:case"end":return c.stop()}},Gt,null,[[0,8]])}var Jt={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Kt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,c=t.type,a=t.id,n=t.data,r=t.error;switch(c){case Jt.SET_TIMELINE:e=We()({},e,Ge()({},a,{data:n}));break;case Jt.SET_ERROR_FOR_TIMELINE:e=We()({},e,Ge()({},a,We()({},e[a],{error:r})))}return e},Xt=function(e,t){return e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{}},ec=function(e,t){return e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{}};function tc(e,t){return{id:e,type:Jt.SET_TIMELINE,data:t}}function cc(e,t){return{id:e,type:Jt.SET_ERROR_FOR_TIMELINE,error:t}}var ac=dt.a.mark(nc);function nc(e){var t;return dt.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,Object(Ze.apiFetch)({path:"".concat(Fe,"/timeline/").concat(e)});case 3:return t=c.sent,c.next=6,tc(e,t.data);case 6:c.next=12;break;case 8:return c.prev=8,c.t0=c.catch(0),c.next=12,cc(e,c.t0);case 12:case"end":return c.stop()}},ac,null,[[0,8]])}Object(Ye.registerStore)(qe,{reducer:Object(Ye.combineReducers)({deposits:Xe,transactions:Ot,charges:Ut,timeline:Kt}),actions:We()({},n,{},s,{},m,{},d),controls:Ze.controls,selectors:We()({},a,{},o,{},i,{},u),resolvers:We()({},r,{},l,{},h,{},v)});var rc=c(22),oc=c.n(rc),sc=c(26),lc=c.n(sc),ic=(c(49),function(e){var t=e.isLoading,c=e.display,a=e.placeholder,n=e.value,r=e.children;return t?Object(b.createElement)("span",{className:c?"is-loadable-placeholder is-".concat(c):"is-loadable-placeholder","aria-busy":"true"},void 0===a?r||n:a):r||n||null}),mc=function(e){var t=e.numLines,c=void 0===t?1:t,a=lc()(e,["numLines"]),n=Object(b.createElement)("p",{style:{lineHeight:c}},"Block placeholder");return Object(b.createElement)(ic,oc()({},a,{placeholder:n,display:"block"}))},hc=ic,uc=function(e,t){return Object(vt.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/".concat(t,"/details"),id:e})},dc=function(e){var t=e.id,c=e.parentSegment;return t?Object(b.createElement)(y.Link,{href:uc(t,c)},Object(b.createElement)(De.a,{icon:"info-outline",size:18})):null},vc=new Be.a,pc=function(e,t){return Object(Re.dateI18n)(e,Pe.a.utc(t))},fc=function(e){return vc.formatCurrency((e?e.amount:0)/100)},gc=function(e){var t=e?"".concat(Object(p.__)("Est.","woocommerce-payments")," ").concat(pc("M j, Y",e.date)):"—";return e&&"in_transit"===e.status?"".concat(t," - ").concat(Object(p.__)("In transit","woocommerce-payments")):t},wc=function(e){switch(e.interval){case"daily":return Object(p.__)("Automatic, every business day","woocommerce-payments");case"weekly":return Object(p.sprintf)(Object(p.__)("Automatic, every week on %s","woocommerce-payments"),Pe()().locale("en").day(e.weekly_anchor).locale(Pe.a.locale()).format("dddd"));case"monthly":var t=Pe.a.locale().startsWith("en")?"en":Pe.a.locale();return Object(p.sprintf)(Object(p.__)("Automatic, every month on the %s","woocommerce-payments"),Pe()().locale(t).date(e.monthly_anchor).format("Do"))}},bc=function(){var e=Object(Ye.useSelect)(function(e){var t=e(qe),c=t.getDepositsOverview,a=t.getDepositsOverviewError,n=t.isResolving;return{overview:c(),overviewError:a(),isLoading:n("getDepositsOverview")}}),t=e.overview,c=e.isLoading;return Object(b.createElement)("div",{className:"wcpay-deposits-overview"},Object(b.createElement)("p",{className:"wcpay-deposits-overview__schedule"},Object(b.createElement)(De.a,{icon:"calendar",className:"wcpay-deposits-overview__schedule-icon"}),Object(b.createElement)("span",{className:"wcpay-deposits-overview__schedule-label"},Object(p.__)("Deposit schedule:","woocommerce-payments"))," ",Object(b.createElement)("span",{className:"wcpay-deposits-overview__schedule-value"},Object(b.createElement)(hc,{isLoading:c||!t,display:"inline",placeholder:"Deposit schedule placeholder"},t?(a=t,n=a.account,r=n.deposits_schedule,o=n.deposits_disabled,s=a.last_deposit,o||"manual"===r.interval?Object(xe.a)(Object(p.__)("Temporarily suspended (<a>learn more</a>)","woocommerce-payments"),{a:Object(b.createElement)("a",{href:"https://docs.woocommerce.com/document/payments/faq/deposits-suspended/",target:"_blank",rel:"noopener noreferrer"})}):s?wc(r):Object(xe.a)(Object(p.sprintf)(Object(p.__)("%s – your first deposit is held for seven days (<a>learn more</a>)","woocommerce-payments"),wc({interval:"daily"})),{a:Object(b.createElement)("a",{href:"https://docs.woocommerce.com/document/payments/faq/deposit-schedule/",target:"_blank",rel:"noopener noreferrer"})})):""))),c||!t?Object(b.createElement)(y.SummaryListPlaceholder,{numberOfItems:4}):Object(b.createElement)(y.SummaryList,{label:Object(p.__)("Deposits overview","woocommerce-payments")},function(){return[Object(b.createElement)(y.SummaryNumber,{key:"lastDeposit",label:Object(p.__)("Last deposit","woocommerce-payments"),value:fc(t.last_deposit),prevLabel:(c=t.last_deposit,c?pc("F j, Y",c.date):"—"),href:t.last_deposit?uc(t.last_deposit.id,"deposits"):""}),Object(b.createElement)(y.SummaryNumber,{key:"nextDeposit",label:Object(p.__)("Next deposit","woocommerce-payments"),value:fc(t.next_deposit),prevLabel:gc(t.next_deposit),href:t.next_deposit?uc(t.next_deposit.id,"deposits"):""}),Object(b.createElement)(y.SummaryNumber,{key:"pendingBalance",label:Object(p.__)("Pending balance","woocommerce-payments"),value:fc(t.balance.pending),prevLabel:(e=t.balance.pending,Object(p.sprintf)(Object(p._n)("%d deposit","%d deposits",e.deposits_count,"woocommerce-payments"),e.deposits_count))}),Object(b.createElement)(y.SummaryNumber,{key:"availableBalance",label:Object(p.__)("Available balance","woocommerce-payments"),value:fc(t.balance.available),prevLabel:""})];var e,c}));var a,n,r,o,s},yc=c(9),zc={deposit:Object(p.__)("Deposit","woocommerce-payments"),withdrawal:Object(p.__)("Withdrawal","woocommerce-payments")},Ec={paid:Object(p.__)("Paid","woocommerce-payments"),pending:Object(p.__)("Pending","woocommerce-payments"),in_transit:Object(p.__)("In transit","woocommerce-payments"),canceled:Object(p.__)("Canceled","woocommerce-payments"),failed:Object(p.__)("Failed","woocommerce-payments"),estimated:Object(p.__)("Estimated","woocommerce-payments")},_c=c(35),Oc=(c(53),function(e){var t=e.href,c=e.children;return t?Object(b.createElement)(y.Link,{href:t,className:"woocommerce-table__clickable-cell",tabIndex:"-1"},c):c}),kc=new Be.a,Hc=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"date",label:Object(p.__)("Date","woocommerce-payments"),required:!0,isLeftAligned:!0,defaultOrder:"desc",cellClassName:"date-time"},{key:"type",label:Object(p.__)("Type","woocommerce-payments"),required:!0},{key:"amount",label:Object(p.__)("Amount","woocommerce-payments"),isNumeric:!0,required:!0},{key:"status",label:Object(p.__)("Status","woocommerce-payments"),required:!0},{key:"bankAccount",label:Object(p.__)("Bank account","woocommerce-payments")}],Vc=function(){var e,t,c,a=(e=Object(yc.getQuery)(),t=e.paged,c=e.per_page,Object(Ye.useSelect)(function(e){var a=e(qe),n=a.getDeposits,r=a.getDepositQueryError,o=a.isResolving,s={paged:Number.isNaN(parseInt(t,10))?"1":t,perPage:Number.isNaN(parseInt(c,10))?"25":c};return{deposits:n(s),depositsError:r(s),isLoading:o("getDeposits",[s])}},[t,c])),n=a.deposits,r=a.isLoading,o=n.map(function(e){var t=function(t){return Object(b.createElement)(Oc,{href:uc(e.id,"deposits")},t)},c=Object(b.createElement)(dc,{id:e.id,parentSegment:"deposits"}),a=Object(b.createElement)(y.Link,{href:uc(e.id,"deposits")},Object(Re.dateI18n)("M j, Y",Pe.a.utc(e.date))),n={details:{value:e.id,display:c},date:{value:e.date,display:a},type:{value:e.type,display:t(zc[e.type])},amount:{value:e.amount/100,display:t(kc.formatCurrency(e.amount/100))},status:{value:e.status,display:t(Ec[e.status]||Object(_c.formatStringValue)(e.status))},bankAccount:{value:e.bankAccount,display:t(e.bankAccount)}};return Hc.map(function(e){var t=e.key;return n[t]||{display:null}})});return Object(b.createElement)(y.TableCard,{title:Object(p.__)("Deposit history","woocommerce-payments"),isLoading:r,rowsPerPage:10,totalRows:10,headers:Hc,rows:o,query:Object(yc.getQuery)(),onQueryChange:yc.onQueryChange})},Mc=function(){return Object(b.createElement)(Le,null,Object(b.createElement)(bc,null),Object(b.createElement)(Vc,null))},jc=function(e){var t=e.order;return t?Object(b.createElement)(y.Link,{href:t.url,type:"external"},t.number):Object(b.createElement)("span",null,"–")},xc={normal:Object(p.__)("Normal","woocommerce-payments"),elevated:Object(p.__)("Elevated","woocommerce-payments"),highest:Object(p.__)("Highest","woocommerce-payments")},Cc=["normal","elevated","highest"],Lc={normal:"green",elevated:"orange",highest:"red"},Nc=function(e){var t=e.risk,c=Cc[t];return Object(b.createElement)("span",{style:{color:Lc[c]}},xc[c])},Sc={charge:Object(p.__)("Charge","woocommerce-payments"),payment:Object(p.__)("Payment","woocommerce-payments"),payment_failure_refund:Object(p.__)("Payment failure refund","woocommerce-payments"),payment_refund:Object(p.__)("Payment refund","woocommerce-payments"),refund:Object(p.__)("Refund","woocommerce-payments"),refund_failure:Object(p.__)("Refund failure","woocommerce-payments"),dispute:Object(p.__)("Dispute","woocommerce-payments"),dispute_reversal:Object(p.__)("Dispute reversal","woocommerce-payments")},Tc=function(e){var t=e.depositId,c=e.dateAvailable,a=Object(vt.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/deposits/details",id:t}),n=null!=c&&Object(Re.dateI18n)("M j, Y",Pe.a.utc(c));return t?Object(b.createElement)(y.Link,{href:a},n||Object(p.__)("Deposit details","woocommerce-payments")):n||Object(p.__)("Pending","woocommerce-payments")},Bc=(c(54),new Be.a),Rc=[{key:"details",label:"",required:!0},{key:"date",label:Object(p.__)("Date / Time","woocommerce-payments"),screenReaderLabel:Object(p.__)("Date and time","woocommerce-payments"),required:!0,isLeftAligned:!0,defaultOrder:"desc",cellClassName:"date-time",isSortable:!0,defaultSort:!0},{key:"type",label:Object(p.__)("Type","woocommerce-payments"),screenReaderLabel:Object(p.__)("Type","woocommerce-payments"),required:!0},{key:"amount",label:Object(p.__)("Amount","woocommerce-payments"),screenReaderLabel:Object(p.__)("Amount","woocommerce-payments"),isNumeric:!0,isSortable:!0},{key:"fees",label:Object(p.__)("Fees","woocommerce-payments"),screenReaderLabel:Object(p.__)("Fees","woocommerce-payments"),isNumeric:!0,isSortable:!0},{key:"net",label:Object(p.__)("Net","woocommerce-payments"),screenReaderLabel:Object(p.__)("Net","woocommerce-payments"),isNumeric:!0,required:!0,isSortable:!0},{key:"order",label:Object(p.__)("Order #","woocommerce-payments"),screenReaderLabel:Object(p.__)("Order number","woocommerce-payments"),required:!0},{key:"source",label:Object(p.__)("Source","woocommerce-payments"),screenReaderLabel:Object(p.__)("Source","woocommerce-payments")},{key:"customer_name",label:Object(p.__)("Customer","woocommerce-payments"),screenReaderLabel:Object(p.__)("Customer","woocommerce-payments")},{key:"customer_email",label:Object(p.__)("Email","woocommerce-payments"),screenReaderLabel:Object(p.__)("Email","woocommerce-payments"),visible:!1},{key:"customer_country",label:Object(p.__)("Country","woocommerce-payments"),screenReaderLabel:Object(p.__)("Country","woocommerce-payments"),visible:!1},{key:"risk_level",label:Object(p.__)("Risk level","woocommerce-payments"),screenReaderLabel:Object(p.__)("Risk level","woocommerce-payments"),visible:!1}],Ic={key:"deposit",label:Object(p.__)("Deposit","woocommerce-payments"),screenReaderLabel:Object(p.__)("Deposit","woocommerce-payments"),cellClassName:"deposit"},Dc=function(e){var t,c,a,n,r,o,s,l,i,m,h,u,d=(t=Object(yc.getQuery)(),c=e.depositId,a=t.paged,n=t.per_page,r=t.orderby,o=t.order,s=t.match,l=t.date_before,i=t.date_after,m=t.date_between,h=t.type_is,u=t.type_is_not,Object(Ye.useSelect)(function(e){var t=e(qe),d=t.getTransactions,v=t.getTransactionsError,p=t.isResolving,f={paged:Number.isNaN(parseInt(a,10))?"1":a,perPage:Number.isNaN(parseInt(n,10))?"25":n,orderby:r||"date",order:o||"desc",match:s,dateBefore:l,dateAfter:i,dateBetween:m&&m.sort(function(e,t){return Pe()(e).diff(Pe()(t))}),typeIs:h,typeIsNot:u,depositId:c};return{transactions:d(f),transactionsError:v(f),isLoading:p("getTransactions",[f])}},[a,n,r,o,s,l,i,m,h,u,c])),v=d.transactions,f=d.isLoading,g=function(e,t){var c=e.match,a=e.date_before,n=e.date_after,r=e.date_between,o=e.type_is,s=e.type_is_not;return Object(Ye.useSelect)(function(e){var l=e(qe),i=l.getTransactionsSummary,m=l.isResolving,h={match:c,dateBefore:a,dateAfter:n,dateBetween:r,typeIs:o,typeIsNot:s,depositId:t};return{transactionsSummary:i(h),isLoading:m("getTransactionsSummary",[h])}},[c,a,n,r,o,s,t])}(Object(yc.getQuery)(),e.depositId),w=g.transactionsSummary,z=g.isLoading,E=e.depositId?Rc:[].concat(Rc,[Ic]),_=E.find(function(e){return"details"===e.key})||{};Object(yc.getQuery)().orderby&&"date"!==Object(yc.getQuery)().orderby?_.cellClassName="info-button":_.cellClassName="info-button is-sorted";var O=v.map(function(e){var t=uc(e.charge_id,"transactions"),c=function(e){return Object(b.createElement)(Oc,{href:t},e)},a=Object(b.createElement)(dc,{id:e.charge_id,parentSegment:"transactions"}),n=Object(b.createElement)(jc,{order:e.order}),r=Object(b.createElement)(Nc,{risk:e.risk_level}),o=Object(b.createElement)(Tc,{depositId:e.deposit_id,dateAvailable:e.date_available}),s={details:{value:e.transaction_id,display:a},date:{value:e.date,display:c(Object(Re.dateI18n)("M j, Y / g:iA",Pe.a.utc(e.date).local()))},type:{value:e.type,display:c(Sc[e.type]||Bt(e.type))},source:{value:e.source,display:c(Object(b.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(e.source)}))},order:{value:e.order_id,display:n},customer_name:{value:e.customer_name,display:c(e.customer_name)},customer_email:{value:e.customer_email,display:c(e.customer_email)},customer_country:{value:e.customer_country,display:c(e.customer_country)},amount:{value:e.amount/100,display:c(Bc.formatCurrency(e.amount/100))},fees:{value:e.fees/100,display:c(Bc.formatCurrency(e.fees/100*-1))},net:{value:e.net/100,display:c(Bc.formatCurrency(e.net/100))},risk_level:{value:e.risk_level,display:c(r)},deposit:{value:e.deposit_id,display:o}};return E.map(function(e){var t=e.key;return s[t]||{display:null}})}),k=[{label:"transactions",value:"".concat(w.count)},{label:"total",value:"".concat(Bc.formatCurrency(w.total/100))},{label:"fees",value:"".concat(Bc.formatCurrency(w.fees/100))},{label:"net",value:"".concat(Bc.formatCurrency(w.net/100))}];return Object(b.createElement)(y.TableCard,{className:"transactions-list",title:e.depositId?Object(p.__)("Deposit transactions","woocommerce-payments"):Object(p.__)("Transactions","woocommerce-payments"),isLoading:f,rowsPerPage:Object(yc.getQuery)().per_page||25,totalRows:w.count||0,headers:E,rows:O,summary:z?null:k,query:Object(yc.getQuery)(),onQueryChange:yc.onQueryChange})},Ac=(c(55),new Be.a),Pc=function(e){var t=e.status;return Object(b.createElement)(y.OrderStatus,{order:{status:t},orderStatusMap:Ec})},Fc=function(e){var t,c=e.depositId,a=(t=c,Object(Ye.useSelect)(function(e){var c=e(qe),a=c.getDeposit,n=c.isResolving;return{deposit:a(t),isLoading:n("getDeposit",[t])}},[t])),n=a.deposit,r=void 0===n?{}:n,o=a.isLoading;return Object(b.createElement)(y.Card,{className:"wcpay-deposit-overview"},Object(b.createElement)("div",{className:"wcpay-deposit-detail"},Object(b.createElement)("div",{className:"wcpay-deposit-date"},Object(b.createElement)(hc,{isLoading:o,placeholder:"Date placeholder"},"".concat(Object(p.__)("Deposit date","woocommerce-payments"),": "),Object(Re.dateI18n)("M j, Y",Pe.a.utc(r.date)))),Object(b.createElement)("div",{className:"wcpay-deposit-status"},Object(b.createElement)(hc,{isLoading:o,placeholder:"Status"},Object(b.createElement)(Pc,{status:r.status}))),Object(b.createElement)("div",{className:"wcpay-deposit-bank-account"},Object(b.createElement)(hc,{isLoading:o,placeholder:"Bank account placeholder"},r.bankAccount))),Object(b.createElement)("div",{className:"wcpay-deposit-hero"},Object(b.createElement)("div",{className:"wcpay-deposit-amount"},Object(b.createElement)(hc,{isLoading:o,placeholder:"Amount",display:"inline"},Ac.formatCurrency(r.amount/100)))))},qc=function(e){var t=e.query.id;return Object(b.createElement)(Le,null,Object(b.createElement)(Fc,{depositId:t}),Object(b.createElement)(Dc,{depositId:t}))},Uc=Object.entries(Sc).filter(function(e){return!w()(e,1)[0].startsWith("payment")}).map(function(e){var t=w()(e,2),c=t[0];return{label:t[1],value:c}}),Wc=[{label:Object(p.__)("Show","woocommerce-payments"),param:"filter",staticParams:["paged","per_page"],showFilters:function(){return!0},filters:[{label:Object(p.__)("All transactions","woocommerce-payments"),value:"all"},{label:Object(p.__)("Advanced filters","woocommerce-payments"),value:"advanced"}]}],Yc={title:Object(p.__)("Transactions match {{select /}} filters","woocommerce-payments"),filters:{date:{labels:{add:Object(p.__)("Date","woocommerce-payments"),remove:Object(p.__)("Remove transaction date filter","woocommerce-payments"),rule:Object(p.__)("Select a transaction date filter match","woocommerce-payments"),title:Object(p.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),filter:Object(p.__)("Select a transaction date","woocommerce-payments")},rules:[{value:"before",label:Object(p.__)("Before","woocommerce-admin")},{value:"after",label:Object(p.__)("After","woocommerce-admin")},{value:"between",label:Object(p.__)("Between","woocommerce-admin")}],input:{component:"Date"}},type:{labels:{add:Object(p.__)("Type","woocommerce-payments"),remove:Object(p.__)("Remove transaction type filter","woocommerce-payments"),rule:Object(p.__)("Select a transaction type filter match","woocommerce-payments"),title:Object(p.__)("{{title}}Type{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),filter:Object(p.__)("Select a transaction type","woocommerce-payments")},rules:[{value:"is",label:Object(p._x)("Is","transaction type","woocommerce-payments")},{value:"is_not",label:Object(p._x)("Is not","transaction type","woocommerce-payments")}],input:{component:"SelectControl",options:Uc}}}},Zc=function(){return Object(b.createElement)(y.ReportFilters,{filters:Wc,advancedFilters:Yc,showDatePicker:!1,path:"/payments/transactions",query:Object(yc.getQuery)()})},Qc=function(){return Object(b.createElement)(Le,null,Object(b.createElement)(Zc,null),Object(b.createElement)(Dc,null))},Gc=["issuer_declined","invalid"],$c=["blocked"],Jc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.status||null},Kc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.outcome?e.outcome.type:null},Xc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"succeeded"===e.status&&!0===e.paid},ea=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"failed"===e.status&&Gc.includes(Kc(e))},ta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"failed"===e.status&&$c.includes(Kc(e))},ca=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.captured},aa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.disputed},na=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.amount_refunded>0},ra=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.refunded},oa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return na(e)&&!ra(e)},sa=function(e){switch(e){case"warning_needs_response":case"needs_response":return"disputed_needs_response";case"warning_under_review":case"under_review":return"disputed_under_review";case"won":return"disputed_won";case"lost":return"disputed_lost";default:return"disputed"}},la=c(20),ia={refunded_partial:{type:"light",message:Object(p.__)("Partial refund","woocommerce-payments")},refunded_full:{type:"light",message:Object(p.__)("Refunded","woocommerce-payments")},paid:{type:"light",message:Object(p.__)("Paid","woocommerce-payments")},authorized:{type:"primary",message:Object(p.__)("Payment authorized","woocommerce-payments")},failed:{type:"alert",message:Object(p.__)("Payment failed","woocommerce-payments")},blocked:{type:"alert",message:Object(p.__)("Payment blocked","woocommerce-payments")},disputed_needs_response:{type:"primary",message:Object(p.__)("Disputed: Needs response","woocommerce-payments")},disputed_under_review:{type:"light",message:Object(p.__)("Disputed: In review","woocommerce-payments")},disputed_won:{type:"light",message:Object(p.__)("Disputed: Won","woocommerce-payments")},disputed_lost:{type:"light",message:Object(p.__)("Disputed: Lost","woocommerce-payments")},default:{type:"light",message:""}},ma=function(e){var t=e.charge,c=ia[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ea(e)?"failed":ta(e)?"blocked":aa(e)?sa(Jc(e.dispute)):oa(e)?"refunded_partial":ra(e)?"refunded_full":Xc(e)?ca(e)?"paid":"authorized":""}(t)]||ia.default;return Object(b.createElement)(la.a,{message:c.message,type:c.type})},ha=(c(56),function(e){var t=e.payment,c=t?t[t.type]:null;return c?Object(b.createElement)("span",{className:"payment-method-details"},Object(b.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(c.brand)})," •••• ",c.last4):Object(b.createElement)("span",null,"–")}),ua=(c(57),function(e){var t=e.items;return Object(b.createElement)(y.List,{className:"woocommerce-list--horizontal",items:t})}),da=(c(58),new Be.a),va={net:0,fee:0,refunded:null},pa=function(e){var t=e.charge;return[{title:Object(p.__)("Date","woocommerce-payments"),content:t.created?Object(Re.dateI18n)("M j, Y, g:ia",Pe()(1e3*t.created)):"–"},{title:Object(p.__)("Customer","woocommerce-payments"),content:Object(z.get)(t,"billing_details.name")||"–"},{title:Object(p.__)("Payment method","woocommerce-payments"),content:Object(b.createElement)(ha,{payment:t.payment_method_details})},{title:Object(p.__)("Risk evaluation","woocommerce-payments"),content:xc[Object(z.get)(t,"outcome.risk_level")]||"–"},{title:"",content:t.id||"–"}]},fa=function(e){var t=e.charge,c=void 0===t?{}:t,a=e.isLoading,n=c.amount?function(e){var t,c;return c=e.application_fee_amount,t=0,aa(e)&&"won"!==e.dispute.status?(c+=1500,t=e.dispute.amount):na(e)&&(t=e.amount_refunded),{net:e.amount-c-(t||0),fee:c,refunded:t}}(c):va,r=n.net,o=n.fee,s=n.refunded;return Object(b.createElement)(y.Card,{className:"payment-details-summary-details"},Object(b.createElement)("div",{className:"payment-details-summary"},Object(b.createElement)("div",{className:"payment-details-summary__section"},Object(b.createElement)("p",{className:"payment-details-summary__amount"},Object(b.createElement)(hc,{isLoading:a,placeholder:"Amount placeholder"},da.formatCurrency((c.amount||0)/100),Object(b.createElement)("span",{className:"payment-details-summary__amount-currency"},c.currency||"cur"),Object(b.createElement)(ma,{charge:c}))),Object(b.createElement)("div",{className:"payment-details-summary__breakdown"},s?Object(b.createElement)("p",null,"".concat(Object(p.__)("Refunded","woocommerce-payments"),": "),da.formatCurrency(-s/100)):"",Object(b.createElement)("p",null,Object(b.createElement)(hc,{isLoading:a,placeholder:"Fee amount"},"".concat(Object(p.__)("Fee","woocommerce-payments"),": "),da.formatCurrency(-o/100))),Object(b.createElement)("p",null,Object(b.createElement)(hc,{isLoading:a,placeholder:"Net amount"},"".concat(Object(p.__)("Net","woocommerce-payments"),": "),da.formatCurrency(r/100))))),Object(b.createElement)("div",{className:"payment-details-summary__section"},Object(b.createElement)("div",{className:"payment-details-summary__actions"},c.order?Object(b.createElement)(V,{className:"payment-details-summary__actions-item",isDefault:!0,isLarge:!0,href:c.order.url},"".concat(Object(p.__)("View order")," #").concat(c.order.number)):""))),Object(b.createElement)("hr",{className:"full-width"}),Object(b.createElement)(mc,{isLoading:a,numLines:4},Object(b.createElement)(ua,{items:pa({charge:c})})))},ga=function(){return null},wa=function(e){var t=e.label,c=e.children,a=e.isLoading;return Object(b.createElement)("div",{className:"payment-method-detail"},Object(b.createElement)("h4",{className:"payment-method-detail__label"},Object(b.createElement)(hc,{isLoading:a,display:"block",value:t})),Object(b.createElement)("p",{className:"payment-method-detail__value"},Object(b.createElement)(hc,{isLoading:a,value:c})))},ba=function(e){switch(e.checked){case"pass":return Object(p.__)("Passed","woocommerce-payments");case"fail":return Object(p.__)("Failed","woocommerce-payments");case"unavailable":return Object(p.__)("Unavailable","woocommerce-payments");default:return Object(p.__)("Not checked","woocommerce-payments")}},ya={last4:"0000",fingerprint:"fingerprint placeholder",date:"date placeholder",cardType:"card type placeholder",id:"id placeholder",name:"name placeholder",email:"email placeholder",formattedAddress:"address placeholder",country:"country placeholder",cvcCheck:null,line1Check:null,postalCodeCheck:null},za=function(e){var t=e.charge,c=void 0===t?{}:t,a=e.isLoading,n=c&&c.payment_method_details?function(e){var t=e.billing_details,c=e.payment_method,a=e.payment_method_details.card,n=a.last4,r=a.fingerprint,o=a.exp_month,s=a.exp_year,l=a.funding,i=a.network,m=a.country,h=a.checks,u=t.name,d=t.email,v=t.formatted_address,f=h.cvc_check,g=h.address_line1_check,w=h.address_postal_code_check,b=o+" / "+s,y={credit:Object(p.__)("credit","woocommerce-payments"),debit:Object(p.__)("debit","woocommerce-payments"),prepaid:Object(p.__)("prepaid","woocommerce-payments"),unknown:Object(p.__)("unknown","woocommerce-payments")};return{last4:n,fingerprint:r,date:b,cardType:Object(p.sprintf)(Object(p.__)("%1$s %2$s card","woocommerce-payments"),i.charAt(0).toUpperCase()+i.slice(1),y[l]),id:c,name:u,email:d,country:wcSettings.countries[m],cvcCheck:f,line1Check:g,postalCodeCheck:w,formattedAddress:v}}(c):ya,r=n.last4,o=n.fingerprint,s=n.date,l=n.cardType,i=n.id,m=n.name,h=n.email,u=n.country,d=n.cvcCheck,v=n.line1Check,f=n.postalCodeCheck,g=n.formattedAddress,w=wa,z=ba;return Object(b.createElement)(y.Card,{title:Object(b.createElement)(hc,{isLoading:a,value:Object(p.__)("Payment method","woocommerce-payments")})},Object(b.createElement)("div",{className:"payment-method-details"},Object(b.createElement)("div",{className:"payment-method-details__column"},Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Number","woocommerce-payments")},"•••• ",r),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Fingerprint","woocommerce-payments")},o),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Expires","woocommerce-payments")},s),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Type","woocommerce-payments")},l),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("ID","woocommerce-payments")},i)),Object(b.createElement)("div",{className:"payment-method-details__column"},Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Owner","woocommerce-payments")},m),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Owner email","woocommerce-payments")},h),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Address","woocommerce-payments")},Object(b.createElement)("span",{dangerouslySetInnerHTML:{__html:g}})),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Origin","woocommerce-payments")},u),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("CVC check","woocommerce-payments")},Object(b.createElement)(z,{checked:d})),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Street check","woocommerce-payments")},Object(b.createElement)(z,{checked:v})),Object(b.createElement)(w,{isLoading:a,label:Object(p.__)("Zip check","woocommerce-payments")},Object(b.createElement)(z,{checked:f})))))},Ea=function(e){var t=function(e){return Object(Ye.useSelect)(function(t){var c=t(qe),a=c.getCharge,n=c.getChargeError,r=c.isResolving;return{charge:a(e),chargeError:n(e),isLoading:r("getCharge",[e])}},[e])}(e.query.id),c=t.charge,a=t.isLoading,n=t.chargeError;return!a&&n instanceof Error?Object(b.createElement)(Le,{maxWidth:1032,className:"wcpay-payment-details"},Object(b.createElement)(y.Card,null,Object(b.createElement)("div",null,Object(p.__)("Payment details not loaded","woocommerce-payments")))):Object(b.createElement)(Le,{maxWidth:1032,className:"wcpay-payment-details"},Object(b.createElement)(fa,{charge:c,isLoading:a}),Object(b.createElement)(ga,{charge:c}),!1,Object(b.createElement)(za,{charge:c,isLoading:a}),!1)},_a=c(18),Oa=c.n(_a),ka=c(19),Ha=c.n(ka),Va={warning_needs_response:{type:"primary",message:Object(p.__)("Inquiry: Needs response","woocommerce-payments")},warning_under_review:{type:"light",message:Object(p.__)("Inquiry: Under review","woocommerce-payments")},warning_closed:{type:"light",message:Object(p.__)("Inquiry: Closed","woocommerce-payments")},needs_response:{type:"primary",message:Object(p.__)("Needs response","woocommerce-payments")},under_review:{type:"light",message:Object(p.__)("Under review","woocommerce-payments")},charge_refunded:{type:"light",message:Object(p.__)("Charge refunded","woocommerce-payments")},won:{type:"light",message:Object(p.__)("Won","woocommerce-payments")},lost:{type:"light",message:Object(p.__)("Lost","woocommerce-payments")}},Ma=function(e){var t=e.status,c=Va[t]||{},a=c.message||Bt(t),n=c.type||"light";return Object(b.createElement)(la.a,{message:a,type:n,isCompact:!0})},ja={bank_cannot_process:{display:Object(p.__)("Bank cannot process","woocommerce-payments")},check_returned:{display:Object(p.__)("Check returned","woocommerce-payments")},credit_not_processed:{display:Object(p.__)("Credit not processed","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments")],required:[Object(p.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments")],respond:[Object(p.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),Object(p.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments")]},customer_initiated:{display:Object(p.__)("Customer initiated","woocommerce-payments")},debit_not_authorized:{display:Object(p.__)("Debit not authorized","woocommerce-payments")},duplicate:{display:Object(p.__)("Duplicate","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments")],required:[Object(p.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments")],respond:[Object(p.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),Object(p.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),Object(p.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),Object(p.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments")]},fraudulent:{display:Object(p.__)("Fraudulent","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting fraudulent payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make a fraudulent purchase. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments")],required:[Object(p.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments")],respond:[Object(p.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),Object(p.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(p.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments")]},general:{display:Object(p.__)("General","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments")],summary:[Object(p.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments")]},incorrect_account_details:{display:Object(p.__)("Incorrect account details","woocommerce-payments")},insufficient_funds:{display:Object(p.__)("Insufficient funds","woocommerce-payments")},product_not_received:{display:Object(p.__)("Product not received","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments")],required:[Object(p.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments")],respond:[Object(p.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),Object(p.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments")]},product_unacceptable:{display:Object(p.__)("Product unacceptable","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments")],required:[Object(p.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments")],respond:[Object(p.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),Object(p.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),Object(p.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),Object(p.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),Object(p.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments")]},subscription_canceled:{display:Object(p.__)("Subscription canceled","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments")],required:[Object(p.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")],respond:[Object(p.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),Object(p.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(p.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")]},unrecognized:{display:Object(p.__)("Unrecognized","woocommerce-payments"),overview:[Object(p.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),Object(p.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(p.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments")],required:[Object(p.__)("As with fraudulent disputes, get your customer to withdraw the dispute by helping them identify the payment. Otherwise challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments")],respond:[Object(p.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(p.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments")]}},xa=new Be.a,Ca=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"amount",label:Object(p.__)("Amount","woocommerce-payments"),required:!0},{key:"status",label:Object(p.__)("Status","woocommerce-payments"),required:!0},{key:"reason",label:Object(p.__)("Reason","woocommerce-payments"),required:!0},{key:"source",label:Object(p.__)("Source","woocommerce-payments"),required:!0},{key:"order",label:Object(p.__)("Order #","woocommerce-payments"),required:!0},{key:"customer",label:Object(p.__)("Customer","woocommerce-payments")},{key:"email",label:Object(p.__)("Email","woocommerce-payments"),visible:!1},{key:"country",label:Object(p.__)("Country","woocommerce-payments"),visible:!1},{key:"created",label:Object(p.__)("Disputed on","woocommerce-payments"),required:!0},{key:"dueBy",label:Object(p.__)("Respond by","woocommerce-payments"),required:!0}],La=function(e){var t=e.disputes,c=e.showPlaceholder,a=(t.data||[]).map(function(e){var t=e.order?{value:e.order.number,display:Object(b.createElement)(jc,{order:e.order})}:null,c=function(t){return Object(b.createElement)(Oc,{href:uc(e.id,"disputes")},t)},a=Object(b.createElement)(dc,{id:e.id,parentSegment:"disputes"}),n=ja[e.reason],r=n?n.display:Bt(e.reason),o=e.charge||{},s=((o.payment_method_details||{}).card||{}).brand,l=o.billing_details||{},i={amount:{value:e.amount/100,display:c(xa.formatCurrency(e.amount/100))},status:{value:e.status,display:c(Object(b.createElement)(Ma,{status:e.status}))},reason:{value:e.reason,display:c(r)},source:{value:s,display:c(Object(b.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(s)}))},created:{value:1e3*e.created,display:c(Object(Re.dateI18n)("M j, Y",Pe()(1e3*e.created)))},dueBy:{value:1e3*e.evidence_details.due_by,display:c(Object(Re.dateI18n)("M j, Y / g:iA",Pe()(1e3*e.evidence_details.due_by)))},order:t,customer:{value:l.name,display:c(l.name)},email:{value:l.email,display:c(l.email)},country:{value:(l.address||{}).country,display:c((l.address||{}).country)},details:{value:e.id,display:a}};return Ca.map(function(e){var t=e.key;return i[t]||{display:null}})});return Object(b.createElement)(Le,null,Object(b.createElement)(y.TableCard,{title:Object(p.__)("Disputes","woocommerce-payments"),isLoading:c,rowsPerPage:10,totalRows:10,headers:Ca,rows:a}))},Na=function(){var e=Object(b.useState)([]),t=w()(e,2),c=t[0],a=t[1],n=Object(b.useState)(!1),r=w()(n,2),o=r[0],s=r[1],l=function(){var e=Oa()(dt.a.mark(function e(){return dt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.t0=a,e.next=5,Ha()({path:"/wc/v3/payments/disputes"});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,s(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();return Object(b.useEffect)(function(){l()},[]),Object(b.createElement)(La,{disputes:c,showPlaceholder:o})},Sa=(c(59),function(e){var t=e.children;return Object(b.createElement)("div",{className:"woocommerce-card__footer"},t)}),Ta=function(e){var t=e.id,c=e.needsResponse,a=e.isSubmitted,n=e.onAccept;if(!c&&!a)return null;var r=Object(vt.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes/challenge",id:t}),o=Object(p.__)("Are you sure you'd like to accept this dispute? This action can not be undone.","woocommerce-payments");return Object(b.createElement)(Sa,null,Object(b.createElement)(y.Link,{href:r,className:"components-button is-button is-primary is-large"},c?Object(p.__)("Challenge dispute","woocommerce-payments"):Object(p.__)("View submitted evidence","woocommerce-payments")),c&&Object(b.createElement)(V,{isDefault:!0,isLarge:!0,onClick:function(){return window.confirm(o)&&n()}},Object(p.__)("Accept dispute","woocommerce-payments")))},Ba=c(28),Ra=c.n(Ba),Ia=(c(60),new Be.a),Da=[{key:"created",label:Object(p.__)("Dispute date","woocommerce-payments")},{key:"amount",label:Object(p.__)("Disputed amount","woocommerce-payments")},{key:"dueBy",label:Object(p.__)("Respond by","woocommerce-payments")},{key:"reason",label:Object(p.__)("Reason","woocommerce-payments")},{key:"order",label:Object(p.__)("Order","woocommerce-payments")},{key:"customer",label:Object(p.__)("Customer","woocommerce-payments")},{key:"transactionId",label:Object(p.__)("Transaction ID","woocommerce-payments")}],Aa=function(e){var t="object"===Ra()(e.charge)?e.charge.id:e.charge;return Object(b.createElement)(y.Link,{href:uc(t,"transactions")},t)},Pa=function(e){var t=ja[e.reason];return t?t.display:Bt(e.reason)},Fa=function(e){var t=e.dispute,c=e.isLoading,a=c?{created:"Created date",amount:"Amount",dueBy:"Due by date",reason:"Dispute reason",order:"Order link",customer:"Customer name",transactionId:"Transaction link"}:{created:Object(Re.dateI18n)("M j, Y",Pe()(1e3*t.created)),amount:"".concat(Ia.formatCurrency(t.amount/100)," ").concat(t.currency.toUpperCase()),dueBy:Object(Re.dateI18n)("M j, Y - g:iA",Pe()(1e3*t.evidence_details.due_by)),reason:Pa(t),order:t.order?Object(b.createElement)(jc,{order:t.order}):null,customer:"object"===Ra()(t.charge)?t.charge.billing_details.name:null,transactionId:Aa(t)};return Object(b.createElement)("div",{className:"wcpay-dispute-info"},Da.map(function(e){var t=e.key,n=e.label;return null==a[t]?null:Object(b.createElement)("div",{key:t,className:"wcpay-dispute-info-item"},Object(b.createElement)(hc,{isLoading:c,display:"inline"},Object(b.createElement)("span",{className:"wcpay-dispute-info-key"},"".concat(n,": ")),Object(b.createElement)("span",{className:"wcpay-dispute-info-value"},a[t])))}))},qa=function(e){var t=e.children;return(void 0===t?[]:t).map(function(e,t){return Object(b.createElement)("p",{key:t},e)})},Ua=(c(32),function(e){var t=e.isLoading,c=e.dispute,a=void 0===c?{}:c,n=e.onAccept,r=!t&&a.id,o=r&&Object(b.createElement)(Ta,{id:a.id,needsResponse:"needs_response"===a.status||"warning_needs_response"===a.status,isSubmitted:a.evidence_details&&a.evidence_details.submission_count>0,onAccept:n}),s=ja[a.reason]||{};return t||r?Object(b.createElement)(Le,{isNarrow:!0,className:"wcpay-dispute-details"},Object(b.createElement)(y.Card,{title:Object(b.createElement)(hc,{isLoading:t,value:Object(p.__)("Dispute overview","woocommerce-payments")})},Object(b.createElement)(Fa,{dispute:a,isLoading:t}),Object(b.createElement)(mc,{isLoading:t,numLines:4},Object(b.createElement)(qa,null,s.overview)),Object(b.createElement)(mc,{isLoading:t,numLines:6},o)),Object(b.createElement)(y.Card,{title:Object(b.createElement)(hc,{isLoading:t,value:s.display?Object(p.sprintf)(Object(p.__)("Dispute: %s","woocommerce-payments"),s.display):Object(p.__)("Dispute type","woocommerce-payments")})},Object(b.createElement)(mc,{isLoading:t,numLines:4},Object(b.createElement)(qa,null,s.summary)),Object(b.createElement)(mc,{isLoading:t,numLines:6},s.required&&Object(b.createElement)("h3",null," ",Object(p.__)("Required to overturn dispute","woocommerce-payments")," "),Object(b.createElement)(qa,null,s.required)),Object(b.createElement)(mc,{isLoading:t,numLines:6},s.respond&&Object(b.createElement)("h3",null,Object(p.__)("How to respond","woocommerce-payments")),Object(b.createElement)(qa,null,s.respond),o))):Object(b.createElement)(Le,{isNarrow:!0,className:"wcpay-dispute-details"},Object(b.createElement)(y.Card,null,Object(b.createElement)("div",null,Object(p.__)("Dispute not loaded","woocommerce-payments"))))}),Wa=function(e){var t=e.query,c="/wc/v3/payments/disputes/".concat(t.id),a=Object(b.useState)(),n=w()(a,2),r=n[0],o=n[1],s=Object(b.useState)(!0),l=w()(s,2),i=l[0],m=l[1],h=Object(Ye.useDispatch)("core/notices"),u=h.createSuccessNotice,d=h.createErrorNotice,v=function(){var e=Oa()(dt.a.mark(function e(){return dt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,Ha()({path:c});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,m(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();Object(b.useEffect)(function(){v()},[]);var f=function(){var e=Oa()(dt.a.mark(function e(){return dt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,Ha()({path:"".concat(c,"/close"),method:"post"});case 5:e.t1=e.sent,(0,e.t0)(e.t1),t=void 0,t=r.order?Object(p.sprintf)(Object(p.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),r.order.number):Object(p.__)("You have accepted the dispute.","woocommerce-payments"),u(t),Object(yc.getHistory)().push(Object(vt.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes"})),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(1),d(Object(p.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments"));case 13:return e.prev=13,m(!1),e.finish(13);case 16:case"end":return e.stop()}var t},e,null,[[1,10,13,16]])}));return function(){return e.apply(this,arguments)}}();return Object(b.createElement)(Ua,{isLoading:i,dispute:r,onAccept:f})};var Ya=function(e){var t=e.as;return function(e){var t=e.as,c=void 0===t?"div":t,a=H(e,["as"]);return"function"==typeof a.children?a.children(a):Object(b.createElement)(c,a)}(k({as:void 0===t?"div":t,className:"components-visually-hidden"},H(e,["as"])))};function Za(e){var t=e.id,c=e.label,a=e.hideLabelFromVision,n=e.help,r=e.className,o=e.children;return Object(b.createElement)("div",{className:_()("components-base-control",r)},Object(b.createElement)("div",{className:"components-base-control__field"},c&&t&&(a?Object(b.createElement)(Ya,{as:"label",htmlFor:t},c):Object(b.createElement)("label",{className:"components-base-control__label",htmlFor:t},c)),c&&!t&&(a?Object(b.createElement)(Ya,{as:"label"},c):Object(b.createElement)(Za.VisualLabel,null,c)),o),!!n&&Object(b.createElement)("p",{id:t+"__help",className:"components-base-control__help"},n))}Za.VisualLabel=function(e){var t=e.className,c=e.children;return t=_()("components-base-control__label",t),Object(b.createElement)("span",{className:t},c)};var Qa=Za;var Ga=Object(U.withInstanceId)(function(e){var t=e.label,c=e.hideLabelFromVision,a=e.value,n=e.help,r=e.className,o=e.instanceId,s=e.onChange,l=e.type,i=void 0===l?"text":l,m=H(e,["label","hideLabelFromVision","value","help","className","instanceId","onChange","type"]),h="inspector-text-control-".concat(o);return Object(b.createElement)(Qa,{label:t,hideLabelFromVision:c,id:h,help:n,className:r},Object(b.createElement)("input",M({className:"components-text-control__input",type:i,id:h,value:a,onChange:function(e){return s(e.target.value)},"aria-describedby":n?h+"__help":void 0},m)))});var $a=Object(U.withInstanceId)(function(e){var t=e.label,c=e.hideLabelFromVision,a=e.value,n=e.help,r=e.instanceId,o=e.onChange,s=e.rows,l=void 0===s?4:s,i=e.className,m=H(e,["label","hideLabelFromVision","value","help","instanceId","onChange","rows","className"]),h="inspector-textarea-control-".concat(r);return Object(b.createElement)(Qa,{label:t,hideLabelFromVision:c,id:h,help:n,className:i},Object(b.createElement)("textarea",M({className:"components-textarea-control__input",id:h,rows:l,onChange:function(e){return o(e.target.value)},"aria-describedby":n?h+"__help":void 0,value:a},m)))});var Ja=Object(U.withInstanceId)(function(e){var t=e.help,c=e.instanceId,a=e.label,n=e.multiple,r=void 0!==n&&n,o=e.onChange,s=e.options,l=void 0===s?[]:s,i=e.className,m=e.hideLabelFromVision,h=H(e,["help","instanceId","label","multiple","onChange","options","className","hideLabelFromVision"]),u="inspector-select-control-".concat(c);return!Object(z.isEmpty)(l)&&Object(b.createElement)(Qa,{label:a,hideLabelFromVision:m,id:u,help:t,className:i},Object(b.createElement)("select",M({id:u,className:"components-select-control__input",onChange:function(e){if(r){var t=Q(e.target.options).filter(function(e){return e.selected}).map(function(e){return e.value});o(t)}else o(e.target.value)},"aria-describedby":t?"".concat(u,"__help"):void 0,multiple:r},h),l.map(function(e,t){return Object(b.createElement)("option",{key:"".concat(e.label,"-").concat(e.value,"-").concat(t),value:e.value,disabled:e.disabled},e.label)})))}),Ka=[{key:"general",title:Object(p.__)("General evidence","woocommerce-payments"),description:Object(p.__)("Provide general evidence about the customer and the order.","woocommerce-payments"),fields:[{key:"product_description",label:Object(p.__)("Product description","woocommerce-payments"),type:"textarea",description:Object(p.__)("A description of the product or service and any relevant details on how this was presented to the customer at the time of purchase.","woocommerce-payments")},{key:"customer_name",label:Object(p.__)("Customer name","woocommerce-payments"),type:"text"},{key:"customer_email_address",label:Object(p.__)("Customer email","woocommerce-payments"),type:"text"},{key:"customer_signature",label:Object(p.__)("Customer signature","woocommerce-payments"),type:"file",description:Object(p.__)("A relevant document or contract showing the customer's signature (if available).","woocommerce-payments")},{key:"billing_address",label:Object(p.__)("Customer billing address","woocommerce-payments"),type:"textarea"},{key:"customer_purchase_ip",label:Object(p.__)("Customer IP address","woocommerce-payments"),type:"text"},{key:"receipt",label:Object(p.__)("Receipt","woocommerce-payments"),type:"file",description:Object(p.__)("Any receipt or message sent to the customer notifying them of the charge. This field will be automatically filled with a Stripe generated email receipt if any such receipt was sent.","woocommerce-payments")},{key:"customer_communication",label:Object(p.__)("Customer communication","woocommerce-payments"),type:"file",description:Object(p.__)("Any communication with the customer that you feel is relevant to your case (e.g. emails proving that they received the product or service, or demonstrating their use of or satisfaction with the product or service).","woocommerce-payments")}]},{key:"refund_policy_info",title:Object(p.__)("Refund policy info","woocommerce-payments"),fields:[{key:"refund_policy",label:Object(p.__)("Refund policy","woocommerce-payments"),type:"file",description:Object(p.__)("Your refund policy, as shown or provided to the customer.","woocommerce-payments")},{key:"refund_policy_disclosure",label:Object(p.__)("Refund policy disclosure","woocommerce-payments"),type:"textarea",description:Object(p.__)("An explanation of how and when the customer was shown or provided your refund policy prior to purchase.","woocommerce-payments")},{key:"refund_refusal_explanation",label:Object(p.__)("Refund refusal explanation","woocommerce-payments"),type:"textarea",description:Object(p.__)("Your explanation for why the customer is not entitled to a refund.","woocommerce-payments")}],reason:"credit_not_processed"},{key:"duplicate_charge_info",title:Object(p.__)("Duplicate charge info","woocommerce-payments"),fields:[{key:"duplicate_charge_id",label:Object(p.__)("Duplicate charge ID","woocommerce-payments"),type:"text",description:Object(p.__)("The charge ID for the previous payment that appears to be a duplicate of the one that is disputed.","woocommerce-payments")},{key:"duplicate_charge_explanation",label:Object(p.__)("Explanation of duplicate charge","woocommerce-payments"),type:"textarea",description:Object(p.__)("An explanation of the difference between the disputed payment and the prior one that appears to be a duplicate.","woocommerce-payments")},{key:"duplicate_charge_documentation",label:Object(p.__)("Duplicate charge documentation","woocommerce-payments"),type:"file",description:Object(p.__)("Upload documentation for the prior payment that can uniquely identify it, such as a separate receipt. This document should be paired with a similar document from the disputed payment that proves the two are separate. This should also include a separate shipping label or receipt for the other payment. If multiple products were shipped together, provide a packing list that shows each purchase.","woocommerce-payments")},{key:"shipping_documentation",label:Object(p.__)("Shipping documentation","woocommerce-payments"),type:"file",description:Object(p.__)("A shipping label or receipt for the disputed payment.","woocommerce-payments"),denormalized:!0,productType:"physical_product"},{key:"service_documentation",label:Object(p.__)("Service documentation","woocommerce-payments"),type:"file",description:Object(p.__)("A copy of a service agreement or documentation for the disputed payment.","woocommerce-payments"),denormalized:!0,productType:"offline_service"}],reason:"duplicate"},{key:"shipping_information",title:Object(p.__)("Shipping information","woocommerce-payments"),fields:[{key:"shipping_carrier",label:Object(p.__)("Shipping carrier","woocommerce-payments"),type:"text",description:Object(p.__)("The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.","woocommerce-payments")},{key:"shipping_tracking_number",label:Object(p.__)("Tracking number","woocommerce-payments"),type:"text",description:Object(p.__)("The tracking number (if available) for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. When we compile your evidence into a single document, these tracking numbers will be expanded to include detailed delivery information from the carrier.","woocommerce-payments")},{key:"shipping_documentation",label:Object(p.__)("Proof of shipping","woocommerce-payments"),type:"file",description:Object(p.__)("Provide documentation as proof that a product was shipped to the cardholder at the same address the cardholder provided to you. This could include a copy of the shipment receipt or label, and show the full shipping address of the cardholder, if possible.","woocommerce-payments")},{key:"shipping_date",label:Object(p.__)("Date of shipment","woocommerce-payments"),type:"text",description:Object(p.__)("The date on which a physical product began its route to the shipping address. This date should be prior to the date of the dispute.","woocommerce-payments")},{key:"shipping_address",label:Object(p.__)("Shipping address","woocommerce-payments"),type:"textarea",description:Object(p.__)("The address to which a physical product was shipped. The shipping address must match a billing address verified with AVS. (A signature is not required as evidence of delivery).","woocommerce-payments")}],reason:["fraudulent","product_not_received","product_unacceptable","unrecognized"],productType:"physical_product"},{key:"cancellation_policy_info",title:Object(p.__)("Cancellation policy info","woocommerce-payments"),fields:[{key:"cancellation_policy",label:Object(p.__)("Cancellation policy","woocommerce-payments"),type:"file",description:Object(p.__)("Your subscription cancellation policy, as shown to the customer.","woocommerce-payments")},{key:"cancellation_policy_disclosure",label:Object(p.__)("Cancellation policy disclosure","woocommerce-payments"),type:"textarea",description:Object(p.__)("An explanation of how and when the customer was shown your cancellation policy prior to purchase.","woocommerce-payments")},{key:"cancellation_rebuttal",label:Object(p.__)("Cancellation rebuttal","woocommerce-payments"),type:"textarea",description:Object(p.__)("A justification for why the customer's subscription was not canceled.","woocommerce-payments")}],reason:"subscription_canceled"},{key:"download_and_activity_logs",title:Object(p.__)("Download and activity logs","woocommerce-payments"),fields:[{key:"access_activity_log",type:"file",description:[Object(p.__)("Provide at least two of the following pieces of information:","woocommerce-payments"),Object(p.__)("• Customer's IP address and their device's geographical location at the time of purchase","woocommerce-payments"),Object(p.__)("• Device ID and name of the device","woocommerce-payments"),Object(p.__)("• Customer name and email address linked to their customer profile","woocommerce-payments"),Object(p.__)("• Evidence that the customer logged into their account for your business before the transaction date","woocommerce-payments"),Object(p.__)("• Evidence that your website or app was accessed by the cardholder for purchase or services on or after the transaction date","woocommerce-payments"),Object(p.__)("• Evidence that the same device and card used in the disputed payment was used in a previous payment that was not disputed","woocommerce-payments")]}],reason:["fraudulent","product_not_received"],productType:"digital_product_or_service"},{key:"download_and_activity_logs",title:Object(p.__)("Download and activity logs","woocommerce-payments"),fields:[{key:"access_activity_log",type:"file",description:Object(p.__)("Any server or activity logs showing proof that the cardholder accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.","woocommerce-payments")}],reason:["product_unacceptable","subscription_canceled","unrecognized"],productType:"digital_product_or_service",denormalized:!0},{key:"service_details",title:Object(p.__)("Service details","woocommerce-payments"),fields:[{key:"service_date",label:Object(p.__)("Service date","woocommerce-payments"),type:"text",description:Object(p.__)("The date on which the cardholder received or began receiving the purchased service.","woocommerce-payments")},{key:"service_documentation",label:Object(p.__)("Proof of service","woocommerce-payments"),type:"file",description:Object(p.__)("Documentation showing proof that a service was provided to the cardholder. This could include a copy of a signed contract, work order, or other form of written agreement.","woocommerce-payments")}],reason:["fraudulent","product_not_received","product_unacceptable","subscription_canceled","unrecognized"],productType:"offline_service"},{key:"uncategorized",title:Object(p.__)("Additional details","woocommerce-payments"),description:Object(p.__)("Provide any extra evidence or statements you'd like the bank to see, either as text or by uploading a document.","woocommerce-payments"),fields:[{key:"uncategorized_text",label:Object(p.__)("Additional details","woocommerce-payments"),type:"textarea"},{key:"uncategorized_file",type:"file"}]}],Xa=function(e){function t(){var e;return j(this,t),(e=T(this,B(t).apply(this,arguments))).openFileDialog=e.openFileDialog.bind(S(e)),e.bindInput=e.bindInput.bind(S(e)),e}return I(t,b["Component"]),C(t,[{key:"openFileDialog",value:function(){this.input.click()}},{key:"bindInput",value:function(e){this.input=e}},{key:"render",value:function(){var e=this.props,t=e.accept,c=e.children,a=e.icon,n=void 0===a?"upload":a,r=e.multiple,o=void 0!==r&&r,s=e.onChange,l=e.render,i=H(e,["accept","children","icon","multiple","onChange","render"]),m=l?l({openFileDialog:this.openFileDialog}):Object(b.createElement)(Me,M({icon:n,onClick:this.openFileDialog},i),c);return Object(b.createElement)("div",{className:"components-form-file-upload"},m,Object(b.createElement)("input",{type:"file",ref:this.bindInput,multiple:o,style:{display:"none"},accept:t,onChange:s}))}}]),t}(),en=function(e){var t=e.fileName,c=e.field,a=e.disabled,n=e.isDone,r=e.isLoading,o=e.accept,s=e.error,l=e.onFileChange,i=e.onFileRemove,m=e.help,h=s&&s.length>0;return Object(b.createElement)(Qa,{id:"form-file-upload-base-control-".concat(c.key),label:c.label,help:m},Object(b.createElement)("div",{className:"file-upload"},Object(b.createElement)(Xa,{id:"form-file-upload-".concat(c.key),className:n&&!h?"is-success":null,isLarge:!0,isPrimary:!0,isDestructive:h,isBusy:r,disabled:a||r,icon:Object(b.createElement)(De.a,{icon:n&&!h?"checkmark":"add-outline",size:18}),accept:o,onChange:function(e){return l(c.key,e.target.files[0])}},Object(p.__)("Upload file","woocommerce-payments")),h?Object(b.createElement)("span",{className:"upload-message is-destructive"},s):Object(b.createElement)("span",{className:"upload-message"},t),n&&!a?Object(b.createElement)(Me,{className:"delete-uploaded-file-button",icon:Object(b.createElement)(De.a,{icon:"trash",size:18}),onClick:function(){return i(c.key)}}):null))},tn=function(e,t){Object(b.useEffect)(function(){var t=e();if(t){var c=function(e){e.preventDefault(),e.returnValue=""};window.addEventListener("beforeunload",c);var a=Object(yc.getHistory)().block(t);return function(){window.removeEventListener("beforeunload",c),a()}}},t)},cn=function(e){return Array.isArray(e)?Object(z.flatten)(e.map(function(e,t){return[e,Object(b.createElement)("br",{key:t})]})):e},an=function(e){var t=e.fields,c=e.evidence,a=e.onChange,n=e.onFileChange,r=e.onFileRemove,o=e.onSave,s=e.readOnly;if(!t||!t.length)return null;var l=function(e){return{label:e.label,value:c[e.key]||"",onChange:function(t){return a(e.key,t)},disabled:s,help:cn(e.description)}},i=function(e){switch(e.type){case"file":return Object(b.createElement)(en,oc()({key:e.key},function(e){var t=c.metadata&&c.metadata[e.key]||"",a=c.isUploading&&(c.isUploading[e.key]||!1),o=c.uploadingErrors&&(c.uploadingErrors[e.key]||""),l=!a&&t.length>0;return{field:e,fileName:t,accept:".pdf, image/png, image/jpeg",onFileChange:n,onFileRemove:r,disabled:s,isLoading:a,isDone:l,error:o,help:cn(e.description)}}(e)));case"text":return Object(b.createElement)(Ga,oc()({key:e.key},l(e)));default:return Object(b.createElement)($a,oc()({key:e.key},l(e)))}},m=t.map(function(e){return Object(b.createElement)(y.Card,{key:e.key,title:e.title},e.description&&Object(b.createElement)("p",null,e.description),e.fields.map(i))}),h=Object(p.__)("Are you sure you're ready to submit this evidence? Evidence submissions are final.","woocommerce-payments");return Object(b.createElement)(b.Fragment,null,m,s?null:Object(b.createElement)(y.Card,null,Object(b.createElement)("p",null,Object(p.__)("When you submit your evidence, we'll format it and send it to the cardholder's bank, then email you once the dispute has been decided.","woocommerce-payments")),Object(b.createElement)("p",null,Object(b.createElement)("strong",null,Object(p.__)("Evidence submission is final.","woocommerce-payments"))," ",Object(p.__)("You can also save this evidence for later instead of submitting it immediately.","woocommerce-payments")," ",Object(b.createElement)("strong",null,Object(p.__)("We will automatically submit any saved evidence at the due date.","woocommerce-payments"))),Object(b.createElement)(Sa,null,Object(b.createElement)(V,{isPrimary:!0,isLarge:!0,onClick:function(){return window.confirm(h)&&o(!0)}},Object(p.__)("Submit evidence","woocommerce-payments")),Object(b.createElement)(V,{isDefault:!0,isLarge:!0,onClick:function(){return o(!1)}},Object(p.__)("Save for later","woocommerce-payments")))))},nn=function(e){var t=e.isLoading,c=e.dispute,a=void 0===c?{}:c,n=e.productType,r=e.onChangeProductType,o=lc()(e,["isLoading","dispute","productType","onChangeProductType"]),s=a&&"needs_response"!==a.status&&"warning_needs_response"!==a.status,l=!t&&a.id;return t||l?Object(b.createElement)(Le,{isNarrow:!0,className:"wcpay-dispute-evidence"},Object(b.createElement)(y.Card,{title:Object(b.createElement)(hc,{isLoading:t,value:Object(p.__)("Challenge dispute","woocommerce-payments")})},Object(b.createElement)(Fa,{dispute:a,isLoading:t})),Object(b.createElement)(y.Card,{title:Object(b.createElement)(hc,{isLoading:t,value:Object(p.__)("Product type","woocommerce-payments")})},Object(b.createElement)(mc,{isLoading:t,numLines:2},Object(b.createElement)(Ja,{value:n,onChange:r,options:[{label:Object(p.__)("Select one…","woocommerce-payments"),disabled:!0,value:""},{label:Object(p.__)("Physical product","woocommerce-payments"),value:"physical_product"},{label:Object(p.__)("Digital product or service","woocommerce-payments"),value:"digital_product_or_service"},{label:Object(p.__)("Offline service","woocommerce-payments"),value:"offline_service"},{label:Object(p.__)("Multiple product types","woocommerce-payments"),value:"multiple"}],disabled:s}))),!t&&Object(b.createElement)(an,oc()({},o,{readOnly:s}))):Object(b.createElement)(Le,{isNarrow:!0,className:"wcpay-dispute-details"},Object(b.createElement)("div",null,Object(p.__)("Dispute not loaded","woocommerce-payments")))},rn=function(e){var t=e.query,c="/wc/v3/payments/disputes/".concat(t.id),a=Object(b.useState)(),n=w()(a,2),r=n[0],o=n[1],s=Object(b.useState)(!1),l=w()(s,2),i=l[0],m=l[1],h=Object(b.useState)({}),u=w()(h,2),d=u[0],v=u[1],f=Object(Ye.useDispatch)("core/notices"),g=f.createSuccessNotice,y=f.createErrorNotice,E=f.createInfoNotice,_=!r||Object(z.isMatchWith)(r.evidence,d,function(e,t){if(null===e&&!t)return!0});tn(function(){if(!_)return Object(p.__)("There are unsaved changes on this page. Are you sure you want to leave and discard the unsaved changes?","woocommerce-payments")},[_]);var O=function(){var e=Oa()(dt.a.mark(function e(){return dt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,Ha()({path:c});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,m(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();Object(b.useEffect)(function(){O()},[]);var k=function(e,t){return v(function(c){return We()({},c,Ge()({},e,t))})},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(function(t){return Object(z.merge)({},t,e)})},V=function(){var e=Oa()(dt.a.mark(function e(t,c){var a,n;return dt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=2;break}return e.abrupt("return");case 2:return(a=new FormData).append("file",c),a.append("purpose","dispute_evidence"),H({isUploading:Ge()({},t,!0),uploadingErrors:Ge()({},t,"")}),k(t,""),e.prev=7,e.next=10,Ha()({path:"/wc/v3/payments/file",method:"post",body:a});case 10:n=e.sent,H({metadata:Ge()({},t,n.filename),isUploading:Ge()({},t,!1)}),k(t,n.id),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(7),H({isUploading:Ge()({},t,!1),uploadingErrors:Ge()({},t,e.t0.message)}),k(t,"");case 19:case"end":return e.stop()}},e,null,[[7,15]])}));return function(t,c){return e.apply(this,arguments)}}(),M=function(e){var t=e?Object(p.__)("Evidence submitted!","woocommerce-payments"):Object(p.__)("Evidence saved!","woocommerce-payments"),c=Object(vt.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes"});g(t),Object(yc.getHistory)().push(c)},j=function(e){var t=e?Object(p.__)("Failed to submit evidence!","woocommerce-payments"):Object(p.__)("Failed to save evidence!","woocommerce-payments");y(t)},x=function(){var e=Oa()(dt.a.mark(function e(t){var a,n;return dt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(z.some)(r.isUploading)){e.next=3;break}return E(Object(p.__)("Please wait until file upload is finished"),"woocommerce-payments"),e.abrupt("return");case 3:return m(!0),e.prev=4,a=r.metadata,e.next=8,Ha()({path:c,method:"post",data:{evidence:We()({},r.evidence,{},d),metadata:a,submit:t}});case 8:n=e.sent,o(n),M(t),v({}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),j(t);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}},e,null,[[4,14,17,20]])}));return function(t){return e.apply(this,arguments)}}(),C=function(e){if(!e)return"";var t=e.metadata.__product_type||"";return!t&&e.evidence_details&&e.evidence_details.has_evidence&&(t="multiple"),t}(r),L=Object(b.useMemo)(function(){return function(e,t){return e&&t?"multiple"===t?Ka.map(function(e){return e.denormalized?null:We()({},e,{fields:e.fields.filter(function(e){return!e.denormalized})})}).filter(Boolean):Ka.map(function(c){var a=c.reason&&!Object(z.includes)(c.reason,e),n=c.productType&&c.productType!==t;if(a||n)return null;var r=c.fields.filter(function(e){return!e.productType||e.productType===t});return We()({},c,{fields:r})}).filter(Boolean):[]}(r&&r.reason,C)},[r&&r.reason,C]);return Object(b.createElement)(nn,{isLoading:i,dispute:r,evidence:r?We()({},r.evidence,{},d,{metadata:r.metadata||{},isUploading:r.isUploading||{},uploadingErrors:r.uploadingErrors||{}}):{},onChange:k,onFileChange:V,onFileRemove:function(e){k(e,""),H({metadata:Ge()({},e,""),uploadingErrors:Ge()({},e,"")})},onSave:x,productType:C,onChangeProductType:function(e){return H({metadata:Ge()({},"__product_type",e)})},fields:L})},on={transactions:Object(p.__)("Viewing test transactions. To view live transactions, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),paymentDetails:Object(p.__)("Test payment:","woocommerce-payments"),deposits:Object(p.__)("Viewing test deposits. To view live deposits, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),depositDetails:Object(p.__)("Test deposit:","woocommerce-payments"),disputes:Object(p.__)("Viewing test disputes. To view live disputes, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),disputeDetails:Object(p.__)("Test dispute:","woocommerce-payments")},sn=[on.paymentDetails,on.disputeDetails,on.depositDetails],ln=function(e){var t=Object(b.createElement)("a",{href:Object(vt.addQueryArgs)("admin.php",{page:"wc-settings",tab:"checkout",section:"woocommerce_payments"})},Object(p.__)("View WooCommerce Payments settings.","woocommerce-payments"));return sn.includes(e)?Object(b.createElement)("span",null,Object(b.createElement)("b",null,e)," ",function(e){return Object(p._n)("WooCommerce Payments was in test mode when this order was placed.","WooCommerce Payments was in test mode when these orders were placed.",on.depositDetails===e?2:1,"woocommerce-payments")}(e)," ",t):Object(b.createElement)("span",null,e," ",t)},mn=function(e,t){return function(c,a){return Object(b.createElement)("div",null,function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"undefined"==typeof wcpaySettings?e:"1"===wcpaySettings.testMode||e}()?(n=t,Object(b.createElement)(je,{className:"wcpay-test-mode-notice",status:"warning",isDismissible:!1},ln(n))):null,e(c,a));var n}};Object(f.addFilter)("woocommerce_admin_pages_list","woocommerce-payments",function(e){var t,c=(t=document.querySelector("#toplevel_page_wc-admin-path--payments-connect")?"connect":"deposits",{menuID:"toplevel_page_wc-admin-path--payments-".concat(t),rootLink:["/payments/".concat(t),Object(p.__)("Payments","woocommerce-payments")]}),a=c.menuID,n=c.rootLink;return e.push({container:Se,path:"/payments/connect",wpOpenMenu:a,breadcrumbs:[n,Object(p.__)("Connect","woocommerce-payments")]}),e.push({container:mn(Mc,on.deposits),path:"/payments/deposits",wpOpenMenu:a,breadcrumbs:[n,Object(p.__)("Deposits","woocommerce-payments")]}),e.push({container:mn(qc,on.depositDetails),path:"/payments/deposits/details",wpOpenMenu:a,breadcrumbs:[n,["/payments/deposits",Object(p.__)("Deposits","woocommerce-payments")],Object(p.__)("Deposit details","woocommerce-payments")]}),e.push({container:mn(Qc,on.transactions),path:"/payments/transactions",wpOpenMenu:a,breadcrumbs:[n,Object(p.__)("Transactions","woocommerce-payments")]}),e.push({container:mn(Ea,on.paymentDetails),path:"/payments/transactions/details",wpOpenMenu:a,breadcrumbs:[n,["/payments/transactions",Object(p.__)("Transactions","woocommerce-payments")],Object(p.__)("Payment details","woocommerce-payments")]}),e.push({container:mn(Na,on.disputes),path:"/payments/disputes",wpOpenMenu:a,breadcrumbs:[n,Object(p.__)("Disputes","woocommerce-payments")]}),e.push({container:mn(Wa,on.disputeDetails),path:"/payments/disputes/details",wpOpenMenu:a,breadcrumbs:[n,["/payments/disputes",Object(p.__)("Disputes","woocommerce-payments")],Object(p.__)("Dispute details","woocommerce-payments")]}),e.push({container:mn(rn,on.disputeDetails),path:"/payments/disputes/challenge",wpOpenMenu:a,breadcrumbs:[n,["/payments/disputes",Object(p.__)("Disputes","woocommerce-payments")],Object(p.__)("Challenge dispute","woocommerce-payments")]}),e})},function(e,t,c){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var c=0,a=new Array(t);c<t;c++)a[c]=e[c];return a}function n(e,t){if(e){if("string"==typeof e)return a(e,t);var c=Object.prototype.toString.call(e).slice(8,-1);return"Object"===c&&e.constructor&&(c=e.constructor.name),"Map"===c||"Set"===c?Array.from(e):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?a(e,t):void 0}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var c=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(c.push(o.value),!t||c.length!==t);a=!0);}catch(e){n=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return c}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l,i,m,h,u=c(12),d=/<(\/)?(\w+)\s*(\/)?>/g;function v(e,t,c,a,n){return{element:e,tokenStart:t,tokenLength:c,prevOffset:a,leadingTextStart:n,children:[]}}var p=function(e){var t="object"===o(e),c=t&&Object.values(e);return t&&c.length&&c.every(function(e){return Object(u.isValidElement)(e)})};function f(e){var t=function(){var e=d.exec(l);if(null===e)return["no-more-tokens"];var t=e.index,c=r(e,4),a=c[0],n=c[1],o=c[2],s=c[3],i=a.length;if(s)return["self-closed",o,t,i];if(n)return["closer",o,t,i];return["opener",o,t,i]}(),c=r(t,4),a=c[0],n=c[1],o=c[2],p=c[3],f=h.length,b=o>i?i:null;if(!e[n])return g(),!1;switch(a){case"no-more-tokens":if(0!==f){var y=h.pop(),z=y.leadingTextStart,E=y.tokenStart;m.push(l.substr(z,E))}return g(),!1;case"self-closed":return 0===f?(null!==b&&m.push(l.substr(b,o-b)),m.push(e[n]),i=o+p,!0):(w(new v(e[n],o,p)),i=o+p,!0);case"opener":return h.push(new v(e[n],o,p,o+p,b)),i=o+p,!0;case"closer":if(1===f)return function(e){var t=h.pop(),c=t.element,a=t.leadingTextStart,n=t.prevOffset,r=t.tokenStart,o=t.children,i=e?l.substr(n,e-n):l.substr(n);i&&o.push(i);null!==a&&m.push(l.substr(a,r-a));m.push(u.cloneElement.apply(void 0,[c,null].concat(s(o))))}(o),i=o+p,!0;var _=h.pop(),O=l.substr(_.prevOffset,o-_.prevOffset);_.children.push(O),_.prevOffset=o+p;var k=new v(_.element,_.tokenStart,_.tokenLength,o+p);return k.children=_.children,w(k),i=o+p,!0;default:return g(),!1}}function g(){var e=l.length-i;0!==e&&m.push(l.substr(i,e))}function w(e){var t=e.element,c=e.tokenStart,a=e.tokenLength,n=e.prevOffset,r=e.children,o=h[h.length-1],i=l.substr(o.prevOffset,c-o.prevOffset);i&&o.children.push(i),o.children.push(u.cloneElement.apply(void 0,[t,null].concat(s(r)))),o.prevOffset=n||c+a}t.a=function(e,t){if(l=e,i=0,m=[],h=[],d.lastIndex=0,!p(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(f(t));return u.createElement.apply(void 0,[u.Fragment,null].concat(s(m)))}}]));
|
dist/settings.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-date', 'wp-element', 'wp-
|
1 |
+
<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f41358976b1149017175ad87697d2243');
|
dist/settings.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t){for(var n in t)e[n]=t[n]}(this,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=68)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},20:function(e,t,n){"use strict";var r=n(0),o=(n(28),["primary","light","warning","alert"]);t.a=function(e){var t=e.message,n=e.type,c=e.isCompact,a=["chip","chip-".concat(o.find(function(e){return e===n})||"primary"),c?"is-compact":""];return Object(r.createElement)("span",{className:a.join(" ").trim()},t)}},24:function(e,t){!function(){e.exports=this.wp.hooks}()},28:function(e,t,n){},30:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,c=(e.icon,e.className),i=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-checkmark-circle",c,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:s,height:n,width:n,onClick:o},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})))};var o,c=n(12),a=(o=c)&&o.__esModule?o:{default:o};e.exports=t.default},31:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,o=void 0===n?24:n,c=e.onClick,i=(e.icon,e.className),s=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-notice",i,(t=o,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:u,height:o,width:o,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})))};var o,c=n(12),a=(o=c)&&o.__esModule?o:{default:o};e.exports=t.default},36:function(e,t,n){var r=n(62),o=n(63),c=n(64);e.exports=function(e){return r(e)||o(e)||c()}},37:function(e,t){!function(){e.exports=this.ReactDOM}()},6:function(e,t){!function(){e.exports=this.moment}()},62:function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},63:function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},64:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},65:function(e,t,n){},67:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s,u,l,f,m=n(12),p=/<(\/)?(\w+)\s*(\/)?>/g;function d(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var b=function(e){var t="object"===a(e),n=t&&Object.values(e);return t&&n.length&&n.every(function(e){return Object(m.isValidElement)(e)})};function y(e){var t=function(){var e=p.exec(s);if(null===e)return["no-more-tokens"];var t=e.index,n=c(e,4),r=n[0],o=n[1],a=n[2],i=n[3],u=r.length;if(i)return["self-closed",a,t,u];if(o)return["closer",a,t,u];return["opener",a,t,u]}(),n=c(t,4),r=n[0],o=n[1],a=n[2],b=n[3],y=f.length,_=a>u?u:null;if(!e[o])return h(),!1;switch(r){case"no-more-tokens":if(0!==y){var j=f.pop(),O=j.leadingTextStart,w=j.tokenStart;l.push(s.substr(O,w))}return h(),!1;case"self-closed":return 0===y?(null!==_&&l.push(s.substr(_,a-_)),l.push(e[o]),u=a+b,!0):(v(new d(e[o],a,b)),u=a+b,!0);case"opener":return f.push(new d(e[o],a,b,a+b,_)),u=a+b,!0;case"closer":if(1===y)return function(e){var t=f.pop(),n=t.element,r=t.leadingTextStart,o=t.prevOffset,c=t.tokenStart,a=t.children,u=e?s.substr(o,e-o):s.substr(o);u&&a.push(u);null!==r&&l.push(s.substr(r,c-r));l.push(m.cloneElement.apply(void 0,[n,null].concat(i(a))))}(a),u=a+b,!0;var g=f.pop(),E=s.substr(g.prevOffset,a-g.prevOffset);g.children.push(E),g.prevOffset=a+b;var S=new d(g.element,g.tokenStart,g.tokenLength,a+b);return S.children=g.children,v(S),u=a+b,!0;default:return h(),!1}}function h(){var e=s.length-u;0!==e&&l.push(s.substr(u,e))}function v(e){var t=e.element,n=e.tokenStart,r=e.tokenLength,o=e.prevOffset,c=e.children,a=f[f.length-1],u=s.substr(a.prevOffset,n-a.prevOffset);u&&a.children.push(u),a.children.push(m.cloneElement.apply(void 0,[t,null].concat(i(c)))),a.prevOffset=o||n+r}t.a=function(e,t){if(s=e,u=0,l=[],f=[],p.lastIndex=0,!b(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(y(t));return m.createElement.apply(void 0,[m.Fragment,null].concat(i(l)))}},68:function(e,t,n){"use strict";n.r(t);var r=n(36),o=n.n(r),c=n(0),a=(n(12),n(37)),i=n.n(a),s=n(24),u=n(1),l=n(8),f=n(6),m=n.n(f),p=n(67),d=n(30),b=n.n(d),y=n(31),h=n.n(y),v=n(20),_=(n(65),function(e){var t,n,r,o=e.accountStatus;return o.error?Object(c.createElement)("div",null,Object(u.__)("Error determining the connection status.")):Object(c.createElement)("div",null,Object(c.createElement)("div",null,(t=o.status,n=Object(u.__)("Unknown","woocommerce-payments"),r="light","complete"===t?(n=Object(u.__)("Complete","woocommerce-payments"),r="primary"):"restricted_soon"===t?(n=Object(u.__)("Restricted soon","woocommerce-payments"),r="warning"):"restricted"===t?(n=Object(u.__)("Restricted","woocommerce-payments"),r="alert"):t.startsWith("rejected")&&(n=Object(u.__)("Rejected","woocommerce-payments"),r="light"),Object(c.createElement)(v.a,{message:n,type:r,isCompact:!0})),function(e){var t,n,r;return e?(n=Object(u.__)("Enabled","woocommerce-payments"),r=Object(c.createElement)(b.a,{size:18}),t="account-status__info__green"):(n=Object(u.__)("Disabled","woocommerce-payments"),r=Object(c.createElement)(h.a,{size:18}),t="account-status__info__red"),Object(c.createElement)("span",{className:"account-status__info"},Object(u.__)("Payments:","woocommerce-payments"),Object(c.createElement)("span",{className:t},r,n))}(o.paymentsEnabled),function(e){var t,n="account-status__info__green",r=Object(c.createElement)(b.a,{size:18});return"disabled"===e?(t=Object(u.__)("Disabled","woocommerce-payments"),n="account-status__info__red",r=Object(c.createElement)(h.a,{size:18})):t="daily"===e?Object(u.__)("Daily","woocommerce-payments"):"weekly"===e?Object(u.__)("Weekly","woocommerce-payments"):"monthly"===e?Object(u.__)("Monthly","woocommerce-payments"):"manual"===e?Object(u.__)("Manual","woocommerce-payments"):Object(u.__)("Unknown","woocommerce-payments"),Object(c.createElement)("span",{className:"account-status__info"},Object(u.__)("Deposits:","woocommerce-payments"),Object(c.createElement)("span",{className:n},r,t))}(o.depositsStatus)),function(e){var t=e.status,n=e.currentDeadline,r=e.pastDue,o=e.accountLink;if("complete"===t)return"";var a="";return"restricted_soon"===t?a=Object(p.a)(Object(u.sprintf)(Object(u.__)("To avoid disrupting deposits, <a>update this account</a> by %s with more information about the business.","woocommerce-payments"),Object(l.dateI18n)("ga M j, Y",m()(1e3*n))),{a:Object(c.createElement)("a",{href:o})}):"restricted"===t&&r?a=Object(p.a)(Object(u.__)("Payments and deposits are disabled for this account until missing business information is updated. <a>Update now</a>","woocommerce-payments"),{a:Object(c.createElement)("a",{href:o})}):"restricted"===t?a=Object(u.__)("Payments and deposits are disabled for this account until business information is verified by the payment processor.","woocommerce-payments"):"rejected.fraud"===t?a=Object(u.__)("This account has been rejected because of suspected fraudulent activity.","woocommerce-payments"):"rejected.terms_of_service"===t?a=Object(u.__)("This account has been rejected due to a Terms of Service violation.","woocommerce-payments"):t.startsWith("rejected")&&(a=Object(u.__)("This account has been rejected.","woocommerce-payments")),a?Object(c.createElement)("div",{className:"account-status__desc"},a):null}(o))});Object(s.addFilter)("woocommerce_admin_notices_to_show","plugin-domain",function(e){return[].concat(o()(e),[["wcpay-test-mode-notice",null,null],[null,["wcpay-settings-notice"],null]])}),i.a.render(Object(c.createElement)(_,wcpayAdminSettings),document.getElementById("wcpay-account-status-container"))},8:function(e,t){!function(){e.exports=this.wp.date}()}}));
|
1 |
+
!function(e,t){for(var n in t)e[n]=t[n]}(this,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=64)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},20:function(e,t,n){"use strict";var r=n(0),o=(n(27),["primary","light","warning","alert"]);t.a=function(e){var t=e.message,n=e.type,c=e.isCompact,a=["chip","chip-".concat(o.find(function(e){return e===n})||"primary"),c?"is-compact":""];return Object(r.createElement)("span",{className:a.join(" ").trim()},t)}},27:function(e,t,n){},29:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,c=(e.icon,e.className),i=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-checkmark-circle",c,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:s,height:n,width:n,onClick:o},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})))};var o,c=n(12),a=(o=c)&&o.__esModule?o:{default:o};e.exports=t.default},30:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,o=void 0===n?24:n,c=e.onClick,i=(e.icon,e.className),s=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-notice",i,(t=o,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:u,height:o,width:o,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})))};var o,c=n(12),a=(o=c)&&o.__esModule?o:{default:o};e.exports=t.default},36:function(e,t){!function(){e.exports=this.ReactDOM}()},6:function(e,t){!function(){e.exports=this.moment}()},61:function(e,t,n){},63:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s,u,l,f,m=n(12),p=/<(\/)?(\w+)\s*(\/)?>/g;function d(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var b=function(e){var t="object"===a(e),n=t&&Object.values(e);return t&&n.length&&n.every(function(e){return Object(m.isValidElement)(e)})};function y(e){var t=function(){var e=p.exec(s);if(null===e)return["no-more-tokens"];var t=e.index,n=c(e,4),r=n[0],o=n[1],a=n[2],i=n[3],u=r.length;if(i)return["self-closed",a,t,u];if(o)return["closer",a,t,u];return["opener",a,t,u]}(),n=c(t,4),r=n[0],o=n[1],a=n[2],b=n[3],y=f.length,_=a>u?u:null;if(!e[o])return h(),!1;switch(r){case"no-more-tokens":if(0!==y){var j=f.pop(),O=j.leadingTextStart,w=j.tokenStart;l.push(s.substr(O,w))}return h(),!1;case"self-closed":return 0===y?(null!==_&&l.push(s.substr(_,a-_)),l.push(e[o]),u=a+b,!0):(v(new d(e[o],a,b)),u=a+b,!0);case"opener":return f.push(new d(e[o],a,b,a+b,_)),u=a+b,!0;case"closer":if(1===y)return function(e){var t=f.pop(),n=t.element,r=t.leadingTextStart,o=t.prevOffset,c=t.tokenStart,a=t.children,u=e?s.substr(o,e-o):s.substr(o);u&&a.push(u);null!==r&&l.push(s.substr(r,c-r));l.push(m.cloneElement.apply(void 0,[n,null].concat(i(a))))}(a),u=a+b,!0;var g=f.pop(),E=s.substr(g.prevOffset,a-g.prevOffset);g.children.push(E),g.prevOffset=a+b;var S=new d(g.element,g.tokenStart,g.tokenLength,a+b);return S.children=g.children,v(S),u=a+b,!0;default:return h(),!1}}function h(){var e=s.length-u;0!==e&&l.push(s.substr(u,e))}function v(e){var t=e.element,n=e.tokenStart,r=e.tokenLength,o=e.prevOffset,c=e.children,a=f[f.length-1],u=s.substr(a.prevOffset,n-a.prevOffset);u&&a.children.push(u),a.children.push(m.cloneElement.apply(void 0,[t,null].concat(i(c)))),a.prevOffset=o||n+r}t.a=function(e,t){if(s=e,u=0,l=[],f=[],p.lastIndex=0,!b(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(y(t));return m.createElement.apply(void 0,[m.Fragment,null].concat(i(l)))}},64:function(e,t,n){"use strict";n.r(t);var r=n(0),o=(n(12),n(36)),c=n.n(o),a=n(1),i=n(8),s=n(6),u=n.n(s),l=n(63),f=n(29),m=n.n(f),p=n(30),d=n.n(p),b=n(20),y=(n(61),function(e){var t,n,o,c=e.accountStatus;return c.error?Object(r.createElement)("div",null,Object(a.__)("Error determining the connection status.")):Object(r.createElement)("div",null,Object(r.createElement)("div",null,(t=c.status,n=Object(a.__)("Unknown","woocommerce-payments"),o="light","complete"===t?(n=Object(a.__)("Complete","woocommerce-payments"),o="primary"):"restricted_soon"===t?(n=Object(a.__)("Restricted soon","woocommerce-payments"),o="warning"):"restricted"===t?(n=Object(a.__)("Restricted","woocommerce-payments"),o="alert"):t.startsWith("rejected")&&(n=Object(a.__)("Rejected","woocommerce-payments"),o="light"),Object(r.createElement)(b.a,{message:n,type:o,isCompact:!0})),function(e){var t,n,o;return e?(n=Object(a.__)("Enabled","woocommerce-payments"),o=Object(r.createElement)(m.a,{size:18}),t="account-status__info__green"):(n=Object(a.__)("Disabled","woocommerce-payments"),o=Object(r.createElement)(d.a,{size:18}),t="account-status__info__red"),Object(r.createElement)("span",{className:"account-status__info"},Object(a.__)("Payments:","woocommerce-payments"),Object(r.createElement)("span",{className:t},o,n))}(c.paymentsEnabled),function(e){var t,n="account-status__info__green",o=Object(r.createElement)(m.a,{size:18});return"disabled"===e?(t=Object(a.__)("Disabled","woocommerce-payments"),n="account-status__info__red",o=Object(r.createElement)(d.a,{size:18})):t="daily"===e?Object(a.__)("Daily","woocommerce-payments"):"weekly"===e?Object(a.__)("Weekly","woocommerce-payments"):"monthly"===e?Object(a.__)("Monthly","woocommerce-payments"):"manual"===e?Object(a.__)("Manual","woocommerce-payments"):Object(a.__)("Unknown","woocommerce-payments"),Object(r.createElement)("span",{className:"account-status__info"},Object(a.__)("Deposits:","woocommerce-payments"),Object(r.createElement)("span",{className:n},o,t))}(c.depositsStatus)),function(e){var t=e.status,n=e.currentDeadline,o=e.pastDue,c=e.accountLink;if("complete"===t)return"";var s="";return"restricted_soon"===t?s=Object(l.a)(Object(a.sprintf)(Object(a.__)("To avoid disrupting deposits, <a>update this account</a> by %s with more information about the business.","woocommerce-payments"),Object(i.dateI18n)("ga M j, Y",u()(1e3*n))),{a:Object(r.createElement)("a",{href:c})}):"restricted"===t&&o?s=Object(l.a)(Object(a.__)("Payments and deposits are disabled for this account until missing business information is updated. <a>Update now</a>","woocommerce-payments"),{a:Object(r.createElement)("a",{href:c})}):"restricted"===t?s=Object(a.__)("Payments and deposits are disabled for this account until business information is verified by the payment processor.","woocommerce-payments"):"rejected.fraud"===t?s=Object(a.__)("This account has been rejected because of suspected fraudulent activity.","woocommerce-payments"):"rejected.terms_of_service"===t?s=Object(a.__)("This account has been rejected due to a Terms of Service violation.","woocommerce-payments"):t.startsWith("rejected")&&(s=Object(a.__)("This account has been rejected.","woocommerce-payments")),s?Object(r.createElement)("div",{className:"account-status__desc"},s):null}(c))});c.a.render(Object(r.createElement)(y,wcpayAdminSettings),document.getElementById("wcpay-account-status-container"))},8:function(e,t){!function(){e.exports=this.wp.date}()}}));
|
includes/admin/class-wc-payments-admin.php
CHANGED
@@ -38,7 +38,6 @@ class WC_Payments_Admin {
|
|
38 |
|
39 |
// Add menu items.
|
40 |
add_action( 'admin_menu', [ $this, 'add_payments_menu' ], 9 );
|
41 |
-
add_action( 'init', [ $this, 'register_payments_scripts' ] );
|
42 |
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_payments_scripts' ] );
|
43 |
}
|
44 |
|
@@ -175,6 +174,9 @@ class WC_Payments_Admin {
|
|
175 |
// as appropriate.
|
176 |
$on_boarding_disabled = WC_Payments_Account::is_on_boarding_disabled();
|
177 |
|
|
|
|
|
|
|
178 |
wp_localize_script(
|
179 |
'WCPAY_DASH_APP',
|
180 |
'wcpaySettings',
|
@@ -182,6 +184,7 @@ class WC_Payments_Admin {
|
|
182 |
'connectUrl' => WC_Payments_Account::get_connect_url(),
|
183 |
'testMode' => $this->wcpay_gateway->is_in_test_mode(),
|
184 |
'onBoardingDisabled' => $on_boarding_disabled,
|
|
|
185 |
]
|
186 |
);
|
187 |
|
@@ -235,6 +238,8 @@ class WC_Payments_Admin {
|
|
235 |
* Load the assets
|
236 |
*/
|
237 |
public function enqueue_payments_scripts() {
|
|
|
|
|
238 |
global $current_tab, $current_section;
|
239 |
if ( $current_tab && $current_section
|
240 |
&& 'checkout' === $current_tab
|
38 |
|
39 |
// Add menu items.
|
40 |
add_action( 'admin_menu', [ $this, 'add_payments_menu' ], 9 );
|
|
|
41 |
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_payments_scripts' ] );
|
42 |
}
|
43 |
|
174 |
// as appropriate.
|
175 |
$on_boarding_disabled = WC_Payments_Account::is_on_boarding_disabled();
|
176 |
|
177 |
+
$error_message = get_transient( WC_Payments_Account::ERROR_MESSAGE_TRANSIENT );
|
178 |
+
delete_transient( WC_Payments_Account::ERROR_MESSAGE_TRANSIENT );
|
179 |
+
|
180 |
wp_localize_script(
|
181 |
'WCPAY_DASH_APP',
|
182 |
'wcpaySettings',
|
184 |
'connectUrl' => WC_Payments_Account::get_connect_url(),
|
185 |
'testMode' => $this->wcpay_gateway->is_in_test_mode(),
|
186 |
'onBoardingDisabled' => $on_boarding_disabled,
|
187 |
+
'errorMessage' => $error_message,
|
188 |
]
|
189 |
);
|
190 |
|
238 |
* Load the assets
|
239 |
*/
|
240 |
public function enqueue_payments_scripts() {
|
241 |
+
$this->register_payments_scripts();
|
242 |
+
|
243 |
global $current_tab, $current_section;
|
244 |
if ( $current_tab && $current_section
|
245 |
&& 'checkout' === $current_tab
|
includes/class-wc-payment-gateway-wcpay.php
CHANGED
@@ -256,7 +256,10 @@ class WC_Payment_Gateway_WCPay extends WC_Payment_Gateway_CC {
|
|
256 |
|
257 |
// Register Stripe's JavaScript using the same ID as the Stripe Gateway plugin. This prevents this JS being
|
258 |
// loaded twice in the event a site has both plugins enabled. We still run the risk of different plugins
|
259 |
-
// loading different versions however.
|
|
|
|
|
|
|
260 |
wp_register_script(
|
261 |
'stripe',
|
262 |
'https://js.stripe.com/v3/',
|
@@ -391,6 +394,12 @@ class WC_Payment_Gateway_WCPay extends WC_Payment_Gateway_CC {
|
|
391 |
wc_price( $amount ),
|
392 |
$intent_id
|
393 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
$order->add_order_note( $note );
|
395 |
$order->payment_complete( $intent_id );
|
396 |
break;
|
@@ -407,8 +416,15 @@ class WC_Payment_Gateway_WCPay extends WC_Payment_Gateway_CC {
|
|
407 |
wc_price( $amount ),
|
408 |
$intent_id
|
409 |
);
|
|
|
410 |
$order->update_status( 'on-hold', $note );
|
411 |
$order->set_transaction_id( $intent_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
break;
|
413 |
case 'requires_action':
|
414 |
// Add a note in case the customer does not complete the payment (exits the page),
|
@@ -436,11 +452,6 @@ class WC_Payment_Gateway_WCPay extends WC_Payment_Gateway_CC {
|
|
436 |
'redirect' => sprintf( '#wcpay-confirm-pi:%s:%s', $order_id, $intent->get_client_secret() ),
|
437 |
];
|
438 |
}
|
439 |
-
|
440 |
-
$order->update_meta_data( '_intent_id', $intent_id );
|
441 |
-
$order->update_meta_data( '_charge_id', $intent->get_charge_id() );
|
442 |
-
$order->update_meta_data( '_intention_status', $status );
|
443 |
-
$order->save();
|
444 |
} else {
|
445 |
$order->payment_complete();
|
446 |
}
|
256 |
|
257 |
// Register Stripe's JavaScript using the same ID as the Stripe Gateway plugin. This prevents this JS being
|
258 |
// loaded twice in the event a site has both plugins enabled. We still run the risk of different plugins
|
259 |
+
// loading different versions however. If Stripe release a v4 of their JavaScript, we could consider
|
260 |
+
// changing the ID to stripe_v4. This would allow older plugins to keep using v3 while we used any new
|
261 |
+
// feature in v4. Stripe have allowed loading of 2 different versions of stripe.js in the past (
|
262 |
+
// https://stripe.com/docs/stripe-js/elements/migrating).
|
263 |
wp_register_script(
|
264 |
'stripe',
|
265 |
'https://js.stripe.com/v3/',
|
394 |
wc_price( $amount ),
|
395 |
$intent_id
|
396 |
);
|
397 |
+
|
398 |
+
$order->update_meta_data( '_intent_id', $intent_id );
|
399 |
+
$order->update_meta_data( '_charge_id', $intent->get_charge_id() );
|
400 |
+
$order->update_meta_data( '_intention_status', $status );
|
401 |
+
$order->save();
|
402 |
+
|
403 |
$order->add_order_note( $note );
|
404 |
$order->payment_complete( $intent_id );
|
405 |
break;
|
416 |
wc_price( $amount ),
|
417 |
$intent_id
|
418 |
);
|
419 |
+
|
420 |
$order->update_status( 'on-hold', $note );
|
421 |
$order->set_transaction_id( $intent_id );
|
422 |
+
|
423 |
+
$order->update_meta_data( '_intent_id', $intent_id );
|
424 |
+
$order->update_meta_data( '_charge_id', $intent->get_charge_id() );
|
425 |
+
$order->update_meta_data( '_intention_status', $status );
|
426 |
+
$order->save();
|
427 |
+
|
428 |
break;
|
429 |
case 'requires_action':
|
430 |
// Add a note in case the customer does not complete the payment (exits the page),
|
452 |
'redirect' => sprintf( '#wcpay-confirm-pi:%s:%s', $order_id, $intent->get_client_secret() ),
|
453 |
];
|
454 |
}
|
|
|
|
|
|
|
|
|
|
|
455 |
} else {
|
456 |
$order->payment_complete();
|
457 |
}
|
includes/class-wc-payments-account.php
CHANGED
@@ -18,6 +18,7 @@ class WC_Payments_Account {
|
|
18 |
|
19 |
const ACCOUNT_TRANSIENT = 'wcpay_account_data';
|
20 |
const ON_BOARDING_DISABLED_TRANSIENT = 'wcpay_on_boarding_disabled';
|
|
|
21 |
|
22 |
/**
|
23 |
* Client for making requests to the WooCommerce Payments API
|
@@ -37,6 +38,14 @@ class WC_Payments_Account {
|
|
37 |
add_action( 'admin_init', [ $this, 'maybe_handle_oauth' ] );
|
38 |
add_action( 'admin_init', [ $this, 'check_stripe_account_status' ] );
|
39 |
add_filter( 'allowed_redirect_hosts', [ $this, 'allowed_redirect_hosts' ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -155,8 +164,14 @@ class WC_Payments_Account {
|
|
155 |
/**
|
156 |
* Utility function to immediately redirect to the main "Welcome to WooCommerce Payments" onboarding page.
|
157 |
* Note that this function immediately ends the execution.
|
|
|
|
|
158 |
*/
|
159 |
-
private function redirect_to_onboarding_page() {
|
|
|
|
|
|
|
|
|
160 |
$params = [
|
161 |
'page' => 'wc-admin',
|
162 |
'path' => '/payments/connect',
|
@@ -239,14 +254,33 @@ class WC_Payments_Account {
|
|
239 |
$message = __( 'Thanks for verifying your business details!', 'woocommerce-payments' );
|
240 |
}
|
241 |
$this->add_notice_to_settings_page( $message, 'notice-success' );
|
|
|
242 |
}
|
243 |
|
244 |
if ( isset( $_GET['wcpay-connect'] ) && check_admin_referer( 'wcpay-connect' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
try {
|
246 |
-
$
|
247 |
-
$this->init_oauth( $wcpay_connect_param );
|
248 |
} catch ( Exception $e ) {
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
$this->add_notice_to_settings_page(
|
251 |
__( 'There was a problem redirecting you to the account connection page. Please try again.', 'woocommerce-payments' ),
|
252 |
'notice-error'
|
@@ -300,12 +334,35 @@ class WC_Payments_Account {
|
|
300 |
return get_transient( self::ON_BOARDING_DISABLED_TRANSIENT );
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
/**
|
304 |
* For the connected account, fetches the login url from the API and redirects to it
|
305 |
*/
|
306 |
private function redirect_to_login() {
|
307 |
// Clear account transient when generating Stripe dashboard's login link.
|
308 |
-
|
309 |
|
310 |
$login_data = $this->payments_api_client->get_login_data( WC_Payment_Gateway_WCPay::get_settings_url() );
|
311 |
wp_safe_redirect( $login_data['url'] );
|
@@ -313,28 +370,37 @@ class WC_Payments_Account {
|
|
313 |
}
|
314 |
|
315 |
/**
|
316 |
-
*
|
317 |
*
|
318 |
-
* @param string $wcpay_connect_from - where the user should be returned to after connecting.
|
|
|
319 |
*/
|
320 |
-
private function
|
321 |
-
// Clear account transient when generating Stripe's oauth data.
|
322 |
-
delete_transient( self::ACCOUNT_TRANSIENT );
|
323 |
-
|
324 |
-
$current_user = wp_get_current_user();
|
325 |
-
|
326 |
// Usually the return URL is the WCPay plugin settings page.
|
327 |
// But if connection originated on the WCADMIN payment task page, return there.
|
328 |
-
|
329 |
-
|
330 |
-
$return_url = add_query_arg(
|
331 |
[
|
332 |
-
'page'
|
333 |
-
'task'
|
|
|
334 |
],
|
335 |
admin_url( 'admin.php' )
|
336 |
-
)
|
337 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
|
339 |
$oauth_data = $this->payments_api_client->get_oauth_data(
|
340 |
$return_url,
|
@@ -357,7 +423,7 @@ class WC_Payments_Account {
|
|
357 |
exit;
|
358 |
}
|
359 |
|
360 |
-
set_transient( '
|
361 |
|
362 |
wp_safe_redirect( $oauth_data['url'] );
|
363 |
exit;
|
@@ -370,15 +436,15 @@ class WC_Payments_Account {
|
|
370 |
* @param string $mode Mode in which this account has been connected. Either 'test' or 'live'.
|
371 |
*/
|
372 |
private function finalize_connection( $state, $mode ) {
|
373 |
-
if ( get_transient( '
|
374 |
$this->add_notice_to_settings_page(
|
375 |
__( 'There was a problem processing your account data. Please try again.', 'woocommerce-payments' ),
|
376 |
'notice-error'
|
377 |
);
|
378 |
return;
|
379 |
}
|
380 |
-
delete_transient( '
|
381 |
-
|
382 |
|
383 |
WC_Payments::get_gateway()->update_option( 'enabled', 'yes' );
|
384 |
WC_Payments::get_gateway()->update_option( 'test_mode', 'test' === $mode ? 'yes' : 'no' );
|
@@ -406,6 +472,10 @@ class WC_Payments_Account {
|
|
406 |
* @throws WC_Payments_API_Exception Bubbles up if get_account_data call fails.
|
407 |
*/
|
408 |
private function get_cached_account_data() {
|
|
|
|
|
|
|
|
|
409 |
$account = get_transient( self::ACCOUNT_TRANSIENT );
|
410 |
|
411 |
if ( $this->is_valid_cached_account( $account ) ) {
|
18 |
|
19 |
const ACCOUNT_TRANSIENT = 'wcpay_account_data';
|
20 |
const ON_BOARDING_DISABLED_TRANSIENT = 'wcpay_on_boarding_disabled';
|
21 |
+
const ERROR_MESSAGE_TRANSIENT = 'wcpay_error_message';
|
22 |
|
23 |
/**
|
24 |
* Client for making requests to the WooCommerce Payments API
|
38 |
add_action( 'admin_init', [ $this, 'maybe_handle_oauth' ] );
|
39 |
add_action( 'admin_init', [ $this, 'check_stripe_account_status' ] );
|
40 |
add_filter( 'allowed_redirect_hosts', [ $this, 'allowed_redirect_hosts' ] );
|
41 |
+
add_action( 'jetpack_site_registered', [ $this, 'clear_cache' ] );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Wipes the account transient, forcing to re-fetch the account status from WP.com.
|
46 |
+
*/
|
47 |
+
public function clear_cache() {
|
48 |
+
delete_transient( self::ACCOUNT_TRANSIENT );
|
49 |
}
|
50 |
|
51 |
/**
|
164 |
/**
|
165 |
* Utility function to immediately redirect to the main "Welcome to WooCommerce Payments" onboarding page.
|
166 |
* Note that this function immediately ends the execution.
|
167 |
+
*
|
168 |
+
* @param string $error_message Optional error message to show in a notice.
|
169 |
*/
|
170 |
+
private function redirect_to_onboarding_page( $error_message = null ) {
|
171 |
+
if ( isset( $error_message ) ) {
|
172 |
+
set_transient( self::ERROR_MESSAGE_TRANSIENT, $error_message, 30 );
|
173 |
+
}
|
174 |
+
|
175 |
$params = [
|
176 |
'page' => 'wc-admin',
|
177 |
'path' => '/payments/connect',
|
254 |
$message = __( 'Thanks for verifying your business details!', 'woocommerce-payments' );
|
255 |
}
|
256 |
$this->add_notice_to_settings_page( $message, 'notice-success' );
|
257 |
+
return;
|
258 |
}
|
259 |
|
260 |
if ( isset( $_GET['wcpay-connect'] ) && check_admin_referer( 'wcpay-connect' ) ) {
|
261 |
+
$wcpay_connect_param = sanitize_text_field( wp_unslash( $_GET['wcpay-connect'] ) );
|
262 |
+
|
263 |
+
if ( ! $this->payments_api_client->is_server_connected() && isset( $_GET['wcpay-connect-jetpack-success'] ) ) {
|
264 |
+
$this->redirect_to_onboarding_page(
|
265 |
+
__( 'Connection to WordPress.com failed. Please connect to WordPress.com to start using WooCommerce Payments.', 'woocommerce-payments' )
|
266 |
+
);
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
|
270 |
try {
|
271 |
+
$this->maybe_init_jetpack_connection( $wcpay_connect_param );
|
|
|
272 |
} catch ( Exception $e ) {
|
273 |
+
$this->redirect_to_onboarding_page(
|
274 |
+
/* translators: error message. */
|
275 |
+
sprintf( __( 'There was a problem connecting this site to WordPress.com: "%s"', 'woocommerce-payments' ), $e->getMessage() )
|
276 |
+
);
|
277 |
+
return;
|
278 |
+
}
|
279 |
+
|
280 |
+
try {
|
281 |
+
$this->init_stripe_oauth( $wcpay_connect_param );
|
282 |
+
} catch ( Exception $e ) {
|
283 |
+
Logger::error( 'Init Stripe oauth flow failed. ' . $e );
|
284 |
$this->add_notice_to_settings_page(
|
285 |
__( 'There was a problem redirecting you to the account connection page. Please try again.', 'woocommerce-payments' ),
|
286 |
'notice-error'
|
334 |
return get_transient( self::ON_BOARDING_DISABLED_TRANSIENT );
|
335 |
}
|
336 |
|
337 |
+
/**
|
338 |
+
* Starts the Jetpack connection flow if it's not already fully connected.
|
339 |
+
*
|
340 |
+
* @param string $wcpay_connect_from - where the user should be returned to after connecting.
|
341 |
+
* @throws WC_Payments_API_Exception If there was an error when registering the site on WP.com.
|
342 |
+
*/
|
343 |
+
private function maybe_init_jetpack_connection( $wcpay_connect_from ) {
|
344 |
+
$is_jetpack_fully_connected = $this->payments_api_client->is_server_connected();
|
345 |
+
if ( $is_jetpack_fully_connected ) {
|
346 |
+
return;
|
347 |
+
}
|
348 |
+
|
349 |
+
$redirect = add_query_arg(
|
350 |
+
[
|
351 |
+
'wcpay-connect' => $wcpay_connect_from,
|
352 |
+
'wcpay-connect-jetpack-success' => '1',
|
353 |
+
'_wpnonce' => wp_create_nonce( 'wcpay-connect' ),
|
354 |
+
],
|
355 |
+
$this->get_oauth_return_url( $wcpay_connect_from )
|
356 |
+
);
|
357 |
+
$this->payments_api_client->start_server_connection( $redirect );
|
358 |
+
}
|
359 |
+
|
360 |
/**
|
361 |
* For the connected account, fetches the login url from the API and redirects to it
|
362 |
*/
|
363 |
private function redirect_to_login() {
|
364 |
// Clear account transient when generating Stripe dashboard's login link.
|
365 |
+
$this->clear_cache();
|
366 |
|
367 |
$login_data = $this->payments_api_client->get_login_data( WC_Payment_Gateway_WCPay::get_settings_url() );
|
368 |
wp_safe_redirect( $login_data['url'] );
|
370 |
}
|
371 |
|
372 |
/**
|
373 |
+
* Builds the URL to return the user to after the Jetpack/OAuth flow.
|
374 |
*
|
375 |
+
* @param string $wcpay_connect_from - Constant to decide where the user should be returned to after connecting.
|
376 |
+
* @return string
|
377 |
*/
|
378 |
+
private function get_oauth_return_url( $wcpay_connect_from ) {
|
|
|
|
|
|
|
|
|
|
|
379 |
// Usually the return URL is the WCPay plugin settings page.
|
380 |
// But if connection originated on the WCADMIN payment task page, return there.
|
381 |
+
return 'WCADMIN_PAYMENT_TASK' === $wcpay_connect_from
|
382 |
+
? add_query_arg(
|
|
|
383 |
[
|
384 |
+
'page' => 'wc-admin',
|
385 |
+
'task' => 'payments',
|
386 |
+
'method' => 'wcpay',
|
387 |
],
|
388 |
admin_url( 'admin.php' )
|
389 |
+
)
|
390 |
+
: WC_Payment_Gateway_WCPay::get_settings_url();
|
391 |
+
}
|
392 |
+
|
393 |
+
/**
|
394 |
+
* Initializes the OAuth flow by fetching the URL from the API and redirecting to it.
|
395 |
+
*
|
396 |
+
* @param string $wcpay_connect_from - where the user should be returned to after connecting.
|
397 |
+
*/
|
398 |
+
private function init_stripe_oauth( $wcpay_connect_from ) {
|
399 |
+
// Clear account transient when generating Stripe's oauth data.
|
400 |
+
$this->clear_cache();
|
401 |
+
|
402 |
+
$current_user = wp_get_current_user();
|
403 |
+
$return_url = $this->get_oauth_return_url( $wcpay_connect_from );
|
404 |
|
405 |
$oauth_data = $this->payments_api_client->get_oauth_data(
|
406 |
$return_url,
|
423 |
exit;
|
424 |
}
|
425 |
|
426 |
+
set_transient( 'wcpay_stripe_oauth_state', $oauth_data['state'], DAY_IN_SECONDS );
|
427 |
|
428 |
wp_safe_redirect( $oauth_data['url'] );
|
429 |
exit;
|
436 |
* @param string $mode Mode in which this account has been connected. Either 'test' or 'live'.
|
437 |
*/
|
438 |
private function finalize_connection( $state, $mode ) {
|
439 |
+
if ( get_transient( 'wcpay_stripe_oauth_state' ) !== $state ) {
|
440 |
$this->add_notice_to_settings_page(
|
441 |
__( 'There was a problem processing your account data. Please try again.', 'woocommerce-payments' ),
|
442 |
'notice-error'
|
443 |
);
|
444 |
return;
|
445 |
}
|
446 |
+
delete_transient( 'wcpay_stripe_oauth_state' );
|
447 |
+
$this->clear_cache();
|
448 |
|
449 |
WC_Payments::get_gateway()->update_option( 'enabled', 'yes' );
|
450 |
WC_Payments::get_gateway()->update_option( 'test_mode', 'test' === $mode ? 'yes' : 'no' );
|
472 |
* @throws WC_Payments_API_Exception Bubbles up if get_account_data call fails.
|
473 |
*/
|
474 |
private function get_cached_account_data() {
|
475 |
+
if ( ! $this->payments_api_client->is_server_connected() ) {
|
476 |
+
return [];
|
477 |
+
}
|
478 |
+
|
479 |
$account = get_transient( self::ACCOUNT_TRANSIENT );
|
480 |
|
481 |
if ( $this->is_valid_cached_account( $account ) ) {
|
includes/class-wc-payments.php
CHANGED
@@ -187,12 +187,6 @@ class WC_Payments {
|
|
187 |
'slug' => 'woocommerce-admin',
|
188 |
'file' => 'woocommerce-admin/woocommerce-admin.php',
|
189 |
],
|
190 |
-
[
|
191 |
-
'name' => 'Jetpack',
|
192 |
-
'class' => 'Jetpack',
|
193 |
-
'slug' => 'jetpack',
|
194 |
-
'file' => 'jetpack/jetpack.php',
|
195 |
-
],
|
196 |
];
|
197 |
|
198 |
// Check if WooCommerce and other dependencies are installed and active.
|
@@ -314,25 +308,6 @@ class WC_Payments {
|
|
314 |
return false;
|
315 |
}
|
316 |
|
317 |
-
// Check if Jetpack is connected.
|
318 |
-
if ( ! self::is_jetpack_connected() ) {
|
319 |
-
// Do not show an alert on Jetpack admin pages.
|
320 |
-
if ( ! $silent && ! self::is_at_jetpack_admin_page() ) {
|
321 |
-
$set_up_url = wp_nonce_url( 'admin.php?page=jetpack' );
|
322 |
-
$message = WC_Payments_Utils::esc_interpolated_html(
|
323 |
-
sprintf(
|
324 |
-
/* translators: %1: WooCommerce Payments version */
|
325 |
-
__( 'To use WooCommerce Payments %1$s you\'ll need to <a>set up</a> the Jetpack plugin.', 'woocommerce-payments' ),
|
326 |
-
WCPAY_VERSION_NUMBER
|
327 |
-
),
|
328 |
-
[ 'a' => '<a href="' . $set_up_url . '">' ]
|
329 |
-
);
|
330 |
-
self::display_admin_error( $message );
|
331 |
-
}
|
332 |
-
|
333 |
-
return false;
|
334 |
-
}
|
335 |
-
|
336 |
return true;
|
337 |
}
|
338 |
|
@@ -346,26 +321,6 @@ class WC_Payments {
|
|
346 |
return 'update' === $cur_screen->id && 'plugins' === $cur_screen->parent_base;
|
347 |
}
|
348 |
|
349 |
-
/**
|
350 |
-
* Checks if current page is Jetpack admin page.
|
351 |
-
*
|
352 |
-
* @return bool True when current page is one of the Jetpack admin pages.
|
353 |
-
*/
|
354 |
-
private static function is_at_jetpack_admin_page() {
|
355 |
-
$cur_screen = get_current_screen();
|
356 |
-
return 'jetpack' === $cur_screen->parent_base;
|
357 |
-
}
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Checks if Jetpack is connected.
|
361 |
-
*
|
362 |
-
* @return bool true if Jetpack connection is available and authenticated.
|
363 |
-
*/
|
364 |
-
public static function is_jetpack_connected() {
|
365 |
-
require_once dirname( __FILE__ ) . '/wc-payment-api/class-wc-payments-http.php';
|
366 |
-
return WC_Payments_Http::is_connected();
|
367 |
-
}
|
368 |
-
|
369 |
/**
|
370 |
* Checks whether Woo Multi-Currency is disabled and displays admin error message if enabled.
|
371 |
* TODO: Once Multi-Currency support is implemented, remove this check.
|
@@ -451,7 +406,7 @@ class WC_Payments {
|
|
451 |
|
452 |
$payments_api_client = new WC_Payments_API_Client(
|
453 |
'WooCommerce Payments/' . WCPAY_VERSION_NUMBER,
|
454 |
-
new WC_Payments_Http(),
|
455 |
self::$db_helper
|
456 |
);
|
457 |
|
187 |
'slug' => 'woocommerce-admin',
|
188 |
'file' => 'woocommerce-admin/woocommerce-admin.php',
|
189 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
];
|
191 |
|
192 |
// Check if WooCommerce and other dependencies are installed and active.
|
308 |
return false;
|
309 |
}
|
310 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
return true;
|
312 |
}
|
313 |
|
321 |
return 'update' === $cur_screen->id && 'plugins' === $cur_screen->parent_base;
|
322 |
}
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
/**
|
325 |
* Checks whether Woo Multi-Currency is disabled and displays admin error message if enabled.
|
326 |
* TODO: Once Multi-Currency support is implemented, remove this check.
|
406 |
|
407 |
$payments_api_client = new WC_Payments_API_Client(
|
408 |
'WooCommerce Payments/' . WCPAY_VERSION_NUMBER,
|
409 |
+
new WC_Payments_Http( new Automattic\Jetpack\Connection\Manager( 'woocommerce-payments' ) ),
|
410 |
self::$db_helper
|
411 |
);
|
412 |
|
includes/wc-payment-api/class-wc-payments-api-client.php
CHANGED
@@ -67,6 +67,47 @@ class WC_Payments_API_Client {
|
|
67 |
$this->wcpay_db = $wcpay_db;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* Create an intention, and automatically confirm it.
|
72 |
*
|
67 |
$this->wcpay_db = $wcpay_db;
|
68 |
}
|
69 |
|
70 |
+
/**
|
71 |
+
* Whether the site can communicate with the WCPay server (i.e. Jetpack connection has been established).
|
72 |
+
*
|
73 |
+
* @return bool
|
74 |
+
*/
|
75 |
+
public function is_server_connected() {
|
76 |
+
return $this->http_client->is_connected();
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Starts the Jetpack connection process. Note that running this function will immediately redirect
|
81 |
+
* to the Jetpack flow, so any PHP code after it will never be executed.
|
82 |
+
*
|
83 |
+
* @param string $redirect - URL to redirect to after the connection process is over.
|
84 |
+
*
|
85 |
+
* @throws WC_Payments_API_Exception - Exception thrown on failure.
|
86 |
+
*/
|
87 |
+
public function start_server_connection( $redirect ) {
|
88 |
+
$this->http_client->start_connection( $redirect );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Create a charge
|
93 |
+
*
|
94 |
+
* @param int $amount - Amount to charge.
|
95 |
+
* @param string $source_id - ID of the source to associate with charge.
|
96 |
+
*
|
97 |
+
* @return WC_Payments_API_Charge
|
98 |
+
* @throws WC_Payments_API_Exception - Exception thrown on payment failure.
|
99 |
+
*/
|
100 |
+
public function create_charge( $amount, $source_id ) {
|
101 |
+
|
102 |
+
$request = [];
|
103 |
+
$request['amount'] = $amount;
|
104 |
+
$request['source'] = $source_id;
|
105 |
+
|
106 |
+
$response_array = $this->request( $request, self::CHARGES_API, self::POST );
|
107 |
+
|
108 |
+
return $this->deserialize_charge_object_from_array( $response_array );
|
109 |
+
}
|
110 |
+
|
111 |
/**
|
112 |
* Create an intention, and automatically confirm it.
|
113 |
*
|
includes/wc-payment-api/class-wc-payments-http.php
CHANGED
@@ -17,7 +17,25 @@ use WCPay\Logger;
|
|
17 |
class WC_Payments_Http {
|
18 |
|
19 |
/**
|
20 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
*
|
22 |
* @param array $args - The arguments to passed to Jetpack.
|
23 |
* @param string $body - The body passed on to the HTTP request.
|
@@ -27,23 +45,24 @@ class WC_Payments_Http {
|
|
27 |
* @throws WC_Payments_API_Exception - If not connected or request failed.
|
28 |
*/
|
29 |
public function remote_request( $args, $body = null, $is_site_specific = true ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$args['blog_id'] = Jetpack_Options::get_option( 'id' );
|
31 |
-
$args['user_id'] = JETPACK_MASTER_USER;
|
32 |
|
33 |
if ( $is_site_specific ) {
|
|
|
34 |
$url = explode( '?', $args['url'], 2 );
|
35 |
$url[0] = sprintf( $url[0], $args['blog_id'] );
|
36 |
-
$args['url'] =
|
37 |
-
}
|
38 |
-
|
39 |
-
// Make sure we're not sendign requests if Jetpack is not connected.
|
40 |
-
if ( ! self::is_connected() ) {
|
41 |
-
Logger::error( 'HTTP_REQUEST_ERROR Jetpack is not connected' );
|
42 |
-
throw new WC_Payments_API_Exception(
|
43 |
-
__( 'Jetpack is not connected', 'woocommerce-payments' ),
|
44 |
-
'wcpay_jetpack_not_connected',
|
45 |
-
409 // HTTP Conflict status code.
|
46 |
-
);
|
47 |
}
|
48 |
|
49 |
return self::make_request( $args, $body );
|
@@ -59,13 +78,7 @@ class WC_Payments_Http {
|
|
59 |
* @throws WC_Payments_API_Exception - If request returns WP_Error.
|
60 |
*/
|
61 |
private static function make_request( $args, $body ) {
|
62 |
-
$response =
|
63 |
-
// TODO: Either revamp this auth before releasing WCPay, or properly check that Jetpack is installed & connected.
|
64 |
-
if ( class_exists( 'Automattic\Jetpack\Connection\Client' ) ) {
|
65 |
-
$response = Automattic\Jetpack\Connection\Client::remote_request( $args, $body );
|
66 |
-
} else {
|
67 |
-
$response = Jetpack_Client::remote_request( $args, $body );
|
68 |
-
}
|
69 |
|
70 |
if ( is_wp_error( $response ) ) {
|
71 |
Logger::error( 'HTTP_REQUEST_ERROR ' . var_export( $response, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
|
@@ -87,16 +100,52 @@ class WC_Payments_Http {
|
|
87 |
*
|
88 |
* @return bool true if Jetpack connection has access token.
|
89 |
*/
|
90 |
-
public
|
91 |
-
|
92 |
-
|
93 |
-
}
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
}
|
17 |
class WC_Payments_Http {
|
18 |
|
19 |
/**
|
20 |
+
* Jetpack connection handler.
|
21 |
+
*
|
22 |
+
* @var Automattic\Jetpack\Connection\Manager
|
23 |
+
*/
|
24 |
+
private $connection_manager;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* WC_Payments_Http constructor.
|
28 |
+
*
|
29 |
+
* @param Automattic\Jetpack\Connection\Manager $connection_manager - Jetpack connection handler.
|
30 |
+
*/
|
31 |
+
public function __construct( $connection_manager ) {
|
32 |
+
$this->connection_manager = $connection_manager;
|
33 |
+
|
34 |
+
add_filter( 'allowed_redirect_hosts', [ $this, 'allowed_redirect_hosts' ] );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Sends a remote request through Jetpack.
|
39 |
*
|
40 |
* @param array $args - The arguments to passed to Jetpack.
|
41 |
* @param string $body - The body passed on to the HTTP request.
|
45 |
* @throws WC_Payments_API_Exception - If not connected or request failed.
|
46 |
*/
|
47 |
public function remote_request( $args, $body = null, $is_site_specific = true ) {
|
48 |
+
// Make sure we're not sending requests if Jetpack is not connected.
|
49 |
+
if ( ! $this->is_connected() ) {
|
50 |
+
Logger::error( 'HTTP_REQUEST_ERROR Site is not connected to WordPress.com' );
|
51 |
+
throw new WC_Payments_API_Exception(
|
52 |
+
__( 'Site is not connected to WordPress.com', 'woocommerce-payments' ),
|
53 |
+
'wcpay_wpcom_not_connected',
|
54 |
+
409 // HTTP Conflict status code.
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
$args['blog_id'] = Jetpack_Options::get_option( 'id' );
|
59 |
+
$args['user_id'] = Automattic\Jetpack\Connection\Manager::JETPACK_MASTER_USER;
|
60 |
|
61 |
if ( $is_site_specific ) {
|
62 |
+
// We expect `url` to include a `%s` placeholder which will allow us inject the blog id.
|
63 |
$url = explode( '?', $args['url'], 2 );
|
64 |
$url[0] = sprintf( $url[0], $args['blog_id'] );
|
65 |
+
$args['url'] = implode( '?', $url );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
return self::make_request( $args, $body );
|
78 |
* @throws WC_Payments_API_Exception - If request returns WP_Error.
|
79 |
*/
|
80 |
private static function make_request( $args, $body ) {
|
81 |
+
$response = Automattic\Jetpack\Connection\Client::remote_request( $args, $body );
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
if ( is_wp_error( $response ) ) {
|
84 |
Logger::error( 'HTTP_REQUEST_ERROR ' . var_export( $response, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
|
100 |
*
|
101 |
* @return bool true if Jetpack connection has access token.
|
102 |
*/
|
103 |
+
public function is_connected() {
|
104 |
+
return $this->connection_manager->is_active();
|
105 |
+
}
|
|
|
106 |
|
107 |
+
/**
|
108 |
+
* Starts the Jetpack connection process. Note that running this function will immediately redirect
|
109 |
+
* to the Jetpack flow, so any PHP code after it will never be executed.
|
110 |
+
*
|
111 |
+
* @param string $redirect - URL to redirect to after the connection process is over.
|
112 |
+
*
|
113 |
+
* @throws WC_Payments_API_Exception - Exception thrown on failure.
|
114 |
+
*/
|
115 |
+
public function start_connection( $redirect ) {
|
116 |
+
// First, register the site to wp.com.
|
117 |
+
if ( ! $this->connection_manager->get_access_token() ) {
|
118 |
+
$result = $this->connection_manager->register();
|
119 |
+
if ( is_wp_error( $result ) ) {
|
120 |
+
throw new WC_Payments_API_Exception( $result->get_error_message(), 'wcpay_jetpack_register_site_failed', 500 );
|
121 |
+
}
|
122 |
}
|
123 |
|
124 |
+
// Second, redirect the user to the Jetpack user connection flow.
|
125 |
+
add_filter( 'jetpack_use_iframe_authorization_flow', '__return_false' );
|
126 |
+
// Same logic as in WC-Admin.
|
127 |
+
$calypso_env = defined( 'WOOCOMMERCE_CALYPSO_ENVIRONMENT' ) && in_array( WOOCOMMERCE_CALYPSO_ENVIRONMENT, [ 'development', 'wpcalypso', 'horizon', 'stage' ], true ) ? WOOCOMMERCE_CALYPSO_ENVIRONMENT : 'production';
|
128 |
+
wp_safe_redirect(
|
129 |
+
add_query_arg(
|
130 |
+
[
|
131 |
+
'from' => 'woocommerce-payments',
|
132 |
+
'calypso_env' => $calypso_env,
|
133 |
+
],
|
134 |
+
$this->connection_manager->get_authorization_url( null, $redirect )
|
135 |
+
)
|
136 |
+
);
|
137 |
+
exit;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Filter function to add WP.com to the list of allowed redirect hosts
|
142 |
+
*
|
143 |
+
* @param array $hosts - array of allowed hosts.
|
144 |
+
*
|
145 |
+
* @return array allowed hosts
|
146 |
+
*/
|
147 |
+
public function allowed_redirect_hosts( $hosts ) {
|
148 |
+
$hosts[] = 'jetpack.wordpress.com';
|
149 |
+
return $hosts;
|
150 |
}
|
151 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, payment, payment request, credit card, automattic
|
|
4 |
Requires at least: 5.3
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -41,7 +41,6 @@ Our global support team is available to answer questions you may have about WooC
|
|
41 |
* United States-based business.
|
42 |
* WordPress 5.3 or newer.
|
43 |
* WooCommerce 4.0 or newer.
|
44 |
-
* [Jetpack](http://wordpress.org/plugins/jetpack) 5.3 or newer.
|
45 |
* PHP version 7.0 or newer. PHP 7.2 or newer is recommended.
|
46 |
|
47 |
= Try it now =
|
@@ -50,14 +49,7 @@ To try WooCommerce Payments on your store, simply [install it](https://wordpress
|
|
50 |
|
51 |
== Installation ==
|
52 |
|
53 |
-
Install and activate the WooCommerce and
|
54 |
-
|
55 |
-
1. Log in to your WordPress dashboard.
|
56 |
-
1. Go to: Plugins > Add New.
|
57 |
-
1. Enter "WooCommerce Payments" in the Search field.
|
58 |
-
1. Click "Install Now".
|
59 |
-
1. Go to: Payments.
|
60 |
-
1. Create your WooCommerce Payments account.
|
61 |
|
62 |
== Frequently Asked Questions ==
|
63 |
|
@@ -98,6 +90,13 @@ You can read our Terms of Service [here](https://en.wordpress.com/tos).
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 1.0.1 - 2020-06-01 =
|
102 |
* Add - Support 3D Secure verification
|
103 |
* Add - Transaction date and type filters to transactions list
|
4 |
Requires at least: 5.3
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 1.1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
41 |
* United States-based business.
|
42 |
* WordPress 5.3 or newer.
|
43 |
* WooCommerce 4.0 or newer.
|
|
|
44 |
* PHP version 7.0 or newer. PHP 7.2 or newer is recommended.
|
45 |
|
46 |
= Try it now =
|
49 |
|
50 |
== Installation ==
|
51 |
|
52 |
+
Install and activate the WooCommerce and WooCommerce Payments plugins, if you haven't already done so, then go to "Payments" in the WordPress admin menu and follow the instructions there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
== Frequently Asked Questions ==
|
55 |
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= 1.1.0 - 2020-06-16 =
|
94 |
+
|
95 |
+
* Add - Allow WooCommerce Payments set up without Jetpack plugin
|
96 |
+
* Fix - Orders missing after payment processing error
|
97 |
+
* Fix - Clearing pagination when selecting transactions advanced filters
|
98 |
+
* Fix - After onboarding, redirect to the WCPay task of the task list, instead of to the task list
|
99 |
+
|
100 |
= 1.0.1 - 2020-06-01 =
|
101 |
* Add - Support 3D Secure verification
|
102 |
* Add - Transaction date and type filters to transactions list
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit32870116744a4197533c0931b5a6db4e::getLoader();
|
vendor/autoload_packages.php
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file `autoload_packages.php`was generated by automattic/jetpack-autoloader.
|
4 |
+
*
|
5 |
+
* From your plugin include this file with:
|
6 |
+
* require_once . plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';
|
7 |
+
*
|
8 |
+
* @package automattic/jetpack-autoloader
|
9 |
+
*/
|
10 |
+
|
11 |
+
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
|
12 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
|
13 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_ns_cFound
|
14 |
+
|
15 |
+
namespace Automattic\Jetpack\Autoloader;
|
16 |
+
|
17 |
+
if ( ! function_exists( __NAMESPACE__ . '\enqueue_package_class' ) ) {
|
18 |
+
global $jetpack_packages_classes;
|
19 |
+
|
20 |
+
if ( ! is_array( $jetpack_packages_classes ) ) {
|
21 |
+
$jetpack_packages_classes = array();
|
22 |
+
}
|
23 |
+
/**
|
24 |
+
* Adds the version of a package to the $jetpack_packages global array so that
|
25 |
+
* the autoloader is able to find it.
|
26 |
+
*
|
27 |
+
* @param string $class_name Name of the class that you want to autoload.
|
28 |
+
* @param string $version Version of the class.
|
29 |
+
* @param string $path Absolute path to the class so that we can load it.
|
30 |
+
*/
|
31 |
+
function enqueue_package_class( $class_name, $version, $path ) {
|
32 |
+
global $jetpack_packages_classes;
|
33 |
+
|
34 |
+
if ( ! isset( $jetpack_packages_classes[ $class_name ] ) ) {
|
35 |
+
$jetpack_packages_classes[ $class_name ] = array(
|
36 |
+
'version' => $version,
|
37 |
+
'path' => $path,
|
38 |
+
);
|
39 |
+
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
// If we have a @dev version set always use that one!
|
43 |
+
if ( 'dev-' === substr( $jetpack_packages_classes[ $class_name ]['version'], 0, 4 ) ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
|
47 |
+
// Always favour the @dev version. Since that version is the same as bleeding edge.
|
48 |
+
// We need to make sure that we don't do this in production!
|
49 |
+
if ( 'dev-' === substr( $version, 0, 4 ) ) {
|
50 |
+
$jetpack_packages_classes[ $class_name ] = array(
|
51 |
+
'version' => $version,
|
52 |
+
'path' => $path,
|
53 |
+
);
|
54 |
+
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
// Set the latest version!
|
58 |
+
if ( version_compare( $jetpack_packages_classes[ $class_name ]['version'], $version, '<' ) ) {
|
59 |
+
$jetpack_packages_classes[ $class_name ] = array(
|
60 |
+
'version' => $version,
|
61 |
+
'path' => $path,
|
62 |
+
);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( ! function_exists( __NAMESPACE__ . '\enqueue_package_file' ) ) {
|
68 |
+
global $jetpack_packages_files;
|
69 |
+
|
70 |
+
if ( ! is_array( $jetpack_packages_files ) ) {
|
71 |
+
$jetpack_packages_files = array();
|
72 |
+
}
|
73 |
+
/**
|
74 |
+
* Adds the version of a package file to the $jetpack_packages_files global array so that
|
75 |
+
* we can load the most recent version after 'plugins_loaded'.
|
76 |
+
*
|
77 |
+
* @param string $file_identifier Unique id to file assigned by composer based on package name and filename.
|
78 |
+
* @param string $version Version of the file.
|
79 |
+
* @param string $path Absolute path to the file so that we can load it.
|
80 |
+
*/
|
81 |
+
function enqueue_package_file( $file_identifier, $version, $path ) {
|
82 |
+
global $jetpack_packages_files;
|
83 |
+
|
84 |
+
if ( ! isset( $jetpack_packages_files[ $file_identifier ] ) ) {
|
85 |
+
$jetpack_packages_files[ $file_identifier ] = array(
|
86 |
+
'version' => $version,
|
87 |
+
'path' => $path,
|
88 |
+
);
|
89 |
+
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
// If we have a @dev version set always use that one!
|
93 |
+
if ( 'dev-' === substr( $jetpack_packages_files[ $file_identifier ]['version'], 0, 4 ) ) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
// Always favour the @dev version. Since that version is the same as bleeding edge.
|
98 |
+
// We need to make sure that we don't do this in production!
|
99 |
+
if ( 'dev-' === substr( $version, 0, 4 ) ) {
|
100 |
+
$jetpack_packages_files[ $file_identifier ] = array(
|
101 |
+
'version' => $version,
|
102 |
+
'path' => $path,
|
103 |
+
);
|
104 |
+
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
// Set the latest version!
|
108 |
+
if ( version_compare( $jetpack_packages_files[ $file_identifier ]['version'], $version, '<' ) ) {
|
109 |
+
$jetpack_packages_files[ $file_identifier ] = array(
|
110 |
+
'version' => $version,
|
111 |
+
'path' => $path,
|
112 |
+
);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( ! function_exists( __NAMESPACE__ . '\file_loader' ) ) {
|
118 |
+
/**
|
119 |
+
* Include latest version of all enqueued files. Should be called after all plugins are loaded.
|
120 |
+
*/
|
121 |
+
function file_loader() {
|
122 |
+
global $jetpack_packages_files;
|
123 |
+
foreach ( $jetpack_packages_files as $file_identifier => $file_data ) {
|
124 |
+
if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
|
125 |
+
require $file_data['path'];
|
126 |
+
|
127 |
+
$GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
if ( ! function_exists( __NAMESPACE__ . '\autoloader' ) ) {
|
134 |
+
/**
|
135 |
+
* Used for autoloading jetpack packages.
|
136 |
+
*
|
137 |
+
* @param string $class_name Class Name to load.
|
138 |
+
*/
|
139 |
+
function autoloader( $class_name ) {
|
140 |
+
global $jetpack_packages_classes;
|
141 |
+
|
142 |
+
if ( isset( $jetpack_packages_classes[ $class_name ] ) ) {
|
143 |
+
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
144 |
+
// TODO ideally we shouldn't skip any of these, see: https://github.com/Automattic/jetpack/pull/12646.
|
145 |
+
$ignore = in_array(
|
146 |
+
$class_name,
|
147 |
+
array(
|
148 |
+
'Automattic\Jetpack\Connection\Manager',
|
149 |
+
'Jetpack_Options',
|
150 |
+
),
|
151 |
+
true
|
152 |
+
);
|
153 |
+
|
154 |
+
if ( ! $ignore && function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) ) {
|
155 |
+
_doing_it_wrong(
|
156 |
+
esc_html( $class_name ),
|
157 |
+
sprintf(
|
158 |
+
/* translators: %s Name of a PHP Class */
|
159 |
+
esc_html__( 'Not all plugins have loaded yet but we requested the class %s', 'jetpack' ),
|
160 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
161 |
+
$class_name
|
162 |
+
),
|
163 |
+
esc_html( $jetpack_packages_classes[ $class_name ]['version'] )
|
164 |
+
);
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
require_once $jetpack_packages_classes[ $class_name ]['path'];
|
169 |
+
|
170 |
+
return true;
|
171 |
+
}
|
172 |
+
|
173 |
+
return false;
|
174 |
+
}
|
175 |
+
|
176 |
+
// Add the jetpack autoloader.
|
177 |
+
spl_autoload_register( __NAMESPACE__ . '\autoloader' );
|
178 |
+
}
|
179 |
+
/**
|
180 |
+
* Prepare all the classes for autoloading.
|
181 |
+
*/
|
182 |
+
function enqueue_packages_41d8eafb29760249637f3a7c184d41e7() {
|
183 |
+
$class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';
|
184 |
+
foreach ( $class_map as $class_name => $class_info ) {
|
185 |
+
enqueue_package_class( $class_name, $class_info['version'], $class_info['path'] );
|
186 |
+
}
|
187 |
+
|
188 |
+
$autoload_file = __DIR__ . '/composer/autoload_files_package.php';
|
189 |
+
|
190 |
+
$includeFiles = file_exists( $autoload_file )
|
191 |
+
? require $autoload_file
|
192 |
+
: array();
|
193 |
+
|
194 |
+
foreach ( $includeFiles as $fileIdentifier => $file_data ) {
|
195 |
+
enqueue_package_file( $fileIdentifier, $file_data[ 'version' ], $file_data[ 'path' ] );
|
196 |
+
}
|
197 |
+
|
198 |
+
if ( function_exists( 'has_action') && function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) && false === has_action( 'plugins_loaded', __NAMESPACE__ . '\file_loader' ) ) {
|
199 |
+
// Add action if it has not been added and has not happened yet.
|
200 |
+
// Priority -10 to load files as early as possible in case plugins try to use them during `plugins_loaded`.
|
201 |
+
add_action( 'plugins_loaded', __NAMESPACE__ . '\file_loader', 0, -10 );
|
202 |
+
} elseif( ! function_exists( 'did_action' ) || did_action( 'plugins_loaded' ) ) {
|
203 |
+
file_loader(); // Either WordPress is not loaded or plugin is doing it wrong. Either way we'll load the files so nothing breaks.
|
204 |
+
}
|
205 |
+
}
|
206 |
+
enqueue_packages_41d8eafb29760249637f3a7c184d41e7();
|
vendor/automattic/jetpack-autoloader/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
A custom autoloader for Composer
|
2 |
+
=====================================
|
3 |
+
|
4 |
+
This is a custom autoloader generator that uses a classmap to always load the latest version of a class.
|
5 |
+
|
6 |
+
The problem this autoloader is trying to solve is conflicts that arise when two or more plugins use the same package, but one of the plugins uses an older version of said package.
|
7 |
+
|
8 |
+
This is solved by keeping an in memory map of all the different classes that can be loaded, and updating the map with the path to the latest version of the package for the autoloader to find when we instantiate the class.
|
9 |
+
This only works if we instantiate the class after all the plugins have loaded. That is why the class produces an error if the plugin calls a class but has not loaded all the plugins yet.
|
10 |
+
|
11 |
+
It diverges from the default Composer autoloader setup in the following ways:
|
12 |
+
|
13 |
+
* It creates an `autoload_classmap_package.php` file in the `vendor/composer` directory.
|
14 |
+
* This file includes the version numbers from each package that is used.
|
15 |
+
* The autoloader will only load the latest version of the library no matter what plugin loads the library.
|
16 |
+
* Only call the library classes after all the plugins have loaded and the `plugins_loaded` action has fired.
|
17 |
+
|
18 |
+
|
19 |
+
Usage
|
20 |
+
-----
|
21 |
+
|
22 |
+
In your project's `composer.json`, add the following lines:
|
23 |
+
|
24 |
+
```json
|
25 |
+
{
|
26 |
+
"require-dev": {
|
27 |
+
"automattic/jetpack-autoloader": "^1"
|
28 |
+
}
|
29 |
+
}
|
30 |
+
```
|
31 |
+
|
32 |
+
After the next update/install, you will have a `vendor/autoload_packages.php` file.
|
33 |
+
Load the file in your plugin via main plugin file.
|
34 |
+
|
35 |
+
In the main plugin you will also need to include the files like this.
|
36 |
+
```php
|
37 |
+
require_once . plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';
|
38 |
+
```
|
39 |
+
|
40 |
+
|
41 |
+
Current Limitations
|
42 |
+
-----
|
43 |
+
|
44 |
+
We currently only support packages that autoload via psr-4 definition in their package.
|
vendor/automattic/jetpack-autoloader/composer.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "automattic/jetpack-autoloader",
|
3 |
+
"description": "Creates a custom autoloader for a plugin or theme.",
|
4 |
+
"type": "composer-plugin",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"require": {
|
7 |
+
"composer-plugin-api": "^1.1"
|
8 |
+
},
|
9 |
+
"require-dev": {
|
10 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
|
11 |
+
},
|
12 |
+
"autoload": {
|
13 |
+
"psr-4": {
|
14 |
+
"Automattic\\Jetpack\\Autoloader\\": "src"
|
15 |
+
}
|
16 |
+
},
|
17 |
+
"extra": {
|
18 |
+
"class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin"
|
19 |
+
},
|
20 |
+
"scripts": {
|
21 |
+
"phpunit": [
|
22 |
+
"@composer install",
|
23 |
+
"./vendor/phpunit/phpunit/phpunit --colors=always"
|
24 |
+
]
|
25 |
+
},
|
26 |
+
"minimum-stability": "dev",
|
27 |
+
"prefer-stable": true
|
28 |
+
}
|
vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php
ADDED
@@ -0,0 +1,357 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Autoloader Generator.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-autoloader
|
6 |
+
*/
|
7 |
+
|
8 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
|
9 |
+
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
|
10 |
+
// phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found
|
11 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
|
12 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound
|
13 |
+
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
|
14 |
+
// phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase
|
15 |
+
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
|
16 |
+
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
|
17 |
+
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents
|
18 |
+
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fopen
|
19 |
+
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fwrite
|
20 |
+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
21 |
+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
|
22 |
+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
23 |
+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
|
24 |
+
|
25 |
+
|
26 |
+
namespace Automattic\Jetpack\Autoloader;
|
27 |
+
|
28 |
+
use Composer\Autoload\AutoloadGenerator as BaseGenerator;
|
29 |
+
use Composer\Autoload\ClassMapGenerator;
|
30 |
+
use Composer\Config;
|
31 |
+
use Composer\Installer\InstallationManager;
|
32 |
+
use Composer\IO\IOInterface;
|
33 |
+
use Composer\Package\PackageInterface;
|
34 |
+
use Composer\Repository\InstalledRepositoryInterface;
|
35 |
+
use Composer\Util\Filesystem;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Class AutoloadGenerator.
|
39 |
+
*/
|
40 |
+
class AutoloadGenerator extends BaseGenerator {
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Instantiate an AutoloadGenerator object.
|
44 |
+
*
|
45 |
+
* @param IOInterface $io IO object.
|
46 |
+
*/
|
47 |
+
public function __construct( IOInterface $io = null ) {
|
48 |
+
$this->io = $io;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Dump the autoloader.
|
53 |
+
*
|
54 |
+
* @param Config $config Config object.
|
55 |
+
* @param InstalledRepositoryInterface $localRepo Installed Reposetories object.
|
56 |
+
* @param PackageInterface $mainPackage Main Package object.
|
57 |
+
* @param InstallationManager $installationManager Manager for installing packages.
|
58 |
+
* @param string $targetDir Path to the current target directory.
|
59 |
+
* @param bool $scanPsr0Packages Whether to search for packages. Currently hard coded to always be false.
|
60 |
+
* @param string $suffix The autoloader suffix, ignored since we want our autoloader to only be included once.
|
61 |
+
*/
|
62 |
+
public function dump(
|
63 |
+
Config $config,
|
64 |
+
InstalledRepositoryInterface $localRepo,
|
65 |
+
PackageInterface $mainPackage,
|
66 |
+
InstallationManager $installationManager,
|
67 |
+
$targetDir,
|
68 |
+
$scanPsr0Packages = null, // Not used we always optimize.
|
69 |
+
$suffix = null
|
70 |
+
) {
|
71 |
+
|
72 |
+
$filesystem = new Filesystem();
|
73 |
+
$filesystem->ensureDirectoryExists( $config->get( 'vendor-dir' ) );
|
74 |
+
|
75 |
+
$basePath = $filesystem->normalizePath( realpath( getcwd() ) );
|
76 |
+
$vendorPath = $filesystem->normalizePath( realpath( $config->get( 'vendor-dir' ) ) );
|
77 |
+
$targetDir = $vendorPath . '/' . $targetDir;
|
78 |
+
$filesystem->ensureDirectoryExists( $targetDir );
|
79 |
+
|
80 |
+
$packageMap = $this->buildPackageMap( $installationManager, $mainPackage, $localRepo->getCanonicalPackages() );
|
81 |
+
$autoloads = $this->parseAutoloads( $packageMap, $mainPackage );
|
82 |
+
|
83 |
+
$classMap = $this->getClassMap( $autoloads, $filesystem, $vendorPath, $basePath );
|
84 |
+
$fileMap = $this->getFileMap( $autoloads, $filesystem, $vendorPath, $basePath );
|
85 |
+
|
86 |
+
// Generate the files.
|
87 |
+
file_put_contents( $targetDir . '/autoload_classmap_package.php', $this->getAutoloadClassmapPackagesFile( $classMap ) );
|
88 |
+
$this->io->writeError( '<info>Generated ' . $targetDir . '/autoload_classmap_package.php</info>', true );
|
89 |
+
|
90 |
+
file_put_contents( $targetDir . '/autoload_files_package.php', $this->getAutoloadFilesPackagesFile( $fileMap ) );
|
91 |
+
$this->io->writeError( '<info>Generated ' . $targetDir . '/autoload_files_package.php</info>', true );
|
92 |
+
|
93 |
+
file_put_contents( $vendorPath . '/autoload_packages.php', $this->getAutoloadPackageFile( $suffix ) );
|
94 |
+
$this->io->writeError( '<info>Generated ' . $vendorPath . '/autoload_packages.php</info>', true );
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* This function differs from the composer parseAutoloadsType in that beside returning the path.
|
100 |
+
* It also return the path and the version of a package.
|
101 |
+
*
|
102 |
+
* Currently supports only psr-4 and clasmap parsing.
|
103 |
+
*
|
104 |
+
* @param array $packageMap Map of all the packages.
|
105 |
+
* @param string $type Type of autoloader to use, currently not used, since we only support psr-4.
|
106 |
+
* @param PackageInterface $mainPackage Instance of the Package Object.
|
107 |
+
*
|
108 |
+
* @return array
|
109 |
+
*/
|
110 |
+
protected function parseAutoloadsType( array $packageMap, $type, PackageInterface $mainPackage ) {
|
111 |
+
$autoloads = array();
|
112 |
+
|
113 |
+
if ( 'psr-4' !== $type && 'classmap' !== $type && 'files' !== $type ) {
|
114 |
+
return parent::parseAutoloadsType( $packageMap, $type, $mainPackage );
|
115 |
+
}
|
116 |
+
|
117 |
+
foreach ( $packageMap as $item ) {
|
118 |
+
list($package, $installPath) = $item;
|
119 |
+
$autoload = $package->getAutoload();
|
120 |
+
|
121 |
+
if ( $package === $mainPackage ) {
|
122 |
+
$autoload = array_merge_recursive( $autoload, $package->getDevAutoload() );
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( null !== $package->getTargetDir() && $package !== $mainPackage ) {
|
126 |
+
$installPath = substr( $installPath, 0, -strlen( '/' . $package->getTargetDir() ) );
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( 'psr-4' === $type && isset( $autoload['psr-4'] ) && is_array( $autoload['psr-4'] ) ) {
|
130 |
+
foreach ( $autoload['psr-4'] as $namespace => $paths ) {
|
131 |
+
$paths = is_array( $paths ) ? $paths : array( $paths );
|
132 |
+
foreach ( $paths as $path ) {
|
133 |
+
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
|
134 |
+
$autoloads[ $namespace ][] = array(
|
135 |
+
'path' => $relativePath,
|
136 |
+
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
|
137 |
+
);
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
if ( 'classmap' === $type && isset( $autoload['classmap'] ) && is_array( $autoload['classmap'] ) ) {
|
143 |
+
foreach ( $autoload['classmap'] as $paths ) {
|
144 |
+
$paths = is_array( $paths ) ? $paths : array( $paths );
|
145 |
+
foreach ( $paths as $path ) {
|
146 |
+
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
|
147 |
+
$autoloads[] = array(
|
148 |
+
'path' => $relativePath,
|
149 |
+
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
|
150 |
+
);
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) {
|
155 |
+
foreach ( $autoload['files'] as $file_id => $paths ) {
|
156 |
+
$paths = is_array( $paths ) ? $paths : array( $paths );
|
157 |
+
foreach ( $paths as $path ) {
|
158 |
+
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
|
159 |
+
$autoloads[ $this->getFileIdentifier( $package, $path ) ] = array(
|
160 |
+
'path' => $relativePath,
|
161 |
+
'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it?
|
162 |
+
);
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
return $autoloads;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Take the autoloads array and return the classMap that contains the path and the version for each namespace.
|
173 |
+
*
|
174 |
+
* @param array $autoloads Array of autoload settings defined defined by the packages.
|
175 |
+
* @param Filesystem $filesystem Filesystem class instance.
|
176 |
+
* @param string $vendorPath Path to the vendor directory.
|
177 |
+
* @param string $basePath Base Path.
|
178 |
+
*
|
179 |
+
* @return string $classMap
|
180 |
+
*/
|
181 |
+
private function getClassMap( array $autoloads, Filesystem $filesystem, $vendorPath, $basePath ) {
|
182 |
+
$blacklist = null;
|
183 |
+
|
184 |
+
if ( ! empty( $autoloads['exclude-from-classmap'] ) ) {
|
185 |
+
$blacklist = '{(' . implode( '|', $autoloads['exclude-from-classmap'] ) . ')}';
|
186 |
+
}
|
187 |
+
|
188 |
+
$classmapString = '';
|
189 |
+
|
190 |
+
// Scan the PSR-4 and classmap directories for class files, and add them to the class map.
|
191 |
+
foreach ( $autoloads['psr-4'] as $namespace => $packages_info ) {
|
192 |
+
foreach ( $packages_info as $package ) {
|
193 |
+
$dir = $filesystem->normalizePath(
|
194 |
+
$filesystem->isAbsolutePath( $package['path'] )
|
195 |
+
? $package['path']
|
196 |
+
: $basePath . '/' . $package['path']
|
197 |
+
);
|
198 |
+
$namespace = empty( $namespace ) ? null : $namespace;
|
199 |
+
$map = ClassMapGenerator::createMap( $dir, $blacklist, $this->io, $namespace );
|
200 |
+
|
201 |
+
foreach ( $map as $class => $path ) {
|
202 |
+
$classCode = var_export( $class, true );
|
203 |
+
$pathCode = $this->getPathCode( $filesystem, $basePath, $vendorPath, $path );
|
204 |
+
$versionCode = var_export( $package['version'], true );
|
205 |
+
$classmapString .= <<<CLASS_CODE
|
206 |
+
$classCode => array(
|
207 |
+
'version' => $versionCode,
|
208 |
+
'path' => $pathCode
|
209 |
+
),
|
210 |
+
CLASS_CODE;
|
211 |
+
$classmapString .= PHP_EOL;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
foreach ( $autoloads['classmap'] as $package ) {
|
217 |
+
$dir = $filesystem->normalizePath(
|
218 |
+
$filesystem->isAbsolutePath( $package['path'] )
|
219 |
+
? $package['path']
|
220 |
+
: $basePath . '/' . $package['path']
|
221 |
+
);
|
222 |
+
$map = ClassMapGenerator::createMap( $dir, $blacklist, $this->io, null );
|
223 |
+
|
224 |
+
foreach ( $map as $class => $path ) {
|
225 |
+
$classCode = var_export( $class, true );
|
226 |
+
$pathCode = $this->getPathCode( $filesystem, $basePath, $vendorPath, $path );
|
227 |
+
$versionCode = var_export( $package['version'], true );
|
228 |
+
$classmapString .= <<<CLASS_CODE
|
229 |
+
$classCode => array(
|
230 |
+
'version' => $versionCode,
|
231 |
+
'path' => $pathCode
|
232 |
+
),
|
233 |
+
CLASS_CODE;
|
234 |
+
$classmapString .= PHP_EOL;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
return 'array( ' . PHP_EOL . $classmapString . ');' . PHP_EOL;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Generate the PHP that will be used in the autoload_classmap_package.php files.
|
243 |
+
*
|
244 |
+
* @param string $classMap class map array string that is to be written out to the file.
|
245 |
+
*
|
246 |
+
* @return string
|
247 |
+
*/
|
248 |
+
private function getAutoloadClassmapPackagesFile( $classMap ) {
|
249 |
+
|
250 |
+
return <<<INCLUDE_CLASSMAP
|
251 |
+
<?php
|
252 |
+
|
253 |
+
// This file `autoload_classmap_packages.php` was auto generated by automattic/jetpack-autoloader.
|
254 |
+
|
255 |
+
\$vendorDir = dirname(__DIR__);
|
256 |
+
\$baseDir = dirname(\$vendorDir);
|
257 |
+
|
258 |
+
return $classMap
|
259 |
+
|
260 |
+
INCLUDE_CLASSMAP;
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Take the autoloads array and return the fileMap that contains the path and the version for each namespace.
|
265 |
+
*
|
266 |
+
* @param array $autoloads Array of autoload settings defined defined by the packages.
|
267 |
+
* @param Filesystem $filesystem Filesystem class instance.
|
268 |
+
* @param string $vendorPath Path to the vendor directory.
|
269 |
+
* @param string $basePath Base Path.
|
270 |
+
*
|
271 |
+
* @return string $fileMap
|
272 |
+
*/
|
273 |
+
private function getFileMap( array $autoloads, Filesystem $filesystem, $vendorPath, $basePath ) {
|
274 |
+
$fileMapString = '';
|
275 |
+
foreach ( $autoloads['files'] as $file_id => $package ) {
|
276 |
+
$key = var_export( $file_id, true );
|
277 |
+
$pathCode = $this->getPathCode( $filesystem, $basePath, $vendorPath, $package['path'] );
|
278 |
+
$versionCode = var_export( $package['version'], true );
|
279 |
+
$fileMapString .= <<<FILE_CODE
|
280 |
+
$key => array(
|
281 |
+
'version' => $versionCode,
|
282 |
+
'path' => $pathCode
|
283 |
+
),
|
284 |
+
FILE_CODE;
|
285 |
+
$fileMapString .= PHP_EOL;
|
286 |
+
}
|
287 |
+
|
288 |
+
return 'array( ' . PHP_EOL . $fileMapString . ');' . PHP_EOL;
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Generate the PHP that will be used in the autoload_files_package.php files.
|
293 |
+
*
|
294 |
+
* @param string $filesMap files array as string that is to be written out to the file.
|
295 |
+
*
|
296 |
+
* @return string
|
297 |
+
*/
|
298 |
+
private function getAutoloadFilesPackagesFile( $filesMap ) {
|
299 |
+
|
300 |
+
return <<<INCLUDE_FILEMAP
|
301 |
+
<?php
|
302 |
+
|
303 |
+
// This file `autoload_files_packages.php` was auto generated by automattic/jetpack-autoloader.
|
304 |
+
|
305 |
+
\$vendorDir = dirname(__DIR__);
|
306 |
+
\$baseDir = dirname(\$vendorDir);
|
307 |
+
|
308 |
+
return $filesMap
|
309 |
+
|
310 |
+
INCLUDE_FILEMAP;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Generate the PHP that will be used in the autoload_packages.php files.
|
315 |
+
*
|
316 |
+
* @param string $suffix Unique suffix added to the jetpack_enqueue_packages function.
|
317 |
+
*
|
318 |
+
* @return string
|
319 |
+
*/
|
320 |
+
private function getAutoloadPackageFile( $suffix ) {
|
321 |
+
$sourceLoader = fopen( __DIR__ . '/autoload.php', 'r' );
|
322 |
+
$file_contents = stream_get_contents( $sourceLoader );
|
323 |
+
$file_contents .= <<<INCLUDE_FILES
|
324 |
+
/**
|
325 |
+
* Prepare all the classes for autoloading.
|
326 |
+
*/
|
327 |
+
function enqueue_packages_$suffix() {
|
328 |
+
\$class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';
|
329 |
+
foreach ( \$class_map as \$class_name => \$class_info ) {
|
330 |
+
enqueue_package_class( \$class_name, \$class_info['version'], \$class_info['path'] );
|
331 |
+
}
|
332 |
+
|
333 |
+
\$autoload_file = __DIR__ . '/composer/autoload_files_package.php';
|
334 |
+
|
335 |
+
\$includeFiles = file_exists( \$autoload_file )
|
336 |
+
? require \$autoload_file
|
337 |
+
: array();
|
338 |
+
|
339 |
+
foreach ( \$includeFiles as \$fileIdentifier => \$file_data ) {
|
340 |
+
enqueue_package_file( \$fileIdentifier, \$file_data[ 'version' ], \$file_data[ 'path' ] );
|
341 |
+
}
|
342 |
+
|
343 |
+
if ( function_exists( 'has_action') && function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) && false === has_action( 'plugins_loaded', __NAMESPACE__ . '\\file_loader' ) ) {
|
344 |
+
// Add action if it has not been added and has not happened yet.
|
345 |
+
// Priority -10 to load files as early as possible in case plugins try to use them during `plugins_loaded`.
|
346 |
+
add_action( 'plugins_loaded', __NAMESPACE__ . '\\file_loader', 0, -10 );
|
347 |
+
} elseif( ! function_exists( 'did_action' ) || did_action( 'plugins_loaded' ) ) {
|
348 |
+
file_loader(); // Either WordPress is not loaded or plugin is doing it wrong. Either way we'll load the files so nothing breaks.
|
349 |
+
}
|
350 |
+
}
|
351 |
+
enqueue_packages_$suffix();
|
352 |
+
|
353 |
+
INCLUDE_FILES;
|
354 |
+
|
355 |
+
return $file_contents;
|
356 |
+
}
|
357 |
+
}
|
vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Custom Autoloader Composer Plugin, hooks into composer events to generate the custom autoloader.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-autoloader
|
6 |
+
*/
|
7 |
+
|
8 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
|
9 |
+
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
|
10 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
|
11 |
+
// phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase
|
12 |
+
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
|
13 |
+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
14 |
+
|
15 |
+
namespace Automattic\Jetpack\Autoloader;
|
16 |
+
|
17 |
+
use Composer\Composer;
|
18 |
+
use Composer\IO\IOInterface;
|
19 |
+
use Composer\Script\Event;
|
20 |
+
use Composer\Script\ScriptEvents;
|
21 |
+
use Composer\Plugin\PluginInterface;
|
22 |
+
use Composer\EventDispatcher\EventSubscriberInterface;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class CustomAutoloaderPlugin.
|
26 |
+
*
|
27 |
+
* @package automattic/jetpack-autoloader
|
28 |
+
*/
|
29 |
+
class CustomAutoloaderPlugin implements PluginInterface, EventSubscriberInterface {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* IO object.
|
33 |
+
*
|
34 |
+
* @var IOInterface IO object.
|
35 |
+
*/
|
36 |
+
private $io;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Composer object.
|
40 |
+
*
|
41 |
+
* @var Composer Composer object.
|
42 |
+
*/
|
43 |
+
private $composer;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Do nothing.
|
47 |
+
*
|
48 |
+
* @param Composer $composer Composer object.
|
49 |
+
* @param IOInterface $io IO object.
|
50 |
+
*/
|
51 |
+
public function activate( Composer $composer, IOInterface $io ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
52 |
+
$this->composer = $composer;
|
53 |
+
$this->io = $io;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Tell composer to listen for events and do something with them.
|
58 |
+
*
|
59 |
+
* @return array List of succribed events.
|
60 |
+
*/
|
61 |
+
public static function getSubscribedEvents() {
|
62 |
+
return array(
|
63 |
+
ScriptEvents::POST_AUTOLOAD_DUMP => 'postAutoloadDump',
|
64 |
+
);
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Generate the custom autolaoder.
|
69 |
+
*
|
70 |
+
* @param Event $event Script event object.
|
71 |
+
*/
|
72 |
+
public function postAutoloadDump( Event $event ) {
|
73 |
+
|
74 |
+
$installationManager = $this->composer->getInstallationManager();
|
75 |
+
$repoManager = $this->composer->getRepositoryManager();
|
76 |
+
$localRepo = $repoManager->getLocalRepository();
|
77 |
+
$package = $this->composer->getPackage();
|
78 |
+
$config = $this->composer->getConfig();
|
79 |
+
$optimize = true;
|
80 |
+
$suffix = $config->get( 'autoloader-suffix' )
|
81 |
+
? $config->get( 'autoloader-suffix' )
|
82 |
+
: md5( uniqid( '', true ) );
|
83 |
+
|
84 |
+
$generator = new AutoloadGenerator( $this->io );
|
85 |
+
|
86 |
+
$generator->dump( $config, $localRepo, $package, $installationManager, 'composer', $optimize, $suffix );
|
87 |
+
$this->generated = true;
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
vendor/automattic/jetpack-autoloader/src/autoload.php
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file `autoload_packages.php`was generated by automattic/jetpack-autoloader.
|
4 |
+
*
|
5 |
+
* From your plugin include this file with:
|
6 |
+
* require_once . plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';
|
7 |
+
*
|
8 |
+
* @package automattic/jetpack-autoloader
|
9 |
+
*/
|
10 |
+
|
11 |
+
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
|
12 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
|
13 |
+
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_ns_cFound
|
14 |
+
|
15 |
+
namespace Automattic\Jetpack\Autoloader;
|
16 |
+
|
17 |
+
if ( ! function_exists( __NAMESPACE__ . '\enqueue_package_class' ) ) {
|
18 |
+
global $jetpack_packages_classes;
|
19 |
+
|
20 |
+
if ( ! is_array( $jetpack_packages_classes ) ) {
|
21 |
+
$jetpack_packages_classes = array();
|
22 |
+
}
|
23 |
+
/**
|
24 |
+
* Adds the version of a package to the $jetpack_packages global array so that
|
25 |
+
* the autoloader is able to find it.
|
26 |
+
*
|
27 |
+
* @param string $class_name Name of the class that you want to autoload.
|
28 |
+
* @param string $version Version of the class.
|
29 |
+
* @param string $path Absolute path to the class so that we can load it.
|
30 |
+
*/
|
31 |
+
function enqueue_package_class( $class_name, $version, $path ) {
|
32 |
+
global $jetpack_packages_classes;
|
33 |
+
|
34 |
+
if ( ! isset( $jetpack_packages_classes[ $class_name ] ) ) {
|
35 |
+
$jetpack_packages_classes[ $class_name ] = array(
|
36 |
+
'version' => $version,
|
37 |
+
'path' => $path,
|
38 |
+
);
|
39 |
+
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
// If we have a @dev version set always use that one!
|
43 |
+
if ( 'dev-' === substr( $jetpack_packages_classes[ $class_name ]['version'], 0, 4 ) ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
|
47 |
+
// Always favour the @dev version. Since that version is the same as bleeding edge.
|
48 |
+
// We need to make sure that we don't do this in production!
|
49 |
+
if ( 'dev-' === substr( $version, 0, 4 ) ) {
|
50 |
+
$jetpack_packages_classes[ $class_name ] = array(
|
51 |
+
'version' => $version,
|
52 |
+
'path' => $path,
|
53 |
+
);
|
54 |
+
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
// Set the latest version!
|
58 |
+
if ( version_compare( $jetpack_packages_classes[ $class_name ]['version'], $version, '<' ) ) {
|
59 |
+
$jetpack_packages_classes[ $class_name ] = array(
|
60 |
+
'version' => $version,
|
61 |
+
'path' => $path,
|
62 |
+
);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( ! function_exists( __NAMESPACE__ . '\enqueue_package_file' ) ) {
|
68 |
+
global $jetpack_packages_files;
|
69 |
+
|
70 |
+
if ( ! is_array( $jetpack_packages_files ) ) {
|
71 |
+
$jetpack_packages_files = array();
|
72 |
+
}
|
73 |
+
/**
|
74 |
+
* Adds the version of a package file to the $jetpack_packages_files global array so that
|
75 |
+
* we can load the most recent version after 'plugins_loaded'.
|
76 |
+
*
|
77 |
+
* @param string $file_identifier Unique id to file assigned by composer based on package name and filename.
|
78 |
+
* @param string $version Version of the file.
|
79 |
+
* @param string $path Absolute path to the file so that we can load it.
|
80 |
+
*/
|
81 |
+
function enqueue_package_file( $file_identifier, $version, $path ) {
|
82 |
+
global $jetpack_packages_files;
|
83 |
+
|
84 |
+
if ( ! isset( $jetpack_packages_files[ $file_identifier ] ) ) {
|
85 |
+
$jetpack_packages_files[ $file_identifier ] = array(
|
86 |
+
'version' => $version,
|
87 |
+
'path' => $path,
|
88 |
+
);
|
89 |
+
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
// If we have a @dev version set always use that one!
|
93 |
+
if ( 'dev-' === substr( $jetpack_packages_files[ $file_identifier ]['version'], 0, 4 ) ) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
// Always favour the @dev version. Since that version is the same as bleeding edge.
|
98 |
+
// We need to make sure that we don't do this in production!
|
99 |
+
if ( 'dev-' === substr( $version, 0, 4 ) ) {
|
100 |
+
$jetpack_packages_files[ $file_identifier ] = array(
|
101 |
+
'version' => $version,
|
102 |
+
'path' => $path,
|
103 |
+
);
|
104 |
+
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
// Set the latest version!
|
108 |
+
if ( version_compare( $jetpack_packages_files[ $file_identifier ]['version'], $version, '<' ) ) {
|
109 |
+
$jetpack_packages_files[ $file_identifier ] = array(
|
110 |
+
'version' => $version,
|
111 |
+
'path' => $path,
|
112 |
+
);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( ! function_exists( __NAMESPACE__ . '\file_loader' ) ) {
|
118 |
+
/**
|
119 |
+
* Include latest version of all enqueued files. Should be called after all plugins are loaded.
|
120 |
+
*/
|
121 |
+
function file_loader() {
|
122 |
+
global $jetpack_packages_files;
|
123 |
+
foreach ( $jetpack_packages_files as $file_identifier => $file_data ) {
|
124 |
+
if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
|
125 |
+
require $file_data['path'];
|
126 |
+
|
127 |
+
$GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
if ( ! function_exists( __NAMESPACE__ . '\autoloader' ) ) {
|
134 |
+
/**
|
135 |
+
* Used for autoloading jetpack packages.
|
136 |
+
*
|
137 |
+
* @param string $class_name Class Name to load.
|
138 |
+
*/
|
139 |
+
function autoloader( $class_name ) {
|
140 |
+
global $jetpack_packages_classes;
|
141 |
+
|
142 |
+
if ( isset( $jetpack_packages_classes[ $class_name ] ) ) {
|
143 |
+
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
144 |
+
// TODO ideally we shouldn't skip any of these, see: https://github.com/Automattic/jetpack/pull/12646.
|
145 |
+
$ignore = in_array(
|
146 |
+
$class_name,
|
147 |
+
array(
|
148 |
+
'Automattic\Jetpack\Connection\Manager',
|
149 |
+
'Jetpack_Options',
|
150 |
+
),
|
151 |
+
true
|
152 |
+
);
|
153 |
+
|
154 |
+
if ( ! $ignore && function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) ) {
|
155 |
+
_doing_it_wrong(
|
156 |
+
esc_html( $class_name ),
|
157 |
+
sprintf(
|
158 |
+
/* translators: %s Name of a PHP Class */
|
159 |
+
esc_html__( 'Not all plugins have loaded yet but we requested the class %s', 'jetpack' ),
|
160 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
161 |
+
$class_name
|
162 |
+
),
|
163 |
+
esc_html( $jetpack_packages_classes[ $class_name ]['version'] )
|
164 |
+
);
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
require_once $jetpack_packages_classes[ $class_name ]['path'];
|
169 |
+
|
170 |
+
return true;
|
171 |
+
}
|
172 |
+
|
173 |
+
return false;
|
174 |
+
}
|
175 |
+
|
176 |
+
// Add the jetpack autoloader.
|
177 |
+
spl_autoload_register( __NAMESPACE__ . '\autoloader' );
|
178 |
+
}
|
vendor/automattic/jetpack-config/README.md
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Jetpack Configuration
|
2 |
+
|
3 |
+
Allows for enabling and initializing of Jetpack features provided by
|
4 |
+
other packages.
|
5 |
+
|
6 |
+
# Usage
|
7 |
+
|
8 |
+
Add this package as a dependency to your project:
|
9 |
+
|
10 |
+
```
|
11 |
+
composer require automattic/jetpack-config
|
12 |
+
```
|
13 |
+
|
14 |
+
Add every other package you're planning to configure:
|
15 |
+
|
16 |
+
```
|
17 |
+
composer require automattic/jetpack-sync
|
18 |
+
composer require automattic/jetpack-tracking
|
19 |
+
composer require automattic/jetpack-terms-of-service
|
20 |
+
```
|
21 |
+
|
22 |
+
In your code initialize the configuration package at or before
|
23 |
+
plugins_loaded priority 1:
|
24 |
+
|
25 |
+
```
|
26 |
+
use Automattic/Jetpack/Config;
|
27 |
+
|
28 |
+
// Configuring Jetpack as early as plugins_loaded priority 1
|
29 |
+
// to make sure every action handler gets properly set.
|
30 |
+
add_action( 'plugins_loaded', 'configure_jetpack', 1 );
|
31 |
+
|
32 |
+
function configure_jetpack() {
|
33 |
+
$config = new Config();
|
34 |
+
|
35 |
+
foreach (
|
36 |
+
array(
|
37 |
+
'sync',
|
38 |
+
'tracking',
|
39 |
+
'tos',
|
40 |
+
)
|
41 |
+
as $feature
|
42 |
+
) {
|
43 |
+
$config->ensure( $feature );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
```
|
47 |
+
|
48 |
+
# Adding your package to the config class
|
49 |
+
|
50 |
+
You can have your package initialized using the Config class by
|
51 |
+
adding several things.
|
52 |
+
|
53 |
+
## The configure method
|
54 |
+
|
55 |
+
It's better to have one static configure method in your package
|
56 |
+
class. That method will be called early on the `plugins_loaded`
|
57 |
+
hook. This way you can add your own `plugins_loaded` handlers with
|
58 |
+
standard priority and they will get executed:
|
59 |
+
|
60 |
+
```
|
61 |
+
class Configurable_Package {
|
62 |
+
|
63 |
+
public static function configure() {
|
64 |
+
add_action( 'plugins_loaded', array( __CLASS__, 'on_plugins_loaded' );
|
65 |
+
}
|
66 |
+
|
67 |
+
public static function on_plugins_loaded() {
|
68 |
+
self::do_interesting_stuff();
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
```
|
73 |
+
|
74 |
+
## The feature enabling method
|
75 |
+
|
76 |
+
An enabling method should be added to the Config class and should only contain your configuration method call.
|
77 |
+
|
78 |
+
```
|
79 |
+
|
80 |
+
public function enable_configurable_package() {
|
81 |
+
Configurable_Package::configure();
|
82 |
+
|
83 |
+
return true;
|
84 |
+
}
|
85 |
+
```
|
86 |
+
|
87 |
+
Note that the method name should use the feature slug, in this case
|
88 |
+
your feature slug is `configurable_package` for the sake of
|
89 |
+
simplicity. When you're adding your feature it should be unique and
|
90 |
+
recognizable, like `sync` or `tracking`.
|
91 |
+
|
92 |
+
## The feature slug
|
93 |
+
|
94 |
+
To make sure the feature is supported by the Config class, you need to
|
95 |
+
add its slug to the config class property:
|
96 |
+
|
97 |
+
```
|
98 |
+
/**
|
99 |
+
* The initial setting values.
|
100 |
+
*
|
101 |
+
* @var Array
|
102 |
+
*/
|
103 |
+
protected $config = array(
|
104 |
+
// ...
|
105 |
+
'configurable_package' => false,
|
106 |
+
// ...
|
107 |
+
);
|
108 |
+
```
|
109 |
+
|
110 |
+
## The ensure call
|
111 |
+
|
112 |
+
Finally you need to add a block that will check if your package is
|
113 |
+
loaded and mark it to be initialized:
|
114 |
+
|
115 |
+
```
|
116 |
+
if ( $this->config['configurable_package'] ) {
|
117 |
+
$this->ensure_class( 'Configurable_Package' ) && $this->ensure_feature( 'configurable_package' );
|
118 |
+
}
|
119 |
+
```
|
120 |
+
|
121 |
+
This code does three things: it checks whether the current setup has
|
122 |
+
requested your package to be loaded. Next it checks if the class that
|
123 |
+
you need for the package to run is present, and then it adds the hook
|
124 |
+
handlers that initialize your class. After that you can use the config
|
125 |
+
package's interface in a Jetpack package consumer application and load
|
126 |
+
your package as shown in the first section of this README.
|
vendor/automattic/jetpack-config/composer.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "automattic/jetpack-config",
|
3 |
+
"description": "Jetpack configuration package that initializes other packages and configures Jetpack's functionality. Can be used as a base for all variants of Jetpack package usage.",
|
4 |
+
"type": "library",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"minimum-stability": "dev",
|
7 |
+
"require": {},
|
8 |
+
"autoload": {
|
9 |
+
"classmap": [
|
10 |
+
"src/"
|
11 |
+
]
|
12 |
+
}
|
13 |
+
}
|
vendor/automattic/jetpack-config/src/class-config.php
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The base Jetpack configuration class file.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-config
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack;
|
9 |
+
|
10 |
+
use Automattic\Jetpack\Connection\Manager;
|
11 |
+
use Automattic\Jetpack\JITMS\JITM;
|
12 |
+
use Automattic\Jetpack\Connection\Plugin;
|
13 |
+
use Automattic\Jetpack\Plugin\Tracking as Plugin_Tracking;
|
14 |
+
use Automattic\Jetpack\Sync\Main as Sync_Main;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The configuration class.
|
18 |
+
*/
|
19 |
+
class Config {
|
20 |
+
|
21 |
+
const FEATURE_ENSURED = 1;
|
22 |
+
const FEATURE_NOT_AVAILABLE = 0;
|
23 |
+
const FEATURE_ALREADY_ENSURED = -1;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The initial setting values.
|
27 |
+
*
|
28 |
+
* @var Array
|
29 |
+
*/
|
30 |
+
protected $config = array(
|
31 |
+
'jitm' => false,
|
32 |
+
'connection' => false,
|
33 |
+
'sync' => false,
|
34 |
+
'tracking' => false,
|
35 |
+
'tos' => false,
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Initialization options stored here.
|
40 |
+
*
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
protected $feature_options = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Creates the configuration class instance.
|
47 |
+
*/
|
48 |
+
public function __construct() {
|
49 |
+
/**
|
50 |
+
* Adding the config handler to run on priority 2 because the class itself is
|
51 |
+
* being constructed on priority 1.
|
52 |
+
*/
|
53 |
+
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ), 2 );
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Require a feature to be initialized. It's up to the package consumer to actually add
|
59 |
+
* the package to their composer project. Declaring a requirement using this method
|
60 |
+
* instructs the class to initialize it.
|
61 |
+
*
|
62 |
+
* @param String $feature the feature slug.
|
63 |
+
* @param array $options Additional options, optional.
|
64 |
+
*/
|
65 |
+
public function ensure( $feature, array $options = array() ) {
|
66 |
+
$this->config[ $feature ] = true;
|
67 |
+
|
68 |
+
$this->set_feature_options( $feature, $options );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Runs on plugins_loaded hook priority with priority 2.
|
73 |
+
*
|
74 |
+
* @action plugins_loaded
|
75 |
+
*/
|
76 |
+
public function on_plugins_loaded() {
|
77 |
+
if ( $this->config['connection'] ) {
|
78 |
+
$this->ensure_class( 'Automattic\Jetpack\Connection\Manager' )
|
79 |
+
&& $this->ensure_feature( 'connection' );
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( $this->config['tracking'] ) {
|
83 |
+
$this->ensure_class( 'Automattic\Jetpack\Terms_Of_Service' )
|
84 |
+
&& $this->ensure_class( 'Automattic\Jetpack\Tracking' )
|
85 |
+
&& $this->ensure_feature( 'tracking' );
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( $this->config['sync'] ) {
|
89 |
+
$this->ensure_class( 'Automattic\Jetpack\Sync\Main' )
|
90 |
+
&& $this->ensure_feature( 'sync' );
|
91 |
+
}
|
92 |
+
|
93 |
+
if ( $this->config['jitm'] ) {
|
94 |
+
$this->ensure_class( 'Automattic\Jetpack\JITMS\JITM' )
|
95 |
+
&& $this->ensure_feature( 'jitm' );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Returns true if the required class is available and alerts the user if it's not available
|
101 |
+
* in case the site is in debug mode.
|
102 |
+
*
|
103 |
+
* @param String $classname a fully qualified class name.
|
104 |
+
* @return Boolean whether the class is available.
|
105 |
+
*/
|
106 |
+
protected function ensure_class( $classname ) {
|
107 |
+
$available = class_exists( $classname );
|
108 |
+
|
109 |
+
if ( ! $available && defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
110 |
+
trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
|
111 |
+
sprintf(
|
112 |
+
/* translators: %1$s is a PHP class name. */
|
113 |
+
esc_html__(
|
114 |
+
'Unable to load class %1$s. Please add the package that contains it using composer and make sure you are requiring the Jetpack autoloader',
|
115 |
+
'jetpack'
|
116 |
+
),
|
117 |
+
esc_html( $classname )
|
118 |
+
),
|
119 |
+
E_USER_NOTICE
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
return $available;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Ensures a feature is enabled, sets it up if it hasn't already been set up.
|
128 |
+
* Run the options method (if exists) every time the method is called.
|
129 |
+
*
|
130 |
+
* @param String $feature slug of the feature.
|
131 |
+
* @return Integer either FEATURE_ENSURED, FEATURE_ALREADY_ENSURED or FEATURE_NOT_AVAILABLE constants.
|
132 |
+
*/
|
133 |
+
protected function ensure_feature( $feature ) {
|
134 |
+
$method = 'enable_' . $feature;
|
135 |
+
if ( ! method_exists( $this, $method ) ) {
|
136 |
+
return self::FEATURE_NOT_AVAILABLE;
|
137 |
+
}
|
138 |
+
|
139 |
+
$method_options = 'ensure_options_' . $feature;
|
140 |
+
if ( method_exists( $this, $method_options ) ) {
|
141 |
+
$this->{ $method_options }();
|
142 |
+
}
|
143 |
+
|
144 |
+
if ( did_action( 'jetpack_feature_' . $feature . '_enabled' ) ) {
|
145 |
+
return self::FEATURE_ALREADY_ENSURED;
|
146 |
+
}
|
147 |
+
|
148 |
+
$this->{ $method }();
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Fires when a specific Jetpack package feature is initalized using the Config package.
|
152 |
+
*
|
153 |
+
* @since 8.2.0
|
154 |
+
*/
|
155 |
+
do_action( 'jetpack_feature_' . $feature . '_enabled' );
|
156 |
+
|
157 |
+
return self::FEATURE_ENSURED;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Dummy method to enable Terms of Service.
|
162 |
+
*/
|
163 |
+
protected function enable_tos() {
|
164 |
+
return true;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Enables the tracking feature. Depends on the Terms of Service package, so enables it too.
|
169 |
+
*/
|
170 |
+
protected function enable_tracking() {
|
171 |
+
|
172 |
+
// Enabling dependencies.
|
173 |
+
$this->ensure_feature( 'tos' );
|
174 |
+
|
175 |
+
$terms_of_service = new Terms_Of_Service();
|
176 |
+
$tracking = new Plugin_Tracking();
|
177 |
+
if ( $terms_of_service->has_agreed() ) {
|
178 |
+
add_action( 'init', array( $tracking, 'init' ) );
|
179 |
+
} else {
|
180 |
+
/**
|
181 |
+
* Initialize tracking right after the user agrees to the terms of service.
|
182 |
+
*/
|
183 |
+
add_action( 'jetpack_agreed_to_terms_of_service', array( $tracking, 'init' ) );
|
184 |
+
}
|
185 |
+
|
186 |
+
return true;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Enables the JITM feature.
|
191 |
+
*/
|
192 |
+
protected function enable_jitm() {
|
193 |
+
JITM::configure();
|
194 |
+
|
195 |
+
return true;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Enables the Sync feature.
|
200 |
+
*/
|
201 |
+
protected function enable_sync() {
|
202 |
+
Sync_Main::configure();
|
203 |
+
|
204 |
+
return true;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Enables the Connection feature.
|
209 |
+
*/
|
210 |
+
protected function enable_connection() {
|
211 |
+
Manager::configure();
|
212 |
+
|
213 |
+
return true;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Setup the Connection options.
|
218 |
+
*/
|
219 |
+
protected function ensure_options_connection() {
|
220 |
+
$options = $this->get_feature_options( 'connection' );
|
221 |
+
|
222 |
+
if ( ! empty( $options['slug'] ) ) {
|
223 |
+
// The `slug` and `name` are removed from the options because they need to be passed as arguments.
|
224 |
+
$slug = $options['slug'];
|
225 |
+
unset( $options['slug'] );
|
226 |
+
|
227 |
+
$name = $slug;
|
228 |
+
if ( ! empty( $options['name'] ) ) {
|
229 |
+
$name = $options['name'];
|
230 |
+
unset( $options['name'] );
|
231 |
+
}
|
232 |
+
|
233 |
+
( new Plugin( $slug ) )->add( $name, $options );
|
234 |
+
}
|
235 |
+
|
236 |
+
return true;
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Temporary save initialization options for a feature.
|
241 |
+
*
|
242 |
+
* @param string $feature The feature slug.
|
243 |
+
* @param array $options The options.
|
244 |
+
*
|
245 |
+
* @return bool
|
246 |
+
*/
|
247 |
+
protected function set_feature_options( $feature, array $options ) {
|
248 |
+
if ( $options ) {
|
249 |
+
$this->feature_options[ $feature ] = $options;
|
250 |
+
}
|
251 |
+
|
252 |
+
return true;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Get initialization options for a feature from the temporary storage.
|
257 |
+
*
|
258 |
+
* @param string $feature The feature slug.
|
259 |
+
*
|
260 |
+
* @return array
|
261 |
+
*/
|
262 |
+
protected function get_feature_options( $feature ) {
|
263 |
+
return empty( $this->feature_options[ $feature ] ) ? array() : $this->feature_options[ $feature ];
|
264 |
+
}
|
265 |
+
|
266 |
+
}
|
vendor/automattic/jetpack-connection/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Jetpack Connection Package
|
2 |
+
|
3 |
+
Let's talk to wordpress.com!
|
4 |
+
|
5 |
+
## Get Started
|
6 |
+
|
7 |
+
Package is published in [Packagist](https://packagist.org/packages/automattic/jetpack-connection). We recommend using the latest version there, or you can also test with the latest development versions like below:
|
8 |
+
|
9 |
+
```
|
10 |
+
"require": {
|
11 |
+
"automattic/jetpack-autoloader": "dev-master",
|
12 |
+
"automattic/jetpack-config": "dev-master",
|
13 |
+
"automattic/jetpack-connection": "dev-master"
|
14 |
+
}
|
15 |
+
```
|
16 |
+
|
17 |
+
## Examples
|
18 |
+
1. [Register the site](docs/register-site.md)
|
19 |
+
2. [Authorize the user](docs/authorize-user.md)
|
20 |
+
3. In-place user auth @todo
|
21 |
+
4. Disconnecting @todo
|
vendor/automattic/jetpack-connection/composer.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "automattic/jetpack-connection",
|
3 |
+
"description": "Everything needed to connect to the Jetpack infrastructure",
|
4 |
+
"type": "library",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"require": {
|
7 |
+
"automattic/jetpack-constants": "1.2.0",
|
8 |
+
"automattic/jetpack-options": "1.5.0",
|
9 |
+
"automattic/jetpack-roles": "1.0.4"
|
10 |
+
},
|
11 |
+
"require-dev": {
|
12 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
|
13 |
+
"php-mock/php-mock": "^2.1"
|
14 |
+
},
|
15 |
+
"autoload": {
|
16 |
+
"files": [
|
17 |
+
"legacy/load-ixr.php"
|
18 |
+
],
|
19 |
+
"classmap": [
|
20 |
+
"legacy",
|
21 |
+
"src/"
|
22 |
+
]
|
23 |
+
},
|
24 |
+
"scripts": {
|
25 |
+
"phpunit": [
|
26 |
+
"@composer install",
|
27 |
+
"./vendor/phpunit/phpunit/phpunit --colors=always"
|
28 |
+
]
|
29 |
+
},
|
30 |
+
"repositories": [
|
31 |
+
{
|
32 |
+
"type": "path",
|
33 |
+
"url": "../*"
|
34 |
+
}
|
35 |
+
],
|
36 |
+
"minimum-stability": "dev",
|
37 |
+
"prefer-stable": true
|
38 |
+
}
|
vendor/automattic/jetpack-connection/docs/authorize-user.md
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Authorize the user
|
2 |
+
|
3 |
+
After you have [registered your site](register-site.md), you can give
|
4 |
+
your users a way to connect their account to a WordPress.com account,
|
5 |
+
just as you would when using Jetpack.
|
6 |
+
|
7 |
+
The regular connection process is to send the user to a specific URL
|
8 |
+
where they would log in, and give consent to WordPress.com to access
|
9 |
+
their self-hosted site's data. To give a user of your site a way to do
|
10 |
+
that you can add a button to your admin area:
|
11 |
+
|
12 |
+
```php
|
13 |
+
use Automattic\Jetpack\Connection\Manager;
|
14 |
+
|
15 |
+
// Getting the existing blog token created at registration step.
|
16 |
+
$manager = new Manager( 'plugin-slug' );
|
17 |
+
$blog_token = $manager->get_access_token();
|
18 |
+
$user_token = $manager->get_access_token( get_current_user_id() );
|
19 |
+
$auth_url = $manager->get_authorization_url();
|
20 |
+
|
21 |
+
// Checking if the user is already connected. If not, the token will
|
22 |
+
// be empty.
|
23 |
+
if ( $user_token ) : ?>
|
24 |
+
<p>Awesome! You are connected as an authenticated user!</p>
|
25 |
+
<?php else: ?>
|
26 |
+
<form action="/wp-admin/admin-post.php" method="post">
|
27 |
+
<input type="hidden" name="action" value="connect_user">
|
28 |
+
<?php wp_nonce_field( 'connect-user' ); ?>
|
29 |
+
<input type="submit" value="Connect current user" class="button button-primary">
|
30 |
+
</form>
|
31 |
+
<?php endif; ?>
|
32 |
+
```
|
33 |
+
|
34 |
+
As with the registration step, you need to add a WordPress POST
|
35 |
+
handler, as one usually does for admin actions:
|
36 |
+
|
37 |
+
```php
|
38 |
+
use Automattic\Jetpack\Connection\Manager;
|
39 |
+
|
40 |
+
add_action( 'admin_post_connect_user', 'your_plugin_connect_user' ) );
|
41 |
+
|
42 |
+
function your_plugin_register_site() {
|
43 |
+
check_admin_referer( 'connect-user' );
|
44 |
+
( new Manager( 'plugin-slug' ) )->connect_user();
|
45 |
+
}
|
46 |
+
```
|
47 |
+
|
48 |
+
After the connection process is done, the user should have the user
|
49 |
+
token added to the options, and you will be able to retrieve it with a
|
50 |
+
`get_access_token` call.
|
vendor/automattic/jetpack-connection/docs/register-site.md
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Register the site / Create blog token
|
2 |
+
|
3 |
+
This means registering the site with WordPress.com. It will create a "site (or 'blog') token" on both sides, establishing a secure two-way communication path.
|
4 |
+
|
5 |
+
The blog token is required in order to [authenticate at a user level](authorize-user.md) later (link to user auth docs here), so let's learn the simplest way we can do that in your plugin.
|
6 |
+
|
7 |
+
### Install the right packages
|
8 |
+
|
9 |
+
First, let's make sure that the `automattic/jetpack-connection` package is set up in your composer.json file:
|
10 |
+
|
11 |
+
At minimum you need three things. One is the `automattic/jetpack-autoloader` package, which will ensure that you're not colliding with any other plugins on the site that may be including the same packages. Two, of course, is the `automattic/jetpack-connection` package. Third is our `automattic/jetpack-config` package that will be your tool for initializing the packages.
|
12 |
+
|
13 |
+
We recommend that you always use the latest published versions of our packages, but you can also run our latest master branch builds:
|
14 |
+
```
|
15 |
+
{
|
16 |
+
"name": "you/your-awesome-plugin",
|
17 |
+
"description": "Super awesome plugin!",
|
18 |
+
"type": "package",
|
19 |
+
"license": "GPL-2.0-or-later",
|
20 |
+
"authors": [
|
21 |
+
{
|
22 |
+
"name": "Your name",
|
23 |
+
"email": "your@email.com"
|
24 |
+
}
|
25 |
+
],
|
26 |
+
"minimum-stability": "dev",
|
27 |
+
"require": {
|
28 |
+
"automattic/jetpack-autoloader": "dev-master",
|
29 |
+
"automattic/jetpack-config": "dev-master",
|
30 |
+
"automattic/jetpack-connection": "dev-master"
|
31 |
+
}
|
32 |
+
}
|
33 |
+
```
|
34 |
+
|
35 |
+
### Initialize the package
|
36 |
+
|
37 |
+
Second, we must initialize ("configure") the `jetpack-connection` package within your plugin, and provide the information about it.
|
38 |
+
|
39 |
+
This is where the `jetpack-config` and `jetpack-autoload` packages come into play. Do this, and you're ready to start consuming the Jetpack connection!
|
40 |
+
|
41 |
+
```php
|
42 |
+
use Automattic\Jetpack\Config;
|
43 |
+
|
44 |
+
require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';
|
45 |
+
|
46 |
+
function jpcs_load_plugin() {
|
47 |
+
|
48 |
+
// Here we enable the Jetpack packages.
|
49 |
+
$config = new Config();
|
50 |
+
$config->ensure(
|
51 |
+
'connection',
|
52 |
+
array(
|
53 |
+
'slug' => 'plugin-slug', // Required, slug of your plugin, should be unique.
|
54 |
+
'name' => 'Plugin Name', // Required, your plugin name.
|
55 |
+
'url_info' => 'https://example.org/conneciton-info', // Optional, URL of the connection info page.
|
56 |
+
)
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
add_action( 'plugins_loaded', 'jpcs_load_plugin', 1 );
|
61 |
+
```
|
62 |
+
|
63 |
+
### Create admin_post endpoint
|
64 |
+
|
65 |
+
```php
|
66 |
+
use Automattic\Jetpack\Connection\Manager;
|
67 |
+
|
68 |
+
add_action( 'admin_post_register_site', 'your_plugin_register_site' );
|
69 |
+
|
70 |
+
function your_plugin_register_site() {
|
71 |
+
check_admin_referer( 'register-site' );
|
72 |
+
( new Manager( 'plugin-slug' ) )->register();
|
73 |
+
|
74 |
+
// This is where you could put your error handling, redirects, or whatever decorations you need.
|
75 |
+
}
|
76 |
+
```
|
77 |
+
|
78 |
+
### Make the button!
|
79 |
+
|
80 |
+
How are people supposed to register without something to click? I guess they would have to write their own plugin. Or you can make them a button that feeds into the admin_post endpoint you just created...
|
81 |
+
|
82 |
+
```html
|
83 |
+
<form action="/wp-admin/admin-post.php" method="post">
|
84 |
+
<input type="hidden" name="action" value="register_site" />
|
85 |
+
<?php wp_nonce_field( 'register-site' ); ?>
|
86 |
+
<input type="submit" value="Register this site" class="button button-primary" />
|
87 |
+
</form>
|
88 |
+
```
|
89 |
+
|
90 |
+
### Voila!
|
91 |
+
|
92 |
+
And that's it! You've just created a button that will register a WordPress site with WordPress.com. Now the only thing left to do is [authorize the user](authorize-user.md).
|
93 |
+
|
94 |
+
### Disconnect the site
|
95 |
+
|
96 |
+
When disconnecting the site, we recommend also clearing the remaining user tokens, since those won't work anyway and may cause problems on reconnection.
|
97 |
+
|
98 |
+
```php
|
99 |
+
use Automattic\Jetpack\Connection\Manager;
|
100 |
+
|
101 |
+
function your_plugin_disconnect_site() {
|
102 |
+
check_admin_referer( 'disconnect-site' );
|
103 |
+
|
104 |
+
// This will destroy the blog tokens on both this site, and the tokens stored on wordpress.com
|
105 |
+
( new Manager( 'plugin-slug' ) )->disconnect_site_wpcom();
|
106 |
+
|
107 |
+
// Clear all the tokens!
|
108 |
+
( new Manager( 'plugin-slug' ) )->delete_all_connection_tokens();
|
109 |
+
|
110 |
+
// Your error handling and decorations
|
111 |
+
}
|
112 |
+
```
|
vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* IXR_Client
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*
|
7 |
+
* @since 1.5
|
8 |
+
* @since 7.7 Moved to the jetpack-connection package.
|
9 |
+
*/
|
10 |
+
|
11 |
+
use Automattic\Jetpack\Connection\Client;
|
12 |
+
use Automattic\Jetpack\Connection\Manager;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* A Jetpack implementation of the WordPress core IXR client.
|
16 |
+
*/
|
17 |
+
class Jetpack_IXR_Client extends IXR_Client {
|
18 |
+
/**
|
19 |
+
* Jetpack args, used for the remote requests.
|
20 |
+
*
|
21 |
+
* @var array
|
22 |
+
*/
|
23 |
+
public $jetpack_args = null;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Constructor.
|
27 |
+
* Initialize a new Jetpack IXR client instance.
|
28 |
+
*
|
29 |
+
* @param array $args Jetpack args, used for the remote requests.
|
30 |
+
* @param string|bool $path Path to perform the reuqest to.
|
31 |
+
* @param int $port Port number.
|
32 |
+
* @param int $timeout The connection timeout, in seconds.
|
33 |
+
*/
|
34 |
+
public function __construct( $args = array(), $path = false, $port = 80, $timeout = 15 ) {
|
35 |
+
$connection = new Manager();
|
36 |
+
|
37 |
+
$defaults = array(
|
38 |
+
'url' => $connection->xmlrpc_api_url(),
|
39 |
+
'user_id' => 0,
|
40 |
+
);
|
41 |
+
|
42 |
+
$args = wp_parse_args( $args, $defaults );
|
43 |
+
|
44 |
+
$this->jetpack_args = $args;
|
45 |
+
|
46 |
+
$this->IXR_Client( $args['url'], $path, $port, $timeout );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Perform the IXR request.
|
51 |
+
*
|
52 |
+
* @return bool True if request succeeded, false otherwise.
|
53 |
+
*/
|
54 |
+
public function query() {
|
55 |
+
$args = func_get_args();
|
56 |
+
$method = array_shift( $args );
|
57 |
+
$request = new IXR_Request( $method, $args );
|
58 |
+
$xml = trim( $request->getXml() );
|
59 |
+
|
60 |
+
$response = Client::remote_request( $this->jetpack_args, $xml );
|
61 |
+
|
62 |
+
if ( is_wp_error( $response ) ) {
|
63 |
+
$this->error = new IXR_Error( -10520, sprintf( 'Jetpack: [%s] %s', $response->get_error_code(), $response->get_error_message() ) );
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( ! $response ) {
|
68 |
+
$this->error = new IXR_Error( -10520, 'Jetpack: Unknown Error' );
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
73 |
+
$this->error = new IXR_Error( -32300, 'transport error - HTTP status code was not 200' );
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
$content = wp_remote_retrieve_body( $response );
|
78 |
+
|
79 |
+
// Now parse what we've got back.
|
80 |
+
$this->message = new IXR_Message( $content );
|
81 |
+
if ( ! $this->message->parse() ) {
|
82 |
+
// XML error.
|
83 |
+
$this->error = new IXR_Error( -32700, 'parse error. not well formed' );
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
// Is the message a fault?
|
88 |
+
if ( 'fault' === $this->message->messageType ) {
|
89 |
+
$this->error = new IXR_Error( $this->message->faultCode, $this->message->faultString );
|
90 |
+
return false;
|
91 |
+
}
|
92 |
+
|
93 |
+
// Message must be OK.
|
94 |
+
return true;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Retrieve the Jetpack error from the result of the last request.
|
99 |
+
*
|
100 |
+
* @param int $fault_code Fault code.
|
101 |
+
* @param string $fault_string Fault string.
|
102 |
+
* @return WP_Error Error object.
|
103 |
+
*/
|
104 |
+
public function get_jetpack_error( $fault_code = null, $fault_string = null ) {
|
105 |
+
if ( is_null( $fault_code ) ) {
|
106 |
+
$fault_code = $this->error->code;
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( is_null( $fault_string ) ) {
|
110 |
+
$fault_string = $this->error->message;
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( preg_match( '#jetpack:\s+\[(\w+)\]\s*(.*)?$#i', $fault_string, $match ) ) {
|
114 |
+
$code = $match[1];
|
115 |
+
$message = $match[2];
|
116 |
+
$status = $fault_code;
|
117 |
+
return new \WP_Error( $code, $message, $status );
|
118 |
+
}
|
119 |
+
|
120 |
+
return new \WP_Error( "IXR_{$fault_code}", $fault_string );
|
121 |
+
}
|
122 |
+
}
|
vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* IXR_ClientMulticall
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*
|
7 |
+
* @since 1.5
|
8 |
+
* @since 7.7 Moved to the jetpack-connection package.
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* A Jetpack implementation of the WordPress core IXR client, capable of multiple calls in a single request.
|
13 |
+
*/
|
14 |
+
class Jetpack_IXR_ClientMulticall extends Jetpack_IXR_Client {
|
15 |
+
/**
|
16 |
+
* Storage for the IXR calls.
|
17 |
+
*
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
public $calls = array();
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Add a IXR call to the client.
|
24 |
+
* First argument is the method name.
|
25 |
+
* The rest of the arguments are the params specified to the method.
|
26 |
+
*/
|
27 |
+
public function addCall() {
|
28 |
+
$args = func_get_args();
|
29 |
+
$method_name = array_shift( $args );
|
30 |
+
$struct = array(
|
31 |
+
'methodName' => $method_name,
|
32 |
+
'params' => $args,
|
33 |
+
);
|
34 |
+
$this->calls[] = $struct;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Perform the IXR multicall request.
|
39 |
+
*
|
40 |
+
* @return bool True if request succeeded, false otherwise.
|
41 |
+
*/
|
42 |
+
public function query() {
|
43 |
+
usort( $this->calls, array( $this, 'sort_calls' ) );
|
44 |
+
|
45 |
+
// Prepare multicall, then call the parent::query() method.
|
46 |
+
return parent::query( 'system.multicall', $this->calls );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Sort the IXR calls.
|
51 |
+
* Make sure syncs are always done first.
|
52 |
+
*
|
53 |
+
* @param array $a First call in the sorting iteration.
|
54 |
+
* @param array $b Second call in the sorting iteration.
|
55 |
+
* @return int Result of the sorting iteration.
|
56 |
+
*/
|
57 |
+
public function sort_calls( $a, $b ) {
|
58 |
+
if ( 'jetpack.syncContent' === $a['methodName'] ) {
|
59 |
+
return -1;
|
60 |
+
}
|
61 |
+
|
62 |
+
if ( 'jetpack.syncContent' === $b['methodName'] ) {
|
63 |
+
return 1;
|
64 |
+
}
|
65 |
+
|
66 |
+
return 0;
|
67 |
+
}
|
68 |
+
}
|
vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Jetpack Connection signature class file.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* The Jetpack Connection signature class that is used to sign requests.
|
12 |
+
*/
|
13 |
+
class Jetpack_Signature {
|
14 |
+
/**
|
15 |
+
* Token part of the access token.
|
16 |
+
*
|
17 |
+
* @access public
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
public $token;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Access token secret.
|
24 |
+
*
|
25 |
+
* @access public
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $secret;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* The current request URL.
|
32 |
+
*
|
33 |
+
* @access public
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $current_request_url;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Constructor.
|
40 |
+
*
|
41 |
+
* @param array $access_token Access token.
|
42 |
+
* @param int $time_diff Timezone difference (in seconds).
|
43 |
+
*/
|
44 |
+
public function __construct( $access_token, $time_diff = 0 ) {
|
45 |
+
$secret = explode( '.', $access_token );
|
46 |
+
if ( 2 !== count( $secret ) ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
$this->token = $secret[0];
|
51 |
+
$this->secret = $secret[1];
|
52 |
+
$this->time_diff = $time_diff;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Sign the current request.
|
57 |
+
*
|
58 |
+
* @todo Implement a proper nonce verification.
|
59 |
+
*
|
60 |
+
* @param array $override Optional arguments to override the ones from the current request.
|
61 |
+
* @return string|WP_Error Request signature, or a WP_Error on failure.
|
62 |
+
*/
|
63 |
+
public function sign_current_request( $override = array() ) {
|
64 |
+
if ( isset( $override['scheme'] ) ) {
|
65 |
+
$scheme = $override['scheme'];
|
66 |
+
if ( ! in_array( $scheme, array( 'http', 'https' ), true ) ) {
|
67 |
+
return new WP_Error( 'invalid_scheme', 'Invalid URL scheme' );
|
68 |
+
}
|
69 |
+
} else {
|
70 |
+
if ( is_ssl() ) {
|
71 |
+
$scheme = 'https';
|
72 |
+
} else {
|
73 |
+
$scheme = 'http';
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
$host_port = isset( $_SERVER['HTTP_X_FORWARDED_PORT'] ) ? $_SERVER['HTTP_X_FORWARDED_PORT'] : $_SERVER['SERVER_PORT'];
|
78 |
+
$host_port = intval( $host_port );
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Note: This port logic is tested in the Jetpack_Cxn_Tests->test__server_port_value() test.
|
82 |
+
* Please update the test if any changes are made in this logic.
|
83 |
+
*/
|
84 |
+
if ( is_ssl() ) {
|
85 |
+
// 443: Standard Port
|
86 |
+
// 80: Assume we're behind a proxy without X-Forwarded-Port. Hardcoding "80" here means most sites
|
87 |
+
// with SSL termination proxies (self-served, Cloudflare, etc.) don't need to fiddle with
|
88 |
+
// the JETPACK_SIGNATURE__HTTPS_PORT constant. The code also implies we can't talk to a
|
89 |
+
// site at https://example.com:80/ (which would be a strange configuration).
|
90 |
+
// JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the back end webserver's port
|
91 |
+
// if the site is behind a proxy running on port 443 without
|
92 |
+
// X-Forwarded-Port and the back end's port is *not* 80. It's better,
|
93 |
+
// though, to configure the proxy to send X-Forwarded-Port.
|
94 |
+
$https_port = defined( 'JETPACK_SIGNATURE__HTTPS_PORT' ) ? JETPACK_SIGNATURE__HTTPS_PORT : 443;
|
95 |
+
$port = in_array( $host_port, array( 443, 80, $https_port ), false ) ? '' : $host_port; // phpcs:ignore WordPress.PHP.StrictInArray.FoundNonStrictFalse
|
96 |
+
} else {
|
97 |
+
// 80: Standard Port
|
98 |
+
// JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the back end webserver's port
|
99 |
+
// if the site is behind a proxy running on port 80 without
|
100 |
+
// X-Forwarded-Port. It's better, though, to configure the proxy to
|
101 |
+
// send X-Forwarded-Port.
|
102 |
+
$http_port = defined( 'JETPACK_SIGNATURE__HTTP_PORT' ) ? JETPACK_SIGNATURE__HTTP_PORT : 80;
|
103 |
+
$port = in_array( $host_port, array( 80, $http_port ), false ) ? '' : $host_port; // phpcs:ignore WordPress.PHP.StrictInArray.FoundNonStrictFalse
|
104 |
+
}
|
105 |
+
|
106 |
+
$this->current_request_url = "{$scheme}://{$_SERVER['HTTP_HOST']}:{$port}" . stripslashes( $_SERVER['REQUEST_URI'] );
|
107 |
+
|
108 |
+
if ( array_key_exists( 'body', $override ) && ! empty( $override['body'] ) ) {
|
109 |
+
$body = $override['body'];
|
110 |
+
} elseif ( 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
111 |
+
$body = isset( $GLOBALS['HTTP_RAW_POST_DATA'] ) ? $GLOBALS['HTTP_RAW_POST_DATA'] : null;
|
112 |
+
|
113 |
+
// Convert the $_POST to the body, if the body was empty. This is how arrays are hashed
|
114 |
+
// and encoded on the Jetpack side.
|
115 |
+
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
|
116 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
117 |
+
if ( empty( $body ) && is_array( $_POST ) && count( $_POST ) > 0 ) {
|
118 |
+
$body = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
119 |
+
}
|
120 |
+
}
|
121 |
+
} elseif ( 'PUT' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
122 |
+
// This is a little strange-looking, but there doesn't seem to be another way to get the PUT body.
|
123 |
+
$raw_put_data = file_get_contents( 'php://input' );
|
124 |
+
parse_str( $raw_put_data, $body );
|
125 |
+
|
126 |
+
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
|
127 |
+
$put_data = json_decode( $raw_put_data, true );
|
128 |
+
if ( is_array( $put_data ) && count( $put_data ) > 0 ) {
|
129 |
+
$body = $put_data;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
} else {
|
133 |
+
$body = null;
|
134 |
+
}
|
135 |
+
|
136 |
+
if ( empty( $body ) ) {
|
137 |
+
$body = null;
|
138 |
+
}
|
139 |
+
|
140 |
+
$a = array();
|
141 |
+
foreach ( array( 'token', 'timestamp', 'nonce', 'body-hash' ) as $parameter ) {
|
142 |
+
if ( isset( $override[ $parameter ] ) ) {
|
143 |
+
$a[ $parameter ] = $override[ $parameter ];
|
144 |
+
} else {
|
145 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
146 |
+
$a[ $parameter ] = isset( $_GET[ $parameter ] ) ? stripslashes( $_GET[ $parameter ] ) : '';
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
$method = isset( $override['method'] ) ? $override['method'] : $_SERVER['REQUEST_METHOD'];
|
151 |
+
return $this->sign_request( $a['token'], $a['timestamp'], $a['nonce'], $a['body-hash'], $method, $this->current_request_url, $body, true );
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Sign a specified request.
|
156 |
+
*
|
157 |
+
* @todo Having body_hash v. body-hash is annoying. Refactor to accept an array?
|
158 |
+
* @todo Use wp_json_encode() instead of json_encode()?
|
159 |
+
*
|
160 |
+
* @param string $token Request token.
|
161 |
+
* @param int $timestamp Timestamp of the request.
|
162 |
+
* @param string $nonce Request nonce.
|
163 |
+
* @param string $body_hash Request body hash.
|
164 |
+
* @param string $method Request method.
|
165 |
+
* @param string $url Request URL.
|
166 |
+
* @param mixed $body Request body.
|
167 |
+
* @param bool $verify_body_hash Whether to verify the body hash against the body.
|
168 |
+
* @return string|WP_Error Request signature, or a WP_Error on failure.
|
169 |
+
*/
|
170 |
+
public function sign_request( $token = '', $timestamp = 0, $nonce = '', $body_hash = '', $method = '', $url = '', $body = null, $verify_body_hash = true ) {
|
171 |
+
if ( ! $this->secret ) {
|
172 |
+
return new WP_Error( 'invalid_secret', 'Invalid secret' );
|
173 |
+
}
|
174 |
+
|
175 |
+
if ( ! $this->token ) {
|
176 |
+
return new WP_Error( 'invalid_token', 'Invalid token' );
|
177 |
+
}
|
178 |
+
|
179 |
+
list( $token ) = explode( '.', $token );
|
180 |
+
|
181 |
+
$signature_details = compact( 'token', 'timestamp', 'nonce', 'body_hash', 'method', 'url' );
|
182 |
+
|
183 |
+
if ( 0 !== strpos( $token, "$this->token:" ) ) {
|
184 |
+
return new WP_Error( 'token_mismatch', 'Incorrect token', compact( 'signature_details' ) );
|
185 |
+
}
|
186 |
+
|
187 |
+
// If we got an array at this point, let's encode it, so we can see what it looks like as a string.
|
188 |
+
if ( is_array( $body ) ) {
|
189 |
+
if ( count( $body ) > 0 ) {
|
190 |
+
// phpcs:ignore WordPress.WP.AlternativeFunctions.json_encode_json_encode
|
191 |
+
$body = json_encode( $body );
|
192 |
+
|
193 |
+
} else {
|
194 |
+
$body = '';
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
$required_parameters = array( 'token', 'timestamp', 'nonce', 'method', 'url' );
|
199 |
+
if ( ! is_null( $body ) ) {
|
200 |
+
$required_parameters[] = 'body_hash';
|
201 |
+
if ( ! is_string( $body ) ) {
|
202 |
+
return new WP_Error( 'invalid_body', 'Body is malformed.', compact( 'signature_details' ) );
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
foreach ( $required_parameters as $required ) {
|
207 |
+
if ( ! is_scalar( $$required ) ) {
|
208 |
+
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', str_replace( '_', '-', $required ) ), compact( 'signature_details' ) );
|
209 |
+
}
|
210 |
+
|
211 |
+
if ( ! strlen( $$required ) ) {
|
212 |
+
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is missing.', str_replace( '_', '-', $required ) ), compact( 'signature_details' ) );
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
if ( empty( $body ) ) {
|
217 |
+
if ( $body_hash ) {
|
218 |
+
return new WP_Error( 'invalid_body_hash', 'Invalid body hash for empty body.', compact( 'signature_details' ) );
|
219 |
+
}
|
220 |
+
} else {
|
221 |
+
$connection = new Connection_Manager();
|
222 |
+
if ( $verify_body_hash && $connection->sha1_base64( $body ) !== $body_hash ) {
|
223 |
+
return new WP_Error( 'invalid_body_hash', 'The body hash does not match.', compact( 'signature_details' ) );
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
$parsed = wp_parse_url( $url );
|
228 |
+
if ( ! isset( $parsed['host'] ) ) {
|
229 |
+
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'url' ), compact( 'signature_details' ) );
|
230 |
+
}
|
231 |
+
|
232 |
+
if ( ! empty( $parsed['port'] ) ) {
|
233 |
+
$port = $parsed['port'];
|
234 |
+
} else {
|
235 |
+
if ( 'http' === $parsed['scheme'] ) {
|
236 |
+
$port = 80;
|
237 |
+
} elseif ( 'https' === $parsed['scheme'] ) {
|
238 |
+
$port = 443;
|
239 |
+
} else {
|
240 |
+
return new WP_Error( 'unknown_scheme_port', "The scheme's port is unknown", compact( 'signature_details' ) );
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
if ( ! ctype_digit( "$timestamp" ) || 10 < strlen( $timestamp ) ) { // If Jetpack is around in 275 years, you can blame mdawaffe for the bug.
|
245 |
+
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'timestamp' ), compact( 'signature_details' ) );
|
246 |
+
}
|
247 |
+
|
248 |
+
$local_time = $timestamp - $this->time_diff;
|
249 |
+
if ( $local_time < time() - 600 || $local_time > time() + 300 ) {
|
250 |
+
return new WP_Error( 'invalid_signature', 'The timestamp is too old.', compact( 'signature_details' ) );
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( 12 < strlen( $nonce ) || preg_match( '/[^a-zA-Z0-9]/', $nonce ) ) {
|
254 |
+
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'nonce' ), compact( 'signature_details' ) );
|
255 |
+
}
|
256 |
+
|
257 |
+
$normalized_request_pieces = array(
|
258 |
+
$token,
|
259 |
+
$timestamp,
|
260 |
+
$nonce,
|
261 |
+
$body_hash,
|
262 |
+
strtoupper( $method ),
|
263 |
+
strtolower( $parsed['host'] ),
|
264 |
+
$port,
|
265 |
+
$parsed['path'],
|
266 |
+
// Normalized Query String.
|
267 |
+
);
|
268 |
+
|
269 |
+
$normalized_request_pieces = array_merge( $normalized_request_pieces, $this->normalized_query_parameters( isset( $parsed['query'] ) ? $parsed['query'] : '' ) );
|
270 |
+
$flat_normalized_request_pieces = array();
|
271 |
+
foreach ( $normalized_request_pieces as $piece ) {
|
272 |
+
if ( is_array( $piece ) ) {
|
273 |
+
foreach ( $piece as $subpiece ) {
|
274 |
+
$flat_normalized_request_pieces[] = $subpiece;
|
275 |
+
}
|
276 |
+
} else {
|
277 |
+
$flat_normalized_request_pieces[] = $piece;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
$normalized_request_pieces = $flat_normalized_request_pieces;
|
281 |
+
|
282 |
+
$normalized_request_string = join( "\n", $normalized_request_pieces ) . "\n";
|
283 |
+
|
284 |
+
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
285 |
+
return base64_encode( hash_hmac( 'sha1', $normalized_request_string, $this->secret, true ) );
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Retrieve and normalize the parameters from a query string.
|
290 |
+
*
|
291 |
+
* @param string $query_string Query string.
|
292 |
+
* @return array Normalized query string parameters.
|
293 |
+
*/
|
294 |
+
public function normalized_query_parameters( $query_string ) {
|
295 |
+
parse_str( $query_string, $array );
|
296 |
+
|
297 |
+
unset( $array['signature'] );
|
298 |
+
|
299 |
+
$names = array_keys( $array );
|
300 |
+
$values = array_values( $array );
|
301 |
+
|
302 |
+
$names = array_map( array( $this, 'encode_3986' ), $names );
|
303 |
+
$values = array_map( array( $this, 'encode_3986' ), $values );
|
304 |
+
|
305 |
+
$pairs = array_map( array( $this, 'join_with_equal_sign' ), $names, $values );
|
306 |
+
|
307 |
+
sort( $pairs );
|
308 |
+
|
309 |
+
return $pairs;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Encodes a string or array of strings according to RFC 3986.
|
314 |
+
*
|
315 |
+
* @param string|array $string_or_array String or array to encode.
|
316 |
+
* @return string|array URL-encoded string or array.
|
317 |
+
*/
|
318 |
+
public function encode_3986( $string_or_array ) {
|
319 |
+
if ( is_array( $string_or_array ) ) {
|
320 |
+
return array_map( array( $this, 'encode_3986' ), $string_or_array );
|
321 |
+
}
|
322 |
+
|
323 |
+
return rawurlencode( $string_or_array );
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Concatenates a parameter name and a parameter value with an equals sign between them.
|
328 |
+
* Supports one-dimensional arrays as `$value`.
|
329 |
+
*
|
330 |
+
* @param string $name Parameter name.
|
331 |
+
* @param mixed $value Parameter value.
|
332 |
+
* @return string A pair with parameter name and value (e.g. `name=value`).
|
333 |
+
*/
|
334 |
+
public function join_with_equal_sign( $name, $value ) {
|
335 |
+
if ( is_array( $value ) ) {
|
336 |
+
$result = array();
|
337 |
+
foreach ( $value as $array_key => $array_value ) {
|
338 |
+
$result[] = $name . '[' . $array_key . ']=' . $array_value;
|
339 |
+
}
|
340 |
+
return $result;
|
341 |
+
}
|
342 |
+
return "{$name}={$value}";
|
343 |
+
}
|
344 |
+
}
|
vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php
ADDED
@@ -0,0 +1,943 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Jetpack XMLRPC Server.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
use Automattic\Jetpack\Connection\Client;
|
9 |
+
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
|
10 |
+
use Automattic\Jetpack\Connection\Utils as Connection_Utils;
|
11 |
+
use Automattic\Jetpack\Roles;
|
12 |
+
use Automattic\Jetpack\Sync\Modules;
|
13 |
+
use Automattic\Jetpack\Sync\Functions;
|
14 |
+
use Automattic\Jetpack\Sync\Sender;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Just a sack of functions. Not actually an IXR_Server
|
18 |
+
*/
|
19 |
+
class Jetpack_XMLRPC_Server {
|
20 |
+
/**
|
21 |
+
* The current error object
|
22 |
+
*
|
23 |
+
* @var \WP_Error
|
24 |
+
*/
|
25 |
+
public $error = null;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* The current user
|
29 |
+
*
|
30 |
+
* @var \WP_User
|
31 |
+
*/
|
32 |
+
public $user = null;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The connection manager object.
|
36 |
+
*
|
37 |
+
* @var Automattic\Jetpack\Connection\Manager
|
38 |
+
*/
|
39 |
+
private $connection;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Creates a new XMLRPC server object.
|
43 |
+
*
|
44 |
+
* @param Automattic\Jetpack\Connection\Manager $manager the connection manager object.
|
45 |
+
*/
|
46 |
+
public function __construct( $manager = null ) {
|
47 |
+
$this->connection = is_null( $manager ) ? new Connection_Manager() : $manager;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Whitelist of the XML-RPC methods available to the Jetpack Server. If the
|
52 |
+
* user is not authenticated (->login()) then the methods are never added,
|
53 |
+
* so they will get a "does not exist" error.
|
54 |
+
*
|
55 |
+
* @param array $core_methods Core XMLRPC methods.
|
56 |
+
*/
|
57 |
+
public function xmlrpc_methods( $core_methods ) {
|
58 |
+
$jetpack_methods = array(
|
59 |
+
'jetpack.jsonAPI' => array( $this, 'json_api' ),
|
60 |
+
'jetpack.verifyAction' => array( $this, 'verify_action' ),
|
61 |
+
'jetpack.getUser' => array( $this, 'get_user' ),
|
62 |
+
'jetpack.remoteRegister' => array( $this, 'remote_register' ),
|
63 |
+
'jetpack.remoteProvision' => array( $this, 'remote_provision' ),
|
64 |
+
);
|
65 |
+
|
66 |
+
$this->user = $this->login();
|
67 |
+
|
68 |
+
if ( $this->user ) {
|
69 |
+
$jetpack_methods = array_merge(
|
70 |
+
$jetpack_methods,
|
71 |
+
array(
|
72 |
+
'jetpack.testConnection' => array( $this, 'test_connection' ),
|
73 |
+
'jetpack.testAPIUserCode' => array( $this, 'test_api_user_code' ),
|
74 |
+
'jetpack.featuresAvailable' => array( $this, 'features_available' ),
|
75 |
+
'jetpack.featuresEnabled' => array( $this, 'features_enabled' ),
|
76 |
+
'jetpack.disconnectBlog' => array( $this, 'disconnect_blog' ),
|
77 |
+
'jetpack.unlinkUser' => array( $this, 'unlink_user' ),
|
78 |
+
'jetpack.idcUrlValidation' => array( $this, 'validate_urls_for_idc_mitigation' ),
|
79 |
+
)
|
80 |
+
);
|
81 |
+
|
82 |
+
if ( isset( $core_methods['metaWeblog.editPost'] ) ) {
|
83 |
+
$jetpack_methods['metaWeblog.newMediaObject'] = $core_methods['metaWeblog.newMediaObject'];
|
84 |
+
$jetpack_methods['jetpack.updateAttachmentParent'] = array( $this, 'update_attachment_parent' );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Filters the XML-RPC methods available to Jetpack for authenticated users.
|
89 |
+
*
|
90 |
+
* @since 1.1.0
|
91 |
+
*
|
92 |
+
* @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
|
93 |
+
* @param array $core_methods Available core XML-RPC methods.
|
94 |
+
* @param \WP_User $user Information about a given WordPress user.
|
95 |
+
*/
|
96 |
+
$jetpack_methods = apply_filters( 'jetpack_xmlrpc_methods', $jetpack_methods, $core_methods, $this->user );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Filters the XML-RPC methods available to Jetpack for unauthenticated users.
|
101 |
+
*
|
102 |
+
* @since 3.0.0
|
103 |
+
*
|
104 |
+
* @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
|
105 |
+
* @param array $core_methods Available core XML-RPC methods.
|
106 |
+
*/
|
107 |
+
return apply_filters( 'jetpack_xmlrpc_unauthenticated_methods', $jetpack_methods, $core_methods );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Whitelist of the bootstrap XML-RPC methods
|
112 |
+
*/
|
113 |
+
public function bootstrap_xmlrpc_methods() {
|
114 |
+
return array(
|
115 |
+
'jetpack.remoteAuthorize' => array( $this, 'remote_authorize' ),
|
116 |
+
'jetpack.remoteRegister' => array( $this, 'remote_register' ),
|
117 |
+
);
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Additional method needed for authorization calls.
|
122 |
+
*/
|
123 |
+
public function authorize_xmlrpc_methods() {
|
124 |
+
return array(
|
125 |
+
'jetpack.remoteAuthorize' => array( $this, 'remote_authorize' ),
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Remote provisioning methods.
|
131 |
+
*/
|
132 |
+
public function provision_xmlrpc_methods() {
|
133 |
+
return array(
|
134 |
+
'jetpack.remoteRegister' => array( $this, 'remote_register' ),
|
135 |
+
'jetpack.remoteProvision' => array( $this, 'remote_provision' ),
|
136 |
+
'jetpack.remoteConnect' => array( $this, 'remote_connect' ),
|
137 |
+
'jetpack.getUser' => array( $this, 'get_user' ),
|
138 |
+
);
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Used to verify whether a local user exists and what role they have.
|
143 |
+
*
|
144 |
+
* @param int|string|array $request One of:
|
145 |
+
* int|string The local User's ID, username, or email address.
|
146 |
+
* array A request array containing:
|
147 |
+
* 0: int|string The local User's ID, username, or email address.
|
148 |
+
*
|
149 |
+
* @return array|\IXR_Error Information about the user, or error if no such user found:
|
150 |
+
* roles: string[] The user's rols.
|
151 |
+
* login: string The user's username.
|
152 |
+
* email_hash string[] The MD5 hash of the user's normalized email address.
|
153 |
+
* caps string[] The user's capabilities.
|
154 |
+
* allcaps string[] The user's granular capabilities, merged from role capabilities.
|
155 |
+
* token_key string The Token Key of the user's Jetpack token. Empty string if none.
|
156 |
+
*/
|
157 |
+
public function get_user( $request ) {
|
158 |
+
$user_id = is_array( $request ) ? $request[0] : $request;
|
159 |
+
|
160 |
+
if ( ! $user_id ) {
|
161 |
+
return $this->error(
|
162 |
+
new Jetpack_Error(
|
163 |
+
'invalid_user',
|
164 |
+
__( 'Invalid user identifier.', 'jetpack' ),
|
165 |
+
400
|
166 |
+
),
|
167 |
+
'get_user'
|
168 |
+
);
|
169 |
+
}
|
170 |
+
|
171 |
+
$user = $this->get_user_by_anything( $user_id );
|
172 |
+
|
173 |
+
if ( ! $user ) {
|
174 |
+
return $this->error(
|
175 |
+
new Jetpack_Error(
|
176 |
+
'user_unknown',
|
177 |
+
__( 'User not found.', 'jetpack' ),
|
178 |
+
404
|
179 |
+
),
|
180 |
+
'get_user'
|
181 |
+
);
|
182 |
+
}
|
183 |
+
|
184 |
+
$user_token = $this->connection->get_access_token( $user->ID );
|
185 |
+
|
186 |
+
if ( $user_token ) {
|
187 |
+
list( $user_token_key ) = explode( '.', $user_token->secret );
|
188 |
+
if ( $user_token_key === $user_token->secret ) {
|
189 |
+
$user_token_key = '';
|
190 |
+
}
|
191 |
+
} else {
|
192 |
+
$user_token_key = '';
|
193 |
+
}
|
194 |
+
|
195 |
+
return array(
|
196 |
+
'id' => $user->ID,
|
197 |
+
'login' => $user->user_login,
|
198 |
+
'email_hash' => md5( strtolower( trim( $user->user_email ) ) ),
|
199 |
+
'roles' => $user->roles,
|
200 |
+
'caps' => $user->caps,
|
201 |
+
'allcaps' => $user->allcaps,
|
202 |
+
'token_key' => $user_token_key,
|
203 |
+
);
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Remote authorization XMLRPC method handler.
|
208 |
+
*
|
209 |
+
* @param array $request the request.
|
210 |
+
*/
|
211 |
+
public function remote_authorize( $request ) {
|
212 |
+
$user = get_user_by( 'id', $request['state'] );
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Happens on various request handling events in the Jetpack XMLRPC server.
|
216 |
+
* The action combines several types of events:
|
217 |
+
* - remote_authorize
|
218 |
+
* - remote_provision
|
219 |
+
* - get_user.
|
220 |
+
*
|
221 |
+
* @since 8.0.0
|
222 |
+
*
|
223 |
+
* @param String $action the action name, i.e., 'remote_authorize'.
|
224 |
+
* @param String $stage the execution stage, can be 'begin', 'success', 'error', etc.
|
225 |
+
* @param array $parameters extra parameters from the event.
|
226 |
+
* @param WP_User $user the acting user.
|
227 |
+
*/
|
228 |
+
do_action( 'jetpack_xmlrpc_server_event', 'remote_authorize', 'begin', array(), $user );
|
229 |
+
|
230 |
+
foreach ( array( 'secret', 'state', 'redirect_uri', 'code' ) as $required ) {
|
231 |
+
if ( ! isset( $request[ $required ] ) || empty( $request[ $required ] ) ) {
|
232 |
+
return $this->error(
|
233 |
+
new Jetpack_Error( 'missing_parameter', 'One or more parameters is missing from the request.', 400 ),
|
234 |
+
'remote_authorize'
|
235 |
+
);
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
if ( ! $user ) {
|
240 |
+
return $this->error( new Jetpack_Error( 'user_unknown', 'User not found.', 404 ), 'remote_authorize' );
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( $this->connection->is_active() && $this->connection->is_user_connected( $request['state'] ) ) {
|
244 |
+
return $this->error( new Jetpack_Error( 'already_connected', 'User already connected.', 400 ), 'remote_authorize' );
|
245 |
+
}
|
246 |
+
|
247 |
+
$verified = $this->verify_action( array( 'authorize', $request['secret'], $request['state'] ) );
|
248 |
+
|
249 |
+
if ( is_a( $verified, 'IXR_Error' ) ) {
|
250 |
+
return $this->error( $verified, 'remote_authorize' );
|
251 |
+
}
|
252 |
+
|
253 |
+
wp_set_current_user( $request['state'] );
|
254 |
+
|
255 |
+
$result = $this->connection->authorize( $request );
|
256 |
+
|
257 |
+
if ( is_wp_error( $result ) ) {
|
258 |
+
return $this->error( $result, 'remote_authorize' );
|
259 |
+
}
|
260 |
+
|
261 |
+
// This action is documented in class.jetpack-xmlrpc-server.php.
|
262 |
+
do_action( 'jetpack_xmlrpc_server_event', 'remote_authorize', 'success' );
|
263 |
+
|
264 |
+
return array(
|
265 |
+
'result' => $result,
|
266 |
+
);
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* This XML-RPC method is called from the /jpphp/provision endpoint on WPCOM in order to
|
271 |
+
* register this site so that a plan can be provisioned.
|
272 |
+
*
|
273 |
+
* @param array $request An array containing at minimum nonce and local_user keys.
|
274 |
+
*
|
275 |
+
* @return \WP_Error|array
|
276 |
+
*/
|
277 |
+
public function remote_register( $request ) {
|
278 |
+
// This action is documented in class.jetpack-xmlrpc-server.php.
|
279 |
+
do_action( 'jetpack_xmlrpc_server_event', 'remote_register', 'begin', array() );
|
280 |
+
|
281 |
+
$user = $this->fetch_and_verify_local_user( $request );
|
282 |
+
|
283 |
+
if ( ! $user ) {
|
284 |
+
return $this->error(
|
285 |
+
new WP_Error( 'input_error', __( 'Valid user is required', 'jetpack' ), 400 ),
|
286 |
+
'remote_register'
|
287 |
+
);
|
288 |
+
}
|
289 |
+
|
290 |
+
if ( is_wp_error( $user ) || is_a( $user, 'IXR_Error' ) ) {
|
291 |
+
return $this->error( $user, 'remote_register' );
|
292 |
+
}
|
293 |
+
|
294 |
+
if ( empty( $request['nonce'] ) ) {
|
295 |
+
return $this->error(
|
296 |
+
new Jetpack_Error(
|
297 |
+
'nonce_missing',
|
298 |
+
__( 'The required "nonce" parameter is missing.', 'jetpack' ),
|
299 |
+
400
|
300 |
+
),
|
301 |
+
'remote_register'
|
302 |
+
);
|
303 |
+
}
|
304 |
+
|
305 |
+
$nonce = sanitize_text_field( $request['nonce'] );
|
306 |
+
unset( $request['nonce'] );
|
307 |
+
|
308 |
+
$api_url = Connection_Utils::fix_url_for_bad_hosts(
|
309 |
+
$this->connection->api_url( 'partner_provision_nonce_check' )
|
310 |
+
);
|
311 |
+
$response = Client::_wp_remote_request(
|
312 |
+
esc_url_raw( add_query_arg( 'nonce', $nonce, $api_url ) ),
|
313 |
+
array( 'method' => 'GET' ),
|
314 |
+
true
|
315 |
+
);
|
316 |
+
|
317 |
+
if (
|
318 |
+
200 !== wp_remote_retrieve_response_code( $response ) ||
|
319 |
+
'OK' !== trim( wp_remote_retrieve_body( $response ) )
|
320 |
+
) {
|
321 |
+
return $this->error(
|
322 |
+
new Jetpack_Error(
|
323 |
+
'invalid_nonce',
|
324 |
+
__( 'There was an issue validating this request.', 'jetpack' ),
|
325 |
+
400
|
326 |
+
),
|
327 |
+
'remote_register'
|
328 |
+
);
|
329 |
+
}
|
330 |
+
|
331 |
+
if ( ! Jetpack_Options::get_option( 'id' ) || ! $this->connection->get_access_token() || ! empty( $request['force'] ) ) {
|
332 |
+
wp_set_current_user( $user->ID );
|
333 |
+
|
334 |
+
// This code mostly copied from Jetpack::admin_page_load.
|
335 |
+
Jetpack::maybe_set_version_option();
|
336 |
+
$registered = Jetpack::try_registration();
|
337 |
+
if ( is_wp_error( $registered ) ) {
|
338 |
+
return $this->error( $registered, 'remote_register' );
|
339 |
+
} elseif ( ! $registered ) {
|
340 |
+
return $this->error(
|
341 |
+
new Jetpack_Error(
|
342 |
+
'registration_error',
|
343 |
+
__( 'There was an unspecified error registering the site', 'jetpack' ),
|
344 |
+
400
|
345 |
+
),
|
346 |
+
'remote_register'
|
347 |
+
);
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
// This action is documented in class.jetpack-xmlrpc-server.php.
|
352 |
+
do_action( 'jetpack_xmlrpc_server_event', 'remote_register', 'success' );
|
353 |
+
|
354 |
+
return array(
|
355 |
+
'client_id' => Jetpack_Options::get_option( 'id' ),
|
356 |
+
);
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* This XML-RPC method is called from the /jpphp/provision endpoint on WPCOM in order to
|
361 |
+
* register this site so that a plan can be provisioned.
|
362 |
+
*
|
363 |
+
* @param array $request An array containing at minimum a nonce key and a local_username key.
|
364 |
+
*
|
365 |
+
* @return \WP_Error|array
|
366 |
+
*/
|
367 |
+
public function remote_provision( $request ) {
|
368 |
+
$user = $this->fetch_and_verify_local_user( $request );
|
369 |
+
|
370 |
+
if ( ! $user ) {
|
371 |
+
return $this->error(
|
372 |
+
new WP_Error( 'input_error', __( 'Valid user is required', 'jetpack' ), 400 ),
|
373 |
+
'remote_provision'
|
374 |
+
);
|
375 |
+
}
|
376 |
+
|
377 |
+
if ( is_wp_error( $user ) || is_a( $user, 'IXR_Error' ) ) {
|
378 |
+
return $this->error( $user, 'remote_provision' );
|
379 |
+
}
|
380 |
+
|
381 |
+
$site_icon = get_site_icon_url();
|
382 |
+
|
383 |
+
$auto_enable_sso = ( ! $this->connection->is_active() || Jetpack::is_module_active( 'sso' ) );
|
384 |
+
|
385 |
+
/** This filter is documented in class.jetpack-cli.php */
|
386 |
+
if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
|
387 |
+
$redirect_uri = add_query_arg(
|
388 |
+
array(
|
389 |
+
'action' => 'jetpack-sso',
|
390 |
+
'redirect_to' => rawurlencode( admin_url() ),
|
391 |
+
),
|
392 |
+
wp_login_url() // TODO: come back to Jetpack dashboard?
|
393 |
+
);
|
394 |
+
} else {
|
395 |
+
$redirect_uri = admin_url();
|
396 |
+
}
|
397 |
+
|
398 |
+
// Generate secrets.
|
399 |
+
$roles = new Roles();
|
400 |
+
$role = $roles->translate_user_to_role( $user );
|
401 |
+
$secrets = $this->connection->generate_secrets( 'authorize', $user->ID );
|
402 |
+
|
403 |
+
$response = array(
|
404 |
+
'jp_version' => JETPACK__VERSION,
|
405 |
+
'redirect_uri' => $redirect_uri,
|
406 |
+
'user_id' => $user->ID,
|
407 |
+
'user_email' => $user->user_email,
|
408 |
+
'user_login' => $user->user_login,
|
409 |
+
'scope' => $this->connection->sign_role( $role, $user->ID ),
|
410 |
+
'secret' => $secrets['secret_1'],
|
411 |
+
'is_active' => $this->connection->is_active(),
|
412 |
+
);
|
413 |
+
|
414 |
+
if ( $site_icon ) {
|
415 |
+
$response['site_icon'] = $site_icon;
|
416 |
+
}
|
417 |
+
|
418 |
+
if ( ! empty( $request['onboarding'] ) ) {
|
419 |
+
Jetpack::create_onboarding_token();
|
420 |
+
$response['onboarding_token'] = Jetpack_Options::get_option( 'onboarding' );
|
421 |
+
}
|
422 |
+
|
423 |
+
return $response;
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Given an array containing a local user identifier and a nonce, will attempt to fetch and set
|
428 |
+
* an access token for the given user.
|
429 |
+
*
|
430 |
+
* @param array $request An array containing local_user and nonce keys at minimum.
|
431 |
+
* @param \IXR_Client $ixr_client The client object, optional.
|
432 |
+
* @return mixed
|
433 |
+
*/
|
434 |
+
public function remote_connect( $request, $ixr_client = false ) {
|
435 |
+
if ( $this->connection->is_active() ) {
|
436 |
+
return $this->error(
|
437 |
+
new WP_Error(
|
438 |
+
'already_connected',
|
439 |
+
__( 'Jetpack is already connected.', 'jetpack' ),
|
440 |
+
400
|
441 |
+
),
|
442 |
+
'remote_connect'
|
443 |
+
);
|
444 |
+
}
|
445 |
+
|
446 |
+
$user = $this->fetch_and_verify_local_user( $request );
|
447 |
+
|
448 |
+
if ( ! $user || is_wp_error( $user ) || is_a( $user, 'IXR_Error' ) ) {
|
449 |
+
return $this->error(
|
450 |
+
new WP_Error(
|
451 |
+
'input_error',
|
452 |
+
__( 'Valid user is required.', 'jetpack' ),
|
453 |
+
400
|
454 |
+
),
|
455 |
+
'remote_connect'
|
456 |
+
);
|
457 |
+
}
|
458 |
+
|
459 |
+
if ( empty( $request['nonce'] ) ) {
|
460 |
+
return $this->error(
|
461 |
+
new WP_Error(
|
462 |
+
'input_error',
|
463 |
+
__( 'A non-empty nonce must be supplied.', 'jetpack' ),
|
464 |
+
400
|
465 |
+
),
|
466 |
+
'remote_connect'
|
467 |
+
);
|
468 |
+
}
|
469 |
+
|
470 |
+
if ( ! $ixr_client ) {
|
471 |
+
$ixr_client = new Jetpack_IXR_Client();
|
472 |
+
}
|
473 |
+
$ixr_client->query(
|
474 |
+
'jetpack.getUserAccessToken',
|
475 |
+
array(
|
476 |
+
'nonce' => sanitize_text_field( $request['nonce'] ),
|
477 |
+
'external_user_id' => $user->ID,
|
478 |
+
)
|
479 |
+
);
|
480 |
+
|
481 |
+
$token = $ixr_client->isError() ? false : $ixr_client->getResponse();
|
482 |
+
if ( empty( $token ) ) {
|
483 |
+
return $this->error(
|
484 |
+
new WP_Error(
|
485 |
+
'token_fetch_failed',
|
486 |
+
__( 'Failed to fetch user token from WordPress.com.', 'jetpack' ),
|
487 |
+
400
|
488 |
+
),
|
489 |
+
'remote_connect'
|
490 |
+
);
|
491 |
+
}
|
492 |
+
$token = sanitize_text_field( $token );
|
493 |
+
|
494 |
+
Connection_Utils::update_user_token( $user->ID, sprintf( '%s.%d', $token, $user->ID ), true );
|
495 |
+
|
496 |
+
$this->do_post_authorization();
|
497 |
+
|
498 |
+
return $this->connection->is_active();
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Getter for the local user to act as.
|
503 |
+
*
|
504 |
+
* @param array $request the current request data.
|
505 |
+
*/
|
506 |
+
private function fetch_and_verify_local_user( $request ) {
|
507 |
+
if ( empty( $request['local_user'] ) ) {
|
508 |
+
return $this->error(
|
509 |
+
new Jetpack_Error(
|
510 |
+
'local_user_missing',
|
511 |
+
__( 'The required "local_user" parameter is missing.', 'jetpack' ),
|
512 |
+
400
|
513 |
+
),
|
514 |
+
'remote_provision'
|
515 |
+
);
|
516 |
+
}
|
517 |
+
|
518 |
+
// Local user is used to look up by login, email or ID.
|
519 |
+
$local_user_info = $request['local_user'];
|
520 |
+
|
521 |
+
return $this->get_user_by_anything( $local_user_info );
|
522 |
+
}
|
523 |
+
|
524 |
+
/**
|
525 |
+
* Gets the user object by its data.
|
526 |
+
*
|
527 |
+
* @param string $user_id can be any identifying user data.
|
528 |
+
*/
|
529 |
+
private function get_user_by_anything( $user_id ) {
|
530 |
+
$user = get_user_by( 'login', $user_id );
|
531 |
+
|
532 |
+
if ( ! $user ) {
|
533 |
+
$user = get_user_by( 'email', $user_id );
|
534 |
+
}
|
535 |
+
|
536 |
+
if ( ! $user ) {
|
537 |
+
$user = get_user_by( 'ID', $user_id );
|
538 |
+
}
|
539 |
+
|
540 |
+
return $user;
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* Possible error_codes:
|
545 |
+
*
|
546 |
+
* - verify_secret_1_missing
|
547 |
+
* - verify_secret_1_malformed
|
548 |
+
* - verify_secrets_missing: verification secrets are not found in database
|
549 |
+
* - verify_secrets_incomplete: verification secrets are only partially found in database
|
550 |
+
* - verify_secrets_expired: verification secrets have expired
|
551 |
+
* - verify_secrets_mismatch: stored secret_1 does not match secret_1 sent by Jetpack.WordPress.com
|
552 |
+
* - state_missing: required parameter of state not found
|
553 |
+
* - state_malformed: state is not a digit
|
554 |
+
* - invalid_state: state in request does not match the stored state
|
555 |
+
*
|
556 |
+
* The 'authorize' and 'register' actions have additional error codes
|
557 |
+
*
|
558 |
+
* state_missing: a state ( user id ) was not supplied
|
559 |
+
* state_malformed: state is not the correct data type
|
560 |
+
* invalid_state: supplied state does not match the stored state
|
561 |
+
*
|
562 |
+
* @param array $params action An array of 3 parameters:
|
563 |
+
* [0]: string action. Possible values are `authorize`, `publicize` and `register`.
|
564 |
+
* [1]: string secret_1.
|
565 |
+
* [2]: int state.
|
566 |
+
* @return \IXR_Error|string IXR_Error on failure, secret_2 on success.
|
567 |
+
*/
|
568 |
+
public function verify_action( $params ) {
|
569 |
+
$action = isset( $params[0] ) ? $params[0] : '';
|
570 |
+
$verify_secret = isset( $params[1] ) ? $params[1] : '';
|
571 |
+
$state = isset( $params[2] ) ? $params[2] : '';
|
572 |
+
|
573 |
+
$result = $this->connection->verify_secrets( $action, $verify_secret, $state );
|
574 |
+
|
575 |
+
if ( is_wp_error( $result ) ) {
|
576 |
+
return $this->error( $result );
|
577 |
+
}
|
578 |
+
|
579 |
+
return $result;
|
580 |
+
}
|
581 |
+
|
582 |
+
/**
|
583 |
+
* Wrapper for wp_authenticate( $username, $password );
|
584 |
+
*
|
585 |
+
* @return \WP_User|bool
|
586 |
+
*/
|
587 |
+
public function login() {
|
588 |
+
$this->connection->require_jetpack_authentication();
|
589 |
+
$user = wp_authenticate( 'username', 'password' );
|
590 |
+
if ( is_wp_error( $user ) ) {
|
591 |
+
if ( 'authentication_failed' === $user->get_error_code() ) { // Generic error could mean most anything.
|
592 |
+
$this->error = new Jetpack_Error( 'invalid_request', 'Invalid Request', 403 );
|
593 |
+
} else {
|
594 |
+
$this->error = $user;
|
595 |
+
}
|
596 |
+
return false;
|
597 |
+
} elseif ( ! $user ) { // Shouldn't happen.
|
598 |
+
$this->error = new Jetpack_Error( 'invalid_request', 'Invalid Request', 403 );
|
599 |
+
return false;
|
600 |
+
}
|
601 |
+
|
602 |
+
return $user;
|
603 |
+
}
|
604 |
+
|
605 |
+
/**
|
606 |
+
* Returns the current error as an \IXR_Error
|
607 |
+
*
|
608 |
+
* @param \WP_Error|\IXR_Error $error The error object, optional.
|
609 |
+
* @param string $event_name The event name.
|
610 |
+
* @param \WP_User $user The user object.
|
611 |
+
* @return bool|\IXR_Error
|
612 |
+
*/
|
613 |
+
public function error( $error = null, $event_name = null, $user = null ) {
|
614 |
+
if ( null !== $event_name ) {
|
615 |
+
// This action is documented in class.jetpack-xmlrpc-server.php.
|
616 |
+
do_action( 'jetpack_xmlrpc_server_event', $event_name, 'fail', $error, $user );
|
617 |
+
}
|
618 |
+
|
619 |
+
if ( ! is_null( $error ) ) {
|
620 |
+
$this->error = $error;
|
621 |
+
}
|
622 |
+
|
623 |
+
if ( is_wp_error( $this->error ) ) {
|
624 |
+
$code = $this->error->get_error_data();
|
625 |
+
if ( ! $code ) {
|
626 |
+
$code = -10520;
|
627 |
+
}
|
628 |
+
$message = sprintf( 'Jetpack: [%s] %s', $this->error->get_error_code(), $this->error->get_error_message() );
|
629 |
+
return new \IXR_Error( $code, $message );
|
630 |
+
} elseif ( is_a( $this->error, 'IXR_Error' ) ) {
|
631 |
+
return $this->error;
|
632 |
+
}
|
633 |
+
|
634 |
+
return false;
|
635 |
+
}
|
636 |
+
|
637 |
+
/* API Methods */
|
638 |
+
|
639 |
+
/**
|
640 |
+
* Just authenticates with the given Jetpack credentials.
|
641 |
+
*
|
642 |
+
* @return string The current Jetpack version number
|
643 |
+
*/
|
644 |
+
public function test_connection() {
|
645 |
+
return JETPACK__VERSION;
|
646 |
+
}
|
647 |
+
|
648 |
+
/**
|
649 |
+
* Test the API user code.
|
650 |
+
*
|
651 |
+
* @param array $args arguments identifying the test site.
|
652 |
+
*/
|
653 |
+
public function test_api_user_code( $args ) {
|
654 |
+
$client_id = (int) $args[0];
|
655 |
+
$user_id = (int) $args[1];
|
656 |
+
$nonce = (string) $args[2];
|
657 |
+
$verify = (string) $args[3];
|
658 |
+
|
659 |
+
if ( ! $client_id || ! $user_id || ! strlen( $nonce ) || 32 !== strlen( $verify ) ) {
|
660 |
+
return false;
|
661 |
+
}
|
662 |
+
|
663 |
+
$user = get_user_by( 'id', $user_id );
|
664 |
+
if ( ! $user || is_wp_error( $user ) ) {
|
665 |
+
return false;
|
666 |
+
}
|
667 |
+
|
668 |
+
/* phpcs:ignore
|
669 |
+
debugging
|
670 |
+
error_log( "CLIENT: $client_id" );
|
671 |
+
error_log( "USER: $user_id" );
|
672 |
+
error_log( "NONCE: $nonce" );
|
673 |
+
error_log( "VERIFY: $verify" );
|
674 |
+
*/
|
675 |
+
|
676 |
+
$jetpack_token = $this->connection->get_access_token( $user_id );
|
677 |
+
|
678 |
+
$api_user_code = get_user_meta( $user_id, "jetpack_json_api_$client_id", true );
|
679 |
+
if ( ! $api_user_code ) {
|
680 |
+
return false;
|
681 |
+
}
|
682 |
+
|
683 |
+
$hmac = hash_hmac(
|
684 |
+
'md5',
|
685 |
+
json_encode( // phpcs:ignore WordPress.WP.AlternativeFunctions.json_encode_json_encode
|
686 |
+
(object) array(
|
687 |
+
'client_id' => (int) $client_id,
|
688 |
+
'user_id' => (int) $user_id,
|
689 |
+
'nonce' => (string) $nonce,
|
690 |
+
'code' => (string) $api_user_code,
|
691 |
+
)
|
692 |
+
),
|
693 |
+
$jetpack_token->secret
|
694 |
+
);
|
695 |
+
|
696 |
+
if ( ! hash_equals( $hmac, $verify ) ) {
|
697 |
+
return false;
|
698 |
+
}
|
699 |
+
|
700 |
+
return $user_id;
|
701 |
+
}
|
702 |
+
|
703 |
+
/**
|
704 |
+
* Disconnect this blog from the connected wordpress.com account
|
705 |
+
*
|
706 |
+
* @return boolean
|
707 |
+
*/
|
708 |
+
public function disconnect_blog() {
|
709 |
+
|
710 |
+
// For tracking.
|
711 |
+
if ( ! empty( $this->user->ID ) ) {
|
712 |
+
wp_set_current_user( $this->user->ID );
|
713 |
+
}
|
714 |
+
|
715 |
+
/**
|
716 |
+
* Fired when we want to log an event to the Jetpack event log.
|
717 |
+
*
|
718 |
+
* @since 7.7.0
|
719 |
+
*
|
720 |
+
* @param string $code Unique name for the event.
|
721 |
+
* @param string $data Optional data about the event.
|
722 |
+
*/
|
723 |
+
do_action( 'jetpack_event_log', 'disconnect' );
|
724 |
+
Jetpack::disconnect();
|
725 |
+
|
726 |
+
return true;
|
727 |
+
}
|
728 |
+
|
729 |
+
/**
|
730 |
+
* Unlink a user from WordPress.com
|
731 |
+
*
|
732 |
+
* This will fail if called by the Master User.
|
733 |
+
*/
|
734 |
+
public function unlink_user() {
|
735 |
+
/**
|
736 |
+
* Fired when we want to log an event to the Jetpack event log.
|
737 |
+
*
|
738 |
+
* @since 7.7.0
|
739 |
+
*
|
740 |
+
* @param string $code Unique name for the event.
|
741 |
+
* @param string $data Optional data about the event.
|
742 |
+
*/
|
743 |
+
do_action( 'jetpack_event_log', 'unlink' );
|
744 |
+
return Connection_Manager::disconnect_user();
|
745 |
+
}
|
746 |
+
|
747 |
+
/**
|
748 |
+
* Returns any object that is able to be synced.
|
749 |
+
*
|
750 |
+
* @deprecated since 7.8.0
|
751 |
+
* @see Automattic\Jetpack\Sync\Sender::sync_object()
|
752 |
+
*
|
753 |
+
* @param array $args the synchronized object parameters.
|
754 |
+
* @return string Encoded sync object.
|
755 |
+
*/
|
756 |
+
public function sync_object( $args ) {
|
757 |
+
_deprecated_function( __METHOD__, 'jetpack-7.8', 'Automattic\\Jetpack\\Sync\\Sender::sync_object' );
|
758 |
+
return Sender::get_instance()->sync_object( $args );
|
759 |
+
}
|
760 |
+
|
761 |
+
/**
|
762 |
+
* Returns the home URL and site URL for the current site which can be used on the WPCOM side for
|
763 |
+
* IDC mitigation to decide whether sync should be allowed if the home and siteurl values differ between WPCOM
|
764 |
+
* and the remote Jetpack site.
|
765 |
+
*
|
766 |
+
* @return array
|
767 |
+
*/
|
768 |
+
public function validate_urls_for_idc_mitigation() {
|
769 |
+
return array(
|
770 |
+
'home' => Functions::home_url(),
|
771 |
+
'siteurl' => Functions::site_url(),
|
772 |
+
);
|
773 |
+
}
|
774 |
+
|
775 |
+
/**
|
776 |
+
* Returns what features are available. Uses the slug of the module files.
|
777 |
+
*
|
778 |
+
* @return array
|
779 |
+
*/
|
780 |
+
public function features_available() {
|
781 |
+
$raw_modules = Jetpack::get_available_modules();
|
782 |
+
$modules = array();
|
783 |
+
foreach ( $raw_modules as $module ) {
|
784 |
+
$modules[] = Jetpack::get_module_slug( $module );
|
785 |
+
}
|
786 |
+
|
787 |
+
return $modules;
|
788 |
+
}
|
789 |
+
|
790 |
+
/**
|
791 |
+
* Returns what features are enabled. Uses the slug of the modules files.
|
792 |
+
*
|
793 |
+
* @return array
|
794 |
+
*/
|
795 |
+
public function features_enabled() {
|
796 |
+
$raw_modules = Jetpack::get_active_modules();
|
797 |
+
$modules = array();
|
798 |
+
foreach ( $raw_modules as $module ) {
|
799 |
+
$modules[] = Jetpack::get_module_slug( $module );
|
800 |
+
}
|
801 |
+
|
802 |
+
return $modules;
|
803 |
+
}
|
804 |
+
|
805 |
+
/**
|
806 |
+
* Updates the attachment parent object.
|
807 |
+
*
|
808 |
+
* @param array $args attachment and parent identifiers.
|
809 |
+
*/
|
810 |
+
public function update_attachment_parent( $args ) {
|
811 |
+
$attachment_id = (int) $args[0];
|
812 |
+
$parent_id = (int) $args[1];
|
813 |
+
|
814 |
+
return wp_update_post(
|
815 |
+
array(
|
816 |
+
'ID' => $attachment_id,
|
817 |
+
'post_parent' => $parent_id,
|
818 |
+
)
|
819 |
+
);
|
820 |
+
}
|
821 |
+
|
822 |
+
/**
|
823 |
+
* Serve a JSON API request.
|
824 |
+
*
|
825 |
+
* @param array $args request arguments.
|
826 |
+
*/
|
827 |
+
public function json_api( $args = array() ) {
|
828 |
+
$json_api_args = $args[0];
|
829 |
+
$verify_api_user_args = $args[1];
|
830 |
+
|
831 |
+
$method = (string) $json_api_args[0];
|
832 |
+
$url = (string) $json_api_args[1];
|
833 |
+
$post_body = is_null( $json_api_args[2] ) ? null : (string) $json_api_args[2];
|
834 |
+
$user_details = (array) $json_api_args[4];
|
835 |
+
$locale = (string) $json_api_args[5];
|
836 |
+
|
837 |
+
if ( ! $verify_api_user_args ) {
|
838 |
+
$user_id = 0;
|
839 |
+
} elseif ( 'internal' === $verify_api_user_args[0] ) {
|
840 |
+
$user_id = (int) $verify_api_user_args[1];
|
841 |
+
if ( $user_id ) {
|
842 |
+
$user = get_user_by( 'id', $user_id );
|
843 |
+
if ( ! $user || is_wp_error( $user ) ) {
|
844 |
+
return false;
|
845 |
+
}
|
846 |
+
}
|
847 |
+
} else {
|
848 |
+
$user_id = call_user_func( array( $this, 'test_api_user_code' ), $verify_api_user_args );
|
849 |
+
if ( ! $user_id ) {
|
850 |
+
return false;
|
851 |
+
}
|
852 |
+
}
|
853 |
+
|
854 |
+
/* phpcs:ignore
|
855 |
+
debugging
|
856 |
+
error_log( "-- begin json api via jetpack debugging -- " );
|
857 |
+
error_log( "METHOD: $method" );
|
858 |
+
error_log( "URL: $url" );
|
859 |
+
error_log( "POST BODY: $post_body" );
|
860 |
+
error_log( "VERIFY_ARGS: " . print_r( $verify_api_user_args, 1 ) );
|
861 |
+
error_log( "VERIFIED USER_ID: " . (int) $user_id );
|
862 |
+
error_log( "-- end json api via jetpack debugging -- " );
|
863 |
+
*/
|
864 |
+
|
865 |
+
if ( 'en' !== $locale ) {
|
866 |
+
// .org mo files are named slightly different from .com, and all we have is this the locale -- try to guess them.
|
867 |
+
$new_locale = $locale;
|
868 |
+
if ( strpos( $locale, '-' ) !== false ) {
|
869 |
+
$locale_pieces = explode( '-', $locale );
|
870 |
+
$new_locale = $locale_pieces[0];
|
871 |
+
$new_locale .= ( ! empty( $locale_pieces[1] ) ) ? '_' . strtoupper( $locale_pieces[1] ) : '';
|
872 |
+
} else {
|
873 |
+
// .com might pass 'fr' because thats what our language files are named as, where core seems
|
874 |
+
// to do fr_FR - so try that if we don't think we can load the file.
|
875 |
+
if ( ! file_exists( WP_LANG_DIR . '/' . $locale . '.mo' ) ) {
|
876 |
+
$new_locale = $locale . '_' . strtoupper( $locale );
|
877 |
+
}
|
878 |
+
}
|
879 |
+
|
880 |
+
if ( file_exists( WP_LANG_DIR . '/' . $new_locale . '.mo' ) ) {
|
881 |
+
unload_textdomain( 'default' );
|
882 |
+
load_textdomain( 'default', WP_LANG_DIR . '/' . $new_locale . '.mo' );
|
883 |
+
}
|
884 |
+
}
|
885 |
+
|
886 |
+
$old_user = wp_get_current_user();
|
887 |
+
wp_set_current_user( $user_id );
|
888 |
+
|
889 |
+
if ( $user_id ) {
|
890 |
+
$token_key = false;
|
891 |
+
} else {
|
892 |
+
$verified = $this->connection->verify_xml_rpc_signature();
|
893 |
+
$token_key = $verified['token_key'];
|
894 |
+
}
|
895 |
+
|
896 |
+
$token = $this->connection->get_access_token( $user_id, $token_key );
|
897 |
+
if ( ! $token || is_wp_error( $token ) ) {
|
898 |
+
return false;
|
899 |
+
}
|
900 |
+
|
901 |
+
define( 'REST_API_REQUEST', true );
|
902 |
+
define( 'WPCOM_JSON_API__BASE', 'public-api.wordpress.com/rest/v1' );
|
903 |
+
|
904 |
+
// needed?
|
905 |
+
require_once ABSPATH . 'wp-admin/includes/admin.php';
|
906 |
+
|
907 |
+
require_once JETPACK__PLUGIN_DIR . 'class.json-api.php';
|
908 |
+
$api = WPCOM_JSON_API::init( $method, $url, $post_body );
|
909 |
+
$api->token_details['user'] = $user_details;
|
910 |
+
require_once JETPACK__PLUGIN_DIR . 'class.json-api-endpoints.php';
|
911 |
+
|
912 |
+
$display_errors = ini_set( 'display_errors', 0 ); // phpcs:ignore WordPress.PHP.IniSet
|
913 |
+
ob_start();
|
914 |
+
$api->serve( false );
|
915 |
+
$output = ob_get_clean();
|
916 |
+
ini_set( 'display_errors', $display_errors ); // phpcs:ignore WordPress.PHP.IniSet
|
917 |
+
|
918 |
+
$nonce = wp_generate_password( 10, false );
|
919 |
+
$hmac = hash_hmac( 'md5', $nonce . $output, $token->secret );
|
920 |
+
|
921 |
+
wp_set_current_user( isset( $old_user->ID ) ? $old_user->ID : 0 );
|
922 |
+
|
923 |
+
return array(
|
924 |
+
(string) $output,
|
925 |
+
(string) $nonce,
|
926 |
+
(string) $hmac,
|
927 |
+
);
|
928 |
+
}
|
929 |
+
|
930 |
+
/**
|
931 |
+
* Handles authorization actions after connecting a site, such as enabling modules.
|
932 |
+
*
|
933 |
+
* This do_post_authorization() is used in this class, as opposed to calling
|
934 |
+
* Jetpack::handle_post_authorization_actions() directly so that we can mock this method as necessary.
|
935 |
+
*
|
936 |
+
* @return void
|
937 |
+
*/
|
938 |
+
public function do_post_authorization() {
|
939 |
+
/** This filter is documented in class.jetpack-cli.php */
|
940 |
+
$enable_sso = apply_filters( 'jetpack_start_enable_sso', true );
|
941 |
+
Jetpack::handle_post_authorization_actions( $enable_sso, false, false );
|
942 |
+
}
|
943 |
+
}
|
vendor/automattic/jetpack-connection/legacy/load-ixr.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WordPress IXR classes aren't always loaded by default.
|
4 |
+
*
|
5 |
+
* Here we ensure that they are loaded before we declare our implementations.
|
6 |
+
*
|
7 |
+
* @package automattic/jetpack-connection
|
8 |
+
* @since 7.7
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( defined( 'ABSPATH' ) && defined( 'WPINC' ) ) {
|
12 |
+
require_once ABSPATH . WPINC . '/class-IXR.php';
|
13 |
+
}
|
vendor/automattic/jetpack-connection/src/class-client.php
ADDED
@@ -0,0 +1,462 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Connection Client class file.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
use Automattic\Jetpack\Constants;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The Client class that is used to connect to WordPress.com Jetpack API.
|
14 |
+
*/
|
15 |
+
class Client {
|
16 |
+
const WPCOM_JSON_API_VERSION = '1.1';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Makes an authorized remote request using Jetpack_Signature
|
20 |
+
*
|
21 |
+
* @param array $args the arguments for the remote request.
|
22 |
+
* @param array|String $body the request body.
|
23 |
+
* @return array|WP_Error WP HTTP response on success
|
24 |
+
*/
|
25 |
+
public static function remote_request( $args, $body = null ) {
|
26 |
+
add_filter(
|
27 |
+
'jetpack_constant_default_value',
|
28 |
+
__NAMESPACE__ . '\Utils::jetpack_api_constant_filter',
|
29 |
+
10,
|
30 |
+
2
|
31 |
+
);
|
32 |
+
|
33 |
+
$defaults = array(
|
34 |
+
'url' => '',
|
35 |
+
'user_id' => 0,
|
36 |
+
'blog_id' => 0,
|
37 |
+
'auth_location' => Constants::get_constant( 'JETPACK_CLIENT__AUTH_LOCATION' ),
|
38 |
+
'method' => 'POST',
|
39 |
+
'timeout' => 10,
|
40 |
+
'redirection' => 0,
|
41 |
+
'headers' => array(),
|
42 |
+
'stream' => false,
|
43 |
+
'filename' => null,
|
44 |
+
'sslverify' => true,
|
45 |
+
);
|
46 |
+
|
47 |
+
$args = wp_parse_args( $args, $defaults );
|
48 |
+
|
49 |
+
$args['blog_id'] = (int) $args['blog_id'];
|
50 |
+
|
51 |
+
if ( 'header' !== $args['auth_location'] ) {
|
52 |
+
$args['auth_location'] = 'query_string';
|
53 |
+
}
|
54 |
+
|
55 |
+
$connection = new Manager();
|
56 |
+
$token = $connection->get_access_token( $args['user_id'] );
|
57 |
+
if ( ! $token ) {
|
58 |
+
return new \WP_Error( 'missing_token' );
|
59 |
+
}
|
60 |
+
|
61 |
+
$method = strtoupper( $args['method'] );
|
62 |
+
|
63 |
+
$timeout = intval( $args['timeout'] );
|
64 |
+
|
65 |
+
$redirection = $args['redirection'];
|
66 |
+
$stream = $args['stream'];
|
67 |
+
$filename = $args['filename'];
|
68 |
+
$sslverify = $args['sslverify'];
|
69 |
+
|
70 |
+
$request = compact( 'method', 'body', 'timeout', 'redirection', 'stream', 'filename', 'sslverify' );
|
71 |
+
|
72 |
+
@list( $token_key, $secret ) = explode( '.', $token->secret ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
73 |
+
if ( empty( $token ) || empty( $secret ) ) {
|
74 |
+
return new \WP_Error( 'malformed_token' );
|
75 |
+
}
|
76 |
+
|
77 |
+
$token_key = sprintf(
|
78 |
+
'%s:%d:%d',
|
79 |
+
$token_key,
|
80 |
+
Constants::get_constant( 'JETPACK__API_VERSION' ),
|
81 |
+
$token->external_user_id
|
82 |
+
);
|
83 |
+
|
84 |
+
$time_diff = (int) \Jetpack_Options::get_option( 'time_diff' );
|
85 |
+
$jetpack_signature = new \Jetpack_Signature( $token->secret, $time_diff );
|
86 |
+
|
87 |
+
$timestamp = time() + $time_diff;
|
88 |
+
|
89 |
+
if ( function_exists( 'wp_generate_password' ) ) {
|
90 |
+
$nonce = wp_generate_password( 10, false );
|
91 |
+
} else {
|
92 |
+
$nonce = substr( sha1( wp_rand( 0, 1000000 ) ), 0, 10 );
|
93 |
+
}
|
94 |
+
|
95 |
+
// Kind of annoying. Maybe refactor Jetpack_Signature to handle body-hashing.
|
96 |
+
if ( is_null( $body ) ) {
|
97 |
+
$body_hash = '';
|
98 |
+
|
99 |
+
} else {
|
100 |
+
// Allow arrays to be used in passing data.
|
101 |
+
$body_to_hash = $body;
|
102 |
+
|
103 |
+
if ( is_array( $body ) ) {
|
104 |
+
// We cast this to a new variable, because the array form of $body needs to be
|
105 |
+
// maintained so it can be passed into the request later on in the code.
|
106 |
+
if ( count( $body ) > 0 ) {
|
107 |
+
$body_to_hash = wp_json_encode( self::_stringify_data( $body ) );
|
108 |
+
} else {
|
109 |
+
$body_to_hash = '';
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( ! is_string( $body_to_hash ) ) {
|
114 |
+
return new \WP_Error( 'invalid_body', 'Body is malformed.' );
|
115 |
+
}
|
116 |
+
|
117 |
+
$body_hash = base64_encode( sha1( $body_to_hash, true ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
118 |
+
}
|
119 |
+
|
120 |
+
$auth = array(
|
121 |
+
'token' => $token_key,
|
122 |
+
'timestamp' => $timestamp,
|
123 |
+
'nonce' => $nonce,
|
124 |
+
'body-hash' => $body_hash,
|
125 |
+
);
|
126 |
+
|
127 |
+
if ( false !== strpos( $args['url'], 'xmlrpc.php' ) ) {
|
128 |
+
$url_args = array(
|
129 |
+
'for' => 'jetpack',
|
130 |
+
'wpcom_blog_id' => \Jetpack_Options::get_option( 'id' ),
|
131 |
+
);
|
132 |
+
} else {
|
133 |
+
$url_args = array();
|
134 |
+
}
|
135 |
+
|
136 |
+
if ( 'header' !== $args['auth_location'] ) {
|
137 |
+
$url_args += $auth;
|
138 |
+
}
|
139 |
+
|
140 |
+
$url = add_query_arg( urlencode_deep( $url_args ), $args['url'] );
|
141 |
+
$url = Utils::fix_url_for_bad_hosts( $url );
|
142 |
+
|
143 |
+
$signature = $jetpack_signature->sign_request( $token_key, $timestamp, $nonce, $body_hash, $method, $url, $body, false );
|
144 |
+
|
145 |
+
if ( ! $signature || is_wp_error( $signature ) ) {
|
146 |
+
return $signature;
|
147 |
+
}
|
148 |
+
|
149 |
+
// Send an Authorization header so various caches/proxies do the right thing.
|
150 |
+
$auth['signature'] = $signature;
|
151 |
+
$auth['version'] = Constants::get_constant( 'JETPACK__VERSION' );
|
152 |
+
$header_pieces = array();
|
153 |
+
foreach ( $auth as $key => $value ) {
|
154 |
+
$header_pieces[] = sprintf( '%s="%s"', $key, $value );
|
155 |
+
}
|
156 |
+
$request['headers'] = array_merge(
|
157 |
+
$args['headers'],
|
158 |
+
array(
|
159 |
+
'Authorization' => 'X_JETPACK ' . join( ' ', $header_pieces ),
|
160 |
+
)
|
161 |
+
);
|
162 |
+
|
163 |
+
if ( 'header' !== $args['auth_location'] ) {
|
164 |
+
$url = add_query_arg( 'signature', rawurlencode( $signature ), $url );
|
165 |
+
}
|
166 |
+
|
167 |
+
return self::_wp_remote_request( $url, $request );
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Wrapper for wp_remote_request(). Turns off SSL verification for certain SSL errors.
|
172 |
+
* This is lame, but many, many, many hosts have misconfigured SSL.
|
173 |
+
*
|
174 |
+
* When Jetpack is registered, the jetpack_fallback_no_verify_ssl_certs option is set to the current time if:
|
175 |
+
* 1. a certificate error is found AND
|
176 |
+
* 2. not verifying the certificate works around the problem.
|
177 |
+
*
|
178 |
+
* The option is checked on each request.
|
179 |
+
*
|
180 |
+
* @internal
|
181 |
+
* @see Utils::fix_url_for_bad_hosts()
|
182 |
+
*
|
183 |
+
* @param String $url the request URL.
|
184 |
+
* @param array $args request arguments.
|
185 |
+
* @param Boolean $set_fallback whether to allow flagging this request to use a fallback certficate override.
|
186 |
+
* @return array|WP_Error WP HTTP response on success
|
187 |
+
*/
|
188 |
+
public static function _wp_remote_request( $url, $args, $set_fallback = false ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
189 |
+
/**
|
190 |
+
* SSL verification (`sslverify`) for the JetpackClient remote request
|
191 |
+
* defaults to off, use this filter to force it on.
|
192 |
+
*
|
193 |
+
* Return `true` to ENABLE SSL verification, return `false`
|
194 |
+
* to DISABLE SSL verification.
|
195 |
+
*
|
196 |
+
* @since 3.6.0
|
197 |
+
*
|
198 |
+
* @param bool Whether to force `sslverify` or not.
|
199 |
+
*/
|
200 |
+
if ( apply_filters( 'jetpack_client_verify_ssl_certs', false ) ) {
|
201 |
+
return wp_remote_request( $url, $args );
|
202 |
+
}
|
203 |
+
|
204 |
+
$fallback = \Jetpack_Options::get_option( 'fallback_no_verify_ssl_certs' );
|
205 |
+
if ( false === $fallback ) {
|
206 |
+
\Jetpack_Options::update_option( 'fallback_no_verify_ssl_certs', 0 );
|
207 |
+
}
|
208 |
+
|
209 |
+
if ( (int) $fallback ) {
|
210 |
+
// We're flagged to fallback.
|
211 |
+
$args['sslverify'] = false;
|
212 |
+
}
|
213 |
+
|
214 |
+
$response = wp_remote_request( $url, $args );
|
215 |
+
|
216 |
+
if (
|
217 |
+
! $set_fallback // We're not allowed to set the flag on this request, so whatever happens happens.
|
218 |
+
||
|
219 |
+
isset( $args['sslverify'] ) && ! $args['sslverify'] // No verification - no point in doing it again.
|
220 |
+
||
|
221 |
+
! is_wp_error( $response ) // Let it ride.
|
222 |
+
) {
|
223 |
+
self::set_time_diff( $response, $set_fallback );
|
224 |
+
return $response;
|
225 |
+
}
|
226 |
+
|
227 |
+
// At this point, we're not flagged to fallback and we are allowed to set the flag on this request.
|
228 |
+
|
229 |
+
$message = $response->get_error_message();
|
230 |
+
|
231 |
+
// Is it an SSL Certificate verification error?
|
232 |
+
if (
|
233 |
+
false === strpos( $message, '14090086' ) // OpenSSL SSL3 certificate error.
|
234 |
+
&&
|
235 |
+
false === strpos( $message, '1407E086' ) // OpenSSL SSL2 certificate error.
|
236 |
+
&&
|
237 |
+
false === strpos( $message, 'error setting certificate verify locations' ) // cURL CA bundle not found.
|
238 |
+
&&
|
239 |
+
false === strpos( $message, 'Peer certificate cannot be authenticated with' ) // cURL CURLE_SSL_CACERT: CA bundle found, but not helpful
|
240 |
+
// Different versions of curl have different error messages
|
241 |
+
// this string should catch them all.
|
242 |
+
&&
|
243 |
+
false === strpos( $message, 'Problem with the SSL CA cert' ) // cURL CURLE_SSL_CACERT_BADFILE: probably access rights.
|
244 |
+
) {
|
245 |
+
// No, it is not.
|
246 |
+
return $response;
|
247 |
+
}
|
248 |
+
|
249 |
+
// Redo the request without SSL certificate verification.
|
250 |
+
$args['sslverify'] = false;
|
251 |
+
$response = wp_remote_request( $url, $args );
|
252 |
+
|
253 |
+
if ( ! is_wp_error( $response ) ) {
|
254 |
+
// The request went through this time, flag for future fallbacks.
|
255 |
+
\Jetpack_Options::update_option( 'fallback_no_verify_ssl_certs', time() );
|
256 |
+
self::set_time_diff( $response, $set_fallback );
|
257 |
+
}
|
258 |
+
|
259 |
+
return $response;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Sets the time difference for correct signature computation.
|
264 |
+
*
|
265 |
+
* @param HTTP_Response $response the response object.
|
266 |
+
* @param Boolean $force_set whether to force setting the time difference.
|
267 |
+
*/
|
268 |
+
public static function set_time_diff( &$response, $force_set = false ) {
|
269 |
+
$code = wp_remote_retrieve_response_code( $response );
|
270 |
+
|
271 |
+
// Only trust the Date header on some responses.
|
272 |
+
if ( 200 != $code && 304 != $code && 400 != $code && 401 != $code ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
273 |
+
return;
|
274 |
+
}
|
275 |
+
|
276 |
+
$date = wp_remote_retrieve_header( $response, 'date' );
|
277 |
+
if ( ! $date ) {
|
278 |
+
return;
|
279 |
+
}
|
280 |
+
|
281 |
+
$time = (int) strtotime( $date );
|
282 |
+
if ( 0 >= $time ) {
|
283 |
+
return;
|
284 |
+
}
|
285 |
+
|
286 |
+
$time_diff = $time - time();
|
287 |
+
|
288 |
+
if ( $force_set ) { // During register.
|
289 |
+
\Jetpack_Options::update_option( 'time_diff', $time_diff );
|
290 |
+
} else { // Otherwise.
|
291 |
+
$old_diff = \Jetpack_Options::get_option( 'time_diff' );
|
292 |
+
if ( false === $old_diff || abs( $time_diff - (int) $old_diff ) > 10 ) {
|
293 |
+
\Jetpack_Options::update_option( 'time_diff', $time_diff );
|
294 |
+
}
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Queries the WordPress.com REST API with a user token.
|
300 |
+
*
|
301 |
+
* @param string $path REST API path.
|
302 |
+
* @param string $version REST API version. Default is `2`.
|
303 |
+
* @param array $args Arguments to {@see WP_Http}. Default is `array()`.
|
304 |
+
* @param string $body Body passed to {@see WP_Http}. Default is `null`.
|
305 |
+
* @param string $base_api_path REST API root. Default is `wpcom`.
|
306 |
+
*
|
307 |
+
* @return array|WP_Error $response Response data, else {@see WP_Error} on failure.
|
308 |
+
*/
|
309 |
+
public static function wpcom_json_api_request_as_user(
|
310 |
+
$path,
|
311 |
+
$version = '2',
|
312 |
+
$args = array(),
|
313 |
+
$body = null,
|
314 |
+
$base_api_path = 'wpcom'
|
315 |
+
) {
|
316 |
+
$base_api_path = trim( $base_api_path, '/' );
|
317 |
+
$version = ltrim( $version, 'v' );
|
318 |
+
$path = ltrim( $path, '/' );
|
319 |
+
|
320 |
+
$args = array_intersect_key(
|
321 |
+
$args,
|
322 |
+
array(
|
323 |
+
'headers' => 'array',
|
324 |
+
'method' => 'string',
|
325 |
+
'timeout' => 'int',
|
326 |
+
'redirection' => 'int',
|
327 |
+
'stream' => 'boolean',
|
328 |
+
'filename' => 'string',
|
329 |
+
'sslverify' => 'boolean',
|
330 |
+
)
|
331 |
+
);
|
332 |
+
|
333 |
+
$args['user_id'] = get_current_user_id();
|
334 |
+
$args['method'] = isset( $args['method'] ) ? strtoupper( $args['method'] ) : 'GET';
|
335 |
+
$args['url'] = sprintf(
|
336 |
+
'%s://%s/%s/v%s/%s',
|
337 |
+
self::protocol(),
|
338 |
+
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_HOST' ),
|
339 |
+
$base_api_path,
|
340 |
+
$version,
|
341 |
+
$path
|
342 |
+
);
|
343 |
+
|
344 |
+
if ( isset( $body ) && ! isset( $args['headers'] ) && in_array( $args['method'], array( 'POST', 'PUT', 'PATCH' ), true ) ) {
|
345 |
+
$args['headers'] = array( 'Content-Type' => 'application/json' );
|
346 |
+
}
|
347 |
+
|
348 |
+
if ( isset( $body ) && ! is_string( $body ) ) {
|
349 |
+
$body = wp_json_encode( $body );
|
350 |
+
}
|
351 |
+
|
352 |
+
return self::remote_request( $args, $body );
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Query the WordPress.com REST API using the blog token
|
357 |
+
*
|
358 |
+
* @param String $path The API endpoint relative path.
|
359 |
+
* @param String $version The API version.
|
360 |
+
* @param array $args Request arguments.
|
361 |
+
* @param String $body Request body.
|
362 |
+
* @param String $base_api_path (optional) the API base path override, defaults to 'rest'.
|
363 |
+
* @return array|WP_Error $response Data.
|
364 |
+
*/
|
365 |
+
public static function wpcom_json_api_request_as_blog(
|
366 |
+
$path,
|
367 |
+
$version = self::WPCOM_JSON_API_VERSION,
|
368 |
+
$args = array(),
|
369 |
+
$body = null,
|
370 |
+
$base_api_path = 'rest'
|
371 |
+
) {
|
372 |
+
$filtered_args = array_intersect_key(
|
373 |
+
$args,
|
374 |
+
array(
|
375 |
+
'headers' => 'array',
|
376 |
+
'method' => 'string',
|
377 |
+
'timeout' => 'int',
|
378 |
+
'redirection' => 'int',
|
379 |
+
'stream' => 'boolean',
|
380 |
+
'filename' => 'string',
|
381 |
+
'sslverify' => 'boolean',
|
382 |
+
)
|
383 |
+
);
|
384 |
+
|
385 |
+
// unprecedingslashit.
|
386 |
+
$_path = preg_replace( '/^\//', '', $path );
|
387 |
+
|
388 |
+
// Use GET by default whereas `remote_request` uses POST.
|
389 |
+
$request_method = ( isset( $filtered_args['method'] ) ) ? $filtered_args['method'] : 'GET';
|
390 |
+
|
391 |
+
$url = sprintf(
|
392 |
+
'%s://%s/%s/v%s/%s',
|
393 |
+
self::protocol(),
|
394 |
+
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_HOST' ),
|
395 |
+
$base_api_path,
|
396 |
+
$version,
|
397 |
+
$_path
|
398 |
+
);
|
399 |
+
|
400 |
+
$validated_args = array_merge(
|
401 |
+
$filtered_args,
|
402 |
+
array(
|
403 |
+
'url' => $url,
|
404 |
+
'blog_id' => (int) \Jetpack_Options::get_option( 'id' ),
|
405 |
+
'method' => $request_method,
|
406 |
+
)
|
407 |
+
);
|
408 |
+
|
409 |
+
return self::remote_request( $validated_args, $body );
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Takes an array or similar structure and recursively turns all values into strings. This is used to
|
414 |
+
* make sure that body hashes are made ith the string version, which is what will be seen after a
|
415 |
+
* server pulls up the data in the $_POST array.
|
416 |
+
*
|
417 |
+
* @param array|Mixed $data the data that needs to be stringified.
|
418 |
+
*
|
419 |
+
* @return array|string
|
420 |
+
*/
|
421 |
+
public static function _stringify_data( $data ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
422 |
+
|
423 |
+
// Booleans are special, lets just makes them and explicit 1/0 instead of the 0 being an empty string.
|
424 |
+
if ( is_bool( $data ) ) {
|
425 |
+
return $data ? '1' : '0';
|
426 |
+
}
|
427 |
+
|
428 |
+
// Cast objects into arrays.
|
429 |
+
if ( is_object( $data ) ) {
|
430 |
+
$data = (array) $data;
|
431 |
+
}
|
432 |
+
|
433 |
+
// Non arrays at this point should be just converted to strings.
|
434 |
+
if ( ! is_array( $data ) ) {
|
435 |
+
return (string) $data;
|
436 |
+
}
|
437 |
+
|
438 |
+
foreach ( $data as $key => &$value ) {
|
439 |
+
$value = self::_stringify_data( $value );
|
440 |
+
}
|
441 |
+
|
442 |
+
return $data;
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Gets protocol string.
|
447 |
+
*
|
448 |
+
* @return string `https` (if possible), else `http`.
|
449 |
+
*/
|
450 |
+
public static function protocol() {
|
451 |
+
/**
|
452 |
+
* Determines whether Jetpack can send outbound https requests to the WPCOM api.
|
453 |
+
*
|
454 |
+
* @since 3.6.0
|
455 |
+
*
|
456 |
+
* @param bool $proto Defaults to true.
|
457 |
+
*/
|
458 |
+
$https = apply_filters( 'jetpack_can_make_outbound_https', true );
|
459 |
+
|
460 |
+
return $https ? 'https' : 'http';
|
461 |
+
}
|
462 |
+
}
|
vendor/automattic/jetpack-connection/src/class-manager.php
ADDED
@@ -0,0 +1,2279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Jetpack Connection manager class file.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
use Automattic\Jetpack\Constants;
|
11 |
+
use Automattic\Jetpack\Roles;
|
12 |
+
use Automattic\Jetpack\Tracking;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The Jetpack Connection Manager class that is used as a single gateway between WordPress.com
|
16 |
+
* and Jetpack.
|
17 |
+
*/
|
18 |
+
class Manager {
|
19 |
+
|
20 |
+
const SECRETS_MISSING = 'secrets_missing';
|
21 |
+
const SECRETS_EXPIRED = 'secrets_expired';
|
22 |
+
const SECRETS_OPTION_NAME = 'jetpack_secrets';
|
23 |
+
const MAGIC_NORMAL_TOKEN_KEY = ';normal;';
|
24 |
+
const JETPACK_MASTER_USER = true;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The procedure that should be run to generate secrets.
|
28 |
+
*
|
29 |
+
* @var Callable
|
30 |
+
*/
|
31 |
+
protected $secret_callable;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* A copy of the raw POST data for signature verification purposes.
|
35 |
+
*
|
36 |
+
* @var String
|
37 |
+
*/
|
38 |
+
protected $raw_post_data;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Verification data needs to be stored to properly verify everything.
|
42 |
+
*
|
43 |
+
* @var Object
|
44 |
+
*/
|
45 |
+
private $xmlrpc_verification = null;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Plugin management object.
|
49 |
+
*
|
50 |
+
* @var Plugin
|
51 |
+
*/
|
52 |
+
private $plugin = null;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Initialize the object.
|
56 |
+
* Make sure to call the "Configure" first.
|
57 |
+
*
|
58 |
+
* @param string $plugin_slug Slug of the plugin using the connection (optional, but encouraged).
|
59 |
+
*
|
60 |
+
* @see \Automattic\Jetpack\Config
|
61 |
+
*/
|
62 |
+
public function __construct( $plugin_slug = null ) {
|
63 |
+
if ( $plugin_slug && is_string( $plugin_slug ) ) {
|
64 |
+
$this->set_plugin_instance( new Plugin( $plugin_slug ) );
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Initializes required listeners. This is done separately from the constructors
|
70 |
+
* because some objects sometimes need to instantiate separate objects of this class.
|
71 |
+
*
|
72 |
+
* @todo Implement a proper nonce verification.
|
73 |
+
*/
|
74 |
+
public static function configure() {
|
75 |
+
$manager = new self();
|
76 |
+
|
77 |
+
$manager->setup_xmlrpc_handlers(
|
78 |
+
$_GET, // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
79 |
+
$manager->is_active(),
|
80 |
+
$manager->verify_xml_rpc_signature()
|
81 |
+
);
|
82 |
+
|
83 |
+
if ( $manager->is_active() ) {
|
84 |
+
add_filter( 'xmlrpc_methods', array( $manager, 'public_xmlrpc_methods' ) );
|
85 |
+
} else {
|
86 |
+
add_action( 'rest_api_init', array( $manager, 'initialize_rest_api_registration_connector' ) );
|
87 |
+
}
|
88 |
+
|
89 |
+
add_action( 'jetpack_clean_nonces', array( $manager, 'clean_nonces' ) );
|
90 |
+
if ( ! wp_next_scheduled( 'jetpack_clean_nonces' ) ) {
|
91 |
+
wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' );
|
92 |
+
}
|
93 |
+
|
94 |
+
add_filter(
|
95 |
+
'jetpack_constant_default_value',
|
96 |
+
__NAMESPACE__ . '\Utils::jetpack_api_constant_filter',
|
97 |
+
10,
|
98 |
+
2
|
99 |
+
);
|
100 |
+
|
101 |
+
add_action( 'plugins_loaded', __NAMESPACE__ . '\Plugin_Storage::configure', 100 );
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Sets up the XMLRPC request handlers.
|
107 |
+
*
|
108 |
+
* @param array $request_params incoming request parameters.
|
109 |
+
* @param Boolean $is_active whether the connection is currently active.
|
110 |
+
* @param Boolean $is_signed whether the signature check has been successful.
|
111 |
+
* @param \Jetpack_XMLRPC_Server $xmlrpc_server (optional) an instance of the server to use instead of instantiating a new one.
|
112 |
+
*/
|
113 |
+
public function setup_xmlrpc_handlers(
|
114 |
+
$request_params,
|
115 |
+
$is_active,
|
116 |
+
$is_signed,
|
117 |
+
\Jetpack_XMLRPC_Server $xmlrpc_server = null
|
118 |
+
) {
|
119 |
+
add_filter( 'xmlrpc_blog_options', array( $this, 'xmlrpc_options' ), 1000, 2 );
|
120 |
+
|
121 |
+
if (
|
122 |
+
! isset( $request_params['for'] )
|
123 |
+
|| 'jetpack' !== $request_params['for']
|
124 |
+
) {
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
|
128 |
+
// Alternate XML-RPC, via ?for=jetpack&jetpack=comms.
|
129 |
+
if (
|
130 |
+
isset( $request_params['jetpack'] )
|
131 |
+
&& 'comms' === $request_params['jetpack']
|
132 |
+
) {
|
133 |
+
if ( ! Constants::is_defined( 'XMLRPC_REQUEST' ) ) {
|
134 |
+
// Use the real constant here for WordPress' sake.
|
135 |
+
define( 'XMLRPC_REQUEST', true );
|
136 |
+
}
|
137 |
+
|
138 |
+
add_action( 'template_redirect', array( $this, 'alternate_xmlrpc' ) );
|
139 |
+
|
140 |
+
add_filter( 'xmlrpc_methods', array( $this, 'remove_non_jetpack_xmlrpc_methods' ), 1000 );
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( ! Constants::get_constant( 'XMLRPC_REQUEST' ) ) {
|
144 |
+
return false;
|
145 |
+
}
|
146 |
+
// Display errors can cause the XML to be not well formed.
|
147 |
+
@ini_set( 'display_errors', false ); // phpcs:ignore
|
148 |
+
|
149 |
+
if ( $xmlrpc_server ) {
|
150 |
+
$this->xmlrpc_server = $xmlrpc_server;
|
151 |
+
} else {
|
152 |
+
$this->xmlrpc_server = new \Jetpack_XMLRPC_Server();
|
153 |
+
}
|
154 |
+
|
155 |
+
$this->require_jetpack_authentication();
|
156 |
+
|
157 |
+
if ( $is_active ) {
|
158 |
+
// Hack to preserve $HTTP_RAW_POST_DATA.
|
159 |
+
add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ) );
|
160 |
+
|
161 |
+
if ( $is_signed ) {
|
162 |
+
// The actual API methods.
|
163 |
+
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'xmlrpc_methods' ) );
|
164 |
+
} else {
|
165 |
+
// The jetpack.authorize method should be available for unauthenticated users on a site with an
|
166 |
+
// active Jetpack connection, so that additional users can link their account.
|
167 |
+
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'authorize_xmlrpc_methods' ) );
|
168 |
+
}
|
169 |
+
} else {
|
170 |
+
// The bootstrap API methods.
|
171 |
+
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'bootstrap_xmlrpc_methods' ) );
|
172 |
+
|
173 |
+
if ( $is_signed ) {
|
174 |
+
// The jetpack Provision method is available for blog-token-signed requests.
|
175 |
+
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'provision_xmlrpc_methods' ) );
|
176 |
+
} else {
|
177 |
+
new XMLRPC_Connector( $this );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
// Now that no one can authenticate, and we're whitelisting all XML-RPC methods, force enable_xmlrpc on.
|
182 |
+
add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
|
183 |
+
return true;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Initializes the REST API connector on the init hook.
|
188 |
+
*/
|
189 |
+
public function initialize_rest_api_registration_connector() {
|
190 |
+
new REST_Connector( $this );
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites,
|
195 |
+
* and just blanket block all requests to /xmlrpc.php, or apply other overly-sensitive
|
196 |
+
* security/firewall policies, we provide our own alternate XML RPC API endpoint
|
197 |
+
* which is accessible via a different URI. Most of the below is copied directly
|
198 |
+
* from /xmlrpc.php so that we're replicating it as closely as possible.
|
199 |
+
*
|
200 |
+
* @todo Tighten $wp_xmlrpc_server_class a bit to make sure it doesn't do bad things.
|
201 |
+
*/
|
202 |
+
public function alternate_xmlrpc() {
|
203 |
+
// phpcs:disable PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_raw_post_dataDeprecatedRemoved
|
204 |
+
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
|
205 |
+
global $HTTP_RAW_POST_DATA;
|
206 |
+
|
207 |
+
// Some browser-embedded clients send cookies. We don't want them.
|
208 |
+
$_COOKIE = array();
|
209 |
+
|
210 |
+
// A fix for mozBlog and other cases where '<?xml' isn't on the very first line.
|
211 |
+
if ( isset( $HTTP_RAW_POST_DATA ) ) {
|
212 |
+
$HTTP_RAW_POST_DATA = trim( $HTTP_RAW_POST_DATA );
|
213 |
+
}
|
214 |
+
|
215 |
+
// phpcs:enable
|
216 |
+
|
217 |
+
include_once ABSPATH . 'wp-admin/includes/admin.php';
|
218 |
+
include_once ABSPATH . WPINC . '/class-IXR.php';
|
219 |
+
include_once ABSPATH . WPINC . '/class-wp-xmlrpc-server.php';
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Filters the class used for handling XML-RPC requests.
|
223 |
+
*
|
224 |
+
* @since 3.1.0
|
225 |
+
*
|
226 |
+
* @param string $class The name of the XML-RPC server class.
|
227 |
+
*/
|
228 |
+
$wp_xmlrpc_server_class = apply_filters( 'wp_xmlrpc_server_class', 'wp_xmlrpc_server' );
|
229 |
+
$wp_xmlrpc_server = new $wp_xmlrpc_server_class();
|
230 |
+
|
231 |
+
// Fire off the request.
|
232 |
+
nocache_headers();
|
233 |
+
$wp_xmlrpc_server->serve_request();
|
234 |
+
|
235 |
+
exit;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Removes all XML-RPC methods that are not `jetpack.*`.
|
240 |
+
* Only used in our alternate XML-RPC endpoint, where we want to
|
241 |
+
* ensure that Core and other plugins' methods are not exposed.
|
242 |
+
*
|
243 |
+
* @param array $methods a list of registered WordPress XMLRPC methods.
|
244 |
+
* @return array filtered $methods
|
245 |
+
*/
|
246 |
+
public function remove_non_jetpack_xmlrpc_methods( $methods ) {
|
247 |
+
$jetpack_methods = array();
|
248 |
+
|
249 |
+
foreach ( $methods as $method => $callback ) {
|
250 |
+
if ( 0 === strpos( $method, 'jetpack.' ) ) {
|
251 |
+
$jetpack_methods[ $method ] = $callback;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
return $jetpack_methods;
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Removes all other authentication methods not to allow other
|
260 |
+
* methods to validate unauthenticated requests.
|
261 |
+
*/
|
262 |
+
public function require_jetpack_authentication() {
|
263 |
+
// Don't let anyone authenticate.
|
264 |
+
$_COOKIE = array();
|
265 |
+
remove_all_filters( 'authenticate' );
|
266 |
+
remove_all_actions( 'wp_login_failed' );
|
267 |
+
|
268 |
+
if ( $this->is_active() ) {
|
269 |
+
// Allow Jetpack authentication.
|
270 |
+
add_filter( 'authenticate', array( $this, 'authenticate_jetpack' ), 10, 3 );
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Authenticates XML-RPC and other requests from the Jetpack Server
|
276 |
+
*
|
277 |
+
* @param WP_User|Mixed $user user object if authenticated.
|
278 |
+
* @param String $username username.
|
279 |
+
* @param String $password password string.
|
280 |
+
* @return WP_User|Mixed authenticated user or error.
|
281 |
+
*/
|
282 |
+
public function authenticate_jetpack( $user, $username, $password ) {
|
283 |
+
if ( is_a( $user, '\\WP_User' ) ) {
|
284 |
+
return $user;
|
285 |
+
}
|
286 |
+
|
287 |
+
$token_details = $this->verify_xml_rpc_signature();
|
288 |
+
|
289 |
+
if ( ! $token_details ) {
|
290 |
+
return $user;
|
291 |
+
}
|
292 |
+
|
293 |
+
if ( 'user' !== $token_details['type'] ) {
|
294 |
+
return $user;
|
295 |
+
}
|
296 |
+
|
297 |
+
if ( ! $token_details['user_id'] ) {
|
298 |
+
return $user;
|
299 |
+
}
|
300 |
+
|
301 |
+
nocache_headers();
|
302 |
+
|
303 |
+
return new \WP_User( $token_details['user_id'] );
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Verifies the signature of the current request.
|
308 |
+
*
|
309 |
+
* @return false|array
|
310 |
+
*/
|
311 |
+
public function verify_xml_rpc_signature() {
|
312 |
+
if ( is_null( $this->xmlrpc_verification ) ) {
|
313 |
+
$this->xmlrpc_verification = $this->internal_verify_xml_rpc_signature();
|
314 |
+
|
315 |
+
if ( is_wp_error( $this->xmlrpc_verification ) ) {
|
316 |
+
/**
|
317 |
+
* Action for logging XMLRPC signature verification errors. This data is sensitive.
|
318 |
+
*
|
319 |
+
* Error codes:
|
320 |
+
* - malformed_token
|
321 |
+
* - malformed_user_id
|
322 |
+
* - unknown_token
|
323 |
+
* - could_not_sign
|
324 |
+
* - invalid_nonce
|
325 |
+
* - signature_mismatch
|
326 |
+
*
|
327 |
+
* @since 7.5.0
|
328 |
+
*
|
329 |
+
* @param WP_Error $signature_verification_error The verification error
|
330 |
+
*/
|
331 |
+
do_action( 'jetpack_verify_signature_error', $this->xmlrpc_verification );
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
return is_wp_error( $this->xmlrpc_verification ) ? false : $this->xmlrpc_verification;
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Verifies the signature of the current request.
|
340 |
+
*
|
341 |
+
* This function has side effects and should not be used. Instead,
|
342 |
+
* use the memoized version `->verify_xml_rpc_signature()`.
|
343 |
+
*
|
344 |
+
* @internal
|
345 |
+
* @todo Refactor to use proper nonce verification.
|
346 |
+
*/
|
347 |
+
private function internal_verify_xml_rpc_signature() {
|
348 |
+
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
349 |
+
// It's not for us.
|
350 |
+
if ( ! isset( $_GET['token'] ) || empty( $_GET['signature'] ) ) {
|
351 |
+
return false;
|
352 |
+
}
|
353 |
+
|
354 |
+
$signature_details = array(
|
355 |
+
'token' => isset( $_GET['token'] ) ? wp_unslash( $_GET['token'] ) : '',
|
356 |
+
'timestamp' => isset( $_GET['timestamp'] ) ? wp_unslash( $_GET['timestamp'] ) : '',
|
357 |
+
'nonce' => isset( $_GET['nonce'] ) ? wp_unslash( $_GET['nonce'] ) : '',
|
358 |
+
'body_hash' => isset( $_GET['body-hash'] ) ? wp_unslash( $_GET['body-hash'] ) : '',
|
359 |
+
'method' => wp_unslash( $_SERVER['REQUEST_METHOD'] ),
|
360 |
+
'url' => wp_unslash( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ), // Temp - will get real signature URL later.
|
361 |
+
'signature' => isset( $_GET['signature'] ) ? wp_unslash( $_GET['signature'] ) : '',
|
362 |
+
);
|
363 |
+
|
364 |
+
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
365 |
+
@list( $token_key, $version, $user_id ) = explode( ':', wp_unslash( $_GET['token'] ) );
|
366 |
+
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
367 |
+
|
368 |
+
$jetpack_api_version = Constants::get_constant( 'JETPACK__API_VERSION' );
|
369 |
+
|
370 |
+
if (
|
371 |
+
empty( $token_key )
|
372 |
+
||
|
373 |
+
empty( $version ) || strval( $jetpack_api_version ) !== $version ) {
|
374 |
+
return new \WP_Error( 'malformed_token', 'Malformed token in request', compact( 'signature_details' ) );
|
375 |
+
}
|
376 |
+
|
377 |
+
if ( '0' === $user_id ) {
|
378 |
+
$token_type = 'blog';
|
379 |
+
$user_id = 0;
|
380 |
+
} else {
|
381 |
+
$token_type = 'user';
|
382 |
+
if ( empty( $user_id ) || ! ctype_digit( $user_id ) ) {
|
383 |
+
return new \WP_Error(
|
384 |
+
'malformed_user_id',
|
385 |
+
'Malformed user_id in request',
|
386 |
+
compact( 'signature_details' )
|
387 |
+
);
|
388 |
+
}
|
389 |
+
$user_id = (int) $user_id;
|
390 |
+
|
391 |
+
$user = new \WP_User( $user_id );
|
392 |
+
if ( ! $user || ! $user->exists() ) {
|
393 |
+
return new \WP_Error(
|
394 |
+
'unknown_user',
|
395 |
+
sprintf( 'User %d does not exist', $user_id ),
|
396 |
+
compact( 'signature_details' )
|
397 |
+
);
|
398 |
+
}
|
399 |
+
}
|
400 |
+
|
401 |
+
$token = $this->get_access_token( $user_id, $token_key, false );
|
402 |
+
if ( is_wp_error( $token ) ) {
|
403 |
+
$token->add_data( compact( 'signature_details' ) );
|
404 |
+
return $token;
|
405 |
+
} elseif ( ! $token ) {
|
406 |
+
return new \WP_Error(
|
407 |
+
'unknown_token',
|
408 |
+
sprintf( 'Token %s:%s:%d does not exist', $token_key, $version, $user_id ),
|
409 |
+
compact( 'signature_details' )
|
410 |
+
);
|
411 |
+
}
|
412 |
+
|
413 |
+
$jetpack_signature = new \Jetpack_Signature( $token->secret, (int) \Jetpack_Options::get_option( 'time_diff' ) );
|
414 |
+
// phpcs:disable WordPress.Security.NonceVerification.Missing
|
415 |
+
if ( isset( $_POST['_jetpack_is_multipart'] ) ) {
|
416 |
+
$post_data = $_POST;
|
417 |
+
$file_hashes = array();
|
418 |
+
foreach ( $post_data as $post_data_key => $post_data_value ) {
|
419 |
+
if ( 0 !== strpos( $post_data_key, '_jetpack_file_hmac_' ) ) {
|
420 |
+
continue;
|
421 |
+
}
|
422 |
+
$post_data_key = substr( $post_data_key, strlen( '_jetpack_file_hmac_' ) );
|
423 |
+
$file_hashes[ $post_data_key ] = $post_data_value;
|
424 |
+
}
|
425 |
+
|
426 |
+
foreach ( $file_hashes as $post_data_key => $post_data_value ) {
|
427 |
+
unset( $post_data[ "_jetpack_file_hmac_{$post_data_key}" ] );
|
428 |
+
$post_data[ $post_data_key ] = $post_data_value;
|
429 |
+
}
|
430 |
+
|
431 |
+
ksort( $post_data );
|
432 |
+
|
433 |
+
$body = http_build_query( stripslashes_deep( $post_data ) );
|
434 |
+
} elseif ( is_null( $this->raw_post_data ) ) {
|
435 |
+
$body = file_get_contents( 'php://input' );
|
436 |
+
} else {
|
437 |
+
$body = null;
|
438 |
+
}
|
439 |
+
// phpcs:enable
|
440 |
+
|
441 |
+
$signature = $jetpack_signature->sign_current_request(
|
442 |
+
array( 'body' => is_null( $body ) ? $this->raw_post_data : $body )
|
443 |
+
);
|
444 |
+
|
445 |
+
$signature_details['url'] = $jetpack_signature->current_request_url;
|
446 |
+
|
447 |
+
if ( ! $signature ) {
|
448 |
+
return new \WP_Error(
|
449 |
+
'could_not_sign',
|
450 |
+
'Unknown signature error',
|
451 |
+
compact( 'signature_details' )
|
452 |
+
);
|
453 |
+
} elseif ( is_wp_error( $signature ) ) {
|
454 |
+
return $signature;
|
455 |
+
}
|
456 |
+
|
457 |
+
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
458 |
+
$timestamp = (int) $_GET['timestamp'];
|
459 |
+
$nonce = stripslashes( (string) $_GET['nonce'] );
|
460 |
+
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
461 |
+
|
462 |
+
// Use up the nonce regardless of whether the signature matches.
|
463 |
+
if ( ! $this->add_nonce( $timestamp, $nonce ) ) {
|
464 |
+
return new \WP_Error(
|
465 |
+
'invalid_nonce',
|
466 |
+
'Could not add nonce',
|
467 |
+
compact( 'signature_details' )
|
468 |
+
);
|
469 |
+
}
|
470 |
+
|
471 |
+
// Be careful about what you do with this debugging data.
|
472 |
+
// If a malicious requester has access to the expected signature,
|
473 |
+
// bad things might be possible.
|
474 |
+
$signature_details['expected'] = $signature;
|
475 |
+
|
476 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
477 |
+
if ( ! hash_equals( $signature, $_GET['signature'] ) ) {
|
478 |
+
return new \WP_Error(
|
479 |
+
'signature_mismatch',
|
480 |
+
'Signature mismatch',
|
481 |
+
compact( 'signature_details' )
|
482 |
+
);
|
483 |
+
}
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Action for additional token checking.
|
487 |
+
*
|
488 |
+
* @since 7.7.0
|
489 |
+
*
|
490 |
+
* @param array $post_data request data.
|
491 |
+
* @param array $token_data token data.
|
492 |
+
*/
|
493 |
+
return apply_filters(
|
494 |
+
'jetpack_signature_check_token',
|
495 |
+
array(
|
496 |
+
'type' => $token_type,
|
497 |
+
'token_key' => $token_key,
|
498 |
+
'user_id' => $token->external_user_id,
|
499 |
+
),
|
500 |
+
$token,
|
501 |
+
$this->raw_post_data
|
502 |
+
);
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Returns true if the current site is connected to WordPress.com.
|
507 |
+
*
|
508 |
+
* @return Boolean is the site connected?
|
509 |
+
*/
|
510 |
+
public function is_active() {
|
511 |
+
return (bool) $this->get_access_token( self::JETPACK_MASTER_USER );
|
512 |
+
}
|
513 |
+
|
514 |
+
/**
|
515 |
+
* Returns true if the site has both a token and a blog id, which indicates a site has been registered.
|
516 |
+
*
|
517 |
+
* @access public
|
518 |
+
*
|
519 |
+
* @return bool
|
520 |
+
*/
|
521 |
+
public function is_registered() {
|
522 |
+
$blog_id = \Jetpack_Options::get_option( 'id' );
|
523 |
+
$has_token = $this->is_active();
|
524 |
+
return $blog_id && $has_token;
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Checks to see if the connection owner of the site is missing.
|
529 |
+
*
|
530 |
+
* @return bool
|
531 |
+
*/
|
532 |
+
public function is_missing_connection_owner() {
|
533 |
+
$connection_owner = $this->get_connection_owner_id();
|
534 |
+
if ( ! get_user_by( 'id', $connection_owner ) ) {
|
535 |
+
return true;
|
536 |
+
}
|
537 |
+
|
538 |
+
return false;
|
539 |
+
}
|
540 |
+
|
541 |
+
/**
|
542 |
+
* Returns true if the user with the specified identifier is connected to
|
543 |
+
* WordPress.com.
|
544 |
+
*
|
545 |
+
* @param Integer|Boolean $user_id the user identifier.
|
546 |
+
* @return Boolean is the user connected?
|
547 |
+
*/
|
548 |
+
public function is_user_connected( $user_id = false ) {
|
549 |
+
$user_id = false === $user_id ? get_current_user_id() : absint( $user_id );
|
550 |
+
if ( ! $user_id ) {
|
551 |
+
return false;
|
552 |
+
}
|
553 |
+
|
554 |
+
return (bool) $this->get_access_token( $user_id );
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Returns the local user ID of the connection owner.
|
559 |
+
*
|
560 |
+
* @return string|int Returns the ID of the connection owner or False if no connection owner found.
|
561 |
+
*/
|
562 |
+
public function get_connection_owner_id() {
|
563 |
+
$user_token = $this->get_access_token( self::JETPACK_MASTER_USER );
|
564 |
+
$connection_owner = false;
|
565 |
+
if ( $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) ) {
|
566 |
+
$connection_owner = $user_token->external_user_id;
|
567 |
+
}
|
568 |
+
|
569 |
+
return $connection_owner;
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* Returns an array of user_id's that have user tokens for communicating with wpcom.
|
574 |
+
* Able to select by specific capability.
|
575 |
+
*
|
576 |
+
* @param string $capability The capability of the user.
|
577 |
+
* @return array Array of WP_User objects if found.
|
578 |
+
*/
|
579 |
+
public function get_connected_users( $capability = 'any' ) {
|
580 |
+
$connected_users = array();
|
581 |
+
$connected_user_ids = array_keys( \Jetpack_Options::get_option( 'user_tokens' ) );
|
582 |
+
|
583 |
+
if ( ! empty( $connected_user_ids ) ) {
|
584 |
+
foreach ( $connected_user_ids as $id ) {
|
585 |
+
// Check for capability.
|
586 |
+
if ( 'any' !== $capability && ! user_can( $id, $capability ) ) {
|
587 |
+
continue;
|
588 |
+
}
|
589 |
+
|
590 |
+
$connected_users[] = get_userdata( $id );
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
return $connected_users;
|
595 |
+
}
|
596 |
+
|
597 |
+
/**
|
598 |
+
* Get the wpcom user data of the current|specified connected user.
|
599 |
+
*
|
600 |
+
* @todo Refactor to properly load the XMLRPC client independently.
|
601 |
+
*
|
602 |
+
* @param Integer $user_id the user identifier.
|
603 |
+
* @return Object the user object.
|
604 |
+
*/
|
605 |
+
public function get_connected_user_data( $user_id = null ) {
|
606 |
+
if ( ! $user_id ) {
|
607 |
+
$user_id = get_current_user_id();
|
608 |
+
}
|
609 |
+
|
610 |
+
$transient_key = "jetpack_connected_user_data_$user_id";
|
611 |
+
$cached_user_data = get_transient( $transient_key );
|
612 |
+
|
613 |
+
if ( $cached_user_data ) {
|
614 |
+
return $cached_user_data;
|
615 |
+
}
|
616 |
+
|
617 |
+
$xml = new \Jetpack_IXR_Client(
|
618 |
+
array(
|
619 |
+
'user_id' => $user_id,
|
620 |
+
)
|
621 |
+
);
|
622 |
+
$xml->query( 'wpcom.getUser' );
|
623 |
+
if ( ! $xml->isError() ) {
|
624 |
+
$user_data = $xml->getResponse();
|
625 |
+
set_transient( $transient_key, $xml->getResponse(), DAY_IN_SECONDS );
|
626 |
+
return $user_data;
|
627 |
+
}
|
628 |
+
|
629 |
+
return false;
|
630 |
+
}
|
631 |
+
|
632 |
+
/**
|
633 |
+
* Returns a user object of the connection owner.
|
634 |
+
*
|
635 |
+
* @return object|false False if no connection owner found.
|
636 |
+
*/
|
637 |
+
public function get_connection_owner() {
|
638 |
+
$user_token = $this->get_access_token( self::JETPACK_MASTER_USER );
|
639 |
+
|
640 |
+
$connection_owner = false;
|
641 |
+
if ( $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) ) {
|
642 |
+
$connection_owner = get_userdata( $user_token->external_user_id );
|
643 |
+
}
|
644 |
+
|
645 |
+
return $connection_owner;
|
646 |
+
}
|
647 |
+
|
648 |
+
/**
|
649 |
+
* Returns true if the provided user is the Jetpack connection owner.
|
650 |
+
* If user ID is not specified, the current user will be used.
|
651 |
+
*
|
652 |
+
* @param Integer|Boolean $user_id the user identifier. False for current user.
|
653 |
+
* @return Boolean True the user the connection owner, false otherwise.
|
654 |
+
*/
|
655 |
+
public function is_connection_owner( $user_id = false ) {
|
656 |
+
if ( ! $user_id ) {
|
657 |
+
$user_id = get_current_user_id();
|
658 |
+
}
|
659 |
+
|
660 |
+
$user_token = $this->get_access_token( self::JETPACK_MASTER_USER );
|
661 |
+
|
662 |
+
return $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) && $user_id === $user_token->external_user_id;
|
663 |
+
}
|
664 |
+
|
665 |
+
/**
|
666 |
+
* Connects the user with a specified ID to a WordPress.com user using the
|
667 |
+
* remote login flow.
|
668 |
+
*
|
669 |
+
* @access public
|
670 |
+
*
|
671 |
+
* @param Integer $user_id (optional) the user identifier, defaults to current user.
|
672 |
+
* @param String $redirect_url the URL to redirect the user to for processing, defaults to
|
673 |
+
* admin_url().
|
674 |
+
* @return WP_Error only in case of a failed user lookup.
|
675 |
+
*/
|
676 |
+
public function connect_user( $user_id = null, $redirect_url = null ) {
|
677 |
+
$user = null;
|
678 |
+
if ( null === $user_id ) {
|
679 |
+
$user = wp_get_current_user();
|
680 |
+
} else {
|
681 |
+
$user = get_user_by( 'ID', $user_id );
|
682 |
+
}
|
683 |
+
|
684 |
+
if ( empty( $user ) ) {
|
685 |
+
return new \WP_Error( 'user_not_found', 'Attempting to connect a non-existent user.' );
|
686 |
+
}
|
687 |
+
|
688 |
+
if ( null === $redirect_url ) {
|
689 |
+
$redirect_url = admin_url();
|
690 |
+
}
|
691 |
+
|
692 |
+
// Using wp_redirect intentionally because we're redirecting outside.
|
693 |
+
wp_redirect( $this->get_authorization_url( $user ) ); // phpcs:ignore WordPress.Security.SafeRedirect
|
694 |
+
exit();
|
695 |
+
}
|
696 |
+
|
697 |
+
/**
|
698 |
+
* Unlinks the current user from the linked WordPress.com user.
|
699 |
+
*
|
700 |
+
* @access public
|
701 |
+
* @static
|
702 |
+
*
|
703 |
+
* @todo Refactor to properly load the XMLRPC client independently.
|
704 |
+
*
|
705 |
+
* @param Integer $user_id the user identifier.
|
706 |
+
* @return Boolean Whether the disconnection of the user was successful.
|
707 |
+
*/
|
708 |
+
public static function disconnect_user( $user_id = null ) {
|
709 |
+
$tokens = \Jetpack_Options::get_option( 'user_tokens' );
|
710 |
+
if ( ! $tokens ) {
|
711 |
+
return false;
|
712 |
+
}
|
713 |
+
|
714 |
+
$user_id = empty( $user_id ) ? get_current_user_id() : intval( $user_id );
|
715 |
+
|
716 |
+
if ( \Jetpack_Options::get_option( 'master_user' ) === $user_id ) {
|
717 |
+
return false;
|
718 |
+
}
|
719 |
+
|
720 |
+
if ( ! isset( $tokens[ $user_id ] ) ) {
|
721 |
+
return false;
|
722 |
+
}
|
723 |
+
|
724 |
+
$xml = new \Jetpack_IXR_Client( compact( 'user_id' ) );
|
725 |
+
$xml->query( 'jetpack.unlink_user', $user_id );
|
726 |
+
|
727 |
+
unset( $tokens[ $user_id ] );
|
728 |
+
|
729 |
+
\Jetpack_Options::update_option( 'user_tokens', $tokens );
|
730 |
+
|
731 |
+
/**
|
732 |
+
* Fires after the current user has been unlinked from WordPress.com.
|
733 |
+
*
|
734 |
+
* @since 4.1.0
|
735 |
+
*
|
736 |
+
* @param int $user_id The current user's ID.
|
737 |
+
*/
|
738 |
+
do_action( 'jetpack_unlinked_user', $user_id );
|
739 |
+
|
740 |
+
return true;
|
741 |
+
}
|
742 |
+
|
743 |
+
/**
|
744 |
+
* Returns the requested Jetpack API URL.
|
745 |
+
*
|
746 |
+
* @param String $relative_url the relative API path.
|
747 |
+
* @return String API URL.
|
748 |
+
*/
|
749 |
+
public function api_url( $relative_url ) {
|
750 |
+
$api_base = Constants::get_constant( 'JETPACK__API_BASE' );
|
751 |
+
$api_version = '/' . Constants::get_constant( 'JETPACK__API_VERSION' ) . '/';
|
752 |
+
|
753 |
+
/**
|
754 |
+
* Filters whether the connection manager should use the iframe authorization
|
755 |
+
* flow instead of the regular redirect-based flow.
|
756 |
+
*
|
757 |
+
* @since 8.3.0
|
758 |
+
*
|
759 |
+
* @param Boolean $is_iframe_flow_used should the iframe flow be used, defaults to false.
|
760 |
+
*/
|
761 |
+
$iframe_flow = apply_filters( 'jetpack_use_iframe_authorization_flow', false );
|
762 |
+
|
763 |
+
// Do not modify anything that is not related to authorize requests.
|
764 |
+
if ( 'authorize' === $relative_url && $iframe_flow ) {
|
765 |
+
$relative_url = 'authorize_iframe';
|
766 |
+
}
|
767 |
+
|
768 |
+
/**
|
769 |
+
* Filters the API URL that Jetpack uses for server communication.
|
770 |
+
*
|
771 |
+
* @since 8.0.0
|
772 |
+
*
|
773 |
+
* @param String $url the generated URL.
|
774 |
+
* @param String $relative_url the relative URL that was passed as an argument.
|
775 |
+
* @param String $api_base the API base string that is being used.
|
776 |
+
* @param String $api_version the API version string that is being used.
|
777 |
+
*/
|
778 |
+
return apply_filters(
|
779 |
+
'jetpack_api_url',
|
780 |
+
rtrim( $api_base . $relative_url, '/\\' ) . $api_version,
|
781 |
+
$relative_url,
|
782 |
+
$api_base,
|
783 |
+
$api_version
|
784 |
+
);
|
785 |
+
}
|
786 |
+
|
787 |
+
/**
|
788 |
+
* Returns the Jetpack XMLRPC WordPress.com API endpoint URL.
|
789 |
+
*
|
790 |
+
* @return String XMLRPC API URL.
|
791 |
+
*/
|
792 |
+
public function xmlrpc_api_url() {
|
793 |
+
$base = preg_replace(
|
794 |
+
'#(https?://[^?/]+)(/?.*)?$#',
|
795 |
+
'\\1',
|
796 |
+
Constants::get_constant( 'JETPACK__API_BASE' )
|
797 |
+
);
|
798 |
+
return untrailingslashit( $base ) . '/xmlrpc.php';
|
799 |
+
}
|
800 |
+
|
801 |
+
/**
|
802 |
+
* Attempts Jetpack registration which sets up the site for connection. Should
|
803 |
+
* remain public because the call to action comes from the current site, not from
|
804 |
+
* WordPress.com.
|
805 |
+
*
|
806 |
+
* @param String $api_endpoint (optional) an API endpoint to use, defaults to 'register'.
|
807 |
+
* @return Integer zero on success, or a bitmask on failure.
|
808 |
+
*/
|
809 |
+
public function register( $api_endpoint = 'register' ) {
|
810 |
+
add_action( 'pre_update_jetpack_option_register', array( '\\Jetpack_Options', 'delete_option' ) );
|
811 |
+
$secrets = $this->generate_secrets( 'register', get_current_user_id(), 600 );
|
812 |
+
|
813 |
+
if (
|
814 |
+
empty( $secrets['secret_1'] ) ||
|
815 |
+
empty( $secrets['secret_2'] ) ||
|
816 |
+
empty( $secrets['exp'] )
|
817 |
+
) {
|
818 |
+
return new \WP_Error( 'missing_secrets' );
|
819 |
+
}
|
820 |
+
|
821 |
+
// Better to try (and fail) to set a higher timeout than this system
|
822 |
+
// supports than to have register fail for more users than it should.
|
823 |
+
$timeout = $this->set_min_time_limit( 60 ) / 2;
|
824 |
+
|
825 |
+
$gmt_offset = get_option( 'gmt_offset' );
|
826 |
+
if ( ! $gmt_offset ) {
|
827 |
+
$gmt_offset = 0;
|
828 |
+
}
|
829 |
+
|
830 |
+
$stats_options = get_option( 'stats_options' );
|
831 |
+
$stats_id = isset( $stats_options['blog_id'] )
|
832 |
+
? $stats_options['blog_id']
|
833 |
+
: null;
|
834 |
+
|
835 |
+
/**
|
836 |
+
* Filters the request body for additional property addition.
|
837 |
+
*
|
838 |
+
* @since 7.7.0
|
839 |
+
*
|
840 |
+
* @param array $post_data request data.
|
841 |
+
* @param Array $token_data token data.
|
842 |
+
*/
|
843 |
+
$body = apply_filters(
|
844 |
+
'jetpack_register_request_body',
|
845 |
+
array(
|
846 |
+
'siteurl' => site_url(),
|
847 |
+
'home' => home_url(),
|
848 |
+
'gmt_offset' => $gmt_offset,
|
849 |
+
'timezone_string' => (string) get_option( 'timezone_string' ),
|
850 |
+
'site_name' => (string) get_option( 'blogname' ),
|
851 |
+
'secret_1' => $secrets['secret_1'],
|
852 |
+
'secret_2' => $secrets['secret_2'],
|
853 |
+
'site_lang' => get_locale(),
|
854 |
+
'timeout' => $timeout,
|
855 |
+
'stats_id' => $stats_id,
|
856 |
+
'state' => get_current_user_id(),
|
857 |
+
'site_created' => $this->get_assumed_site_creation_date(),
|
858 |
+
'jetpack_version' => Constants::get_constant( 'JETPACK__VERSION' ),
|
859 |
+
'ABSPATH' => Constants::get_constant( 'ABSPATH' ),
|
860 |
+
)
|
861 |
+
);
|
862 |
+
|
863 |
+
$args = array(
|
864 |
+
'method' => 'POST',
|
865 |
+
'body' => $body,
|
866 |
+
'headers' => array(
|
867 |
+
'Accept' => 'application/json',
|
868 |
+
),
|
869 |
+
'timeout' => $timeout,
|
870 |
+
);
|
871 |
+
|
872 |
+
$args['body'] = $this->apply_activation_source_to_args( $args['body'] );
|
873 |
+
|
874 |
+
// TODO: fix URLs for bad hosts.
|
875 |
+
$response = Client::_wp_remote_request(
|
876 |
+
$this->api_url( $api_endpoint ),
|
877 |
+
$args,
|
878 |
+
true
|
879 |
+
);
|
880 |
+
|
881 |
+
// Make sure the response is valid and does not contain any Jetpack errors.
|
882 |
+
$registration_details = $this->validate_remote_register_response( $response );
|
883 |
+
|
884 |
+
if ( is_wp_error( $registration_details ) ) {
|
885 |
+
return $registration_details;
|
886 |
+
} elseif ( ! $registration_details ) {
|
887 |
+
return new \WP_Error(
|
888 |
+
'unknown_error',
|
889 |
+
'Unknown error registering your Jetpack site.',
|
890 |
+
wp_remote_retrieve_response_code( $response )
|
891 |
+
);
|
892 |
+
}
|
893 |
+
|
894 |
+
if ( empty( $registration_details->jetpack_secret ) || ! is_string( $registration_details->jetpack_secret ) ) {
|
895 |
+
return new \WP_Error(
|
896 |
+
'jetpack_secret',
|
897 |
+
'Unable to validate registration of your Jetpack site.',
|
898 |
+
wp_remote_retrieve_response_code( $response )
|
899 |
+
);
|
900 |
+
}
|
901 |
+
|
902 |
+
if ( isset( $registration_details->jetpack_public ) ) {
|
903 |
+
$jetpack_public = (int) $registration_details->jetpack_public;
|
904 |
+
} else {
|
905 |
+
$jetpack_public = false;
|
906 |
+
}
|
907 |
+
|
908 |
+
\Jetpack_Options::update_options(
|
909 |
+
array(
|
910 |
+
'id' => (int) $registration_details->jetpack_id,
|
911 |
+
'blog_token' => (string) $registration_details->jetpack_secret,
|
912 |
+
'public' => $jetpack_public,
|
913 |
+
)
|
914 |
+
);
|
915 |
+
|
916 |
+
/**
|
917 |
+
* Fires when a site is registered on WordPress.com.
|
918 |
+
*
|
919 |
+
* @since 3.7.0
|
920 |
+
*
|
921 |
+
* @param int $json->jetpack_id Jetpack Blog ID.
|
922 |
+
* @param string $json->jetpack_secret Jetpack Blog Token.
|
923 |
+
* @param int|bool $jetpack_public Is the site public.
|
924 |
+
*/
|
925 |
+
do_action(
|
926 |
+
'jetpack_site_registered',
|
927 |
+
$registration_details->jetpack_id,
|
928 |
+
$registration_details->jetpack_secret,
|
929 |
+
$jetpack_public
|
930 |
+
);
|
931 |
+
|
932 |
+
if ( isset( $registration_details->token ) ) {
|
933 |
+
/**
|
934 |
+
* Fires when a user token is sent along with the registration data.
|
935 |
+
*
|
936 |
+
* @since 7.6.0
|
937 |
+
*
|
938 |
+
* @param object $token the administrator token for the newly registered site.
|
939 |
+
*/
|
940 |
+
do_action( 'jetpack_site_registered_user_token', $registration_details->token );
|
941 |
+
}
|
942 |
+
|
943 |
+
return true;
|
944 |
+
}
|
945 |
+
|
946 |
+
/**
|
947 |
+
* Takes the response from the Jetpack register new site endpoint and
|
948 |
+
* verifies it worked properly.
|
949 |
+
*
|
950 |
+
* @since 2.6
|
951 |
+
*
|
952 |
+
* @param Mixed $response the response object, or the error object.
|
953 |
+
* @return string|WP_Error A JSON object on success or Jetpack_Error on failures
|
954 |
+
**/
|
955 |
+
protected function validate_remote_register_response( $response ) {
|
956 |
+
if ( is_wp_error( $response ) ) {
|
957 |
+
return new \WP_Error(
|
958 |
+
'register_http_request_failed',
|
959 |
+
$response->get_error_message()
|
960 |
+
);
|
961 |
+
}
|
962 |
+
|
963 |
+
$code = wp_remote_retrieve_response_code( $response );
|
964 |
+
$entity = wp_remote_retrieve_body( $response );
|
965 |
+
|
966 |
+
if ( $entity ) {
|
967 |
+
$registration_response = json_decode( $entity );
|
968 |
+
} else {
|
969 |
+
$registration_response = false;
|
970 |
+
}
|
971 |
+
|
972 |
+
$code_type = intval( $code / 100 );
|
973 |
+
if ( 5 === $code_type ) {
|
974 |
+
return new \WP_Error( 'wpcom_5??', $code );
|
975 |
+
} elseif ( 408 === $code ) {
|
976 |
+
return new \WP_Error( 'wpcom_408', $code );
|
977 |
+
} elseif ( ! empty( $registration_response->error ) ) {
|
978 |
+
if (
|
979 |
+
'xml_rpc-32700' === $registration_response->error
|
980 |
+
&& ! function_exists( 'xml_parser_create' )
|
981 |
+
) {
|
982 |
+
$error_description = __( "PHP's XML extension is not available. Jetpack requires the XML extension to communicate with WordPress.com. Please contact your hosting provider to enable PHP's XML extension.", 'jetpack' );
|
983 |
+
} else {
|
984 |
+
$error_description = isset( $registration_response->error_description )
|
985 |
+
? (string) $registration_response->error_description
|
986 |
+
: '';
|
987 |
+
}
|
988 |
+
|
989 |
+
return new \WP_Error(
|
990 |
+
(string) $registration_response->error,
|
991 |
+
$error_description,
|
992 |
+
$code
|
993 |
+
);
|
994 |
+
} elseif ( 200 !== $code ) {
|
995 |
+
return new \WP_Error( 'wpcom_bad_response', $code );
|
996 |
+
}
|
997 |
+
|
998 |
+
// Jetpack ID error block.
|
999 |
+
if ( empty( $registration_response->jetpack_id ) ) {
|
1000 |
+
return new \WP_Error(
|
1001 |
+
'jetpack_id',
|
1002 |
+
/* translators: %s is an error message string */
|
1003 |
+
sprintf( __( 'Error Details: Jetpack ID is empty. Do not publicly post this error message! %s', 'jetpack' ), $entity ),
|
1004 |
+
$entity
|
1005 |
+
);
|
1006 |
+
} elseif ( ! is_scalar( $registration_response->jetpack_id ) ) {
|
1007 |
+
return new \WP_Error(
|
1008 |
+
'jetpack_id',
|
1009 |
+
/* translators: %s is an error message string */
|
1010 |
+
sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ),
|
1011 |
+
$entity
|
1012 |
+
);
|
1013 |
+
} elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) {
|
1014 |
+
return new \WP_Error(
|
1015 |
+
'jetpack_id',
|
1016 |
+
/* translators: %s is an error message string */
|
1017 |
+
sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ),
|
1018 |
+
$entity
|
1019 |
+
);
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
return $registration_response;
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* Adds a used nonce to a list of known nonces.
|
1027 |
+
*
|
1028 |
+
* @param int $timestamp the current request timestamp.
|
1029 |
+
* @param string $nonce the nonce value.
|
1030 |
+
* @return bool whether the nonce is unique or not.
|
1031 |
+
*/
|
1032 |
+
public function add_nonce( $timestamp, $nonce ) {
|
1033 |
+
global $wpdb;
|
1034 |
+
static $nonces_used_this_request = array();
|
1035 |
+
|
1036 |
+
if ( isset( $nonces_used_this_request[ "$timestamp:$nonce" ] ) ) {
|
1037 |
+
return $nonces_used_this_request[ "$timestamp:$nonce" ];
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
// This should always have gone through Jetpack_Signature::sign_request() first to check $timestamp an $nonce.
|
1041 |
+
$timestamp = (int) $timestamp;
|
1042 |
+
$nonce = esc_sql( $nonce );
|
1043 |
+
|
1044 |
+
// Raw query so we can avoid races: add_option will also update.
|
1045 |
+
$show_errors = $wpdb->show_errors( false );
|
1046 |
+
|
1047 |
+
$old_nonce = $wpdb->get_row(
|
1048 |
+
$wpdb->prepare( "SELECT * FROM `$wpdb->options` WHERE option_name = %s", "jetpack_nonce_{$timestamp}_{$nonce}" )
|
1049 |
+
);
|
1050 |
+
|
1051 |
+
if ( is_null( $old_nonce ) ) {
|
1052 |
+
$return = $wpdb->query(
|
1053 |
+
$wpdb->prepare(
|
1054 |
+
"INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s)",
|
1055 |
+
"jetpack_nonce_{$timestamp}_{$nonce}",
|
1056 |
+
time(),
|
1057 |
+
'no'
|
1058 |
+
)
|
1059 |
+
);
|
1060 |
+
} else {
|
1061 |
+
$return = false;
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
$wpdb->show_errors( $show_errors );
|
1065 |
+
|
1066 |
+
$nonces_used_this_request[ "$timestamp:$nonce" ] = $return;
|
1067 |
+
|
1068 |
+
return $return;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
/**
|
1072 |
+
* Cleans nonces that were saved when calling ::add_nonce.
|
1073 |
+
*
|
1074 |
+
* @todo Properly prepare the query before executing it.
|
1075 |
+
*
|
1076 |
+
* @param bool $all whether to clean even non-expired nonces.
|
1077 |
+
*/
|
1078 |
+
public function clean_nonces( $all = false ) {
|
1079 |
+
global $wpdb;
|
1080 |
+
|
1081 |
+
$sql = "DELETE FROM `$wpdb->options` WHERE `option_name` LIKE %s";
|
1082 |
+
$sql_args = array( $wpdb->esc_like( 'jetpack_nonce_' ) . '%' );
|
1083 |
+
|
1084 |
+
if ( true !== $all ) {
|
1085 |
+
$sql .= ' AND CAST( `option_value` AS UNSIGNED ) < %d';
|
1086 |
+
$sql_args[] = time() - 3600;
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
$sql .= ' ORDER BY `option_id` LIMIT 100';
|
1090 |
+
|
1091 |
+
$sql = $wpdb->prepare( $sql, $sql_args ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
1092 |
+
|
1093 |
+
for ( $i = 0; $i < 1000; $i++ ) {
|
1094 |
+
if ( ! $wpdb->query( $sql ) ) { // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
1095 |
+
break;
|
1096 |
+
}
|
1097 |
+
}
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
/**
|
1101 |
+
* Builds the timeout limit for queries talking with the wpcom servers.
|
1102 |
+
*
|
1103 |
+
* Based on local php max_execution_time in php.ini
|
1104 |
+
*
|
1105 |
+
* @since 5.4
|
1106 |
+
* @return int
|
1107 |
+
**/
|
1108 |
+
public function get_max_execution_time() {
|
1109 |
+
$timeout = (int) ini_get( 'max_execution_time' );
|
1110 |
+
|
1111 |
+
// Ensure exec time set in php.ini.
|
1112 |
+
if ( ! $timeout ) {
|
1113 |
+
$timeout = 30;
|
1114 |
+
}
|
1115 |
+
return $timeout;
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
/**
|
1119 |
+
* Sets a minimum request timeout, and returns the current timeout
|
1120 |
+
*
|
1121 |
+
* @since 5.4
|
1122 |
+
* @param Integer $min_timeout the minimum timeout value.
|
1123 |
+
**/
|
1124 |
+
public function set_min_time_limit( $min_timeout ) {
|
1125 |
+
$timeout = $this->get_max_execution_time();
|
1126 |
+
if ( $timeout < $min_timeout ) {
|
1127 |
+
$timeout = $min_timeout;
|
1128 |
+
set_time_limit( $timeout );
|
1129 |
+
}
|
1130 |
+
return $timeout;
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
/**
|
1134 |
+
* Get our assumed site creation date.
|
1135 |
+
* Calculated based on the earlier date of either:
|
1136 |
+
* - Earliest admin user registration date.
|
1137 |
+
* - Earliest date of post of any post type.
|
1138 |
+
*
|
1139 |
+
* @since 7.2.0
|
1140 |
+
*
|
1141 |
+
* @return string Assumed site creation date and time.
|
1142 |
+
*/
|
1143 |
+
public function get_assumed_site_creation_date() {
|
1144 |
+
$cached_date = get_transient( 'jetpack_assumed_site_creation_date' );
|
1145 |
+
if ( ! empty( $cached_date ) ) {
|
1146 |
+
return $cached_date;
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
$earliest_registered_users = get_users(
|
1150 |
+
array(
|
1151 |
+
'role' => 'administrator',
|
1152 |
+
'orderby' => 'user_registered',
|
1153 |
+
'order' => 'ASC',
|
1154 |
+
'fields' => array( 'user_registered' ),
|
1155 |
+
'number' => 1,
|
1156 |
+
)
|
1157 |
+
);
|
1158 |
+
$earliest_registration_date = $earliest_registered_users[0]->user_registered;
|
1159 |
+
|
1160 |
+
$earliest_posts = get_posts(
|
1161 |
+
array(
|
1162 |
+
'posts_per_page' => 1,
|
1163 |
+
'post_type' => 'any',
|
1164 |
+
'post_status' => 'any',
|
1165 |
+
'orderby' => 'date',
|
1166 |
+
'order' => 'ASC',
|
1167 |
+
)
|
1168 |
+
);
|
1169 |
+
|
1170 |
+
// If there are no posts at all, we'll count only on user registration date.
|
1171 |
+
if ( $earliest_posts ) {
|
1172 |
+
$earliest_post_date = $earliest_posts[0]->post_date;
|
1173 |
+
} else {
|
1174 |
+
$earliest_post_date = PHP_INT_MAX;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
$assumed_date = min( $earliest_registration_date, $earliest_post_date );
|
1178 |
+
set_transient( 'jetpack_assumed_site_creation_date', $assumed_date );
|
1179 |
+
|
1180 |
+
return $assumed_date;
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
/**
|
1184 |
+
* Adds the activation source string as a parameter to passed arguments.
|
1185 |
+
*
|
1186 |
+
* @todo Refactor to use rawurlencode() instead of urlencode().
|
1187 |
+
*
|
1188 |
+
* @param array $args arguments that need to have the source added.
|
1189 |
+
* @return array $amended arguments.
|
1190 |
+
*/
|
1191 |
+
public static function apply_activation_source_to_args( $args ) {
|
1192 |
+
list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
|
1193 |
+
|
1194 |
+
if ( $activation_source_name ) {
|
1195 |
+
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode
|
1196 |
+
$args['_as'] = urlencode( $activation_source_name );
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
if ( $activation_source_keyword ) {
|
1200 |
+
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode
|
1201 |
+
$args['_ak'] = urlencode( $activation_source_keyword );
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
return $args;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
/**
|
1208 |
+
* Returns the callable that would be used to generate secrets.
|
1209 |
+
*
|
1210 |
+
* @return Callable a function that returns a secure string to be used as a secret.
|
1211 |
+
*/
|
1212 |
+
protected function get_secret_callable() {
|
1213 |
+
if ( ! isset( $this->secret_callable ) ) {
|
1214 |
+
/**
|
1215 |
+
* Allows modification of the callable that is used to generate connection secrets.
|
1216 |
+
*
|
1217 |
+
* @param Callable a function or method that returns a secret string.
|
1218 |
+
*/
|
1219 |
+
$this->secret_callable = apply_filters( 'jetpack_connection_secret_generator', array( $this, 'secret_callable_method' ) );
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
return $this->secret_callable;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
/**
|
1226 |
+
* Runs the wp_generate_password function with the required parameters. This is the
|
1227 |
+
* default implementation of the secret callable, can be overridden using the
|
1228 |
+
* jetpack_connection_secret_generator filter.
|
1229 |
+
*
|
1230 |
+
* @return String $secret value.
|
1231 |
+
*/
|
1232 |
+
private function secret_callable_method() {
|
1233 |
+
return wp_generate_password( 32, false );
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
/**
|
1237 |
+
* Generates two secret tokens and the end of life timestamp for them.
|
1238 |
+
*
|
1239 |
+
* @param String $action The action name.
|
1240 |
+
* @param Integer $user_id The user identifier.
|
1241 |
+
* @param Integer $exp Expiration time in seconds.
|
1242 |
+
*/
|
1243 |
+
public function generate_secrets( $action, $user_id = false, $exp = 600 ) {
|
1244 |
+
if ( false === $user_id ) {
|
1245 |
+
$user_id = get_current_user_id();
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
$callable = $this->get_secret_callable();
|
1249 |
+
|
1250 |
+
$secrets = \Jetpack_Options::get_raw_option(
|
1251 |
+
self::SECRETS_OPTION_NAME,
|
1252 |
+
array()
|
1253 |
+
);
|
1254 |
+
|
1255 |
+
$secret_name = 'jetpack_' . $action . '_' . $user_id;
|
1256 |
+
|
1257 |
+
if (
|
1258 |
+
isset( $secrets[ $secret_name ] ) &&
|
1259 |
+
$secrets[ $secret_name ]['exp'] > time()
|
1260 |
+
) {
|
1261 |
+
return $secrets[ $secret_name ];
|
1262 |
+
}
|
1263 |
+
|
1264 |
+
$secret_value = array(
|
1265 |
+
'secret_1' => call_user_func( $callable ),
|
1266 |
+
'secret_2' => call_user_func( $callable ),
|
1267 |
+
'exp' => time() + $exp,
|
1268 |
+
);
|
1269 |
+
|
1270 |
+
$secrets[ $secret_name ] = $secret_value;
|
1271 |
+
|
1272 |
+
\Jetpack_Options::update_raw_option( self::SECRETS_OPTION_NAME, $secrets );
|
1273 |
+
return $secrets[ $secret_name ];
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
/**
|
1277 |
+
* Returns two secret tokens and the end of life timestamp for them.
|
1278 |
+
*
|
1279 |
+
* @param String $action The action name.
|
1280 |
+
* @param Integer $user_id The user identifier.
|
1281 |
+
* @return string|array an array of secrets or an error string.
|
1282 |
+
*/
|
1283 |
+
public function get_secrets( $action, $user_id ) {
|
1284 |
+
$secret_name = 'jetpack_' . $action . '_' . $user_id;
|
1285 |
+
$secrets = \Jetpack_Options::get_raw_option(
|
1286 |
+
self::SECRETS_OPTION_NAME,
|
1287 |
+
array()
|
1288 |
+
);
|
1289 |
+
|
1290 |
+
if ( ! isset( $secrets[ $secret_name ] ) ) {
|
1291 |
+
return self::SECRETS_MISSING;
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
if ( $secrets[ $secret_name ]['exp'] < time() ) {
|
1295 |
+
$this->delete_secrets( $action, $user_id );
|
1296 |
+
return self::SECRETS_EXPIRED;
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
return $secrets[ $secret_name ];
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
/**
|
1303 |
+
* Deletes secret tokens in case they, for example, have expired.
|
1304 |
+
*
|
1305 |
+
* @param String $action The action name.
|
1306 |
+
* @param Integer $user_id The user identifier.
|
1307 |
+
*/
|
1308 |
+
public function delete_secrets( $action, $user_id ) {
|
1309 |
+
$secret_name = 'jetpack_' . $action . '_' . $user_id;
|
1310 |
+
$secrets = \Jetpack_Options::get_raw_option(
|
1311 |
+
self::SECRETS_OPTION_NAME,
|
1312 |
+
array()
|
1313 |
+
);
|
1314 |
+
if ( isset( $secrets[ $secret_name ] ) ) {
|
1315 |
+
unset( $secrets[ $secret_name ] );
|
1316 |
+
\Jetpack_Options::update_raw_option( self::SECRETS_OPTION_NAME, $secrets );
|
1317 |
+
}
|
1318 |
+
}
|
1319 |
+
|
1320 |
+
/**
|
1321 |
+
* Deletes all connection tokens and transients from the local Jetpack site.
|
1322 |
+
*/
|
1323 |
+
public function delete_all_connection_tokens() {
|
1324 |
+
\Jetpack_Options::delete_option(
|
1325 |
+
array(
|
1326 |
+
'blog_token',
|
1327 |
+
'user_token',
|
1328 |
+
'user_tokens',
|
1329 |
+
'master_user',
|
1330 |
+
'time_diff',
|
1331 |
+
'fallback_no_verify_ssl_certs',
|
1332 |
+
)
|
1333 |
+
);
|
1334 |
+
|
1335 |
+
\Jetpack_Options::delete_raw_option( 'jetpack_secrets' );
|
1336 |
+
|
1337 |
+
// Delete cached connected user data.
|
1338 |
+
$transient_key = 'jetpack_connected_user_data_' . get_current_user_id();
|
1339 |
+
delete_transient( $transient_key );
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
/**
|
1343 |
+
* Tells WordPress.com to disconnect the site and clear all tokens from cached site.
|
1344 |
+
*/
|
1345 |
+
public function disconnect_site_wpcom() {
|
1346 |
+
$xml = new \Jetpack_IXR_Client();
|
1347 |
+
$xml->query( 'jetpack.deregister', get_current_user_id() );
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
/**
|
1351 |
+
* Responds to a WordPress.com call to register the current site.
|
1352 |
+
* Should be changed to protected.
|
1353 |
+
*
|
1354 |
+
* @param array $registration_data Array of [ secret_1, user_id ].
|
1355 |
+
*/
|
1356 |
+
public function handle_registration( array $registration_data ) {
|
1357 |
+
list( $registration_secret_1, $registration_user_id ) = $registration_data;
|
1358 |
+
if ( empty( $registration_user_id ) ) {
|
1359 |
+
return new \WP_Error( 'registration_state_invalid', __( 'Invalid Registration State', 'jetpack' ), 400 );
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
return $this->verify_secrets( 'register', $registration_secret_1, (int) $registration_user_id );
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
/**
|
1366 |
+
* Verify a Previously Generated Secret.
|
1367 |
+
*
|
1368 |
+
* @param string $action The type of secret to verify.
|
1369 |
+
* @param string $secret_1 The secret string to compare to what is stored.
|
1370 |
+
* @param int $user_id The user ID of the owner of the secret.
|
1371 |
+
* @return \WP_Error|string WP_Error on failure, secret_2 on success.
|
1372 |
+
*/
|
1373 |
+
public function verify_secrets( $action, $secret_1, $user_id ) {
|
1374 |
+
$allowed_actions = array( 'register', 'authorize', 'publicize' );
|
1375 |
+
if ( ! in_array( $action, $allowed_actions, true ) ) {
|
1376 |
+
return new \WP_Error( 'unknown_verification_action', 'Unknown Verification Action', 400 );
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
$user = get_user_by( 'id', $user_id );
|
1380 |
+
|
1381 |
+
/**
|
1382 |
+
* We've begun verifying the previously generated secret.
|
1383 |
+
*
|
1384 |
+
* @since 7.5.0
|
1385 |
+
*
|
1386 |
+
* @param string $action The type of secret to verify.
|
1387 |
+
* @param \WP_User $user The user object.
|
1388 |
+
*/
|
1389 |
+
do_action( 'jetpack_verify_secrets_begin', $action, $user );
|
1390 |
+
|
1391 |
+
$return_error = function( \WP_Error $error ) use ( $action, $user ) {
|
1392 |
+
/**
|
1393 |
+
* Verifying of the previously generated secret has failed.
|
1394 |
+
*
|
1395 |
+
* @since 7.5.0
|
1396 |
+
*
|
1397 |
+
* @param string $action The type of secret to verify.
|
1398 |
+
* @param \WP_User $user The user object.
|
1399 |
+
* @param \WP_Error $error The error object.
|
1400 |
+
*/
|
1401 |
+
do_action( 'jetpack_verify_secrets_fail', $action, $user, $error );
|
1402 |
+
|
1403 |
+
return $error;
|
1404 |
+
};
|
1405 |
+
|
1406 |
+
$stored_secrets = $this->get_secrets( $action, $user_id );
|
1407 |
+
$this->delete_secrets( $action, $user_id );
|
1408 |
+
|
1409 |
+
$error = null;
|
1410 |
+
if ( empty( $secret_1 ) ) {
|
1411 |
+
$error = $return_error(
|
1412 |
+
new \WP_Error(
|
1413 |
+
'verify_secret_1_missing',
|
1414 |
+
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
|
1415 |
+
sprintf( __( 'The required "%s" parameter is missing.', 'jetpack' ), 'secret_1' ),
|
1416 |
+
400
|
1417 |
+
)
|
1418 |
+
);
|
1419 |
+
} elseif ( ! is_string( $secret_1 ) ) {
|
1420 |
+
$error = $return_error(
|
1421 |
+
new \WP_Error(
|
1422 |
+
'verify_secret_1_malformed',
|
1423 |
+
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
|
1424 |
+
sprintf( __( 'The required "%s" parameter is malformed.', 'jetpack' ), 'secret_1' ),
|
1425 |
+
400
|
1426 |
+
)
|
1427 |
+
);
|
1428 |
+
} elseif ( empty( $user_id ) ) {
|
1429 |
+
// $user_id is passed around during registration as "state".
|
1430 |
+
$error = $return_error(
|
1431 |
+
new \WP_Error(
|
1432 |
+
'state_missing',
|
1433 |
+
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
|
1434 |
+
sprintf( __( 'The required "%s" parameter is missing.', 'jetpack' ), 'state' ),
|
1435 |
+
400
|
1436 |
+
)
|
1437 |
+
);
|
1438 |
+
} elseif ( ! ctype_digit( (string) $user_id ) ) {
|
1439 |
+
$error = $return_error(
|
1440 |
+
new \WP_Error(
|
1441 |
+
'state_malformed',
|
1442 |
+
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
|
1443 |
+
sprintf( __( 'The required "%s" parameter is malformed.', 'jetpack' ), 'state' ),
|
1444 |
+
400
|
1445 |
+
)
|
1446 |
+
);
|
1447 |
+
} elseif ( self::SECRETS_MISSING === $stored_secrets ) {
|
1448 |
+
$error = $return_error(
|
1449 |
+
new \WP_Error(
|
1450 |
+
'verify_secrets_missing',
|
1451 |
+
__( 'Verification secrets not found', 'jetpack' ),
|
1452 |
+
400
|
1453 |
+
)
|
1454 |
+
);
|
1455 |
+
} elseif ( self::SECRETS_EXPIRED === $stored_secrets ) {
|
1456 |
+
$error = $return_error(
|
1457 |
+
new \WP_Error(
|
1458 |
+
'verify_secrets_expired',
|
1459 |
+
__( 'Verification took too long', 'jetpack' ),
|
1460 |
+
400
|
1461 |
+
)
|
1462 |
+
);
|
1463 |
+
} elseif ( ! $stored_secrets ) {
|
1464 |
+
$error = $return_error(
|
1465 |
+
new \WP_Error(
|
1466 |
+
'verify_secrets_empty',
|
1467 |
+
__( 'Verification secrets are empty', 'jetpack' ),
|
1468 |
+
400
|
1469 |
+
)
|
1470 |
+
);
|
1471 |
+
} elseif ( is_wp_error( $stored_secrets ) ) {
|
1472 |
+
$stored_secrets->add_data( 400 );
|
1473 |
+
$error = $return_error( $stored_secrets );
|
1474 |
+
} elseif ( empty( $stored_secrets['secret_1'] ) || empty( $stored_secrets['secret_2'] ) || empty( $stored_secrets['exp'] ) ) {
|
1475 |
+
$error = $return_error(
|
1476 |
+
new \WP_Error(
|
1477 |
+
'verify_secrets_incomplete',
|
1478 |
+
__( 'Verification secrets are incomplete', 'jetpack' ),
|
1479 |
+
400
|
1480 |
+
)
|
1481 |
+
);
|
1482 |
+
} elseif ( ! hash_equals( $secret_1, $stored_secrets['secret_1'] ) ) {
|
1483 |
+
$error = $return_error(
|
1484 |
+
new \WP_Error(
|
1485 |
+
'verify_secrets_mismatch',
|
1486 |
+
__( 'Secret mismatch', 'jetpack' ),
|
1487 |
+
400
|
1488 |
+
)
|
1489 |
+
);
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
// Something went wrong during the checks, returning the error.
|
1493 |
+
if ( ! empty( $error ) ) {
|
1494 |
+
return $error;
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
/**
|
1498 |
+
* We've succeeded at verifying the previously generated secret.
|
1499 |
+
*
|
1500 |
+
* @since 7.5.0
|
1501 |
+
*
|
1502 |
+
* @param string $action The type of secret to verify.
|
1503 |
+
* @param \WP_User $user The user object.
|
1504 |
+
*/
|
1505 |
+
do_action( 'jetpack_verify_secrets_success', $action, $user );
|
1506 |
+
|
1507 |
+
return $stored_secrets['secret_2'];
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
/**
|
1511 |
+
* Responds to a WordPress.com call to authorize the current user.
|
1512 |
+
* Should be changed to protected.
|
1513 |
+
*/
|
1514 |
+
public function handle_authorization() {
|
1515 |
+
|
1516 |
+
}
|
1517 |
+
|
1518 |
+
/**
|
1519 |
+
* Obtains the auth token.
|
1520 |
+
*
|
1521 |
+
* @param array $data The request data.
|
1522 |
+
* @return object|\WP_Error Returns the auth token on success.
|
1523 |
+
* Returns a \WP_Error on failure.
|
1524 |
+
*/
|
1525 |
+
public function get_token( $data ) {
|
1526 |
+
$roles = new Roles();
|
1527 |
+
$role = $roles->translate_current_user_to_role();
|
1528 |
+
|
1529 |
+
if ( ! $role ) {
|
1530 |
+
return new \WP_Error( 'role', __( 'An administrator for this blog must set up the Jetpack connection.', 'jetpack' ) );
|
1531 |
+
}
|
1532 |
+
|
1533 |
+
$client_secret = $this->get_access_token();
|
1534 |
+
if ( ! $client_secret ) {
|
1535 |
+
return new \WP_Error( 'client_secret', __( 'You need to register your Jetpack before connecting it.', 'jetpack' ) );
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
/**
|
1539 |
+
* Filter the URL of the first time the user gets redirected back to your site for connection
|
1540 |
+
* data processing.
|
1541 |
+
*
|
1542 |
+
* @since 8.0.0
|
1543 |
+
*
|
1544 |
+
* @param string $redirect_url Defaults to the site admin URL.
|
1545 |
+
*/
|
1546 |
+
$processing_url = apply_filters( 'jetpack_token_processing_url', admin_url( 'admin.php' ) );
|
1547 |
+
|
1548 |
+
$redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : '';
|
1549 |
+
|
1550 |
+
/**
|
1551 |
+
* Filter the URL to redirect the user back to when the authentication process
|
1552 |
+
* is complete.
|
1553 |
+
*
|
1554 |
+
* @since 8.0.0
|
1555 |
+
*
|
1556 |
+
* @param string $redirect_url Defaults to the site URL.
|
1557 |
+
*/
|
1558 |
+
$redirect = apply_filters( 'jetpack_token_redirect_url', $redirect );
|
1559 |
+
|
1560 |
+
$redirect_uri = ( 'calypso' === $data['auth_type'] )
|
1561 |
+
? $data['redirect_uri']
|
1562 |
+
: add_query_arg(
|
1563 |
+
array(
|
1564 |
+
'action' => 'authorize',
|
1565 |
+
'_wpnonce' => wp_create_nonce( "jetpack-authorize_{$role}_{$redirect}" ),
|
1566 |
+
'redirect' => $redirect ? rawurlencode( $redirect ) : false,
|
1567 |
+
),
|
1568 |
+
esc_url( $processing_url )
|
1569 |
+
);
|
1570 |
+
|
1571 |
+
/**
|
1572 |
+
* Filters the token request data.
|
1573 |
+
*
|
1574 |
+
* @since 8.0.0
|
1575 |
+
*
|
1576 |
+
* @param array $request_data request data.
|
1577 |
+
*/
|
1578 |
+
$body = apply_filters(
|
1579 |
+
'jetpack_token_request_body',
|
1580 |
+
array(
|
1581 |
+
'client_id' => \Jetpack_Options::get_option( 'id' ),
|
1582 |
+
'client_secret' => $client_secret->secret,
|
1583 |
+
'grant_type' => 'authorization_code',
|
1584 |
+
'code' => $data['code'],
|
1585 |
+
'redirect_uri' => $redirect_uri,
|
1586 |
+
)
|
1587 |
+
);
|
1588 |
+
|
1589 |
+
$args = array(
|
1590 |
+
'method' => 'POST',
|
1591 |
+
'body' => $body,
|
1592 |
+
'headers' => array(
|
1593 |
+
'Accept' => 'application/json',
|
1594 |
+
),
|
1595 |
+
);
|
1596 |
+
|
1597 |
+
add_filter( 'http_request_timeout', array( $this, 'increase_timeout' ), PHP_INT_MAX - 1 );
|
1598 |
+
$response = Client::_wp_remote_request( Utils::fix_url_for_bad_hosts( $this->api_url( 'token' ) ), $args );
|
1599 |
+
remove_filter( 'http_request_timeout', array( $this, 'increase_timeout' ), PHP_INT_MAX - 1 );
|
1600 |
+
|
1601 |
+
if ( is_wp_error( $response ) ) {
|
1602 |
+
return new \WP_Error( 'token_http_request_failed', $response->get_error_message() );
|
1603 |
+
}
|
1604 |
+
|
1605 |
+
$code = wp_remote_retrieve_response_code( $response );
|
1606 |
+
$entity = wp_remote_retrieve_body( $response );
|
1607 |
+
|
1608 |
+
if ( $entity ) {
|
1609 |
+
$json = json_decode( $entity );
|
1610 |
+
} else {
|
1611 |
+
$json = false;
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
if ( 200 !== $code || ! empty( $json->error ) ) {
|
1615 |
+
if ( empty( $json->error ) ) {
|
1616 |
+
return new \WP_Error( 'unknown', '', $code );
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
/* translators: Error description string. */
|
1620 |
+
$error_description = isset( $json->error_description ) ? sprintf( __( 'Error Details: %s', 'jetpack' ), (string) $json->error_description ) : '';
|
1621 |
+
|
1622 |
+
return new \WP_Error( (string) $json->error, $error_description, $code );
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
if ( empty( $json->access_token ) || ! is_scalar( $json->access_token ) ) {
|
1626 |
+
return new \WP_Error( 'access_token', '', $code );
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
if ( empty( $json->token_type ) || 'X_JETPACK' !== strtoupper( $json->token_type ) ) {
|
1630 |
+
return new \WP_Error( 'token_type', '', $code );
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
if ( empty( $json->scope ) ) {
|
1634 |
+
return new \WP_Error( 'scope', 'No Scope', $code );
|
1635 |
+
}
|
1636 |
+
|
1637 |
+
// TODO: get rid of the error silencer.
|
1638 |
+
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
1639 |
+
@list( $role, $hmac ) = explode( ':', $json->scope );
|
1640 |
+
if ( empty( $role ) || empty( $hmac ) ) {
|
1641 |
+
return new \WP_Error( 'scope', 'Malformed Scope', $code );
|
1642 |
+
}
|
1643 |
+
|
1644 |
+
if ( $this->sign_role( $role ) !== $json->scope ) {
|
1645 |
+
return new \WP_Error( 'scope', 'Invalid Scope', $code );
|
1646 |
+
}
|
1647 |
+
|
1648 |
+
$cap = $roles->translate_role_to_cap( $role );
|
1649 |
+
if ( ! $cap ) {
|
1650 |
+
return new \WP_Error( 'scope', 'No Cap', $code );
|
1651 |
+
}
|
1652 |
+
|
1653 |
+
if ( ! current_user_can( $cap ) ) {
|
1654 |
+
return new \WP_Error( 'scope', 'current_user_cannot', $code );
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
/**
|
1658 |
+
* Fires after user has successfully received an auth token.
|
1659 |
+
*
|
1660 |
+
* @since 3.9.0
|
1661 |
+
*/
|
1662 |
+
do_action( 'jetpack_user_authorized' );
|
1663 |
+
|
1664 |
+
return (string) $json->access_token;
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
/**
|
1668 |
+
* Increases the request timeout value to 30 seconds.
|
1669 |
+
*
|
1670 |
+
* @return int Returns 30.
|
1671 |
+
*/
|
1672 |
+
public function increase_timeout() {
|
1673 |
+
return 30;
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
/**
|
1677 |
+
* Builds a URL to the Jetpack connection auth page.
|
1678 |
+
*
|
1679 |
+
* @param WP_User $user (optional) defaults to the current logged in user.
|
1680 |
+
* @param String $redirect (optional) a redirect URL to use instead of the default.
|
1681 |
+
* @return string Connect URL.
|
1682 |
+
*/
|
1683 |
+
public function get_authorization_url( $user = null, $redirect = null ) {
|
1684 |
+
|
1685 |
+
if ( empty( $user ) ) {
|
1686 |
+
$user = wp_get_current_user();
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
$roles = new Roles();
|
1690 |
+
$role = $roles->translate_user_to_role( $user );
|
1691 |
+
$signed_role = $this->sign_role( $role );
|
1692 |
+
|
1693 |
+
/**
|
1694 |
+
* Filter the URL of the first time the user gets redirected back to your site for connection
|
1695 |
+
* data processing.
|
1696 |
+
*
|
1697 |
+
* @since 8.0.0
|
1698 |
+
*
|
1699 |
+
* @param string $redirect_url Defaults to the site admin URL.
|
1700 |
+
*/
|
1701 |
+
$processing_url = apply_filters( 'jetpack_connect_processing_url', admin_url( 'admin.php' ) );
|
1702 |
+
|
1703 |
+
/**
|
1704 |
+
* Filter the URL to redirect the user back to when the authorization process
|
1705 |
+
* is complete.
|
1706 |
+
*
|
1707 |
+
* @since 8.0.0
|
1708 |
+
*
|
1709 |
+
* @param string $redirect_url Defaults to the site URL.
|
1710 |
+
*/
|
1711 |
+
$redirect = apply_filters( 'jetpack_connect_redirect_url', $redirect );
|
1712 |
+
|
1713 |
+
$secrets = $this->generate_secrets( 'authorize', $user->ID, 2 * HOUR_IN_SECONDS );
|
1714 |
+
|
1715 |
+
/**
|
1716 |
+
* Filter the type of authorization.
|
1717 |
+
* 'calypso' completes authorization on wordpress.com/jetpack/connect
|
1718 |
+
* while 'jetpack' ( or any other value ) completes the authorization at jetpack.wordpress.com.
|
1719 |
+
*
|
1720 |
+
* @since 4.3.3
|
1721 |
+
*
|
1722 |
+
* @param string $auth_type Defaults to 'calypso', can also be 'jetpack'.
|
1723 |
+
*/
|
1724 |
+
$auth_type = apply_filters( 'jetpack_auth_type', 'calypso' );
|
1725 |
+
|
1726 |
+
/**
|
1727 |
+
* Filters the user connection request data for additional property addition.
|
1728 |
+
*
|
1729 |
+
* @since 8.0.0
|
1730 |
+
*
|
1731 |
+
* @param array $request_data request data.
|
1732 |
+
*/
|
1733 |
+
$body = apply_filters(
|
1734 |
+
'jetpack_connect_request_body',
|
1735 |
+
array(
|
1736 |
+
'response_type' => 'code',
|
1737 |
+
'client_id' => \Jetpack_Options::get_option( 'id' ),
|
1738 |
+
'redirect_uri' => add_query_arg(
|
1739 |
+
array(
|
1740 |
+
'action' => 'authorize',
|
1741 |
+
'_wpnonce' => wp_create_nonce( "jetpack-authorize_{$role}_{$redirect}" ),
|
1742 |
+
'redirect' => rawurlencode( $redirect ),
|
1743 |
+
),
|
1744 |
+
esc_url( $processing_url )
|
1745 |
+
),
|
1746 |
+
'state' => $user->ID,
|
1747 |
+
'scope' => $signed_role,
|
1748 |
+
'user_email' => $user->user_email,
|
1749 |
+
'user_login' => $user->user_login,
|
1750 |
+
'is_active' => $this->is_active(),
|
1751 |
+
'jp_version' => Constants::get_constant( 'JETPACK__VERSION' ),
|
1752 |
+
'auth_type' => $auth_type,
|
1753 |
+
'secret' => $secrets['secret_1'],
|
1754 |
+
'blogname' => get_option( 'blogname' ),
|
1755 |
+
'site_url' => site_url(),
|
1756 |
+
'home_url' => home_url(),
|
1757 |
+
'site_icon' => get_site_icon_url(),
|
1758 |
+
'site_lang' => get_locale(),
|
1759 |
+
'site_created' => $this->get_assumed_site_creation_date(),
|
1760 |
+
)
|
1761 |
+
);
|
1762 |
+
|
1763 |
+
$body = $this->apply_activation_source_to_args( urlencode_deep( $body ) );
|
1764 |
+
|
1765 |
+
$api_url = $this->api_url( 'authorize' );
|
1766 |
+
|
1767 |
+
return add_query_arg( $body, $api_url );
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
/**
|
1771 |
+
* Authorizes the user by obtaining and storing the user token.
|
1772 |
+
*
|
1773 |
+
* @param array $data The request data.
|
1774 |
+
* @return string|\WP_Error Returns a string on success.
|
1775 |
+
* Returns a \WP_Error on failure.
|
1776 |
+
*/
|
1777 |
+
public function authorize( $data = array() ) {
|
1778 |
+
/**
|
1779 |
+
* Action fired when user authorization starts.
|
1780 |
+
*
|
1781 |
+
* @since 8.0.0
|
1782 |
+
*/
|
1783 |
+
do_action( 'jetpack_authorize_starting' );
|
1784 |
+
|
1785 |
+
$roles = new Roles();
|
1786 |
+
$role = $roles->translate_current_user_to_role();
|
1787 |
+
|
1788 |
+
if ( ! $role ) {
|
1789 |
+
return new \WP_Error( 'no_role', 'Invalid request.', 400 );
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
$cap = $roles->translate_role_to_cap( $role );
|
1793 |
+
if ( ! $cap ) {
|
1794 |
+
return new \WP_Error( 'no_cap', 'Invalid request.', 400 );
|
1795 |
+
}
|
1796 |
+
|
1797 |
+
if ( ! empty( $data['error'] ) ) {
|
1798 |
+
return new \WP_Error( $data['error'], 'Error included in the request.', 400 );
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
if ( ! isset( $data['state'] ) ) {
|
1802 |
+
return new \WP_Error( 'no_state', 'Request must include state.', 400 );
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
if ( ! ctype_digit( $data['state'] ) ) {
|
1806 |
+
return new \WP_Error( $data['error'], 'State must be an integer.', 400 );
|
1807 |
+
}
|
1808 |
+
|
1809 |
+
$current_user_id = get_current_user_id();
|
1810 |
+
if ( $current_user_id !== (int) $data['state'] ) {
|
1811 |
+
return new \WP_Error( 'wrong_state', 'State does not match current user.', 400 );
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
if ( empty( $data['code'] ) ) {
|
1815 |
+
return new \WP_Error( 'no_code', 'Request must include an authorization code.', 400 );
|
1816 |
+
}
|
1817 |
+
|
1818 |
+
$token = $this->get_token( $data );
|
1819 |
+
|
1820 |
+
if ( is_wp_error( $token ) ) {
|
1821 |
+
$code = $token->get_error_code();
|
1822 |
+
if ( empty( $code ) ) {
|
1823 |
+
$code = 'invalid_token';
|
1824 |
+
}
|
1825 |
+
return new \WP_Error( $code, $token->get_error_message(), 400 );
|
1826 |
+
}
|
1827 |
+
|
1828 |
+
if ( ! $token ) {
|
1829 |
+
return new \WP_Error( 'no_token', 'Error generating token.', 400 );
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
$is_master_user = ! $this->is_active();
|
1833 |
+
|
1834 |
+
Utils::update_user_token( $current_user_id, sprintf( '%s.%d', $token, $current_user_id ), $is_master_user );
|
1835 |
+
|
1836 |
+
if ( ! $is_master_user ) {
|
1837 |
+
/**
|
1838 |
+
* Action fired when a secondary user has been authorized.
|
1839 |
+
*
|
1840 |
+
* @since 8.0.0
|
1841 |
+
*/
|
1842 |
+
do_action( 'jetpack_authorize_ending_linked' );
|
1843 |
+
return 'linked';
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
/**
|
1847 |
+
* Action fired when the master user has been authorized.
|
1848 |
+
*
|
1849 |
+
* @since 8.0.0
|
1850 |
+
*
|
1851 |
+
* @param array $data The request data.
|
1852 |
+
*/
|
1853 |
+
do_action( 'jetpack_authorize_ending_authorized', $data );
|
1854 |
+
|
1855 |
+
\Jetpack_Options::delete_raw_option( 'jetpack_last_connect_url_check' );
|
1856 |
+
|
1857 |
+
// Start nonce cleaner.
|
1858 |
+
wp_clear_scheduled_hook( 'jetpack_clean_nonces' );
|
1859 |
+
wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' );
|
1860 |
+
|
1861 |
+
return 'authorized';
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
/**
|
1865 |
+
* Disconnects from the Jetpack servers.
|
1866 |
+
* Forgets all connection details and tells the Jetpack servers to do the same.
|
1867 |
+
*/
|
1868 |
+
public function disconnect_site() {
|
1869 |
+
|
1870 |
+
}
|
1871 |
+
|
1872 |
+
/**
|
1873 |
+
* The Base64 Encoding of the SHA1 Hash of the Input.
|
1874 |
+
*
|
1875 |
+
* @param string $text The string to hash.
|
1876 |
+
* @return string
|
1877 |
+
*/
|
1878 |
+
public function sha1_base64( $text ) {
|
1879 |
+
return base64_encode( sha1( $text, true ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
1880 |
+
}
|
1881 |
+
|
1882 |
+
/**
|
1883 |
+
* This function mirrors Jetpack_Data::is_usable_domain() in the WPCOM codebase.
|
1884 |
+
*
|
1885 |
+
* @param string $domain The domain to check.
|
1886 |
+
*
|
1887 |
+
* @return bool|WP_Error
|
1888 |
+
*/
|
1889 |
+
public function is_usable_domain( $domain ) {
|
1890 |
+
|
1891 |
+
// If it's empty, just fail out.
|
1892 |
+
if ( ! $domain ) {
|
1893 |
+
return new \WP_Error(
|
1894 |
+
'fail_domain_empty',
|
1895 |
+
/* translators: %1$s is a domain name. */
|
1896 |
+
sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it is empty.', 'jetpack' ), $domain )
|
1897 |
+
);
|
1898 |
+
}
|
1899 |
+
|
1900 |
+
/**
|
1901 |
+
* Skips the usuable domain check when connecting a site.
|
1902 |
+
*
|
1903 |
+
* Allows site administrators with domains that fail gethostname-based checks to pass the request to WP.com
|
1904 |
+
*
|
1905 |
+
* @since 4.1.0
|
1906 |
+
*
|
1907 |
+
* @param bool If the check should be skipped. Default false.
|
1908 |
+
*/
|
1909 |
+
if ( apply_filters( 'jetpack_skip_usuable_domain_check', false ) ) {
|
1910 |
+
return true;
|
1911 |
+
}
|
1912 |
+
|
1913 |
+
// None of the explicit localhosts.
|
1914 |
+
$forbidden_domains = array(
|
1915 |
+
'wordpress.com',
|
1916 |
+
'localhost',
|
1917 |
+
'localhost.localdomain',
|
1918 |
+
'127.0.0.1',
|
1919 |
+
'local.wordpress.test', // VVV pattern.
|
1920 |
+
'local.wordpress-trunk.test', // VVV pattern.
|
1921 |
+
'src.wordpress-develop.test', // VVV pattern.
|
1922 |
+
'build.wordpress-develop.test', // VVV pattern.
|
1923 |
+
);
|
1924 |
+
if ( in_array( $domain, $forbidden_domains, true ) ) {
|
1925 |
+
return new \WP_Error(
|
1926 |
+
'fail_domain_forbidden',
|
1927 |
+
sprintf(
|
1928 |
+
/* translators: %1$s is a domain name. */
|
1929 |
+
__(
|
1930 |
+
'Domain `%1$s` just failed is_usable_domain check as it is in the forbidden array.',
|
1931 |
+
'jetpack'
|
1932 |
+
),
|
1933 |
+
$domain
|
1934 |
+
)
|
1935 |
+
);
|
1936 |
+
}
|
1937 |
+
|
1938 |
+
// No .test or .local domains.
|
1939 |
+
if ( preg_match( '#\.(test|local)$#i', $domain ) ) {
|
1940 |
+
return new \WP_Error(
|
1941 |
+
'fail_domain_tld',
|
1942 |
+
sprintf(
|
1943 |
+
/* translators: %1$s is a domain name. */
|
1944 |
+
__(
|
1945 |
+
'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.',
|
1946 |
+
'jetpack'
|
1947 |
+
),
|
1948 |
+
$domain
|
1949 |
+
)
|
1950 |
+
);
|
1951 |
+
}
|
1952 |
+
|
1953 |
+
// No WPCOM subdomains.
|
1954 |
+
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) {
|
1955 |
+
return new \WP_Error(
|
1956 |
+
'fail_subdomain_wpcom',
|
1957 |
+
sprintf(
|
1958 |
+
/* translators: %1$s is a domain name. */
|
1959 |
+
__(
|
1960 |
+
'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.',
|
1961 |
+
'jetpack'
|
1962 |
+
),
|
1963 |
+
$domain
|
1964 |
+
)
|
1965 |
+
);
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
// If PHP was compiled without support for the Filter module (very edge case).
|
1969 |
+
if ( ! function_exists( 'filter_var' ) ) {
|
1970 |
+
// Just pass back true for now, and let wpcom sort it out.
|
1971 |
+
return true;
|
1972 |
+
}
|
1973 |
+
|
1974 |
+
return true;
|
1975 |
+
}
|
1976 |
+
|
1977 |
+
/**
|
1978 |
+
* Gets the requested token.
|
1979 |
+
*
|
1980 |
+
* Tokens are one of two types:
|
1981 |
+
* 1. Blog Tokens: These are the "main" tokens. Each site typically has one Blog Token,
|
1982 |
+
* though some sites can have multiple "Special" Blog Tokens (see below). These tokens
|
1983 |
+
* are not associated with a user account. They represent the site's connection with
|
1984 |
+
* the Jetpack servers.
|
1985 |
+
* 2. User Tokens: These are "sub-"tokens. Each connected user account has one User Token.
|
1986 |
+
*
|
1987 |
+
* All tokens look like "{$token_key}.{$private}". $token_key is a public ID for the
|
1988 |
+
* token, and $private is a secret that should never be displayed anywhere or sent
|
1989 |
+
* over the network; it's used only for signing things.
|
1990 |
+
*
|
1991 |
+
* Blog Tokens can be "Normal" or "Special".
|
1992 |
+
* * Normal: The result of a normal connection flow. They look like
|
1993 |
+
* "{$random_string_1}.{$random_string_2}"
|
1994 |
+
* That is, $token_key and $private are both random strings.
|
1995 |
+
* Sites only have one Normal Blog Token. Normal Tokens are found in either
|
1996 |
+
* Jetpack_Options::get_option( 'blog_token' ) (usual) or the JETPACK_BLOG_TOKEN
|
1997 |
+
* constant (rare).
|
1998 |
+
* * Special: A connection token for sites that have gone through an alternative
|
1999 |
+
* connection flow. They look like:
|
2000 |
+
* ";{$special_id}{$special_version};{$wpcom_blog_id};.{$random_string}"
|
2001 |
+
* That is, $private is a random string and $token_key has a special structure with
|
2002 |
+
* lots of semicolons.
|
2003 |
+
* Most sites have zero Special Blog Tokens. Special tokens are only found in the
|
2004 |
+
* JETPACK_BLOG_TOKEN constant.
|
2005 |
+
*
|
2006 |
+
* In particular, note that Normal Blog Tokens never start with ";" and that
|
2007 |
+
* Special Blog Tokens always do.
|
2008 |
+
*
|
2009 |
+
* When searching for a matching Blog Tokens, Blog Tokens are examined in the following
|
2010 |
+
* order:
|
2011 |
+
* 1. Defined Special Blog Tokens (via the JETPACK_BLOG_TOKEN constant)
|
2012 |
+
* 2. Stored Normal Tokens (via Jetpack_Options::get_option( 'blog_token' ))
|
2013 |
+
* 3. Defined Normal Tokens (via the JETPACK_BLOG_TOKEN constant)
|
2014 |
+
*
|
2015 |
+
* @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token.
|
2016 |
+
* @param string|false $token_key If provided, check that the token matches the provided input.
|
2017 |
+
* @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
|
2018 |
+
*
|
2019 |
+
* @return object|false
|
2020 |
+
*/
|
2021 |
+
public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) {
|
2022 |
+
$possible_special_tokens = array();
|
2023 |
+
$possible_normal_tokens = array();
|
2024 |
+
$user_tokens = \Jetpack_Options::get_option( 'user_tokens' );
|
2025 |
+
|
2026 |
+
if ( $user_id ) {
|
2027 |
+
if ( ! $user_tokens ) {
|
2028 |
+
return $suppress_errors ? false : new \WP_Error( 'no_user_tokens' );
|
2029 |
+
}
|
2030 |
+
if ( self::JETPACK_MASTER_USER === $user_id ) {
|
2031 |
+
$user_id = \Jetpack_Options::get_option( 'master_user' );
|
2032 |
+
if ( ! $user_id ) {
|
2033 |
+
return $suppress_errors ? false : new \WP_Error( 'empty_master_user_option' );
|
2034 |
+
}
|
2035 |
+
}
|
2036 |
+
if ( ! isset( $user_tokens[ $user_id ] ) || ! $user_tokens[ $user_id ] ) {
|
2037 |
+
return $suppress_errors ? false : new \WP_Error( 'no_token_for_user', sprintf( 'No token for user %d', $user_id ) );
|
2038 |
+
}
|
2039 |
+
$user_token_chunks = explode( '.', $user_tokens[ $user_id ] );
|
2040 |
+
if ( empty( $user_token_chunks[1] ) || empty( $user_token_chunks[2] ) ) {
|
2041 |
+
return $suppress_errors ? false : new \WP_Error( 'token_malformed', sprintf( 'Token for user %d is malformed', $user_id ) );
|
2042 |
+
}
|
2043 |
+
if ( $user_token_chunks[2] !== (string) $user_id ) {
|
2044 |
+
return $suppress_errors ? false : new \WP_Error( 'user_id_mismatch', sprintf( 'Requesting user_id %d does not match token user_id %d', $user_id, $user_token_chunks[2] ) );
|
2045 |
+
}
|
2046 |
+
$possible_normal_tokens[] = "{$user_token_chunks[0]}.{$user_token_chunks[1]}";
|
2047 |
+
} else {
|
2048 |
+
$stored_blog_token = \Jetpack_Options::get_option( 'blog_token' );
|
2049 |
+
if ( $stored_blog_token ) {
|
2050 |
+
$possible_normal_tokens[] = $stored_blog_token;
|
2051 |
+
}
|
2052 |
+
|
2053 |
+
$defined_tokens_string = Constants::get_constant( 'JETPACK_BLOG_TOKEN' );
|
2054 |
+
|
2055 |
+
if ( $defined_tokens_string ) {
|
2056 |
+
$defined_tokens = explode( ',', $defined_tokens_string );
|
2057 |
+
foreach ( $defined_tokens as $defined_token ) {
|
2058 |
+
if ( ';' === $defined_token[0] ) {
|
2059 |
+
$possible_special_tokens[] = $defined_token;
|
2060 |
+
} else {
|
2061 |
+
$possible_normal_tokens[] = $defined_token;
|
2062 |
+
}
|
2063 |
+
}
|
2064 |
+
}
|
2065 |
+
}
|
2066 |
+
|
2067 |
+
if ( self::MAGIC_NORMAL_TOKEN_KEY === $token_key ) {
|
2068 |
+
$possible_tokens = $possible_normal_tokens;
|
2069 |
+
} else {
|
2070 |
+
$possible_tokens = array_merge( $possible_special_tokens, $possible_normal_tokens );
|
2071 |
+
}
|
2072 |
+
|
2073 |
+
if ( ! $possible_tokens ) {
|
2074 |
+
return $suppress_errors ? false : new \WP_Error( 'no_possible_tokens' );
|
2075 |
+
}
|
2076 |
+
|
2077 |
+
$valid_token = false;
|
2078 |
+
|
2079 |
+
if ( false === $token_key ) {
|
2080 |
+
// Use first token.
|
2081 |
+
$valid_token = $possible_tokens[0];
|
2082 |
+
} elseif ( self::MAGIC_NORMAL_TOKEN_KEY === $token_key ) {
|
2083 |
+
// Use first normal token.
|
2084 |
+
$valid_token = $possible_tokens[0]; // $possible_tokens only contains normal tokens because of earlier check.
|
2085 |
+
} else {
|
2086 |
+
// Use the token matching $token_key or false if none.
|
2087 |
+
// Ensure we check the full key.
|
2088 |
+
$token_check = rtrim( $token_key, '.' ) . '.';
|
2089 |
+
|
2090 |
+
foreach ( $possible_tokens as $possible_token ) {
|
2091 |
+
if ( hash_equals( substr( $possible_token, 0, strlen( $token_check ) ), $token_check ) ) {
|
2092 |
+
$valid_token = $possible_token;
|
2093 |
+
break;
|
2094 |
+
}
|
2095 |
+
}
|
2096 |
+
}
|
2097 |
+
|
2098 |
+
if ( ! $valid_token ) {
|
2099 |
+
return $suppress_errors ? false : new \WP_Error( 'no_valid_token' );
|
2100 |
+
}
|
2101 |
+
|
2102 |
+
return (object) array(
|
2103 |
+
'secret' => $valid_token,
|
2104 |
+
'external_user_id' => (int) $user_id,
|
2105 |
+
);
|
2106 |
+
}
|
2107 |
+
|
2108 |
+
/**
|
2109 |
+
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths
|
2110 |
+
* since it is passed by reference to various methods.
|
2111 |
+
* Capture it here so we can verify the signature later.
|
2112 |
+
*
|
2113 |
+
* @param array $methods an array of available XMLRPC methods.
|
2114 |
+
* @return array the same array, since this method doesn't add or remove anything.
|
2115 |
+
*/
|
2116 |
+
public function xmlrpc_methods( $methods ) {
|
2117 |
+
$this->raw_post_data = $GLOBALS['HTTP_RAW_POST_DATA'];
|
2118 |
+
return $methods;
|
2119 |
+
}
|
2120 |
+
|
2121 |
+
/**
|
2122 |
+
* Resets the raw post data parameter for testing purposes.
|
2123 |
+
*/
|
2124 |
+
public function reset_raw_post_data() {
|
2125 |
+
$this->raw_post_data = null;
|
2126 |
+
}
|
2127 |
+
|
2128 |
+
/**
|
2129 |
+
* Registering an additional method.
|
2130 |
+
*
|
2131 |
+
* @param array $methods an array of available XMLRPC methods.
|
2132 |
+
* @return array the amended array in case the method is added.
|
2133 |
+
*/
|
2134 |
+
public function public_xmlrpc_methods( $methods ) {
|
2135 |
+
if ( array_key_exists( 'wp.getOptions', $methods ) ) {
|
2136 |
+
$methods['wp.getOptions'] = array( $this, 'jetpack_get_options' );
|
2137 |
+
}
|
2138 |
+
return $methods;
|
2139 |
+
}
|
2140 |
+
|
2141 |
+
/**
|
2142 |
+
* Handles a getOptions XMLRPC method call.
|
2143 |
+
*
|
2144 |
+
* @param array $args method call arguments.
|
2145 |
+
* @return an amended XMLRPC server options array.
|
2146 |
+
*/
|
2147 |
+
public function jetpack_get_options( $args ) {
|
2148 |
+
global $wp_xmlrpc_server;
|
2149 |
+
|
2150 |
+
$wp_xmlrpc_server->escape( $args );
|
2151 |
+
|
2152 |
+
$username = $args[1];
|
2153 |
+
$password = $args[2];
|
2154 |
+
|
2155 |
+
$user = $wp_xmlrpc_server->login( $username, $password );
|
2156 |
+
if ( ! $user ) {
|
2157 |
+
return $wp_xmlrpc_server->error;
|
2158 |
+
}
|
2159 |
+
|
2160 |
+
$options = array();
|
2161 |
+
$user_data = $this->get_connected_user_data();
|
2162 |
+
if ( is_array( $user_data ) ) {
|
2163 |
+
$options['jetpack_user_id'] = array(
|
2164 |
+
'desc' => __( 'The WP.com user ID of the connected user', 'jetpack' ),
|
2165 |
+
'readonly' => true,
|
2166 |
+
'value' => $user_data['ID'],
|
2167 |
+
);
|
2168 |
+
$options['jetpack_user_login'] = array(
|
2169 |
+
'desc' => __( 'The WP.com username of the connected user', 'jetpack' ),
|
2170 |
+
'readonly' => true,
|
2171 |
+
'value' => $user_data['login'],
|
2172 |
+
);
|
2173 |
+
$options['jetpack_user_email'] = array(
|
2174 |
+
'desc' => __( 'The WP.com user email of the connected user', 'jetpack' ),
|
2175 |
+
'readonly' => true,
|
2176 |
+
'value' => $user_data['email'],
|
2177 |
+
);
|
2178 |
+
$options['jetpack_user_site_count'] = array(
|
2179 |
+
'desc' => __( 'The number of sites of the connected WP.com user', 'jetpack' ),
|
2180 |
+
'readonly' => true,
|
2181 |
+
'value' => $user_data['site_count'],
|
2182 |
+
);
|
2183 |
+
}
|
2184 |
+
$wp_xmlrpc_server->blog_options = array_merge( $wp_xmlrpc_server->blog_options, $options );
|
2185 |
+
$args = stripslashes_deep( $args );
|
2186 |
+
return $wp_xmlrpc_server->wp_getOptions( $args );
|
2187 |
+
}
|
2188 |
+
|
2189 |
+
/**
|
2190 |
+
* Adds Jetpack-specific options to the output of the XMLRPC options method.
|
2191 |
+
*
|
2192 |
+
* @param array $options standard Core options.
|
2193 |
+
* @return array amended options.
|
2194 |
+
*/
|
2195 |
+
public function xmlrpc_options( $options ) {
|
2196 |
+
$jetpack_client_id = false;
|
2197 |
+
if ( $this->is_active() ) {
|
2198 |
+
$jetpack_client_id = \Jetpack_Options::get_option( 'id' );
|
2199 |
+
}
|
2200 |
+
$options['jetpack_version'] = array(
|
2201 |
+
'desc' => __( 'Jetpack Plugin Version', 'jetpack' ),
|
2202 |
+
'readonly' => true,
|
2203 |
+
'value' => Constants::get_constant( 'JETPACK__VERSION' ),
|
2204 |
+
);
|
2205 |
+
|
2206 |
+
$options['jetpack_client_id'] = array(
|
2207 |
+
'desc' => __( 'The Client ID/WP.com Blog ID of this site', 'jetpack' ),
|
2208 |
+
'readonly' => true,
|
2209 |
+
'value' => $jetpack_client_id,
|
2210 |
+
);
|
2211 |
+
return $options;
|
2212 |
+
}
|
2213 |
+
|
2214 |
+
/**
|
2215 |
+
* Resets the saved authentication state in between testing requests.
|
2216 |
+
*/
|
2217 |
+
public function reset_saved_auth_state() {
|
2218 |
+
$this->xmlrpc_verification = null;
|
2219 |
+
}
|
2220 |
+
|
2221 |
+
/**
|
2222 |
+
* Sign a user role with the master access token.
|
2223 |
+
* If not specified, will default to the current user.
|
2224 |
+
*
|
2225 |
+
* @access public
|
2226 |
+
*
|
2227 |
+
* @param string $role User role.
|
2228 |
+
* @param int $user_id ID of the user.
|
2229 |
+
* @return string Signed user role.
|
2230 |
+
*/
|
2231 |
+
public function sign_role( $role, $user_id = null ) {
|
2232 |
+
if ( empty( $user_id ) ) {
|
2233 |
+
$user_id = (int) get_current_user_id();
|
2234 |
+
}
|
2235 |
+
|
2236 |
+
if ( ! $user_id ) {
|
2237 |
+
return false;
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
$token = $this->get_access_token();
|
2241 |
+
if ( ! $token || is_wp_error( $token ) ) {
|
2242 |
+
return false;
|
2243 |
+
}
|
2244 |
+
|
2245 |
+
return $role . ':' . hash_hmac( 'md5', "{$role}|{$user_id}", $token->secret );
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
/**
|
2249 |
+
* Set the plugin instance.
|
2250 |
+
*
|
2251 |
+
* @param Plugin $plugin_instance The plugin instance.
|
2252 |
+
*
|
2253 |
+
* @return $this
|
2254 |
+
*/
|
2255 |
+
public function set_plugin_instance( Plugin $plugin_instance ) {
|
2256 |
+
$this->plugin = $plugin_instance;
|
2257 |
+
|
2258 |
+
return $this;
|
2259 |
+
}
|
2260 |
+
|
2261 |
+
/**
|
2262 |
+
* Retrieve the plugin management object.
|
2263 |
+
*
|
2264 |
+
* @return Plugin
|
2265 |
+
*/
|
2266 |
+
public function get_plugin() {
|
2267 |
+
return $this->plugin;
|
2268 |
+
}
|
2269 |
+
|
2270 |
+
/**
|
2271 |
+
* Get all connected plugins information.
|
2272 |
+
*
|
2273 |
+
* @return array|\WP_Error
|
2274 |
+
*/
|
2275 |
+
public function get_connected_plugins() {
|
2276 |
+
return Plugin_Storage::get_all();
|
2277 |
+
}
|
2278 |
+
|
2279 |
+
}
|
vendor/automattic/jetpack-connection/src/class-plugin-storage.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Storage for plugin connection information.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
use Automattic\Jetpack\Config;
|
11 |
+
use WP_Error;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The class serves a single purpose - to store the data that plugins use the connection, along with some auxiliary information.
|
15 |
+
* Well, we don't really store all that. The information is provided on runtime,
|
16 |
+
* so all we need to do is to save the data into the class property and retrieve it from there on demand.
|
17 |
+
*
|
18 |
+
* @todo Adapt for multisite installations.
|
19 |
+
*/
|
20 |
+
class Plugin_Storage {
|
21 |
+
|
22 |
+
const ACTIVE_PLUGINS_OPTION_NAME = 'jetpack_connection_active_plugins';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Whether this class was configured for the first time or not.
|
26 |
+
*
|
27 |
+
* @var boolean
|
28 |
+
*/
|
29 |
+
private static $configured = false;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Refresh list of connected plugins upon intialization.
|
33 |
+
*
|
34 |
+
* @var boolean
|
35 |
+
*/
|
36 |
+
private static $refresh_connected_plugins = false;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Connected plugins.
|
40 |
+
*
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
private static $plugins = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Whether the plugins were configured.
|
47 |
+
* To make sure we don't call the configuration process again and again.
|
48 |
+
*
|
49 |
+
* @var bool
|
50 |
+
*/
|
51 |
+
private static $plugins_configuration_finished = false;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Add or update the plugin information in the storage.
|
55 |
+
*
|
56 |
+
* @param string $slug Plugin slug.
|
57 |
+
* @param array $args Plugin arguments, optional.
|
58 |
+
*
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
public static function upsert( $slug, array $args = array() ) {
|
62 |
+
self::$plugins[ $slug ] = $args;
|
63 |
+
|
64 |
+
// if plugin is not in the list of active plugins, refresh the list.
|
65 |
+
if ( ! array_key_exists( $slug, get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) ) ) {
|
66 |
+
self::$refresh_connected_plugins = true;
|
67 |
+
}
|
68 |
+
|
69 |
+
return true;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Retrieve the plugin information by slug.
|
74 |
+
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
|
75 |
+
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
|
76 |
+
* so please make sure not to run the method too early in the code.
|
77 |
+
*
|
78 |
+
* @param string $slug The plugin slug.
|
79 |
+
*
|
80 |
+
* @return array|null|WP_Error
|
81 |
+
*/
|
82 |
+
public static function get_one( $slug ) {
|
83 |
+
$plugins = self::get_all();
|
84 |
+
|
85 |
+
if ( $plugins instanceof WP_Error ) {
|
86 |
+
return $plugins;
|
87 |
+
}
|
88 |
+
|
89 |
+
return empty( $plugins[ $slug ] ) ? null : $plugins[ $slug ];
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Retrieve info for all plugins that use the connection.
|
94 |
+
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
|
95 |
+
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
|
96 |
+
* so please make sure not to run the method too early in the code.
|
97 |
+
*
|
98 |
+
* @return array|WP_Error
|
99 |
+
*/
|
100 |
+
public static function get_all() {
|
101 |
+
$maybe_error = self::ensure_configured();
|
102 |
+
|
103 |
+
if ( $maybe_error instanceof WP_Error ) {
|
104 |
+
return $maybe_error;
|
105 |
+
}
|
106 |
+
|
107 |
+
return self::$plugins;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Remove the plugin connection info from Jetpack.
|
112 |
+
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
|
113 |
+
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
|
114 |
+
* so please make sure not to run the method too early in the code.
|
115 |
+
*
|
116 |
+
* @param string $slug The plugin slug.
|
117 |
+
*
|
118 |
+
* @return bool|WP_Error
|
119 |
+
*/
|
120 |
+
public static function delete( $slug ) {
|
121 |
+
$maybe_error = self::ensure_configured();
|
122 |
+
|
123 |
+
if ( $maybe_error instanceof WP_Error ) {
|
124 |
+
return $maybe_error;
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( array_key_exists( $slug, self::$plugins ) ) {
|
128 |
+
unset( self::$plugins[ $slug ] );
|
129 |
+
}
|
130 |
+
|
131 |
+
return true;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* The method makes sure that `Jetpack\Config` has finished, and it's now safe to retrieve the list of plugins.
|
136 |
+
*
|
137 |
+
* @return bool|WP_Error
|
138 |
+
*/
|
139 |
+
private static function ensure_configured() {
|
140 |
+
if ( ! self::$configured ) {
|
141 |
+
return new WP_Error( 'too_early', __( 'You cannot call this method until Jetpack Config is configured', 'jetpack' ) );
|
142 |
+
}
|
143 |
+
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Called once to configure this class after plugins_loaded.
|
149 |
+
*
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public static function configure() {
|
153 |
+
|
154 |
+
if ( self::$configured ) {
|
155 |
+
return;
|
156 |
+
}
|
157 |
+
|
158 |
+
// If a plugin was activated or deactivated.
|
159 |
+
$number_of_plugins_differ = count( self::$plugins ) !== count( get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) );
|
160 |
+
|
161 |
+
if ( $number_of_plugins_differ || true === self::$refresh_connected_plugins ) {
|
162 |
+
self::update_active_plugins_option();
|
163 |
+
}
|
164 |
+
|
165 |
+
self::$configured = true;
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Updates the active plugins option with current list of active plugins.
|
171 |
+
*
|
172 |
+
* @return void
|
173 |
+
*/
|
174 |
+
public static function update_active_plugins_option() {
|
175 |
+
// Note: Since this options is synced to wpcom, if you change its structure, you have to update the sanitizer at wpcom side.
|
176 |
+
update_option( self::ACTIVE_PLUGINS_OPTION_NAME, self::$plugins );
|
177 |
+
}
|
178 |
+
|
179 |
+
}
|
vendor/automattic/jetpack-connection/src/class-plugin.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin connection management class.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Plugin connection management class.
|
12 |
+
* The class represents a single plugin that uses Jetpack connection.
|
13 |
+
* Its functionality has been pretty simplistic so far: add to the storage (`Plugin_Storage`), remove it from there,
|
14 |
+
* and determine whether it's the last active connection. As the component grows, there'll be more functionality added.
|
15 |
+
*/
|
16 |
+
class Plugin {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* List of the keys allowed as arguments
|
20 |
+
*
|
21 |
+
* @var array
|
22 |
+
*/
|
23 |
+
private $arguments_whitelist = array(
|
24 |
+
'url_info',
|
25 |
+
);
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Plugin slug.
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
private $slug;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Initialize the plugin manager.
|
36 |
+
*
|
37 |
+
* @param string $slug Plugin slug.
|
38 |
+
*/
|
39 |
+
public function __construct( $slug ) {
|
40 |
+
$this->slug = $slug;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Add the plugin connection info into Jetpack.
|
45 |
+
*
|
46 |
+
* @param string $name Plugin name, required.
|
47 |
+
* @param array $args Plugin arguments, optional.
|
48 |
+
*
|
49 |
+
* @return $this
|
50 |
+
* @see $this->arguments_whitelist
|
51 |
+
*/
|
52 |
+
public function add( $name, array $args = array() ) {
|
53 |
+
$args = compact( 'name' ) + array_intersect_key( $args, array_flip( $this->arguments_whitelist ) );
|
54 |
+
|
55 |
+
Plugin_Storage::upsert( $this->slug, $args );
|
56 |
+
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Remove the plugin connection info from Jetpack.
|
62 |
+
*
|
63 |
+
* @return $this
|
64 |
+
*/
|
65 |
+
public function remove() {
|
66 |
+
Plugin_Storage::delete( $this->slug );
|
67 |
+
|
68 |
+
return $this;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Determine if this plugin connection is the only one active at the moment, if any.
|
73 |
+
*
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
public function is_only() {
|
77 |
+
$plugins = Plugin_Storage::get_all();
|
78 |
+
|
79 |
+
return ! $plugins || ( array_key_exists( $this->slug, $plugins ) && 1 === count( $plugins ) );
|
80 |
+
}
|
81 |
+
|
82 |
+
}
|
vendor/automattic/jetpack-connection/src/class-rest-connector.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Sets up the Connection REST API endpoints.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Registers the REST routes for Connections.
|
12 |
+
*/
|
13 |
+
class REST_Connector {
|
14 |
+
/**
|
15 |
+
* The Connection Manager.
|
16 |
+
*
|
17 |
+
* @var Manager
|
18 |
+
*/
|
19 |
+
private $connection;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Constructor.
|
23 |
+
*
|
24 |
+
* @param Manager $connection The Connection Manager.
|
25 |
+
*/
|
26 |
+
public function __construct( Manager $connection ) {
|
27 |
+
$this->connection = $connection;
|
28 |
+
|
29 |
+
// Register a site.
|
30 |
+
register_rest_route(
|
31 |
+
'jetpack/v4',
|
32 |
+
'/verify_registration',
|
33 |
+
array(
|
34 |
+
'methods' => \WP_REST_Server::EDITABLE,
|
35 |
+
'callback' => array( $this, 'verify_registration' ),
|
36 |
+
)
|
37 |
+
);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Handles verification that a site is registered.
|
42 |
+
*
|
43 |
+
* @since 5.4.0
|
44 |
+
*
|
45 |
+
* @param \WP_REST_Request $request The request sent to the WP REST API.
|
46 |
+
*
|
47 |
+
* @return string|WP_Error
|
48 |
+
*/
|
49 |
+
public function verify_registration( \WP_REST_Request $request ) {
|
50 |
+
$registration_data = array( $request['secret_1'], $request['state'] );
|
51 |
+
|
52 |
+
return $this->connection->handle_registration( $registration_data );
|
53 |
+
}
|
54 |
+
}
|
vendor/automattic/jetpack-connection/src/class-utils.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Jetpack Connection package Utils class file.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
use Automattic\Jetpack\Constants;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Provides utility methods for the Connection package.
|
14 |
+
*/
|
15 |
+
class Utils {
|
16 |
+
|
17 |
+
const DEFAULT_JETPACK__API_VERSION = 1;
|
18 |
+
const DEFAULT_JETPACK__API_BASE = 'https://jetpack.wordpress.com/jetpack.';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Some hosts disable the OpenSSL extension and so cannot make outgoing HTTPS requests.
|
22 |
+
* This method sets the URL scheme to HTTP when HTTPS requests can't be made.
|
23 |
+
*
|
24 |
+
* @param string $url The url.
|
25 |
+
* @return string The url with the required URL scheme.
|
26 |
+
*/
|
27 |
+
public static function fix_url_for_bad_hosts( $url ) {
|
28 |
+
// If we receive an http url, return it.
|
29 |
+
if ( 'http' === wp_parse_url( $url, PHP_URL_SCHEME ) ) {
|
30 |
+
return $url;
|
31 |
+
}
|
32 |
+
|
33 |
+
// If the url should never be https, ensure it isn't https.
|
34 |
+
if ( 'NEVER' === Constants::get_constant( 'JETPACK_CLIENT__HTTPS' ) ) {
|
35 |
+
return set_url_scheme( $url, 'http' );
|
36 |
+
}
|
37 |
+
|
38 |
+
// Otherwise, return the https url.
|
39 |
+
return $url;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Enters a user token into the user_tokens option
|
44 |
+
*
|
45 |
+
* @param int $user_id The user id.
|
46 |
+
* @param string $token The user token.
|
47 |
+
* @param bool $is_master_user Whether the user is the master user.
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
public static function update_user_token( $user_id, $token, $is_master_user ) {
|
51 |
+
// Not designed for concurrent updates.
|
52 |
+
$user_tokens = \Jetpack_Options::get_option( 'user_tokens' );
|
53 |
+
if ( ! is_array( $user_tokens ) ) {
|
54 |
+
$user_tokens = array();
|
55 |
+
}
|
56 |
+
$user_tokens[ $user_id ] = $token;
|
57 |
+
if ( $is_master_user ) {
|
58 |
+
$master_user = $user_id;
|
59 |
+
$options = compact( 'user_tokens', 'master_user' );
|
60 |
+
} else {
|
61 |
+
$options = compact( 'user_tokens' );
|
62 |
+
}
|
63 |
+
return \Jetpack_Options::update_options( $options );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Filters the value of the api constant.
|
68 |
+
*
|
69 |
+
* @param String $constant_value The constant value.
|
70 |
+
* @param String $constant_name The constant name.
|
71 |
+
* @return mixed | null
|
72 |
+
*/
|
73 |
+
public static function jetpack_api_constant_filter( $constant_value, $constant_name ) {
|
74 |
+
if ( ! is_null( $constant_value ) ) {
|
75 |
+
// If the constant value was already set elsewhere, use that value.
|
76 |
+
return $constant_value;
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( defined( "self::DEFAULT_$constant_name" ) ) {
|
80 |
+
return constant( "self::DEFAULT_$constant_name" );
|
81 |
+
}
|
82 |
+
|
83 |
+
return null;
|
84 |
+
}
|
85 |
+
}
|
vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Sets up the Connection XML-RPC methods.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-connection
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack\Connection;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Registers the XML-RPC methods for Connections.
|
12 |
+
*/
|
13 |
+
class XMLRPC_Connector {
|
14 |
+
/**
|
15 |
+
* The Connection Manager.
|
16 |
+
*
|
17 |
+
* @var Manager
|
18 |
+
*/
|
19 |
+
private $connection;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Constructor.
|
23 |
+
*
|
24 |
+
* @param Manager $connection The Connection Manager.
|
25 |
+
*/
|
26 |
+
public function __construct( Manager $connection ) {
|
27 |
+
$this->connection = $connection;
|
28 |
+
|
29 |
+
// Adding the filter late to avoid being overwritten by Jetpack's XMLRPC server.
|
30 |
+
add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ), 20 );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Attached to the `xmlrpc_methods` filter.
|
35 |
+
*
|
36 |
+
* @param array $methods The already registered XML-RPC methods.
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function xmlrpc_methods( $methods ) {
|
40 |
+
return array_merge(
|
41 |
+
$methods,
|
42 |
+
array(
|
43 |
+
'jetpack.verifyRegistration' => array( $this, 'verify_registration' ),
|
44 |
+
)
|
45 |
+
);
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Handles verification that a site is registered.
|
50 |
+
*
|
51 |
+
* @param array $registration_data The data sent by the XML-RPC client:
|
52 |
+
* [ $secret_1, $user_id ].
|
53 |
+
*
|
54 |
+
* @return string|IXR_Error
|
55 |
+
*/
|
56 |
+
public function verify_registration( $registration_data ) {
|
57 |
+
return $this->output( $this->connection->handle_registration( $registration_data ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Normalizes output for XML-RPC.
|
62 |
+
*
|
63 |
+
* @param mixed $data The data to output.
|
64 |
+
*/
|
65 |
+
private function output( $data ) {
|
66 |
+
if ( is_wp_error( $data ) ) {
|
67 |
+
$code = $data->get_error_data();
|
68 |
+
if ( ! $code ) {
|
69 |
+
$code = -10520;
|
70 |
+
}
|
71 |
+
|
72 |
+
return new \IXR_Error(
|
73 |
+
$code,
|
74 |
+
sprintf( 'Jetpack: [%s] %s', $data->get_error_code(), $data->get_error_message() )
|
75 |
+
);
|
76 |
+
}
|
77 |
+
|
78 |
+
return $data;
|
79 |
+
}
|
80 |
+
}
|
vendor/automattic/jetpack-connection/src/interface-manager.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Jetpack Connection Interface file.
|
4 |
+
* No longer used.
|
5 |
+
*
|
6 |
+
* @package automattic/jetpack-connection
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace Automattic\Jetpack\Connection;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* This interface is no longer used and is now deprecated.
|
13 |
+
*
|
14 |
+
* @deprecated since 7.8
|
15 |
+
*/
|
16 |
+
interface Manager_Interface {
|
17 |
+
}
|
vendor/automattic/jetpack-constants/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Jetpack Constants
|
2 |
+
|
3 |
+
A simple constant manager for Jetpack.
|
4 |
+
|
5 |
+
Testing constants is hard. Once you define a constant in PHP, it's defined. Constants Manager is an abstraction layer so that unit tests can set constants for tests.
|
6 |
+
|
7 |
+
### Usage
|
8 |
+
|
9 |
+
Retrieve the value of a constant `CONSTANT_NAME` (returns `null` if it's not defined):
|
10 |
+
|
11 |
+
```php
|
12 |
+
use Automattic\Jetpack\Constants;
|
13 |
+
|
14 |
+
$constant_value = Constants::get_constant( 'CONSTANT_NAME' );
|
15 |
+
```
|
16 |
+
|
17 |
+
Set the value of a constant `CONSTANT_NAME` to a particular value:
|
18 |
+
|
19 |
+
```php
|
20 |
+
use Automattic\Jetpack\Constants;
|
21 |
+
|
22 |
+
$value = 'some value';
|
23 |
+
Constants::set_constant( 'CONSTANT_NAME', $value );
|
24 |
+
```
|
25 |
+
|
26 |
+
Check whether a constant `CONSTANT_NAME` is defined:
|
27 |
+
|
28 |
+
```php
|
29 |
+
use Automattic\Jetpack\Constants;
|
30 |
+
|
31 |
+
$defined = Constants::is_defined( 'CONSTANT_NAME' );
|
32 |
+
```
|
33 |
+
|
34 |
+
Check whether a constant `CONSTANT_NAME` is truthy:
|
35 |
+
|
36 |
+
```php
|
37 |
+
use Automattic\Jetpack\Constants;
|
38 |
+
|
39 |
+
$is_truthy = Constants::is_true( 'CONSTANT_NAME' );
|
40 |
+
```
|
41 |
+
|
42 |
+
Delete the `CONSTANT_NAME` constant:
|
43 |
+
|
44 |
+
```php
|
45 |
+
use Automattic\Jetpack\Constants;
|
46 |
+
|
47 |
+
Constants::clear_single_constant( 'CONSTANT_NAME' );
|
48 |
+
```
|
49 |
+
|
50 |
+
Delete all known constants:
|
51 |
+
|
52 |
+
```php
|
53 |
+
use Automattic\Jetpack\Constants;
|
54 |
+
|
55 |
+
Constants::clear_constants();
|
56 |
+
```
|
vendor/automattic/jetpack-constants/composer.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "automattic/jetpack-constants",
|
3 |
+
"description": "A wrapper for defining constants in a more testable way.",
|
4 |
+
"type": "library",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"require": {},
|
7 |
+
"require-dev": {
|
8 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
|
9 |
+
"php-mock/php-mock": "^2.1"
|
10 |
+
},
|
11 |
+
"autoload": {
|
12 |
+
"classmap": [
|
13 |
+
"src/"
|
14 |
+
]
|
15 |
+
},
|
16 |
+
"scripts": {
|
17 |
+
"phpunit": [
|
18 |
+
"@composer install",
|
19 |
+
"./vendor/phpunit/phpunit/phpunit --colors=always"
|
20 |
+
]
|
21 |
+
},
|
22 |
+
"minimum-stability": "dev",
|
23 |
+
"prefer-stable": true
|
24 |
+
}
|
vendor/automattic/jetpack-constants/src/class-constants.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A constants manager for Jetpack.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-constants
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Automattic\Jetpack\Constants
|
12 |
+
*
|
13 |
+
* Testing constants is hard. Once you define a constant, it's defined. Constants Manager is an
|
14 |
+
* abstraction layer so that unit tests can set "constants" for tests.
|
15 |
+
*
|
16 |
+
* To test your code, you'll need to swap out `defined( 'CONSTANT' )` with `Automattic\Jetpack\Constants::is_defined( 'CONSTANT' )`
|
17 |
+
* and replace `CONSTANT` with `Automattic\Jetpack\Constants::get_constant( 'CONSTANT' )`. Then in the unit test, you can set the
|
18 |
+
* constant with `Automattic\Jetpack\Constants::set_constant( 'CONSTANT', $value )` and then clean up after each test with something like
|
19 |
+
* this:
|
20 |
+
*
|
21 |
+
* function tearDown() {
|
22 |
+
* Automattic\Jetpack\Constants::clear_constants();
|
23 |
+
* }
|
24 |
+
*/
|
25 |
+
class Constants {
|
26 |
+
/**
|
27 |
+
* A container for all defined constants.
|
28 |
+
*
|
29 |
+
* @access public
|
30 |
+
* @static
|
31 |
+
*
|
32 |
+
* @var array.
|
33 |
+
*/
|
34 |
+
public static $set_constants = array();
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Checks if a "constant" has been set in constants Manager
|
38 |
+
* and has the value of true
|
39 |
+
*
|
40 |
+
* @param string $name The name of the constant.
|
41 |
+
*
|
42 |
+
* @return bool
|
43 |
+
*/
|
44 |
+
public static function is_true( $name ) {
|
45 |
+
return self::is_defined( $name ) && self::get_constant( $name );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Checks if a "constant" has been set in constants Manager, and if not,
|
50 |
+
* checks if the constant was defined with define( 'name', 'value ).
|
51 |
+
*
|
52 |
+
* @param string $name The name of the constant.
|
53 |
+
*
|
54 |
+
* @return bool
|
55 |
+
*/
|
56 |
+
public static function is_defined( $name ) {
|
57 |
+
return array_key_exists( $name, self::$set_constants )
|
58 |
+
? true
|
59 |
+
: defined( $name );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Attempts to retrieve the "constant" from constants Manager, and if it hasn't been set,
|
64 |
+
* then attempts to get the constant with the constant() function. If that also hasn't
|
65 |
+
* been set, attempts to get a value from filters.
|
66 |
+
*
|
67 |
+
* @param string $name The name of the constant.
|
68 |
+
*
|
69 |
+
* @return mixed null if the constant does not exist or the value of the constant.
|
70 |
+
*/
|
71 |
+
public static function get_constant( $name ) {
|
72 |
+
if ( array_key_exists( $name, self::$set_constants ) ) {
|
73 |
+
return self::$set_constants[ $name ];
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( defined( $name ) ) {
|
77 |
+
return constant( $name );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Filters the value of the constant.
|
82 |
+
*
|
83 |
+
* @since 8.5.0
|
84 |
+
*
|
85 |
+
* @param null The constant value to be filtered. The default is null.
|
86 |
+
* @param String $name The constant name.
|
87 |
+
*/
|
88 |
+
return apply_filters( 'jetpack_constant_default_value', null, $name );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Sets the value of the "constant" within constants Manager.
|
93 |
+
*
|
94 |
+
* @param string $name The name of the constant.
|
95 |
+
* @param string $value The value of the constant.
|
96 |
+
*/
|
97 |
+
public static function set_constant( $name, $value ) {
|
98 |
+
self::$set_constants[ $name ] = $value;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Will unset a "constant" from constants Manager if the constant exists.
|
103 |
+
*
|
104 |
+
* @param string $name The name of the constant.
|
105 |
+
*
|
106 |
+
* @return bool Whether the constant was removed.
|
107 |
+
*/
|
108 |
+
public static function clear_single_constant( $name ) {
|
109 |
+
if ( ! array_key_exists( $name, self::$set_constants ) ) {
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
unset( self::$set_constants[ $name ] );
|
114 |
+
|
115 |
+
return true;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Resets all of the constants within constants Manager.
|
120 |
+
*/
|
121 |
+
public static function clear_constants() {
|
122 |
+
self::$set_constants = array();
|
123 |
+
}
|
124 |
+
}
|
vendor/automattic/jetpack-options/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Jetpack Options
|
2 |
+
|
3 |
+
A static class for Jetpack's options.
|
4 |
+
|
5 |
+
Used as a wrapper for WordPress options, allowing folks
|
6 |
+
to add / update / delete options from the Jetpack namespace.
|
7 |
+
|
8 |
+
### Example Usage
|
9 |
+
|
10 |
+
Get a Jetpack option:
|
11 |
+
|
12 |
+
```php
|
13 |
+
Jetpack_Options::get_option( 'version' )
|
14 |
+
```
|
15 |
+
|
16 |
+
[Explore the code for Jetpack_Options](legacy/class-jetpack-options.php) to see a complete
|
17 |
+
list of documented methods.
|
vendor/automattic/jetpack-options/composer.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "automattic/jetpack-options",
|
3 |
+
"description": "A wrapper for wp-options to manage specific Jetpack options.",
|
4 |
+
"type": "library",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"require": {
|
7 |
+
"automattic/jetpack-constants": "1.2.0"
|
8 |
+
},
|
9 |
+
"require-dev": {
|
10 |
+
"phpunit/phpunit": "7.*.*",
|
11 |
+
"10up/wp_mock": "0.4.2"
|
12 |
+
},
|
13 |
+
"autoload": {
|
14 |
+
"classmap": [
|
15 |
+
"legacy"
|
16 |
+
]
|
17 |
+
},
|
18 |
+
"repositories": [
|
19 |
+
{
|
20 |
+
"type": "path",
|
21 |
+
"url": "../*"
|
22 |
+
}
|
23 |
+
],
|
24 |
+
"minimum-stability": "dev",
|
25 |
+
"prefer-stable": true
|
26 |
+
}
|
vendor/automattic/jetpack-options/legacy/class-jetpack-options.php
ADDED
@@ -0,0 +1,646 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Legacy Jetpack_Options class.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-options
|
6 |
+
*/
|
7 |
+
|
8 |
+
use Automattic\Jetpack\Constants;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Jetpack_Options
|
12 |
+
*/
|
13 |
+
class Jetpack_Options {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* An array that maps a grouped option type to an option name.
|
17 |
+
*
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
private static $grouped_options = array(
|
21 |
+
'compact' => 'jetpack_options',
|
22 |
+
'private' => 'jetpack_private_options',
|
23 |
+
);
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Returns an array of option names for a given type.
|
27 |
+
*
|
28 |
+
* @param string $type The type of option to return. Defaults to 'compact'.
|
29 |
+
*
|
30 |
+
* @return array
|
31 |
+
*/
|
32 |
+
public static function get_option_names( $type = 'compact' ) {
|
33 |
+
switch ( $type ) {
|
34 |
+
case 'non-compact':
|
35 |
+
case 'non_compact':
|
36 |
+
return array(
|
37 |
+
'activated',
|
38 |
+
'active_modules',
|
39 |
+
'allowed_xsite_search_ids', // (array) Array of WP.com blog ids that are allowed to search the content of this site
|
40 |
+
'available_modules',
|
41 |
+
'do_activate',
|
42 |
+
'edit_links_calypso_redirect', // (bool) Whether post/page edit links on front end should point to Calypso.
|
43 |
+
'log',
|
44 |
+
'slideshow_background_color',
|
45 |
+
'widget_twitter',
|
46 |
+
'wpcc_options',
|
47 |
+
'relatedposts',
|
48 |
+
'file_data',
|
49 |
+
'autoupdate_plugins', // (array) An array of plugin ids ( eg. jetpack/jetpack ) that should be autoupdated
|
50 |
+
'autoupdate_plugins_translations', // (array) An array of plugin ids ( eg. jetpack/jetpack ) that should be autoupdated translation files.
|
51 |
+
'autoupdate_themes', // (array) An array of theme ids ( eg. twentyfourteen ) that should be autoupdated
|
52 |
+
'autoupdate_themes_translations', // (array) An array of theme ids ( eg. twentyfourteen ) that should autoupdated translation files.
|
53 |
+
'autoupdate_core', // (bool) Whether or not to autoupdate core
|
54 |
+
'autoupdate_translations', // (bool) Whether or not to autoupdate all translations
|
55 |
+
'json_api_full_management', // (bool) Allow full management (eg. Activate, Upgrade plugins) of the site via the JSON API.
|
56 |
+
'sync_non_public_post_stati', // (bool) Allow synchronisation of posts and pages with non-public status.
|
57 |
+
'site_icon_url', // (string) url to the full site icon
|
58 |
+
'site_icon_id', // (int) Attachment id of the site icon file
|
59 |
+
'dismissed_manage_banner', // (bool) Dismiss Jetpack manage banner allows the user to dismiss the banner permanently
|
60 |
+
'unique_connection', // (array) A flag to determine a unique connection to wordpress.com two values "connected" and "disconnected" with values for how many times each has occured
|
61 |
+
'protect_whitelist', // (array) IP Address for the Protect module to ignore
|
62 |
+
'sync_error_idc', // (bool|array) false or array containing the site's home and siteurl at time of IDC error
|
63 |
+
'sync_health_status', // (bool|array) An array of data relating to Jetpack's sync health.
|
64 |
+
'safe_mode_confirmed', // (bool) True if someone confirms that this site was correctly put into safe mode automatically after an identity crisis is discovered.
|
65 |
+
'migrate_for_idc', // (bool) True if someone confirms that this site should migrate stats and subscribers from its previous URL
|
66 |
+
'dismissed_connection_banner', // (bool) True if the connection banner has been dismissed
|
67 |
+
'ab_connect_banner_green_bar', // (int) Version displayed of the A/B test for the green bar at the top of the connect banner.
|
68 |
+
'onboarding', // (string) Auth token to be used in the onboarding connection flow
|
69 |
+
'tos_agreed', // (bool) Whether or not the TOS for connection has been agreed upon.
|
70 |
+
'static_asset_cdn_files', // (array) An nested array of files that we can swap out for cdn versions.
|
71 |
+
'mapbox_api_key', // (string) Mapbox API Key, for use with Map block.
|
72 |
+
'mailchimp', // (string) Mailchimp keyring data, for mailchimp block.
|
73 |
+
'xmlrpc_errors', // (array) Keys are XML-RPC signature error codes. Values are truthy.
|
74 |
+
'dismissed_wizard_banner', // (int) True if the Wizard banner has been dismissed.
|
75 |
+
);
|
76 |
+
|
77 |
+
case 'private':
|
78 |
+
return array(
|
79 |
+
'blog_token', // (string) The Client Secret/Blog Token of this site.
|
80 |
+
'user_token', // (string) The User Token of this site. (deprecated)
|
81 |
+
'user_tokens', // (array) User Tokens for each user of this site who has connected to jetpack.wordpress.com.
|
82 |
+
);
|
83 |
+
|
84 |
+
case 'network':
|
85 |
+
return array(
|
86 |
+
'onboarding', // (string) Auth token to be used in the onboarding connection flow
|
87 |
+
'file_data', // (array) List of absolute paths to all Jetpack modules
|
88 |
+
);
|
89 |
+
}
|
90 |
+
|
91 |
+
return array(
|
92 |
+
'id', // (int) The Client ID/WP.com Blog ID of this site.
|
93 |
+
'publicize_connections', // (array) An array of Publicize connections from WordPress.com.
|
94 |
+
'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com.
|
95 |
+
'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time.
|
96 |
+
'old_version', // (string) Used to determine which modules are the most recently added. previous_version:time.
|
97 |
+
'fallback_no_verify_ssl_certs', // (int) Flag for determining if this host must skip SSL Certificate verification due to misconfigured SSL.
|
98 |
+
'time_diff', // (int) Offset between Jetpack server's clocks and this server's clocks. Jetpack Server Time = time() + (int) Jetpack_Options::get_option( 'time_diff' )
|
99 |
+
'public', // (int|bool) If we think this site is public or not (1, 0), false if we haven't yet tried to figure it out.
|
100 |
+
'videopress', // (array) VideoPress options array.
|
101 |
+
'is_network_site', // (int|bool) If we think this site is a network or a single blog (1, 0), false if we haven't yet tried to figue it out.
|
102 |
+
'social_links', // (array) The specified links for each social networking site.
|
103 |
+
'identity_crisis_whitelist', // (array) An array of options, each having an array of the values whitelisted for it.
|
104 |
+
'gplus_authors', // (array) The Google+ authorship information for connected users.
|
105 |
+
'last_heartbeat', // (int) The timestamp of the last heartbeat that fired.
|
106 |
+
'hide_jitm', // (array) A list of just in time messages that we should not show because they have been dismissed by the user.
|
107 |
+
'custom_css_4.7_migration', // (bool) Whether Custom CSS has scanned for and migrated any legacy CSS CPT entries to the new Core format.
|
108 |
+
'image_widget_migration', // (bool) Whether any legacy Image Widgets have been converted to the new Core widget.
|
109 |
+
'gallery_widget_migration', // (bool) Whether any legacy Gallery Widgets have been converted to the new Core widget.
|
110 |
+
'sso_first_login', // (bool) Is this the first time the user logins via SSO.
|
111 |
+
'dismissed_hints', // (array) Part of Plugin Search Hints. List of cards that have been dismissed.
|
112 |
+
'first_admin_view', // (bool) Set to true the first time the user views the admin. Usually after the initial connection.
|
113 |
+
'setup_wizard_questionnaire', // (array) List of user choices from the setup wizard.
|
114 |
+
'setup_wizard_status', // (string) Status of the setup wizard.
|
115 |
+
);
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Is the option name valid?
|
120 |
+
*
|
121 |
+
* @param string $name The name of the option.
|
122 |
+
* @param string|null $group The name of the group that the option is in. Default to null, which will search non_compact.
|
123 |
+
*
|
124 |
+
* @return bool Is the option name valid?
|
125 |
+
*/
|
126 |
+
public static function is_valid( $name, $group = null ) {
|
127 |
+
if ( is_array( $name ) ) {
|
128 |
+
$compact_names = array();
|
129 |
+
foreach ( array_keys( self::$grouped_options ) as $_group ) {
|
130 |
+
$compact_names = array_merge( $compact_names, self::get_option_names( $_group ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
$result = array_diff( $name, self::get_option_names( 'non_compact' ), $compact_names );
|
134 |
+
|
135 |
+
return empty( $result );
|
136 |
+
}
|
137 |
+
|
138 |
+
if ( is_null( $group ) || 'non_compact' === $group ) {
|
139 |
+
if ( in_array( $name, self::get_option_names( $group ), true ) ) {
|
140 |
+
return true;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
foreach ( array_keys( self::$grouped_options ) as $_group ) {
|
145 |
+
if ( is_null( $group ) || $group === $_group ) {
|
146 |
+
if ( in_array( $name, self::get_option_names( $_group ), true ) ) {
|
147 |
+
return true;
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
return false;
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Checks if an option must be saved for the whole network in WP Multisite
|
157 |
+
*
|
158 |
+
* @param string $option_name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
|
159 |
+
*
|
160 |
+
* @return bool
|
161 |
+
*/
|
162 |
+
public static function is_network_option( $option_name ) {
|
163 |
+
if ( ! is_multisite() ) {
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
return in_array( $option_name, self::get_option_names( 'network' ), true );
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate.
|
171 |
+
*
|
172 |
+
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
|
173 |
+
* @param mixed $default (optional).
|
174 |
+
*
|
175 |
+
* @return mixed
|
176 |
+
*/
|
177 |
+
public static function get_option( $name, $default = false ) {
|
178 |
+
if ( self::is_valid( $name, 'non_compact' ) ) {
|
179 |
+
if ( self::is_network_option( $name ) ) {
|
180 |
+
return get_site_option( "jetpack_$name", $default );
|
181 |
+
}
|
182 |
+
|
183 |
+
return get_option( "jetpack_$name", $default );
|
184 |
+
}
|
185 |
+
|
186 |
+
foreach ( array_keys( self::$grouped_options ) as $group ) {
|
187 |
+
if ( self::is_valid( $name, $group ) ) {
|
188 |
+
return self::get_grouped_option( $group, $name, $default );
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't wish to change legacy behavior.
|
193 |
+
|
194 |
+
return $default;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Returns the requested option, and ensures it's autoloaded in the future.
|
199 |
+
* This does _not_ adjust the prefix in any way (does not prefix jetpack_%)
|
200 |
+
*
|
201 |
+
* @param string $name Option name.
|
202 |
+
* @param mixed $default (optional).
|
203 |
+
*
|
204 |
+
* @return mixed
|
205 |
+
*/
|
206 |
+
public static function get_option_and_ensure_autoload( $name, $default ) {
|
207 |
+
// In this function the name is not adjusted by prefixing jetpack_
|
208 |
+
// so if it has already prefixed, we'll replace it and then
|
209 |
+
// check if the option name is a network option or not.
|
210 |
+
$jetpack_name = preg_replace( '/^jetpack_/', '', $name, 1 );
|
211 |
+
$is_network_option = self::is_network_option( $jetpack_name );
|
212 |
+
$value = $is_network_option ? get_site_option( $name ) : get_option( $name );
|
213 |
+
|
214 |
+
if ( false === $value && false !== $default ) {
|
215 |
+
if ( $is_network_option ) {
|
216 |
+
add_site_option( $name, $default );
|
217 |
+
} else {
|
218 |
+
add_option( $name, $default );
|
219 |
+
}
|
220 |
+
$value = $default;
|
221 |
+
}
|
222 |
+
|
223 |
+
return $value;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Update grouped option
|
228 |
+
*
|
229 |
+
* @param string $group Options group.
|
230 |
+
* @param string $name Options name.
|
231 |
+
* @param mixed $value Options value.
|
232 |
+
*
|
233 |
+
* @return bool Success or failure.
|
234 |
+
*/
|
235 |
+
private static function update_grouped_option( $group, $name, $value ) {
|
236 |
+
$options = get_option( self::$grouped_options[ $group ] );
|
237 |
+
if ( ! is_array( $options ) ) {
|
238 |
+
$options = array();
|
239 |
+
}
|
240 |
+
$options[ $name ] = $value;
|
241 |
+
|
242 |
+
return update_option( self::$grouped_options[ $group ], $options );
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Updates the single given option. Updates jetpack_options or jetpack_$name as appropriate.
|
247 |
+
*
|
248 |
+
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
|
249 |
+
* @param mixed $value Option value.
|
250 |
+
* @param string $autoload If not compact option, allows specifying whether to autoload or not.
|
251 |
+
*
|
252 |
+
* @return bool Was the option successfully updated?
|
253 |
+
*/
|
254 |
+
public static function update_option( $name, $value, $autoload = null ) {
|
255 |
+
/**
|
256 |
+
* Fires before Jetpack updates a specific option.
|
257 |
+
*
|
258 |
+
* @since 3.0.0
|
259 |
+
*
|
260 |
+
* @param str $name The name of the option being updated.
|
261 |
+
* @param mixed $value The new value of the option.
|
262 |
+
*/
|
263 |
+
do_action( 'pre_update_jetpack_option_' . $name, $name, $value );
|
264 |
+
if ( self::is_valid( $name, 'non_compact' ) ) {
|
265 |
+
if ( self::is_network_option( $name ) ) {
|
266 |
+
return update_site_option( "jetpack_$name", $value );
|
267 |
+
}
|
268 |
+
|
269 |
+
return update_option( "jetpack_$name", $value, $autoload );
|
270 |
+
|
271 |
+
}
|
272 |
+
|
273 |
+
foreach ( array_keys( self::$grouped_options ) as $group ) {
|
274 |
+
if ( self::is_valid( $name, $group ) ) {
|
275 |
+
return self::update_grouped_option( $group, $name, $value );
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't want to change legacy behavior.
|
280 |
+
|
281 |
+
return false;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Updates the multiple given options. Updates jetpack_options and/or jetpack_$name as appropriate.
|
286 |
+
*
|
287 |
+
* @param array $array array( option name => option value, ... ).
|
288 |
+
*/
|
289 |
+
public static function update_options( $array ) {
|
290 |
+
$names = array_keys( $array );
|
291 |
+
|
292 |
+
foreach ( array_diff( $names, self::get_option_names(), self::get_option_names( 'non_compact' ), self::get_option_names( 'private' ) ) as $unknown_name ) {
|
293 |
+
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $unknown_name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't change legacy behavior.
|
294 |
+
unset( $array[ $unknown_name ] );
|
295 |
+
}
|
296 |
+
|
297 |
+
foreach ( $names as $name ) {
|
298 |
+
self::update_option( $name, $array[ $name ] );
|
299 |
+
}
|
300 |
+
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Deletes the given option. May be passed multiple option names as an array.
|
304 |
+
* Updates jetpack_options and/or deletes jetpack_$name as appropriate.
|
305 |
+
*
|
306 |
+
* @param string|array $names Option names. They must come _without_ `jetpack_%` prefix. The method will prefix the option names.
|
307 |
+
*
|
308 |
+
* @return bool Was the option successfully deleted?
|
309 |
+
*/
|
310 |
+
public static function delete_option( $names ) {
|
311 |
+
$result = true;
|
312 |
+
$names = (array) $names;
|
313 |
+
|
314 |
+
if ( ! self::is_valid( $names ) ) {
|
315 |
+
// phpcs:disable -- This line triggers a handful of errors; ignoring to avoid changing legacy behavior.
|
316 |
+
trigger_error( sprintf( 'Invalid Jetpack option names: %s', print_r( $names, 1 ) ), E_USER_WARNING );
|
317 |
+
// phpcs:enable
|
318 |
+
return false;
|
319 |
+
}
|
320 |
+
|
321 |
+
foreach ( array_intersect( $names, self::get_option_names( 'non_compact' ) ) as $name ) {
|
322 |
+
if ( self::is_network_option( $name ) ) {
|
323 |
+
$result = delete_site_option( "jetpack_$name" );
|
324 |
+
} else {
|
325 |
+
$result = delete_option( "jetpack_$name" );
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
foreach ( array_keys( self::$grouped_options ) as $group ) {
|
330 |
+
if ( ! self::delete_grouped_option( $group, $names ) ) {
|
331 |
+
$result = false;
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
return $result;
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Get group option.
|
340 |
+
*
|
341 |
+
* @param string $group Option group name.
|
342 |
+
* @param string $name Option name.
|
343 |
+
* @param mixed $default Default option value.
|
344 |
+
*
|
345 |
+
* @return mixed Option.
|
346 |
+
*/
|
347 |
+
private static function get_grouped_option( $group, $name, $default ) {
|
348 |
+
$options = get_option( self::$grouped_options[ $group ] );
|
349 |
+
if ( is_array( $options ) && isset( $options[ $name ] ) ) {
|
350 |
+
return $options[ $name ];
|
351 |
+
}
|
352 |
+
|
353 |
+
return $default;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Delete grouped option.
|
358 |
+
*
|
359 |
+
* @param string $group Option group name.
|
360 |
+
* @param array $names Option names.
|
361 |
+
*
|
362 |
+
* @return bool Success or failure.
|
363 |
+
*/
|
364 |
+
private static function delete_grouped_option( $group, $names ) {
|
365 |
+
$options = get_option( self::$grouped_options[ $group ], array() );
|
366 |
+
|
367 |
+
$to_delete = array_intersect( $names, self::get_option_names( $group ), array_keys( $options ) );
|
368 |
+
if ( $to_delete ) {
|
369 |
+
foreach ( $to_delete as $name ) {
|
370 |
+
unset( $options[ $name ] );
|
371 |
+
}
|
372 |
+
|
373 |
+
return update_option( self::$grouped_options[ $group ], $options );
|
374 |
+
}
|
375 |
+
|
376 |
+
return true;
|
377 |
+
}
|
378 |
+
|
379 |
+
/*
|
380 |
+
* Raw option methods allow Jetpack to get / update / delete options via direct DB queries, including options
|
381 |
+
* that are not created by the Jetpack plugin. This is helpful only in rare cases when we need to bypass
|
382 |
+
* cache and filters.
|
383 |
+
*/
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Deletes an option via $wpdb query.
|
387 |
+
*
|
388 |
+
* @param string $name Option name.
|
389 |
+
*
|
390 |
+
* @return bool Is the option deleted?
|
391 |
+
*/
|
392 |
+
public static function delete_raw_option( $name ) {
|
393 |
+
if ( self::bypass_raw_option( $name ) ) {
|
394 |
+
return delete_option( $name );
|
395 |
+
}
|
396 |
+
global $wpdb;
|
397 |
+
$result = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = %s", $name ) );
|
398 |
+
return $result;
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Updates an option via $wpdb query.
|
403 |
+
*
|
404 |
+
* @param string $name Option name.
|
405 |
+
* @param mixed $value Option value.
|
406 |
+
* @param bool $autoload Specifying whether to autoload or not.
|
407 |
+
*
|
408 |
+
* @return bool Is the option updated?
|
409 |
+
*/
|
410 |
+
public static function update_raw_option( $name, $value, $autoload = false ) {
|
411 |
+
if ( self::bypass_raw_option( $name ) ) {
|
412 |
+
return update_option( $name, $value, $autoload );
|
413 |
+
}
|
414 |
+
global $wpdb;
|
415 |
+
$autoload_value = $autoload ? 'yes' : 'no';
|
416 |
+
|
417 |
+
$old_value = $wpdb->get_var(
|
418 |
+
$wpdb->prepare(
|
419 |
+
"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1",
|
420 |
+
$name
|
421 |
+
)
|
422 |
+
);
|
423 |
+
if ( $old_value === $value ) {
|
424 |
+
return false;
|
425 |
+
}
|
426 |
+
|
427 |
+
$serialized_value = maybe_serialize( $value );
|
428 |
+
// below we used "insert ignore" to at least suppress the resulting error.
|
429 |
+
$updated_num = $wpdb->query(
|
430 |
+
$wpdb->prepare(
|
431 |
+
"UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s",
|
432 |
+
$serialized_value,
|
433 |
+
$name
|
434 |
+
)
|
435 |
+
);
|
436 |
+
|
437 |
+
// Try inserting the option if the value doesn't exits.
|
438 |
+
if ( ! $updated_num ) {
|
439 |
+
$updated_num = $wpdb->query(
|
440 |
+
$wpdb->prepare(
|
441 |
+
"INSERT IGNORE INTO $wpdb->options ( option_name, option_value, autoload ) VALUES ( %s, %s, %s )",
|
442 |
+
$name,
|
443 |
+
$serialized_value,
|
444 |
+
$autoload_value
|
445 |
+
)
|
446 |
+
);
|
447 |
+
}
|
448 |
+
return (bool) $updated_num;
|
449 |
+
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* Gets an option via $wpdb query.
|
453 |
+
*
|
454 |
+
* @since 5.4.0
|
455 |
+
*
|
456 |
+
* @param string $name Option name.
|
457 |
+
* @param mixed $default Default option value if option is not found.
|
458 |
+
*
|
459 |
+
* @return mixed Option value, or null if option is not found and default is not specified.
|
460 |
+
*/
|
461 |
+
public static function get_raw_option( $name, $default = null ) {
|
462 |
+
if ( self::bypass_raw_option( $name ) ) {
|
463 |
+
return get_option( $name, $default );
|
464 |
+
}
|
465 |
+
|
466 |
+
global $wpdb;
|
467 |
+
$value = $wpdb->get_var(
|
468 |
+
$wpdb->prepare(
|
469 |
+
"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1",
|
470 |
+
$name
|
471 |
+
)
|
472 |
+
);
|
473 |
+
$value = maybe_unserialize( $value );
|
474 |
+
|
475 |
+
if ( null === $value && null !== $default ) {
|
476 |
+
return $default;
|
477 |
+
}
|
478 |
+
|
479 |
+
return $value;
|
480 |
+
}
|
481 |
+
|
482 |
+
/**
|
483 |
+
* This function checks for a constant that, if present, will disable direct DB queries Jetpack uses to manage certain options and force Jetpack to always use Options API instead.
|
484 |
+
* Options can be selectively managed via a blacklist by filtering option names via the jetpack_disabled_raw_option filter.
|
485 |
+
*
|
486 |
+
* @param string $name Option name.
|
487 |
+
*
|
488 |
+
* @return bool
|
489 |
+
*/
|
490 |
+
public static function bypass_raw_option( $name ) {
|
491 |
+
|
492 |
+
if ( Constants::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
|
493 |
+
return true;
|
494 |
+
}
|
495 |
+
/**
|
496 |
+
* Allows to disable particular raw options.
|
497 |
+
*
|
498 |
+
* @since 5.5.0
|
499 |
+
*
|
500 |
+
* @param array $disabled_raw_options An array of option names that you can selectively blacklist from being managed via direct database queries.
|
501 |
+
*/
|
502 |
+
$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
|
503 |
+
return isset( $disabled_raw_options[ $name ] );
|
504 |
+
}
|
505 |
+
|
506 |
+
/**
|
507 |
+
* Gets all known options that are used by Jetpack and managed by Jetpack_Options.
|
508 |
+
*
|
509 |
+
* @since 5.4.0
|
510 |
+
*
|
511 |
+
* @param boolean $strip_unsafe_options If true, and by default, will strip out options necessary for the connection to WordPress.com.
|
512 |
+
* @return array An array of all options managed via the Jetpack_Options class.
|
513 |
+
*/
|
514 |
+
public static function get_all_jetpack_options( $strip_unsafe_options = true ) {
|
515 |
+
$jetpack_options = self::get_option_names();
|
516 |
+
$jetpack_options_non_compat = self::get_option_names( 'non_compact' );
|
517 |
+
$jetpack_options_private = self::get_option_names( 'private' );
|
518 |
+
|
519 |
+
$all_jp_options = array_merge( $jetpack_options, $jetpack_options_non_compat, $jetpack_options_private );
|
520 |
+
|
521 |
+
if ( $strip_unsafe_options ) {
|
522 |
+
// Flag some Jetpack options as unsafe.
|
523 |
+
$unsafe_options = array(
|
524 |
+
'id', // (int) The Client ID/WP.com Blog ID of this site.
|
525 |
+
'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com.
|
526 |
+
'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time
|
527 |
+
|
528 |
+
// non_compact.
|
529 |
+
'activated',
|
530 |
+
|
531 |
+
// private.
|
532 |
+
'register',
|
533 |
+
'blog_token', // (string) The Client Secret/Blog Token of this site.
|
534 |
+
'user_token', // (string) The User Token of this site. (deprecated)
|
535 |
+
'user_tokens',
|
536 |
+
);
|
537 |
+
|
538 |
+
// Remove the unsafe Jetpack options.
|
539 |
+
foreach ( $unsafe_options as $unsafe_option ) {
|
540 |
+
$key = array_search( $unsafe_option, $all_jp_options, true );
|
541 |
+
if ( false !== $key ) {
|
542 |
+
unset( $all_jp_options[ $key ] );
|
543 |
+
}
|
544 |
+
}
|
545 |
+
}
|
546 |
+
|
547 |
+
return $all_jp_options;
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Get all options that are not managed by the Jetpack_Options class that are used by Jetpack.
|
552 |
+
*
|
553 |
+
* @since 5.4.0
|
554 |
+
*
|
555 |
+
* @return array
|
556 |
+
*/
|
557 |
+
public static function get_all_wp_options() {
|
558 |
+
// A manual build of the wp options.
|
559 |
+
return array(
|
560 |
+
'sharing-options',
|
561 |
+
'disabled_likes',
|
562 |
+
'disabled_reblogs',
|
563 |
+
'jetpack_comments_likes_enabled',
|
564 |
+
'stats_options',
|
565 |
+
'stats_dashboard_widget',
|
566 |
+
'safecss_preview_rev',
|
567 |
+
'safecss_rev',
|
568 |
+
'safecss_revision_migrated',
|
569 |
+
'nova_menu_order',
|
570 |
+
'jetpack_portfolio',
|
571 |
+
'jetpack_portfolio_posts_per_page',
|
572 |
+
'jetpack_testimonial',
|
573 |
+
'jetpack_testimonial_posts_per_page',
|
574 |
+
'sharedaddy_disable_resources',
|
575 |
+
'sharing-options',
|
576 |
+
'sharing-services',
|
577 |
+
'site_icon_temp_data',
|
578 |
+
'featured-content',
|
579 |
+
'site_logo',
|
580 |
+
'jetpack_dismissed_notices',
|
581 |
+
'jetpack-twitter-cards-site-tag',
|
582 |
+
'jetpack-sitemap-state',
|
583 |
+
'jetpack_sitemap_post_types',
|
584 |
+
'jetpack_sitemap_location',
|
585 |
+
'jetpack_protect_key',
|
586 |
+
'jetpack_protect_blocked_attempts',
|
587 |
+
'jetpack_protect_activating',
|
588 |
+
'jetpack_connection_banner_ab',
|
589 |
+
'jetpack_active_plan',
|
590 |
+
'jetpack_activation_source',
|
591 |
+
'jetpack_sso_match_by_email',
|
592 |
+
'jetpack_sso_require_two_step',
|
593 |
+
'jetpack_sso_remove_login_form',
|
594 |
+
'jetpack_last_connect_url_check',
|
595 |
+
'jpo_business_address',
|
596 |
+
'jpo_site_type',
|
597 |
+
'jpo_homepage_format',
|
598 |
+
'jpo_contact_page',
|
599 |
+
'jetpack_excluded_extensions',
|
600 |
+
);
|
601 |
+
}
|
602 |
+
|
603 |
+
/**
|
604 |
+
* Gets all options that can be safely reset by CLI.
|
605 |
+
*
|
606 |
+
* @since 5.4.0
|
607 |
+
*
|
608 |
+
* @return array array Associative array containing jp_options which are managed by the Jetpack_Options class and wp_options which are not.
|
609 |
+
*/
|
610 |
+
public static function get_options_for_reset() {
|
611 |
+
$all_jp_options = self::get_all_jetpack_options();
|
612 |
+
|
613 |
+
$wp_options = self::get_all_wp_options();
|
614 |
+
|
615 |
+
$options = array(
|
616 |
+
'jp_options' => $all_jp_options,
|
617 |
+
'wp_options' => $wp_options,
|
618 |
+
);
|
619 |
+
|
620 |
+
return $options;
|
621 |
+
}
|
622 |
+
|
623 |
+
/**
|
624 |
+
* Delete all known options
|
625 |
+
*
|
626 |
+
* @since 5.4.0
|
627 |
+
*
|
628 |
+
* @return void
|
629 |
+
*/
|
630 |
+
public static function delete_all_known_options() {
|
631 |
+
// Delete all compact options.
|
632 |
+
foreach ( (array) self::$grouped_options as $option_name ) {
|
633 |
+
delete_option( $option_name );
|
634 |
+
}
|
635 |
+
|
636 |
+
// Delete all non-compact Jetpack options.
|
637 |
+
foreach ( (array) self::get_option_names( 'non-compact' ) as $option_name ) {
|
638 |
+
self::delete_option( $option_name );
|
639 |
+
}
|
640 |
+
|
641 |
+
// Delete all options that can be reset via CLI, that aren't Jetpack options.
|
642 |
+
foreach ( (array) self::get_all_wp_options() as $option_name ) {
|
643 |
+
delete_option( $option_name );
|
644 |
+
}
|
645 |
+
}
|
646 |
+
}
|
vendor/automattic/jetpack-roles/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Jetpack Roles
|
2 |
+
|
3 |
+
A user roles class for Jetpack.
|
4 |
+
|
5 |
+
Contains utilities for translating user roles to capabilities and vice versa.
|
6 |
+
|
7 |
+
### Usage
|
8 |
+
|
9 |
+
Get the role of the current user:
|
10 |
+
|
11 |
+
```php
|
12 |
+
use Automattic\Jetpack\Roles;
|
13 |
+
|
14 |
+
$roles = new Roles();
|
15 |
+
$current_user_role = $roles->translate_current_user_to_role();
|
16 |
+
```
|
17 |
+
|
18 |
+
Get the role of a particular user:
|
19 |
+
|
20 |
+
```php
|
21 |
+
use Automattic\Jetpack\Roles;
|
22 |
+
|
23 |
+
$roles = new Roles();
|
24 |
+
$user = get_user_by( 'contact@yourjetpack.blog' );
|
25 |
+
$user_role = $roles->translate_user_to_role( $user );
|
26 |
+
```
|
27 |
+
|
28 |
+
Get the capability we require for a role:
|
29 |
+
|
30 |
+
```php
|
31 |
+
use Automattic\Jetpack\Roles;
|
32 |
+
|
33 |
+
$roles = new Roles();
|
34 |
+
$capability = $roles->translate_role_to_cap( 'administrator' );
|
35 |
+
```
|
vendor/automattic/jetpack-roles/composer.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "automattic/jetpack-roles",
|
3 |
+
"description": "Utilities, related with user roles and capabilities.",
|
4 |
+
"type": "library",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"require": {},
|
7 |
+
"require-dev": {
|
8 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
|
9 |
+
"php-mock/php-mock": "^2.1"
|
10 |
+
},
|
11 |
+
"autoload": {
|
12 |
+
"classmap": [
|
13 |
+
"src/"
|
14 |
+
]
|
15 |
+
},
|
16 |
+
"scripts": {
|
17 |
+
"phpunit": [
|
18 |
+
"@composer install",
|
19 |
+
"./vendor/phpunit/phpunit/phpunit --colors=always"
|
20 |
+
]
|
21 |
+
},
|
22 |
+
"repositories": [
|
23 |
+
{
|
24 |
+
"type": "path",
|
25 |
+
"url": "../*"
|
26 |
+
}
|
27 |
+
],
|
28 |
+
"minimum-stability": "dev",
|
29 |
+
"prefer-stable": true
|
30 |
+
}
|
vendor/automattic/jetpack-roles/src/class-roles.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A user roles class for Jetpack.
|
4 |
+
*
|
5 |
+
* @package automattic/jetpack-roles
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Automattic\Jetpack;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Automattic\Jetpack\Roles
|
12 |
+
*
|
13 |
+
* Contains utilities for translating user roles to capabilities and vice versa.
|
14 |
+
*/
|
15 |
+
class Roles {
|
16 |
+
/**
|
17 |
+
* Map of roles we care about, and their corresponding minimum capabilities.
|
18 |
+
*
|
19 |
+
* @access protected
|
20 |
+
*
|
21 |
+
* @var array
|
22 |
+
*/
|
23 |
+
protected $capability_translations = array(
|
24 |
+
'administrator' => 'manage_options',
|
25 |
+
'editor' => 'edit_others_posts',
|
26 |
+
'author' => 'publish_posts',
|
27 |
+
'contributor' => 'edit_posts',
|
28 |
+
'subscriber' => 'read',
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get the role of the current user.
|
33 |
+
*
|
34 |
+
* @access public
|
35 |
+
*
|
36 |
+
* @return string|boolean Current user's role, false if not enough capabilities for any of the roles.
|
37 |
+
*/
|
38 |
+
public function translate_current_user_to_role() {
|
39 |
+
foreach ( $this->capability_translations as $role => $cap ) {
|
40 |
+
if ( current_user_can( $role ) || current_user_can( $cap ) ) {
|
41 |
+
return $role;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get the role of a particular user.
|
50 |
+
*
|
51 |
+
* @access public
|
52 |
+
*
|
53 |
+
* @param \WP_User $user User object.
|
54 |
+
* @return string|boolean User's role, false if not enough capabilities for any of the roles.
|
55 |
+
*/
|
56 |
+
public function translate_user_to_role( $user ) {
|
57 |
+
foreach ( $this->capability_translations as $role => $cap ) {
|
58 |
+
if ( user_can( $user, $role ) || user_can( $user, $cap ) ) {
|
59 |
+
return $role;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
return false;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Get the minimum capability for a role.
|
68 |
+
*
|
69 |
+
* @access public
|
70 |
+
*
|
71 |
+
* @param string $role Role name.
|
72 |
+
* @return string|boolean Capability, false if role isn't mapped to any capabilities.
|
73 |
+
*/
|
74 |
+
public function translate_role_to_cap( $role ) {
|
75 |
+
if ( ! isset( $this->capability_translations[ $role ] ) ) {
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
|
79 |
+
return $this->capability_translations[ $role ];
|
80 |
+
}
|
81 |
+
}
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -6,4 +6,20 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Automattic\\Jetpack\\Config' => $vendorDir . '/automattic/jetpack-config/src/class-config.php',
|
10 |
+
'Automattic\\Jetpack\\Connection\\Client' => $vendorDir . '/automattic/jetpack-connection/src/class-client.php',
|
11 |
+
'Automattic\\Jetpack\\Connection\\Manager' => $vendorDir . '/automattic/jetpack-connection/src/class-manager.php',
|
12 |
+
'Automattic\\Jetpack\\Connection\\Manager_Interface' => $vendorDir . '/automattic/jetpack-connection/src/interface-manager.php',
|
13 |
+
'Automattic\\Jetpack\\Connection\\Plugin' => $vendorDir . '/automattic/jetpack-connection/src/class-plugin.php',
|
14 |
+
'Automattic\\Jetpack\\Connection\\Plugin_Storage' => $vendorDir . '/automattic/jetpack-connection/src/class-plugin-storage.php',
|
15 |
+
'Automattic\\Jetpack\\Connection\\REST_Connector' => $vendorDir . '/automattic/jetpack-connection/src/class-rest-connector.php',
|
16 |
+
'Automattic\\Jetpack\\Connection\\Utils' => $vendorDir . '/automattic/jetpack-connection/src/class-utils.php',
|
17 |
+
'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => $vendorDir . '/automattic/jetpack-connection/src/class-xmlrpc-connector.php',
|
18 |
+
'Automattic\\Jetpack\\Constants' => $vendorDir . '/automattic/jetpack-constants/src/class-constants.php',
|
19 |
+
'Automattic\\Jetpack\\Roles' => $vendorDir . '/automattic/jetpack-roles/src/class-roles.php',
|
20 |
+
'Jetpack_IXR_Client' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php',
|
21 |
+
'Jetpack_IXR_ClientMulticall' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php',
|
22 |
+
'Jetpack_Options' => $vendorDir . '/automattic/jetpack-options/legacy/class-jetpack-options.php',
|
23 |
+
'Jetpack_Signature' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-signature.php',
|
24 |
+
'Jetpack_XMLRPC_Server' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php',
|
25 |
);
|
vendor/composer/autoload_classmap_package.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// This file `autoload_classmap_packages.php` was auto generated by automattic/jetpack-autoloader.
|
4 |
+
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
|
10 |
+
'version' => '1.7.0.0',
|
11 |
+
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
|
12 |
+
),
|
13 |
+
'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array(
|
14 |
+
'version' => '1.7.0.0',
|
15 |
+
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php'
|
16 |
+
),
|
17 |
+
'Jetpack_XMLRPC_Server' => array(
|
18 |
+
'version' => '1.13.1.0',
|
19 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php'
|
20 |
+
),
|
21 |
+
'Jetpack_IXR_Client' => array(
|
22 |
+
'version' => '1.13.1.0',
|
23 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php'
|
24 |
+
),
|
25 |
+
'Jetpack_Signature' => array(
|
26 |
+
'version' => '1.13.1.0',
|
27 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-signature.php'
|
28 |
+
),
|
29 |
+
'Jetpack_IXR_ClientMulticall' => array(
|
30 |
+
'version' => '1.13.1.0',
|
31 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php'
|
32 |
+
),
|
33 |
+
'Automattic\\Jetpack\\Connection\\REST_Connector' => array(
|
34 |
+
'version' => '1.13.1.0',
|
35 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-rest-connector.php'
|
36 |
+
),
|
37 |
+
'Automattic\\Jetpack\\Connection\\Plugin_Storage' => array(
|
38 |
+
'version' => '1.13.1.0',
|
39 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-plugin-storage.php'
|
40 |
+
),
|
41 |
+
'Automattic\\Jetpack\\Connection\\Client' => array(
|
42 |
+
'version' => '1.13.1.0',
|
43 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-client.php'
|
44 |
+
),
|
45 |
+
'Automattic\\Jetpack\\Connection\\Utils' => array(
|
46 |
+
'version' => '1.13.1.0',
|
47 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-utils.php'
|
48 |
+
),
|
49 |
+
'Automattic\\Jetpack\\Connection\\Manager_Interface' => array(
|
50 |
+
'version' => '1.13.1.0',
|
51 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/interface-manager.php'
|
52 |
+
),
|
53 |
+
'Automattic\\Jetpack\\Connection\\Plugin' => array(
|
54 |
+
'version' => '1.13.1.0',
|
55 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-plugin.php'
|
56 |
+
),
|
57 |
+
'Automattic\\Jetpack\\Connection\\Manager' => array(
|
58 |
+
'version' => '1.13.1.0',
|
59 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-manager.php'
|
60 |
+
),
|
61 |
+
'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => array(
|
62 |
+
'version' => '1.13.1.0',
|
63 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-xmlrpc-connector.php'
|
64 |
+
),
|
65 |
+
'Automattic\\Jetpack\\Config' => array(
|
66 |
+
'version' => '1.2.0.0',
|
67 |
+
'path' => $vendorDir . '/automattic/jetpack-config/src/class-config.php'
|
68 |
+
),
|
69 |
+
'Jetpack_Options' => array(
|
70 |
+
'version' => '1.5.0.0',
|
71 |
+
'path' => $vendorDir . '/automattic/jetpack-options/legacy/class-jetpack-options.php'
|
72 |
+
),
|
73 |
+
'Automattic\\Jetpack\\Roles' => array(
|
74 |
+
'version' => '1.0.4.0',
|
75 |
+
'path' => $vendorDir . '/automattic/jetpack-roles/src/class-roles.php'
|
76 |
+
),
|
77 |
+
'Automattic\\Jetpack\\Constants' => array(
|
78 |
+
'version' => '1.2.0.0',
|
79 |
+
'path' => $vendorDir . '/automattic/jetpack-constants/src/class-constants.php'
|
80 |
+
),
|
81 |
+
);
|
82 |
+
|
vendor/composer/autoload_files.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_files.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => $vendorDir . '/automattic/jetpack-connection/legacy/load-ixr.php',
|
10 |
+
);
|
vendor/composer/autoload_files_package.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// This file `autoload_files_packages.php` was auto generated by automattic/jetpack-autoloader.
|
4 |
+
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => array(
|
10 |
+
'version' => '1.13.1.0',
|
11 |
+
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/load-ixr.php'
|
12 |
+
),
|
13 |
+
);
|
14 |
+
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Automattic\\Jetpack\\Autoloader\\' => array($vendorDir . '/automattic/jetpack-autoloader/src'),
|
10 |
);
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit473ac6e4f7d62fc392d11fe1d570e4ac
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -50,6 +50,24 @@ class ComposerAutoloaderInit473ac6e4f7d62fc392d11fe1d570e4ac
|
|
50 |
|
51 |
$loader->register(true);
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
return $loader;
|
54 |
}
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit32870116744a4197533c0931b5a6db4e
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit32870116744a4197533c0931b5a6db4e', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit32870116744a4197533c0931b5a6db4e', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit32870116744a4197533c0931b5a6db4e::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
50 |
|
51 |
$loader->register(true);
|
52 |
|
53 |
+
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit32870116744a4197533c0931b5a6db4e::$files;
|
55 |
+
} else {
|
56 |
+
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
+
}
|
58 |
+
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire32870116744a4197533c0931b5a6db4e($fileIdentifier, $file);
|
60 |
+
}
|
61 |
+
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
+
|
66 |
+
function composerRequire32870116744a4197533c0931b5a6db4e($fileIdentifier, $file)
|
67 |
+
{
|
68 |
+
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
+
require $file;
|
70 |
+
|
71 |
+
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
72 |
+
}
|
73 |
+
}
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,11 +4,51 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
public static function getInitializer(ClassLoader $loader)
|
10 |
{
|
11 |
return \Closure::bind(function () use ($loader) {
|
|
|
|
|
|
|
12 |
|
13 |
}, null, ClassLoader::class);
|
14 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit32870116744a4197533c0931b5a6db4e
|
8 |
{
|
9 |
+
public static $files = array (
|
10 |
+
'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php',
|
11 |
+
);
|
12 |
+
|
13 |
+
public static $prefixLengthsPsr4 = array (
|
14 |
+
'A' =>
|
15 |
+
array (
|
16 |
+
'Automattic\\Jetpack\\Autoloader\\' => 30,
|
17 |
+
),
|
18 |
+
);
|
19 |
+
|
20 |
+
public static $prefixDirsPsr4 = array (
|
21 |
+
'Automattic\\Jetpack\\Autoloader\\' =>
|
22 |
+
array (
|
23 |
+
0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src',
|
24 |
+
),
|
25 |
+
);
|
26 |
+
|
27 |
+
public static $classMap = array (
|
28 |
+
'Automattic\\Jetpack\\Config' => __DIR__ . '/..' . '/automattic/jetpack-config/src/class-config.php',
|
29 |
+
'Automattic\\Jetpack\\Connection\\Client' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-client.php',
|
30 |
+
'Automattic\\Jetpack\\Connection\\Manager' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-manager.php',
|
31 |
+
'Automattic\\Jetpack\\Connection\\Manager_Interface' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/interface-manager.php',
|
32 |
+
'Automattic\\Jetpack\\Connection\\Plugin' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-plugin.php',
|
33 |
+
'Automattic\\Jetpack\\Connection\\Plugin_Storage' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-plugin-storage.php',
|
34 |
+
'Automattic\\Jetpack\\Connection\\REST_Connector' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-rest-connector.php',
|
35 |
+
'Automattic\\Jetpack\\Connection\\Utils' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-utils.php',
|
36 |
+
'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-xmlrpc-connector.php',
|
37 |
+
'Automattic\\Jetpack\\Constants' => __DIR__ . '/..' . '/automattic/jetpack-constants/src/class-constants.php',
|
38 |
+
'Automattic\\Jetpack\\Roles' => __DIR__ . '/..' . '/automattic/jetpack-roles/src/class-roles.php',
|
39 |
+
'Jetpack_IXR_Client' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php',
|
40 |
+
'Jetpack_IXR_ClientMulticall' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php',
|
41 |
+
'Jetpack_Options' => __DIR__ . '/..' . '/automattic/jetpack-options/legacy/class-jetpack-options.php',
|
42 |
+
'Jetpack_Signature' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/class-jetpack-signature.php',
|
43 |
+
'Jetpack_XMLRPC_Server' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php',
|
44 |
+
);
|
45 |
+
|
46 |
public static function getInitializer(ClassLoader $loader)
|
47 |
{
|
48 |
return \Closure::bind(function () use ($loader) {
|
49 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit32870116744a4197533c0931b5a6db4e::$prefixLengthsPsr4;
|
50 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit32870116744a4197533c0931b5a6db4e::$prefixDirsPsr4;
|
51 |
+
$loader->classMap = ComposerStaticInit32870116744a4197533c0931b5a6db4e::$classMap;
|
52 |
|
53 |
}, null, ClassLoader::class);
|
54 |
}
|
vendor/composer/installed.json
CHANGED
@@ -1 +1,213 @@
|
|
1 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"name": "automattic/jetpack-autoloader",
|
4 |
+
"version": "v1.7.0",
|
5 |
+
"version_normalized": "1.7.0.0",
|
6 |
+
"source": {
|
7 |
+
"type": "git",
|
8 |
+
"url": "https://github.com/Automattic/jetpack-autoloader.git",
|
9 |
+
"reference": "7c6736eeee0f9fc49fa691fe3e958725efb27ca0"
|
10 |
+
},
|
11 |
+
"dist": {
|
12 |
+
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/7c6736eeee0f9fc49fa691fe3e958725efb27ca0",
|
14 |
+
"reference": "7c6736eeee0f9fc49fa691fe3e958725efb27ca0",
|
15 |
+
"shasum": ""
|
16 |
+
},
|
17 |
+
"require": {
|
18 |
+
"composer-plugin-api": "^1.1"
|
19 |
+
},
|
20 |
+
"require-dev": {
|
21 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
|
22 |
+
},
|
23 |
+
"time": "2020-04-23T02:28:37+00:00",
|
24 |
+
"type": "composer-plugin",
|
25 |
+
"extra": {
|
26 |
+
"class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin"
|
27 |
+
},
|
28 |
+
"installation-source": "dist",
|
29 |
+
"autoload": {
|
30 |
+
"psr-4": {
|
31 |
+
"Automattic\\Jetpack\\Autoloader\\": "src"
|
32 |
+
}
|
33 |
+
},
|
34 |
+
"notification-url": "https://packagist.org/downloads/",
|
35 |
+
"license": [
|
36 |
+
"GPL-2.0-or-later"
|
37 |
+
],
|
38 |
+
"description": "Creates a custom autoloader for a plugin or theme."
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"name": "automattic/jetpack-config",
|
42 |
+
"version": "v1.2.0",
|
43 |
+
"version_normalized": "1.2.0.0",
|
44 |
+
"source": {
|
45 |
+
"type": "git",
|
46 |
+
"url": "https://github.com/Automattic/jetpack-config.git",
|
47 |
+
"reference": "4c6ea210ba8fa60f43f0d9eb725f70450f0ba210"
|
48 |
+
},
|
49 |
+
"dist": {
|
50 |
+
"type": "zip",
|
51 |
+
"url": "https://api.github.com/repos/Automattic/jetpack-config/zipball/4c6ea210ba8fa60f43f0d9eb725f70450f0ba210",
|
52 |
+
"reference": "4c6ea210ba8fa60f43f0d9eb725f70450f0ba210",
|
53 |
+
"shasum": ""
|
54 |
+
},
|
55 |
+
"time": "2020-05-20T20:52:06+00:00",
|
56 |
+
"type": "library",
|
57 |
+
"installation-source": "dist",
|
58 |
+
"autoload": {
|
59 |
+
"classmap": [
|
60 |
+
"src/"
|
61 |
+
]
|
62 |
+
},
|
63 |
+
"notification-url": "https://packagist.org/downloads/",
|
64 |
+
"license": [
|
65 |
+
"GPL-2.0-or-later"
|
66 |
+
],
|
67 |
+
"description": "Jetpack configuration package that initializes other packages and configures Jetpack's functionality. Can be used as a base for all variants of Jetpack package usage."
|
68 |
+
},
|
69 |
+
{
|
70 |
+
"name": "automattic/jetpack-connection",
|
71 |
+
"version": "v1.13.1",
|
72 |
+
"version_normalized": "1.13.1.0",
|
73 |
+
"source": {
|
74 |
+
"type": "git",
|
75 |
+
"url": "https://github.com/Automattic/jetpack-connection.git",
|
76 |
+
"reference": "9039aaa4ddfac4ae87cbddd8cb8dae39b1ebd620"
|
77 |
+
},
|
78 |
+
"dist": {
|
79 |
+
"type": "zip",
|
80 |
+
"url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/9039aaa4ddfac4ae87cbddd8cb8dae39b1ebd620",
|
81 |
+
"reference": "9039aaa4ddfac4ae87cbddd8cb8dae39b1ebd620",
|
82 |
+
"shasum": ""
|
83 |
+
},
|
84 |
+
"require": {
|
85 |
+
"automattic/jetpack-constants": "1.2.0",
|
86 |
+
"automattic/jetpack-options": "1.5.0",
|
87 |
+
"automattic/jetpack-roles": "1.0.4"
|
88 |
+
},
|
89 |
+
"require-dev": {
|
90 |
+
"php-mock/php-mock": "^2.1",
|
91 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
|
92 |
+
},
|
93 |
+
"time": "2020-06-01T09:03:16+00:00",
|
94 |
+
"type": "library",
|
95 |
+
"installation-source": "dist",
|
96 |
+
"autoload": {
|
97 |
+
"files": [
|
98 |
+
"legacy/load-ixr.php"
|
99 |
+
],
|
100 |
+
"classmap": [
|
101 |
+
"legacy",
|
102 |
+
"src/"
|
103 |
+
]
|
104 |
+
},
|
105 |
+
"notification-url": "https://packagist.org/downloads/",
|
106 |
+
"license": [
|
107 |
+
"GPL-2.0-or-later"
|
108 |
+
],
|
109 |
+
"description": "Everything needed to connect to the Jetpack infrastructure"
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"name": "automattic/jetpack-constants",
|
113 |
+
"version": "v1.2.0",
|
114 |
+
"version_normalized": "1.2.0.0",
|
115 |
+
"source": {
|
116 |
+
"type": "git",
|
117 |
+
"url": "https://github.com/Automattic/jetpack-constants.git",
|
118 |
+
"reference": "881618defb04134ddba120e7835af1a474a11edc"
|
119 |
+
},
|
120 |
+
"dist": {
|
121 |
+
"type": "zip",
|
122 |
+
"url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/881618defb04134ddba120e7835af1a474a11edc",
|
123 |
+
"reference": "881618defb04134ddba120e7835af1a474a11edc",
|
124 |
+
"shasum": ""
|
125 |
+
},
|
126 |
+
"require-dev": {
|
127 |
+
"php-mock/php-mock": "^2.1",
|
128 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
|
129 |
+
},
|
130 |
+
"time": "2020-04-15T18:58:53+00:00",
|
131 |
+
"type": "library",
|
132 |
+
"installation-source": "dist",
|
133 |
+
"autoload": {
|
134 |
+
"classmap": [
|
135 |
+
"src/"
|
136 |
+
]
|
137 |
+
},
|
138 |
+
"notification-url": "https://packagist.org/downloads/",
|
139 |
+
"license": [
|
140 |
+
"GPL-2.0-or-later"
|
141 |
+
],
|
142 |
+
"description": "A wrapper for defining constants in a more testable way."
|
143 |
+
},
|
144 |
+
{
|
145 |
+
"name": "automattic/jetpack-options",
|
146 |
+
"version": "v1.5.0",
|
147 |
+
"version_normalized": "1.5.0.0",
|
148 |
+
"source": {
|
149 |
+
"type": "git",
|
150 |
+
"url": "https://github.com/Automattic/jetpack-options.git",
|
151 |
+
"reference": "5c9d947ab62bc786adc36b7071b0e3a7dc7470d1"
|
152 |
+
},
|
153 |
+
"dist": {
|
154 |
+
"type": "zip",
|
155 |
+
"url": "https://api.github.com/repos/Automattic/jetpack-options/zipball/5c9d947ab62bc786adc36b7071b0e3a7dc7470d1",
|
156 |
+
"reference": "5c9d947ab62bc786adc36b7071b0e3a7dc7470d1",
|
157 |
+
"shasum": ""
|
158 |
+
},
|
159 |
+
"require": {
|
160 |
+
"automattic/jetpack-constants": "1.2.0"
|
161 |
+
},
|
162 |
+
"require-dev": {
|
163 |
+
"10up/wp_mock": "0.4.2",
|
164 |
+
"phpunit/phpunit": "7.*.*"
|
165 |
+
},
|
166 |
+
"time": "2020-05-26T13:35:15+00:00",
|
167 |
+
"type": "library",
|
168 |
+
"installation-source": "dist",
|
169 |
+
"autoload": {
|
170 |
+
"classmap": [
|
171 |
+
"legacy"
|
172 |
+
]
|
173 |
+
},
|
174 |
+
"notification-url": "https://packagist.org/downloads/",
|
175 |
+
"license": [
|
176 |
+
"GPL-2.0-or-later"
|
177 |
+
],
|
178 |
+
"description": "A wrapper for wp-options to manage specific Jetpack options."
|
179 |
+
},
|
180 |
+
{
|
181 |
+
"name": "automattic/jetpack-roles",
|
182 |
+
"version": "v1.0.4",
|
183 |
+
"version_normalized": "1.0.4.0",
|
184 |
+
"source": {
|
185 |
+
"type": "git",
|
186 |
+
"url": "https://github.com/Automattic/jetpack-roles.git",
|
187 |
+
"reference": "0cdcff4fdc489c79f20a361c084ec48e326ce483"
|
188 |
+
},
|
189 |
+
"dist": {
|
190 |
+
"type": "zip",
|
191 |
+
"url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/0cdcff4fdc489c79f20a361c084ec48e326ce483",
|
192 |
+
"reference": "0cdcff4fdc489c79f20a361c084ec48e326ce483",
|
193 |
+
"shasum": ""
|
194 |
+
},
|
195 |
+
"require-dev": {
|
196 |
+
"php-mock/php-mock": "^2.1",
|
197 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
|
198 |
+
},
|
199 |
+
"time": "2019-11-08T21:16:05+00:00",
|
200 |
+
"type": "library",
|
201 |
+
"installation-source": "dist",
|
202 |
+
"autoload": {
|
203 |
+
"classmap": [
|
204 |
+
"src/"
|
205 |
+
]
|
206 |
+
},
|
207 |
+
"notification-url": "https://packagist.org/downloads/",
|
208 |
+
"license": [
|
209 |
+
"GPL-2.0-or-later"
|
210 |
+
],
|
211 |
+
"description": "Utilities, related with user roles and capabilities."
|
212 |
+
}
|
213 |
+
]
|
woocommerce-payments.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* WC requires at least: 4.0
|
11 |
* WC tested up to: 4.1
|
12 |
* Requires WP: 5.3
|
13 |
-
* Version: 1.0
|
14 |
*
|
15 |
* @package WooCommerce\Payments
|
16 |
*/
|
@@ -23,6 +23,25 @@ define( 'WCPAY_PLUGIN_FILE', __FILE__ );
|
|
23 |
define( 'WCPAY_ABSPATH', dirname( WCPAY_PLUGIN_FILE ) . '/' );
|
24 |
define( 'WCPAY_MIN_WC_ADMIN_VERSION', '0.23.2' );
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* Initialize the extension. Note that this gets called on the "plugins_loaded" filter,
|
28 |
* so WooCommerce classes are guaranteed to exist at this point (if WooCommerce is enabled).
|
10 |
* WC requires at least: 4.0
|
11 |
* WC tested up to: 4.1
|
12 |
* Requires WP: 5.3
|
13 |
+
* Version: 1.1.0
|
14 |
*
|
15 |
* @package WooCommerce\Payments
|
16 |
*/
|
23 |
define( 'WCPAY_ABSPATH', dirname( WCPAY_PLUGIN_FILE ) . '/' );
|
24 |
define( 'WCPAY_MIN_WC_ADMIN_VERSION', '0.23.2' );
|
25 |
|
26 |
+
require_once WCPAY_ABSPATH . 'vendor/autoload_packages.php';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Initialize the Jetpack connection functionality.
|
30 |
+
*/
|
31 |
+
function wcpay_jetpack_init() {
|
32 |
+
$jetpack_config = new Automattic\Jetpack\Config();
|
33 |
+
$jetpack_config->ensure(
|
34 |
+
'connection',
|
35 |
+
[
|
36 |
+
'slug' => 'woocommerce-payments',
|
37 |
+
'name' => __( 'WooCommerce Payments', 'woocommerce-payments' ),
|
38 |
+
]
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
// Jetpack-config will initialize the modules on "plugins_loaded" with priority 2, so this code needs to be run before that.
|
43 |
+
add_action( 'plugins_loaded', 'wcpay_jetpack_init', 1 );
|
44 |
+
|
45 |
/**
|
46 |
* Initialize the extension. Note that this gets called on the "plugins_loaded" filter,
|
47 |
* so WooCommerce classes are guaranteed to exist at this point (if WooCommerce is enabled).
|