13eb01f8179a9087685d42df90a72bedefd6b618fbe32eaef9214e6b390f1de5.json 8.0 KB

1
  1. {"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.HTMLHandler = void 0;\nvar Handler_js_1 = require(\"../../core/Handler.js\");\nvar HTMLDocument_js_1 = require(\"./HTMLDocument.js\");\nvar HTMLHandler = function (_super) {\n __extends(HTMLHandler, _super);\n function HTMLHandler() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.documentClass = HTMLDocument_js_1.HTMLDocument;\n return _this;\n }\n HTMLHandler.prototype.handlesDocument = function (document) {\n var adaptor = this.adaptor;\n if (typeof document === 'string') {\n try {\n document = adaptor.parse(document, 'text/html');\n } catch (err) {}\n }\n if (document instanceof adaptor.window.Document || document instanceof adaptor.window.HTMLElement || document instanceof adaptor.window.DocumentFragment) {\n return true;\n }\n return false;\n };\n HTMLHandler.prototype.create = function (document, options) {\n var adaptor = this.adaptor;\n if (typeof document === 'string') {\n document = adaptor.parse(document, 'text/html');\n } else if (document instanceof adaptor.window.HTMLElement || document instanceof adaptor.window.DocumentFragment) {\n var child = document;\n document = adaptor.parse('', 'text/html');\n adaptor.append(adaptor.body(document), child);\n }\n return _super.prototype.create.call(this, document, options);\n };\n return HTMLHandler;\n}(Handler_js_1.AbstractHandler);\nexports.HTMLHandler = HTMLHandler;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","defineProperty","exports","value","HTMLHandler","Handler_js_1","require","HTMLDocument_js_1","_super","_this","apply","arguments","documentClass","HTMLDocument","handlesDocument","document","adaptor","parse","err","window","Document","HTMLElement","DocumentFragment","options","child","append","body","AbstractHandler"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/handlers/html/HTMLHandler.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HTMLHandler = void 0;\nvar Handler_js_1 = require(\"../../core/Handler.js\");\nvar HTMLDocument_js_1 = require(\"./HTMLDocument.js\");\nvar HTMLHandler = (function (_super) {\n __extends(HTMLHandler, _super);\n function HTMLHandler() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.documentClass = HTMLDocument_js_1.HTMLDocument;\n return _this;\n }\n HTMLHandler.prototype.handlesDocument = function (document) {\n var adaptor = this.adaptor;\n if (typeof (document) === 'string') {\n try {\n document = adaptor.parse(document, 'text/html');\n }\n catch (err) { }\n }\n if (document instanceof adaptor.window.Document ||\n document instanceof adaptor.window.HTMLElement ||\n document instanceof adaptor.window.DocumentFragment) {\n return true;\n }\n return false;\n };\n HTMLHandler.prototype.create = function (document, options) {\n var adaptor = this.adaptor;\n if (typeof (document) === 'string') {\n document = adaptor.parse(document, 'text/html');\n }\n else if (document instanceof adaptor.window.HTMLElement ||\n document instanceof adaptor.window.DocumentFragment) {\n var child = document;\n document = adaptor.parse('', 'text/html');\n adaptor.append(adaptor.body(document), child);\n }\n return _super.prototype.create.call(this, document, options);\n };\n return HTMLHandler;\n}(Handler_js_1.AbstractHandler));\nexports.HTMLHandler = HTMLHandler;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAI,IAAI,IAAI,IAAI,CAACA,SAAS,IAAM,YAAY;EACrD,IAAIC,aAAa,GAAG,SAAAA,CAAUC,CAAC,EAAEC,CAAC,EAAE;IAChCF,aAAa,GAAGG,MAAM,CAACC,cAAc,IAChC;MAAEC,SAAS,EAAE;IAAG,CAAC,YAAYC,KAAK,IAAI,UAAUL,CAAC,EAAEC,CAAC,EAAE;MAAED,CAAC,CAACI,SAAS,GAAGH,CAAC;IAAE,CAAE,IAC5E,UAAUD,CAAC,EAAEC,CAAC,EAAE;MAAE,KAAK,IAAIK,CAAC,IAAIL,CAAC,EAAE,IAAIC,MAAM,CAACK,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEK,CAAC,CAAC,EAAEN,CAAC,CAACM,CAAC,CAAC,GAAGL,CAAC,CAACK,CAAC,CAAC;IAAE,CAAC;IACrG,OAAOP,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;EAC9B,CAAC;EACD,OAAO,UAAUD,CAAC,EAAEC,CAAC,EAAE;IACnB,IAAI,OAAOA,CAAC,KAAK,UAAU,IAAIA,CAAC,KAAK,IAAI,EACrC,MAAM,IAAIS,SAAS,CAAC,sBAAsB,GAAGC,MAAM,CAACV,CAAC,CAAC,GAAG,+BAA+B,CAAC;IAC7FF,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;IACnB,SAASW,EAAEA,CAAA,EAAG;MAAE,IAAI,CAACC,WAAW,GAAGb,CAAC;IAAE;IACtCA,CAAC,CAACO,SAAS,GAAGN,CAAC,KAAK,I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