@emailmaker/emailmaker 1.1.103 → 1.1.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +1 -0
  3. package/emailmaker-core.d5e4bde1.js +859 -0
  4. package/emailmaker-esm.js +11 -11
  5. package/{emailmaker-po.3529b1de.js → emailmaker-po.d5e4bde1.js} +1 -1
  6. package/emailmaker.d.ts +144 -13
  7. package/emailmaker.js +12 -12
  8. package/iframe/.vite/manifest.json +13 -25
  9. package/iframe/css/sandbox.css +11 -9
  10. package/iframe/{iframe-eblock.3529b1de.html → iframe-eblock.d5e4bde1.html} +2 -2
  11. package/iframe/{iframe.3529b1de.html → iframe.d5e4bde1.html} +2 -2
  12. package/iframe/js/elMarkupHelper.C66zL1zp.js +279 -0
  13. package/iframe/js/iframe-eblock.body.d5e4bde1.js +9 -0
  14. package/iframe/js/iframe-eblock.js +2 -2
  15. package/iframe/js/iframe.body.d5e4bde1.js +129 -0
  16. package/iframe/js/iframe.js +2 -2
  17. package/iframe/js/{typograf.all.B0pVhMV_.js → typograf.all.Mun9CrLC.js} +12 -12
  18. package/package.json +1 -1
  19. package/runtime/react/index.js +1 -1
  20. package/static/core/{6efc4a78.js → 13b2a363.js} +3 -3
  21. package/static/core/{a4d1fdc5.js → 22140fa1.js} +1 -1
  22. package/static/core/{71d7c710.js → 2455e45e.js} +11 -11
  23. package/static/core/{7fd8d843.js → 2734fa96.js} +1 -1
  24. package/static/core/3a6dbf2b.js +7 -0
  25. package/static/core/{0cb54b92.js → 4797d4f7.js} +6 -6
  26. package/static/core/{5eaa42ac.js → 566e8ce8.js} +1 -1
  27. package/static/core/{b99c36c9.js → 6ba8aedc.js} +1 -1
  28. package/static/core/{9909de51.js → 6c52be40.js} +1 -1
  29. package/static/core/{73291b7c.js → 6e8d008d.js} +1 -1
  30. package/static/core/{c1460335.js → 6f6a92e3.js} +1 -1
  31. package/static/core/{2a6bfcb1.js → 756e184f.js} +1 -1
  32. package/static/core/7985de17.js +28 -0
  33. package/static/core/{b3d5871e.js → 7e51da74.js} +1 -1
  34. package/static/core/{3b315cf0.js → 7e69b03c.js} +1 -1
  35. package/static/core/{82f5152d.js → 8889dbc6.js} +1 -1
  36. package/static/core/8a621181.js +2 -0
  37. package/static/core/a22823f9.js +1 -0
  38. package/static/core/{1922419a.js → abcacabc.js} +1 -1
  39. package/static/core/{48387a41.js → b43852b9.js} +1 -1
  40. package/static/core/{9f7f5230.js → b712bb05.js} +1 -1
  41. package/static/core/{e420456c.js → b916e437.js} +1 -1
  42. package/static/core/{8fe408ef.js → d5cd2a7b.js} +1 -1
  43. package/static/core/{91e9b542.js → d74c1e57.js} +1 -1
  44. package/static/core/{66be8204.js → d8800deb.js} +1 -1
  45. package/static/core/{fbd1b42a.js → dbc12df7.js} +2 -2
  46. package/static/core/{5de7475e.js → e1f8b6ea.js} +1 -1
  47. package/static/core/e88db487.js +1 -0
  48. package/static/core/{9ca4cda3.js → ecaf7c36.js} +1 -1
  49. package/static/core/edf49656.js +4 -0
  50. package/static/core/{6dd152e5.js → f20ffa90.js} +3 -3
  51. package/static/core/{682a8e2c.js → f37da79c.js} +1 -1
  52. package/static/esm/73c89921.js +1 -0
  53. package/static/esm/delivery-libs.js +1 -1
  54. package/static/umd-runtime/delivery-libs.eFZaeVgo.js +1 -0
  55. package/static/umd-runtime/{runtime.D9PiY8Jx.js → runtime.BZcjM8iG.js} +1 -1
  56. package/vendor/@emailmaker/ui-kit/package.json +1 -1
  57. package/emailmaker-core.3529b1de.js +0 -859
  58. package/iframe/js/discussHandlers.BrvInbT7.js +0 -88
  59. package/iframe/js/iframe-eblock.body.3529b1de.js +0 -233
  60. package/iframe/js/iframe.body.3529b1de.js +0 -319
  61. package/iframe/js/rolldown-runtime.qcwTIabA.js +0 -1
  62. package/static/core/90715222.js +0 -28
  63. package/static/core/c9a013a6.js +0 -4
  64. package/static/core/d4619860.js +0 -7
  65. package/static/core/e6f6edff.js +0 -1
  66. package/static/esm/d4338c39.js +0 -1
  67. package/static/umd-runtime/delivery-libs.Cmqsjupj.js +0 -1
