@emailmaker/emailmaker 1.0.8 → 1.0.9

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 (43) hide show
  1. package/README.md +1 -1
  2. package/README_eng.md +1 -1
  3. package/asset-manifest.json +26 -26
  4. package/emailmaker-esm.js +1 -1
  5. package/emailmaker.js +1 -1
  6. package/iframe/css/sandbox.css +9 -4
  7. package/iframe/{iframe-eblock.9f15b585d409c5b241ce.html → iframe-eblock.608bba40534256f2936e.html} +1 -1
  8. package/iframe/{iframe.9f15b585d409c5b241ce.html → iframe.608bba40534256f2936e.html} +1 -1
  9. package/iframe/js/cssbeautify.js +1 -1
  10. package/iframe/js/typograf/typograf.all.min.js +1 -1
  11. package/iframe/js/typograf/typograf.all.min.js.LICENSE.txt +1 -1
  12. package/iframe/sandbox-eblock.js +1 -1
  13. package/iframe/sandbox-eblock.js.LICENSE.txt +1 -1
  14. package/iframe/sandbox.js +1 -1
  15. package/iframe/sandbox.js.LICENSE.txt +1 -1
  16. package/package.json +1 -1
  17. package/plugin.html +2 -1
  18. package/plugin_default.html +1 -1
  19. package/plugin_s.html +1 -1
  20. package/static/css/{3851.75ec4b28.css → 3851.1f07a6f1.css} +1 -1
  21. package/static/js/1472.fe27dc78.js +1 -0
  22. package/static/js/2256.b4b12bd2.js +1 -0
  23. package/static/js/2627.c2fad689.js +1 -0
  24. package/static/js/2835.546adb70.js +1 -0
  25. package/static/js/4087.39430f66.js +1 -0
  26. package/static/js/5571.703bbc87.js +1 -0
  27. package/static/js/5974.441a5974.js +1 -0
  28. package/static/js/698.9920d87b.js +1 -0
  29. package/static/js/8353.556e79ed.js +1 -0
  30. package/static/js/{9141.a807f45f.js → 9141.063ee048.js} +1 -1
  31. package/static/js/{emailmaker_core.d4c06bc2.js → emailmaker_core.a12d7e5c.js} +1 -1
  32. package/static/js/mergeTags/locale1.7ae1a083.chunk.js +1 -0
  33. package/translations.pot +311 -353
  34. package/static/js/1472.e4ead619.js +0 -1
  35. package/static/js/2256.13abf27b.js +0 -1
  36. package/static/js/2627.8ccc75f9.js +0 -1
  37. package/static/js/2835.740ca6fd.js +0 -1
  38. package/static/js/4087.9a4ff675.js +0 -1
  39. package/static/js/5571.7c0161af.js +0 -1
  40. package/static/js/5974.7e71f106.js +0 -1
  41. package/static/js/698.f294be82.js +0 -1
  42. package/static/js/8353.43f48dbb.js +0 -1
  43. package/static/js/mergeTags/locale1.08f64b23.chunk.js +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see typograf.all.min.js.LICENSE.txt */
