WordPress/wp-includes/js/dist/wordcount.min.js

2 lines
3.1 KiB
JavaScript
Raw Permalink Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.wordcount=function(e){var n={};function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var u in e)t.d(r,u,function(n){return e[n]}.bind(null,u));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="pC98")}({YLtl:function(e,n){e.exports=window.lodash},pC98:function(e,n,t){"use strict";t.r(n),t.d(n,"count",(function(){return x}));var r=t("YLtl"),u={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/&nbsp;|&#160;/gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-@[-`{-~","€-¿×÷"," -⯿","⸀-⹿","]"].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 c(e,n){return n.replace(e.HTMLRegExp,"\n")}function o(e,n){return n.replace(e.astralRegExp,"a")}function l(e,n){return n.replace(e.HTMLEntityRegExp,"")}function i(e,n){return n.replace(e.connectorRegExp," ")}function p(e,n){return n.replace(e.removeRegExp,"")}function s(e,n){return n.replace(e.HTMLcommentRegExp,"")}function a(e,n){return e.shortcodesRegExp?n.replace(e.shortcodesRegExp,"\n"):n}function d(e,n){return n.replace(e.spaceRegExp," ")}function g(e,n){return n.replace(e.HTMLEntityRegExp,"a")}function f(e,n,t){var u,l;return e=Object(r.flow)(c.bind(null,t),s.bind(null,t),a.bind(null,t),o.bind(null,t),d.bind(null,t),g.bind(null,t))(e),null!==(u=null===(l=(e+="\n").match(n))||void 0===l?void 0:l.length)&&void 0!==u?u:0}function x(e,n,t){var o=function(e,n){var t,c,o=Object(r.extend)({},u,n);return o.shortcodes=null!==(t=null===(c=o.l10n)||void 0===c?void 0:c.shortcodes)&&void 0!==t?t:[],o.shortcodes&&o.shortcodes.length&&(o.shortcodesRegExp=new RegExp("\\[\\/?(?:"+o.shortcodes.join("|")+")[^\\]]*?\\]","g")),o.type=e,"characters_excluding_spaces"!==o.type&&"characters_including_spaces"!==o.type&&(o.type="words"),o}(n,t);switch(o.type){case"words":return function(e,n,t){var u,o;return e=Object(r.flow)(c.bind(null,t),s.bind(null,t),a.bind(null,t),d.bind(null,t),l.bind(null,t),i.bind(null,t),p.bind(null,t))(e),null!==(u=null===(o=(e+="\n").match(n))||void 0===o?void 0:o.length)&&void 0!==u?u:0}(e,o.wordsRegExp,o);case"characters_including_spaces":return f(e,o.characters_including_spacesRegExp,o);case"characters_excluding_spaces":return f(e,o.characters_excluding_spacesRegExp,o);default:return 0}}}});