WordPress/wp-includes/js/dist/wordcount.min.js
youknowriad 9aaa49f5a7 Editor: Update WordPress packages to Gutenberg 16.7 RC3.
It brings with a set of iterations and follow-ups to the initial package update.
It also fixes a regression that happened for interactive blocks.

Props gziolo, luisherranz, cbravobernal.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57499


git-svn-id: http://core.svn.wordpress.org/trunk@57000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 12:59:56 +00:00

2 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
(()=>{"use strict";var e={d:(n,r)=>{for(var t in r)e.o(r,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:r[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{count:()=>d});const r={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 t(e,n){return n.replace(e.HTMLRegExp,"\n")}function c(e,n){return n.replace(e.astralRegExp,"a")}function o(e,n){return n.replace(e.HTMLEntityRegExp,"")}function u(e,n){return n.replace(e.connectorRegExp," ")}function l(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 p(e,n){return n.replace(e.spaceRegExp," ")}function i(e,n){return n.replace(e.HTMLEntityRegExp,"a")}function g(e,n,r){var o;return e=[t.bind(null,r),s.bind(null,r),a.bind(null,r),c.bind(null,r),p.bind(null,r),i.bind(null,r)].reduce(((e,n)=>n(e)),e),e+="\n",null!==(o=e.match(n)?.length)&&void 0!==o?o:0}function d(e,n,c){const i=function(e,n){var t;const c=Object.assign({},r,n);return c.shortcodes=null!==(t=c.l10n?.shortcodes)&&void 0!==t?t:[],c.shortcodes&&c.shortcodes.length&&(c.shortcodesRegExp=new RegExp("\\[\\/?(?:"+c.shortcodes.join("|")+")[^\\]]*?\\]","g")),c.type=e,"characters_excluding_spaces"!==c.type&&"characters_including_spaces"!==c.type&&(c.type="words"),c}(n,c);let d;switch(i.type){case"words":return d=i.wordsRegExp,function(e,n,r){var c;return e=[t.bind(null,r),s.bind(null,r),a.bind(null,r),p.bind(null,r),o.bind(null,r),u.bind(null,r),l.bind(null,r)].reduce(((e,n)=>n(e)),e),e+="\n",null!==(c=e.match(n)?.length)&&void 0!==c?c:0}(e,d,i);case"characters_including_spaces":return d=i.characters_including_spacesRegExp,g(e,d,i);case"characters_excluding_spaces":return d=i.characters_excluding_spacesRegExp,g(e,d,i);default:return 0}}(window.wp=window.wp||{}).wordcount=n})();