Keine Beschreibung

format-library.js 50KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667
  1. this["wp"] = this["wp"] || {}; this["wp"]["formatLibrary"] =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = "t1DA");
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ "1Yn1":
  90. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91. "use strict";
  92. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  93. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  94. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  95. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  96. /**
  97. * WordPress dependencies
  98. */
  99. const code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  100. viewBox: "0 0 24 24",
  101. xmlns: "http://www.w3.org/2000/svg"
  102. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  103. d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"
  104. }));
  105. /* harmony default export */ __webpack_exports__["a"] = (code);
  106. /***/ }),
  107. /***/ "1ZqX":
  108. /***/ (function(module, exports) {
  109. (function() { module.exports = window["wp"]["data"]; }());
  110. /***/ }),
  111. /***/ "Bpkj":
  112. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  113. "use strict";
  114. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  115. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  116. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  117. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  118. /**
  119. * WordPress dependencies
  120. */
  121. const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  122. xmlns: "http://www.w3.org/2000/svg",
  123. viewBox: "0 0 24 24"
  124. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  125. d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"
  126. }));
  127. /* harmony default export */ __webpack_exports__["a"] = (link);
  128. /***/ }),
  129. /***/ "Crq9":
  130. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  131. "use strict";
  132. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  133. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  134. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  135. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  136. /**
  137. * WordPress dependencies
  138. */
  139. const formatStrikethrough = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  140. xmlns: "http://www.w3.org/2000/svg",
  141. viewBox: "0 0 24 24"
  142. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  143. d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"
  144. }));
  145. /* harmony default export */ __webpack_exports__["a"] = (formatStrikethrough);
  146. /***/ }),
  147. /***/ "GRId":
  148. /***/ (function(module, exports) {
  149. (function() { module.exports = window["wp"]["element"]; }());
  150. /***/ }),
  151. /***/ "Mmq9":
  152. /***/ (function(module, exports) {
  153. (function() { module.exports = window["wp"]["url"]; }());
  154. /***/ }),
  155. /***/ "Mp0b":
  156. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  157. "use strict";
  158. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  159. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  160. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  161. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  162. /**
  163. * WordPress dependencies
  164. */
  165. const linkOff = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  166. xmlns: "http://www.w3.org/2000/svg",
  167. viewBox: "0 0 24 24"
  168. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  169. d: "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"
  170. }));
  171. /* harmony default export */ __webpack_exports__["a"] = (linkOff);
  172. /***/ }),
  173. /***/ "Tqx9":
  174. /***/ (function(module, exports) {
  175. (function() { module.exports = window["wp"]["primitives"]; }());
  176. /***/ }),
  177. /***/ "YLtl":
  178. /***/ (function(module, exports) {
  179. (function() { module.exports = window["lodash"]; }());
  180. /***/ }),
  181. /***/ "axFQ":
  182. /***/ (function(module, exports) {
  183. (function() { module.exports = window["wp"]["blockEditor"]; }());
  184. /***/ }),
  185. /***/ "btIw":
  186. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  187. "use strict";
  188. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  189. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  190. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  191. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  192. /**
  193. * WordPress dependencies
  194. */
  195. const keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  196. xmlns: "http://www.w3.org/2000/svg",
  197. viewBox: "-2 -2 24 24"
  198. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  199. d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"
  200. }));
  201. /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
  202. /***/ }),
  203. /***/ "gdqT":
  204. /***/ (function(module, exports) {
  205. (function() { module.exports = window["wp"]["a11y"]; }());
  206. /***/ }),
  207. /***/ "iClF":
  208. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  209. "use strict";
  210. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  211. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  212. /**
  213. * WordPress dependencies
  214. */
  215. /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
  216. /**
  217. * Return an SVG icon.
  218. *
  219. * @param {IconProps} props icon is the SVG component to render
  220. * size is a number specifiying the icon size in pixels
  221. * Other props will be passed to wrapped SVG component
  222. *
  223. * @return {JSX.Element} Icon component
  224. */
  225. function Icon({
  226. icon,
  227. size = 24,
  228. ...props
  229. }) {
  230. return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, {
  231. width: size,
  232. height: size,
  233. ...props
  234. });
  235. }
  236. /* harmony default export */ __webpack_exports__["a"] = (Icon);
  237. /***/ }),
  238. /***/ "l3Sj":
  239. /***/ (function(module, exports) {
  240. (function() { module.exports = window["wp"]["i18n"]; }());
  241. /***/ }),
  242. /***/ "oMoS":
  243. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  244. "use strict";
  245. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  246. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  247. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  248. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  249. /**
  250. * WordPress dependencies
  251. */
  252. const button = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  253. viewBox: "0 0 24 24",
  254. xmlns: "http://www.w3.org/2000/svg"
  255. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  256. d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"
  257. }));
  258. /* harmony default export */ __webpack_exports__["a"] = (button);
  259. /***/ }),
  260. /***/ "qRz9":
  261. /***/ (function(module, exports) {
  262. (function() { module.exports = window["wp"]["richText"]; }());
  263. /***/ }),
  264. /***/ "rmEH":
  265. /***/ (function(module, exports) {
  266. (function() { module.exports = window["wp"]["htmlEntities"]; }());
  267. /***/ }),
  268. /***/ "t1DA":
  269. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  270. "use strict";
  271. // ESM COMPAT FLAG
  272. __webpack_require__.r(__webpack_exports__);
  273. // EXTERNAL MODULE: external ["wp","richText"]
  274. var external_wp_richText_ = __webpack_require__("qRz9");
  275. // EXTERNAL MODULE: external ["wp","element"]
  276. var external_wp_element_ = __webpack_require__("GRId");
  277. // EXTERNAL MODULE: external ["wp","i18n"]
  278. var external_wp_i18n_ = __webpack_require__("l3Sj");
  279. // EXTERNAL MODULE: external ["wp","blockEditor"]
  280. var external_wp_blockEditor_ = __webpack_require__("axFQ");
  281. // EXTERNAL MODULE: external ["wp","primitives"]
  282. var external_wp_primitives_ = __webpack_require__("Tqx9");
  283. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-bold.js
  284. /**
  285. * WordPress dependencies
  286. */
  287. const formatBold = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  288. xmlns: "http://www.w3.org/2000/svg",
  289. viewBox: "0 0 24 24"
  290. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  291. d: "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"
  292. }));
  293. /* harmony default export */ var format_bold = (formatBold);
  294. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/bold/index.js
  295. /**
  296. * WordPress dependencies
  297. */
  298. const bold_name = 'core/bold';
  299. const title = Object(external_wp_i18n_["__"])('Bold');
  300. const bold = {
  301. name: bold_name,
  302. title,
  303. tagName: 'strong',
  304. className: null,
  305. edit({
  306. isActive,
  307. value,
  308. onChange,
  309. onFocus
  310. }) {
  311. function onToggle() {
  312. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  313. type: bold_name
  314. }));
  315. }
  316. function onClick() {
  317. onToggle();
  318. onFocus();
  319. }
  320. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  321. type: "primary",
  322. character: "b",
  323. onUse: onToggle
  324. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  325. name: "bold",
  326. icon: format_bold,
  327. title: title,
  328. onClick: onClick,
  329. isActive: isActive,
  330. shortcutType: "primary",
  331. shortcutCharacter: "b"
  332. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], {
  333. inputType: "formatBold",
  334. onInput: onToggle
  335. }));
  336. }
  337. };
  338. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
  339. var code = __webpack_require__("1Yn1");
  340. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/code/index.js
  341. /**
  342. * WordPress dependencies
  343. */
  344. const code_name = 'core/code';
  345. const code_title = Object(external_wp_i18n_["__"])('Inline code');
  346. const code_code = {
  347. name: code_name,
  348. title: code_title,
  349. tagName: 'code',
  350. className: null,
  351. __unstableInputRule(value) {
  352. const BACKTICK = '`';
  353. const {
  354. start,
  355. text
  356. } = value;
  357. const characterBefore = text.slice(start - 1, start); // Quick check the text for the necessary character.
  358. if (characterBefore !== BACKTICK) {
  359. return value;
  360. }
  361. const textBefore = text.slice(0, start - 1);
  362. const indexBefore = textBefore.lastIndexOf(BACKTICK);
  363. if (indexBefore === -1) {
  364. return value;
  365. }
  366. const startIndex = indexBefore;
  367. const endIndex = start - 2;
  368. if (startIndex === endIndex) {
  369. return value;
  370. }
  371. value = Object(external_wp_richText_["remove"])(value, startIndex, startIndex + 1);
  372. value = Object(external_wp_richText_["remove"])(value, endIndex, endIndex + 1);
  373. value = Object(external_wp_richText_["applyFormat"])(value, {
  374. type: code_name
  375. }, startIndex, endIndex);
  376. return value;
  377. },
  378. edit({
  379. value,
  380. onChange,
  381. onFocus,
  382. isActive
  383. }) {
  384. function onClick() {
  385. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  386. type: code_name
  387. }));
  388. onFocus();
  389. }
  390. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  391. icon: code["a" /* default */],
  392. title: code_title,
  393. onClick: onClick,
  394. isActive: isActive
  395. });
  396. }
  397. };
  398. // EXTERNAL MODULE: external ["wp","components"]
  399. var external_wp_components_ = __webpack_require__("tI+e");
  400. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
  401. var keyboard_return = __webpack_require__("btIw");
  402. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/image/index.js
  403. /**
  404. * WordPress dependencies
  405. */
  406. const ALLOWED_MEDIA_TYPES = ['image'];
  407. const image_name = 'core/image';
  408. const image_title = Object(external_wp_i18n_["__"])('Inline image');
  409. const image_image = {
  410. name: image_name,
  411. title: image_title,
  412. keywords: [Object(external_wp_i18n_["__"])('photo'), Object(external_wp_i18n_["__"])('media')],
  413. object: true,
  414. tagName: 'img',
  415. className: null,
  416. attributes: {
  417. className: 'class',
  418. style: 'style',
  419. url: 'src',
  420. alt: 'alt'
  421. },
  422. edit: Edit
  423. };
  424. function InlineUI({
  425. value,
  426. onChange,
  427. activeObjectAttributes,
  428. contentRef
  429. }) {
  430. const {
  431. style
  432. } = activeObjectAttributes;
  433. const [width, setWidth] = Object(external_wp_element_["useState"])(style === null || style === void 0 ? void 0 : style.replace(/\D/g, ''));
  434. const anchorRef = Object(external_wp_richText_["useAnchorRef"])({
  435. ref: contentRef,
  436. value,
  437. settings: image_image
  438. });
  439. return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
  440. position: "bottom center",
  441. focusOnMount: false,
  442. anchorRef: anchorRef,
  443. className: "block-editor-format-toolbar__image-popover"
  444. }, Object(external_wp_element_["createElement"])("form", {
  445. className: "block-editor-format-toolbar__image-container-content",
  446. onSubmit: event => {
  447. const newReplacements = value.replacements.slice();
  448. newReplacements[value.start] = {
  449. type: image_name,
  450. attributes: { ...activeObjectAttributes,
  451. style: `width: ${width}px;`
  452. }
  453. };
  454. onChange({ ...value,
  455. replacements: newReplacements
  456. });
  457. event.preventDefault();
  458. }
  459. }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  460. className: "block-editor-format-toolbar__image-container-value",
  461. type: "number",
  462. label: Object(external_wp_i18n_["__"])('Width'),
  463. value: width,
  464. min: 1,
  465. onChange: newWidth => setWidth(newWidth)
  466. }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  467. icon: keyboard_return["a" /* default */],
  468. label: Object(external_wp_i18n_["__"])('Apply'),
  469. type: "submit"
  470. })));
  471. }
  472. function Edit({
  473. value,
  474. onChange,
  475. onFocus,
  476. isObjectActive,
  477. activeObjectAttributes,
  478. contentRef
  479. }) {
  480. const [isModalOpen, setIsModalOpen] = Object(external_wp_element_["useState"])(false);
  481. function openModal() {
  482. setIsModalOpen(true);
  483. }
  484. function closeModal() {
  485. setIsModalOpen(false);
  486. }
  487. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  488. icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  489. xmlns: "http://www.w3.org/2000/svg",
  490. viewBox: "0 0 24 24"
  491. }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  492. d: "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"
  493. })),
  494. title: image_title,
  495. onClick: openModal,
  496. isActive: isObjectActive
  497. }), isModalOpen && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], {
  498. allowedTypes: ALLOWED_MEDIA_TYPES,
  499. onSelect: ({
  500. id,
  501. url,
  502. alt,
  503. width: imgWidth
  504. }) => {
  505. closeModal();
  506. onChange(Object(external_wp_richText_["insertObject"])(value, {
  507. type: image_name,
  508. attributes: {
  509. className: `wp-image-${id}`,
  510. style: `width: ${Math.min(imgWidth, 150)}px;`,
  511. url,
  512. alt
  513. }
  514. }));
  515. onFocus();
  516. },
  517. onClose: closeModal,
  518. render: ({
  519. open
  520. }) => {
  521. open();
  522. return null;
  523. }
  524. }), isObjectActive && Object(external_wp_element_["createElement"])(InlineUI, {
  525. value: value,
  526. onChange: onChange,
  527. activeObjectAttributes: activeObjectAttributes,
  528. contentRef: contentRef
  529. }));
  530. }
  531. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-italic.js
  532. /**
  533. * WordPress dependencies
  534. */
  535. const formatItalic = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  536. xmlns: "http://www.w3.org/2000/svg",
  537. viewBox: "0 0 24 24"
  538. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  539. d: "M12.5 5L10 19h1.9l2.5-14z"
  540. }));
  541. /* harmony default export */ var format_italic = (formatItalic);
  542. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/italic/index.js
  543. /**
  544. * WordPress dependencies
  545. */
  546. const italic_name = 'core/italic';
  547. const italic_title = Object(external_wp_i18n_["__"])('Italic');
  548. const italic = {
  549. name: italic_name,
  550. title: italic_title,
  551. tagName: 'em',
  552. className: null,
  553. edit({
  554. isActive,
  555. value,
  556. onChange,
  557. onFocus
  558. }) {
  559. function onToggle() {
  560. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  561. type: italic_name
  562. }));
  563. }
  564. function onClick() {
  565. onToggle();
  566. onFocus();
  567. }
  568. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  569. type: "primary",
  570. character: "i",
  571. onUse: onToggle
  572. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  573. name: "italic",
  574. icon: format_italic,
  575. title: italic_title,
  576. onClick: onClick,
  577. isActive: isActive,
  578. shortcutType: "primary",
  579. shortcutCharacter: "i"
  580. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], {
  581. inputType: "formatItalic",
  582. onInput: onToggle
  583. }));
  584. }
  585. };
  586. // EXTERNAL MODULE: external ["wp","url"]
  587. var external_wp_url_ = __webpack_require__("Mmq9");
  588. // EXTERNAL MODULE: external ["wp","htmlEntities"]
  589. var external_wp_htmlEntities_ = __webpack_require__("rmEH");
  590. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js
  591. var link_off = __webpack_require__("Mp0b");
  592. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
  593. var library_link = __webpack_require__("Bpkj");
  594. // EXTERNAL MODULE: external ["wp","a11y"]
  595. var external_wp_a11y_ = __webpack_require__("gdqT");
  596. // EXTERNAL MODULE: external "lodash"
  597. var external_lodash_ = __webpack_require__("YLtl");
  598. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/utils.js
  599. /**
  600. * External dependencies
  601. */
  602. /**
  603. * WordPress dependencies
  604. */
  605. /**
  606. * Check for issues with the provided href.
  607. *
  608. * @param {string} href The href.
  609. *
  610. * @return {boolean} Is the href invalid?
  611. */
  612. function isValidHref(href) {
  613. if (!href) {
  614. return false;
  615. }
  616. const trimmedHref = href.trim();
  617. if (!trimmedHref) {
  618. return false;
  619. } // Does the href start with something that looks like a URL protocol?
  620. if (/^\S+:/.test(trimmedHref)) {
  621. const protocol = Object(external_wp_url_["getProtocol"])(trimmedHref);
  622. if (!Object(external_wp_url_["isValidProtocol"])(protocol)) {
  623. return false;
  624. } // Add some extra checks for http(s) URIs, since these are the most common use-case.
  625. // This ensures URIs with an http protocol have exactly two forward slashes following the protocol.
  626. if (Object(external_lodash_["startsWith"])(protocol, 'http') && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
  627. return false;
  628. }
  629. const authority = Object(external_wp_url_["getAuthority"])(trimmedHref);
  630. if (!Object(external_wp_url_["isValidAuthority"])(authority)) {
  631. return false;
  632. }
  633. const path = Object(external_wp_url_["getPath"])(trimmedHref);
  634. if (path && !Object(external_wp_url_["isValidPath"])(path)) {
  635. return false;
  636. }
  637. const queryString = Object(external_wp_url_["getQueryString"])(trimmedHref);
  638. if (queryString && !Object(external_wp_url_["isValidQueryString"])(queryString)) {
  639. return false;
  640. }
  641. const fragment = Object(external_wp_url_["getFragment"])(trimmedHref);
  642. if (fragment && !Object(external_wp_url_["isValidFragment"])(fragment)) {
  643. return false;
  644. }
  645. } // Validate anchor links.
  646. if (Object(external_lodash_["startsWith"])(trimmedHref, '#') && !Object(external_wp_url_["isValidFragment"])(trimmedHref)) {
  647. return false;
  648. }
  649. return true;
  650. }
  651. /**
  652. * Generates the format object that will be applied to the link text.
  653. *
  654. * @param {Object} options
  655. * @param {string} options.url The href of the link.
  656. * @param {string} options.type The type of the link.
  657. * @param {string} options.id The ID of the link.
  658. * @param {boolean} options.opensInNewWindow Whether this link will open in a new window.
  659. *
  660. * @return {Object} The final format object.
  661. */
  662. function createLinkFormat({
  663. url,
  664. type,
  665. id,
  666. opensInNewWindow
  667. }) {
  668. const format = {
  669. type: 'core/link',
  670. attributes: {
  671. url
  672. }
  673. };
  674. if (type) format.attributes.type = type;
  675. if (id) format.attributes.id = id;
  676. if (opensInNewWindow) {
  677. format.attributes.target = '_blank';
  678. format.attributes.rel = 'noreferrer noopener';
  679. }
  680. return format;
  681. }
  682. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/inline.js
  683. /**
  684. * WordPress dependencies
  685. */
  686. /**
  687. * Internal dependencies
  688. */
  689. function InlineLinkUI({
  690. isActive,
  691. activeAttributes,
  692. addingLink,
  693. value,
  694. onChange,
  695. speak,
  696. stopAddingLink,
  697. contentRef
  698. }) {
  699. /**
  700. * Pending settings to be applied to the next link. When inserting a new
  701. * link, toggle values cannot be applied immediately, because there is not
  702. * yet a link for them to apply to. Thus, they are maintained in a state
  703. * value until the time that the link can be inserted or edited.
  704. *
  705. * @type {[Object|undefined,Function]}
  706. */
  707. const [nextLinkValue, setNextLinkValue] = Object(external_wp_element_["useState"])();
  708. const linkValue = {
  709. url: activeAttributes.url,
  710. type: activeAttributes.type,
  711. id: activeAttributes.id,
  712. opensInNewTab: activeAttributes.target === '_blank',
  713. ...nextLinkValue
  714. };
  715. function onChangeLink(nextValue) {
  716. // Merge with values from state, both for the purpose of assigning the
  717. // next state value, and for use in constructing the new link format if
  718. // the link is ready to be applied.
  719. nextValue = { ...nextLinkValue,
  720. ...nextValue
  721. }; // LinkControl calls `onChange` immediately upon the toggling a setting.
  722. const didToggleSetting = linkValue.opensInNewTab !== nextValue.opensInNewTab && linkValue.url === nextValue.url; // If change handler was called as a result of a settings change during
  723. // link insertion, it must be held in state until the link is ready to
  724. // be applied.
  725. const didToggleSettingForNewLink = didToggleSetting && nextValue.url === undefined; // If link will be assigned, the state value can be considered flushed.
  726. // Otherwise, persist the pending changes.
  727. setNextLinkValue(didToggleSettingForNewLink ? nextValue : undefined);
  728. if (didToggleSettingForNewLink) {
  729. return;
  730. }
  731. const newUrl = Object(external_wp_url_["prependHTTP"])(nextValue.url);
  732. const format = createLinkFormat({
  733. url: newUrl,
  734. type: nextValue.type,
  735. id: nextValue.id !== undefined && nextValue.id !== null ? String(nextValue.id) : undefined,
  736. opensInNewWindow: nextValue.opensInNewTab
  737. });
  738. if (Object(external_wp_richText_["isCollapsed"])(value) && !isActive) {
  739. const newText = nextValue.title || newUrl;
  740. const toInsert = Object(external_wp_richText_["applyFormat"])(Object(external_wp_richText_["create"])({
  741. text: newText
  742. }), format, 0, newText.length);
  743. onChange(Object(external_wp_richText_["insert"])(value, toInsert));
  744. } else {
  745. const newValue = Object(external_wp_richText_["applyFormat"])(value, format);
  746. newValue.start = newValue.end;
  747. newValue.activeFormats = [];
  748. onChange(newValue);
  749. } // Focus should only be shifted back to the formatted segment when the
  750. // URL is submitted.
  751. if (!didToggleSetting) {
  752. stopAddingLink();
  753. }
  754. if (!isValidHref(newUrl)) {
  755. speak(Object(external_wp_i18n_["__"])('Warning: the link has been inserted but may have errors. Please test it.'), 'assertive');
  756. } else if (isActive) {
  757. speak(Object(external_wp_i18n_["__"])('Link edited.'), 'assertive');
  758. } else {
  759. speak(Object(external_wp_i18n_["__"])('Link inserted.'), 'assertive');
  760. }
  761. }
  762. const anchorRef = Object(external_wp_richText_["useAnchorRef"])({
  763. ref: contentRef,
  764. value,
  765. settings: link_link
  766. }); // The focusOnMount prop shouldn't evolve during render of a Popover
  767. // otherwise it causes a render of the content.
  768. const focusOnMount = Object(external_wp_element_["useRef"])(addingLink ? 'firstElement' : false);
  769. return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
  770. anchorRef: anchorRef,
  771. focusOnMount: focusOnMount.current,
  772. onClose: stopAddingLink,
  773. position: "bottom center"
  774. }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"], {
  775. value: linkValue,
  776. onChange: onChangeLink,
  777. forceIsEditingLink: addingLink
  778. }));
  779. }
  780. /* harmony default export */ var inline = (Object(external_wp_components_["withSpokenMessages"])(InlineLinkUI));
  781. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/index.js
  782. /**
  783. * WordPress dependencies
  784. */
  785. /**
  786. * Internal dependencies
  787. */
  788. const link_name = 'core/link';
  789. const link_title = Object(external_wp_i18n_["__"])('Link');
  790. function link_Edit({
  791. isActive,
  792. activeAttributes,
  793. value,
  794. onChange,
  795. onFocus,
  796. contentRef
  797. }) {
  798. const [addingLink, setAddingLink] = Object(external_wp_element_["useState"])(false);
  799. function addLink() {
  800. const text = Object(external_wp_richText_["getTextContent"])(Object(external_wp_richText_["slice"])(value));
  801. if (text && Object(external_wp_url_["isURL"])(text)) {
  802. onChange(Object(external_wp_richText_["applyFormat"])(value, {
  803. type: link_name,
  804. attributes: {
  805. url: text
  806. }
  807. }));
  808. } else if (text && Object(external_wp_url_["isEmail"])(text)) {
  809. onChange(Object(external_wp_richText_["applyFormat"])(value, {
  810. type: link_name,
  811. attributes: {
  812. url: `mailto:${text}`
  813. }
  814. }));
  815. } else {
  816. setAddingLink(true);
  817. }
  818. }
  819. function stopAddingLink() {
  820. setAddingLink(false);
  821. onFocus();
  822. }
  823. function onRemoveFormat() {
  824. onChange(Object(external_wp_richText_["removeFormat"])(value, link_name));
  825. Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Link removed.'), 'assertive');
  826. }
  827. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  828. type: "primary",
  829. character: "k",
  830. onUse: addLink
  831. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  832. type: "primaryShift",
  833. character: "k",
  834. onUse: onRemoveFormat
  835. }), isActive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  836. name: "link",
  837. icon: link_off["a" /* default */],
  838. title: Object(external_wp_i18n_["__"])('Unlink'),
  839. onClick: onRemoveFormat,
  840. isActive: isActive,
  841. shortcutType: "primaryShift",
  842. shortcutCharacter: "k"
  843. }), !isActive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  844. name: "link",
  845. icon: library_link["a" /* default */],
  846. title: link_title,
  847. onClick: addLink,
  848. isActive: isActive,
  849. shortcutType: "primary",
  850. shortcutCharacter: "k"
  851. }), (addingLink || isActive) && Object(external_wp_element_["createElement"])(inline, {
  852. addingLink: addingLink,
  853. stopAddingLink: stopAddingLink,
  854. isActive: isActive,
  855. activeAttributes: activeAttributes,
  856. value: value,
  857. onChange: onChange,
  858. contentRef: contentRef
  859. }));
  860. }
  861. const link_link = {
  862. name: link_name,
  863. title: link_title,
  864. tagName: 'a',
  865. className: null,
  866. attributes: {
  867. url: 'href',
  868. type: 'data-type',
  869. id: 'data-id',
  870. target: 'target'
  871. },
  872. __unstablePasteRule(value, {
  873. html,
  874. plainText
  875. }) {
  876. if (Object(external_wp_richText_["isCollapsed"])(value)) {
  877. return value;
  878. }
  879. const pastedText = (html || plainText).replace(/<[^>]+>/g, '').trim(); // A URL was pasted, turn the selection into a link
  880. if (!Object(external_wp_url_["isURL"])(pastedText)) {
  881. return value;
  882. } // Allows us to ask for this information when we get a report.
  883. window.console.log('Created link:\n\n', pastedText);
  884. return Object(external_wp_richText_["applyFormat"])(value, {
  885. type: link_name,
  886. attributes: {
  887. url: Object(external_wp_htmlEntities_["decodeEntities"])(pastedText)
  888. }
  889. });
  890. },
  891. edit: link_Edit
  892. };
  893. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/format-strikethrough.js
  894. var format_strikethrough = __webpack_require__("Crq9");
  895. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/strikethrough/index.js
  896. /**
  897. * WordPress dependencies
  898. */
  899. const strikethrough_name = 'core/strikethrough';
  900. const strikethrough_title = Object(external_wp_i18n_["__"])('Strikethrough');
  901. const strikethrough = {
  902. name: strikethrough_name,
  903. title: strikethrough_title,
  904. tagName: 's',
  905. className: null,
  906. edit({
  907. isActive,
  908. value,
  909. onChange,
  910. onFocus
  911. }) {
  912. function onClick() {
  913. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  914. type: strikethrough_name
  915. }));
  916. onFocus();
  917. }
  918. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  919. icon: format_strikethrough["a" /* default */],
  920. title: strikethrough_title,
  921. onClick: onClick,
  922. isActive: isActive
  923. });
  924. }
  925. };
  926. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/underline/index.js
  927. /**
  928. * WordPress dependencies
  929. */
  930. const underline_name = 'core/underline';
  931. const underline = {
  932. name: underline_name,
  933. title: Object(external_wp_i18n_["__"])('Underline'),
  934. tagName: 'span',
  935. className: null,
  936. attributes: {
  937. style: 'style'
  938. },
  939. edit({
  940. value,
  941. onChange
  942. }) {
  943. const onToggle = () => {
  944. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  945. type: underline_name,
  946. attributes: {
  947. style: 'text-decoration: underline;'
  948. }
  949. }));
  950. };
  951. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
  952. type: "primary",
  953. character: "u",
  954. onUse: onToggle
  955. }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], {
  956. inputType: "formatUnderline",
  957. onInput: onToggle
  958. }));
  959. }
  960. };
  961. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
  962. var icon = __webpack_require__("iClF");
  963. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/text-color.js
  964. var text_color = __webpack_require__("uGfJ");
  965. // EXTERNAL MODULE: external ["wp","data"]
  966. var external_wp_data_ = __webpack_require__("1ZqX");
  967. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js
  968. /**
  969. * External dependencies
  970. */
  971. /**
  972. * WordPress dependencies
  973. */
  974. /**
  975. * Internal dependencies
  976. */
  977. function getActiveColor(formatName, formatValue, colors) {
  978. const activeColorFormat = Object(external_wp_richText_["getActiveFormat"])(formatValue, formatName);
  979. if (!activeColorFormat) {
  980. return;
  981. }
  982. const styleColor = activeColorFormat.attributes.style;
  983. if (styleColor) {
  984. return styleColor.replace(new RegExp(`^color:\\s*`), '');
  985. }
  986. const currentClass = activeColorFormat.attributes.class;
  987. if (currentClass) {
  988. const colorSlug = currentClass.replace(/.*has-([^\s]*)-color.*/, '$1');
  989. return Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, colorSlug).color;
  990. }
  991. }
  992. const ColorPicker = ({
  993. name,
  994. value,
  995. onChange
  996. }) => {
  997. const colors = Object(external_wp_data_["useSelect"])(select => {
  998. const {
  999. getSettings
  1000. } = select(external_wp_blockEditor_["store"]);
  1001. return Object(external_lodash_["get"])(getSettings(), ['colors'], []);
  1002. });
  1003. const onColorChange = Object(external_wp_element_["useCallback"])(color => {
  1004. if (color) {
  1005. const colorObject = Object(external_wp_blockEditor_["getColorObjectByColorValue"])(colors, color);
  1006. onChange(Object(external_wp_richText_["applyFormat"])(value, {
  1007. type: name,
  1008. attributes: colorObject ? {
  1009. class: Object(external_wp_blockEditor_["getColorClassName"])('color', colorObject.slug)
  1010. } : {
  1011. style: `color:${color}`
  1012. }
  1013. }));
  1014. } else {
  1015. onChange(Object(external_wp_richText_["removeFormat"])(value, name));
  1016. }
  1017. }, [colors, onChange]);
  1018. const activeColor = Object(external_wp_element_["useMemo"])(() => getActiveColor(name, value, colors), [name, value, colors]);
  1019. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ColorPalette"], {
  1020. value: activeColor,
  1021. onChange: onColorChange
  1022. });
  1023. };
  1024. function InlineColorUI({
  1025. name,
  1026. value,
  1027. onChange,
  1028. onClose,
  1029. contentRef
  1030. }) {
  1031. const anchorRef = Object(external_wp_richText_["useAnchorRef"])({
  1032. ref: contentRef,
  1033. value,
  1034. settings: textColor
  1035. });
  1036. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["URLPopover"], {
  1037. value: value,
  1038. onClose: onClose,
  1039. className: "components-inline-color-popover",
  1040. anchorRef: anchorRef
  1041. }, Object(external_wp_element_["createElement"])(ColorPicker, {
  1042. name: name,
  1043. value: value,
  1044. onChange: onChange
  1045. }));
  1046. }
  1047. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/index.js
  1048. /**
  1049. * External dependencies
  1050. */
  1051. /**
  1052. * WordPress dependencies
  1053. */
  1054. /**
  1055. * Internal dependencies
  1056. */
  1057. const text_color_name = 'core/text-color';
  1058. const text_color_title = Object(external_wp_i18n_["__"])('Text color');
  1059. const EMPTY_ARRAY = [];
  1060. function TextColorEdit({
  1061. value,
  1062. onChange,
  1063. isActive,
  1064. activeAttributes,
  1065. contentRef
  1066. }) {
  1067. const allowCustomControl = Object(external_wp_blockEditor_["useSetting"])('color.custom');
  1068. const colors = Object(external_wp_blockEditor_["useSetting"])('color.palette') || EMPTY_ARRAY;
  1069. const [isAddingColor, setIsAddingColor] = Object(external_wp_element_["useState"])(false);
  1070. const enableIsAddingColor = Object(external_wp_element_["useCallback"])(() => setIsAddingColor(true), [setIsAddingColor]);
  1071. const disableIsAddingColor = Object(external_wp_element_["useCallback"])(() => setIsAddingColor(false), [setIsAddingColor]);
  1072. const colorIndicatorStyle = Object(external_wp_element_["useMemo"])(() => {
  1073. const activeColor = getActiveColor(text_color_name, value, colors);
  1074. if (!activeColor) {
  1075. return undefined;
  1076. }
  1077. return {
  1078. backgroundColor: activeColor
  1079. };
  1080. }, [value, colors]);
  1081. const hasColorsToChoose = !Object(external_lodash_["isEmpty"])(colors) || !allowCustomControl;
  1082. if (!hasColorsToChoose && !isActive) {
  1083. return null;
  1084. }
  1085. return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  1086. key: isActive ? 'text-color' : 'text-color-not-active',
  1087. className: "format-library-text-color-button",
  1088. name: isActive ? 'text-color' : undefined,
  1089. icon: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(icon["a" /* default */], {
  1090. icon: text_color["a" /* default */]
  1091. }), isActive && Object(external_wp_element_["createElement"])("span", {
  1092. className: "format-library-text-color-button__indicator",
  1093. style: colorIndicatorStyle
  1094. })),
  1095. title: text_color_title // If has no colors to choose but a color is active remove the color onClick
  1096. ,
  1097. onClick: hasColorsToChoose ? enableIsAddingColor : () => onChange(Object(external_wp_richText_["removeFormat"])(value, text_color_name))
  1098. }), isAddingColor && Object(external_wp_element_["createElement"])(InlineColorUI, {
  1099. name: text_color_name,
  1100. onClose: disableIsAddingColor,
  1101. activeAttributes: activeAttributes,
  1102. value: value,
  1103. onChange: onChange,
  1104. contentRef: contentRef
  1105. }));
  1106. }
  1107. const textColor = {
  1108. name: text_color_name,
  1109. title: text_color_title,
  1110. tagName: 'span',
  1111. className: 'has-inline-color',
  1112. attributes: {
  1113. style: 'style',
  1114. class: 'class'
  1115. },
  1116. edit: TextColorEdit
  1117. };
  1118. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/subscript.js
  1119. /**
  1120. * WordPress dependencies
  1121. */
  1122. const subscript = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  1123. xmlns: "http://www.w3.org/2000/svg",
  1124. viewBox: "0 0 24 24"
  1125. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  1126. d: "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"
  1127. }));
  1128. /* harmony default export */ var library_subscript = (subscript);
  1129. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/subscript/index.js
  1130. /**
  1131. * WordPress dependencies
  1132. */
  1133. const subscript_name = 'core/subscript';
  1134. const subscript_title = Object(external_wp_i18n_["__"])('Subscript');
  1135. const subscript_subscript = {
  1136. name: subscript_name,
  1137. title: subscript_title,
  1138. tagName: 'sub',
  1139. className: null,
  1140. edit({
  1141. isActive,
  1142. value,
  1143. onChange,
  1144. onFocus
  1145. }) {
  1146. function onToggle() {
  1147. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  1148. type: subscript_name
  1149. }));
  1150. }
  1151. function onClick() {
  1152. onToggle();
  1153. onFocus();
  1154. }
  1155. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  1156. icon: library_subscript,
  1157. title: subscript_title,
  1158. onClick: onClick,
  1159. isActive: isActive
  1160. });
  1161. }
  1162. };
  1163. // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/superscript.js
  1164. /**
  1165. * WordPress dependencies
  1166. */
  1167. const superscript = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  1168. xmlns: "http://www.w3.org/2000/svg",
  1169. viewBox: "0 0 24 24"
  1170. }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  1171. d: "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"
  1172. }));
  1173. /* harmony default export */ var library_superscript = (superscript);
  1174. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/superscript/index.js
  1175. /**
  1176. * WordPress dependencies
  1177. */
  1178. const superscript_name = 'core/superscript';
  1179. const superscript_title = Object(external_wp_i18n_["__"])('Superscript');
  1180. const superscript_superscript = {
  1181. name: superscript_name,
  1182. title: superscript_title,
  1183. tagName: 'sup',
  1184. className: null,
  1185. edit({
  1186. isActive,
  1187. value,
  1188. onChange,
  1189. onFocus
  1190. }) {
  1191. function onToggle() {
  1192. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  1193. type: superscript_name
  1194. }));
  1195. }
  1196. function onClick() {
  1197. onToggle();
  1198. onFocus();
  1199. }
  1200. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  1201. icon: library_superscript,
  1202. title: superscript_title,
  1203. onClick: onClick,
  1204. isActive: isActive
  1205. });
  1206. }
  1207. };
  1208. // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js
  1209. var library_button = __webpack_require__("oMoS");
  1210. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/keyboard/index.js
  1211. /**
  1212. * WordPress dependencies
  1213. */
  1214. const keyboard_name = 'core/keyboard';
  1215. const keyboard_title = Object(external_wp_i18n_["__"])('Keyboard input');
  1216. const keyboard = {
  1217. name: keyboard_name,
  1218. title: keyboard_title,
  1219. tagName: 'kbd',
  1220. className: null,
  1221. edit({
  1222. isActive,
  1223. value,
  1224. onChange,
  1225. onFocus
  1226. }) {
  1227. function onToggle() {
  1228. onChange(Object(external_wp_richText_["toggleFormat"])(value, {
  1229. type: keyboard_name
  1230. }));
  1231. }
  1232. function onClick() {
  1233. onToggle();
  1234. onFocus();
  1235. }
  1236. return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
  1237. icon: library_button["a" /* default */],
  1238. title: keyboard_title,
  1239. onClick: onClick,
  1240. isActive: isActive
  1241. });
  1242. }
  1243. };
  1244. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/default-formats.js
  1245. /**
  1246. * Internal dependencies
  1247. */
  1248. /* harmony default export */ var default_formats = ([bold, code_code, image_image, italic, link_link, strikethrough, underline, textColor, subscript_subscript, superscript_superscript, keyboard]);
  1249. // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/index.js
  1250. /**
  1251. * WordPress dependencies
  1252. */
  1253. /**
  1254. * Internal dependencies
  1255. */
  1256. default_formats.forEach(({
  1257. name,
  1258. ...settings
  1259. }) => Object(external_wp_richText_["registerFormatType"])(name, settings));
  1260. /***/ }),
  1261. /***/ "tI+e":
  1262. /***/ (function(module, exports) {
  1263. (function() { module.exports = window["wp"]["components"]; }());
  1264. /***/ }),
  1265. /***/ "uGfJ":
  1266. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1267. "use strict";
  1268. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  1269. /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  1270. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  1271. /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  1272. /**
  1273. * WordPress dependencies
  1274. */
  1275. const textColor = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  1276. xmlns: "http://www.w3.org/2000/svg",
  1277. viewBox: "0 0 24 24"
  1278. }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  1279. d: "M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"
  1280. }));
  1281. /* harmony default export */ __webpack_exports__["a"] = (textColor);
  1282. /***/ })
  1283. /******/ });