2
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Typograf=n()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)};function n(e,n,t){if(t||2===arguments.length)for(var r,a=0,u=n.length;a<u;a++)!r&&a in n||((r=r||Array.prototype.slice.call(n,0,a))[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}var t=[["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]],r=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];function a(){var e=this;this.entities=this.prepareEntities(n(n([],t,!0),r,!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(r)}a.prototype.toUtf=function(e){var n=this;-1!==e.text.search(/&#/)&&(e.text=this.decHexToUtf(e.text)),-1!==e.text.search(/&[a-z]/i)&&(e.text=e.text.replace(/&[a-z\d]{2,31};/gi,(function(e){var t=n.entitiesByNameEntity[e];return t?t.utf:e})))},a.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,(function(e,n){return String.fromCharCode(parseInt(n,10))})).replace(/&#x([\da-f]{1,6});/gi,(function(e,n){return String.fromCharCode(parseInt(n,16))}))},a.prototype.restore=function(e){var n=e.prefs.htmlEntity,t=n.type,r=this.entities;"name"!==t&&"digit"!==t||((n.onlyInvisible||n.list)&&(r=[],n.onlyInvisible&&(r=r.concat(this.invisibleEntities)),n.list)&&(r=r.concat(this.prepareListParam(n.list))),e.text=this.restoreEntitiesByIndex(e.text,"name"===t?"nameEntity":"digitEntity",r))},a.prototype.getByUtf=function(e,n){var t;switch(n){case"digit":t=this.entitiesByDigitEntity[e];break;case"name":t=this.entitiesByNameEntity[e];break;default:t=e}return t},a.prototype.prepareEntities=function(e){var n=[];return e.forEach((function(e){var t=e[0],r=(e=e[1],String.fromCharCode(e));n.push({name:t,nameEntity:"&"+t+";",digitEntity:"&#"+e+";",utf:r,reName:new RegExp("&"+t+";","g"),reUtf:new RegExp(r,"g")})})),n},a.prototype.prepareListParam=function(e){var n=this,t=[];return e.forEach((function(e){(e=n.entitiesByName[e])&&t.push(e)})),t},a.prototype.restoreEntitiesByIndex=function(e,n,t){return t.forEach((function(t){e=e.replace(t.reUtf,t[n])})),e};var u=new a,o=[];function s(e){(e=(e||"").split("/")[0])&&"common"!==e&&!i(e)&&(o.push(e),o.sort())}function i(e){return"common"===e||-1!==o.indexOf(e)}function c(e,n){return(e=e||n)?Array.isArray(e)?e:[e]:[]}function l(e){if(!e.length)throw Error('Not defined the property "locale".');e.forEach((function(e){if(!i(e))throw Error('"'.concat(e,'" is not supported locale.'))}))}var p={};function m(e){Object.keys(e).forEach((function(n){s(n),p[n]=e[n]}))}var h=["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"],g=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),d="\\d+([.,]\\d+)?",f=/\d/;function b(e){return-1<e.search(f)}var $="",y="",x=(v.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},v.prototype.show=function(e,n){for(var t=new RegExp("tf\\d+","g"),r=new RegExp("tf\\d"),a=function(t){return e.safeTags.hidden[n][t]||t},u=0,o=this.tags[n].length;u<o&&(e.text=e.text.replace(t,a),-1!==e.text.search(r));u++);},v.prototype.hide=function(e,n){var t=this,r=(e.safeTags.hidden[n]={},this.pasteLabel.bind(this,e,n));this.tags[n].forEach((function(n){e.text=e.text.replace(t.prepareRegExp(n),r)}))},v.prototype.hideHTMLTags=function(e){var n;e.isHTML&&(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))},v.prototype.getPrevLabel=function(e,n){for(var t=n-1;0<=t;t--)if(e[t]===$)return e.slice(t,n+1);return""},v.prototype.getNextLabel=function(e,n){for(var t=n+1;t<e.length;t++)if(e[t]===$)return e.slice(n,t+1);return""},v.prototype.getTagByLabel=function(e,n){var t=null;return this.groups.some((function(r){var a=e.safeTags.hidden[r][n];return t=void 0!==a?{group:r,value:a}:t})),t},v.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=-1<h.indexOf(n.name),n.isClosing=-1<e.value.search(/^<\//);break;case"url":n.isInline=!0;break;case"own":n.isInline=!1}return n},v.prototype.pasteLabel=function(e,n,t){var r="tf"+(e=e.safeTags).counter+$;return e.hidden[n][r]=t,e.counter++,r},v.prototype.prepareRegExp=function(e){var n,t;return e instanceof RegExp?e:(n=e[0],t=e[1],e=e[2],new RegExp(n+(void 0===e?"[^]*?":e)+t,"gi"))},v.prototype.getPrevTagInfo=function(e,n,t){return(n=this.getPrevLabel(n,t-1))&&(t=this.getTagByLabel(e,n))?this.getTagInfo(t):null},v.prototype.getNextTagInfo=function(e,n,t){return(n=this.getNextLabel(n,t+1))&&(t=this.getTagByLabel(e,n))?this.getTagInfo(t):null},v);function v(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var e=[["\x3c!--","--\x3e"],["<!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:[g]}}function R(e,n){for(var t="";!(1&~n)&&(t+=e),0!=(n>>>=1);)e+=e;return t}function w(e){return e.replace(/\u00A0/g," ")}function E(e,n){for(var t=0;t<n.length;t++)e=e.replace(n[t][0],n[t][1]);return e}function S(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)}function U(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var k={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},q="default",T=[],A=[];function B(){var e=n([],T,!0);return e.sort((function(e,n){return e.index>n.index?1:-1})),e}function D(){return n([],A,!0)}function L(e){var n=(r=e.name.split("/"))[0],t=r[1],r=r[2];return{name:e.name,shortName:r,handler:e.handler,queue:e.queue||q,enabled:!0!==e.disabled,locale:n,group:t,index:"number"==typeof(r=e).index?r.index:(n=r.name.split("/")[1],void 0===(n=k[n])&&(n=0),"string"==typeof r.index?n+parseInt(r.index,10):n),settings:e.settings,live:e.live,htmlAttrs:e.htmlAttrs}}function N(e){return{type:(null==e?void 0:e.type)||"default",list:null==e?void 0:e.list,onlyInvisible:Boolean(null==e?void 0:e.onlyInvisible)}}function M(e){return e||"LF"}z.addRule=function(e){s((e=L(e)).locale),T.push(e)},z.addRules=function(e){var n=this;e.forEach((function(e){n.addRule(e)}))},z.addInnerRule=function(e){A.push(L(e))},z.addInnerRules=function(e){var n=this;e.forEach((function(e){n.addInnerRule(e)}))},z.getRule=function(e){var n=null;return B().some((function(t){return t.name===e&&(n=t,!0)})),n},z.getRules=B,z.getInnerRules=D,z.getLocales=function(){return o},z.addLocale=function(e){s(e)},z.hasLocale=i,z.setData=function(e){m(e)},z.getData=function(e){return p[e]},z.prototype.execute=function(n,t){var r;return(n=""+n)?(r=this.prefs,r=e({},r),t&&("locale"in t&&(r.locale=c(t.locale)),"htmlEntity"in t&&(r.htmlEntity=N(t.htmlEntity)),"lineEnding"in t&&(r.lineEnding=M(t.lineEnding)),"processingSeparateParts"in t&&(r.processingSeparateParts=t.processingSeparateParts),"ruleFilter"in t)&&(r.ruleFilter=t.ruleFilter),l((t=r).locale),r=this.prepareContext(n,t),this.process(r)):""},z.prototype.getSetting=function(e,n){return this.settings[e]&&this.settings[e][n]},z.prototype.setSetting=function(e,n,t){this.settings[e]=this.settings[e]||{},this.settings[e][n]=t},z.prototype.isEnabledRule=function(e){return!1!==this.enabledRules[e]},z.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},z.prototype.enableRule=function(e){return this.enable(e,!0)},z.prototype.disableRule=function(e){return this.enable(e,!1)},z.prototype.addSafeTag=function(e,n,t){e=e instanceof RegExp?e:[e,n,t],this.safeTags.add(e)},z.prototype.prepareContext=function(e,n){return{text:e,isHTML:S(e),prefs:n,getData:function(e){return"char"===e?n.locale.map((function(n){return p[n+"/"+e]})).join(""):function(e){return p[e]}(n.locale[0]+"/"+e)},safeTags:this.safeTags}},z.prototype.splitBySeparateParts=function(e){var n,t,r;return e.isHTML&&!1!==e.prefs.processingSeparateParts?(n=[],t=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),r=0,e.text.replace(t,(function(t,a,u,o){return r!==o&&n.push((r?y:"")+e.text.slice(r,o)+y),n.push(t),r=o+t.length,t})),n.push(r?y+e.text.slice(r,e.text.length):e.text),n):[e.text]},z.prototype.process=function(e){var n,t=this,r=(e.text=e.text.replace(/\r\n?/g,"\n"),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"),e.isHTML),a=new RegExp(y,"g");return e.text=this.splitBySeparateParts(e).map((function(n){return e.text=n,e.isHTML=S(n),t.safeTags.hideHTMLTags(e),t.safeTags.hide(e,"url"),t.executeRules(e,"hide-safe-tags-url"),t.executeRules(e,"hide-safe-tags"),u.toUtf(e),e.prefs.live&&(e.text=w(e.text)),t.executeRules(e,"utf"),t.executeRules(e),u.restore(e),t.executeRules(e,"html-entities"),t.safeTags.show(e,"url"),t.executeRules(e,"show-safe-tags-url"),e.text.replace(a,"")})).join(""),e.isHTML=r,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"),r=e.text,"CRLF"===(n=e.prefs.lineEnding)?r.replace(/\n/g,"\r\n"):"CR"===n?r.replace(/\n/g,"\r"):r},z.prototype.executeRules=function(e,n){var t=this,r=this.rulesByQueues[n=void 0===n?q:n];(n=this.innerRulesByQueues[n])&&n.forEach((function(n){t.ruleIterator(e,n)})),r&&r.forEach((function(n){t.ruleIterator(e,n)}))},z.prototype.ruleIterator=function(e,n){!0===e.prefs.live&&!1===n.live||!1===e.prefs.live&&!0===n.live||"common"!==n.locale&&n.locale!==e.prefs.locale[0]||!this.isEnabledRule(n.name)||e.prefs.ruleFilter&&!e.prefs.ruleFilter(n)||(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))},z.prototype.prepareRuleSettings=function(e){this.settings[e.name]=U(e.settings),this.enabledRules[e.name]=e.enabled},z.prototype.enable=function(e,n){var t=this;Array.isArray(e)?e.forEach((function(e){t.enableByMask(e,n)})):this.enableByMask(e,n)},z.prototype.enableByMask=function(e,n){var t,r=this;e&&(-1!==e.search(/\*/)?(t=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this.rules.forEach((function(e){e=e.name,t.test(e)&&(r.enabledRules[e]=n)}))):this.enabledRules[e]=n)},z.groups=[],z.titles={},z.version="7.1.0";var P=z;function z(e){var n=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs={locale:c(e.locale),lineEnding:M(e.lineEnding),live:Boolean(e.live),ruleFilter:e.ruleFilter,enableRule:e.enableRule,disableRule:e.disableRule,processingSeparateParts:e.processingSeparateParts,htmlEntity:N(e.htmlEntity)},l(this.prefs.locale),this.safeTags=new x,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=D(),this.innerRules.forEach((function(e){n.innerRulesByQueues[e.queue]=n.innerRulesByQueues[e.queue]||[],n.innerRulesByQueues[e.queue].push(e)})),this.rulesByQueues={},this.rules=B(),this.rules.forEach((function(e){n.prepareRuleSettings(e),n.rulesByQueues[e.queue]=n.rulesByQueues[e.queue]||[],n.rulesByQueues[e.queue].push(e)})),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}[{"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:"”’"}},{"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/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(m);var I={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},C={name:"common/html/escape",index:"+100",queue:"end",handler:function(e){return e.replace(/[&<>"'/]/g,(function(e){return I[e]}))},disabled:!0},O=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]");function H(e,n,t,r){return n+t.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}function j(){this.bufferQuotes={left:"",right:""},this.beforeLeft=" \n\t [(",this.afterRight=" \n\t !?.:;#*,…)\\]"}P.addRules([{name:"common/html/e-mail",queue:"end",handler:function(e,n,t){return t.isHTML?e:e.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},C,{name:"common/html/nbr",index:"+10",queue:"end",handler:function(e){return e.replace(/([^\n>])\n(?=[^\n])/g,"$1<br/>\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/p",index:"+5",queue:"end",handler:function(e){return(e=e.split("\n\n")).forEach((function(e,n,t){!e.trim()||O.test(e)||(t[n]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1"))})),e.join("\n\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,n,t){var r=this,a=new RegExp("(^|\\s)("+n.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),u=U(t.prefs);return u.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,(function(e,n,t){return n+t.replace(a,(function(e,n,t,a){var o=a[0],s=a[a.length-1];return a=a.slice(1,-1),n+t+"="+o+r.execute(a,u)+s}))}))},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(e,n,t){return t.isHTML?e:e.replace(g,(function(e,n,t){t=t.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===n?t=t.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===n&&(t=t.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=t,a='<a href="'+(t=n+"://"+t)+'">';return"http"===n||"https"===n?(r=r.replace(/^www\./,""),a+("http"===n?r:n+"://"+r)+"</a>"):a+t+"</a>"}))},disabled:!0,htmlAttrs:!1}]),C={name:"common/nbsp/afterNumber",handler:function(e,n,t){return t=t.getData("char"),e.replace(new RegExp("(^|\\s)(\\d{1,5}) (["+t+"]+)","gi"),"$1$2 $3")},disabled:!0},P.addRules([C,{name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"¶ ")}},{name:"common/nbsp/afterSectionMark",handler:function(e,n,t){return t=t.prefs.locale[0],e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===t?"§ ":"§ ")}},{name:"common/nbsp/afterShortWord",handler:function(e,n,t){n=n.lengthShortWord;var r=p["common/quote"];return t=t.getData("char"),r=new RegExp("(^|[  ("+r+"])(["+t+"]{1,"+n+"}) ","gim"),e.replace(r,"$1$2 ").replace(r,"$1$2 ")},settings:{lengthShortWord:2}},{name:"common/nbsp/beforeShortLastNumber",handler:function(e,n,t){var r=t.getData("quote"),a=(t=t.getData("char")).toUpperCase();return t=new RegExp("(["+t+a+"]) (?=\\d{1,"+n.lengthLastNumber+"}[-+−%'\""+r.right+")]?([.!?…]( ["+a+"]|$)|$))","gm"),e.replace(t,"$1 ")},live:!1,settings:{lengthLastNumber:2}},{name:"common/nbsp/beforeShortLastWord",handler:function(e,n,t){var r=(t=t.getData("char")).toUpperCase();return t=new RegExp("(["+t+"\\d]) (["+t+r+"]{1,"+n.lengthLastWord+"}[.!?…])( ["+r+"]|$)","g"),e.replace(t,"$1 $2$3")},settings:{lengthLastWord:3}},{name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1 $2")}},{name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,H).replace(/(<nobr>)(.*?)(<\/nobr>)/g,H)}},{name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:w,disabled:!0}]),C={name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(e,n){return e.replace(new RegExp("(^ ?|\\D |".concat($,")(\\d{1,3}([    ]\\d{3})+)(?! ?[\\d-])"),"gm"),(function(e,t,r){return t+r.replace(/\s/g,n.space)})).replace(/(\d{5,}([.,]\d+)?)/g,(function(e,t){var r=t.match(/[.,]/),a=(t=r?t.split(r):[t])[0];return t=t[1],a=a.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+n.space),r?a+r+t:a}))},settings:{space:" "}},P.addRules([C,{name:"common/number/fraction",handler:function(e){return e.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(e){return E(e,[[/!=/g,"≠"],[/<=/g,"≤"],[/(^|[^=])>=/g,"$1≥"],[/<=>/g,"⇔"],[/<</g,"≪"],[/>>/g,"≫"],[/~=/g,"≅"],[/(^|[^+])\+-/g,"$1±"]])}},{name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1×$2")}}]),P.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}},{name:"common/other/repeatWord",handler:function(e,n,t){var r=p["common/quote"];return t=t.getData("char"),r="[;:,.?! \n"+r+"]",t=new RegExp("("+r+"|^)(["+t+"]{"+n.min+",}) \\2("+r+"|$)","gi"),e.replace(t,"$1$2$3")},settings:{min:2},disabled:!0}]),C={name:"common/punctuation/apostrophe",handler:function(e,n,t){return t="(["+t.getData("char")+"])",t=new RegExp(t+"'"+t,"gi"),e.replace(t,"$1’$2")}},j.prototype.process=function(e){var n,t,r=e.context.text;return this.count(r).total&&(n=e.settings,(t=e.settings.left[0]===e.settings.right[0])&&(e.settings=U(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&&(r=this.removeSpacing(r,e.settings)),r=this.set(r,e),e.settings.spacing&&(r=this.setSpacing(r,e.settings)),e.settings.removeDuplicateQuotes&&(r=this.removeDuplicates(r,e.settings)),t)&&(r=this.returnOriginalQuotes(r,n,e.settings),e.settings=n),r},j.prototype.returnOriginalQuotes=function(e,n,t){for(var r={},a=0;a<t.left.length;a++)r[t.left[a]]=n.left[a],r[t.right[a]]=n.right[a];return e.replace(new RegExp("["+t.left+t.right+"]","g"),(function(e){return r[e]}))},j.prototype.count=function(e){var n={total:0};return e.replace(new RegExp("["+p["common/quote"]+"]","g"),(function(e){return n[e]||(n[e]=0),n[e]++,n.total++,e})),n},j.prototype.removeDuplicates=function(e,n){var t=n.left[0],r=n.left[1]||t;return n=n.right[0],t!==r?e:e.replace(new RegExp(t+t,"g"),t).replace(new RegExp(n+n,"g"),n)},j.prototype.removeSpacing=function(e,n){for(var t=0,r=n.left.length;t<r;t++){var a=n.left[t],u=n.right[t];e=e.replace(new RegExp(a+"([   ])","g"),a).replace(new RegExp("([   ])"+u,"g"),u)}return e},j.prototype.setSpacing=function(e,n){for(var t=0,r=n.left.length;t<r;t++){var a=n.left[t],u=n.right[t];e=e.replace(new RegExp(a+"([^ ])","g"),a+" $1").replace(new RegExp("([^ ])"+u,"g"),"$1 "+u)}return e},j.prototype.set=function(e,n){var t=p["common/quote"],r=n.settings.left[0],a=n.settings.left[1]||r,u=n.settings.right[0],o=new RegExp("(^|["+this.beforeLeft+"])(["+t+"]+)(?=[^\\s])","gim");return t=new RegExp("([^\\s])(["+t+"]+)(?=["+this.afterRight+"]|$)","gim"),e=e.replace(o,(function(e,n,t){return n+R(r,t.length)})).replace(t,(function(e,n,t){return n+R(u,t.length)})),e=this.setAboveTags(e,n),r!==a?this.setInner(e,n.settings):e},j.prototype.setAboveTags=function(e,n){var t=this,r=n.settings.left[0],a=n.settings.right[0];return e.replace(new RegExp("(^|.)(["+p["common/quote"]+"])(.|$)","gm"),(function(u,o,s,i,c){return o!==$&&i!==$?u:o===$&&i===$?'"'===s?o+t.getAboveTwoTags(e,c+1,n)+i:u:o===$?(s=-1<t.afterRight.indexOf(i),u=n.safeTags.getPrevTagInfo(n.context,e,c-1),s&&u&&"html"===u.group?o+(u.isClosing?a:r)+i:o+(!i||s?a:r)+i):(u=-1<t.beforeLeft.indexOf(o),s=n.safeTags.getNextTagInfo(n.context,e,c+1),u&&s&&"html"===s.group?o+(s.isClosing?a:r)+i:o+(!o||u?r:a)+i)}))},j.prototype.getAboveTwoTags=function(e,n,t){var r=t.safeTags.getPrevTagInfo(t.context,e,n),a=t.safeTags.getNextTagInfo(t.context,e,n);if(r&&"html"===r.group){if(!r.isClosing)return t.settings.left[0];if(a&&a.isClosing&&r.isClosing)return t.settings.right[0]}return e[n]},j.prototype.setInner=function(e,n){for(var t=n.left[0],r=n.right[0],a=this.getMaxLevel(e,t,r,n.left.length),u=0,o="",s=0,i=e.length;s<i;s++){var c=e[s];c===t?(o+=n.left[a-1<u?a-1:u],a<++u&&(u=a)):c===r?(--u<0&&(u=0),o+=n.right[u]):('"'===c&&(u=0),o+=c)}return o},j.prototype.getMaxLevel=function(e,n,t,r){return(e=this.count(e))[n]===e[t]?r:Math.min(r,2)};var Q=new j,F={},Y=(o.forEach((function(e){F[e]=U(p[e+"/quote"])})),{name:"common/punctuation/quote",handler:function(e,n,t){return(n=n[t.prefs.locale[0]])?Q.process({context:t,settings:n,safeTags:this.safeTags}):e},settings:F}),X=(P.addRules([C,{name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},{name:"common/punctuation/hellip",handler:function(e,n,t){return"ru"===t.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1…"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1…$2")}},Y,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,n,t){t=this.getSetting("common/punctuation/quote",t.prefs.locale[0]);var r=u.getByUtf(t.left[0]),a=u.getByUtf(t.right[0]),o=(o=u.getByUtf(t.left[1]))?"|"+o:"";return t=(t=u.getByUtf(t.right[1]))?"|"+t:"",r=new RegExp("(<[aA]\\s[^>]*?>)("+r+o+")([^]*?)("+a+t+")(</[aA]>)","g"),e.replace(r,"$2$1$3$5$4")}}]),C={name:"common/space/beforeBracket",handler:function(e,n,t){return t=t.getData("char"),t=new RegExp("(["+t+".!?,;…)])\\(","gi"),e.replace(t,"$1 (")}},Y={name:"common/space/delRepeatN",index:"-1",handler:function(e,n){n=n.maxConsecutiveLineBreaks;var t=new RegExp("\n{".concat(n+1,",}"),"g");return n=R("\n",n),e.replace(t,n)},settings:{maxConsecutiveLineBreaks:2}},{name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),W={name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}},G=new RegExp('(\\D):([^)",:.?\\s\\/\\\\])',"g"),K={name:"common/space/afterColon",handler:function(e){return e.replace(G,"$1: $2")}},V={name:"common/space/afterComma",handler:function(e,n,t){return t="string"==typeof(t=t.getData("quote"))?t:t.right,e.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\'+t+"])","g"),(function(e,n,t){return b(n)&&b(t)?e:n+", "+t}))}},Z=new RegExp("\\?([^).…!;?\\s[\\])"+p["common/quote"]+"])","g"),J={name:"common/space/afterQuestionMark",handler:function(e){return e.replace(Z,"? $1")}},_=new RegExp("!([^).…!;?\\s[\\])"+p["common/quote"]+"])","g"),ee={name:"common/space/afterExclamationMark",handler:function(e){return e.replace(_,"! $1")}},ne=new RegExp(";([^).…!;?\\s[\\])"+p["common/quote"]+"])","g"),te=(P.addRules([K,V,J,ee,{name:"common/space/afterSemicolon",handler:function(e){return e.replace(ne,"; $1")}},C,{name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},{name:"common/space/delBeforeDot",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},{name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}},{name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) ([!?:;,])(?!\))/g,"$1$2")}},{name:"common/space/delBetweenExclamationMarks",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1")}},{name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/^[ \t]+/gm,"")},disabled:!0},Y,{name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},{name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}},{name:"common/space/insertFinalNewline",queue:"end",handler:function(e){return"\n"===e[e.length-1]?e:e+"\n"},live:!1,disabled:!0},{name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}},{name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},X,W]),K={name:"common/symbols/arrow",handler:function(e){return E(e,[[/(^|[^-])->(?!>)/g,"$1→"],[/(^|[^<])<-(?!-)/g,"$1←"]])}},P.addRules([K,{name:"common/symbols/cf",handler:function(e){var n=new RegExp('(^|[\\s(\\[+≈±−—–\\-])(\\d+(?:[.,]\\d+)?)[   ]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return e.replace(n,"$1$2 °$3$4")}},{name:"common/symbols/copy",handler:function(e){return E(e,[[/\(r\)/gi,"®"],[/(copyright )?\((c|\u0441)\)/gi,"©"],[/\(tm\)/gi,"™"]])}}]),V={name:"en-US/dash/main",index:"-5",handler:function(e){var n=p["common/dash"],t="[ ".concat(" ","]"),r="[ ".concat(" ","\n]");return t=new RegExp("".concat(t,"(").concat(n,")(").concat(r,")"),"g"),e.replace(t,"".concat(" ").concat("—","$2"))}},P.addRules([V]),J={name:"ru/dash/centuries",handler:function(e,n){var t=new RegExp("(X|I|V)[ | ]?("+p["common/dash"]+")[ | ]?(X|I|V)","g");return e.replace(t,"$1"+n.dash+"$3")},settings:{dash:"–"}},P.addRules([J,{name:"ru/dash/daysMonth",handler:function(e,n){var t=new RegExp("(^|\\s)([123]?\\d)("+p["common/dash"]+")([123]?\\d)[  ]("+p["ru/monthGenCase"]+")","g");return e.replace(t,"$1$2"+n.dash+"$4 $5")},settings:{dash:"–"}},{name:"ru/dash/de",handler:function(e){var n=new RegExp("([a-яё]+) де"+p["ru/dashAfterDe"],"g");return e.replace(n,"$1-де")},disabled:!0},{name:"ru/dash/decade",handler:function(e,n){var t=new RegExp("(^|\\s)(\\d{3}|\\d)0("+p["common/dash"]+")(\\d{3}|\\d)0(-е[  ])(?=г\\.?[  ]?г|год)","g");return e.replace(t,"$1$20"+n.dash+"$40$5")},settings:{dash:"–"}},{name:"ru/dash/directSpeech",handler:function(e){var n=p["common/dash"],t=new RegExp('(["»‘“,])[ | ]?('.concat(n,")[ | ]"),"g"),r=new RegExp("(^|".concat($,")(").concat(n,")( | )"),"gm");return n=new RegExp("([.…?!])[  ](".concat(n,")[  ]"),"g"),e.replace(t,"$1 — ").replace(r,"$1— ").replace(n,"$1 — ")}},{name:"ru/dash/izpod",handler:function(e){var n=new RegExp(p["ru/dashBefore"]+"(И|и)з под"+p["ru/dashAfter"],"g");return e.replace(n,"$1$2з-под")}},{name:"ru/dash/izza",handler:function(e){var n=new RegExp(p["ru/dashBefore"]+"(И|и)з за"+p["ru/dashAfter"],"g");return e.replace(n,"$1$2з-за")}},{name:"ru/dash/ka",handler:function(e){var n=new RegExp("([a-яё]+) ка(сь)?"+p["ru/dashAfter"],"g");return e.replace(n,"$1-ка$2")}},{name:"ru/dash/koe",handler:function(e){var n=new RegExp(p["ru/dashBefore"]+"([Кк]о[ей])\\s([а-яё]{3,})"+p["ru/dashAfter"],"g");return e.replace(n,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(e){var n=new RegExp("([  ])("+p["common/dash"]+")([  \\n])","g");return e.replace(n," —$3")}},{name:"ru/dash/month",handler:function(e,n){var t="("+p["ru/month"]+")",r="("+p["ru/monthPreCase"]+")",a=p["common/dash"];return t=new RegExp(t+" ?("+a+") ?"+t,"gi"),a=new RegExp(r+" ?("+a+") ?"+r,"gi"),r="$1"+n.dash+"$3",e.replace(t,r).replace(a,r)},settings:{dash:"–"}},{name:"ru/dash/surname",handler:function(e){var n=new RegExp("([А-ЯЁ][а-яё]+)\\s-([а-яё]{1,3})(?![^а-яё]|$)","g");return e.replace(n,"$1 —$2")}},{name:"ru/dash/taki",handler:function(e){var n=new RegExp("(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\s(таки)"+p["ru/dashAfter"],"g");return e.replace(n,"$1-$2")}},{name:"ru/dash/time",handler:function(e,n){var t=new RegExp(p["ru/dashBefore"]+"(\\d?\\d:[0-5]\\d)"+p["common/dash"]+"(\\d?\\d:[0-5]\\d)"+p["ru/dashAfter"],"g");return e.replace(t,"$1$2"+n.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/to",handler:function(e){var n=new RegExp("(^|[^А-ЯЁа-яё\\w])([Оо]ткуда|[Кк]уда|[Гг]де|[Кк]огда|[Зз]ачем|[Пп]очему|[Кк]ак|[Кк]ако[ейм]|[Кк]акая|[Кк]аки[емх]|[Кк]акими|[Кк]акую|[Чч]то|[Чч]его|[Чч]е[йм]|[Чч]ьим?|[Кк]то|[Кк]ого|[Кк]ому|[Кк]ем)( | -|- )(то|либо|нибудь)"+p["ru/dashAfter"],"g");return e.replace(n,(function(e,n,t,r,a){return"как то"===(r=t+r+a)||"Как то"===r?e:n+t+"-"+a}))}},{name:"ru/dash/kakto",handler:function(e){var n=new RegExp("(^|[^А-ЯЁа-яё\\w])([Кк]ак) то"+p["ru/dashAfter"],"g");return e.replace(n,"$1$2-то")}},{name:"ru/dash/weekday",handler:function(e,n){var t="("+p["ru/weekday"]+")";return t=new RegExp(t+" ?("+p["common/dash"]+") ?"+t,"gi"),e.replace(t,"$1"+n.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/years",handler:function(e,n){var t=new RegExp("(\\D|^)(\\d{4})[  ]?("+p["common/dash"]+")[  ]?(\\d{4})(?=[  ]?г)","g");return e.replace(t,(function(e,t,r,a,u){return parseInt(r,10)<parseInt(u,10)?t+r+n.dash+u:e}))},settings:{dash:"–"}}]),ee="(-|\\.|\\/)",C="(-|\\/)",new RegExp("(^|\\D)(\\d{4})"+ee+"(\\d{2})"+ee+"(\\d{2})(\\D|$)","gi")),re=new RegExp("(^|\\D)(\\d{2})"+C+"(\\d{2})"+C+"(\\d{4})(\\D|$)","gi");function ae(e,n,t,r){return"дд"===t&&"мм"===r||-1<["рф","ру","рус","орг","укр","бг","срб"].indexOf(r)?e:n+t+". "+r+"."}P.addRules([{name:"ru/date/fromISO",handler:function(e){return e.replace(te,"$1$6.$4.$2$7").replace(re,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(e){var n=new RegExp("(\\d)( | )("+p["ru/monthGenCase"]+"),( | )("+p["ru/weekday"]+")","gi");return e.replace(n,(function(e,n,t,r,a,u){return n+t+r.toLowerCase()+","+a+u.toLowerCase()}))}}]),Y={name:"ru/money/currency",handler:function(e){var n="([$€¥Ұ£₤₽])",t=new RegExp("(^|[\\D]{2})"+n+" ?("+d+"([    ]\\d{3})*)([    ]?(тыс\\.|млн|млрд|трлн))?","gm");return n=new RegExp("(^|[\\D])("+d+") ?"+n,"gm"),e.replace(t,(function(e,n,t,r,a,u,o,s){return n+r+(s?" "+s:"")+" "+t})).replace(n,"$1$2 $4")},disabled:!0},P.addRules([Y,{name:"ru/money/ruble",handler:function(e){var n="$1 ₽",t="(\\d+)( | )?(р|руб)\\.",r=new RegExp("^"+t+"$","g"),a=new RegExp(t+"(?=[!?,:;])","g");return t=new RegExp(t+"(?=\\s+[A-ЯЁ])","g"),e.replace(r,n).replace(a,n).replace(t,n+".")},disabled:!0}]);var ue={2:"²","²":"²",3:"³","³":"³","":""};function oe(e,n){return n=new RegExp('<span class="('+n.join("|")+')">([^]*?)</span>',"g"),e.replace(n,"$2")}function se(e,n){return e.replace(/<title>[^]*?<\/title>/i,(function(e){return oe(e,n)}))}P.addRules([{name:"ru/nbsp/abbr",handler:function(e){var n=new RegExp("(^|\\s|".concat($,")([а-яё]{1,3})\\. ?([а-яё]{1,3})\\."),"g");return e.replace(n,ae).replace(n,ae)}},{name:"ru/nbsp/addr",handler:function(e){return e.replace(/(\s|^)(\u0434\u043e\u043c|\u0434\.|\u043a\u0432\.|\u043f\u043e\u0434\.|\u043f-\u0434) *(\d+)/gi,"$1$2 $3").replace(/(\s|^)(\u043c\u043a\u0440-\u043d|\u043c\u043a-\u043d|\u043c\u043a\u0440\.|\u043c\u043a\u0440\u043d)\s/gi,"$1$2 ").replace(/(\s|^)(\u044d\u0442\.) *(-?\d+)/gi,"$1$2 $3").replace(/(\s|^)(\d+) +\u044d\u0442\u0430\u0436([^\u0430-\u044f\u0451]|$)/gi,"$1$2 этаж$3").replace(/(\s|^)\u043b\u0438\u0442\u0435\u0440\s([\u0410-\u042f]|$)/gi,"$1литер $2").replace(/(\s|^)(\u043e\u0431\u043b|\u043a\u0440|\u0441\u0442|\u043f\u043e\u0441|\u0441|\u0434|\u0443\u043b|\u043f\u0435\u0440|\u043f\u0440|\u043f\u0440-\u0442|\u043f\u0440\u043e\u0441\u043f|\u043f\u043b|\u0431\u0443\u043b|\u0431-\u0440|\u043d\u0430\u0431|\u0448|\u0442\u0443\u043f|\u043e\u0444|\u043a\u043e\u043c\u043d?|\u0443\u0447|\u0432\u043b|\u0432\u043b\u0430\u0434|\u0441\u0442\u0440|\u043a\u043e\u0440)\. *([\u0430-\u044f\u0451a-z\d]+)/gi,"$1$2. $3").replace(/(\D[ \u00A0]|^)\u0433\. ?([\u0410-\u042f\u0401])/gm,"$1г. $2")}},{name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"№ $1")}},{name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var n="(ли|ль|же|ж|бы|б)",t=new RegExp("([А-ЯЁа-яё]) "+n+'(?=[,;:?!"‘“»])',"g");return n=new RegExp("([А-ЯЁа-яё])[  ]"+n+"[  ]","g"),e.replace(t,"$1 $2").replace(n,"$1 $2 ")}},{name:"ru/nbsp/centuries",handler:function(e){var n=p["common/dash"],t="(^|\\s)([VIX]+)",r='(?=[,;:?!"‘“»]|$)',a=new RegExp(t+"[  ]?в\\.?"+r,"gm");return t=new RegExp(t+"("+n+")([VIX]+)[  ]?в\\.?([  ]?в\\.?)?"+r,"gm"),e.replace(a,"$1$2 в.").replace(t,"$1$2$3$4 вв.")}},{name:"ru/nbsp/dayMonth",handler:function(e){var n=new RegExp("(\\d{1,2}) ("+p["ru/shortMonth"]+")","gi");return e.replace(n,"$1 $2")}},{name:"ru/nbsp/initials",handler:function(e){var n=new RegExp("(^|[   "+p["ru/quote"].left+'"])([А-ЯЁ])\\.[   ]?([А-ЯЁ])\\.[   ]?([А-ЯЁ][а-яё]+)',"gm");return e.replace(n,"$1$2. $3. $4")}},{name:"ru/nbsp/m",index:"+5",handler:function(e){var n=new RegExp("(^|[\\s,.\\(])(\\d+)[  ]?(мм?|см|км|дм|гм|mm?|km|cm|dm)([23²³])?([\\s\\).!?,;]|$)","gm");return e.replace(n,(function(e,n,t,r,a,u){return n+t+" "+r+ue[a||""]+(" "===u?" ":u)}))}},{name:"ru/nbsp/mln",handler:function(e){return e.replace(/(\d) ?(\u0442\u044b\u0441|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d)(\.|\s|$)/gi,"$1 $2$3")}},{name:"ru/nbsp/ooo",handler:function(e){return e.replace(/(^|[^a-\u044f\u0451A-\u042f\u0401])(\u041e\u041e\u041e|\u041e\u0410\u041e|\u0417\u0410\u041e|\u041d\u0418\u0418|\u041f\u0411\u041e\u042e\u041b) /g,"$1$2 ")}},{name:"ru/nbsp/page",handler:function(e){var n=new RegExp("(^|[)\\s])(стр|гл|рис|илл?|ст|п|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return e.replace(n,"$1$2. $3$4")}},{name:"ru/nbsp/ps",handler:function(e){var n=new RegExp("(^|\\s|".concat($,")[pз]\\.[  ]?([pз]\\.[  ]?)?[sы]\\.:? "),"gim");return e.replace(n,(function(e,n,t){return n+(t?"P. P. S. ":"P. S. ")}))}},{name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1 ")}},{name:"ru/nbsp/see",handler:function(e){var n=new RegExp("(^|\\s|".concat($,"|\\()(см|им)\\.[  ]?([а-яё0-9a-z]+)([\\s.,?!]|$)"),"gi");return e.replace(n,(function(e,n,t,r,a){return(" "===n?" ":n)+t+". "+r+a}))}},{name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2 г$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(e){var n=new RegExp("(^|\\D)(\\d{4})("+p["common/dash"]+')(\\d{4})[  ]?г\\.?([  ]?г\\.)?(?=[,;:?!"‘“»\\s]|$)',"gm");return e.replace(n,"$1$2$3$4 гг.")}}]),P.addRules([{name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(e,n,t){return t=t.getData("char"),t=new RegExp("(\\d[%‰]?)-(ый|ой|ая|ое|ые|ым|ом|ых|ого|ому|ыми)(?!["+t+"])","g"),e.replace(t,(function(e,n,t){return n+"-"+{ой:"й",ый:"й",ая:"я",ое:"е",ые:"е",ым:"м",ом:"м",ых:"х",ого:"го",ому:"му",ыми:"ми"}[t]}))}}]);var ie=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],ce=(W={name:X="ru/optalign/bracket",queue:"start",handler:function(e){return oe(e,ie)},htmlAttrs:!1},K={name:X,queue:"end",handler:function(e){return se(e,ie)},htmlAttrs:!1},["typograf-oa-comma","typograf-oa-comma-sp"]),le=(J={name:V="ru/optalign/comma",queue:"start",handler:function(e){return oe(e,ce)},htmlAttrs:!1},ee={name:V,queue:"end",handler:function(e){return se(e,ce)},htmlAttrs:!1},["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"]),pe=(Y={name:C="ru/optalign/quote",queue:"start",handler:function(e){return oe(e,le)},htmlAttrs:!1},{name:C,queue:"end",handler:function(e){return se(e,le)},htmlAttrs:!1}),me=(P.addRules([{name:X,handler:function(e){return e.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},{name:V,handler:function(e,n,t){return t=t.getData("char"),t=new RegExp("(["+t+"\\d́]+), ","gi"),e.replace(t,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},{name:C,handler:function(e){var n="(["+(n=this.getSetting("common/punctuation/quote","ru")).left[0]+(n.left[1]||"")+"])",t=new RegExp("(^|\n\n|)("+n+")","g");return n=new RegExp("([^\n])([  \n])("+n+")","gi"),e.replace(t,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(n,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1}]),P.addInnerRules([W,K,J,ee,Y,pe]),[]);function he(e){var n,t,r=e[0],a="";if(e.length<8)return ge(e);if(10<e.length)if("+"===r){if("7"!==e[1])return e;n=!0,e=e.substr(2)}else"8"===r&&(t=!0,e=e.substr(1));for(var u=8;2<=u;u--){var o=+e.substr(0,u);if(-1<me.indexOf(o)){a=e.substr(0,u),e=e.substr(u);break}}return a||(a=e.substr(0,5),e=e.substr(5)),(n?"+7 ":"")+(t?"8 ":"")+function(e){var n=+e,t=e.length,r=[e],a=!1;if(3<t)switch(t){case 4:r=[e.substr(0,2),e.substr(2,2)];break;case 5:r=[e.substr(0,3),e.substr(3,3)];break;case 6:r=[e.substr(0,2),e.substr(2,2),e.substr(4,2)]}else a=900<n&&n<=999||495==n||499==n;return t=r.join("-"),a?t:"("+t+")"}(a)+" "+ge(e)}function ge(e){var n="";return e.length%2&&(n=e[0],n+=e.length<=5?"-":"",e=e.substr(1,e.length-1)),n+e.split(/(?=(?:\d\d)+$)/).join("-")}function de(e){return e.replace(/[^\d+]/g,"")}[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,"901-934","936-939","950-953",958,"960-969","977-989","991-997",999].forEach((function(e){if("string"==typeof e)for(var n=e.split("-"),t=+n[0];t<=+n[1];t++)me.push(t);else me.push(e)})),P.addRules([{name:"ru/other/accent",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])([\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f])([^\u0410-\u042f\u0401\w]|$)/g,(function(e,n,t,r){return n+t.toLowerCase()+"́"+r}))},disabled:!0},{name:"ru/other/phone-number",live:!1,handler:function(e){var n=new RegExp("(^|,| |)(\\+7[\\d\\(\\)  -]{10,18})(?=,|;||$)","gm");return e.replace(n,(function(e,n,t){return 12===(t=de(t)).length?n+he(t):e})).replace(/(^|[^\u0430-\u044f\u0451])([\u260e\u260f\u2706\ud83d\udce0\ud83d\udcde\ud83d\udcf1]|\u0442\.|\u0442\u0435\u043b\.|\u0444\.|\u043c\u043e\u0431\.|\u0444\u0430\u043a\u0441|\u0441\u043e\u0442\u043e\u0432\u044b\u0439|\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439|\u0442\u0435\u043b\u0435\u0444\u043e\u043d)(:?\s*?)([+\d(][\d \u00A0\-()]{3,}\d)/gi,(function(e,n,t,r,a){return 5<=(a=de(a)).length?n+t+r+he(a):e}))}}]),X={name:"ru/punctuation/ano",handler:function(e){var n=new RegExp("([^«„[(!?,:;\\-‒–—\\s])(\\s+)(а|но)(?= | |\\n)","g");return e.replace(n,"$1,$2$3")}};var fe=(P.addRules([X,{name:"ru/punctuation/exclamation",handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1…").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}]),P.addRules([{name:"ru/space/afterHellip",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])(\.\.\.|\u2026)([\u0410-\u042f\u0401])/g,"$1$2 $3").replace(/([?!]\.\.)([\u0430-\u044f\u0451a-z])/gi,"$1 $2")}},{name:"ru/space/year",handler:function(e,n,t){return t=t.getData("char"),t=new RegExp("(^| | )(\\d{3,4})(год([ауе]|ом)?)([^"+t+"]|$)","g"),e.replace(t,"$1$2 $3$5")}}]),P.addRules([{name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"№")}}]),{A:"А",a:"а",B:"В",E:"Е",e:"е",K:"К",M:"М",H:"Н",O:"О",o:"о",P:"Р",p:"р",C:"С",c:"с",T:"Т",y:"у",X:"Х",x:"х"}),be=Object.keys(fe).join("");return P.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(e){var n=new RegExp("(["+be+"]{1,3})(?=[А-ЯЁа-яё]+?)","g");return e.replace(n,(function(e,n){for(var t="",r=0;r<n.length;r++)t+=fe[n[r]];return t}))}}]),P.titles={"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:"Замена латинских букв на русские. Опечатки, возникающие при переключении клавиатурной раскладки"}},P.groups=[{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:"Прочее"}}],P}));
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Typograf=t()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function t(e,t,n){if(n||2===arguments.length)for(var r,a=0,u=t.length;a<u;a++)!r&&a in t||((r=r||Array.prototype.slice.call(t,0,a))[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var n=[["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]],r=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];function a(){var e=this;this.entities=this.prepareEntities(t(t([],n,!0),r,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach((function(t){e.entitiesByName[t.name]=t,e.entitiesByNameEntity[t.nameEntity]=t,e.entitiesByDigitEntity[t.digitEntity]=t,e.entitiesByUtf[t.utf]=t})),this.invisibleEntities=this.prepareEntities(r)}a.prototype.toUtf=function(e){var t=this;-1!==e.text.search(/&#/)&&(e.text=this.decHexToUtf(e.text)),-1!==e.text.search(/&[a-z]/i)&&(e.text=e.text.replace(/&[a-z\d]{2,31};/gi,(function(e){var n=t.entitiesByNameEntity[e];return n?n.utf:e})))},a.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,(function(e,t){return String.fromCharCode(parseInt(t,10))})).replace(/&#x([\da-f]{1,6});/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}))},a.prototype.restore=function(e){var t=e.prefs.htmlEntity,n=t.type,r=this.entities;"name"!==n&&"digit"!==n||((t.onlyInvisible||t.list)&&(r=[],t.onlyInvisible&&(r=r.concat(this.invisibleEntities)),t.list)&&(r=r.concat(this.prepareListParam(t.list))),e.text=this.restoreEntitiesByIndex(e.text,"name"===n?"nameEntity":"digitEntity",r))},a.prototype.getByUtf=function(e,t){var n;switch(t){case"digit":n=this.entitiesByDigitEntity[e];break;case"name":n=this.entitiesByNameEntity[e];break;default:n=e}return n},a.prototype.prepareEntities=function(e){var t=[];return e.forEach((function(e){var n=e[0],r=(e=e[1],String.fromCharCode(e));t.push({name:n,nameEntity:"&"+n+";",digitEntity:"&#"+e+";",utf:r,reName:new RegExp("&"+n+";","g"),reUtf:new RegExp(r,"g")})})),t},a.prototype.prepareListParam=function(e){var t=this,n=[];return e.forEach((function(e){(e=t.entitiesByName[e])&&n.push(e)})),n},a.prototype.restoreEntitiesByIndex=function(e,t,n){return n.forEach((function(n){e=e.replace(n.reUtf,n[t])})),e};var u=new a,i=[];function o(e){(e=(e||"").split("/")[0])&&"common"!==e&&!s(e)&&(i.push(e),i.sort())}function s(e){return"common"===e||-1!==i.indexOf(e)}function l(e,t){return(e=e||t)?Array.isArray(e)?e:[e]:[]}function c(e){if(!e.length)throw Error('Not defined the property "locale".');e.forEach((function(e){if(!s(e))throw Error('"'.concat(e,'" is not supported locale.'))}))}var p={};function g(e){Object.keys(e).forEach((function(t){o(t),p[t]=e[t]}))}var h=["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"),d="\\d+([.,]\\d+)?",m=/\d/;function $(e){return-1<e.search(m)}var b="",x="",v=(y.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},y.prototype.show=function(e,t){for(var n=new RegExp("tf\\d+","g"),r=new RegExp("tf\\d"),a=function(n){return e.safeTags.hidden[t][n]||n},u=0,i=this.tags[t].length;u<i&&(e.text=e.text.replace(n,a),-1!==e.text.search(r));u++);},y.prototype.hide=function(e,t){var n=this,r=(e.safeTags.hidden[t]={},this.pasteLabel.bind(this,e,t));this.tags[t].forEach((function(t){e.text=e.text.replace(n.prepareRegExp(t),r)}))},y.prototype.hideHTMLTags=function(e){var t;e.isHTML&&(t=this.pasteLabel.bind(this,e,"html"),e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,t).replace(/&lt;\/?[a-z][^]*?&gt;/gi,t).replace(/&[gl]t;/gi,t))},y.prototype.getPrevLabel=function(e,t){for(var n=t-1;0<=n;n--)if(e[n]===b)return e.slice(n,t+1);return""},y.prototype.getNextLabel=function(e,t){for(var n=t+1;n<e.length;n++)if(e[n]===b)return e.slice(t,n+1);return""},y.prototype.getTagByLabel=function(e,t){var n=null;return this.groups.some((function(r){var a=e.safeTags.hidden[r][t];return n=void 0!==a?{group:r,value:a}:n})),n},y.prototype.getTagInfo=function(e){if(!e)return null;var t={group:e.group};switch(e.group){case"html":t.name=e.value.split(/[<\s>]/)[1],t.isInline=-1<h.indexOf(t.name),t.isClosing=-1<e.value.search(/^<\//);break;case"url":t.isInline=!0;break;case"own":t.isInline=!1}return t},y.prototype.pasteLabel=function(e,t,n){var r="tf"+(e=e.safeTags).counter+b;return e.hidden[t][r]=n,e.counter++,r},y.prototype.prepareRegExp=function(e){var t,n;return e instanceof RegExp?e:(t=e[0],n=e[1],e=e[2],new RegExp(t+(void 0===e?"[^]*?":e)+n,"gi"))},y.prototype.getPrevTagInfo=function(e,t,n){return(t=this.getPrevLabel(t,n-1))&&(n=this.getTagByLabel(e,t))?this.getTagInfo(n):null},y.prototype.getNextTagInfo=function(e,t,n){return(t=this.getNextLabel(t,n+1))&&(n=this.getTagByLabel(e,t))?this.getTagInfo(n):null},y);function y(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var e=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach((function(t){e.push(["<".concat(t,"(\\s[^>]*?)?>"),"</".concat(t,">")])})),this.tags={own:[],html:e.map(this.prepareRegExp),url:[f]}}function R(e,t){for(var n="";!(1&~t)&&(n+=e),0!=(t>>>=1);)e+=e;return n}function E(e){return e.replace(/\u00A0/g," ")}function w(e,t){for(var n=0;n<t.length;n++)e=e.replace(t[n][0],t[n][1]);return e}function q(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)}function A(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var T={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},B="default",k=[],L=[];function D(){var e=t([],k,!0);return e.sort((function(e,t){return e.index>t.index?1:-1})),e}function S(){return t([],L,!0)}function I(e){var t=(r=e.name.split("/"))[0],n=r[1],r=r[2];return{name:e.name,shortName:r,handler:e.handler,queue:e.queue||B,enabled:!0!==e.disabled,locale:t,group:n,index:"number"==typeof(r=e).index?r.index:(t=r.name.split("/")[1],void 0===(t=T[t])&&(t=0),"string"==typeof r.index?t+parseInt(r.index,10):t),settings:e.settings,live:e.live,htmlAttrs:e.htmlAttrs}}function z(e){return{type:(null==e?void 0:e.type)||"default",list:null==e?void 0:e.list,onlyInvisible:Boolean(null==e?void 0:e.onlyInvisible)}}function C(e){return e||"LF"}N.addRule=function(e){o((e=I(e)).locale),k.push(e)},N.addRules=function(e){var t=this;e.forEach((function(e){t.addRule(e)}))},N.addInnerRule=function(e){L.push(I(e))},N.addInnerRules=function(e){var t=this;e.forEach((function(e){t.addInnerRule(e)}))},N.getRule=function(e){var t=null;return D().some((function(n){return n.name===e&&(t=n,!0)})),t},N.getRules=D,N.getInnerRules=S,N.getLocales=function(){return i},N.addLocale=function(e){o(e)},N.hasLocale=s,N.setData=function(e){g(e)},N.getData=function(e){return p[e]},N.prototype.execute=function(t,n){var r;return(t=""+t)?(r=this.prefs,r=e({},r),n&&("locale"in n&&(r.locale=l(n.locale)),"htmlEntity"in n&&(r.htmlEntity=z(n.htmlEntity)),"lineEnding"in n&&(r.lineEnding=C(n.lineEnding)),"processingSeparateParts"in n&&(r.processingSeparateParts=n.processingSeparateParts),"ruleFilter"in n)&&(r.ruleFilter=n.ruleFilter),c((n=r).locale),r=this.prepareContext(t,n),this.process(r)):""},N.prototype.getSetting=function(e,t){return this.settings[e]&&this.settings[e][t]},N.prototype.setSetting=function(e,t,n){this.settings[e]=this.settings[e]||{},this.settings[e][t]=n},N.prototype.isEnabledRule=function(e){return!1!==this.enabledRules[e]},N.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},N.prototype.enableRule=function(e){return this.enable(e,!0)},N.prototype.disableRule=function(e){return this.enable(e,!1)},N.prototype.addSafeTag=function(e,t,n){e=e instanceof RegExp?e:[e,t,n],this.safeTags.add(e)},N.prototype.prepareContext=function(e,t){return{text:e,isHTML:q(e),prefs:t,getData:function(e){return"char"===e?t.locale.map((function(t){return p[t+"/"+e]})).join(""):function(e){return p[e]}(t.locale[0]+"/"+e)},safeTags:this.safeTags}},N.prototype.splitBySeparateParts=function(e){var t,n,r;return e.isHTML&&!1!==e.prefs.processingSeparateParts?(t=[],n=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),r=0,e.text.replace(n,(function(n,a,u,i){return r!==i&&t.push((r?x:"")+e.text.slice(r,i)+x),t.push(n),r=i+n.length,n})),t.push(r?x+e.text.slice(r,e.text.length):e.text),t):[e.text]},N.prototype.process=function(e){var t,n=this,r=(e.text=e.text.replace(/\r\n?/g,"\n"),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"),e.isHTML),a=new RegExp(x,"g");return e.text=this.splitBySeparateParts(e).map((function(t){return e.text=t,e.isHTML=q(t),n.safeTags.hideHTMLTags(e),n.safeTags.hide(e,"url"),n.executeRules(e,"hide-safe-tags-url"),n.executeRules(e,"hide-safe-tags"),u.toUtf(e),e.prefs.live&&(e.text=E(e.text)),n.executeRules(e,"utf"),n.executeRules(e),u.restore(e),n.executeRules(e,"html-entities"),n.safeTags.show(e,"url"),n.executeRules(e,"show-safe-tags-url"),e.text.replace(a,"")})).join(""),e.isHTML=r,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"),r=e.text,"CRLF"===(t=e.prefs.lineEnding)?r.replace(/\n/g,"\r\n"):"CR"===t?r.replace(/\n/g,"\r"):r},N.prototype.executeRules=function(e,t){var n=this,r=this.rulesByQueues[t=void 0===t?B:t];(t=this.innerRulesByQueues[t])&&t.forEach((function(t){n.ruleIterator(e,t)})),r&&r.forEach((function(t){n.ruleIterator(e,t)}))},N.prototype.ruleIterator=function(e,t){!0===e.prefs.live&&!1===t.live||!1===e.prefs.live&&!0===t.live||"common"!==t.locale&&t.locale!==e.prefs.locale[0]||!this.isEnabledRule(t.name)||e.prefs.ruleFilter&&!e.prefs.ruleFilter(t)||(this.onBeforeRule&&this.onBeforeRule(t.name,e),e.text=t.handler.call(this,e.text,this.settings[t.name],e),this.onAfterRule&&this.onAfterRule(t.name,e))},N.prototype.prepareRuleSettings=function(e){this.settings[e.name]=A(e.settings),this.enabledRules[e.name]=e.enabled},N.prototype.enable=function(e,t){var n=this;Array.isArray(e)?e.forEach((function(e){n.enableByMask(e,t)})):this.enableByMask(e,t)},N.prototype.enableByMask=function(e,t){var n,r=this;e&&(-1!==e.search(/\*/)?(n=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this.rules.forEach((function(e){e=e.name,n.test(e)&&(r.enabledRules[e]=t)}))):this.enabledRules[e]=t)},N.groups=[],N.titles={},N.version="7.4.1";var P=N;function N(e){var t=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs={locale:l(e.locale),lineEnding:C(e.lineEnding),live:Boolean(e.live),ruleFilter:e.ruleFilter,enableRule:e.enableRule,disableRule:e.disableRule,processingSeparateParts:e.processingSeparateParts,htmlEntity:z(e.htmlEntity)},c(this.prefs.locale),this.safeTags=new v,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=S(),this.innerRules.forEach((function(e){t.innerRulesByQueues[e.queue]=t.innerRulesByQueues[e.queue]||[],t.innerRulesByQueues[e.queue].push(e)})),this.rulesByQueues={},this.rules=D(),this.rules.forEach((function(e){t.prepareRuleSettings(e),t.rulesByQueues[e.queue]=t.rulesByQueues[e.queue]||[],t.rulesByQueues[e.queue].push(e)})),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}[{"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(g);var j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},O={name:"common/html/escape",index:"+100",queue:"end",handler:function(e){return e.replace(/[&<>"'/]/g,(function(e){return j[e]}))},disabled:!0},M=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]");function U(e,t,n,r){return t+n.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}function Q(){this.bufferQuotes={left:"",right:""},this.beforeLeft=" \n\t [(",this.afterRight=" \n\t !?.:;#*,…)\\]"}P.addRules([{name:"common/html/e-mail",queue:"end",handler:function(e,t,n){return n.isHTML?e:e.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},O,{name:"common/html/nbr",index:"+10",queue:"end",handler:function(e){return e.replace(/([^\n>])\n(?=[^\n])/g,"$1<br/>\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/p",index:"+5",queue:"end",handler:function(e){return(e=e.split("\n\n")).forEach((function(e,t,n){!e.trim()||M.test(e)||(n[t]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1"))})),e.join("\n\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,t,n){var r=this,a=new RegExp("(^|\\s)("+t.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),u=A(n.prefs);return u.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,(function(e,t,n){return t+n.replace(a,(function(e,t,n,a){var i=a[0],o=a[a.length-1];return a=a.slice(1,-1),t+n+"="+i+r.execute(a,u)+o}))}))},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(e,t,n){return n.isHTML?e:e.replace(f,(function(e,t,n){n=n.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===t?n=n.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===t&&(n=n.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=n,a='<a href="'+(n=t+"://"+n)+'">';return"http"===t||"https"===t?(r=r.replace(/^www\./,""),a+("http"===t?r:t+"://"+r)+"</a>"):a+n+"</a>"}))},disabled:!0,htmlAttrs:!1}]),O={name:"common/nbsp/afterNumber",handler:function(e,t,n){return n=n.getData("char"),e.replace(new RegExp("(^|\\s)(\\d{1,5}) (["+n+"]+)","gi"),"$1$2 $3")},disabled:!0},P.addRules([O,{name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"¶ ")}},{name:"common/nbsp/afterSectionMark",handler:function(e,t,n){return n=n.prefs.locale[0],e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===n?"§ ":"§ ")}},{name:"common/nbsp/afterShortWord",handler:function(e,t,n){var r=t.lengthShortWord,a=(t=t.useShortWordList,p["common/quote"]),u=n.getData("char");return n=n.getData("shortWord"),a="  ("+a,t=new RegExp(t&&void 0!==n?"(^|["+a+"])("+n+") ":"(^|["+a+"])(["+u+"]{1,"+r+"}) ","gim"),e.replace(t,"$1$2 ").replace(t,"$1$2 ")},settings:{lengthShortWord:2,useShortWordList:!1}},{name:"common/nbsp/beforeShortLastNumber",handler:function(e,t,n){var r=n.getData("quote"),a=(n=n.getData("char")).toUpperCase();return n=new RegExp("(["+n+a+"]) (?=\\d{1,"+t.lengthLastNumber+"}[-+−%'\""+r.right+")]?([.!?…]( ["+a+"]|$)|$))","gm"),e.replace(n,"$1 ")},live:!1,settings:{lengthLastNumber:2}},{name:"common/nbsp/beforeShortLastWord",handler:function(e,t,n){var r=(n=n.getData("char")).toUpperCase();return n=new RegExp("(["+n+"\\d]) (["+n+r+"]{1,"+t.lengthLastWord+"}[.!?…])( ["+r+"]|$)","g"),e.replace(n,"$1 $2$3")},settings:{lengthLastWord:3}},{name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1 $2")}},{name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,U).replace(/(<nobr>)(.*?)(<\/nobr>)/g,U)}},{name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:E,disabled:!0}]),O={name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(e,t){return e.replace(new RegExp("(^ ?|\\D |".concat(b,")(\\d{1,3}([    ]\\d{3})+)(?! ?[\\d-])"),"gm"),(function(e,n,r){return n+r.replace(/\s/g,t.space)})).replace(/(\d{5,}([.,]\d+)?)/g,(function(e,n){var r=n.match(/[.,]/),a=(n=r?n.split(r):[n])[0];return n=n[1],a=a.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+t.space),r?a+r+n:a}))},settings:{space:" "}},P.addRules([O,{name:"common/number/fraction",handler:function(e){return e.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(e){return w(e,[[/!=/g,"≠"],[/<=/g,"≤"],[/(^|[^=])>=/g,"$1≥"],[/<=>/g,"⇔"],[/<</g,"≪"],[/>>/g,"≫"],[/~=/g,"≅"],[/(^|[^+])\+-/g,"$1±"]])}},{name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1×$2")}}]),P.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}},{name:"common/other/repeatWord",handler:function(e,t,n){var r=p["common/quote"];return n=n.getData("char"),r="[;:,.?! \n"+r+"]",n=new RegExp("("+r+"|^)(["+n+"]{"+t.min+",}) \\2("+r+"|$)","gi"),e.replace(n,"$1$2$3")},settings:{min:2},disabled:!0}]),O={name:"common/punctuation/apostrophe",handler:function(e,t,n){return n="(["+n.getData("char")+"])",n=new RegExp(n+"'"+n,"gi"),e.replace(n,"$1’$2")}},Q.prototype.process=function(e){var t,n,r=e.context.text;return this.count(r).total&&(t=e.settings,(n=e.settings.left[0]===e.settings.right[0])&&(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&&(r=this.removeSpacing(r,e.settings)),r=this.set(r,e),e.settings.spacing&&(r=this.setSpacing(r,e.settings)),e.settings.removeDuplicateQuotes&&(r=this.removeDuplicates(r,e.settings)),n)&&(r=this.returnOriginalQuotes(r,t,e.settings),e.settings=t),r},Q.prototype.returnOriginalQuotes=function(e,t,n){for(var r={},a=0;a<n.left.length;a++)r[n.left[a]]=t.left[a],r[n.right[a]]=t.right[a];return e.replace(new RegExp("["+n.left+n.right+"]","g"),(function(e){return r[e]}))},Q.prototype.count=function(e){var t={total:0};return e.replace(new RegExp("["+p["common/quote"]+"]","g"),(function(e){return t[e]||(t[e]=0),t[e]++,t.total++,e})),t},Q.prototype.removeDuplicates=function(e,t){var n=t.left[0],r=t.left[1]||n;return t=t.right[0],n!==r?e:e.replace(new RegExp(n+n,"g"),n).replace(new RegExp(t+t,"g"),t)},Q.prototype.removeSpacing=function(e,t){for(var n=0,r=t.left.length;n<r;n++){var a=t.left[n],u=t.right[n];e=e.replace(new RegExp(a+"([   ])","g"),a).replace(new RegExp("([   ])"+u,"g"),u)}return e},Q.prototype.setSpacing=function(e,t){for(var n=0,r=t.left.length;n<r;n++){var a=t.left[n],u=t.right[n];e=e.replace(new RegExp(a+"([^ ])","g"),a+" $1").replace(new RegExp("([^ ])"+u,"g"),"$1 "+u)}return e},Q.prototype.set=function(e,t){var n=p["common/quote"],r=t.settings.left[0],a=t.settings.left[1]||r,u=t.settings.right[0],i=new RegExp("(^|["+this.beforeLeft+"])(["+n+"]+)(?=[^\\s])","gim");return n=new RegExp("([^\\s])(["+n+"]+)(?=["+this.afterRight+"]|$)","gim"),e=e.replace(i,(function(e,t,n){return t+R(r,n.length)})).replace(n,(function(e,t,n){return t+R(u,n.length)})),e=this.setAboveTags(e,t),r!==a?this.setInner(e,t.settings):e},Q.prototype.setAboveTags=function(e,t){var n=this,r=t.settings.left[0],a=t.settings.right[0];return e.replace(new RegExp("(^|.)(["+p["common/quote"]+"])(.|$)","gm"),(function(u,i,o,s,l){return i!==b&&s!==b?u:i===b&&s===b?'"'===o?i+n.getAboveTwoTags(e,l+1,t)+s:u:i===b?(o=-1<n.afterRight.indexOf(s),u=t.safeTags.getPrevTagInfo(t.context,e,l-1),o&&u&&"html"===u.group?i+(u.isClosing?a:r)+s:i+(!s||o?a:r)+s):(u=-1<n.beforeLeft.indexOf(i),o=t.safeTags.getNextTagInfo(t.context,e,l+1),u&&o&&"html"===o.group?i+(o.isClosing?a:r)+s:i+(!i||u?r:a)+s)}))},Q.prototype.getAboveTwoTags=function(e,t,n){var r=n.safeTags.getPrevTagInfo(n.context,e,t),a=n.safeTags.getNextTagInfo(n.context,e,t);if(r&&"html"===r.group){if(!r.isClosing)return n.settings.left[0];if(a&&a.isClosing&&r.isClosing)return n.settings.right[0]}return e[t]},Q.prototype.setInner=function(e,t){for(var n=t.left[0],r=t.right[0],a=this.getMaxLevel(e,n,r,t.left.length),u=0,i="",o=0,s=e.length;o<s;o++){var l=e[o];l===n?(i+=t.left[a-1<u?a-1:u],a<++u&&(u=a)):l===r?(--u<0&&(u=0),i+=t.right[u]):('"'===l&&(u=0),i+=l)}return i},Q.prototype.getMaxLevel=function(e,t,n,r){return(e=this.count(e))[t]===e[n]?r:Math.min(r,2)};var F=new Q,H={},W=(i.forEach((function(e){H[e]=A(p[e+"/quote"])})),{name:"common/punctuation/quote",handler:function(e,t,n){return(t=t[n.prefs.locale[0]])?F.process({context:n,settings:t,safeTags:this.safeTags}):e},settings:H}),G=(P.addRules([O,{name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},{name:"common/punctuation/hellip",handler:function(e,t,n){return"ru"===n.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1…"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1…$2")}},W,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,t,n){n=this.getSetting("common/punctuation/quote",n.prefs.locale[0]);var r=u.getByUtf(n.left[0]),a=u.getByUtf(n.right[0]),i=(i=u.getByUtf(n.left[1]))?"|"+i:"";return n=(n=u.getByUtf(n.right[1]))?"|"+n:"",r=new RegExp("(<[aA]\\s[^>]*?>)("+r+i+")([^]*?)("+a+n+")(</[aA]>)","g"),e.replace(r,"$2$1$3$5$4")}}]),O={name:"common/space/beforeBracket",handler:function(e,t,n){return n=n.getData("char"),n=new RegExp("(["+n+".!?,;…)])\\(","gi"),e.replace(n,"$1 (")}},W={name:"common/space/delRepeatN",index:"-1",handler:function(e,t){t=t.maxConsecutiveLineBreaks;var n=new RegExp("\n{".concat(t+1,",}"),"g");return t=R("\n",t),e.replace(n,t)},settings:{maxConsecutiveLineBreaks:2}},{name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),X={name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}},V=new RegExp('(\\D):([^)",:.?\\s\\/\\\\])',"g"),K={name:"common/space/afterColon",handler:function(e){return e.replace(V,"$1: $2")}},Y={name:"common/space/afterComma",handler:function(e,t,n){return n="string"==typeof(n=n.getData("quote"))?n:n.right,e.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\'+n+"])","g"),(function(e,t,n){return $(t)&&$(n)?e:t+", "+n}))}},Z=new RegExp("\\?([^).…!;?\\s[\\])"+p["common/quote"]+"])","g"),J={name:"common/space/afterQuestionMark",handler:function(e){return e.replace(Z,"? $1")}},_=new RegExp("!([^).…!;?\\s[\\])"+p["common/quote"]+"])","g"),ee={name:"common/space/afterExclamationMark",handler:function(e){return e.replace(_,"! $1")}},te=new RegExp(";([^).…!;?\\s[\\])"+p["common/quote"]+"])","g"),ne=(P.addRules([K,Y,J,ee,{name:"common/space/afterSemicolon",handler:function(e){return e.replace(te,"; $1")}},O,{name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},{name:"common/space/delBeforeDot",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},{name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}},{name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) ([!?:;,])(?!\))/g,"$1$2")}},{name:"common/space/delBetweenExclamationMarks",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1")}},{name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/^[ \t]+/gm,"")},disabled:!0},W,{name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},{name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}},{name:"common/space/insertFinalNewline",queue:"end",handler:function(e){return"\n"===e[e.length-1]?e:e+"\n"},live:!1,disabled:!0},{name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}},{name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},G,X]),K={name:"common/symbols/arrow",handler:function(e){return w(e,[[/(^|[^-])->(?!>)/g,"$1→"],[/(^|[^<])<-(?!-)/g,"$1←"]])}},P.addRules([K,{name:"common/symbols/cf",handler:function(e){var t=new RegExp('(^|[\\s(\\[+≈±−—–\\-])(\\d+(?:[.,]\\d+)?)[   ]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return e.replace(t,"$1$2 °$3$4")}},{name:"common/symbols/copy",handler:function(e){return w(e,[[/\(r\)/gi,"®"],[/(copyright )?\((c|\u0441)\)/gi,"©"],[/\(tm\)/gi,"™"]])}}]),Y={name:"en-US/dash/main",index:"-5",handler:function(e){var t=p["common/dash"],n="[ ".concat(" ","]"),r="[ ".concat(" ","\n]");return n=new RegExp("".concat(n,"(").concat(t,")(").concat(r,")"),"g"),e.replace(n,"".concat(" ").concat("—","$2"))}},P.addRules([Y]),J={name:"ru/dash/centuries",handler:function(e,t){var n=new RegExp("(X|I|V)[ | ]?("+p["common/dash"]+")[ | ]?(X|I|V)","g");return e.replace(n,"$1"+t.dash+"$3")},settings:{dash:"–"}},P.addRules([J,{name:"ru/dash/daysMonth",handler:function(e,t){var n=new RegExp("(^|\\s)([123]?\\d)("+p["common/dash"]+")([123]?\\d)[  ]("+p["ru/monthGenCase"]+")","g");return e.replace(n,"$1$2"+t.dash+"$4 $5")},settings:{dash:"–"}},{name:"ru/dash/de",handler:function(e){var t=new RegExp("([a-яё]+) де"+p["ru/dashAfterDe"],"g");return e.replace(t,"$1-де")},disabled:!0},{name:"ru/dash/decade",handler:function(e,t){var n=new RegExp("(^|\\s)(\\d{3}|\\d)0("+p["common/dash"]+")(\\d{3}|\\d)0(-е[  ])(?=г\\.?[  ]?г|год)","g");return e.replace(n,"$1$20"+t.dash+"$40$5")},settings:{dash:"–"}},{name:"ru/dash/directSpeech",handler:function(e){var t=p["common/dash"],n=new RegExp('(["»‘“,])[ | ]?('.concat(t,")[ | ]"),"g"),r=new RegExp("(^|".concat(b,")(").concat(t,")( | )"),"gm");return t=new RegExp("([.…?!])[  ](".concat(t,")[  ]"),"g"),e.replace(n,"$1 — ").replace(r,"$1— ").replace(t,"$1 — ")}},{name:"ru/dash/izpod",handler:function(e){var t=new RegExp(p["ru/dashBefore"]+"(И|и)з под"+p["ru/dashAfter"],"g");return e.replace(t,"$1$2з-под")}},{name:"ru/dash/izza",handler:function(e){var t=new RegExp(p["ru/dashBefore"]+"(И|и)з за"+p["ru/dashAfter"],"g");return e.replace(t,"$1$2з-за")}},{name:"ru/dash/ka",handler:function(e){var t=new RegExp("([a-яё]+) ка(сь)?"+p["ru/dashAfter"],"g");return e.replace(t,"$1-ка$2")}},{name:"ru/dash/koe",handler:function(e){var t=new RegExp(p["ru/dashBefore"]+"([Кк]о[ей])\\s([а-яё]{3,})"+p["ru/dashAfter"],"g");return e.replace(t,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(e){var t=new RegExp("([  ])("+p["common/dash"]+")([  \\n])","g");return e.replace(t," —$3")}},{name:"ru/dash/month",handler:function(e,t){var n="("+p["ru/month"]+")",r="("+p["ru/monthPreCase"]+")",a=p["common/dash"];return n=new RegExp(n+" ?("+a+") ?"+n,"gi"),a=new RegExp(r+" ?("+a+") ?"+r,"gi"),r="$1"+t.dash+"$3",e.replace(n,r).replace(a,r)},settings:{dash:"–"}},{name:"ru/dash/surname",handler:function(e){var t=new RegExp("([А-ЯЁ][а-яё]+)\\s-([а-яё]{1,3})(?![^а-яё]|$)","g");return e.replace(t,"$1 —$2")}},{name:"ru/dash/taki",handler:function(e){var t=new RegExp("(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\s(таки)"+p["ru/dashAfter"],"g");return e.replace(t,"$1-$2")}},{name:"ru/dash/time",handler:function(e,t){var n=new RegExp(p["ru/dashBefore"]+"(\\d?\\d:[0-5]\\d)"+p["common/dash"]+"(\\d?\\d:[0-5]\\d)"+p["ru/dashAfter"],"g");return e.replace(n,"$1$2"+t.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/to",handler:function(e){var t=new RegExp("(^|[^А-ЯЁа-яё\\w])([Оо]ткуда|[Кк]уда|[Гг]де|[Кк]огда|[Зз]ачем|[Пп]очему|[Кк]ак|[Кк]ако[ейм]|[Кк]акая|[Кк]аки[емх]|[Кк]акими|[Кк]акую|[Чч]то|[Чч]его|[Чч]е[йм]|[Чч]ьим?|[Кк]то|[Кк]ого|[Кк]ому|[Кк]ем)( | -|- )(то|либо|нибудь)"+p["ru/dashAfter"],"g");return e.replace(t,(function(e,t,n,r,a){return"как то"===(r=n+r+a)||"Как то"===r?e:t+n+"-"+a}))}},{name:"ru/dash/kakto",handler:function(e){var t=new RegExp("(^|[^А-ЯЁа-яё\\w])([Кк]ак) то"+p["ru/dashAfter"],"g");return e.replace(t,"$1$2-то")}},{name:"ru/dash/weekday",handler:function(e,t){var n="("+p["ru/weekday"]+")";return n=new RegExp(n+" ?("+p["common/dash"]+") ?"+n,"gi"),e.replace(n,"$1"+t.dash+"$3")},settings:{dash:"–"}},{name:"ru/dash/years",handler:function(e,t){var n=new RegExp("(\\D|^)(\\d{4})[  ]?("+p["common/dash"]+")[  ]?(\\d{4})(?=[  ]?г)","g");return e.replace(n,(function(e,n,r,a,u){return parseInt(r,10)<parseInt(u,10)?n+r+t.dash+u:e}))},settings:{dash:"–"}}]),ee="(-|\\.|\\/)",O="(-|\\/)",new RegExp("(^|\\D)(\\d{4})"+ee+"(\\d{2})"+ee+"(\\d{2})(\\D|$)","gi")),re=new RegExp("(^|\\D)(\\d{2})"+O+"(\\d{2})"+O+"(\\d{4})(\\D|$)","gi");function ae(e,t,n,r){return"дд"===n&&"мм"===r||-1<["рф","ру","рус","орг","укр","бг","срб"].indexOf(r)?e:t+n+". "+r+"."}P.addRules([{name:"ru/date/fromISO",handler:function(e){return e.replace(ne,"$1$6.$4.$2$7").replace(re,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(e){var t=new RegExp("(\\d)( | )("+p["ru/monthGenCase"]+"),( | )("+p["ru/weekday"]+")","gi");return e.replace(t,(function(e,t,n,r,a,u){return t+n+r.toLowerCase()+","+a+u.toLowerCase()}))}}]),W={name:"ru/money/currency",handler:function(e){var t="([$€¥Ұ£₤₽])",n=new RegExp("(^|[\\D]{2})"+t+" ?("+d+"([    ]\\d{3})*)([    ]?(тыс\\.|млн|млрд|трлн))?","gm");return t=new RegExp("(^|[\\D])("+d+") ?"+t,"gm"),e.replace(n,(function(e,t,n,r,a,u,i,o){return t+r+(o?" "+o:"")+" "+n})).replace(t,"$1$2 $4")},disabled:!0},P.addRules([W,{name:"ru/money/ruble",handler:function(e){var t="$1 ₽",n="(\\d+)( | )?(р|руб)\\.",r=new RegExp("^"+n+"$","g"),a=new RegExp(n+"(?=[!?,:;])","g");return n=new RegExp(n+"(?=\\s+[A-ЯЁ])","g"),e.replace(r,t).replace(a,t).replace(n,t+".")},disabled:!0}]);var ue={2:"²","²":"²",3:"³","³":"³","":""};function ie(e,t){return t=new RegExp('<span class="('+t.join("|")+')">([^]*?)</span>',"g"),e.replace(t,"$2")}function oe(e,t){return e.replace(/<title>[^]*?<\/title>/i,(function(e){return ie(e,t)}))}P.addRules([{name:"ru/nbsp/abbr",handler:function(e){var t=new RegExp("(^|\\s|".concat(b,")([а-яё]{1,3})\\. ?([а-яё]{1,3})\\."),"g");return e.replace(t,ae).replace(t,ae)}},{name:"ru/nbsp/addr",handler:function(e){return e.replace(/(\s|^)(\u0434\u043e\u043c|\u0434\.|\u043a\u0432\.|\u043f\u043e\u0434\.|\u043f-\u0434) *(\d+)/gi,"$1$2 $3").replace(/(\s|^)(\u043c\u043a\u0440-\u043d|\u043c\u043a-\u043d|\u043c\u043a\u0440\.|\u043c\u043a\u0440\u043d)\s/gi,"$1$2 ").replace(/(\s|^)(\u044d\u0442\.) *(-?\d+)/gi,"$1$2 $3").replace(/(\s|^)(\d+) +\u044d\u0442\u0430\u0436([^\u0430-\u044f\u0451]|$)/gi,"$1$2 этаж$3").replace(/(\s|^)\u043b\u0438\u0442\u0435\u0440\s([\u0410-\u042f]|$)/gi,"$1литер $2").replace(/(\s|^)(\u043e\u0431\u043b|\u043a\u0440|\u0441\u0442|\u043f\u043e\u0441|\u0441|\u0434|\u0443\u043b|\u043f\u0435\u0440|\u043f\u0440|\u043f\u0440-\u0442|\u043f\u0440\u043e\u0441\u043f|\u043f\u043b|\u0431\u0443\u043b|\u0431-\u0440|\u043d\u0430\u0431|\u0448|\u0442\u0443\u043f|\u043e\u0444|\u043a\u043e\u043c\u043d?|\u0443\u0447|\u0432\u043b|\u0432\u043b\u0430\u0434|\u0441\u0442\u0440|\u043a\u043e\u0440)\. *([\u0430-\u044f\u0451a-z\d]+)/gi,"$1$2. $3").replace(/(\D[ \u00A0]|^)\u0433\. ?([\u0410-\u042f\u0401])/gm,"$1г. $2")}},{name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"№ $1")}},{name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var t="(ли|ль|же|ж|бы|б)",n=new RegExp("([А-ЯЁа-яё]) "+t+'(?=[,;:?!"‘“»])',"g");return t=new RegExp("([А-ЯЁа-яё])[  ]"+t+"[  ]","g"),e.replace(n,"$1 $2").replace(t,"$1 $2 ")}},{name:"ru/nbsp/centuries",handler:function(e){var t=p["common/dash"],n="(^|\\s)([VIX]+)",r='(?=[,;:?!"‘“»]|$)',a=new RegExp(n+"[  ]?в\\.?"+r,"gm");return n=new RegExp(n+"("+t+")([VIX]+)[  ]?в\\.?([  ]?в\\.?)?"+r,"gm"),e.replace(a,"$1$2 в.").replace(n,"$1$2$3$4 вв.")}},{name:"ru/nbsp/dayMonth",handler:function(e){var t=new RegExp("(\\d{1,2}) ("+p["ru/shortMonth"]+")","gi");return e.replace(t,"$1 $2")}},{name:"ru/nbsp/initials",handler:function(e){var t=new RegExp("(^|[(   "+p["ru/quote"].left+'"])([А-ЯЁ])\\.[   ]?([А-ЯЁ])\\.[   ]?([А-ЯЁ][а-яё]+)',"gm");return e.replace(t,"$1$2. $3. $4")}},{name:"ru/nbsp/m",index:"+5",handler:function(e){var t=new RegExp("(^|[\\s,.\\(])(\\d+)[  ]?(мм?|см|км|дм|гм|mm?|km|cm|dm)([23²³])?([\\s\\).!?,;]|$)","gm");return e.replace(t,(function(e,t,n,r,a,u){return t+n+" "+r+ue[a||""]+(" "===u?" ":u)}))}},{name:"ru/nbsp/mln",handler:function(e){return e.replace(/(\d) ?(\u0442\u044b\u0441|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d)(\.|\s|$)/gi,"$1 $2$3")}},{name:"ru/nbsp/ooo",handler:function(e){return e.replace(/(^|[^a-\u044f\u0451A-\u042f\u0401])(\u041e\u041e\u041e|\u041e\u0410\u041e|\u0417\u0410\u041e|\u041d\u0418\u0418|\u041f\u0411\u041e\u042e\u041b) /g,"$1$2 ")}},{name:"ru/nbsp/page",handler:function(e){var t=new RegExp("(^|[)\\s])(стр|гл|рис|илл?|ст|п|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return e.replace(t,"$1$2. $3$4")}},{name:"ru/nbsp/ps",handler:function(e){var t=new RegExp("(^|\\s|".concat(b,")[pз]\\.[  ]?([pз]\\.[  ]?)?[sы]\\.:? "),"gim");return e.replace(t,(function(e,t,n){return t+(n?"P. P. S. ":"P. S. ")}))}},{name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1 ")}},{name:"ru/nbsp/see",handler:function(e){var t=new RegExp("(^|\\s|".concat(b,"|\\()(см|им)\\.[  ]?([а-яё0-9a-z]+)([\\s.,?!]|$)"),"gi");return e.replace(t,(function(e,t,n,r,a){return(" "===t?" ":t)+n+". "+r+a}))}},{name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2 г$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(e){var t=new RegExp("(^|\\D)(\\d{4})("+p["common/dash"]+')(\\d{4})[  ]?г\\.?([  ]?г\\.)?(?=[,;:?!"‘“»\\s]|$)',"gm");return e.replace(t,"$1$2$3$4 гг.")}}]),P.addRules([{name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(e,t,n){return n=n.getData("char"),n=new RegExp("(\\d[%‰]?)-(ый|ой|ая|ое|ые|ым|ом|ых|ого|ому|ыми)(?!["+n+"])","g"),e.replace(n,(function(e,t,n){return t+"-"+{ой:"й",ый:"й",ая:"я",ое:"е",ые:"е",ым:"м",ом:"м",ых:"х",ого:"го",ому:"му",ыми:"ми"}[n]}))}}]);var se=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],le=(X={name:G="ru/optalign/bracket",queue:"start",handler:function(e){return ie(e,se)},htmlAttrs:!1},K={name:G,queue:"end",handler:function(e){return oe(e,se)},htmlAttrs:!1},["typograf-oa-comma","typograf-oa-comma-sp"]),ce=(J={name:Y="ru/optalign/comma",queue:"start",handler:function(e){return ie(e,le)},htmlAttrs:!1},ee={name:Y,queue:"end",handler:function(e){return oe(e,le)},htmlAttrs:!1},["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"]),pe=(W={name:O="ru/optalign/quote",queue:"start",handler:function(e){return ie(e,ce)},htmlAttrs:!1},{name:O,queue:"end",handler:function(e){return oe(e,ce)},htmlAttrs:!1}),ge=(P.addRules([{name:G,handler:function(e){return e.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},{name:Y,handler:function(e,t,n){return n=n.getData("char"),n=new RegExp("(["+n+"\\d́]+), ","gi"),e.replace(n,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},{name:O,handler:function(e){var t="(["+(t=this.getSetting("common/punctuation/quote","ru")).left[0]+(t.left[1]||"")+"])",n=new RegExp("(^|\n\n|)("+t+")","g");return t=new RegExp("([^\n])([  \n])("+t+")","gi"),e.replace(n,'$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}]),P.addInnerRules([X,K,J,ee,W,pe]),[]);function he(e){var t,n,r=e[0],a="";if(e.length<8)return fe(e);if(10<e.length)if("+"===r){if("7"!==e[1])return e;t=!0,e=e.substr(2)}else"8"===r&&(n=!0,e=e.substr(1));for(var u=8;2<=u;u--){var i=+e.substr(0,u);if(-1<ge.indexOf(i)){a=e.substr(0,u),e=e.substr(u);break}}return a||(a=e.substr(0,5),e=e.substr(5)),(t?"+7 ":"")+(n?"8 ":"")+function(e){var t=+e,n=e.length,r=[e],a=!1;if(3<n)switch(n){case 4:r=[e.substr(0,2),e.substr(2,2)];break;case 5:r=[e.substr(0,3),e.substr(3,3)];break;case 6:r=[e.substr(0,2),e.substr(2,2),e.substr(4,2)]}else a=900<t&&t<=999||495==t||499==t;return n=r.join("-"),a?n:"("+n+")"}(a)+" "+fe(e)}function fe(e){var t="";return e.length%2&&(t=e[0],t+=e.length<=5?"-":"",e=e.substr(1,e.length-1)),t+e.split(/(?=(?:\d\d)+$)/).join("-")}function de(e){return e.replace(/[^\d+]/g,"")}[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,"901-934","936-939","950-953",958,"960-969","977-989","991-997",999].forEach((function(e){if("string"==typeof e)for(var t=e.split("-"),n=+t[0];n<=+t[1];n++)ge.push(n);else ge.push(e)})),P.addRules([{name:"ru/other/accent",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])([\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f])([^\u0410-\u042f\u0401\w]|$)/g,(function(e,t,n,r){return t+n.toLowerCase()+"́"+r}))},disabled:!0},{name:"ru/other/phone-number",live:!1,handler:function(e){var t=new RegExp("(^|,| |)(\\+7[\\d\\(\\)  -]{10,18})(?=,|;||$)","gm");return e.replace(t,(function(e,t,n){return 12===(n=de(n)).length?t+he(n):e})).replace(/(^|[^\u0430-\u044f\u0451])([\u260e\u260f\u2706\ud83d\udce0\ud83d\udcde\ud83d\udcf1]|\u0442\.|\u0442\u0435\u043b\.|\u0444\.|\u043c\u043e\u0431\.|\u0444\u0430\u043a\u0441|\u0441\u043e\u0442\u043e\u0432\u044b\u0439|\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439|\u0442\u0435\u043b\u0435\u0444\u043e\u043d)(:?\s*?)([+\d(][\d \u00A0\-()]{3,}\d)/gi,(function(e,t,n,r,a){return 5<=(a=de(a)).length?t+n+r+he(a):e}))}}]),G={name:"ru/punctuation/ano",handler:function(e){var t=new RegExp("([^«„[(!?,:;\\-‒–—\\s])(\\s+)(а|но)(?= | |\\n)","g");return e.replace(t,"$1,$2$3")}};var me=(P.addRules([G,{name:"ru/punctuation/exclamation",handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var t=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(t,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1…").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}]),P.addRules([{name:"ru/space/afterHellip",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])(\.\.\.|\u2026)([\u0410-\u042f\u0401])/g,"$1$2 $3").replace(/([?!]\.\.)([\u0430-\u044f\u0451a-z])/gi,"$1 $2")}},{name:"ru/space/year",handler:function(e,t,n){return n=n.getData("char"),n=new RegExp("(^| | )(\\d{3,4})(год([ауе]|ом)?)([^"+n+"]|$)","g"),e.replace(n,"$1$2 $3$5")}}]),P.addRules([{name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"№")}}]),{A:"А",a:"а",B:"В",E:"Е",e:"е",K:"К",M:"М",H:"Н",O:"О",o:"о",P:"Р",p:"р",C:"С",c:"с",T:"Т",y:"у",X:"Х",x:"х"}),$e=Object.keys(me).join("");return P.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(e){var t=new RegExp("(["+$e+"]{1,3})(?=[А-ЯЁа-яё]+?)","g");return e.replace(t,(function(e,t){for(var n="",r=0;r<t.length;r++)n+=me[t[r]];return n}))}}]),P}));
@@ -1 +1 @@
1
- /*! typograf | © 2023 Denis Seleznev | MIT License | https://github.com/typograf/typograf */
1
+ /*! typograf | © 2024 Denis Seleznev | MIT License | https://github.com/typograf/typograf */