PluginProbe
Gutenberg / 23.1.1
Gutenberg v23.1.1
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / wordcount / index.min.js

index.min.js in Gutenberg 23.1.1, at build/scripts/wordcount/index.min.js

7 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";var wp;(wp||={}).wordcount=(()=>{var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var b=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},T=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of h(r))!R.call(e,o)&&o!==t&&s(e,o,{get:()=>r[o],enumerable:!(n=x(r,o))||n.enumerable});return e};var _=e=>T(s({},"__esModule",{value:!0}),e);var M={};b(M,{count:()=>L});var i={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/&nbsp;|&#160;/gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","\x80-\xBF\xD7\xF7","\u2000-\u2BFF","\u2E00-\u2E7F","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function a(e,r){return r.replace(e.HTMLRegExp,`
2 `)}function l(e,r){return r.replace(e.astralRegExp,"a")}function d(e,r){return r.replace(e.HTMLEntityRegExp,"")}function g(e,r){return r.replace(e.connectorRegExp," ")}function f(e,r){return r.replace(e.removeRegExp,"")}function c(e,r){return r.replace(e.HTMLcommentRegExp,"")}function p(e,r){return e.shortcodesRegExp?r.replace(e.shortcodesRegExp,`
3 `):r}function u(e,r){return r.replace(e.spaceRegExp," ")}function m(e,r){return r.replace(e.HTMLEntityRegExp,"a")}function C(e="words",r={}){let n={...{...i,...r},type:e,shortcodes:[]};return n.shortcodes=n.l10n?.shortcodes??[],n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type!=="characters_excluding_spaces"&&n.type!=="characters_including_spaces"&&(n.type="words"),n}function H(e,r,t){return e=[a.bind(null,t),c.bind(null,t),p.bind(null,t),u.bind(null,t),d.bind(null,t),g.bind(null,t),f.bind(null,t)].reduce((n,o)=>o(n),e),e=e+`
4 `,e.match(r)?.length??0}function E(e,r,t){return e=[a.bind(null,t),c.bind(null,t),p.bind(null,t),l.bind(null,t),u.bind(null,t),m.bind(null,t)].reduce((n,o)=>o(n),e),e=e+`
5 `,e.match(r)?.length??0}function L(e,r,t){let n=C(r,t),o;switch(n.type){case"words":return o=n.wordsRegExp,H(e,o,n);case"characters_including_spaces":return o=n.characters_including_spacesRegExp,E(e,o,n);case"characters_excluding_spaces":return o=n.characters_excluding_spacesRegExp,E(e,o,n);default:return 0}}return _(M);})();
6 //# sourceMappingURL=index.min.js.map
7