UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 1.46 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index.cjs820.js");var p;function s(){return p||(p=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var l=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(t,n){return t.codePointAt(n)}:function(t,n){return(t.charCodeAt(n)&64512)===55296?(t.charCodeAt(n)-55296)*1024+t.charCodeAt(n+1)-56320+65536:t.charCodeAt(n)};function g(t){for(var n="",r=0,u;(u=e.xmlReplacer.exec(t))!==null;){var a=u.index,c=t.charCodeAt(a),i=l.get(c);i!==void 0?(n+=t.substring(r,a)+i,r=a+1):(n+="".concat(t.substring(r,a),"&#x").concat((0,e.getCodePoint)(t,a).toString(16),";"),r=e.xmlReplacer.lastIndex+=+((c&64512)===55296))}return n+t.substr(r)}e.encodeXML=g,e.escape=g;function d(t,n){return function(u){for(var a,c=0,i="";a=t.exec(u);)c!==a.index&&(i+=u.substring(c,a.index)),i+=n.get(a[0].charCodeAt(0)),c=a.index+1;return i+u.substring(c)}}e.escapeUTF8=d(/[&<>'"]/g,l),e.escapeAttribute=d(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),e.escapeText=d(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})(o.__exports)),o.__exports}exports.__require=s; //# sourceMappingURL=index.cjs812.js.map