@@ -1,19 +1,19 @@
1
- __emailmaker__.define("js/typograf.all.B0pVhMV_.js",["require","exports","module","js/rolldown-runtime.qcwTIabA.js"],function(be,C,Vr){var Re=be("./rolldown-runtime.qcwTIabA.js").__exportAll({default:()=>P}),b={exports:{}},$e=b.exports;(function(v,g){typeof $e=="object"&&typeof b<"u"?b.exports=g():typeof define=="function"&&define.amd?define(g):(v=typeof globalThis<"u"?globalThis:v||self,v.Typograf=g())})(void 0,function(){"use strict";var v=function(){return v=Object.assign||function(e){for(var n,a=1,t=arguments.length;a<t;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},v.apply(this,arguments)};function g(r,e,n){if(n||arguments.length===2)for(var a=0,t=e.length,o;a<t;a++)(o||!(a in e))&&(o||(o=Array.prototype.slice.call(e,0,a)),o[a]=e[a]);return r.concat(o||Array.prototype.slice.call(e))}var ye=[["iexcl",161],["cent",162],["pound",163],["curren",164],["yen",165],["brvbar",166],["sect",167],["uml",168],["copy",169],["ordf",170],["laquo",171],["not",172],["reg",174],["macr",175],["deg",176],["plusmn",177],["sup2",178],["sup3",179],["acute",180],["micro",181],["para",182],["middot",183],["cedil",184],["sup1",185],["ordm",186],["raquo",187],["frac14",188],["frac12",189],["frac34",190],["iquest",191],["Agrave",192],["Aacute",193],["Acirc",194],["Atilde",195],["Auml",196],["Aring",197],["AElig",198],["Ccedil",199],["Egrave",200],["Eacute",201],["Ecirc",202],["Euml",203],["Igrave",204],["Iacute",205],["Icirc",206],["Iuml",207],["ETH",208],["Ntilde",209],["Ograve",210],["Oacute",211],["Ocirc",212],["Otilde",213],["Ouml",214],["times",215],["Oslash",216],["Ugrave",217],["Uacute",218],["Ucirc",219],["Uuml",220],["Yacute",221],["THORN",222],["szlig",223],["agrave",224],["aacute",225],["acirc",226],["atilde",227],["auml",228],["aring",229],["aelig",230],["ccedil",231],["egrave",232],["eacute",233],["ecirc",234],["euml",235],["igrave",236],["iacute",237],["icirc",238],["iuml",239],["eth",240],["ntilde",241],["ograve",242],["oacute",243],["ocirc",244],["otilde",245],["ouml",246],["divide",247],["oslash",248],["ugrave",249],["uacute",250],["ucirc",251],["uuml",252],["yacute",253],["thorn",254],["yuml",255],["fnof",402],["Alpha",913],["Beta",914],["Gamma",915],["Delta",916],["Epsilon",917],["Zeta",918],["Eta",919],["Theta",920],["Iota",921],["Kappa",922],["Lambda",923],["Mu",924],["Nu",925],["Xi",926],["Omicron",927],["Pi",928],["Rho",929],["Sigma",931],["Tau",932],["Upsilon",933],["Phi",934],["Chi",935],["Psi",936],["Omega",937],["alpha",945],["beta",946],["gamma",947],["delta",948],["epsilon",949],["zeta",950],["eta",951],["theta",952],["iota",953],["kappa",954],["lambda",955],["mu",956],["nu",957],["xi",958],["omicron",959],["pi",960],["rho",961],["sigmaf",962],["sigma",963],["tau",964],["upsilon",965],["phi",966],["chi",967],["psi",968],["omega",969],["thetasym",977],["upsih",978],["piv",982],["bull",8226],["hellip",8230],["prime",8242],["Prime",8243],["oline",8254],["frasl",8260],["weierp",8472],["image",8465],["real",8476],["trade",8482],["alefsym",8501],["larr",8592],["uarr",8593],["rarr",8594],["darr",8595],["harr",8596],["crarr",8629],["lArr",8656],["uArr",8657],["rArr",8658],["dArr",8659],["hArr",8660],["forall",8704],["part",8706],["exist",8707],["empty",8709],["nabla",8711],["isin",8712],["notin",8713],["ni",8715],["prod",8719],["sum",8721],["minus",8722],["lowast",8727],["radic",8730],["prop",8733],["infin",8734],["ang",8736],["and",8743],["or",8744],["cap",8745],["cup",8746],["int",8747],["there4",8756],["sim",8764],["cong",8773],["asymp",8776],["ne",8800],["equiv",8801],["le",8804],["ge",8805],["sub",8834],["sup",8835],["nsub",8836],["sube",8838],["supe",8839],["oplus",8853],["otimes",8855],["perp",8869],["sdot",8901],["lceil",8968],["rceil",8969],["lfloor",8970],["rfloor",8971],["lang",9001],["rang",9002],["spades",9824],["clubs",9827],["hearts",9829],["diams",9830],["loz",9674],["OElig",338],["oelig",339],["Scaron",352],["scaron",353],["Yuml",376],["circ",710],["tilde",732],["ndash",8211],["mdash",8212],["lsquo",8216],["rsquo",8217],["sbquo",8218],["ldquo",8220],["rdquo",8221],["bdquo",8222],["dagger",8224],["Dagger",8225],["permil",8240],["lsaquo",8249],["rsaquo",8250],["euro",8364],["NestedGreaterGreater",8811],["NestedLessLess",8810]],I=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]],R=new((function(){function r(){var e=this;this.entities=this.prepareEntities(g(g([],ye,!0),I,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach(function(n){e.entitiesByName[n.name]=n,e.entitiesByNameEntity[n.nameEntity]=n,e.entitiesByDigitEntity[n.digitEntity]=n,e.entitiesByUtf[n.utf]=n}),this.invisibleEntities=this.prepareEntities(I)}return r.prototype.toUtf=function(e){var n=this;e.text.search(/&#/)!==-1&&(e.text=this.decHexToUtf(e.text)),e.text.search(/&[a-z]/i)!==-1&&(e.text=e.text.replace(/&[a-z\d]{2,31};/gi,function(a){var t=n.entitiesByNameEntity[a];return t?t.utf:a}))},r.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,function(n,a){return String.fromCharCode(parseInt(a,10))}).replace(/&#x([\da-f]{1,6});/gi,function(n,a){return String.fromCharCode(parseInt(a,16))})},r.prototype.restore=function(e){var n=e.prefs.htmlEntity,a=n.type,t=this.entities;if(a==="name"||a==="digit"){(n.onlyInvisible||n.list)&&(t=[],n.onlyInvisible&&(t=t.concat(this.invisibleEntities)),n.list&&(t=t.concat(this.prepareListParam(n.list))));var o=a==="name"?"nameEntity":"digitEntity";e.text=this.restoreEntitiesByIndex(e.text,o,t)}},r.prototype.getByUtf=function(e,n){var a;switch(n){case"digit":a=this.entitiesByDigitEntity[e];break;case"name":a=this.entitiesByNameEntity[e];break;default:a=e}return a},r.prototype.prepareEntities=function(e){var n=[];return e.forEach(function(a){var t=a[0],o=a[1],u=String.fromCharCode(o);n.push({name:t,nameEntity:"&"+t+";",digitEntity:"&#"+o+";",utf:u,reName:new RegExp("&"+t+";","g"),reUtf:new RegExp(u,"g")})}),n},r.prototype.prepareListParam=function(e){var n=this,a=[];return e.forEach(function(t){var o=n.entitiesByName[t];o&&a.push(o)}),a},r.prototype.restoreEntitiesByIndex=function(e,n,a){return a.forEach(function(t){e=e.replace(t.reUtf,t[n])}),e},r})()),x=[];function k(r){var e=(r||"").split("/")[0];e&&e!=="common"&&!q(e)&&(x.push(e),x.sort())}function O(){return x}function q(r){return r==="common"||x.indexOf(r)!==-1}function z(r,e){var n=r||e;return n?Array.isArray(n)?n:[n]:[]}function H(r){if(!r.length)throw Error('Not defined the property "locale".');r.forEach(function(e){if(!q(e))throw Error('"'.concat(e,'" is not supported locale.'))})}var j={};function i(r){return j[r]}function Q(r){Object.keys(r).forEach(function(e){k(e),j[e]=r[e]})}var xe=["a","abbr","acronym","b","bdo","big","br","button","cite","code","dfn","em","i","img","input","kbd","label","map","object","q","samp","script","select","small","span","strong","sub","sup","textarea","time","tt","var"],F=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),W="\\d+([.,]\\d+)?",we=/\d/;function Y(r){return r.search(we)>-1}var c="",w="",Ae=(function(){function r(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var e=[["<!--","-->"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(n){e.push(["<".concat(n,"(\\s[^>]*?)?>"),"</".concat(n,">")])}),this.tags={own:[],html:e.map(this.prepareRegExp),url:[F]}}return r.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},r.prototype.show=function(e,n){for(var a=new RegExp(c+"tf\\d+"+c,"g"),t=new RegExp(c+"tf\\d"),o=function(l){return e.safeTags.hidden[n][l]||l},u=0,s=this.tags[n].length;u<s&&(e.text=e.text.replace(a,o),e.text.search(t)!==-1);u++);},r.prototype.hide=function(e,n){var a=this;e.safeTags.hidden[n]={};var t=this.pasteLabel.bind(this,e,n);this.tags[n].forEach(function(o){e.text=e.text.replace(a.prepareRegExp(o),t)})},r.prototype.hideHTMLTags=function(e){if(e.isHTML){var n=this.pasteLabel.bind(this,e,"html");e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,n).replace(/&lt;\/?[a-z][^]*?&gt;/gi,n).replace(/&[gl]t;/gi,n)}},r.prototype.getPrevLabel=function(e,n){for(var a=n-1;a>=0;a--)if(e[a]===c)return e.slice(a,n+1);return""},r.prototype.getNextLabel=function(e,n){for(var a=n+1;a<e.length;a++)if(e[a]===c)return e.slice(n,a+1);return""},r.prototype.getTagByLabel=function(e,n){var a=null;return this.groups.some(function(t){var o=e.safeTags.hidden[t][n];return typeof o<"u"&&(a={group:t,value:o}),a}),a},r.prototype.getTagInfo=function(e){if(!e)return null;var n={group:e.group};switch(e.group){case"html":n.name=e.value.split(/[<\s>]/)[1],n.isInline=xe.indexOf(n.name)>-1,n.isClosing=e.value.search(/^<\//)>-1;break;case"url":n.isInline=!0;break;case"own":n.isInline=!1}return n},r.prototype.pasteLabel=function(e,n,a){var t=e.safeTags,o=c+"tf"+t.counter+c;return t.hidden[n][o]=a,t.counter++,o},r.prototype.prepareRegExp=function(e){if(e instanceof RegExp)return e;var n=e[0],a=e[1],t=e[2];return new RegExp(n+(typeof t>"u"?"[^]*?":t)+a,"gi")},r.prototype.getPrevTagInfo=function(e,n,a){var t=this.getPrevLabel(n,a-1);if(t){var o=this.getTagByLabel(e,t);if(o)return this.getTagInfo(o)}return null},r.prototype.getNextTagInfo=function(e,n,a){var t=this.getNextLabel(n,a+1);if(t){var o=this.getTagByLabel(e,t);if(o)return this.getTagInfo(o)}return null},r})();function U(r,e){for(var n="";(e&1)===1&&(n+=r),e>>>=1,e!==0;)r+=r;return n}function X(r){return r.replace(/\u00A0/g," ")}function T(r,e){for(var n=0;n<e.length;n++)r=r.replace(e[n][0],e[n][1]);return r}function G(r){return r.search(/(<\/?[a-z]|<!|&[lg]t;)/i)!==-1}function Se(r){return r.replace(/\r\n?/g,`
2
- `)}function Ee(r,e){return e==="CRLF"?r.replace(/\n/g,`\r
3
- `):e==="CR"?r.replace(/\n/g,"\r"):r}function A(r){return typeof r=="object"?JSON.parse(JSON.stringify(r)):r}var ke={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},qe=0,K="default",V=[],J=[];function Ue(r){J.push(ee(r))}function Te(r){var e=ee(r);k(e.locale),V.push(e)}function Le(r){r.sort(function(e,n){return e.index>n.index?1:-1})}function L(){var r=g([],V,!0);return Le(r),r}function Z(){return g([],J,!0)}function Be(r){if(typeof r.index=="number")return r.index;var e=ke[r.name.split("/")[1]];return typeof e>"u"&&(e=qe),typeof r.index=="string"?e+parseInt(r.index,10):e}function ee(r){var e=r.name.split("/"),n=e[0],a=e[1],t=e[2];return{name:r.name,shortName:t,handler:r.handler,queue:r.queue||K,enabled:r.disabled!==!0,locale:n,group:a,index:Be(r),settings:r.settings,live:r.live,htmlAttrs:r.htmlAttrs}}var De="7.4.4";function re(r){return{type:r?.type||"default",list:r?.list,onlyInvisible:!!r?.onlyInvisible}}function ne(r){return r||"LF"}function Me(r){return{locale:z(r.locale),lineEnding:ne(r.lineEnding),live:!!r.live,ruleFilter:r.ruleFilter,enableRule:r.enableRule,disableRule:r.disableRule,processingSeparateParts:r.processingSeparateParts,htmlEntity:re(r.htmlEntity)}}function _e(r,e){var n=v({},r);return e&&("locale"in e&&(n.locale=z(e.locale)),"htmlEntity"in e&&(n.htmlEntity=re(e.htmlEntity)),"lineEnding"in e&&(n.lineEnding=ne(e.lineEnding)),"processingSeparateParts"in e&&(n.processingSeparateParts=e.processingSeparateParts),"ruleFilter"in e&&(n.ruleFilter=e.ruleFilter)),n}var p=(function(){function r(e){var n=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs=Me(e),H(this.prefs.locale),this.safeTags=new Ae,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=Z(),this.innerRules.forEach(function(a){n.innerRulesByQueues[a.queue]=n.innerRulesByQueues[a.queue]||[],n.innerRulesByQueues[a.queue].push(a)}),this.rulesByQueues={},this.rules=L(),this.rules.forEach(function(a){n.prepareRuleSettings(a),n.rulesByQueues[a.queue]=n.rulesByQueues[a.queue]||[],n.rulesByQueues[a.queue].push(a)}),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}return r.addRule=function(e){Te(e)},r.addRules=function(e){var n=this;e.forEach(function(a){n.addRule(a)})},r.addInnerRule=function(e){Ue(e)},r.addInnerRules=function(e){var n=this;e.forEach(function(a){n.addInnerRule(a)})},r.getRule=function(e){var n=null;return L().some(function(a){return a.name===e?(n=a,!0):!1}),n},r.getRules=function(){return L()},r.getInnerRules=function(){return Z()},r.getLocales=function(){return O()},r.addLocale=function(e){k(e)},r.hasLocale=function(e){return q(e)},r.setData=function(e){Q(e)},r.getData=function(e){return i(e)},r.prototype.execute=function(e,n){if(e=""+e,!e)return"";var a=_e(this.prefs,n);H(a.locale);var t=this.prepareContext(e,a);return this.process(t)},r.prototype.getSetting=function(e,n){return this.settings[e]&&this.settings[e][n]},r.prototype.setSetting=function(e,n,a){this.settings[e]=this.settings[e]||{},this.settings[e][n]=a},r.prototype.isEnabledRule=function(e){return this.enabledRules[e]!==!1},r.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},r.prototype.enableRule=function(e){return this.enable(e,!0)},r.prototype.disableRule=function(e){return this.enable(e,!1)},r.prototype.addSafeTag=function(e,n,a){var t=e instanceof RegExp?e:[e,n,a];this.safeTags.add(t)},r.prototype.prepareContext=function(e,n){return{text:e,isHTML:G(e),prefs:n,getData:function(a){return a==="char"?n.locale.map(function(t){return i(t+"/"+a)}).join(""):i(n.locale[0]+"/"+a)},safeTags:this.safeTags}},r.prototype.splitBySeparateParts=function(e){if(!e.isHTML||e.prefs.processingSeparateParts===!1)return[e.text];var n=[],a=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),t=0;return e.text.replace(a,function(o,u,s,l){return t!==l&&n.push((t?w:"")+e.text.slice(t,l)+w),n.push(o),t=l+o.length,o}),n.push(t?w+e.text.slice(t,e.text.length):e.text),n},r.prototype.process=function(e){var n=this;e.text=Se(e.text),this.executeRules(e,"start"),this.safeTags.hide(e,"own"),this.executeRules(e,"hide-safe-tags-own"),this.safeTags.hide(e,"html"),this.executeRules(e,"hide-safe-tags-html");var a=e.isHTML,t=new RegExp(w,"g");return e.text=this.splitBySeparateParts(e).map(function(o){return e.text=o,e.isHTML=G(o),n.safeTags.hideHTMLTags(e),n.safeTags.hide(e,"url"),n.executeRules(e,"hide-safe-tags-url"),n.executeRules(e,"hide-safe-tags"),R.toUtf(e),e.prefs.live&&(e.text=X(e.text)),n.executeRules(e,"utf"),n.executeRules(e),R.restore(e),n.executeRules(e,"html-entities"),n.safeTags.show(e,"url"),n.executeRules(e,"show-safe-tags-url"),e.text.replace(t,"")}).join(""),e.isHTML=a,this.safeTags.show(e,"html"),this.executeRules(e,"show-safe-tags-html"),this.safeTags.show(e,"own"),this.executeRules(e,"show-safe-tags-own"),this.executeRules(e,"end"),Ee(e.text,e.prefs.lineEnding)},r.prototype.executeRules=function(e,n){var a=this;n===void 0&&(n=K);var t=this.rulesByQueues[n],o=this.innerRulesByQueues[n];o&&o.forEach(function(u){a.ruleIterator(e,u)}),t&&t.forEach(function(u){a.ruleIterator(e,u)})},r.prototype.ruleIterator=function(e,n){if(!(e.prefs.live===!0&&n.live===!1||e.prefs.live===!1&&n.live===!0)&&(n.locale==="common"||n.locale===e.prefs.locale[0])&&this.isEnabledRule(n.name)){if(e.prefs.ruleFilter&&!e.prefs.ruleFilter(n))return;this.onBeforeRule&&this.onBeforeRule(n.name,e),e.text=n.handler.call(this,e.text,this.settings[n.name],e),this.onAfterRule&&this.onAfterRule(n.name,e)}},r.prototype.prepareRuleSettings=function(e){this.settings[e.name]=A(e.settings),this.enabledRules[e.name]=e.enabled},r.prototype.enable=function(e,n){var a=this;Array.isArray(e)?e.forEach(function(t){a.enableByMask(t,n)}):this.enableByMask(e,n)},r.prototype.enableByMask=function(e,n){var a=this;if(e)if(e.search(/\*/)!==-1){var t=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*"));this.rules.forEach(function(o){var u=o.name;t.test(u)&&(a.enabledRules[u]=n)})}else this.enabledRules[e]=n},r.groups=[],r.titles={},r.version=De,r})();[{"common/char":"a-z","common/dash":"--?|‒|–|—","common/quote":'«‹»›„“‟”"'},{"be/char":"абвгдежзйклмнопрстуфхцчшыьэюяёіўґ","be/quote":{left:"«“",right:"»”"}},{"bg/char":"абвгдежзийклмнопрстуфхцчшщъьюя","bg/quote":{left:"„’",right:"“’"}},{"ca/char":"abcdefghijlmnopqrstuvxyzàçèéíïòóúü","ca/quote":{left:"«“",right:"»”"}},{"cs/char":"a-záéíóúýčďěňřšťůž","cs/quote":{left:"„‚",right:"“‘"}},{"da/char":"a-zåæø","da/quote":{left:"»›",right:"«‹"}},{"de/char":"a-zßäöü","de/quote":{left:"„‚",right:"“‘"}},{"el/char":"ΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϲάέήίόύώ","el/quote":{left:"«“",right:"»”"}},{"en-GB/char":"a-z","en-GB/quote":{left:"‘“",right:"’”"}},{"en-US/char":"a-z","en-US/quote":{left:"“‘",right:"”’"},"en-US/shortWord":"a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet"},{"eo/char":"abcdefghijklmnoprstuvzĉĝĥĵŝŭ","eo/quote":{left:"“‘",right:"”’"}},{"es/char":"a-záéíñóúü","es/quote":{left:"«“",right:"»”"}},{"et/char":"abdefghijklmnoprstuvzäõöüšž","et/quote":{left:"„«",right:"“»"}},{"fi/char":"abcdefghijklmnopqrstuvyöäå","fi/quote":{left:"”’",right:"”’"}},{"fr/char":"a-zàâçèéêëîïôûüœæ","fr/quote":{left:"«‹",right:"»›",spacing:!0}},{"ga/char":"abcdefghilmnoprstuvwxyzáéíóú","ga/quote":{left:"“‘",right:"”’"}},{"hu/char":"a-záäéíóöúüőű","hu/quote":{left:"„»",right:"”«"}},{"it/char":"a-zàéèìòù","it/quote":{left:"«“",right:"»”"}},{"lv/char":"abcdefghijklmnopqrstuvxzæœ","lv/quote":{left:"«„",right:"»“"}},{"nl/char":"a-zäçèéêëîïñöûü","nl/quote":{left:"‘“",right:"’”"}},{"no/char":"a-zåæèéêòóôø","no/quote":{left:"«’",right:"»’"}},{"pl/char":"abcdefghijklmnoprstuvwxyzóąćęłńśźż","pl/quote":{left:"„«",right:"”»"}},{"ro/char":"abcdefghijklmnoprstuvxzîășț","ro/quote":{left:"„«",right:"”»"}},{"ru/char":"а-яё","ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[  ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[  ][^А-ЯЁ]|$)","ru/l":"а-яёa-z","ru/L":"А-ЯЁA-Z","ru/month":"январь|февраль|март|апрель|май|июнь|июль|август|сентябрь|октябрь|ноябрь|декабрь","ru/monthGenCase":"января|февраля|марта|апреля|мая|июня|июля|августа|сентября|октября|ноября|декабря","ru/monthPreCase":"январе|феврале|марте|апреле|мае|июне|июле|августе|сентябре|октябре|ноябре|декабре","ru/quote":{left:"«„‚",right:"»“‘",removeDuplicateQuotes:!0},"ru/shortMonth":"янв|фев|мар|апр|ма[ейя]|июн|июл|авг|сен|окт|ноя|дек","ru/shortWord":"а|бы|в|во|да|до|же|за|и|из|к|ко|ли|на|не|ни|но|о|об|от|по|с|со|то|у","ru/weekday":"понедельник|вторник|среда|четверг|пятница|суббота|воскресенье"},{"sk/char":"abcdefghijklmnoprstuvwxyzáäéíóôúýčďľňŕšťž","sk/quote":{left:"„‚",right:"“‘"}},{"sl/char":"a-zčšž","sl/quote":{left:"„‚",right:"“‘"}},{"sr/char":"abcdefghijklmnoprstuvzćčđšž","sr/quote":{left:"„’",right:"”’"}},{"sv/char":"a-zäåéö","sv/quote":{left:"”’",right:"”’"}},{"tr/char":"abcdefghijklmnoprstuvyzâçîöûüğış","tr/quote":{left:"“‘",right:"”’"}},{"uk/char":"абвгдежзийклмнопрстуфхцчшщьюяєіїґ","uk/quote":{left:"«„",right:"»“"}}].forEach(function(r){return Q(r)});var Ne={name:"common/html/e-mail",queue:"end",handler:function(r,e,n){return n.isHTML?r:r.replace(/(^|[\s;(])([\w\-.]{2,64})@([\w\-.]{2,64})\.([a-z]{2,64})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1},Ce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Pe={name:"common/html/escape",index:"+100",queue:"end",handler:function(r){return r.replace(/[&<>"'/]/g,function(e){return Ce[e]})},disabled:!0},Ie={name:"common/html/nbr",index:"+10",queue:"end",handler:function(r){return r.replace(/([^\n>])\n(?=[^\n])/g,`$1<br/>
4
- `)},disabled:!0,htmlAttrs:!1},Oe=new RegExp("<("+["address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"].join("|")+")[>\\s]"),ae=`
1
+ __emailmaker__.define("js/typograf.all.Mun9CrLC.js",["require","exports","module"],function(Gr,ge,Kr){var b={exports:{}},ve=b.exports;(function(v,g){typeof ve=="object"&&typeof b<"u"?b.exports=g():typeof define=="function"&&define.amd?define(g):(v=typeof globalThis<"u"?globalThis:v||self,v.Typograf=g())})(void 0,function(){"use strict";var v=function(){return v=Object.assign||function(e){for(var n,a=1,t=arguments.length;a<t;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},v.apply(this,arguments)};function g(r,e,n){if(n||arguments.length===2)for(var a=0,t=e.length,o;a<t;a++)(o||!(a in e))&&(o||(o=Array.prototype.slice.call(e,0,a)),o[a]=e[a]);return r.concat(o||Array.prototype.slice.call(e))}var Re=[["iexcl",161],["cent",162],["pound",163],["curren",164],["yen",165],["brvbar",166],["sect",167],["uml",168],["copy",169],["ordf",170],["laquo",171],["not",172],["reg",174],["macr",175],["deg",176],["plusmn",177],["sup2",178],["sup3",179],["acute",180],["micro",181],["para",182],["middot",183],["cedil",184],["sup1",185],["ordm",186],["raquo",187],["frac14",188],["frac12",189],["frac34",190],["iquest",191],["Agrave",192],["Aacute",193],["Acirc",194],["Atilde",195],["Auml",196],["Aring",197],["AElig",198],["Ccedil",199],["Egrave",200],["Eacute",201],["Ecirc",202],["Euml",203],["Igrave",204],["Iacute",205],["Icirc",206],["Iuml",207],["ETH",208],["Ntilde",209],["Ograve",210],["Oacute",211],["Ocirc",212],["Otilde",213],["Ouml",214],["times",215],["Oslash",216],["Ugrave",217],["Uacute",218],["Ucirc",219],["Uuml",220],["Yacute",221],["THORN",222],["szlig",223],["agrave",224],["aacute",225],["acirc",226],["atilde",227],["auml",228],["aring",229],["aelig",230],["ccedil",231],["egrave",232],["eacute",233],["ecirc",234],["euml",235],["igrave",236],["iacute",237],["icirc",238],["iuml",239],["eth",240],["ntilde",241],["ograve",242],["oacute",243],["ocirc",244],["otilde",245],["ouml",246],["divide",247],["oslash",248],["ugrave",249],["uacute",250],["ucirc",251],["uuml",252],["yacute",253],["thorn",254],["yuml",255],["fnof",402],["Alpha",913],["Beta",914],["Gamma",915],["Delta",916],["Epsilon",917],["Zeta",918],["Eta",919],["Theta",920],["Iota",921],["Kappa",922],["Lambda",923],["Mu",924],["Nu",925],["Xi",926],["Omicron",927],["Pi",928],["Rho",929],["Sigma",931],["Tau",932],["Upsilon",933],["Phi",934],["Chi",935],["Psi",936],["Omega",937],["alpha",945],["beta",946],["gamma",947],["delta",948],["epsilon",949],["zeta",950],["eta",951],["theta",952],["iota",953],["kappa",954],["lambda",955],["mu",956],["nu",957],["xi",958],["omicron",959],["pi",960],["rho",961],["sigmaf",962],["sigma",963],["tau",964],["upsilon",965],["phi",966],["chi",967],["psi",968],["omega",969],["thetasym",977],["upsih",978],["piv",982],["bull",8226],["hellip",8230],["prime",8242],["Prime",8243],["oline",8254],["frasl",8260],["weierp",8472],["image",8465],["real",8476],["trade",8482],["alefsym",8501],["larr",8592],["uarr",8593],["rarr",8594],["darr",8595],["harr",8596],["crarr",8629],["lArr",8656],["uArr",8657],["rArr",8658],["dArr",8659],["hArr",8660],["forall",8704],["part",8706],["exist",8707],["empty",8709],["nabla",8711],["isin",8712],["notin",8713],["ni",8715],["prod",8719],["sum",8721],["minus",8722],["lowast",8727],["radic",8730],["prop",8733],["infin",8734],["ang",8736],["and",8743],["or",8744],["cap",8745],["cup",8746],["int",8747],["there4",8756],["sim",8764],["cong",8773],["asymp",8776],["ne",8800],["equiv",8801],["le",8804],["ge",8805],["sub",8834],["sup",8835],["nsub",8836],["sube",8838],["supe",8839],["oplus",8853],["otimes",8855],["perp",8869],["sdot",8901],["lceil",8968],["rceil",8969],["lfloor",8970],["rfloor",8971],["lang",9001],["rang",9002],["spades",9824],["clubs",9827],["hearts",9829],["diams",9830],["loz",9674],["OElig",338],["oelig",339],["Scaron",352],["scaron",353],["Yuml",376],["circ",710],["tilde",732],["ndash",8211],["mdash",8212],["lsquo",8216],["rsquo",8217],["sbquo",8218],["ldquo",8220],["rdquo",8221],["bdquo",8222],["dagger",8224],["Dagger",8225],["permil",8240],["lsaquo",8249],["rsaquo",8250],["euro",8364],["NestedGreaterGreater",8811],["NestedLessLess",8810]],P=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]],R=new((function(){function r(){var e=this;this.entities=this.prepareEntities(g(g([],Re,!0),P,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach(function(n){e.entitiesByName[n.name]=n,e.entitiesByNameEntity[n.nameEntity]=n,e.entitiesByDigitEntity[n.digitEntity]=n,e.entitiesByUtf[n.utf]=n}),this.invisibleEntities=this.prepareEntities(P)}return r.prototype.toUtf=function(e){var n=this;e.text.search(/&#/)!==-1&&(e.text=this.decHexToUtf(e.text)),e.text.search(/&[a-z]/i)!==-1&&(e.text=e.text.replace(/&[a-z\d]{2,31};/gi,function(a){var t=n.entitiesByNameEntity[a];return t?t.utf:a}))},r.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,function(n,a){return String.fromCharCode(parseInt(a,10))}).replace(/&#x([\da-f]{1,6});/gi,function(n,a){return String.fromCharCode(parseInt(a,16))})},r.prototype.restore=function(e){var n=e.prefs.htmlEntity,a=n.type,t=this.entities;if(a==="name"||a==="digit"){(n.onlyInvisible||n.list)&&(t=[],n.onlyInvisible&&(t=t.concat(this.invisibleEntities)),n.list&&(t=t.concat(this.prepareListParam(n.list))));var o=a==="name"?"nameEntity":"digitEntity";e.text=this.restoreEntitiesByIndex(e.text,o,t)}},r.prototype.getByUtf=function(e,n){var a;switch(n){case"digit":a=this.entitiesByDigitEntity[e];break;case"name":a=this.entitiesByNameEntity[e];break;default:a=e}return a},r.prototype.prepareEntities=function(e){var n=[];return e.forEach(function(a){var t=a[0],o=a[1],u=String.fromCharCode(o);n.push({name:t,nameEntity:"&"+t+";",digitEntity:"&#"+o+";",utf:u,reName:new RegExp("&"+t+";","g"),reUtf:new RegExp(u,"g")})}),n},r.prototype.prepareListParam=function(e){var n=this,a=[];return e.forEach(function(t){var o=n.entitiesByName[t];o&&a.push(o)}),a},r.prototype.restoreEntitiesByIndex=function(e,n,a){return a.forEach(function(t){e=e.replace(t.reUtf,t[n])}),e},r})()),x=[];function k(r){var e=(r||"").split("/")[0];e&&e!=="common"&&!q(e)&&(x.push(e),x.sort())}function _(){return x}function q(r){return r==="common"||x.indexOf(r)!==-1}function I(r,e){var n=r||e;return n?Array.isArray(n)?n:[n]:[]}function z(r){if(!r.length)throw Error('Not defined the property "locale".');r.forEach(function(e){if(!q(e))throw Error('"'.concat(e,'" is not supported locale.'))})}var O={};function i(r){return O[r]}function H(r){Object.keys(r).forEach(function(e){k(e),O[e]=r[e]})}var $e=["a","abbr","acronym","b","bdo","big","br","button","cite","code","dfn","em","i","img","input","kbd","label","map","object","q","samp","script","select","small","span","strong","sub","sup","textarea","time","tt","var"],Q=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),j="\\d+([.,]\\d+)?",ye=/\d/;function F(r){return r.search(ye)>-1}var c="",A="",xe=(function(){function r(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var e=[["<!--","-->"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(n){e.push(["<".concat(n,"(\\s[^>]*?)?>"),"</".concat(n,">")])}),this.tags={own:[],html:e.map(this.prepareRegExp),url:[Q]}}return r.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},r.prototype.show=function(e,n){for(var a=new RegExp(c+"tf\\d+"+c,"g"),t=new RegExp(c+"tf\\d"),o=function(l){return e.safeTags.hidden[n][l]||l},u=0,s=this.tags[n].length;u<s&&(e.text=e.text.replace(a,o),e.text.search(t)!==-1);u++);},r.prototype.hide=function(e,n){var a=this;e.safeTags.hidden[n]={};var t=this.pasteLabel.bind(this,e,n);this.tags[n].forEach(function(o){e.text=e.text.replace(a.prepareRegExp(o),t)})},r.prototype.hideHTMLTags=function(e){if(e.isHTML){var n=this.pasteLabel.bind(this,e,"html");e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,n).replace(/&lt;\/?[a-z][^]*?&gt;/gi,n).replace(/&[gl]t;/gi,n)}},r.prototype.getPrevLabel=function(e,n){for(var a=n-1;a>=0;a--)if(e[a]===c)return e.slice(a,n+1);return""},r.prototype.getNextLabel=function(e,n){for(var a=n+1;a<e.length;a++)if(e[a]===c)return e.slice(n,a+1);return""},r.prototype.getTagByLabel=function(e,n){var a=null;return this.groups.some(function(t){var o=e.safeTags.hidden[t][n];return typeof o<"u"&&(a={group:t,value:o}),a}),a},r.prototype.getTagInfo=function(e){if(!e)return null;var n={group:e.group};switch(e.group){case"html":n.name=e.value.split(/[<\s>]/)[1],n.isInline=$e.indexOf(n.name)>-1,n.isClosing=e.value.search(/^<\//)>-1;break;case"url":n.isInline=!0;break;case"own":n.isInline=!1}return n},r.prototype.pasteLabel=function(e,n,a){var t=e.safeTags,o=c+"tf"+t.counter+c;return t.hidden[n][o]=a,t.counter++,o},r.prototype.prepareRegExp=function(e){if(e instanceof RegExp)return e;var n=e[0],a=e[1],t=e[2];return new RegExp(n+(typeof t>"u"?"[^]*?":t)+a,"gi")},r.prototype.getPrevTagInfo=function(e,n,a){var t=this.getPrevLabel(n,a-1);if(t){var o=this.getTagByLabel(e,t);if(o)return this.getTagInfo(o)}return null},r.prototype.getNextTagInfo=function(e,n,a){var t=this.getNextLabel(n,a+1);if(t){var o=this.getTagByLabel(e,t);if(o)return this.getTagInfo(o)}return null},r})();function U(r,e){for(var n="";(e&1)===1&&(n+=r),e>>>=1,e!==0;)r+=r;return n}function W(r){return r.replace(/\u00A0/g," ")}function T(r,e){for(var n=0;n<e.length;n++)r=r.replace(e[n][0],e[n][1]);return r}function Y(r){return r.search(/(<\/?[a-z]|<!|&[lg]t;)/i)!==-1}function Ae(r){return r.replace(/\r\n?/g,`
2
+ `)}function Se(r,e){return e==="CRLF"?r.replace(/\n/g,`\r
3
+ `):e==="CR"?r.replace(/\n/g,"\r"):r}function S(r){return typeof r=="object"?JSON.parse(JSON.stringify(r)):r}var we={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},Ee=0,X="default",G=[],K=[];function ke(r){K.push(Z(r))}function qe(r){var e=Z(r);k(e.locale),G.push(e)}function Ue(r){r.sort(function(e,n){return e.index>n.index?1:-1})}function L(){var r=g([],G,!0);return Ue(r),r}function V(){return g([],K,!0)}function Te(r){if(typeof r.index=="number")return r.index;var e=we[r.name.split("/")[1]];return typeof e>"u"&&(e=Ee),typeof r.index=="string"?e+parseInt(r.index,10):e}function Z(r){var e=r.name.split("/"),n=e[0],a=e[1],t=e[2];return{name:r.name,shortName:t,handler:r.handler,queue:r.queue||X,enabled:r.disabled!==!0,locale:n,group:a,index:Te(r),settings:r.settings,live:r.live,htmlAttrs:r.htmlAttrs}}var Le="7.4.4";function J(r){return{type:r?.type||"default",list:r?.list,onlyInvisible:!!r?.onlyInvisible}}function ee(r){return r||"LF"}function Be(r){return{locale:I(r.locale),lineEnding:ee(r.lineEnding),live:!!r.live,ruleFilter:r.ruleFilter,enableRule:r.enableRule,disableRule:r.disableRule,processingSeparateParts:r.processingSeparateParts,htmlEntity:J(r.htmlEntity)}}function De(r,e){var n=v({},r);return e&&("locale"in e&&(n.locale=I(e.locale)),"htmlEntity"in e&&(n.htmlEntity=J(e.htmlEntity)),"lineEnding"in e&&(n.lineEnding=ee(e.lineEnding)),"processingSeparateParts"in e&&(n.processingSeparateParts=e.processingSeparateParts),"ruleFilter"in e&&(n.ruleFilter=e.ruleFilter)),n}var p=(function(){function r(e){var n=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs=Be(e),z(this.prefs.locale),this.safeTags=new xe,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=V(),this.innerRules.forEach(function(a){n.innerRulesByQueues[a.queue]=n.innerRulesByQueues[a.queue]||[],n.innerRulesByQueues[a.queue].push(a)}),this.rulesByQueues={},this.rules=L(),this.rules.forEach(function(a){n.prepareRuleSettings(a),n.rulesByQueues[a.queue]=n.rulesByQueues[a.queue]||[],n.rulesByQueues[a.queue].push(a)}),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}return r.addRule=function(e){qe(e)},r.addRules=function(e){var n=this;e.forEach(function(a){n.addRule(a)})},r.addInnerRule=function(e){ke(e)},r.addInnerRules=function(e){var n=this;e.forEach(function(a){n.addInnerRule(a)})},r.getRule=function(e){var n=null;return L().some(function(a){return a.name===e?(n=a,!0):!1}),n},r.getRules=function(){return L()},r.getInnerRules=function(){return V()},r.getLocales=function(){return _()},r.addLocale=function(e){k(e)},r.hasLocale=function(e){return q(e)},r.setData=function(e){H(e)},r.getData=function(e){return i(e)},r.prototype.execute=function(e,n){if(e=""+e,!e)return"";var a=De(this.prefs,n);z(a.locale);var t=this.prepareContext(e,a);return this.process(t)},r.prototype.getSetting=function(e,n){return this.settings[e]&&this.settings[e][n]},r.prototype.setSetting=function(e,n,a){this.settings[e]=this.settings[e]||{},this.settings[e][n]=a},r.prototype.isEnabledRule=function(e){return this.enabledRules[e]!==!1},r.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},r.prototype.enableRule=function(e){return this.enable(e,!0)},r.prototype.disableRule=function(e){return this.enable(e,!1)},r.prototype.addSafeTag=function(e,n,a){var t=e instanceof RegExp?e:[e,n,a];this.safeTags.add(t)},r.prototype.prepareContext=function(e,n){return{text:e,isHTML:Y(e),prefs:n,getData:function(a){return a==="char"?n.locale.map(function(t){return i(t+"/"+a)}).join(""):i(n.locale[0]+"/"+a)},safeTags:this.safeTags}},r.prototype.splitBySeparateParts=function(e){if(!e.isHTML||e.prefs.processingSeparateParts===!1)return[e.text];var n=[],a=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),t=0;return e.text.replace(a,function(o,u,s,l){return t!==l&&n.push((t?A:"")+e.text.slice(t,l)+A),n.push(o),t=l+o.length,o}),n.push(t?A+e.text.slice(t,e.text.length):e.text),n},r.prototype.process=function(e){var n=this;e.text=Ae(e.text),this.executeRules(e,"start"),this.safeTags.hide(e,"own"),this.executeRules(e,"hide-safe-tags-own"),this.safeTags.hide(e,"html"),this.executeRules(e,"hide-safe-tags-html");var a=e.isHTML,t=new RegExp(A,"g");return e.text=this.splitBySeparateParts(e).map(function(o){return e.text=o,e.isHTML=Y(o),n.safeTags.hideHTMLTags(e),n.safeTags.hide(e,"url"),n.executeRules(e,"hide-safe-tags-url"),n.executeRules(e,"hide-safe-tags"),R.toUtf(e),e.prefs.live&&(e.text=W(e.text)),n.executeRules(e,"utf"),n.executeRules(e),R.restore(e),n.executeRules(e,"html-entities"),n.safeTags.show(e,"url"),n.executeRules(e,"show-safe-tags-url"),e.text.replace(t,"")}).join(""),e.isHTML=a,this.safeTags.show(e,"html"),this.executeRules(e,"show-safe-tags-html"),this.safeTags.show(e,"own"),this.executeRules(e,"show-safe-tags-own"),this.executeRules(e,"end"),Se(e.text,e.prefs.lineEnding)},r.prototype.executeRules=function(e,n){var a=this;n===void 0&&(n=X);var t=this.rulesByQueues[n],o=this.innerRulesByQueues[n];o&&o.forEach(function(u){a.ruleIterator(e,u)}),t&&t.forEach(function(u){a.ruleIterator(e,u)})},r.prototype.ruleIterator=function(e,n){if(!(e.prefs.live===!0&&n.live===!1||e.prefs.live===!1&&n.live===!0)&&(n.locale==="common"||n.locale===e.prefs.locale[0])&&this.isEnabledRule(n.name)){if(e.prefs.ruleFilter&&!e.prefs.ruleFilter(n))return;this.onBeforeRule&&this.onBeforeRule(n.name,e),e.text=n.handler.call(this,e.text,this.settings[n.name],e),this.onAfterRule&&this.onAfterRule(n.name,e)}},r.prototype.prepareRuleSettings=function(e){this.settings[e.name]=S(e.settings),this.enabledRules[e.name]=e.enabled},r.prototype.enable=function(e,n){var a=this;Array.isArray(e)?e.forEach(function(t){a.enableByMask(t,n)}):this.enableByMask(e,n)},r.prototype.enableByMask=function(e,n){var a=this;if(e)if(e.search(/\*/)!==-1){var t=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*"));this.rules.forEach(function(o){var u=o.name;t.test(u)&&(a.enabledRules[u]=n)})}else this.enabledRules[e]=n},r.groups=[],r.titles={},r.version=Le,r})();[{"common/char":"a-z","common/dash":"--?|‒|–|—","common/quote":'«‹»›„“‟”"'},{"be/char":"абвгдежзйклмнопрстуфхцчшыьэюяёіўґ","be/quote":{left:"«“",right:"»”"}},{"bg/char":"абвгдежзийклмнопрстуфхцчшщъьюя","bg/quote":{left:"„’",right:"“’"}},{"ca/char":"abcdefghijlmnopqrstuvxyzàçèéíïòóúü","ca/quote":{left:"«“",right:"»”"}},{"cs/char":"a-záéíóúýčďěňřšťůž","cs/quote":{left:"„‚",right:"“‘"}},{"da/char":"a-zåæø","da/quote":{left:"»›",right:"«‹"}},{"de/char":"a-zßäöü","de/quote":{left:"„‚",right:"“‘"}},{"el/char":"ΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϲάέήίόύώ","el/quote":{left:"«“",right:"»”"}},{"en-GB/char":"a-z","en-GB/quote":{left:"‘“",right:"’”"}},{"en-US/char":"a-z","en-US/quote":{left:"“‘",right:"”’"},"en-US/shortWord":"a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet"},{"eo/char":"abcdefghijklmnoprstuvzĉĝĥĵŝŭ","eo/quote":{left:"“‘",right:"”’"}},{"es/char":"a-záéíñóúü","es/quote":{left:"«“",right:"»”"}},{"et/char":"abdefghijklmnoprstuvzäõöüšž","et/quote":{left:"„«",right:"“»"}},{"fi/char":"abcdefghijklmnopqrstuvyöäå","fi/quote":{left:"”’",right:"”’"}},{"fr/char":"a-zàâçèéêëîïôûüœæ","fr/quote":{left:"«‹",right:"»›",spacing:!0}},{"ga/char":"abcdefghilmnoprstuvwxyzáéíóú","ga/quote":{left:"“‘",right:"”’"}},{"hu/char":"a-záäéíóöúüőű","hu/quote":{left:"„»",right:"”«"}},{"it/char":"a-zàéèìòù","it/quote":{left:"«“",right:"»”"}},{"lv/char":"abcdefghijklmnopqrstuvxzæœ","lv/quote":{left:"«„",right:"»“"}},{"nl/char":"a-zäçèéêëîïñöûü","nl/quote":{left:"‘“",right:"’”"}},{"no/char":"a-zåæèéêòóôø","no/quote":{left:"«’",right:"»’"}},{"pl/char":"abcdefghijklmnoprstuvwxyzóąćęłńśźż","pl/quote":{left:"„«",right:"”»"}},{"ro/char":"abcdefghijklmnoprstuvxzîășț","ro/quote":{left:"„«",right:"”»"}},{"ru/char":"а-яё","ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[  ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[  ][^А-ЯЁ]|$)","ru/l":"а-яёa-z","ru/L":"А-ЯЁA-Z","ru/month":"январь|февраль|март|апрель|май|июнь|июль|август|сентябрь|октябрь|ноябрь|декабрь","ru/monthGenCase":"января|февраля|марта|апреля|мая|июня|июля|августа|сентября|октября|ноября|декабря","ru/monthPreCase":"январе|феврале|марте|апреле|мае|июне|июле|августе|сентябре|октябре|ноябре|декабре","ru/quote":{left:"«„‚",right:"»“‘",removeDuplicateQuotes:!0},"ru/shortMonth":"янв|фев|мар|апр|ма[ейя]|июн|июл|авг|сен|окт|ноя|дек","ru/shortWord":"а|бы|в|во|да|до|же|за|и|из|к|ко|ли|на|не|ни|но|о|об|от|по|с|со|то|у","ru/weekday":"понедельник|вторник|среда|четверг|пятница|суббота|воскресенье"},{"sk/char":"abcdefghijklmnoprstuvwxyzáäéíóôúýčďľňŕšťž","sk/quote":{left:"„‚",right:"“‘"}},{"sl/char":"a-zčšž","sl/quote":{left:"„‚",right:"“‘"}},{"sr/char":"abcdefghijklmnoprstuvzćčđšž","sr/quote":{left:"„’",right:"”’"}},{"sv/char":"a-zäåéö","sv/quote":{left:"”’",right:"”’"}},{"tr/char":"abcdefghijklmnoprstuvyzâçîöûüğış","tr/quote":{left:"“‘",right:"”’"}},{"uk/char":"абвгдежзийклмнопрстуфхцчшщьюяєіїґ","uk/quote":{left:"«„",right:"»“"}}].forEach(function(r){return H(r)});var Me={name:"common/html/e-mail",queue:"end",handler:function(r,e,n){return n.isHTML?r:r.replace(/(^|[\s;(])([\w\-.]{2,64})@([\w\-.]{2,64})\.([a-z]{2,64})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1},Ne={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Ce={name:"common/html/escape",index:"+100",queue:"end",handler:function(r){return r.replace(/[&<>"'/]/g,function(e){return Ne[e]})},disabled:!0},Pe={name:"common/html/nbr",index:"+10",queue:"end",handler:function(r){return r.replace(/([^\n>])\n(?=[^\n])/g,`$1<br/>
4
+ `)},disabled:!0,htmlAttrs:!1},_e=new RegExp("<("+["address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"].join("|")+")[>\\s]"),re=`
5
5
 
6
- `;p.addRules([Ne,Pe,Ie,{name:"common/html/p",index:"+5",queue:"end",handler:function(r){var e=r.split(ae);return e.forEach(function(n,a,t){n.trim()&&(Oe.test(n)||(t[a]=n.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1")))}),e.join(ae)},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(r,e,n){var a=this,t=new RegExp("(^|\\s)("+e.attrs.join("|")+`)=("[^"]*?"|'[^']*?')`,"gi"),o=A(n.prefs);return o.ruleFilter=function(u){return u.htmlAttrs!==!1},r.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(u,s,l){return s+l.replace(t,function(d,f,h,m){var $=m[0],E=m[m.length-1],y=m.slice(1,-1);return f+h+"="+$+a.execute(y,o)+E})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(r){return r.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(r){return r.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(r,e,n){return n.isHTML?r:r.replace(F,function(a,t,o){o=o.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),t==="http"?o=o.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):t==="https"&&(o=o.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var u=o,s=t+"://"+o,l='<a href="'+s+'">';return t==="http"||t==="https"?(u=u.replace(/^www\./,""),l+(t==="http"?u:t+"://"+u)+"</a>"):l+s+"</a>"})},disabled:!0,htmlAttrs:!1}]);var ze={name:"common/nbsp/afterNumber",handler:function(r,e,n){var a="(^|\\s)(\\d{1,5}) (["+n.getData("char")+"]+)";return r.replace(new RegExp(a,"gi"),"$1$2 $3")},disabled:!0},He={name:"common/nbsp/afterParagraphMark",handler:function(r){return r.replace(/¶ ?(?=\d)/g,"¶ ")}},je={name:"common/nbsp/afterSectionMark",handler:function(r,e,n){var a=n.prefs.locale[0];return r.replace(/§[ \u00A0\u2009]?(?=\d|I|V|X)/g,a==="ru"?"§ ":"§ ")}},Qe={name:"common/nbsp/afterShortWord",handler:function(r,e,n){var a=e.lengthShortWord,t=e.useShortWordList,o=i("common/quote"),u=n.getData("char"),s=n.getData("shortWord"),l="  ("+c+o,d=t&&s!==void 0?"(^|["+l+"])("+s+") ":"(^|["+l+"])(["+u+"]{1,"+a+"}) ",f="$1$2 ",h=new RegExp(d,"gim");return r.replace(h,f).replace(h,f)},settings:{lengthShortWord:2,useShortWordList:!1}},Fe={name:"common/nbsp/beforeShortLastNumber",handler:function(r,e,n){var a=n.getData("quote"),t=n.getData("char"),o=t.toUpperCase(),u=new RegExp("(["+t+o+"]) (?=\\d{1,"+e.lengthLastNumber+`}[-+−%'"`+a.right+")]?([.!?…]( ["+o+"]|$)|$))","gm");return r.replace(u,"$1 ")},live:!1,settings:{lengthLastNumber:2}},We={name:"common/nbsp/beforeShortLastWord",handler:function(r,e,n){var a=n.getData("char"),t=a.toUpperCase(),o=new RegExp("(["+a+"\\d]) (["+a+t+"]{1,"+e.lengthLastWord+"}[.!?…])( ["+t+"]|$)","g");return r.replace(o,"$1 $2$3")},settings:{lengthLastWord:3}},Ye={name:"common/nbsp/dpi",handler:function(r){return r.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1 $2")}};function te(r,e,n,a){return e+n.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+a}var Xe={name:"common/nbsp/nowrap",queue:"end",handler:function(r){return r.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,te).replace(/(<nobr>)(.*?)(<\/nobr>)/g,te)}},Ge={name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:X,disabled:!0};p.addRules([ze,He,je,Qe,Fe,We,Ye,Xe,Ge]),p.addRules([{name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(r,e){return r.replace(new RegExp("(^ ?|\\D |".concat(c,")(\\d{1,3}([    ]\\d{3})+)(?! ?[\\d-])"),"gm"),function(n,a,t){return a+t.replace(/\s/g,e.space)}).replace(/(\d{5,}([.,]\d+)?)/g,function(n,a){var t=a.match(/[.,]/),o=t?a.split(t):[a],u=o[0],s=o[1];return u=u.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+e.space),t?u+t+s:u})},settings:{space:" "}},{name:"common/number/fraction",handler:function(r){return r.replace(/(^|\D)1\/2(\D|$)/g,"$1½$2").replace(/(^|\D)1\/4(\D|$)/g,"$1¼$2").replace(/(^|\D)3\/4(\D|$)/g,"$1¾$2")}},{name:"common/number/mathSigns",handler:function(r){return T(r,[[/!=/g,"≠"],[/<=/g,"≤"],[/(^|[^=])>=/g,"$1≥"],[/<=>/g,"⇔"],[/<</g,"≪"],[/>>/g,"≫"],[/~=/g,"≅"],[/(^|[^+])\+-/g,"$1±"]])}},{name:"common/number/times",handler:function(r){return r.replace(/(\d)[ \u00A0]?[xх][ \u00A0]?(\d)/g,"$1×$2")}}]),p.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(r){return r.charCodeAt(0)===65279?r.slice(1):r}},{name:"common/other/repeatWord",handler:function(r,e,n){var a=i("common/quote"),t=n.getData("char"),o=`[;:,.?!
7
- `+a+"]",u=new RegExp("("+o+"|^)(["+t+"]{"+e.min+",}) \\2("+o+"|$)","gi");return r.replace(u,"$1$2$3")},settings:{min:2},disabled:!0}]);var Ke={name:"common/punctuation/apostrophe",handler:function(r,e,n){var a="(["+n.getData("char")+"])",t=new RegExp(a+"'"+a,"gi");return r.replace(t,"$1’$2")}},Ve={name:"common/punctuation/delDoublePunctuation",handler:function(r){return r.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},Je={name:"common/punctuation/hellip",handler:function(r,e,n){return n.prefs.locale[0]==="ru"?r.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1…"):r.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1…$2")}},Ze=2,er=new((function(){function r(){this.bufferQuotes={left:"",right:""},this.beforeLeft=`
6
+ `;p.addRules([Me,Ce,Pe,{name:"common/html/p",index:"+5",queue:"end",handler:function(r){var e=r.split(re);return e.forEach(function(n,a,t){n.trim()&&(_e.test(n)||(t[a]=n.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1")))}),e.join(re)},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(r,e,n){var a=this,t=new RegExp("(^|\\s)("+e.attrs.join("|")+`)=("[^"]*?"|'[^']*?')`,"gi"),o=S(n.prefs);return o.ruleFilter=function(u){return u.htmlAttrs!==!1},r.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(u,s,l){return s+l.replace(t,function(d,f,h,m){var $=m[0],E=m[m.length-1],y=m.slice(1,-1);return f+h+"="+$+a.execute(y,o)+E})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(r){return r.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(r){return r.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(r,e,n){return n.isHTML?r:r.replace(Q,function(a,t,o){o=o.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),t==="http"?o=o.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):t==="https"&&(o=o.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var u=o,s=t+"://"+o,l='<a href="'+s+'">';return t==="http"||t==="https"?(u=u.replace(/^www\./,""),l+(t==="http"?u:t+"://"+u)+"</a>"):l+s+"</a>"})},disabled:!0,htmlAttrs:!1}]);var Ie={name:"common/nbsp/afterNumber",handler:function(r,e,n){var a="(^|\\s)(\\d{1,5}) (["+n.getData("char")+"]+)";return r.replace(new RegExp(a,"gi"),"$1$2 $3")},disabled:!0},ze={name:"common/nbsp/afterParagraphMark",handler:function(r){return r.replace(/¶ ?(?=\d)/g,"¶ ")}},Oe={name:"common/nbsp/afterSectionMark",handler:function(r,e,n){var a=n.prefs.locale[0];return r.replace(/§[ \u00A0\u2009]?(?=\d|I|V|X)/g,a==="ru"?"§ ":"§ ")}},He={name:"common/nbsp/afterShortWord",handler:function(r,e,n){var a=e.lengthShortWord,t=e.useShortWordList,o=i("common/quote"),u=n.getData("char"),s=n.getData("shortWord"),l="  ("+c+o,d=t&&s!==void 0?"(^|["+l+"])("+s+") ":"(^|["+l+"])(["+u+"]{1,"+a+"}) ",f="$1$2 ",h=new RegExp(d,"gim");return r.replace(h,f).replace(h,f)},settings:{lengthShortWord:2,useShortWordList:!1}},Qe={name:"common/nbsp/beforeShortLastNumber",handler:function(r,e,n){var a=n.getData("quote"),t=n.getData("char"),o=t.toUpperCase(),u=new RegExp("(["+t+o+"]) (?=\\d{1,"+e.lengthLastNumber+`}[-+−%'"`+a.right+")]?([.!?…]( ["+o+"]|$)|$))","gm");return r.replace(u,"$1 ")},live:!1,settings:{lengthLastNumber:2}},je={name:"common/nbsp/beforeShortLastWord",handler:function(r,e,n){var a=n.getData("char"),t=a.toUpperCase(),o=new RegExp("(["+a+"\\d]) (["+a+t+"]{1,"+e.lengthLastWord+"}[.!?…])( ["+t+"]|$)","g");return r.replace(o,"$1 $2$3")},settings:{lengthLastWord:3}},Fe={name:"common/nbsp/dpi",handler:function(r){return r.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1 $2")}};function ne(r,e,n,a){return e+n.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+a}var We={name:"common/nbsp/nowrap",queue:"end",handler:function(r){return r.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,ne).replace(/(<nobr>)(.*?)(<\/nobr>)/g,ne)}},Ye={name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:W,disabled:!0};p.addRules([Ie,ze,Oe,He,Qe,je,Fe,We,Ye]),p.addRules([{name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(r,e){return r.replace(new RegExp("(^ ?|\\D |".concat(c,")(\\d{1,3}([    ]\\d{3})+)(?! ?[\\d-])"),"gm"),function(n,a,t){return a+t.replace(/\s/g,e.space)}).replace(/(\d{5,}([.,]\d+)?)/g,function(n,a){var t=a.match(/[.,]/),o=t?a.split(t):[a],u=o[0],s=o[1];return u=u.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+e.space),t?u+t+s:u})},settings:{space:" "}},{name:"common/number/fraction",handler:function(r){return r.replace(/(^|\D)1\/2(\D|$)/g,"$1½$2").replace(/(^|\D)1\/4(\D|$)/g,"$1¼$2").replace(/(^|\D)3\/4(\D|$)/g,"$1¾$2")}},{name:"common/number/mathSigns",handler:function(r){return T(r,[[/!=/g,"≠"],[/<=/g,"≤"],[/(^|[^=])>=/g,"$1≥"],[/<=>/g,"⇔"],[/<</g,"≪"],[/>>/g,"≫"],[/~=/g,"≅"],[/(^|[^+])\+-/g,"$1±"]])}},{name:"common/number/times",handler:function(r){return r.replace(/(\d)[ \u00A0]?[xх][ \u00A0]?(\d)/g,"$1×$2")}}]),p.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(r){return r.charCodeAt(0)===65279?r.slice(1):r}},{name:"common/other/repeatWord",handler:function(r,e,n){var a=i("common/quote"),t=n.getData("char"),o=`[;:,.?!
7
+ `+a+"]",u=new RegExp("("+o+"|^)(["+t+"]{"+e.min+",}) \\2("+o+"|$)","gi");return r.replace(u,"$1$2$3")},settings:{min:2},disabled:!0}]);var Xe={name:"common/punctuation/apostrophe",handler:function(r,e,n){var a="(["+n.getData("char")+"])",t=new RegExp(a+"'"+a,"gi");return r.replace(t,"$1’$2")}},Ge={name:"common/punctuation/delDoublePunctuation",handler:function(r){return r.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},Ke={name:"common/punctuation/hellip",handler:function(r,e,n){return n.prefs.locale[0]==="ru"?r.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1…"):r.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1…$2")}},Ve=2,Ze=new((function(){function r(){this.bufferQuotes={left:"",right:""},this.beforeLeft=`
8
8
   [(`,this.afterRight=`
9
-  !?.:;#*,…)\\]`}return r.prototype.process=function(e){var n=e.context.text;if(!this.count(n).total)return n;var a=e.settings,t=e.settings.left[0]===e.settings.right[0];return t&&(e.settings=A(e.settings),e.settings.left=this.bufferQuotes.left.slice(0,e.settings.left.length),e.settings.right=this.bufferQuotes.right.slice(0,e.settings.right.length)),e.settings.spacing&&(n=this.removeSpacing(n,e.settings)),n=this.set(n,e),e.settings.spacing&&(n=this.setSpacing(n,e.settings)),e.settings.removeDuplicateQuotes&&(n=this.removeDuplicates(n,e.settings)),t&&(n=this.returnOriginalQuotes(n,a,e.settings),e.settings=a),n},r.prototype.returnOriginalQuotes=function(e,n,a){for(var t={},o=0;o<a.left.length;o++)t[a.left[o]]=n.left[o],t[a.right[o]]=n.right[o];return e.replace(new RegExp("["+a.left+a.right+"]","g"),function(u){return t[u]})},r.prototype.count=function(e){var n={total:0};return e.replace(new RegExp("["+i("common/quote")+"]","g"),function(a){return n[a]||(n[a]=0),n[a]++,n.total++,a}),n},r.prototype.removeDuplicates=function(e,n){var a=n.left[0],t=n.left[1]||a,o=n.right[0];return a!==t?e:e.replace(new RegExp(a+a,"g"),a).replace(new RegExp(o+o,"g"),o)},r.prototype.removeSpacing=function(e,n){for(var a=0,t=n.left.length;a<t;a++){var o=n.left[a],u=n.right[a];e=e.replace(new RegExp(o+"([   ])","g"),o).replace(new RegExp("([   ])"+u,"g"),u)}return e},r.prototype.setSpacing=function(e,n){for(var a=0,t=n.left.length;a<t;a++){var o=n.left[a],u=n.right[a];e=e.replace(new RegExp(o+"([^ ])","g"),o+" $1").replace(new RegExp("([^ ])"+u,"g"),"$1 "+u)}return e},r.prototype.set=function(e,n){var a=i("common/quote"),t=n.settings.left[0],o=n.settings.left[1]||t,u=n.settings.right[0],s=new RegExp("(^|["+this.beforeLeft+"])(["+a+"]+)(?=[^\\s"+c+"])","gim"),l=new RegExp("([^\\s"+c+"])(["+a+"]+)(?=["+this.afterRight+"]|$)","gim");return e=e.replace(s,function(d,f,h){return f+U(t,h.length)}).replace(l,function(d,f,h){return f+U(u,h.length)}),e=this.setAboveTags(e,n),t!==o&&(e=this.setInner(e,n.settings)),e},r.prototype.setAboveTags=function(e,n){var a=this,t=i("common/quote"),o=n.settings.left[0],u=n.settings.right[0];return e.replace(new RegExp("(^|.)(["+t+"])(.|$)","gm"),function(s,l,d,f,h){if(l!==c&&f!==c)return s;if(l===c&&f===c)return d==='"'?l+a.getAboveTwoTags(e,h+1,n)+f:s;if(l===c){var m=a.afterRight.indexOf(f)>-1,$=n.safeTags.getPrevTagInfo(n.context,e,h+1);return m&&$&&$.group==="html"?l+($.isClosing?u:o)+f:l+(!f||m?u:o)+f}else{var E=a.beforeLeft.indexOf(l)>-1,y=n.safeTags.getNextTagInfo(n.context,e,h+1);return E&&y&&y.group==="html"?l+(y.isClosing?u:o)+f:l+(!l||E?o:u)+f}})},r.prototype.getAboveTwoTags=function(e,n,a){var t=a.safeTags.getPrevTagInfo(a.context,e,n),o=a.safeTags.getNextTagInfo(a.context,e,n);if(t&&t.group==="html"){if(!t.isClosing)return a.settings.left[0];if(o&&o.isClosing&&t.isClosing)return a.settings.right[0]}return e[n]},r.prototype.setInner=function(e,n){for(var a=n.left[0],t=n.right[0],o=0,u=this.getMaxLevel(e,a,t,n.left.length),s=o,l="",d=0,f=e.length;d<f;d++){var h=e[d];h===a?(l+=n.left[s>u-1?u-1:s],s++,s>u&&(s=u)):h===t?(s--,s<o&&(s=o),l+=n.right[s]):(h==='"'&&(s=o),l+=h)}return l},r.prototype.getMaxLevel=function(e,n,a,t){var o=this.count(e);return o[n]===o[a]?t:Math.min(t,Ze)},r})()),oe={};O().forEach(function(r){oe[r]=A(i(r+"/quote"))});var rr={name:"common/punctuation/quote",handler:function(r,e,n){var a=e[n.prefs.locale[0]];return a?er.process({context:n,settings:a,safeTags:this.safeTags}):r},settings:oe};p.addRules([Ke,Ve,Je,rr,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(r,e,n){var a=this.getSetting("common/punctuation/quote",n.prefs.locale[0]),t=R.getByUtf(a.left[0]),o=R.getByUtf(a.right[0]),u=R.getByUtf(a.left[1]),s=R.getByUtf(a.right[1]);u=u?"|"+u:"",s=s?"|"+s:"";var l=new RegExp("(<[aA]\\s[^>]*?>)("+t+u+")([^]*?)("+o+s+")(</[aA]>)","g");return r.replace(l,"$2$1$3$5$4")}}]);var nr={name:"common/space/beforeBracket",handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(["+a+".!?,;…)])\\(","gi");return r.replace(t,"$1 (")}},ar={name:"common/space/bracket",handler:function(r){return r.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},tr={name:"common/space/delBeforePercent",handler:function(r){return r.replace(/(\d)( |\u00A0)(%|‰|‱)/g,"$1$3")}},or={name:"common/space/delBeforePunctuation",handler:function(r){return r.replace(/(^|[^!?:;,.…]) ([!?:;,])(?!\))/g,"$1$2")}},ur={name:"common/space/delBetweenExclamationMarks",handler:function(r){return r.replace(/([!?]) (?=[!?])/g,"$1")}},sr={name:"common/space/delBeforeDot",handler:function(r){return r.replace(/(^|[^!?:;,.…]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},ir={name:"common/space/delLeadingBlanks",handler:function(r){return r.replace(/^[ \t]+/gm,"")},disabled:!0},lr={name:"common/space/delRepeatN",index:"-1",handler:function(r,e){var n=e.maxConsecutiveLineBreaks,a=new RegExp(`
9
+  !?.:;#*,…)\\]`}return r.prototype.process=function(e){var n=e.context.text;if(!this.count(n).total)return n;var a=e.settings,t=e.settings.left[0]===e.settings.right[0];return t&&(e.settings=S(e.settings),e.settings.left=this.bufferQuotes.left.slice(0,e.settings.left.length),e.settings.right=this.bufferQuotes.right.slice(0,e.settings.right.length)),e.settings.spacing&&(n=this.removeSpacing(n,e.settings)),n=this.set(n,e),e.settings.spacing&&(n=this.setSpacing(n,e.settings)),e.settings.removeDuplicateQuotes&&(n=this.removeDuplicates(n,e.settings)),t&&(n=this.returnOriginalQuotes(n,a,e.settings),e.settings=a),n},r.prototype.returnOriginalQuotes=function(e,n,a){for(var t={},o=0;o<a.left.length;o++)t[a.left[o]]=n.left[o],t[a.right[o]]=n.right[o];return e.replace(new RegExp("["+a.left+a.right+"]","g"),function(u){return t[u]})},r.prototype.count=function(e){var n={total:0};return e.replace(new RegExp("["+i("common/quote")+"]","g"),function(a){return n[a]||(n[a]=0),n[a]++,n.total++,a}),n},r.prototype.removeDuplicates=function(e,n){var a=n.left[0],t=n.left[1]||a,o=n.right[0];return a!==t?e:e.replace(new RegExp(a+a,"g"),a).replace(new RegExp(o+o,"g"),o)},r.prototype.removeSpacing=function(e,n){for(var a=0,t=n.left.length;a<t;a++){var o=n.left[a],u=n.right[a];e=e.replace(new RegExp(o+"([   ])","g"),o).replace(new RegExp("([   ])"+u,"g"),u)}return e},r.prototype.setSpacing=function(e,n){for(var a=0,t=n.left.length;a<t;a++){var o=n.left[a],u=n.right[a];e=e.replace(new RegExp(o+"([^ ])","g"),o+" $1").replace(new RegExp("([^ ])"+u,"g"),"$1 "+u)}return e},r.prototype.set=function(e,n){var a=i("common/quote"),t=n.settings.left[0],o=n.settings.left[1]||t,u=n.settings.right[0],s=new RegExp("(^|["+this.beforeLeft+"])(["+a+"]+)(?=[^\\s"+c+"])","gim"),l=new RegExp("([^\\s"+c+"])(["+a+"]+)(?=["+this.afterRight+"]|$)","gim");return e=e.replace(s,function(d,f,h){return f+U(t,h.length)}).replace(l,function(d,f,h){return f+U(u,h.length)}),e=this.setAboveTags(e,n),t!==o&&(e=this.setInner(e,n.settings)),e},r.prototype.setAboveTags=function(e,n){var a=this,t=i("common/quote"),o=n.settings.left[0],u=n.settings.right[0];return e.replace(new RegExp("(^|.)(["+t+"])(.|$)","gm"),function(s,l,d,f,h){if(l!==c&&f!==c)return s;if(l===c&&f===c)return d==='"'?l+a.getAboveTwoTags(e,h+1,n)+f:s;if(l===c){var m=a.afterRight.indexOf(f)>-1,$=n.safeTags.getPrevTagInfo(n.context,e,h+1);return m&&$&&$.group==="html"?l+($.isClosing?u:o)+f:l+(!f||m?u:o)+f}else{var E=a.beforeLeft.indexOf(l)>-1,y=n.safeTags.getNextTagInfo(n.context,e,h+1);return E&&y&&y.group==="html"?l+(y.isClosing?u:o)+f:l+(!l||E?o:u)+f}})},r.prototype.getAboveTwoTags=function(e,n,a){var t=a.safeTags.getPrevTagInfo(a.context,e,n),o=a.safeTags.getNextTagInfo(a.context,e,n);if(t&&t.group==="html"){if(!t.isClosing)return a.settings.left[0];if(o&&o.isClosing&&t.isClosing)return a.settings.right[0]}return e[n]},r.prototype.setInner=function(e,n){for(var a=n.left[0],t=n.right[0],o=0,u=this.getMaxLevel(e,a,t,n.left.length),s=o,l="",d=0,f=e.length;d<f;d++){var h=e[d];h===a?(l+=n.left[s>u-1?u-1:s],s++,s>u&&(s=u)):h===t?(s--,s<o&&(s=o),l+=n.right[s]):(h==='"'&&(s=o),l+=h)}return l},r.prototype.getMaxLevel=function(e,n,a,t){var o=this.count(e);return o[n]===o[a]?t:Math.min(t,Ve)},r})()),ae={};_().forEach(function(r){ae[r]=S(i(r+"/quote"))});var Je={name:"common/punctuation/quote",handler:function(r,e,n){var a=e[n.prefs.locale[0]];return a?Ze.process({context:n,settings:a,safeTags:this.safeTags}):r},settings:ae};p.addRules([Xe,Ge,Ke,Je,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(r,e,n){var a=this.getSetting("common/punctuation/quote",n.prefs.locale[0]),t=R.getByUtf(a.left[0]),o=R.getByUtf(a.right[0]),u=R.getByUtf(a.left[1]),s=R.getByUtf(a.right[1]);u=u?"|"+u:"",s=s?"|"+s:"";var l=new RegExp("(<[aA]\\s[^>]*?>)("+t+u+")([^]*?)("+o+s+")(</[aA]>)","g");return r.replace(l,"$2$1$3$5$4")}}]);var er={name:"common/space/beforeBracket",handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(["+a+".!?,;…)])\\(","gi");return r.replace(t,"$1 (")}},rr={name:"common/space/bracket",handler:function(r){return r.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},nr={name:"common/space/delBeforePercent",handler:function(r){return r.replace(/(\d)( |\u00A0)(%|‰|‱)/g,"$1$3")}},ar={name:"common/space/delBeforePunctuation",handler:function(r){return r.replace(/(^|[^!?:;,.…]) ([!?:;,])(?!\))/g,"$1$2")}},tr={name:"common/space/delBetweenExclamationMarks",handler:function(r){return r.replace(/([!?]) (?=[!?])/g,"$1")}},or={name:"common/space/delBeforeDot",handler:function(r){return r.replace(/(^|[^!?:;,.…]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},ur={name:"common/space/delLeadingBlanks",handler:function(r){return r.replace(/^[ \t]+/gm,"")},disabled:!0},sr={name:"common/space/delRepeatN",index:"-1",handler:function(r,e){var n=e.maxConsecutiveLineBreaks,a=new RegExp(`
10
10
  {`.concat(n+1,",}"),"g"),t=U(`
11
- `,n);return r.replace(a,t)},settings:{maxConsecutiveLineBreaks:2}},cr={name:"common/space/delRepeatSpace",index:"-1",handler:function(r){return r.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},pr={name:"common/space/delTrailingBlanks",index:"-3",handler:function(r){return r.replace(/[ \t]+\n/g,`
12
- `)}},fr={name:"common/space/insertFinalNewline",queue:"end",handler:function(r){return r[r.length-1]===`
11
+ `,n);return r.replace(a,t)},settings:{maxConsecutiveLineBreaks:2}},ir={name:"common/space/delRepeatSpace",index:"-1",handler:function(r){return r.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},lr={name:"common/space/delTrailingBlanks",index:"-3",handler:function(r){return r.replace(/[ \t]+\n/g,`
12
+ `)}},cr={name:"common/space/insertFinalNewline",queue:"end",handler:function(r){return r[r.length-1]===`
13
13
  `?r:r+`
14
- `},live:!1,disabled:!0},hr={name:"common/space/replaceTab",index:"-5",handler:function(r){return r.replace(/\t/g," ")}},dr={name:"common/space/squareBracket",handler:function(r){return r.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},mr={name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(r){return r.trimLeft()}:function(r){return r.replace(/^[\s\uFEFF\xA0]+/g,"")}},gr={name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(r){return r.trimRight()}:function(r){return r.replace(/[\s\uFEFF\xA0]+$/g,"")}},vr=new RegExp('(\\D):([^)",:.?\\s\\/\\\\'+c+"])","g"),br={name:"common/space/afterColon",handler:function(r){return r.replace(vr,"$1: $2")}},Rr={name:"common/space/afterComma",handler:function(r,e,n){var a=n.getData("quote"),t=typeof a=="string"?a:a.right;return r.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\'+c+t+"])","g"),function(o,u,s){return Y(u)&&Y(s)?o:u+", "+s})}},$r=new RegExp("\\?([^).…!;?\\s[\\])"+c+i("common/quote")+"])","g"),yr={name:"common/space/afterQuestionMark",handler:function(r){return r.replace($r,"? $1")}},xr=new RegExp("!([^).…!;?\\s[\\])"+c+i("common/quote")+"])","g"),wr={name:"common/space/afterExclamationMark",handler:function(r){return r.replace(xr,"! $1")}},Ar=new RegExp(";([^).…!;?\\s[\\])"+c+i("common/quote")+"])","g");p.addRules([br,Rr,yr,wr,{name:"common/space/afterSemicolon",handler:function(r){return r.replace(Ar,"; $1")}},nr,ar,sr,tr,or,ur,ir,lr,cr,pr,fr,hr,dr,mr,gr]),p.addRules([{name:"common/symbols/arrow",handler:function(r){return T(r,[[/(^|[^-])->(?!>)/g,"$1→"],[/(^|[^<])<-(?!-)/g,"$1←"]])}},{name:"common/symbols/cf",handler:function(r){var e=new RegExp('(^|[\\s(\\[+≈±−—–\\-])(\\d+(?:[.,]\\d+)?)[   ]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return r.replace(e,"$1$2 °$3$4")}},{name:"common/symbols/copy",handler:function(r){return T(r,[[/\(r\)/gi,"®"],[/(copyright )?\((c|с)\)/gi,"©"],[/\(tm\)/gi,"™"]])}}]),p.addRules([{name:"en-US/dash/main",index:"-5",handler:function(r){var e=i("common/dash"),n=" ",a="—",t="[ ".concat(n,"]"),o="[ ".concat(n,`
15
- ]`),u=new RegExp("".concat(t,"(").concat(e,")(").concat(o,")"),"g");return r.replace(u,"".concat(n).concat(a,"$2"))}}]),p.addRules([{name:"ru/dash/centuries",handler:function(r,e){var n="("+i("common/dash")+")",a=new RegExp("(X|I|V)[ | ]?"+n+"[ | ]?(X|I|V)","g");return r.replace(a,"$1"+e.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/daysMonth",handler:function(r,e){var n=new RegExp("(^|\\s)([123]?\\d)("+i("common/dash")+")([123]?\\d)[  ]("+i("ru/monthGenCase")+")","g");return r.replace(n,"$1$2"+e.dash+"$4 $5")},settings:{dash:"–"}},{name:"ru/dash/de",handler:function(r){var e=new RegExp("([a-яё]+) де"+i("ru/dashAfterDe"),"g");return r.replace(e,"$1-де")},disabled:!0},{name:"ru/dash/decade",handler:function(r,e){var n=new RegExp("(^|\\s)(\\d{3}|\\d)0("+i("common/dash")+")(\\d{3}|\\d)0(-е[  ])(?=г\\.?[  ]?г|год)","g");return r.replace(n,"$1$20"+e.dash+"$40$5")},settings:{dash:"–"}},{name:"ru/dash/directSpeech",handler:function(r){var e=i("common/dash"),n=new RegExp('(["»‘“,])[ | ]?('.concat(e,")[ | ]"),"g"),a=new RegExp("(^|".concat(c,")(").concat(e,")( | )"),"gm"),t=new RegExp("([.…?!])[  ](".concat(e,")[  ]"),"g");return r.replace(n,"$1 — ").replace(a,"$1— ").replace(t,"$1 — ")}},{name:"ru/dash/izpod",handler:function(r){var e=new RegExp(i("ru/dashBefore")+"(И|и)з под"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2з-под")}},{name:"ru/dash/izza",handler:function(r){var e=new RegExp(i("ru/dashBefore")+"(И|и)з за"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2з-за")}},{name:"ru/dash/ka",handler:function(r){var e=new RegExp("([a-яё]+) ка(сь)?"+i("ru/dashAfter"),"g");return r.replace(e,"$1-ка$2")}},{name:"ru/dash/koe",handler:function(r){var e=new RegExp(i("ru/dashBefore")+"([Кк]о[ей])\\s([а-яё]{3,})"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(r){var e=i("common/dash"),n=new RegExp("([  ])("+e+")([  \\n])","g");return r.replace(n," —$3")}},{name:"ru/dash/month",handler:function(r,e){var n="("+i("ru/month")+")",a="("+i("ru/monthPreCase")+")",t=i("common/dash"),o=new RegExp(n+" ?("+t+") ?"+n,"gi"),u=new RegExp(a+" ?("+t+") ?"+a,"gi"),s="$1"+e.dash+"$3";return r.replace(o,s).replace(u,s)},settings:{dash:"–"}},{name:"ru/dash/surname",handler:function(r){var e=new RegExp("([А-ЯЁ][а-яё]+)\\s-([а-яё]{1,3})(?![^а-яё]|$)","g");return r.replace(e,"$1 —$2")}},{name:"ru/dash/taki",handler:function(r){var e=new RegExp("(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\s(таки)"+i("ru/dashAfter"),"g");return r.replace(e,"$1-$2")}},{name:"ru/dash/time",handler:function(r,e){var n=new RegExp(i("ru/dashBefore")+"(\\d?\\d:[0-5]\\d)"+i("common/dash")+"(\\d?\\d:[0-5]\\d)"+i("ru/dashAfter"),"g");return r.replace(n,"$1$2"+e.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/to",handler:function(r){var e=new RegExp("(^|[^А-ЯЁа-яё\\w])([Оо]ткуда|[Кк]уда|[Гг]де|[Кк]огда|[Зз]ачем|[Пп]очему|[Кк]ак|[Кк]ако[ейм]|[Кк]акая|[Кк]аки[емх]|[Кк]акими|[Кк]акую|[Чч]то|[Чч]его|[Чч]е[йм]|[Чч]ьим?|[Кк]то|[Кк]ого|[Кк]ому|[Кк]ем)( | -|- )(то|либо|нибудь)"+i("ru/dashAfter"),"g");return r.replace(e,function(n,a,t,o,u){var s=t+o+u;return s==="как то"||s==="Как то"?n:a+t+"-"+u})}},{name:"ru/dash/kakto",handler:function(r){var e=new RegExp("(^|[^А-ЯЁа-яё\\w])([Кк]ак) то"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2-то")}},{name:"ru/dash/weekday",handler:function(r,e){var n="("+i("ru/weekday")+")",a=new RegExp(n+" ?("+i("common/dash")+") ?"+n,"gi");return r.replace(a,"$1"+e.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/years",handler:function(r,e){var n=i("common/dash"),a=new RegExp("(\\D|^)(\\d{4})[  ]?("+n+")[  ]?(\\d{4})(?=[  ]?г)","g");return r.replace(a,function(t,o,u,s,l){return parseInt(u,10)<parseInt(l,10)?o+u+e.dash+l:t})},settings:{dash:"–"}}]);var ue="(-|\\.|\\/)",se="(-|\\/)",Sr=new RegExp("(^|\\D)(\\d{4})"+ue+"(\\d{2})"+ue+"(\\d{2})(\\D|$)","gi"),Er=new RegExp("(^|\\D)(\\d{2})"+se+"(\\d{2})"+se+"(\\d{4})(\\D|$)","gi");p.addRules([{name:"ru/date/fromISO",handler:function(r){return r.replace(Sr,"$1$6.$4.$2$7").replace(Er,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(r){var e="( | )",n=i("ru/monthGenCase"),a=i("ru/weekday"),t=new RegExp("(\\d)"+e+"("+n+"),"+e+"("+a+")","gi");return r.replace(t,function(o,u,s,l,d,f){return u+s+l.toLowerCase()+","+d+f.toLowerCase()})}}]),p.addRules([{name:"ru/money/currency",handler:function(r){var e="([$€¥Ұ£₤₽])",n="[    ]",a=new RegExp("(^|[\\D]{2})"+e+" ?("+W+"("+n+"\\d{3})*)("+n+"?(тыс\\.|млн|млрд|трлн))?","gm"),t=new RegExp("(^|[\\D])("+W+") ?"+e,"gm");return r.replace(a,function(o,u,s,l,d,f,h,m){return u+l+(m?" "+m:"")+" "+s}).replace(t,"$1$2 $4")},disabled:!0},{name:"ru/money/ruble",handler:function(r){var e="$1 ₽",n="(\\d+)( | )?(р|руб)\\.",a=new RegExp("^"+n+"$","g"),t=new RegExp(n+"(?=[!?,:;])","g"),o=new RegExp(n+"(?=\\s+[A-ЯЁ])","g");return r.replace(a,e).replace(t,e).replace(o,e+".")},disabled:!0}]);function ie(r,e,n,a){return n==="дд"&&a==="мм"||["рф","ру","рус","орг","укр","бг","срб"].indexOf(a)>-1?r:e+n+". "+a+"."}var kr={name:"ru/nbsp/abbr",handler:function(r){var e=new RegExp("(^|\\s|".concat(c,")([а-яё]{1,3})\\. ?([а-яё]{1,3})\\."),"g");return r.replace(e,ie).replace(e,ie)}},qr={name:"ru/nbsp/addr",handler:function(r){return r.replace(/(\s|^)(дом|д\.|кв\.|под\.|п-д) *(\d+)/gi,"$1$2 $3").replace(/(\s|^)(мкр-н|мк-н|мкр\.|мкрн)\s/gi,"$1$2 ").replace(/(\s|^)(эт\.) *(-?\d+)/gi,"$1$2 $3").replace(/(\s|^)(\d+) +этаж([^а-яё]|$)/gi,"$1$2 этаж$3").replace(/(\s|^)литер\s([А-Я]|$)/gi,"$1литер $2").replace(/(\s|^)(обл|кр|ст|пос|с|д|ул|пер|пр|пр-т|просп|пл|бул|б-р|наб|ш|туп|оф|комн?|уч|вл|влад|стр|кор)\. *([а-яёa-z\d]+)/gi,"$1$2. $3").replace(/(\D[ \u00A0]|^)г\. ?([А-ЯЁ])/gm,"$1г. $2")}},Ur={name:"ru/nbsp/afterNumberSign",handler:function(r){return r.replace(/№[ \u00A0\u2009]?(\d|п\/п)/g,"№ $1")}},Tr={name:"ru/nbsp/beforeParticle",index:"+5",handler:function(r){var e="(ли|ль|же|ж|бы|б)",n=new RegExp("([А-ЯЁа-яё]) "+e+'(?=[,;:?!"‘“»])',"g"),a=new RegExp("([А-ЯЁа-яё])[  ]"+e+"[  ]","g");return r.replace(n,"$1 $2").replace(a,"$1 $2 ")}},Lr={name:"ru/nbsp/centuries",handler:function(r){var e=i("common/dash"),n="(^|\\s)([VIX]+)",a='(?=[,;:?!"‘“»]|$)',t=new RegExp(n+"[  ]?в\\.?"+a,"gm"),o=new RegExp(n+"("+e+")([VIX]+)[  ]?в\\.?([  ]?в\\.?)?"+a,"gm");return r.replace(t,"$1$2 в.").replace(o,"$1$2$3$4 вв.")}},Br={name:"ru/nbsp/dayMonth",handler:function(r){var e=new RegExp("(\\d{1,2}) ("+i("ru/shortMonth")+")","gi");return r.replace(e,"$1 $2")}},Dr={name:"ru/nbsp/initials",handler:function(r){var e="   ",n=i("ru/quote"),a=new RegExp("(^|[("+e+n.left+c+'"])([А-ЯЁ])\\.['+e+"]?([А-ЯЁ])\\.["+e+"]?([А-ЯЁ][а-яё]+)","gm");return r.replace(a,"$1$2. $3. $4")}},Mr={2:"²","²":"²",3:"³","³":"³","":""};p.addRules([kr,qr,Ur,Tr,Lr,Br,Dr,{name:"ru/nbsp/m",index:"+5",handler:function(r){var e=new RegExp("(^|[\\s,.\\("+c+"])(\\d+)[  ]?(мм?|см|км|дм|гм|mm?|km|cm|dm)([23²³])?([\\s\\).!?,;"+c+"]|$)","gm");return r.replace(e,function(n,a,t,o,u,s){return a+t+" "+o+Mr[u||""]+(s===" "?" ":s)})}},{name:"ru/nbsp/mln",handler:function(r){return r.replace(/(\d) ?(тыс|млн|млрд|трлн)(\.|\s|$)/gi,"$1 $2$3")}},{name:"ru/nbsp/ooo",handler:function(r){return r.replace(/(^|[^a-яёA-ЯЁ])(ООО|ОАО|ЗАО|НИИ|ПБОЮЛ) /g,"$1$2 ")}},{name:"ru/nbsp/page",handler:function(r){var e=new RegExp("(^|[)\\s"+c+"])(стр|гл|рис|илл?|ст|п|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return r.replace(e,"$1$2. $3$4")}},{name:"ru/nbsp/ps",handler:function(r){var e=new RegExp("(^|\\s|".concat(c,")[pз]\\.[  ]?([pз]\\.[  ]?)?[sы]\\.:? "),"gim");return r.replace(e,function(n,a,t){return a+(t?"P. P. S. ":"P. S. ")})}},{name:"ru/nbsp/rubleKopek",handler:function(r){return r.replace(/(\d) ?(?=(руб|коп)\.)/g,"$1 ")}},{name:"ru/nbsp/see",handler:function(r){var e=new RegExp("(^|\\s|".concat(c,"|\\()(см|им)\\.[  ]?([а-яё0-9a-z]+)([\\s.,?!]|$)"),"gi");return r.replace(e,function(n,a,t,o,u){return(a===" "?" ":a)+t+". "+o+u})}},{name:"ru/nbsp/year",handler:function(r){return r.replace(/(^|\D)(\d{4}) ?г([ ,;.\n]|$)/g,"$1$2 г$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(r){var e=i("common/dash"),n=new RegExp("(^|\\D)(\\d{4})("+e+')(\\d{4})[  ]?г\\.?([  ]?г\\.)?(?=[,;:?!"‘“»\\s]|$)',"gm");return r.replace(n,"$1$2$3$4 гг.")}}]),p.addRules([{name:"ru/number/comma",handler:function(r){return r.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%‰°×x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(\\d[%‰]?)-(ый|ой|ая|ое|ые|ым|ом|ых|ого|ому|ыми)(?!["+a+"])","g");return r.replace(t,function(o,u,s){return u+"-"+{ой:"й",ый:"й",ая:"я",ое:"е",ые:"е",ым:"м",ом:"м",ых:"х",ого:"го",ому:"му",ыми:"ми"}[s]})}}]);function S(r,e){var n=new RegExp('<span class="('+e.join("|")+')">([^]*?)</span>',"g");return r.replace(n,"$2")}function B(r,e){return r.replace(/<title>[^]*?<\/title>/i,function(n){return S(n,e)})}var le=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],D="ru/optalign/bracket",_r={name:D,handler:function(r){return r.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/^\(/gm,'<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0,htmlAttrs:!1},Nr={name:D,queue:"start",handler:function(r){return S(r,le)},htmlAttrs:!1},Cr={name:D,queue:"end",handler:function(r){return B(r,le)},htmlAttrs:!1},ce=["typograf-oa-comma","typograf-oa-comma-sp"],M="ru/optalign/comma",Pr={name:M,handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(["+a+"\\d́]+), ","gi");return r.replace(t,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},Ir={name:M,queue:"start",handler:function(r){return S(r,ce)},htmlAttrs:!1},Or={name:M,queue:"end",handler:function(r){return B(r,ce)},htmlAttrs:!1},pe=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],_="ru/optalign/quote",zr={name:_,handler:function(r){var e=this.getSetting("common/punctuation/quote","ru"),n="(["+e.left[0]+(e.left[1]||"")+"])",a=new RegExp(`(^|
14
+ `},live:!1,disabled:!0},pr={name:"common/space/replaceTab",index:"-5",handler:function(r){return r.replace(/\t/g," ")}},fr={name:"common/space/squareBracket",handler:function(r){return r.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},hr={name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(r){return r.trimLeft()}:function(r){return r.replace(/^[\s\uFEFF\xA0]+/g,"")}},dr={name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(r){return r.trimRight()}:function(r){return r.replace(/[\s\uFEFF\xA0]+$/g,"")}},mr=new RegExp('(\\D):([^)",:.?\\s\\/\\\\'+c+"])","g"),gr={name:"common/space/afterColon",handler:function(r){return r.replace(mr,"$1: $2")}},vr={name:"common/space/afterComma",handler:function(r,e,n){var a=n.getData("quote"),t=typeof a=="string"?a:a.right;return r.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\'+c+t+"])","g"),function(o,u,s){return F(u)&&F(s)?o:u+", "+s})}},br=new RegExp("\\?([^).…!;?\\s[\\])"+c+i("common/quote")+"])","g"),Rr={name:"common/space/afterQuestionMark",handler:function(r){return r.replace(br,"? $1")}},$r=new RegExp("!([^).…!;?\\s[\\])"+c+i("common/quote")+"])","g"),yr={name:"common/space/afterExclamationMark",handler:function(r){return r.replace($r,"! $1")}},xr=new RegExp(";([^).…!;?\\s[\\])"+c+i("common/quote")+"])","g");p.addRules([gr,vr,Rr,yr,{name:"common/space/afterSemicolon",handler:function(r){return r.replace(xr,"; $1")}},er,rr,or,nr,ar,tr,ur,sr,ir,lr,cr,pr,fr,hr,dr]),p.addRules([{name:"common/symbols/arrow",handler:function(r){return T(r,[[/(^|[^-])->(?!>)/g,"$1→"],[/(^|[^<])<-(?!-)/g,"$1←"]])}},{name:"common/symbols/cf",handler:function(r){var e=new RegExp('(^|[\\s(\\[+≈±−—–\\-])(\\d+(?:[.,]\\d+)?)[   ]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return r.replace(e,"$1$2 °$3$4")}},{name:"common/symbols/copy",handler:function(r){return T(r,[[/\(r\)/gi,"®"],[/(copyright )?\((c|с)\)/gi,"©"],[/\(tm\)/gi,"™"]])}}]),p.addRules([{name:"en-US/dash/main",index:"-5",handler:function(r){var e=i("common/dash"),n=" ",a="—",t="[ ".concat(n,"]"),o="[ ".concat(n,`
15
+ ]`),u=new RegExp("".concat(t,"(").concat(e,")(").concat(o,")"),"g");return r.replace(u,"".concat(n).concat(a,"$2"))}}]),p.addRules([{name:"ru/dash/centuries",handler:function(r,e){var n="("+i("common/dash")+")",a=new RegExp("(X|I|V)[ | ]?"+n+"[ | ]?(X|I|V)","g");return r.replace(a,"$1"+e.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/daysMonth",handler:function(r,e){var n=new RegExp("(^|\\s)([123]?\\d)("+i("common/dash")+")([123]?\\d)[  ]("+i("ru/monthGenCase")+")","g");return r.replace(n,"$1$2"+e.dash+"$4 $5")},settings:{dash:"–"}},{name:"ru/dash/de",handler:function(r){var e=new RegExp("([a-яё]+) де"+i("ru/dashAfterDe"),"g");return r.replace(e,"$1-де")},disabled:!0},{name:"ru/dash/decade",handler:function(r,e){var n=new RegExp("(^|\\s)(\\d{3}|\\d)0("+i("common/dash")+")(\\d{3}|\\d)0(-е[  ])(?=г\\.?[  ]?г|год)","g");return r.replace(n,"$1$20"+e.dash+"$40$5")},settings:{dash:"–"}},{name:"ru/dash/directSpeech",handler:function(r){var e=i("common/dash"),n=new RegExp('(["»‘“,])[ | ]?('.concat(e,")[ | ]"),"g"),a=new RegExp("(^|".concat(c,")(").concat(e,")( | )"),"gm"),t=new RegExp("([.…?!])[  ](".concat(e,")[  ]"),"g");return r.replace(n,"$1 — ").replace(a,"$1— ").replace(t,"$1 — ")}},{name:"ru/dash/izpod",handler:function(r){var e=new RegExp(i("ru/dashBefore")+"(И|и)з под"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2з-под")}},{name:"ru/dash/izza",handler:function(r){var e=new RegExp(i("ru/dashBefore")+"(И|и)з за"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2з-за")}},{name:"ru/dash/ka",handler:function(r){var e=new RegExp("([a-яё]+) ка(сь)?"+i("ru/dashAfter"),"g");return r.replace(e,"$1-ка$2")}},{name:"ru/dash/koe",handler:function(r){var e=new RegExp(i("ru/dashBefore")+"([Кк]о[ей])\\s([а-яё]{3,})"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(r){var e=i("common/dash"),n=new RegExp("([  ])("+e+")([  \\n])","g");return r.replace(n," —$3")}},{name:"ru/dash/month",handler:function(r,e){var n="("+i("ru/month")+")",a="("+i("ru/monthPreCase")+")",t=i("common/dash"),o=new RegExp(n+" ?("+t+") ?"+n,"gi"),u=new RegExp(a+" ?("+t+") ?"+a,"gi"),s="$1"+e.dash+"$3";return r.replace(o,s).replace(u,s)},settings:{dash:"–"}},{name:"ru/dash/surname",handler:function(r){var e=new RegExp("([А-ЯЁ][а-яё]+)\\s-([а-яё]{1,3})(?![^а-яё]|$)","g");return r.replace(e,"$1 —$2")}},{name:"ru/dash/taki",handler:function(r){var e=new RegExp("(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\s(таки)"+i("ru/dashAfter"),"g");return r.replace(e,"$1-$2")}},{name:"ru/dash/time",handler:function(r,e){var n=new RegExp(i("ru/dashBefore")+"(\\d?\\d:[0-5]\\d)"+i("common/dash")+"(\\d?\\d:[0-5]\\d)"+i("ru/dashAfter"),"g");return r.replace(n,"$1$2"+e.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/to",handler:function(r){var e=new RegExp("(^|[^А-ЯЁа-яё\\w])([Оо]ткуда|[Кк]уда|[Гг]де|[Кк]огда|[Зз]ачем|[Пп]очему|[Кк]ак|[Кк]ако[ейм]|[Кк]акая|[Кк]аки[емх]|[Кк]акими|[Кк]акую|[Чч]то|[Чч]его|[Чч]е[йм]|[Чч]ьим?|[Кк]то|[Кк]ого|[Кк]ому|[Кк]ем)( | -|- )(то|либо|нибудь)"+i("ru/dashAfter"),"g");return r.replace(e,function(n,a,t,o,u){var s=t+o+u;return s==="как то"||s==="Как то"?n:a+t+"-"+u})}},{name:"ru/dash/kakto",handler:function(r){var e=new RegExp("(^|[^А-ЯЁа-яё\\w])([Кк]ак) то"+i("ru/dashAfter"),"g");return r.replace(e,"$1$2-то")}},{name:"ru/dash/weekday",handler:function(r,e){var n="("+i("ru/weekday")+")",a=new RegExp(n+" ?("+i("common/dash")+") ?"+n,"gi");return r.replace(a,"$1"+e.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/years",handler:function(r,e){var n=i("common/dash"),a=new RegExp("(\\D|^)(\\d{4})[  ]?("+n+")[  ]?(\\d{4})(?=[  ]?г)","g");return r.replace(a,function(t,o,u,s,l){return parseInt(u,10)<parseInt(l,10)?o+u+e.dash+l:t})},settings:{dash:"–"}}]);var te="(-|\\.|\\/)",oe="(-|\\/)",Ar=new RegExp("(^|\\D)(\\d{4})"+te+"(\\d{2})"+te+"(\\d{2})(\\D|$)","gi"),Sr=new RegExp("(^|\\D)(\\d{2})"+oe+"(\\d{2})"+oe+"(\\d{4})(\\D|$)","gi");p.addRules([{name:"ru/date/fromISO",handler:function(r){return r.replace(Ar,"$1$6.$4.$2$7").replace(Sr,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(r){var e="( | )",n=i("ru/monthGenCase"),a=i("ru/weekday"),t=new RegExp("(\\d)"+e+"("+n+"),"+e+"("+a+")","gi");return r.replace(t,function(o,u,s,l,d,f){return u+s+l.toLowerCase()+","+d+f.toLowerCase()})}}]),p.addRules([{name:"ru/money/currency",handler:function(r){var e="([$€¥Ұ£₤₽])",n="[    ]",a=new RegExp("(^|[\\D]{2})"+e+" ?("+j+"("+n+"\\d{3})*)("+n+"?(тыс\\.|млн|млрд|трлн))?","gm"),t=new RegExp("(^|[\\D])("+j+") ?"+e,"gm");return r.replace(a,function(o,u,s,l,d,f,h,m){return u+l+(m?" "+m:"")+" "+s}).replace(t,"$1$2 $4")},disabled:!0},{name:"ru/money/ruble",handler:function(r){var e="$1 ₽",n="(\\d+)( | )?(р|руб)\\.",a=new RegExp("^"+n+"$","g"),t=new RegExp(n+"(?=[!?,:;])","g"),o=new RegExp(n+"(?=\\s+[A-ЯЁ])","g");return r.replace(a,e).replace(t,e).replace(o,e+".")},disabled:!0}]);function ue(r,e,n,a){return n==="дд"&&a==="мм"||["рф","ру","рус","орг","укр","бг","срб"].indexOf(a)>-1?r:e+n+". "+a+"."}var wr={name:"ru/nbsp/abbr",handler:function(r){var e=new RegExp("(^|\\s|".concat(c,")([а-яё]{1,3})\\. ?([а-яё]{1,3})\\."),"g");return r.replace(e,ue).replace(e,ue)}},Er={name:"ru/nbsp/addr",handler:function(r){return r.replace(/(\s|^)(дом|д\.|кв\.|под\.|п-д) *(\d+)/gi,"$1$2 $3").replace(/(\s|^)(мкр-н|мк-н|мкр\.|мкрн)\s/gi,"$1$2 ").replace(/(\s|^)(эт\.) *(-?\d+)/gi,"$1$2 $3").replace(/(\s|^)(\d+) +этаж([^а-яё]|$)/gi,"$1$2 этаж$3").replace(/(\s|^)литер\s([А-Я]|$)/gi,"$1литер $2").replace(/(\s|^)(обл|кр|ст|пос|с|д|ул|пер|пр|пр-т|просп|пл|бул|б-р|наб|ш|туп|оф|комн?|уч|вл|влад|стр|кор)\. *([а-яёa-z\d]+)/gi,"$1$2. $3").replace(/(\D[ \u00A0]|^)г\. ?([А-ЯЁ])/gm,"$1г. $2")}},kr={name:"ru/nbsp/afterNumberSign",handler:function(r){return r.replace(/№[ \u00A0\u2009]?(\d|п\/п)/g,"№ $1")}},qr={name:"ru/nbsp/beforeParticle",index:"+5",handler:function(r){var e="(ли|ль|же|ж|бы|б)",n=new RegExp("([А-ЯЁа-яё]) "+e+'(?=[,;:?!"‘“»])',"g"),a=new RegExp("([А-ЯЁа-яё])[  ]"+e+"[  ]","g");return r.replace(n,"$1 $2").replace(a,"$1 $2 ")}},Ur={name:"ru/nbsp/centuries",handler:function(r){var e=i("common/dash"),n="(^|\\s)([VIX]+)",a='(?=[,;:?!"‘“»]|$)',t=new RegExp(n+"[  ]?в\\.?"+a,"gm"),o=new RegExp(n+"("+e+")([VIX]+)[  ]?в\\.?([  ]?в\\.?)?"+a,"gm");return r.replace(t,"$1$2 в.").replace(o,"$1$2$3$4 вв.")}},Tr={name:"ru/nbsp/dayMonth",handler:function(r){var e=new RegExp("(\\d{1,2}) ("+i("ru/shortMonth")+")","gi");return r.replace(e,"$1 $2")}},Lr={name:"ru/nbsp/initials",handler:function(r){var e="   ",n=i("ru/quote"),a=new RegExp("(^|[("+e+n.left+c+'"])([А-ЯЁ])\\.['+e+"]?([А-ЯЁ])\\.["+e+"]?([А-ЯЁ][а-яё]+)","gm");return r.replace(a,"$1$2. $3. $4")}},Br={2:"²","²":"²",3:"³","³":"³","":""};p.addRules([wr,Er,kr,qr,Ur,Tr,Lr,{name:"ru/nbsp/m",index:"+5",handler:function(r){var e=new RegExp("(^|[\\s,.\\("+c+"])(\\d+)[  ]?(мм?|см|км|дм|гм|mm?|km|cm|dm)([23²³])?([\\s\\).!?,;"+c+"]|$)","gm");return r.replace(e,function(n,a,t,o,u,s){return a+t+" "+o+Br[u||""]+(s===" "?" ":s)})}},{name:"ru/nbsp/mln",handler:function(r){return r.replace(/(\d) ?(тыс|млн|млрд|трлн)(\.|\s|$)/gi,"$1 $2$3")}},{name:"ru/nbsp/ooo",handler:function(r){return r.replace(/(^|[^a-яёA-ЯЁ])(ООО|ОАО|ЗАО|НИИ|ПБОЮЛ) /g,"$1$2 ")}},{name:"ru/nbsp/page",handler:function(r){var e=new RegExp("(^|[)\\s"+c+"])(стр|гл|рис|илл?|ст|п|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return r.replace(e,"$1$2. $3$4")}},{name:"ru/nbsp/ps",handler:function(r){var e=new RegExp("(^|\\s|".concat(c,")[pз]\\.[  ]?([pз]\\.[  ]?)?[sы]\\.:? "),"gim");return r.replace(e,function(n,a,t){return a+(t?"P. P. S. ":"P. S. ")})}},{name:"ru/nbsp/rubleKopek",handler:function(r){return r.replace(/(\d) ?(?=(руб|коп)\.)/g,"$1 ")}},{name:"ru/nbsp/see",handler:function(r){var e=new RegExp("(^|\\s|".concat(c,"|\\()(см|им)\\.[  ]?([а-яё0-9a-z]+)([\\s.,?!]|$)"),"gi");return r.replace(e,function(n,a,t,o,u){return(a===" "?" ":a)+t+". "+o+u})}},{name:"ru/nbsp/year",handler:function(r){return r.replace(/(^|\D)(\d{4}) ?г([ ,;.\n]|$)/g,"$1$2 г$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(r){var e=i("common/dash"),n=new RegExp("(^|\\D)(\\d{4})("+e+')(\\d{4})[  ]?г\\.?([  ]?г\\.)?(?=[,;:?!"‘“»\\s]|$)',"gm");return r.replace(n,"$1$2$3$4 гг.")}}]),p.addRules([{name:"ru/number/comma",handler:function(r){return r.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%‰°×x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(\\d[%‰]?)-(ый|ой|ая|ое|ые|ым|ом|ых|ого|ому|ыми)(?!["+a+"])","g");return r.replace(t,function(o,u,s){return u+"-"+{ой:"й",ый:"й",ая:"я",ое:"е",ые:"е",ым:"м",ом:"м",ых:"х",ого:"го",ому:"му",ыми:"ми"}[s]})}}]);function w(r,e){var n=new RegExp('<span class="('+e.join("|")+')">([^]*?)</span>',"g");return r.replace(n,"$2")}function B(r,e){return r.replace(/<title>[^]*?<\/title>/i,function(n){return w(n,e)})}var se=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],D="ru/optalign/bracket",Dr={name:D,handler:function(r){return r.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/^\(/gm,'<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0,htmlAttrs:!1},Mr={name:D,queue:"start",handler:function(r){return w(r,se)},htmlAttrs:!1},Nr={name:D,queue:"end",handler:function(r){return B(r,se)},htmlAttrs:!1},ie=["typograf-oa-comma","typograf-oa-comma-sp"],M="ru/optalign/comma",Cr={name:M,handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(["+a+"\\d́]+), ","gi");return r.replace(t,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},Pr={name:M,queue:"start",handler:function(r){return w(r,ie)},htmlAttrs:!1},_r={name:M,queue:"end",handler:function(r){return B(r,ie)},htmlAttrs:!1},le=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],N="ru/optalign/quote",Ir={name:N,handler:function(r){var e=this.getSetting("common/punctuation/quote","ru"),n="(["+e.left[0]+(e.left[1]||"")+"])",a=new RegExp(`(^|
16
16
 
17
17
  |`+c+")("+n+")","g"),t=new RegExp(`([^
18
18
  `+c+`])([  
19
- ])(`+n+")","gi");return r.replace(a,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(t,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1},Hr={name:_,queue:"start",handler:function(r){return S(r,pe)},htmlAttrs:!1},jr={name:_,queue:"end",handler:function(r){return B(r,pe)},htmlAttrs:!1};p.addRules([_r,Pr,zr]),p.addInnerRules([Nr,Cr,Ir,Or,Hr,jr]);var Qr={name:"ru/other/accent",handler:function(r){return r.replace(/([а-яё])([АЕЁИОУЫЭЮЯ])([^А-ЯЁ\w]|$)/g,function(e,n,a,t){return n+a.toLowerCase()+"́"+t})},disabled:!0},fe=5,he="7",N=[],Fr=8,Wr=2;[4162,416332,8512,851111,4722,4725,391379,8442,4732,4152,4154451,4154459,4154455,41544513,8142,8332,8612,8622,3525,812,8342,8152,3812,4862,3422,342633,8112,9142,8452,3432,3434,3435,4812,8432,8439,3822,4872,3412,3511,3512,3022,4112,4852,4855,3852,3854,8182,818,90,3472,4741,4764,4832,4922,8172,8202,8722,4932,493,3952,3951,3953,411533,4842,3842,3843,8212,4942,"39131-39179","39190-39199",391,4712,4742,8362,495,499,4966,4964,4967,498,8312,8313,3832,383612,3532,8412,4232,423370,423630,8632,8642,8482,4242,8672,8652,4752,4822,482502,4826300,3452,8422,4212,3466,3462,8712,8352,800,"901-934","936-939","950-953",958,"960-969","977-989","991-997",999].forEach(function(r){if(typeof r=="string")for(var e=r.split("-"),n=+e[0];n<=+e[1];n++)N.push(n);else N.push(r)});function de(r){var e=r[0],n="",a,t;if(r.length<8)return me(r);if(r.length>10)if(e==="+")if(r[1]===he)a=!0,r=r.substr(2);else return r;else e==="8"&&(t=!0,r=r.substr(1));for(var o=Fr;o>=Wr;o--){var u=+r.substr(0,o);if(N.indexOf(u)>-1){n=r.substr(0,o),r=r.substr(o);break}}return n||(n=r.substr(0,fe),r=r.substr(fe)),(a?"+"+he+" ":"")+(t?"8 ":"")+Yr(n)+" "+me(r)}function Yr(r){var e=+r,n=r.length,a=[r],t=!1;if(n>3)switch(n){case 4:a=[r.substr(0,2),r.substr(2,2)];break;case 5:a=[r.substr(0,3),r.substr(3,3)];break;case 6:a=[r.substr(0,2),r.substr(2,2),r.substr(4,2)]}else t=e>900&&e<=999||e===495||e===499||e===800;var o=a.join("-");return t?o:"("+o+")"}function me(r){var e="";return r.length%2&&(e=r[0],e+=r.length<=5?"-":"",r=r.substr(1,r.length-1)),e+r.split(/(?=(?:\d\d)+$)/).join("-")}function ge(r){return r.replace(/[^\d+]/g,"")}p.addRules([Qr,{name:"ru/other/phone-number",live:!1,handler:function(r){var e=new RegExp("(^|,| |"+c+")(\\+7[\\d\\(\\)  -]{10,18})(?=,|;|"+c+"|$)","gm");return r.replace(e,function(n,a,t){var o=ge(t);return o.length===12?a+de(o):n}).replace(/(^|[^а-яё])([☎☏✆📠📞📱]|т\.|тел\.|ф\.|моб\.|факс|сотовый|мобильный|телефон)(:?\s*?)([+\d(][\d \u00A0\-()]{3,}\d)/gi,function(n,a,t,o,u){var s=ge(u);return s.length>=5?a+t+o+de(s):n})}}]),p.addRules([{name:"ru/punctuation/ano",handler:function(r){var e=new RegExp("([^«„[(!?,:;\\-‒–—\\s"+c+"])(\\s+)(а|но)(?= | |\\n)","g");return r.replace(e,"$1,$2$3")}},{name:"ru/punctuation/exclamation",handler:function(r){return r.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(r){var e=new RegExp("(^|[^!])!\\?([^?]|$)","g");return r.replace(e,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(r){return r.replace(/(^|[^.])(\.\.\.|…),/g,"$1…").replace(/(!|\?)(\.\.\.|…)(?=[^.]|$)/g,"$1..")}}]),p.addRules([{name:"ru/space/afterHellip",handler:function(r){return r.replace(/([а-яё])(\.\.\.|…)([А-ЯЁ])/g,"$1$2 $3").replace(/([?!]\.\.)([а-яёa-z])/gi,"$1 $2")}},{name:"ru/space/year",handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(^| | )(\\d{3,4})(год([ауе]|ом)?)([^"+a+"]|$)","g");return r.replace(t,"$1$2 $3$5")}}]),p.addRules([{name:"ru/symbols/NN",handler:function(r){return r.replace(/№№/g,"№")}}]);var ve={A:"А",a:"а",B:"В",E:"Е",e:"е",K:"К",M:"М",H:"Н",O:"О",o:"о",P:"Р",p:"р",C:"С",c:"с",T:"Т",y:"у",X:"Х",x:"х"},Xr=Object.keys(ve).join("");p.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(r){var e=new RegExp("(["+Xr+"]{1,3})(?=[А-ЯЁа-яё]+?)","g");return r.replace(e,function(n,a){for(var t="",o=0;o<a.length;o++)t+=ve[a[o]];return t})}}]);var Gr={"common/html/e-mail":{"en-US":"Placement of links for e-mail",ru:"Расстановка ссылок для эл. почты"},"common/html/escape":{"en-US":"Escaping HTML",ru:"Экранирование HTML"},"common/html/nbr":{"en-US":"Replacement line break on <br/>",ru:"Замена перевода строки на <br/>"},"common/html/p":{"en-US":"Placement of paragraph",ru:"Расстановка абзацев"},"common/html/processingAttrs":{"en-US":"Processing HTML attributes",ru:"Типографирование HTML-атрибутов"},"common/html/quot":{common:'&⁠quot; → "'},"common/html/stripTags":{"en-US":"Removing HTML-tags",ru:"Удаление HTML-тегов"},"common/html/url":{"en-US":"Placement of links",ru:"Расстановка ссылок"},"common/nbsp/afterNumber":{"en-US":"Non-breaking space between number and word",ru:"Нераз. пробел между числом и словом"},"common/nbsp/afterParagraphMark":{"en-US":"Non-breaking space after ¶",ru:"Нераз. пробел после ¶"},"common/nbsp/afterSectionMark":{"en-US":"Non-breaking space after §",ru:"Нераз. узкий пробел после §"},"common/nbsp/afterShortWord":{"en-US":"Non-breaking space after short word",ru:"Нераз. пробел после короткого слова"},"common/nbsp/beforeShortLastNumber":{"en-US":"Non-breaking space before number (maximum 2 digits) at end of sentence",ru:"Нераз. пробел перед числом (не более 2 цифр) в конце предложения"},"common/nbsp/beforeShortLastWord":{"en-US":"Non-breaking space before last short word in sentence",ru:"Нераз. пробел перед последним коротким словом в предложении"},"common/nbsp/dpi":{"en-US":"Non-breaking space before lpi and dpi",ru:"Нераз. пробел перед lpi и dpi"},"common/nbsp/nowrap":{"en-US":"Replace non-breaking space to normal space in tags nowrap and nobr",ru:"Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr"},"common/nbsp/replaceNbsp":{"en-US":"Replacing non-breaking space on normal before text correction",ru:"Замена неразрывного пробела на обычный перед типографированием"},"common/number/digitGrouping":{"en-US":"Divide into groups numbers with many digits",ru:"Разбивать длинные числа по разрядам"},"common/number/fraction":{common:"1/2 → ½, 1/4 → ¼, 3/4 → ¾"},"common/number/mathSigns":{common:"!= → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ±"},"common/number/times":{common:"x → × (10 x 5 → 10×5)"},"common/other/delBOM":{"en-US":"Delete character BOM (Byte Order Mark)",ru:"Удаление символа BOM (Byte Order Mark)"},"common/other/repeatWord":{"en-US":"Removing repeat words",ru:"Удаление повтора слова"},"common/punctuation/apostrophe":{"en-US":"Placement of correct apostrophe",ru:"Расстановка правильного апострофа"},"common/punctuation/delDoublePunctuation":{"en-US":"Removing double punctuation",ru:"Удаление двойной пунктуации"},"common/punctuation/hellip":{"en-US":"Replacement of three points by ellipsis",ru:"Замена трёх точек на многоточие"},"common/punctuation/quote":{"en-US":"Placement of quotation marks in texts",ru:"Расстановка кавычек правильного вида"},"common/punctuation/quoteLink":{"en-US":"Removal quotes outside a link",ru:"Вынос кавычек за пределы ссылки"},"common/space/afterColon":{"en-US":"space after colon",ru:"Пробел после двоеточия"},"common/space/afterComma":{"en-US":"space after comma",ru:"Пробел после запятой"},"common/space/afterExclamationMark":{"en-US":"space after exclamation mark",ru:"Пробел после знака восклицания"},"common/space/afterQuestionMark":{"en-US":"space after question mark",ru:"Пробел после знака вопроса"},"common/space/afterSemicolon":{"en-US":"space after semicolon",ru:"Пробел после точки с запятой"},"common/space/beforeBracket":{"en-US":"Space before opening bracket",ru:"Пробел перед открывающей скобкой"},"common/space/bracket":{"en-US":"Remove extra spaces after opening and before closing bracket",ru:"Удаление лишних пробелов после открывающей и перед закрывающей скобкой"},"common/space/delBeforeDot":{"en-US":"Remove space before dot",ru:"Удаление пробела перед точкой"},"common/space/delBeforePercent":{"en-US":"Remove space before %, ‰ and ‱",ru:"Удаление пробела перед %, ‰ и ‱"},"common/space/delBeforePunctuation":{"en-US":"Remove spaces before punctuation",ru:"Удаление пробелов перед знаками пунктуации"},"common/space/delBetweenExclamationMarks":{"en-US":"Remove spaces before exclamation marks",ru:"Удаление пробелов между знаками восклицания"},"common/space/delLeadingBlanks":{"en-US":"Remove spaces at start of line",ru:"Удаление пробелов в начале строки"},"common/space/delRepeatN":{"en-US":"Remove duplicate line breaks",ru:"Удаление повторяющихся переносов строки"},"common/space/delRepeatSpace":{"en-US":"Removing duplicate spaces between characters",ru:"Удаление повторяющихся пробелов между символами"},"common/space/delTrailingBlanks":{"en-US":"Remove spaces at end of line",ru:"Удаление пробелов в конце строки"},"common/space/insertFinalNewline":{"en-US":"Insert final newline",ru:"Вставить в конце текста перевод строки"},"common/space/replaceTab":{"en-US":"Replacement of tab to 4 spaces",ru:"Замена таба на 4 пробела"},"common/space/squareBracket":{"en-US":"Remove extra spaces after opening and before closing square bracket",ru:"Удаление лишних пробелов после открывающей и перед закрывающей квадратной скобкой"},"common/space/trimLeft":{"en-US":"Remove spaces and line breaks in beginning of text",ru:"Удаление пробелов и переносов строк в начале текста"},"common/space/trimRight":{"en-US":"Remove spaces and line breaks at end of text",ru:"Удаление пробелов и переносов строк в конце текста"},"common/symbols/arrow":{common:"-> → →, <- → ←"},"common/symbols/cf":{"en-US":"Adding ° to C and F",ru:"Добавление ° к C и F"},"common/symbols/copy":{common:"(c) → ©, (tm) → ™, (r) → ®"},"en-US/dash/main":{"en-US":"Replace hyphens surrounded by spaces with an em-dash",ru:"Замена дефиса на длинное тире"},"ru/dash/centuries":{"en-US":"Hyphen to dash in centuries",ru:"Замена дефиса на тире в веках"},"ru/dash/daysMonth":{"en-US":"Dash between days of one month",ru:"Тире между днями одного месяца"},"ru/dash/de":{"en-US":"Hyphen before “де”",ru:"Дефис перед «де»"},"ru/dash/decade":{"en-US":"Dash in decade",ru:"Тире в десятилетиях, 80—90-е гг."},"ru/dash/directSpeech":{"en-US":"Dash in direct speech",ru:"Тире в прямой речи"},"ru/dash/izpod":{"en-US":"Hyphen between “из-под”",ru:"Дефис между «из-под»"},"ru/dash/izza":{"en-US":"Hyphen between “из-за”",ru:"Дефис между «из-за»"},"ru/dash/ka":{"en-US":"Hyphen before “ка” and “кась”",ru:"Дефис перед «ка» и «кась»"},"ru/dash/kakto":{"en-US":"Hyphen for “как то”",ru:"Дефис для «как то»"},"ru/dash/koe":{"en-US":"Hyphen after “кое” and “кой”",ru:"Дефис после «кое» и «кой»"},"ru/dash/main":{"en-US":"Replacement hyphen with dash",ru:"Замена дефиса на тире"},"ru/dash/month":{"en-US":"Dash between months",ru:"Тире между месяцами"},"ru/dash/surname":{"en-US":"Acronyms with a dash",ru:"Сокращения с помощью тире"},"ru/dash/taki":{"en-US":"Hyphen between “верно-таки” and etc.",ru:"Дефис между «верно-таки» и т. д."},"ru/dash/time":{"en-US":"Dash in time intervals",ru:"Тире в интервалах времени"},"ru/dash/to":{"en-US":"Hyphen before “то”, “либо”, “нибудь”",ru:"Дефис перед «то», «либо», «нибудь»"},"ru/dash/weekday":{"en-US":"Dash between the days of the week",ru:"Тире между днями недели"},"ru/dash/years":{"en-US":"Hyphen to dash in years",ru:"Замена дефиса на тире в годах"},"ru/date/fromISO":{"en-US":"Converting dates YYYY-MM-DD type DD.MM.YYYY",ru:"Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY"},"ru/date/weekday":{common:"2 Мая, Понедельник → 2 мая, понедельник"},"ru/money/currency":{"en-US":"Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $",ru:"Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $"},"ru/money/ruble":{common:"1 руб. → 1 ₽"},"ru/nbsp/abbr":{"en-US":"Non-breaking space in abbreviations, e.g. “т. д.”",ru:"Нераз. пробел в сокращениях, например, в «т. д.»"},"ru/nbsp/addr":{"en-US":"Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al.",ru:"Расстановка нераз. пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др."},"ru/nbsp/afterNumberSign":{"en-US":"Non-breaking thin space after №",ru:"Нераз. узкий пробел после №"},"ru/nbsp/beforeParticle":{"en-US":"Non-breaking space before “ли”, “ль”, “же”, “бы”, “б”",ru:"Нераз. пробел перед «ли», «ль», «же», «бы», «б»"},"ru/nbsp/centuries":{"en-US":"Remove spaces and extra points in “вв.”",ru:"Удаление пробелов и лишних точек в «вв.»"},"ru/nbsp/dayMonth":{"en-US":"Non-breaking space between number and month",ru:"Нераз. пробел между числом и месяцем"},"ru/nbsp/initials":{"en-US":"Binding of initials to the name",ru:"Привязка инициалов к фамилии"},"ru/nbsp/m":{"en-US":"m2 → м², m3 → м³ and non-breaking space",ru:"м2 → м², м3 → м³ и нераз. пробел"},"ru/nbsp/mln":{"en-US":"Non-breaking space between number and “тыс.”, “млн”, “млрд” and “трлн”",ru:"Неразр. пробел между числом и «тыс.», «млн», «млрд» и «трлн»"},"ru/nbsp/ooo":{"en-US":"Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ”",ru:"Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ"},"ru/nbsp/page":{"en-US":"Non-breaking space after “стр.”, “гл.”, “рис.”, “илл.”",ru:"Нераз. пробел после «стр.», «гл.», «рис.», «илл.»"},"ru/nbsp/ps":{"en-US":"Non-breaking space in P. S. and P. P. S.",ru:"Нераз. пробел в P. S. и P. P. S."},"ru/nbsp/rubleKopek":{"en-US":"Not once. space before the “rub” and “cop.”",ru:"Нераз. пробел перед «руб.» и «коп.»"},"ru/nbsp/see":{"en-US":"Non-breaking space after abbreviation «см.» and «им.»",ru:"Нераз. пробел после сокращений «см.» и «им.»"},"ru/nbsp/year":{"en-US":"Non-breaking space before XXXX г. (2012 г.)",ru:"Нераз. пробел после XXXX г. (2012 г.)"},"ru/nbsp/years":{"en-US":"г.г. → гг. and non-breaking space",ru:"г.г. → гг. и нераз. пробел"},"ru/number/comma":{"en-US":"Commas in numbers",ru:"Замена точки на запятую в числах"},"ru/number/ordinals":{common:"N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й)"},"ru/optalign/bracket":{"en-US":"for opening bracket",ru:"для открывающей скобки"},"ru/optalign/comma":{"en-US":"for comma",ru:"для запятой"},"ru/optalign/quote":{"en-US":"for opening quotation marks",ru:"для открывающей кавычки"},"ru/other/accent":{"en-US":"Replacement capital letters to lowercase with addition of accent",ru:"Замена заглавной буквы на строчную с добавлением ударения"},"ru/other/phone-number":{"en-US":"Formatting phone numbers",ru:"Форматирование телефонных номеров"},"ru/punctuation/ano":{"en-US":"Placement of commas before “а” and “но”",ru:"Расстановка запятых перед «а» и «но»"},"ru/punctuation/exclamation":{common:"!! → !"},"ru/punctuation/exclamationQuestion":{common:"!? → ?!"},"ru/punctuation/hellipQuestion":{common:"«?…» → «?..», «!…» → «!..», «…,» → «…»"},"ru/space/afterHellip":{"en-US":"Space after “...”, “!..” and “?..”",ru:"Пробел после «...», «!..» и «?..»"},"ru/space/year":{"en-US":"Space between number and word “год”",ru:"Пробел между числом и словом «год»"},"ru/symbols/NN":{common:"№№ → №"},"ru/typo/switchingKeyboardLayout":{"en-US":"Replacement of Latin letters in Russian. Typos occur when you switch keyboard layouts",ru:"Замена латинских букв на русские. Опечатки, возникающие при переключении клавиатурной раскладки"}},Kr=[{name:"punctuation",title:{"en-US":"Punctuation",ru:"Пунктуация"}},{name:"optalign",title:{"en-US":"Hanging punctuation",ru:"Висячая пунктуация"}},{name:"dash",title:{"en-US":"Dash and hyphen",ru:"Тире и дефис"}},{name:"nbsp",title:{"en-US":"Non-breaking space",ru:"Неразрывный пробел"}},{name:"space",title:{"en-US":"Space and line ending",ru:"Пробел и окончание строки"}},{name:"html",title:{"en-US":"HTML",ru:"HTML"}},{name:"date",title:{"en-US":"Date",ru:"Дата"}},{name:"money",title:{"en-US":"Money",ru:"Деньги"}},{name:"number",title:{"en-US":"Numbers and mathematical expressions",ru:"Числа и математические выражения"}},{name:"symbols",title:{"en-US":"Symbols and signs",ru:"Символы и знаки"}},{name:"typo",title:{"en-US":"Typos",ru:"Опечатки"}},{name:"other",title:{"en-US":"Other",ru:"Прочее"}}];return p.titles=Gr,p.groups=Kr,p});var P=(b.exports==null?{}:b.exports).default||b.exports;Object.defineProperty(C,"__CJS__export_default__",{enumerable:!0,get:function(){return P}}),Object.defineProperty(C,"typograf_all_exports",{enumerable:!0,get:function(){return Re}})});
19
+ ])(`+n+")","gi");return r.replace(a,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(t,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1},zr={name:N,queue:"start",handler:function(r){return w(r,le)},htmlAttrs:!1},Or={name:N,queue:"end",handler:function(r){return B(r,le)},htmlAttrs:!1};p.addRules([Dr,Cr,Ir]),p.addInnerRules([Mr,Nr,Pr,_r,zr,Or]);var Hr={name:"ru/other/accent",handler:function(r){return r.replace(/([а-яё])([АЕЁИОУЫЭЮЯ])([^А-ЯЁ\w]|$)/g,function(e,n,a,t){return n+a.toLowerCase()+"́"+t})},disabled:!0},ce=5,pe="7",C=[],Qr=8,jr=2;[4162,416332,8512,851111,4722,4725,391379,8442,4732,4152,4154451,4154459,4154455,41544513,8142,8332,8612,8622,3525,812,8342,8152,3812,4862,3422,342633,8112,9142,8452,3432,3434,3435,4812,8432,8439,3822,4872,3412,3511,3512,3022,4112,4852,4855,3852,3854,8182,818,90,3472,4741,4764,4832,4922,8172,8202,8722,4932,493,3952,3951,3953,411533,4842,3842,3843,8212,4942,"39131-39179","39190-39199",391,4712,4742,8362,495,499,4966,4964,4967,498,8312,8313,3832,383612,3532,8412,4232,423370,423630,8632,8642,8482,4242,8672,8652,4752,4822,482502,4826300,3452,8422,4212,3466,3462,8712,8352,800,"901-934","936-939","950-953",958,"960-969","977-989","991-997",999].forEach(function(r){if(typeof r=="string")for(var e=r.split("-"),n=+e[0];n<=+e[1];n++)C.push(n);else C.push(r)});function fe(r){var e=r[0],n="",a,t;if(r.length<8)return he(r);if(r.length>10)if(e==="+")if(r[1]===pe)a=!0,r=r.substr(2);else return r;else e==="8"&&(t=!0,r=r.substr(1));for(var o=Qr;o>=jr;o--){var u=+r.substr(0,o);if(C.indexOf(u)>-1){n=r.substr(0,o),r=r.substr(o);break}}return n||(n=r.substr(0,ce),r=r.substr(ce)),(a?"+"+pe+" ":"")+(t?"8 ":"")+Fr(n)+" "+he(r)}function Fr(r){var e=+r,n=r.length,a=[r],t=!1;if(n>3)switch(n){case 4:a=[r.substr(0,2),r.substr(2,2)];break;case 5:a=[r.substr(0,3),r.substr(3,3)];break;case 6:a=[r.substr(0,2),r.substr(2,2),r.substr(4,2)]}else t=e>900&&e<=999||e===495||e===499||e===800;var o=a.join("-");return t?o:"("+o+")"}function he(r){var e="";return r.length%2&&(e=r[0],e+=r.length<=5?"-":"",r=r.substr(1,r.length-1)),e+r.split(/(?=(?:\d\d)+$)/).join("-")}function de(r){return r.replace(/[^\d+]/g,"")}p.addRules([Hr,{name:"ru/other/phone-number",live:!1,handler:function(r){var e=new RegExp("(^|,| |"+c+")(\\+7[\\d\\(\\)  -]{10,18})(?=,|;|"+c+"|$)","gm");return r.replace(e,function(n,a,t){var o=de(t);return o.length===12?a+fe(o):n}).replace(/(^|[^а-яё])([☎☏✆📠📞📱]|т\.|тел\.|ф\.|моб\.|факс|сотовый|мобильный|телефон)(:?\s*?)([+\d(][\d \u00A0\-()]{3,}\d)/gi,function(n,a,t,o,u){var s=de(u);return s.length>=5?a+t+o+fe(s):n})}}]),p.addRules([{name:"ru/punctuation/ano",handler:function(r){var e=new RegExp("([^«„[(!?,:;\\-‒–—\\s"+c+"])(\\s+)(а|но)(?= | |\\n)","g");return r.replace(e,"$1,$2$3")}},{name:"ru/punctuation/exclamation",handler:function(r){return r.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(r){var e=new RegExp("(^|[^!])!\\?([^?]|$)","g");return r.replace(e,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(r){return r.replace(/(^|[^.])(\.\.\.|…),/g,"$1…").replace(/(!|\?)(\.\.\.|…)(?=[^.]|$)/g,"$1..")}}]),p.addRules([{name:"ru/space/afterHellip",handler:function(r){return r.replace(/([а-яё])(\.\.\.|…)([А-ЯЁ])/g,"$1$2 $3").replace(/([?!]\.\.)([а-яёa-z])/gi,"$1 $2")}},{name:"ru/space/year",handler:function(r,e,n){var a=n.getData("char"),t=new RegExp("(^| | )(\\d{3,4})(год([ауе]|ом)?)([^"+a+"]|$)","g");return r.replace(t,"$1$2 $3$5")}}]),p.addRules([{name:"ru/symbols/NN",handler:function(r){return r.replace(/№№/g,"№")}}]);var me={A:"А",a:"а",B:"В",E:"Е",e:"е",K:"К",M:"М",H:"Н",O:"О",o:"о",P:"Р",p:"р",C:"С",c:"с",T:"Т",y:"у",X:"Х",x:"х"},Wr=Object.keys(me).join("");p.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(r){var e=new RegExp("(["+Wr+"]{1,3})(?=[А-ЯЁа-яё]+?)","g");return r.replace(e,function(n,a){for(var t="",o=0;o<a.length;o++)t+=me[a[o]];return t})}}]);var Yr={"common/html/e-mail":{"en-US":"Placement of links for e-mail",ru:"Расстановка ссылок для эл. почты"},"common/html/escape":{"en-US":"Escaping HTML",ru:"Экранирование HTML"},"common/html/nbr":{"en-US":"Replacement line break on <br/>",ru:"Замена перевода строки на <br/>"},"common/html/p":{"en-US":"Placement of paragraph",ru:"Расстановка абзацев"},"common/html/processingAttrs":{"en-US":"Processing HTML attributes",ru:"Типографирование HTML-атрибутов"},"common/html/quot":{common:'&⁠quot; → "'},"common/html/stripTags":{"en-US":"Removing HTML-tags",ru:"Удаление HTML-тегов"},"common/html/url":{"en-US":"Placement of links",ru:"Расстановка ссылок"},"common/nbsp/afterNumber":{"en-US":"Non-breaking space between number and word",ru:"Нераз. пробел между числом и словом"},"common/nbsp/afterParagraphMark":{"en-US":"Non-breaking space after ¶",ru:"Нераз. пробел после ¶"},"common/nbsp/afterSectionMark":{"en-US":"Non-breaking space after §",ru:"Нераз. узкий пробел после §"},"common/nbsp/afterShortWord":{"en-US":"Non-breaking space after short word",ru:"Нераз. пробел после короткого слова"},"common/nbsp/beforeShortLastNumber":{"en-US":"Non-breaking space before number (maximum 2 digits) at end of sentence",ru:"Нераз. пробел перед числом (не более 2 цифр) в конце предложения"},"common/nbsp/beforeShortLastWord":{"en-US":"Non-breaking space before last short word in sentence",ru:"Нераз. пробел перед последним коротким словом в предложении"},"common/nbsp/dpi":{"en-US":"Non-breaking space before lpi and dpi",ru:"Нераз. пробел перед lpi и dpi"},"common/nbsp/nowrap":{"en-US":"Replace non-breaking space to normal space in tags nowrap and nobr",ru:"Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr"},"common/nbsp/replaceNbsp":{"en-US":"Replacing non-breaking space on normal before text correction",ru:"Замена неразрывного пробела на обычный перед типографированием"},"common/number/digitGrouping":{"en-US":"Divide into groups numbers with many digits",ru:"Разбивать длинные числа по разрядам"},"common/number/fraction":{common:"1/2 → ½, 1/4 → ¼, 3/4 → ¾"},"common/number/mathSigns":{common:"!= → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ±"},"common/number/times":{common:"x → × (10 x 5 → 10×5)"},"common/other/delBOM":{"en-US":"Delete character BOM (Byte Order Mark)",ru:"Удаление символа BOM (Byte Order Mark)"},"common/other/repeatWord":{"en-US":"Removing repeat words",ru:"Удаление повтора слова"},"common/punctuation/apostrophe":{"en-US":"Placement of correct apostrophe",ru:"Расстановка правильного апострофа"},"common/punctuation/delDoublePunctuation":{"en-US":"Removing double punctuation",ru:"Удаление двойной пунктуации"},"common/punctuation/hellip":{"en-US":"Replacement of three points by ellipsis",ru:"Замена трёх точек на многоточие"},"common/punctuation/quote":{"en-US":"Placement of quotation marks in texts",ru:"Расстановка кавычек правильного вида"},"common/punctuation/quoteLink":{"en-US":"Removal quotes outside a link",ru:"Вынос кавычек за пределы ссылки"},"common/space/afterColon":{"en-US":"space after colon",ru:"Пробел после двоеточия"},"common/space/afterComma":{"en-US":"space after comma",ru:"Пробел после запятой"},"common/space/afterExclamationMark":{"en-US":"space after exclamation mark",ru:"Пробел после знака восклицания"},"common/space/afterQuestionMark":{"en-US":"space after question mark",ru:"Пробел после знака вопроса"},"common/space/afterSemicolon":{"en-US":"space after semicolon",ru:"Пробел после точки с запятой"},"common/space/beforeBracket":{"en-US":"Space before opening bracket",ru:"Пробел перед открывающей скобкой"},"common/space/bracket":{"en-US":"Remove extra spaces after opening and before closing bracket",ru:"Удаление лишних пробелов после открывающей и перед закрывающей скобкой"},"common/space/delBeforeDot":{"en-US":"Remove space before dot",ru:"Удаление пробела перед точкой"},"common/space/delBeforePercent":{"en-US":"Remove space before %, ‰ and ‱",ru:"Удаление пробела перед %, ‰ и ‱"},"common/space/delBeforePunctuation":{"en-US":"Remove spaces before punctuation",ru:"Удаление пробелов перед знаками пунктуации"},"common/space/delBetweenExclamationMarks":{"en-US":"Remove spaces before exclamation marks",ru:"Удаление пробелов между знаками восклицания"},"common/space/delLeadingBlanks":{"en-US":"Remove spaces at start of line",ru:"Удаление пробелов в начале строки"},"common/space/delRepeatN":{"en-US":"Remove duplicate line breaks",ru:"Удаление повторяющихся переносов строки"},"common/space/delRepeatSpace":{"en-US":"Removing duplicate spaces between characters",ru:"Удаление повторяющихся пробелов между символами"},"common/space/delTrailingBlanks":{"en-US":"Remove spaces at end of line",ru:"Удаление пробелов в конце строки"},"common/space/insertFinalNewline":{"en-US":"Insert final newline",ru:"Вставить в конце текста перевод строки"},"common/space/replaceTab":{"en-US":"Replacement of tab to 4 spaces",ru:"Замена таба на 4 пробела"},"common/space/squareBracket":{"en-US":"Remove extra spaces after opening and before closing square bracket",ru:"Удаление лишних пробелов после открывающей и перед закрывающей квадратной скобкой"},"common/space/trimLeft":{"en-US":"Remove spaces and line breaks in beginning of text",ru:"Удаление пробелов и переносов строк в начале текста"},"common/space/trimRight":{"en-US":"Remove spaces and line breaks at end of text",ru:"Удаление пробелов и переносов строк в конце текста"},"common/symbols/arrow":{common:"-> → →, <- → ←"},"common/symbols/cf":{"en-US":"Adding ° to C and F",ru:"Добавление ° к C и F"},"common/symbols/copy":{common:"(c) → ©, (tm) → ™, (r) → ®"},"en-US/dash/main":{"en-US":"Replace hyphens surrounded by spaces with an em-dash",ru:"Замена дефиса на длинное тире"},"ru/dash/centuries":{"en-US":"Hyphen to dash in centuries",ru:"Замена дефиса на тире в веках"},"ru/dash/daysMonth":{"en-US":"Dash between days of one month",ru:"Тире между днями одного месяца"},"ru/dash/de":{"en-US":"Hyphen before “де”",ru:"Дефис перед «де»"},"ru/dash/decade":{"en-US":"Dash in decade",ru:"Тире в десятилетиях, 80—90-е гг."},"ru/dash/directSpeech":{"en-US":"Dash in direct speech",ru:"Тире в прямой речи"},"ru/dash/izpod":{"en-US":"Hyphen between “из-под”",ru:"Дефис между «из-под»"},"ru/dash/izza":{"en-US":"Hyphen between “из-за”",ru:"Дефис между «из-за»"},"ru/dash/ka":{"en-US":"Hyphen before “ка” and “кась”",ru:"Дефис перед «ка» и «кась»"},"ru/dash/kakto":{"en-US":"Hyphen for “как то”",ru:"Дефис для «как то»"},"ru/dash/koe":{"en-US":"Hyphen after “кое” and “кой”",ru:"Дефис после «кое» и «кой»"},"ru/dash/main":{"en-US":"Replacement hyphen with dash",ru:"Замена дефиса на тире"},"ru/dash/month":{"en-US":"Dash between months",ru:"Тире между месяцами"},"ru/dash/surname":{"en-US":"Acronyms with a dash",ru:"Сокращения с помощью тире"},"ru/dash/taki":{"en-US":"Hyphen between “верно-таки” and etc.",ru:"Дефис между «верно-таки» и т. д."},"ru/dash/time":{"en-US":"Dash in time intervals",ru:"Тире в интервалах времени"},"ru/dash/to":{"en-US":"Hyphen before “то”, “либо”, “нибудь”",ru:"Дефис перед «то», «либо», «нибудь»"},"ru/dash/weekday":{"en-US":"Dash between the days of the week",ru:"Тире между днями недели"},"ru/dash/years":{"en-US":"Hyphen to dash in years",ru:"Замена дефиса на тире в годах"},"ru/date/fromISO":{"en-US":"Converting dates YYYY-MM-DD type DD.MM.YYYY",ru:"Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY"},"ru/date/weekday":{common:"2 Мая, Понедельник → 2 мая, понедельник"},"ru/money/currency":{"en-US":"Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $",ru:"Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $"},"ru/money/ruble":{common:"1 руб. → 1 ₽"},"ru/nbsp/abbr":{"en-US":"Non-breaking space in abbreviations, e.g. “т. д.”",ru:"Нераз. пробел в сокращениях, например, в «т. д.»"},"ru/nbsp/addr":{"en-US":"Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al.",ru:"Расстановка нераз. пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др."},"ru/nbsp/afterNumberSign":{"en-US":"Non-breaking thin space after №",ru:"Нераз. узкий пробел после №"},"ru/nbsp/beforeParticle":{"en-US":"Non-breaking space before “ли”, “ль”, “же”, “бы”, “б”",ru:"Нераз. пробел перед «ли», «ль», «же», «бы», «б»"},"ru/nbsp/centuries":{"en-US":"Remove spaces and extra points in “вв.”",ru:"Удаление пробелов и лишних точек в «вв.»"},"ru/nbsp/dayMonth":{"en-US":"Non-breaking space between number and month",ru:"Нераз. пробел между числом и месяцем"},"ru/nbsp/initials":{"en-US":"Binding of initials to the name",ru:"Привязка инициалов к фамилии"},"ru/nbsp/m":{"en-US":"m2 → м², m3 → м³ and non-breaking space",ru:"м2 → м², м3 → м³ и нераз. пробел"},"ru/nbsp/mln":{"en-US":"Non-breaking space between number and “тыс.”, “млн”, “млрд” and “трлн”",ru:"Неразр. пробел между числом и «тыс.», «млн», «млрд» и «трлн»"},"ru/nbsp/ooo":{"en-US":"Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ”",ru:"Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ"},"ru/nbsp/page":{"en-US":"Non-breaking space after “стр.”, “гл.”, “рис.”, “илл.”",ru:"Нераз. пробел после «стр.», «гл.», «рис.», «илл.»"},"ru/nbsp/ps":{"en-US":"Non-breaking space in P. S. and P. P. S.",ru:"Нераз. пробел в P. S. и P. P. S."},"ru/nbsp/rubleKopek":{"en-US":"Not once. space before the “rub” and “cop.”",ru:"Нераз. пробел перед «руб.» и «коп.»"},"ru/nbsp/see":{"en-US":"Non-breaking space after abbreviation «см.» and «им.»",ru:"Нераз. пробел после сокращений «см.» и «им.»"},"ru/nbsp/year":{"en-US":"Non-breaking space before XXXX г. (2012 г.)",ru:"Нераз. пробел после XXXX г. (2012 г.)"},"ru/nbsp/years":{"en-US":"г.г. → гг. and non-breaking space",ru:"г.г. → гг. и нераз. пробел"},"ru/number/comma":{"en-US":"Commas in numbers",ru:"Замена точки на запятую в числах"},"ru/number/ordinals":{common:"N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й)"},"ru/optalign/bracket":{"en-US":"for opening bracket",ru:"для открывающей скобки"},"ru/optalign/comma":{"en-US":"for comma",ru:"для запятой"},"ru/optalign/quote":{"en-US":"for opening quotation marks",ru:"для открывающей кавычки"},"ru/other/accent":{"en-US":"Replacement capital letters to lowercase with addition of accent",ru:"Замена заглавной буквы на строчную с добавлением ударения"},"ru/other/phone-number":{"en-US":"Formatting phone numbers",ru:"Форматирование телефонных номеров"},"ru/punctuation/ano":{"en-US":"Placement of commas before “а” and “но”",ru:"Расстановка запятых перед «а» и «но»"},"ru/punctuation/exclamation":{common:"!! → !"},"ru/punctuation/exclamationQuestion":{common:"!? → ?!"},"ru/punctuation/hellipQuestion":{common:"«?…» → «?..», «!…» → «!..», «…,» → «…»"},"ru/space/afterHellip":{"en-US":"Space after “...”, “!..” and “?..”",ru:"Пробел после «...», «!..» и «?..»"},"ru/space/year":{"en-US":"Space between number and word “год”",ru:"Пробел между числом и словом «год»"},"ru/symbols/NN":{common:"№№ → №"},"ru/typo/switchingKeyboardLayout":{"en-US":"Replacement of Latin letters in Russian. Typos occur when you switch keyboard layouts",ru:"Замена латинских букв на русские. Опечатки, возникающие при переключении клавиатурной раскладки"}},Xr=[{name:"punctuation",title:{"en-US":"Punctuation",ru:"Пунктуация"}},{name:"optalign",title:{"en-US":"Hanging punctuation",ru:"Висячая пунктуация"}},{name:"dash",title:{"en-US":"Dash and hyphen",ru:"Тире и дефис"}},{name:"nbsp",title:{"en-US":"Non-breaking space",ru:"Неразрывный пробел"}},{name:"space",title:{"en-US":"Space and line ending",ru:"Пробел и окончание строки"}},{name:"html",title:{"en-US":"HTML",ru:"HTML"}},{name:"date",title:{"en-US":"Date",ru:"Дата"}},{name:"money",title:{"en-US":"Money",ru:"Деньги"}},{name:"number",title:{"en-US":"Numbers and mathematical expressions",ru:"Числа и математические выражения"}},{name:"symbols",title:{"en-US":"Symbols and signs",ru:"Символы и знаки"}},{name:"typo",title:{"en-US":"Typos",ru:"Опечатки"}},{name:"other",title:{"en-US":"Other",ru:"Прочее"}}];return p.titles=Yr,p.groups=Xr,p});var be=(b.exports==null?{}:b.exports).default||b.exports;ge.default=be});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/emailmaker",
3
- "version": "1.1.103",
3
+ "version": "1.1.108",
4
4
  "private": false,
5
5
  "main": "emailmaker.js",
6
6
  "module": "emailmaker-esm.js",
@@ -1 +1 @@
1
- import e from"../../vendor/react/index.js";var f=e&&e.default?e.default:e,{Activity:m,Children:n,Component:o,Fragment:c,Profiler:E,PureComponent:v,StrictMode:d,Suspense:R,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:S,__COMPILER_RUNTIME:h,cache:T,cacheSignal:g,cloneElement:N,createContext:k,createElement:_,createRef:b,forwardRef:A,isValidElement:O,lazy:I,memo:D,startTransition:L,unstable_useCacheRefresh:M,use:P,useActionState:U,useCallback:V,useContext:x,useDebugValue:H,useDeferredValue:z,useEffect:F,useEffectEvent:G,useId:W,useImperativeHandle:Y,useInsertionEffect:j,useLayoutEffect:p,useMemo:q,useOptimistic:w,useReducer:B,useRef:J,useState:Q,useSyncExternalStore:X,useTransition:Z,version:$}=e;try{var u=Symbol.for("editor-runtime.react.copies"),a=globalThis[u];a||(a=[],globalThis[u]=a);for(var s=!1,r=0;r<a.length;r++){var t=a[r];t&&t.react===e&&t.package==="@emailmaker/emailmaker"&&t.version==="1.1.103"&&(s=!0)}s||a.push({package:"@emailmaker/emailmaker",version:"1.1.103",react:e})}catch{}export{m as Activity,n as Children,o as Component,c as Fragment,E as Profiler,v as PureComponent,d as StrictMode,R as Suspense,S as __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h as __COMPILER_RUNTIME,T as cache,g as cacheSignal,N as cloneElement,k as createContext,_ as createElement,b as createRef,f as default,A as forwardRef,O as isValidElement,I as lazy,D as memo,L as startTransition,M as unstable_useCacheRefresh,P as use,U as useActionState,V as useCallback,x as useContext,H as useDebugValue,z as useDeferredValue,F as useEffect,G as useEffectEvent,W as useId,Y as useImperativeHandle,j as useInsertionEffect,p as useLayoutEffect,q as useMemo,w as useOptimistic,B as useReducer,J as useRef,Q as useState,X as useSyncExternalStore,Z as useTransition,$ as version};
1
+ import e from"../../vendor/react/index.js";var f=e&&e.default?e.default:e,{Activity:m,Children:n,Component:o,Fragment:c,Profiler:E,PureComponent:v,StrictMode:d,Suspense:R,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:S,__COMPILER_RUNTIME:h,cache:T,cacheSignal:g,cloneElement:N,createContext:k,createElement:_,createRef:b,forwardRef:A,isValidElement:O,lazy:I,memo:D,startTransition:L,unstable_useCacheRefresh:M,use:P,useActionState:U,useCallback:V,useContext:x,useDebugValue:H,useDeferredValue:z,useEffect:F,useEffectEvent:G,useId:W,useImperativeHandle:Y,useInsertionEffect:j,useLayoutEffect:p,useMemo:q,useOptimistic:w,useReducer:B,useRef:J,useState:Q,useSyncExternalStore:X,useTransition:Z,version:$}=e;try{var u=Symbol.for("editor-runtime.react.copies"),a=globalThis[u];a||(a=[],globalThis[u]=a);for(var s=!1,r=0;r<a.length;r++){var t=a[r];t&&t.react===e&&t.package==="@emailmaker/emailmaker"&&t.version==="1.1.108"&&(s=!0)}s||a.push({package:"@emailmaker/emailmaker",version:"1.1.108",react:e})}catch{}export{m as Activity,n as Children,o as Component,c as Fragment,E as Profiler,v as PureComponent,d as StrictMode,R as Suspense,S as __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h as __COMPILER_RUNTIME,T as cache,g as cacheSignal,N as cloneElement,k as createContext,_ as createElement,b as createRef,f as default,A as forwardRef,O as isValidElement,I as lazy,D as memo,L as startTransition,M as unstable_useCacheRefresh,P as use,U as useActionState,V as useCallback,x as useContext,H as useDebugValue,z as useDeferredValue,F as useEffect,G as useEffectEvent,W as useId,Y as useImperativeHandle,j as useInsertionEffect,p as useLayoutEffect,q as useMemo,w as useOptimistic,B as useReducer,J as useRef,Q as useState,X as useSyncExternalStore,Z as useTransition,$ as version};