// ==UserScript== // @name PTA-AutoTool // @namespace https://pintia.cn/ // @version 2.7.3 // @description 不能在考试里面用,用了考不上大学后果自负 // @author houmou233 // @match https://pintia.cn/* // @homepageURL https://github.com/houmou233/PTA-AutoTool // @supportURL https://github.com/houmou233/PTA-AutoTool/issues // @updateURL http://47.104.250.117:3000/PTA-AutoTool.user.js // @downloadURL http://47.104.250.117:3000/PTA-AutoTool.user.js // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_listValues // @grant GM_deleteValue // @grant GM_registerMenuCommand // @grant GM_setClipboard // @grant unsafeWindow // @connect api.xiaomimimo.com // @connect opencode.ai // @connect 127.0.0.1 // @connect 47.104.250.117 // @connect localhost // @run-at document-start // ==/UserScript== !function(){"use strict";var e=function(){var e={exports:{}};return function(t){var n="pnc-deadline-signed-v1",r=4194304;function a(e){if(!e||"EC"!==e.kty||"P-256"!==e.crv||"string"!=typeof e.x||"string"!=typeof e.y||e.d)throw Error("public key");return{kty:"EC",crv:"P-256",x:e.x,y:e.y,ext:!0}}var o={CHANNEL:n,publicKey:a,sign:async function(e,t,a){var o=JSON.stringify(a);if(o.length>r)throw Error("payload too large");var i,s=await e.subtle.importKey("jwk",t,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),l=await e.subtle.sign({name:"ECDSA",hash:"SHA-256"},s,(new TextEncoder).encode(o));return{channel:n,raw:o,signature:(i=l,btoa(String.fromCharCode.apply(null,new Uint8Array(i))))}},verify:async function(e,t,o,i){if(!o||o.channel!==n||"string"!=typeof o.raw||o.raw.length>r)throw Error("envelope");var s=await e.subtle.importKey("jwk",a(t),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);if(!await e.subtle.verify({name:"ECDSA",hash:"SHA-256"},s,function(e){if("string"!=typeof e||e.length>256)throw Error("signature");return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})}(o.signature),(new TextEncoder).encode(o.raw)))throw Error("signature");var l=JSON.parse(o.raw);if(!l||1!==l.version||!Number.isSafeInteger(l.sequence)||l.sequence<1||!Number.isFinite(l.at)||l.at>i+5e3||i-l.at>9e4)throw Error("expired/sequence");return l}};"object"==typeof e&&e.exports?e.exports=o:t.PNCReminderProtocol=o}("undefined"!=typeof globalThis?globalThis:this),e.exports}();if(window.top===window.self||"pta-catalog-reader"!==window.name){var t={review:!1,developer:!1},n="pta-auto-solver-v1",r={deepseek:{name:"DeepSeek",platformUrl:"https://platform.deepseek.com",baseUrl:"https://api.deepseek.com/v1",auth:"bearer",supportsImages:!0,hint:"全能快速模型",desc:"全能快速模型:官方 API 直连,代码生成与逻辑推导准确迅速,支持视觉图片输入。"},doubao:{name:"豆包",platformUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey",platformLabel:"火山方舟",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",auth:"bearer",supportsImages:!0,hint:"字节豆包模型",desc:"字节豆包模型:火山方舟官方 API,代码能力强,支持多模态视觉输入。"},qianwen:{name:"通义千问",platformUrl:"https://dashscope.console.aliyun.com/apiKey",platformLabel:"阿里云百炼",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",auth:"bearer",supportsImages:!0,hint:"阿里通义模型",desc:"阿里通义千问:阿里云百炼兼容模式,代码生成稳定,支持视觉理解。"},mimo:{name:"MiMo",platformUrl:"https://platform.xiaomimimo.com/console",platformLabel:"控制台",baseUrl:"https://api.xiaomimimo.com/v1",auth:"api-key",supportsImages:!0,hint:"全能性价比模型",desc:"全能性价比模型:小米官方高性价比推理模型,长上下文与多模态表现优异,默认开启图片。"},opencode_zen:{name:"Opencode Zen",platformUrl:"https://opencode.ai/console/models",baseUrl:"https://opencode.ai/zen/v1",auth:"bearer",supportsImages:!0,hint:"免费模型",desc:"免费模型:Opencode 官方网关,内置免费模型(*-free、big-pickle)置顶展示。"},opencode:{name:"OpenCode Free",platformUrl:"https://opencode.ai/docs/",platformLabel:"官方文档",baseUrl:"http://127.0.0.1:8788/v1",auth:"bearer",supportsImages:!1,optionalKey:!0,hint:"本地免费模型",desc:"本地免费模型:本地代理(127.0.0.1:8788),自动发现本地 Free 模型,无需配置外网 Key。"}},a={deepseek:!0,doubao:!0,qianwen:!0},o={c:"C",cpp:"C++",python:"Python",java:"Java",pascal:"Pascal"},i={1:"judge",2:"choice",3:"multi_choice",4:"fill",5:"program_fill",6:"function",7:"programming"},s={running:!1,runId:0,routeRevision:0,provider:"deepseek",configs:{deepseek:{apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!1,maxTokens:2048,thinking:2},doubao:{apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!0,maxTokens:2048,thinking:2},qianwen:{apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!0,maxTokens:2048,thinking:2},mimo:{apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!0,maxTokens:2048,thinking:2},opencode_zen:{apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!1,maxTokens:2048,thinking:2},opencode:{apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!1,maxTokens:2048,thinking:2}},skipAnswered:!0,continuous:!0,assistanceMode:!1,perturb:!1,notifications:!0,concurrency:1,language:"auto",theme:"light"},l=null,c={available:!1,checking:!1,baseUrl:r.opencode.baseUrl},p={buffer:"",index:0,active:!1,editor:null},d="http://47.104.250.117:3000",u="2.7.3",m={token:localStorage.getItem("pta_token")||"",valid:!1,user:null,tier:"free",usageCount:0,quota:0},h={prompt:0,completion:0},g={0:"关闭 (Off)",1:"低 (Low · 快速)",2:"中 (Medium · 推荐)",3:"高 (High · 深度)"},f=[{val:2048,label:"2K"},{val:8192,label:"8K"},{val:16384,label:"16K"},{val:32768,label:"32K"},{val:65536,label:"64K"},{val:131072,label:"128K"},{val:2e5,label:"200K"},{val:262144,label:"256K"},{val:5e5,label:"500K"},{val:1048576,label:"1M"}],b=new Map,v=0,y=0,w=!1,x="pta-ai-answer-cache-v2",A=6048e5,k=null,E=null,S=null,C=Promise.resolve(),I=function(){try{var e={exports:{}},t=e.exports;return n="undefined"!=typeof self?self:this,r=function(){return function(){var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return jr}});class n{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let r,a,o="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;r=i.start,a=i.end,r===e.length?o+=" at end of input: ":o+=" at position "+(r+1)+": ";const t=e.slice(r,a).replace(/[^]/g,"$&̲");let n,s;n=r>15?"…"+e.slice(r-15,r):e.slice(0,r),s=a+15":">","<":"<",'"':""","'":"'"},i=/[&><"']/g,s=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?s(e.body[0]):e:"font"===e.type?s(e.body):e};var l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(i,e=>o[e])},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){const t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){const t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}};const c={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){if(e.default)return e.default;const t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class d{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const t in c)if(c.hasOwnProperty(t)){const n=c[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:p(n)}}reportNonstrict(e,t,n){let a=this.strict;if("function"==typeof a&&(a=a(e,t,n)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){let r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r||!0!==r&&"error"!==r&&("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),1)))}isTrusted(e){if(e.url&&!e.protocol){const t=l.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class u{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return m[h[this.id]]}sub(){return m[g[this.id]]}fracNum(){return m[f[this.id]]}fracDen(){return m[b[this.id]]}cramp(){return m[v[this.id]]}text(){return m[y[this.id]]}isTight(){return this.size>=2}}const m=[new u(0,0,!1),new u(1,0,!0),new u(2,1,!1),new u(3,1,!0),new u(4,2,!1),new u(5,2,!0),new u(6,3,!1),new u(7,3,!0)],h=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],f=[2,3,4,5,6,7,6,7],b=[3,3,5,5,7,7,7,7],v=[1,1,3,3,5,5,7,7],y=[0,1,2,3,2,3,2,3];var w={DISPLAY:m[0],TEXT:m[2],SCRIPT:m[4],SCRIPTSCRIPT:m[6]};const x=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],A=[];function k(e){for(let t=0;t=A[t]&&e<=A[t+1])return!0;return!1}x.forEach(e=>e.blocks.forEach(e=>A.push(...e)));const E={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class S{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createDocumentFragment();for(let t=0;te.toText()).join("")}}var C={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const I={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},T={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function M(e,t,n){if(!C[t])throw new Error("Font metrics not found for font: "+t+".");let r=e.charCodeAt(0),a=C[t][r];if(!a&&e[0]in T&&(r=T[e[0]].charCodeAt(0),a=C[t][r]),a||"text"!==n||k(r)&&(a=C[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}const B={},N=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],z=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],O=function(e,t){return t.size<2?e:N[e-1][t.size-1]};class L{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||L.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=z[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){const t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new L(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:O(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:z[e-1]})}havingBaseStyle(e){e=e||this.style.text();const t=O(L.BASESIZE,e);return this.size===t&&this.textSize===L.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==L.BASESIZE?["sizing","reset-size"+this.size,"size"+L.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){let t;if(t=e>=5?0:e>=3?1:2,!B[t]){const e=B[t]={cssEmPerMu:I.quad[t]/18};for(const n in I)I.hasOwnProperty(n)&&(e[n]=I[n][t])}return B[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}L.BASESIZE=6;var R=L;const D={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},P={ex:!0,em:!0,mu:!0},H=function(e){return"string"!=typeof e&&(e=e.unit),e in D||e in P||"ex"===e},q=function(e,t){let n;if(e.unit in D)n=D[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{let a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new r("Invalid unit: '"+e.unit+"'");n=a.fontMetrics().quad}a!==t&&(n*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},j=function(e){return+e.toFixed(4)+"em"},Q=function(e){return e.filter(e=>e).join(" ")},F=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}},G=function(e){const t=document.createElement(e);t.className=Q(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e/=\x00-\x1f]/,U=function(e){let t="<"+e;this.classes.length&&(t+=' class="'+l.escape(Q(this.classes))+'"');let n="";for(const e in this.style)this.style.hasOwnProperty(e)&&(n+=l.hyphenate(e)+":"+this.style[e]+";");n&&(t+=' style="'+l.escape(n)+'"');for(const e in this.attributes)if(this.attributes.hasOwnProperty(e)){if(J.test(e))throw new r("Invalid attribute name '"+e+"'");t+=" "+e+'="'+l.escape(this.attributes[e])+'"'}t+=">";for(let e=0;e",t};class Y{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,F.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return G.call(this,"span")}toMarkup(){return U.call(this,"span")}}class V{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,F.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return G.call(this,"a")}toMarkup(){return U.call(this,"a")}}class X{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e=''+l.escape(this.alt)+'=r[0]&&e<=r[1])return n.name}}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=K[this.text])}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=j(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Q(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="0&&(n+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(n+=l.hyphenate(e)+":"+this.style[e]+";");n&&(e=!0,t+=' style="'+l.escape(n)+'"');const r=l.escape(this.text);return e?(t+=">",t+=r,t+="",t):r}}class W{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(let t=0;t':''}}class ${constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="","\\gt",!0),oe(ie,le,ve,"∈","\\in",!0),oe(ie,le,ve,"","\\@not"),oe(ie,le,ve,"⊂","\\subset",!0),oe(ie,le,ve,"⊃","\\supset",!0),oe(ie,le,ve,"⊆","\\subseteq",!0),oe(ie,le,ve,"⊇","\\supseteq",!0),oe(ie,ce,ve,"⊈","\\nsubseteq",!0),oe(ie,ce,ve,"⊉","\\nsupseteq",!0),oe(ie,le,ve,"⊨","\\models"),oe(ie,le,ve,"←","\\leftarrow",!0),oe(ie,le,ve,"≤","\\le"),oe(ie,le,ve,"≤","\\leq",!0),oe(ie,le,ve,"<","\\lt",!0),oe(ie,le,ve,"→","\\rightarrow",!0),oe(ie,le,ve,"→","\\to"),oe(ie,ce,ve,"≱","\\ngeq",!0),oe(ie,ce,ve,"≰","\\nleq",!0),oe(ie,le,ye," ","\\ "),oe(ie,le,ye," ","\\space"),oe(ie,le,ye," ","\\nobreakspace"),oe(se,le,ye," ","\\ "),oe(se,le,ye," "," "),oe(se,le,ye," ","\\space"),oe(se,le,ye," ","\\nobreakspace"),oe(ie,le,ye,null,"\\nobreak"),oe(ie,le,ye,null,"\\allowbreak"),oe(ie,le,be,",",","),oe(ie,le,be,";",";"),oe(ie,ce,de,"⊼","\\barwedge",!0),oe(ie,ce,de,"⊻","\\veebar",!0),oe(ie,le,de,"⊙","\\odot",!0),oe(ie,le,de,"⊕","\\oplus",!0),oe(ie,le,de,"⊗","\\otimes",!0),oe(ie,le,we,"∂","\\partial",!0),oe(ie,le,de,"⊘","\\oslash",!0),oe(ie,ce,de,"⊚","\\circledcirc",!0),oe(ie,ce,de,"⊡","\\boxdot",!0),oe(ie,le,de,"△","\\bigtriangleup"),oe(ie,le,de,"▽","\\bigtriangledown"),oe(ie,le,de,"†","\\dagger"),oe(ie,le,de,"⋄","\\diamond"),oe(ie,le,de,"⋆","\\star"),oe(ie,le,de,"◃","\\triangleleft"),oe(ie,le,de,"▹","\\triangleright"),oe(ie,le,fe,"{","\\{"),oe(se,le,we,"{","\\{"),oe(se,le,we,"{","\\textbraceleft"),oe(ie,le,ue,"}","\\}"),oe(se,le,we,"}","\\}"),oe(se,le,we,"}","\\textbraceright"),oe(ie,le,fe,"{","\\lbrace"),oe(ie,le,ue,"}","\\rbrace"),oe(ie,le,fe,"[","\\lbrack",!0),oe(se,le,we,"[","\\lbrack",!0),oe(ie,le,ue,"]","\\rbrack",!0),oe(se,le,we,"]","\\rbrack",!0),oe(ie,le,fe,"(","\\lparen",!0),oe(ie,le,ue,")","\\rparen",!0),oe(se,le,we,"<","\\textless",!0),oe(se,le,we,">","\\textgreater",!0),oe(ie,le,fe,"⌊","\\lfloor",!0),oe(ie,le,ue,"⌋","\\rfloor",!0),oe(ie,le,fe,"⌈","\\lceil",!0),oe(ie,le,ue,"⌉","\\rceil",!0),oe(ie,le,we,"\\","\\backslash"),oe(ie,le,we,"∣","|"),oe(ie,le,we,"∣","\\vert"),oe(se,le,we,"|","\\textbar",!0),oe(ie,le,we,"∥","\\|"),oe(ie,le,we,"∥","\\Vert"),oe(se,le,we,"∥","\\textbardbl"),oe(se,le,we,"~","\\textasciitilde"),oe(se,le,we,"\\","\\textbackslash"),oe(se,le,we,"^","\\textasciicircum"),oe(ie,le,ve,"↑","\\uparrow",!0),oe(ie,le,ve,"⇑","\\Uparrow",!0),oe(ie,le,ve,"↓","\\downarrow",!0),oe(ie,le,ve,"⇓","\\Downarrow",!0),oe(ie,le,ve,"↕","\\updownarrow",!0),oe(ie,le,ve,"⇕","\\Updownarrow",!0),oe(ie,le,ge,"∐","\\coprod"),oe(ie,le,ge,"⋁","\\bigvee"),oe(ie,le,ge,"⋀","\\bigwedge"),oe(ie,le,ge,"⨄","\\biguplus"),oe(ie,le,ge,"⋂","\\bigcap"),oe(ie,le,ge,"⋃","\\bigcup"),oe(ie,le,ge,"∫","\\int"),oe(ie,le,ge,"∫","\\intop"),oe(ie,le,ge,"∬","\\iint"),oe(ie,le,ge,"∭","\\iiint"),oe(ie,le,ge,"∏","\\prod"),oe(ie,le,ge,"∑","\\sum"),oe(ie,le,ge,"⨂","\\bigotimes"),oe(ie,le,ge,"⨁","\\bigoplus"),oe(ie,le,ge,"⨀","\\bigodot"),oe(ie,le,ge,"∮","\\oint"),oe(ie,le,ge,"∯","\\oiint"),oe(ie,le,ge,"∰","\\oiiint"),oe(ie,le,ge,"⨆","\\bigsqcup"),oe(ie,le,ge,"∫","\\smallint"),oe(se,le,me,"…","\\textellipsis"),oe(ie,le,me,"…","\\mathellipsis"),oe(se,le,me,"…","\\ldots",!0),oe(ie,le,me,"…","\\ldots",!0),oe(ie,le,me,"⋯","\\@cdots",!0),oe(ie,le,me,"⋱","\\ddots",!0),oe(ie,le,we,"⋮","\\varvdots"),oe(se,le,we,"⋮","\\varvdots"),oe(ie,le,pe,"ˊ","\\acute"),oe(ie,le,pe,"ˋ","\\grave"),oe(ie,le,pe,"¨","\\ddot"),oe(ie,le,pe,"~","\\tilde"),oe(ie,le,pe,"ˉ","\\bar"),oe(ie,le,pe,"˘","\\breve"),oe(ie,le,pe,"ˇ","\\check"),oe(ie,le,pe,"^","\\hat"),oe(ie,le,pe,"⃗","\\vec"),oe(ie,le,pe,"˙","\\dot"),oe(ie,le,pe,"˚","\\mathring"),oe(ie,le,he,"","\\@imath"),oe(ie,le,he,"","\\@jmath"),oe(ie,le,we,"ı","ı"),oe(ie,le,we,"ȷ","ȷ"),oe(se,le,we,"ı","\\i",!0),oe(se,le,we,"ȷ","\\j",!0),oe(se,le,we,"ß","\\ss",!0),oe(se,le,we,"æ","\\ae",!0),oe(se,le,we,"œ","\\oe",!0),oe(se,le,we,"ø","\\o",!0),oe(se,le,we,"Æ","\\AE",!0),oe(se,le,we,"Œ","\\OE",!0),oe(se,le,we,"Ø","\\O",!0),oe(se,le,pe,"ˊ","\\'"),oe(se,le,pe,"ˋ","\\`"),oe(se,le,pe,"ˆ","\\^"),oe(se,le,pe,"˜","\\~"),oe(se,le,pe,"ˉ","\\="),oe(se,le,pe,"˘","\\u"),oe(se,le,pe,"˙","\\."),oe(se,le,pe,"¸","\\c"),oe(se,le,pe,"˚","\\r"),oe(se,le,pe,"ˇ","\\v"),oe(se,le,pe,"¨",'\\"'),oe(se,le,pe,"˝","\\H"),oe(se,le,pe,"◯","\\textcircled");const xe={"--":!0,"---":!0,"``":!0,"''":!0};oe(se,le,we,"–","--",!0),oe(se,le,we,"–","\\textendash"),oe(se,le,we,"—","---",!0),oe(se,le,we,"—","\\textemdash"),oe(se,le,we,"‘","`",!0),oe(se,le,we,"‘","\\textquoteleft"),oe(se,le,we,"’","'",!0),oe(se,le,we,"’","\\textquoteright"),oe(se,le,we,"“","``",!0),oe(se,le,we,"“","\\textquotedblleft"),oe(se,le,we,"”","''",!0),oe(se,le,we,"”","\\textquotedblright"),oe(ie,le,we,"°","\\degree",!0),oe(se,le,we,"°","\\degree"),oe(se,le,we,"°","\\textdegree",!0),oe(ie,le,we,"£","\\pounds"),oe(ie,le,we,"£","\\mathsterling",!0),oe(se,le,we,"£","\\pounds"),oe(se,le,we,"£","\\textsterling",!0),oe(ie,ce,we,"✠","\\maltese"),oe(se,ce,we,"✠","\\maltese");for(let e=0;e<14;e++){const t='0123456789/@."'.charAt(e);oe(ie,le,we,t,t)}for(let e=0;e<25;e++){const t='0123456789!@*()-=+";:?/.,'.charAt(e);oe(se,le,we,t,t)}const Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){const t=Ae.charAt(e);oe(ie,le,he,t,t),oe(se,le,we,t,t)}oe(ie,ce,we,"C","ℂ"),oe(se,ce,we,"C","ℂ"),oe(ie,ce,we,"H","ℍ"),oe(se,ce,we,"H","ℍ"),oe(ie,ce,we,"N","ℕ"),oe(se,ce,we,"N","ℕ"),oe(ie,ce,we,"P","ℙ"),oe(se,ce,we,"P","ℙ"),oe(ie,ce,we,"Q","ℚ"),oe(se,ce,we,"Q","ℚ"),oe(ie,ce,we,"R","ℝ"),oe(se,ce,we,"R","ℝ"),oe(ie,ce,we,"Z","ℤ"),oe(se,ce,we,"Z","ℤ"),oe(ie,le,he,"h","ℎ"),oe(se,le,he,"h","ℎ");let ke="";for(let e=0;e<52;e++){const t=Ae.charAt(e);ke=String.fromCharCode(55349,56320+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56372+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56424+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56580+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56684+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56736+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56788+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56840+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56944+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),e<26&&(ke=String.fromCharCode(55349,56632+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,56476+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke))}ke=String.fromCharCode(55349,56668),oe(ie,le,he,"k",ke),oe(se,le,we,"k",ke);for(let e=0;e<10;e++){const t=e.toString();ke=String.fromCharCode(55349,57294+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,57314+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,57324+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke),ke=String.fromCharCode(55349,57334+e),oe(ie,le,he,t,ke),oe(se,le,we,t,ke)}for(let e=0;e<3;e++){const t="ÐÞþ".charAt(e);oe(ie,le,he,t,t),oe(se,le,we,t,t)}const Ee=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Se=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ce=function(e,t,n){return ae[n][e]&&ae[n][e].replace&&(e=ae[n][e].replace),{value:e,metrics:M(e,t,n)}},Ie=function(e,t,n,r,a){const o=Ce(e,t,n),i=o.metrics;let s;if(e=o.value,i){let t=i.italic;("text"===n||r&&"mathit"===r.font)&&(t=0),s=new Z(e,i.height,i.depth,t,i.skew,i.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),s=new Z(e,0,0,0,0,0,a);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push("mtight");const e=r.getColor();e&&(s.style.color=e)}return s},Te=(e,t)=>{if(Q(e.classes)!==Q(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(const n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Me=function(e){let t=0,n=0,r=0;for(let a=0;at&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Be=function(e,t,n,r){const a=new Y(e,t,n,r);return Me(a),a},Ne=(e,t,n,r)=>new Y(e,t,n,r),ze=function(e){const t=new S(e);return Me(t),t},Oe=function(e,t,n){let r,a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return r="textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular",a+"-"+r},Le={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Re={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var De={fontMap:Le,makeSymbol:Ie,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Ce(e,"Main-Bold",t).metrics?Ie(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===ae[t][e].font?Ie(e,"Main-Regular",t,n,r):Ie(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Be,makeSvgSpan:Ne,makeLineSpan:function(e,t,n){const r=Be([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=j(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){const a=new V(e,t,n,r);return Me(a),a},makeFragment:ze,wrapFragment:function(e,t){return e instanceof S?Be([],[e],t):e},makeVList:function(e,t){const{children:n,depth:r}=function(e){if("individualShift"===e.positionType){const t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth;let a=r;for(let e=1;e0)return Ie(o,c,a,t,i.concat(p));if(l){let e,r;if("boldsymbol"===l){const t=function(e,t,n,r,a){return"textord"!==a&&Ce(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,a,0,0,n);e=t.fontName,r=[t.fontClass]}else s?(e=Le[l].fontName,r=[l]):(e=Oe(l,t.fontWeight,t.fontShape),r=[l,t.fontWeight,t.fontShape]);if(Ce(o,e,a).metrics)return Ie(o,e,a,t,i.concat(r));if(xe.hasOwnProperty(o)&&"Typewriter"===e.slice(0,10)){const n=[];for(let s=0;s{const n=Be(["mspace"],[],t),r=q(e,t);return n.style.marginRight=j(r),n},staticSvg:function(e,t){const[n,r,a]=Re[e],o=new _(n),i=new W([o],{width:j(r),height:j(a),style:"width:"+j(r),viewBox:"0 0 "+1e3*r+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),s=Ne(["overlay"],[i],t);return s.height=a,s.style.height=j(a),s.style.width=j(r),s},svgData:Re,tryCombineChars:e=>{for(let t=0;t{const n=t.classes[0],r=e.classes[0];"mbin"===n&&l.contains(We,r)?t.classes[0]="mord":"mbin"===r&&l.contains(Ze,n)&&(e.classes[0]="mord")},{node:i},s,c),tt(a,(e,t)=>{const n=at(t),r=at(e),a=n&&r?e.hasClass("mtight")?Qe[n][r]:je[n][r]:null;if(a)return De.makeGlue(a,o)},{node:i},s,c),a},tt=function(e,t,n,r,a){r&&e.push(r);let o=0;for(;on=>{e.splice(t+1,0,n),o++})(o)}r&&e.pop()},nt=function(e){return e instanceof S||e instanceof V||e instanceof Y&&e.hasClass("enclosing")?e:null},rt=function(e,t){const n=nt(e);if(n){const e=n.children;if(e.length){if("right"===t)return rt(e[e.length-1],"right");if("left"===t)return rt(e[0],"left")}}return e},at=function(e,t){return e?(t&&(e=rt(e,t)),$e[e.classes[0]]||null):null},ot=function(e,t){const n=["nulldelimiter"].concat(e.baseSizingClasses());return Ke(t.concat(n))},it=function(e,t,n){if(!e)return Ke();if(Ge[e.type]){let r=Ge[e.type](e,t);if(n&&t.size!==n.size){r=Ke(t.sizingClasses(n),[r],t);const e=t.sizeMultiplier/n.sizeMultiplier;r.height*=e,r.depth*=e}return r}throw new r("Got group of unknown type: '"+e.type+"'")};function st(e,t){const n=Ke(["base"],e,t),r=Ke(["strut"]);return r.style.height=j(n.height+n.depth),n.depth&&(r.style.verticalAlign=j(-n.depth)),n.children.unshift(r),n}function lt(e,t){let n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);const r=et(e,t,"root");let a;2===r.length&&r[1].hasClass("tag")&&(a=r.pop());const o=[];let i,s=[];for(let e=0;e0&&(o.push(st(s,t)),s=[]),o.push(r[e]));s.length>0&&o.push(st(s,t)),n?(i=st(et(n,t,!0)),i.classes=["tag"],o.push(i)):a&&o.push(a);const l=Ke(["katex-html"],o);if(l.setAttribute("aria-hidden","true"),i){const e=i.children[0];e.style.height=j(l.height+l.depth),l.depth&&(e.style.verticalAlign=j(-l.depth))}return l}function ct(e){return new S(e)}class pt{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){const e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Q(this.classes));for(let t=0;t0&&(e+=' class ="'+l.escape(Q(this.classes))+'"'),e+=">";for(let t=0;t",e}toText(){return this.children.map(e=>e.toText()).join("")}}class dt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l.escape(this.toText())}toText(){return this.text}}var ut={MathNode:pt,TextNode:dt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);{const e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",j(this.width)),e}}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},newDocumentFragment:ct};const mt=function(e,t,n){return!ae[t][e]||!ae[t][e].replace||55349===e.charCodeAt(0)||xe.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=ae[t][e].replace),new ut.TextNode(e)},ht=function(e){return 1===e.length?e[0]:new ut.MathNode("mrow",e)},gt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";const n=t.font;if(!n||"mathnormal"===n)return null;const r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";let a=e.text;return l.contains(["\\imath","\\jmath"],a)?null:(ae[r][a]&&ae[r][a].replace&&(a=ae[r][a].replace),M(a,De.fontMap[n].fontName,r)?De.fontMap[n].variant:null)};function ft(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){const t=e.children[0];return t instanceof dt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){const t=e.children[0];return t instanceof dt&&","===t.text}return!1}const bt=function(e,t,n){if(1===e.length){const r=yt(e[0],t);return n&&r instanceof pt&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}const r=[];let a;for(let n=0;n=1&&("mn"===a.type||ft(a))){const e=o.children[0];e instanceof pt&&"mn"===e.type&&(e.children=[...a.children,...e.children],r.pop())}else if("mi"===a.type&&1===a.children.length){const e=a.children[0];if(e instanceof dt&&"̸"===e.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){const e=o.children[0];e instanceof dt&&e.text.length>0&&(e.text=e.text.slice(0,1)+"̸"+e.text.slice(1),r.pop())}}}r.push(o),a=o}return r},vt=function(e,t,n){return ht(bt(e,t,n))},yt=function(e,t){if(!e)return new ut.MathNode("mrow");if(Je[e.type])return Je[e.type](e,t);throw new r("Got group of unknown type: '"+e.type+"'")};function wt(e,t,n,r,a){const o=bt(e,n);let i;i=1===o.length&&o[0]instanceof pt&&l.contains(["mrow","mtable"],o[0].type)?o[0]:new ut.MathNode("mrow",o);const s=new ut.MathNode("annotation",[new ut.TextNode(t)]);s.setAttribute("encoding","application/x-tex");const c=new ut.MathNode("semantics",[i,s]),p=new ut.MathNode("math",[c]);return p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&p.setAttribute("display","block"),De.makeSpan([a?"katex":"katex-mathml"],[p])}const xt=function(e){return new R({style:e.displayMode?w.DISPLAY:w.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},At=function(e,t){if(t.displayMode){const n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=De.makeSpan(n,[e])}return e},kt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Et={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};var St=function(e){const t=new ut.MathNode("mo",[new ut.TextNode(kt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Ct=function(e,t){const{span:n,minWidth:r,height:a}=function(){let n=4e5;const r=e.label.slice(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],r)){const o="ordgroup"===(a=e.base).type?a.body.length:1;let i,s,l;if(o>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,l=.42,s=r+"4"):(i=312,n=2340,l=.34,s="tilde4");else{const e=[1,1,2,2,3,3][o];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][e],i=[0,239,300,360,420][e],l=[0,.24,.3,.3,.36,.42][e],s=r+e):(n=[0,600,1033,2339,2340][e],i=[0,260,286,306,312][e],l=[0,.26,.286,.3,.306,.34][e],s="tilde"+e)}const c=new _(s),p=new W([c],{width:"100%",height:j(l),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:De.makeSvgSpan([],[p],t),minWidth:0,height:l}}{const e=[],a=Et[r],[o,i,s]=a,l=s/1e3,c=o.length;let p,d;if(1===c)p=["hide-tail"],d=[a[3]];else if(2===c)p=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==c)throw new Error("Correct katexImagesData or update code here to support\n "+c+" children.");p=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(let r=0;r0&&(n.style.minWidth=j(r)),n};function It(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Tt(e){const t=Mt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Mt(e){return e&&("atom"===e.type||ne.hasOwnProperty(e.type))?e:null}const Bt=(e,t)=>{let n,r,a;e&&"supsub"===e.type?(r=It(e.base,"accent"),n=r.base,e.base=n,a=function(e){if(e instanceof Y)return e;throw new Error("Expected span but got "+String(e)+".")}(it(e,t)),e.base=r):(r=It(e,"accent"),n=r.base);const o=it(n,t.havingCrampedStyle());let i=0;if(r.isShifty&&l.isCharacterBox(n)){const e=l.getBaseElem(n);i=ee(it(e,t.havingCrampedStyle())).skew}const s="\\c"===r.label;let c,p=s?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)c=Ct(r,t),c=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+j(2*i)+")",marginLeft:j(2*i)}:void 0}]},t);else{let e,n;"\\vec"===r.label?(e=De.staticSvg("vec",t),n=De.svgData.vec[1]):(e=De.makeOrd({mode:r.mode,text:r.label},t,"textord"),e=ee(e),e.italic=0,n=e.width,s&&(p+=e.depth)),c=De.makeSpan(["accent-body"],[e]);const a="\\textcircled"===r.label;a&&(c.classes.push("accent-full"),p=o.height);let l=i;a||(l-=n/2),c.style.left=j(l),"\\textcircled"===r.label&&(c.style.top=".2em"),c=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-p},{type:"elem",elem:c}]},t)}const d=De.makeSpan(["mord","accent"],[c],t);return a?(a.children[0]=d,a.height=Math.max(d.height,a.height),a.classes[0]="mord",a):d},Nt=(e,t)=>{const n=e.isStretchy?St(e.label):new ut.MathNode("mo",[mt(e.label,e.mode)]),r=new ut.MathNode("mover",[yt(e.base,t),n]);return r.setAttribute("accent","true"),r},zt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ue({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{const n=Ve(t[0]),r=!zt.test(e.funcName),a=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:Bt,mathmlBuilder:Nt}),Ue({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const n=t[0];let r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Bt,mathmlBuilder:Nt}),Ue({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{let{parser:n,funcName:r}=e;const a=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(e,t)=>{const n=it(e.base,t),r=Ct(e,t),a="\\utilde"===e.label?.12:0,o=De.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]},t);return De.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{const n=St(e.label),r=new ut.MathNode("munder",[yt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});const Ot=e=>{const t=new ut.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ue({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){let{parser:r,funcName:a}=e;return{type:"xArrow",mode:r.mode,label:a,body:t[0],below:n[0]}},htmlBuilder(e,t){const n=t.style;let r=t.havingStyle(n.sup());const a=De.wrapFragment(it(e.body,r,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";let i;a.classes.push(o+"-arrow-pad"),e.below&&(r=t.havingStyle(n.sub()),i=De.wrapFragment(it(e.below,r,t),t),i.classes.push(o+"-arrow-pad"));const s=Ct(e,t),l=-t.fontMetrics().axisHeight+.5*s.height;let c,p=-t.fontMetrics().axisHeight-.5*s.height-.111;if((a.depth>.25||"\\xleftequilibrium"===e.label)&&(p-=a.depth),i){const e=-t.fontMetrics().axisHeight+i.height+.5*s.height+.111;c=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:p},{type:"elem",elem:s,shift:l},{type:"elem",elem:i,shift:e}]},t)}else c=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:p},{type:"elem",elem:s,shift:l}]},t);return c.children[0].children[0].children[1].classes.push("svg-align"),De.makeSpan(["mrel","x-arrow"],[c],t)},mathmlBuilder(e,t){const n=St(e.label);let r;if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){const a=Ot(yt(e.body,t));if(e.below){const o=Ot(yt(e.below,t));r=new ut.MathNode("munderover",[n,o,a])}else r=new ut.MathNode("mover",[n,a])}else if(e.below){const a=Ot(yt(e.below,t));r=new ut.MathNode("munder",[n,a])}else r=Ot(),r=new ut.MathNode("mover",[n,r]);return r}});const Lt=De.makeSpan;function Rt(e,t){const n=et(e.body,t,!0);return Lt([e.mclass],n,t)}function Dt(e,t){let n;const r=bt(e.body,t);return"minner"===e.mclass?n=new ut.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0],n.type="mi"):n=new ut.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new ut.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Ue({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){let{parser:n,funcName:r}=e;const a=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Xe(a),isCharacterBox:l.isCharacterBox(a)}},htmlBuilder:Rt,mathmlBuilder:Dt});const Pt=e=>{const t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Ue({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){let{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Pt(t[0]),body:Xe(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),Ue({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){let{parser:n,funcName:r}=e;const a=t[1],o=t[0];let i;i="\\stackrel"!==r?Pt(a):"mrel";const s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Xe(a)},c={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===r?null:o,sub:"\\underset"===r?o:null};return{type:"mclass",mode:n.mode,mclass:i,body:[c],isCharacterBox:l.isCharacterBox(c)}},htmlBuilder:Rt,mathmlBuilder:Dt}),Ue({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Pt(t[0]),body:Xe(t[0])}},htmlBuilder(e,t){const n=et(e.body,t,!0),r=De.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){const n=bt(e.body,t),r=new ut.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});const Ht={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},qt=e=>"textord"===e.type&&"@"===e.text;function jt(e,t,n){const r=Ht[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:r,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[e],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[a],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}Ue({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){let{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){const n=t.havingStyle(t.style.sup()),r=De.wrapFragment(it(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=j(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){let n=new ut.MathNode("mrow",[yt(e.label,t)]);return n=new ut.MathNode("mpadded",[n]),n.setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new ut.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),Ue({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){let{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){const n=De.wrapFragment(it(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new ut.MathNode("mrow",[yt(e.fragment,t)])}),Ue({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:n}=e;const a=It(t[0],"ordgroup").body;let o="";for(let e=0;e=1114111)throw new r("\\@char with invalid code point "+o);return s<=65535?i=String.fromCharCode(s):(s-=65536,i=String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:n.mode,text:i}}});const Qt=(e,t)=>{const n=et(e.body,t.withColor(e.color),!1);return De.makeFragment(n)},Ft=(e,t)=>{const n=bt(e.body,t.withColor(e.color)),r=new ut.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Ue({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){let{parser:n}=e;const r=It(t[0],"color-token").color,a=t[1];return{type:"color",mode:n.mode,color:r,body:Xe(a)}},htmlBuilder:Qt,mathmlBuilder:Ft}),Ue({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){let{parser:n,breakOnTokenText:r}=e;const a=It(t[0],"color-token").color;n.gullet.macros.set("\\current@color",a);const o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:o}},htmlBuilder:Qt,mathmlBuilder:Ft}),Ue({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){let{parser:r}=e;const a="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:a&&It(a,"size").value}},htmlBuilder(e,t){const n=De.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=j(q(e.size,t)))),n},mathmlBuilder(e,t){const n=new ut.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",j(q(e.size,t)))),n}});const Gt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Jt=e=>{const t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new r("Expected a control sequence",e);return t},Ut=(e,t,n,r)=>{let a=e.gullet.macros.get(n.text);null==a&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,a,r)};Ue({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t,funcName:n}=e;t.consumeSpaces();const a=t.fetch();if(Gt[a.text])return"\\global"!==n&&"\\\\globallong"!==n||(a.text=Gt[a.text]),It(t.parseFunction(),"internal");throw new r("Invalid token after macro prefix",a)}}),Ue({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:n}=e,a=t.gullet.popToken();const o=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new r("Expected a control sequence",a);let i,s=0;const l=[[]];for(;"{"!==t.gullet.future().text;)if(a=t.gullet.popToken(),"#"===a.text){if("{"===t.gullet.future().text){i=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new r('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new r('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new r("Expected a macro definition");l[s].push(a.text)}let{tokens:c}=t.gullet.consumeArg();return i&&c.unshift(i),"\\edef"!==n&&"\\xdef"!==n||(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(o,{tokens:c,numArgs:s,delimiters:l},n===Gt[n]),{type:"internal",mode:t.mode}}}),Ue({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:n}=e;const r=Jt(t.gullet.popToken());t.gullet.consumeSpaces();const a=(e=>{let t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t})(t);return Ut(t,r,a,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),Ue({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:n}=e;const r=Jt(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return Ut(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});const Yt=function(e,t,n){const r=M(ae.math[e]&&ae.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Vt=function(e,t,n,r){const a=n.havingBaseStyle(t),o=De.makeSpan(r.concat(a.sizingClasses(n)),[e],n),i=a.sizeMultiplier/n.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},Xt=function(e,t,n){const r=t.havingBaseStyle(n),a=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=j(a),e.height-=a,e.depth+=a},Kt=function(e,t,n,r,a,o){const i=function(e,t,n,r){return De.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,a,r),s=Vt(De.makeSpan(["delimsizing","size"+t],[i],r),w.TEXT,r,o);return n&&Xt(s,r,w.TEXT),s},Zt=function(e,t,n){let r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:De.makeSpan(["delimsizinginner",r],[De.makeSpan([],[De.makeSymbol(e,t,n)])])}},Wt=function(e,t,n){const r=C["Size4-Regular"][e.charCodeAt(0)]?C["Size4-Regular"][e.charCodeAt(0)][4]:C["Size1-Regular"][e.charCodeAt(0)][4],a=new _("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),o=new W([a],{width:j(r),height:j(t),style:"width:"+j(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=De.makeSvgSpan([],[o],n);return i.height=t,i.style.height=j(t),i.style.width=j(r),{type:"elem",elem:i}},_t={type:"kern",size:-.008},$t=["|","\\lvert","\\rvert","\\vert"],en=["\\|","\\lVert","\\rVert","\\Vert"],tn=function(e,t,n,r,a,o){let i,s,c,p,d="",u=0;i=c=p=e,s=null;let m="Size1-Regular";"\\uparrow"===e?c=p="⏐":"\\Uparrow"===e?c=p="‖":"\\downarrow"===e?i=c="⏐":"\\Downarrow"===e?i=c="‖":"\\updownarrow"===e?(i="\\uparrow",c="⏐",p="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",c="‖",p="\\Downarrow"):l.contains($t,e)?(c="∣",d="vert",u=333):l.contains(en,e)?(c="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",c="⎢",p="⎣",m="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",c="⎥",p="⎦",m="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(c=i="⎢",p="⎣",m="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",c=p="⎢",m="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(c=i="⎥",p="⎦",m="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",c=p="⎥",m="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",c="⎜",p="⎝",m="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",c="⎟",p="⎠",m="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",s="⎨",p="⎩",c="⎪",m="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",s="⎬",p="⎭",c="⎪",m="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",p="⎩",c="⎪",m="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",p="⎭",c="⎪",m="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",p="⎭",c="⎪",m="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",p="⎩",c="⎪",m="Size4-Regular");const h=Yt(i,m,a),g=h.height+h.depth,f=Yt(c,m,a),b=f.height+f.depth,v=Yt(p,m,a),y=v.height+v.depth;let x=0,A=1;if(null!==s){const e=Yt(s,m,a);x=e.height+e.depth,A=2}const k=g+y+x,E=k+Math.max(0,Math.ceil((t-k)/(A*b)))*A*b;let S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);const C=E/2-S,I=[];if(d.length>0){const e=E-g-y,t=Math.round(1e3*E),n=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*e)),a=new _(d,n),o=(u/1e3).toFixed(3)+"em",i=(t/1e3).toFixed(3)+"em",s=new W([a],{width:o,height:i,viewBox:"0 0 "+u+" "+t}),l=De.makeSvgSpan([],[s],r);l.height=t/1e3,l.style.width=o,l.style.height=i,I.push({type:"elem",elem:l})}else{if(I.push(Zt(p,m,a)),I.push(_t),null===s){const e=E-g-y+.016;I.push(Wt(c,e,r))}else{const e=(E-g-y-x)/2+.016;I.push(Wt(c,e,r)),I.push(_t),I.push(Zt(s,m,a)),I.push(_t),I.push(Wt(c,e,r))}I.push(_t),I.push(Zt(i,m,a))}const T=r.havingBaseStyle(w.TEXT),M=De.makeVList({positionType:"bottom",positionData:C,children:I},T);return Vt(De.makeSpan(["delimsizing","mult"],[M],T),w.TEXT,r,o)},nn=.08,rn=function(e,t,n,r,a){const o=function(e,t,n){t*=1e3;let r="";switch(e){case"sqrtMain":r=function(e){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":r=function(e){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":r=function(e){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":r=function(e){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":r=function(e){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(n-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,n)}return r}(e,r,n),i=new _(e,o),s=new W([i],{width:"400em",height:j(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return De.makeSvgSpan(["hide-tail"],[s],a)},an=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],on=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],sn=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ln=[0,1.2,1.8,2.4,3],cn=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],pn=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"stack"}],dn=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],un=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},mn=function(e,t,n,r){for(let a=Math.min(2,3-r.style.size);at)return n[a]}return n[n.length-1]},hn=function(e,t,n,r,a,o){let i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=l.contains(sn,e)?cn:l.contains(an,e)?dn:pn;const s=mn(e,t,i,r);return"small"===s.type?function(e,t,n,r,a,o){const i=De.makeSymbol(e,"Main-Regular",a,r),s=Vt(i,t,r,o);return n&&Xt(s,r,t),s}(e,s.style,n,r,a,o):"large"===s.type?Kt(e,s.size,n,r,a,o):tn(e,t,n,r,a,o)};var gn={sqrtImage:function(e,t){const n=t.havingBaseSizing(),r=mn("\\surd",e*n.sizeMultiplier,dn,n);let a=n.sizeMultiplier;const o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,s,l=0,c=0,p=0;return"small"===r.type?(p=1e3+1e3*o+80,e<1?a=1:e<1.4&&(a=.7),l=(1+o+nn)/a,c=(1+o)/a,i=rn("sqrtMain",l,p,o,t),i.style.minWidth="0.853em",s=.833/a):"large"===r.type?(p=1080*ln[r.size],c=(ln[r.size]+o)/a,l=(ln[r.size]+o+nn)/a,i=rn("sqrtSize"+r.size,l,p,o,t),i.style.minWidth="1.02em",s=1/a):(l=e+o+nn,c=e+o,p=Math.floor(1e3*e+o)+80,i=rn("sqrtTall",l,p,o,t),i.style.minWidth="0.742em",s=1.056),i.height=c,i.style.height=j(l),{span:i,advanceWidth:s,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},sizedDelim:function(e,t,n,a,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),l.contains(an,e)||l.contains(sn,e))return Kt(e,t,!1,n,a,o);if(l.contains(on,e))return tn(e,ln[t],!1,n,a,o);throw new r("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:ln,customSizedDelim:hn,leftRightDelim:function(e,t,n,r,a,o){const i=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-i,n+i),c=Math.max(l/500*901,2*l-s);return hn(e,c,!0,r,a,o)}};const fn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},bn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function vn(e,t){const n=Mt(e);if(n&&l.contains(bn,n.text))return n;throw new r(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function yn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ue({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{const n=vn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:fn[e.funcName].size,mclass:fn[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?De.makeSpan([e.mclass]):gn.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{const t=[];"."!==e.delim&&t.push(mt(e.delim,e.mode));const n=new ut.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");const r=j(gn.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),Ue({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:vn(t[0],e).text,color:n}}}),Ue({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const n=vn(t[0],e),r=e.parser;++r.leftrightDepth;const a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);const o=It(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{yn(e);const n=et(e.body,t,!0,["mopen","mclose"]);let r,a,o=0,i=0,s=!1;for(let e=0;e{yn(e);const n=bt(e.body,t);if("."!==e.left){const t=new ut.MathNode("mo",[mt(e.left,e.mode)]);t.setAttribute("fence","true"),n.unshift(t)}if("."!==e.right){const t=new ut.MathNode("mo",[mt(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),n.push(t)}return ht(n)}}),Ue({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const n=vn(t[0],e);if(!e.parser.leftrightDepth)throw new r("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{let n;if("."===e.delim)n=ot(t,[]);else{n=gn.sizedDelim(e.delim,1,t,e.mode,[]);const r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{const n="\\vert"===e.delim||"|"===e.delim?mt("|","text"):mt(e.delim,e.mode),r=new ut.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});const wn=(e,t)=>{const n=De.wrapFragment(it(e.body,t),t),r=e.label.slice(1);let a,o=t.sizeMultiplier,i=0;const s=l.isCharacterBox(e.body);if("sout"===r)a=De.makeSpan(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/o,i=-.5*t.fontMetrics().xHeight;else if("phase"===r){const e=q({number:.6,unit:"pt"},t),r=q({number:.35,unit:"ex"},t);o/=t.havingBaseSizing().sizeMultiplier;const s=n.height+n.depth+e+r;n.style.paddingLeft=j(s/2+e);const l=Math.floor(1e3*s*o),p="M400000 "+(c=l)+" H0 L"+c/2+" 0 l65 45 L145 "+(c-80)+" H400000z",d=new W([new _("phase",p)],{width:"400em",height:j(l/1e3),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});a=De.makeSvgSpan(["hide-tail"],[d],t),a.style.height=j(s),i=n.depth+e+r}else{/cancel/.test(r)?s||n.classes.push("cancel-pad"):"angl"===r?n.classes.push("anglpad"):n.classes.push("boxpad");let o=0,l=0,c=0;/box/.test(r)?(c=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),o=t.fontMetrics().fboxsep+("colorbox"===r?0:c),l=o):"angl"===r?(c=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),o=4*c,l=Math.max(0,.25-n.depth)):(o=s?.2:0,l=o),a=function(e,t,n,r,a){let o;const i=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=De.makeSpan(["stretchy",t],[],a),"fbox"===t){const e=a.color&&a.getColor();e&&(o.style.borderColor=e)}}else{const e=[];/^[bx]cancel$/.test(t)&&e.push(new $({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new $({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const n=new W(e,{width:"100%",height:j(i)});o=De.makeSvgSpan([],[n],a)}return o.height=i,o.style.height=j(i),o}(n,r,o,l,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=j(c)):"angl"===r&&.049!==c&&(a.style.borderTopWidth=j(c),a.style.borderRightWidth=j(c)),i=n.depth+l,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var c;let p;if(e.backgroundColor)p=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:i},{type:"elem",elem:n,shift:0}]},t);else{const e=/cancel|phase/.test(r)?["svg-align"]:[];p=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:a,shift:i,wrapperClasses:e}]},t)}return/cancel/.test(r)&&(p.height=n.height,p.depth=n.depth),/cancel/.test(r)&&!s?De.makeSpan(["mord","cancel-lap"],[p],t):De.makeSpan(["mord"],[p],t)},xn=(e,t)=>{let n=0;const r=new ut.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[yt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){const n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Ue({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){let{parser:r,funcName:a}=e;const o=It(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:wn,mathmlBuilder:xn}),Ue({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){let{parser:r,funcName:a}=e;const o=It(t[0],"color-token").color,i=It(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:i,borderColor:o,body:s}},htmlBuilder:wn,mathmlBuilder:xn}),Ue({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){let{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),Ue({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){let{parser:n,funcName:r}=e;const a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}},htmlBuilder:wn,mathmlBuilder:xn}),Ue({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){let{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});const An={};function kn(e){let{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e;const s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a};for(let e=0;e{if(!e.parser.settings.displayMode)throw new r("{"+e.envName+"} can be used only in display mode.")};function Bn(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Nn(e,t,n){let{hskipBeforeAndAfter:a,addJot:o,cols:i,arraystretch:s,colSeparationType:l,autoTag:c,singleRow:p,emptySingleRow:d,maxNumCols:u,leqno:m}=t;if(e.gullet.beginGroup(),p||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){const t=e.gullet.expandMacroAsText("\\arraystretch");if(null==t)s=1;else if(s=parseFloat(t),!s||s<0)throw new r("Invalid \\arraystretch: "+t)}e.gullet.beginGroup();let h=[];const g=[h],f=[],b=[],v=null!=c?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new In("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(c)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(Tn(e));;){let t=e.parseExpression(!1,p?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),t={type:"ordgroup",mode:e.mode,body:t},n&&(t={type:"styling",mode:e.mode,style:n,body:[t]}),h.push(t);const a=e.fetch().text;if("&"===a){if(u&&h.length===u){if(p||l)throw new r("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===a){w(),1===h.length&&"styling"===t.type&&0===t.body[0].body.length&&(g.length>1||!d)&&g.pop(),b.length0&&(y+=.25),p.push({pos:y,isDashed:e[t]})}for(x(i[0]),n=0;n0&&(u+=v,le))for(n=0;n=s)continue;(a>0||e.hskipBeforeAndAfter)&&(i=l.deflt(p.pregap,m),0!==i&&(S=De.makeSpan(["arraycolsep"],[]),S.style.width=j(i),E.push(S)));let h=[];for(n=0;n0){const e=De.makeLineSpan("hline",t,d),n=De.makeLineSpan("hdashline",t,d),r=[{type:"elem",elem:c,shift:0}];for(;p.length>0;){const t=p.pop(),a=t.pos-A;t.isDashed?r.push({type:"elem",elem:n,shift:a}):r.push({type:"elem",elem:e,shift:a})}c=De.makeVList({positionType:"individualShift",children:r},t)}if(0===I.length)return De.makeSpan(["mord"],[c],t);{let e=De.makeVList({positionType:"individualShift",children:I},t);return e=De.makeSpan(["tag"],[e],t),De.makeFragment([c,e])}},Ln={c:"center ",l:"left ",r:"right "},Rn=function(e,t){const n=[],r=new ut.MathNode("mtd",[],["mtr-glue"]),a=new ut.MathNode("mtd",[],["mml-eqn-num"]);for(let o=0;o0){const t=e.cols;let n="",r=!1,a=0,i=t.length;"separator"===t[0].type&&(s+="top ",a=1),"separator"===t[t.length-1].type&&(s+="bottom ",i-=1);for(let e=a;e0?"left ":"",s+=p[p.length-1].length>0?"right ":"";for(let e=1;e-1?"alignat":"align",o="split"===e.envName,i=Nn(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:Bn(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display");let s,l=0;const c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){let e="";for(let n=0;n0&&p&&(r=1),n[e]={type:"align",align:t,pregap:r,postgap:0}}return i.colSeparationType=p?"align":"alignat",i};kn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){const n=(Mt(t[0])?[t[0]]:It(t[0],"ordgroup").body).map(function(e){const t=Tt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+t,e)}),a={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Nn(e.parser,a,zn(e.envName))},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let n="c";const a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),n=t.fetch().text,-1==="lcr".indexOf(n))throw new r("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),a.cols=[{type:"align",align:n}]}}const o=Nn(e.parser,a,zn(e.envName)),i=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(i).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=Nn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){const n=(Mt(t[0])?[t[0]]:It(t[0],"ordgroup").body).map(function(e){const t=Tt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new r("Unknown column alignment: "+t,e)});if(n.length>1)throw new r("{subarray} can contain only one column");let a={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Nn(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new r("{subarray} can contain only one column");return a},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=Nn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},zn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Dn,htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){l.contains(["gather","gather*"],e.envName)&&Mn(e);const t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Bn(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Nn(e.parser,t,"display")},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Dn,htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Mn(e);const t={autoTag:Bn(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Nn(e.parser,t,"display")},htmlBuilder:On,mathmlBuilder:Rn}),kn({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Mn(e),function(e){const t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new r("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let n=[];const a=[n];for(let s=0;s-1);else{if(!("<>AV".indexOf(a)>-1))throw new r('Expected one of "<>AV=|." after @',l[t]);for(let e=0;e<2;e++){let n=!0;for(let c=t+1;c{const n=e.font,r=t.withFont(n);return it(e.body,r)},qn=(e,t)=>{const n=e.font,r=t.withFont(n);return yt(e.body,r)},jn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ue({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{let{parser:n,funcName:r}=e;const a=Ve(t[0]);let o=r;return o in jn&&(o=jn[o]),{type:"font",mode:n.mode,font:o.slice(1),body:a}},htmlBuilder:Hn,mathmlBuilder:qn}),Ue({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{let{parser:n}=e;const r=t[0],a=l.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Pt(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:a}}}),Ue({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{parser:n,funcName:r,breakOnTokenText:a}=e;const{mode:o}=n,i=n.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:i}}},htmlBuilder:Hn,mathmlBuilder:qn});const Qn=(e,t)=>{let n=t;return"display"===e?n=n.id>=w.SCRIPT.id?n.text():w.DISPLAY:"text"===e&&n.size===w.DISPLAY.size?n=w.TEXT:"script"===e?n=w.SCRIPT:"scriptscript"===e&&(n=w.SCRIPTSCRIPT),n},Fn=(e,t)=>{const n=Qn(e.size,t.style),r=n.fracNum(),a=n.fracDen();let o;o=t.havingStyle(r);const i=it(e.numer,o,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,n=3.5/t.fontMetrics().ptPerEm;i.height=i.height0?3*p:7*p,m=t.fontMetrics().denom1):(c>0?(d=t.fontMetrics().num2,u=p):(d=t.fontMetrics().num3,u=3*p),m=t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight;d-i.depth-(e+.5*c){let n=new ut.MathNode("mfrac",[yt(e.numer,t),yt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const r=q(e.barSize,t);n.setAttribute("linethickness",j(r))}}else n.setAttribute("linethickness","0px");const r=Qn(e.size,t.style);if(r.size!==t.style.size){n=new ut.MathNode("mstyle",[n]);const e=r.size===w.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",e),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const n=new ut.MathNode("mo",[new ut.TextNode(e.leftDelim.replace("\\",""))]);n.setAttribute("fence","true"),t.push(n)}if(t.push(n),null!=e.rightDelim){const n=new ut.MathNode("mo",[new ut.TextNode(e.rightDelim.replace("\\",""))]);n.setAttribute("fence","true"),t.push(n)}return ht(t)}return n};Ue({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{let{parser:n,funcName:r}=e;const a=t[0],o=t[1];let i,s=null,l=null,c="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,s="(",l=")";break;case"\\\\bracefrac":i=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:n.mode,continued:!1,numer:a,denom:o,hasBarLine:i,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:Fn,mathmlBuilder:Gn}),Ue({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{let{parser:n,funcName:r}=e;const a=t[0],o=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:a,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Ue({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:n,funcName:r,token:a}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:a}}});const Jn=["display","text","script","scriptscript"],Un=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};Ue({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){let{parser:n}=e;const r=t[4],a=t[5],o=Ve(t[0]),i="atom"===o.type&&"open"===o.family?Un(o.text):null,s=Ve(t[1]),l="atom"===s.type&&"close"===s.family?Un(s.text):null,c=It(t[2],"size");let p,d=null;c.isBlank?p=!0:(d=c.value,p=d.number>0);let u="auto",m=t[3];if("ordgroup"===m.type){if(m.body.length>0){const e=It(m.body[0],"textord");u=Jn[Number(e.text)]}}else m=It(m,"textord"),u=Jn[Number(m.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:p,barSize:d,leftDelim:i,rightDelim:l,size:u}},htmlBuilder:Fn,mathmlBuilder:Gn}),Ue({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){let{parser:n,funcName:r,token:a}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:It(t[0],"size").value,token:a}}}),Ue({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{let{parser:n,funcName:r}=e;const a=t[0],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(It(t[1],"infix").size),i=t[2],s=o.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Fn,mathmlBuilder:Gn});const Yn=(e,t)=>{const n=t.style;let r,a;"supsub"===e.type?(r=e.sup?it(e.sup,t.havingStyle(n.sup()),t):it(e.sub,t.havingStyle(n.sub()),t),a=It(e.base,"horizBrace")):a=It(e,"horizBrace");const o=it(a.base,t.havingBaseStyle(w.DISPLAY)),i=Ct(a,t);let s;if(a.isOver?(s=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:i}]},t),s.children[0].children[0].children[1].classes.push("svg-align")):(s=De.makeVList({positionType:"bottom",positionData:o.depth+.1+i.height,children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o}]},t),s.children[0].children[0].children[0].classes.push("svg-align")),r){const e=De.makeSpan(["mord",a.isOver?"mover":"munder"],[s],t);s=a.isOver?De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:r}]},t):De.makeVList({positionType:"bottom",positionData:e.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return De.makeSpan(["mord",a.isOver?"mover":"munder"],[s],t)};Ue({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){let{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Yn,mathmlBuilder:(e,t)=>{const n=St(e.label);return new ut.MathNode(e.isOver?"mover":"munder",[yt(e.base,t),n])}}),Ue({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{let{parser:n}=e;const r=t[1],a=It(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Xe(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{const n=et(e.body,t,!1);return De.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{let n=vt(e.body,t);return n instanceof pt||(n=new pt("mrow",[n])),n.setAttribute("href",e.href),n}}),Ue({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{let{parser:n}=e;const r=It(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");const a=[];for(let e=0;enew ut.MathNode("mrow",bt(e.body,t))}),Ue({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{let{parser:n,funcName:a,token:o}=e;const i=It(t[0],"raw").string,s=t[1];let l;n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");const c={};switch(a){case"\\htmlClass":c.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{const e=i.split(",");for(let t=0;t{const n=et(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));const a=De.makeSpan(r,n,t);for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&a.setAttribute(t,e.attributes[t]);return a},mathmlBuilder:(e,t)=>vt(e.body,t)}),Ue({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{let{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Xe(t[0]),mathml:Xe(t[1])}},htmlBuilder:(e,t)=>{const n=et(e.html,t,!1);return De.makeFragment(n)},mathmlBuilder:(e,t)=>vt(e.mathml,t)});const Vn=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new r("Invalid size: '"+e+"' in \\includegraphics");const n={number:+(t[1]+t[2]),unit:t[3]};if(!H(n))throw new r("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n}};Ue({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{let{parser:a}=e,o={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(n[0]){const e=It(n[0],"raw").string.split(",");for(let t=0;t{const n=q(e.height,t);let r=0;e.totalheight.number>0&&(r=q(e.totalheight,t)-n);let a=0;e.width.number>0&&(a=q(e.width,t));const o={height:j(n+r)};a>0&&(o.width=j(a)),r>0&&(o.verticalAlign=j(-r));const i=new X(e.src,e.alt,o);return i.height=n,i.depth=r,i},mathmlBuilder:(e,t)=>{const n=new ut.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);const r=q(e.height,t);let a=0;if(e.totalheight.number>0&&(a=q(e.totalheight,t)-r,n.setAttribute("valign",j(-a))),n.setAttribute("height",j(r+a)),e.width.number>0){const r=q(e.width,t);n.setAttribute("width",j(r))}return n.setAttribute("src",e.src),n}}),Ue({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){let{parser:n,funcName:r}=e;const a=It(t[0],"size");if(n.settings.strict){const e="m"===r[1],t="mu"===a.value.unit;e?(t||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+a.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):t&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder:(e,t)=>De.makeGlue(e.dimension,t),mathmlBuilder(e,t){const n=q(e.dimension,t);return new ut.SpaceNode(n)}}),Ue({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:n,funcName:r}=e;const a=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(e,t)=>{let n;"clap"===e.alignment?(n=De.makeSpan([],[it(e.body,t)]),n=De.makeSpan(["inner"],[n],t)):n=De.makeSpan(["inner"],[it(e.body,t)]);const r=De.makeSpan(["fix"],[]);let a=De.makeSpan([e.alignment],[n,r],t);const o=De.makeSpan(["strut"]);return o.style.height=j(a.height+a.depth),a.depth&&(o.style.verticalAlign=j(-a.depth)),a.children.unshift(o),a=De.makeSpan(["thinbox"],[a],t),De.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{const n=new ut.MathNode("mpadded",[yt(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",t+"width")}return n.setAttribute("width","0px"),n}}),Ue({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){let{funcName:n,parser:r}=e;const a=r.mode;r.switchMode("math");const o="\\("===n?"\\)":"$",i=r.parseExpression(!1,o);return r.expect(o),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",body:i}}}),Ue({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new r("Mismatched "+e.funcName)}});const Xn=(e,t)=>{switch(t.style.size){case w.DISPLAY.size:return e.display;case w.TEXT.size:return e.text;case w.SCRIPT.size:return e.script;case w.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ue({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{let{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Xe(t[0]),text:Xe(t[1]),script:Xe(t[2]),scriptscript:Xe(t[3])}},htmlBuilder:(e,t)=>{const n=Xn(e,t),r=et(n,t,!1);return De.makeFragment(r)},mathmlBuilder:(e,t)=>{const n=Xn(e,t);return vt(n,t)}});const Kn=(e,t,n,r,a,o,i)=>{e=De.makeSpan([],[e]);const s=n&&l.isCharacterBox(n);let c,p,d;if(t){const e=it(t,r.havingStyle(a.sup()),r);p={elem:e,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-e.depth)}}if(n){const e=it(n,r.havingStyle(a.sub()),r);c={elem:e,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-e.height)}}if(p&&c){const t=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+i;d=De.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:j(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:j(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(c){const t=e.height-i;d=De.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:j(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e}]},r)}else{if(!p)return e;{const t=e.depth+i;d=De.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:j(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}}const u=[d];if(c&&0!==o&&!s){const e=De.makeSpan(["mspace"],[],r);e.style.marginRight=j(o),u.unshift(e)}return De.makeSpan(["mop","op-limits"],u,r)},Zn=["\\smallint"],Wn=(e,t)=>{let n,r,a,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,a=It(e.base,"op"),o=!0):a=It(e,"op");const i=t.style;let s,c=!1;if(i.size===w.DISPLAY.size&&a.symbol&&!l.contains(Zn,a.name)&&(c=!0),a.symbol){const e=c?"Size2-Regular":"Size1-Regular";let n="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(n=a.name.slice(1),a.name="oiint"===n?"\\iint":"\\iiint"),s=De.makeSymbol(a.name,e,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),n.length>0){const e=s.italic,r=De.staticSvg(n+"Size"+(c?"2":"1"),t);s=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:r,shift:c?.08:0}]},t),a.name="\\"+n,s.classes.unshift("mop"),s.italic=e}}else if(a.body){const e=et(a.body,t,!0);1===e.length&&e[0]instanceof Z?(s=e[0],s.classes[0]="mop"):s=De.makeSpan(["mop"],e,t)}else{const e=[];for(let n=1;n{let n;if(e.symbol)n=new pt("mo",[mt(e.name,e.mode)]),l.contains(Zn,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new pt("mo",bt(e.body,t));else{n=new pt("mi",[new dt(e.name.slice(1))]);const t=new pt("mo",[mt("⁡","text")]);n=e.parentIsSupSub?new pt("mrow",[n,t]):ct([n,t])}return n},$n={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ue({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:n,funcName:r}=e,a=r;return 1===a.length&&(a=$n[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Wn,mathmlBuilder:_n}),Ue({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{let{parser:n}=e;const r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Xe(r)}},htmlBuilder:Wn,mathmlBuilder:_n});const er={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ue({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){let{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Wn,mathmlBuilder:_n}),Ue({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){let{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Wn,mathmlBuilder:_n}),Ue({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=er[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Wn,mathmlBuilder:_n});const tr=(e,t)=>{let n,r,a,o,i=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,a=It(e.base,"operatorname"),i=!0):a=It(e,"operatorname"),a.body.length>0){const e=a.body.map(e=>{const t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),n=et(e,t.withFont("mathrm"),!0);for(let e=0;e{let{parser:n,funcName:r}=e;const a=t[0];return{type:"operatorname",mode:n.mode,body:Xe(a),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:tr,mathmlBuilder:(e,t)=>{let n=bt(e.body,t.withFont("mathrm")),r=!0;for(let e=0;ee.toText()).join("");n=[new ut.TextNode(e)]}const a=new ut.MathNode("mi",n);a.setAttribute("mathvariant","normal");const o=new ut.MathNode("mo",[mt("⁡","text")]);return e.parentIsSupSub?new ut.MathNode("mrow",[a,o]):ut.newDocumentFragment([a,o])}}),Sn("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ye({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?De.makeFragment(et(e.body,t,!1)):De.makeSpan(["mord"],et(e.body,t,!0),t),mathmlBuilder:(e,t)=>vt(e.body,t,!0)}),Ue({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){let{parser:n}=e;const r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){const n=it(e.body,t.havingCrampedStyle()),r=De.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,o=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]},t);return De.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){const n=new ut.MathNode("mo",[new ut.TextNode("‾")]);n.setAttribute("stretchy","true");const r=new ut.MathNode("mover",[yt(e.body,t),n]);return r.setAttribute("accent","true"),r}}),Ue({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:n}=e;const r=t[0];return{type:"phantom",mode:n.mode,body:Xe(r)}},htmlBuilder:(e,t)=>{const n=et(e.body,t.withPhantom(),!1);return De.makeFragment(n)},mathmlBuilder:(e,t)=>{const n=bt(e.body,t);return new ut.MathNode("mphantom",n)}}),Ue({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:n}=e;const r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{let n=De.makeSpan([],[it(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(let e=0;e{const n=bt(Xe(e.body),t),r=new ut.MathNode("mphantom",n),a=new ut.MathNode("mpadded",[r]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),Ue({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:n}=e;const r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{const n=De.makeSpan(["inner"],[it(e.body,t.withPhantom())]),r=De.makeSpan(["fix"],[]);return De.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{const n=bt(Xe(e.body),t),r=new ut.MathNode("mphantom",n),a=new ut.MathNode("mpadded",[r]);return a.setAttribute("width","0px"),a}}),Ue({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){let{parser:n}=e;const r=It(t[0],"size").value,a=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(e,t){const n=it(e.body,t),r=q(e.dy,t);return De.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){const n=new ut.MathNode("mpadded",[yt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),Ue({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){let{parser:t}=e;return{type:"internal",mode:t.mode}}}),Ue({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){let{parser:r}=e;const a=n[0],o=It(t[0],"size"),i=It(t[1],"size");return{type:"rule",mode:r.mode,shift:a&&It(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){const n=De.makeSpan(["mord","rule"],[],t),r=q(e.width,t),a=q(e.height,t),o=e.shift?q(e.shift,t):0;return n.style.borderRightWidth=j(r),n.style.borderTopWidth=j(a),n.style.bottom=j(o),n.width=r,n.height=a+o,n.depth=-o,n.maxFontSize=1.125*a*t.sizeMultiplier,n},mathmlBuilder(e,t){const n=q(e.width,t),r=q(e.height,t),a=e.shift?q(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new ut.MathNode("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",j(n)),i.setAttribute("height",j(r));const s=new ut.MathNode("mpadded",[i]);return a>=0?s.setAttribute("height",j(a)):(s.setAttribute("height",j(a)),s.setAttribute("depth",j(-a))),s.setAttribute("voffset",j(a)),s}});const rr=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Ue({type:"sizing",names:rr,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{breakOnTokenText:n,funcName:r,parser:a}=e;const o=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:rr.indexOf(r)+1,body:o}},htmlBuilder:(e,t)=>{const n=t.havingSize(e.size);return nr(e.body,n,t)},mathmlBuilder:(e,t)=>{const n=t.havingSize(e.size),r=bt(e.body,n),a=new ut.MathNode("mstyle",r);return a.setAttribute("mathsize",j(n.sizeMultiplier)),a}}),Ue({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{let{parser:r}=e,a=!1,o=!1;const i=n[0]&&It(n[0],"ordgroup");if(i){let e="";for(let t=0;t{const n=De.makeSpan([],[it(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(let e=0;e{const n=new ut.MathNode("mpadded",[yt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),Ue({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){let{parser:r}=e;const a=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:a}},htmlBuilder(e,t){let n=it(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=De.wrapFragment(n,t);const r=t.fontMetrics().defaultRuleThickness;let a=r;t.style.idn.height+n.depth+o&&(o=(o+p-n.height-n.depth)/2);const d=s.height-n.height-o-l;n.style.paddingLeft=j(c);const u=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){const n=t.havingStyle(w.SCRIPTSCRIPT),r=it(e.index,n,t),a=.6*(u.height-u.depth),o=De.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]},t),i=De.makeSpan(["root"],[o]);return De.makeSpan(["mord","sqrt"],[i,u],t)}return De.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){const{body:n,index:r}=e;return r?new ut.MathNode("mroot",[yt(n,t),yt(r,t)]):new ut.MathNode("msqrt",[yt(n,t)])}});const ar={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT};Ue({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){let{breakOnTokenText:n,funcName:r,parser:a}=e;const o=a.parseExpression(!0,n),i=r.slice(1,r.length-5);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){const n=ar[e.style],r=t.havingStyle(n).withFont("");return nr(e.body,r,t)},mathmlBuilder(e,t){const n=ar[e.style],r=t.havingStyle(n),a=bt(e.body,r),o=new ut.MathNode("mstyle",a),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}}),Ye({type:"supsub",htmlBuilder(e,t){const n=function(e,t){const n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===w.DISPLAY.size||n.alwaysHandleSupSub)?Wn:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===w.DISPLAY.size||n.limits)?tr:null:"accent"===n.type?l.isCharacterBox(n.base)?Bt:null:"horizBrace"===n.type&&!e.sub===n.isOver?Yn:null:null}(e,t);if(n)return n(e,t);const{base:r,sup:a,sub:o}=e,i=it(r,t);let s,c;const p=t.fontMetrics();let d=0,u=0;const m=r&&l.isCharacterBox(r);if(a){const e=t.havingStyle(t.style.sup());s=it(a,e,t),m||(d=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(o){const e=t.havingStyle(t.style.sub());c=it(o,e,t),m||(u=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let h;h=t.style===w.DISPLAY?p.sup1:t.style.cramped?p.sup3:p.sup2;const g=t.sizeMultiplier,f=j(.5/p.ptPerEm/g);let b,v=null;if(c){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(i instanceof Z||t)&&(v=j(-i.italic))}if(s&&c){d=Math.max(d,h,s.depth+.25*p.xHeight),u=Math.max(u,p.sub2);const e=4*p.defaultRuleThickness;if(d-s.depth-(c.height-u)0&&(d+=t,u-=t)}b=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:u,marginRight:f,marginLeft:v},{type:"elem",elem:s,shift:-d,marginRight:f}]},t)}else if(c)u=Math.max(u,p.sub1,c.height-.8*p.xHeight),b=De.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:c,marginLeft:v,marginRight:f}]},t);else{if(!s)throw new Error("supsub must have either sup or sub.");d=Math.max(d,h,s.depth+.25*p.xHeight),b=De.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:s,marginRight:f}]},t)}const y=at(i,"right")||"mord";return De.makeSpan([y],[i,De.makeSpan(["msupsub"],[b])],t)},mathmlBuilder(e,t){let n,r,a=!1;e.base&&"horizBrace"===e.base.type&&(r=!!e.sup,r===e.base.isOver&&(a=!0,n=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);const o=[yt(e.base,t)];let i;if(e.sub&&o.push(yt(e.sub,t)),e.sup&&o.push(yt(e.sup,t)),a)i=n?"mover":"munder";else if(e.sub)if(e.sup){const n=e.base;i=n&&"op"===n.type&&n.limits&&t.style===w.DISPLAY||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(t.style===w.DISPLAY||n.limits)?"munderover":"msubsup"}else{const n=e.base;i=n&&"op"===n.type&&n.limits&&(t.style===w.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===w.DISPLAY)?"munder":"msub"}else{const n=e.base;i=n&&"op"===n.type&&n.limits&&(t.style===w.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===w.DISPLAY)?"mover":"msup"}return new ut.MathNode(i,o)}}),Ye({type:"atom",htmlBuilder:(e,t)=>De.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){const n=new ut.MathNode("mo",[mt(e.text,e.mode)]);if("bin"===e.family){const r=gt(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});const or={mi:"italic",mn:"normal",mtext:"normal"};Ye({type:"mathord",htmlBuilder:(e,t)=>De.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){const n=new ut.MathNode("mi",[mt(e.text,e.mode,t)]),r=gt(e,t)||"italic";return r!==or[n.type]&&n.setAttribute("mathvariant",r),n}}),Ye({type:"textord",htmlBuilder:(e,t)=>De.makeOrd(e,t,"textord"),mathmlBuilder(e,t){const n=mt(e.text,e.mode,t),r=gt(e,t)||"normal";let a;return a="text"===e.mode?new ut.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new ut.MathNode("mn",[n]):"\\prime"===e.text?new ut.MathNode("mo",[n]):new ut.MathNode("mi",[n]),r!==or[a.type]&&a.setAttribute("mathvariant",r),a}});const ir={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},sr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ye({type:"spacing",htmlBuilder(e,t){if(sr.hasOwnProperty(e.text)){const n=sr[e.text].className||"";if("text"===e.mode){const r=De.makeOrd(e,t,"textord");return r.classes.push(n),r}return De.makeSpan(["mspace",n],[De.mathsym(e.text,e.mode,t)],t)}if(ir.hasOwnProperty(e.text))return De.makeSpan(["mspace",ir[e.text]],[],t);throw new r('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){let n;if(!sr.hasOwnProperty(e.text)){if(ir.hasOwnProperty(e.text))return new ut.MathNode("mspace");throw new r('Unknown type of space "'+e.text+'"')}return n=new ut.MathNode("mtext",[new ut.TextNode(" ")]),n}});const lr=()=>{const e=new ut.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ye({type:"tag",mathmlBuilder(e,t){const n=new ut.MathNode("mtable",[new ut.MathNode("mtr",[lr(),new ut.MathNode("mtd",[vt(e.body,t)]),lr(),new ut.MathNode("mtd",[vt(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});const cr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},pr={"\\textbf":"textbf","\\textmd":"textmd"},dr={"\\textit":"textit","\\textup":"textup"},ur=(e,t)=>{const n=e.font;return n?cr[n]?t.withTextFontFamily(cr[n]):pr[n]?t.withTextFontWeight(pr[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(dr[n]):t};Ue({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){let{parser:n,funcName:r}=e;const a=t[0];return{type:"text",mode:n.mode,body:Xe(a),font:r}},htmlBuilder(e,t){const n=ur(e,t),r=et(e.body,n,!0);return De.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){const n=ur(e,t);return vt(e.body,n)}}),Ue({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){const n=it(e.body,t),r=De.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,o=De.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]},t);return De.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){const n=new ut.MathNode("mo",[new ut.TextNode("‾")]);n.setAttribute("stretchy","true");const r=new ut.MathNode("munder",[yt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),Ue({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){let{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){const n=it(e.body,t),r=t.fontMetrics().axisHeight,a=.5*(n.height-r-(n.depth+r));return De.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new ut.MathNode("mpadded",[yt(e.body,t)],["vcenter"])}),Ue({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){const n=mr(e),r=[],a=t.havingStyle(t.style.text());for(let t=0;te.body.replace(/ /g,e.star?"␣":" ");var hr=Fe;const gr="[ \r\n\t]",fr="(\\\\[a-zA-Z@]+)"+gr+"*",br="[̀-ͯ]",vr=new RegExp(br+"+$"),yr="("+gr+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+br+"*|[\ud800-\udbff][\udc00-\udfff]"+br+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+fr+"|\\\\[^\ud800-\udfff])";class wr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(yr,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new In("EOF",new Cn(this,t,t));const n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new r("Unexpected character: '"+e[t]+"'",new In(e[t],new Cn(this,t,t+1)));const a=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[a]){const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}return new In(a,new Cn(this,t,this.tokenRegex.lastIndex))}}class xr{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new r("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(let t=0;t0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!t.hasOwnProperty(e)&&(t[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Ar=En;Sn("\\noexpand",function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Sn("\\expandafter",function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Sn("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Sn("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Sn("\\@ifnextchar",function(e){const t=e.consumeArgs(3);e.consumeSpaces();const n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Sn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Sn("\\TextOrMath",function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});const kr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Sn("\\char",function(e){let t,n=e.popToken(),a="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if(n=e.popToken(),"\\"===n.text[0])a=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new r("\\char` missing argument");a=n.text.charCodeAt(0)}else t=10;if(t){if(a=kr[n.text],null==a||a>=t)throw new r("Invalid base-"+t+" digit "+n.text);let o;for(;null!=(o=kr[e.future().text])&&o{let o=e.consumeArg().tokens;if(1!==o.length)throw new r("\\newcommand's first argument must be a macro name");const i=o[0].text,s=e.isDefined(i);if(s&&!t)throw new r("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!s&&!n)throw new r("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");let l=0;if(o=e.consumeArg().tokens,1===o.length&&"["===o[0].text){let t="",n=e.expandNextToken();for(;"]"!==n.text&&"EOF"!==n.text;)t+=n.text,n=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new r("Invalid number of arguments: "+t);l=parseInt(t),o=e.consumeArg().tokens}return s&&a||e.macros.set(i,{tokens:o,numArgs:l}),""};Sn("\\newcommand",e=>Er(e,!1,!0,!1)),Sn("\\renewcommand",e=>Er(e,!0,!1,!1)),Sn("\\providecommand",e=>Er(e,!0,!0,!0)),Sn("\\message",e=>{const t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),Sn("\\errmessage",e=>{const t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),Sn("\\show",e=>{const t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),hr[n],ae.math[n],ae.text[n]),""}),Sn("\\bgroup","{"),Sn("\\egroup","}"),Sn("~","\\nobreakspace"),Sn("\\lq","`"),Sn("\\rq","'"),Sn("\\aa","\\r a"),Sn("\\AA","\\r A"),Sn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Sn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Sn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Sn("ℬ","\\mathscr{B}"),Sn("ℰ","\\mathscr{E}"),Sn("ℱ","\\mathscr{F}"),Sn("ℋ","\\mathscr{H}"),Sn("ℐ","\\mathscr{I}"),Sn("ℒ","\\mathscr{L}"),Sn("ℳ","\\mathscr{M}"),Sn("ℛ","\\mathscr{R}"),Sn("ℭ","\\mathfrak{C}"),Sn("ℌ","\\mathfrak{H}"),Sn("ℨ","\\mathfrak{Z}"),Sn("\\Bbbk","\\Bbb{k}"),Sn("·","\\cdotp"),Sn("\\llap","\\mathllap{\\textrm{#1}}"),Sn("\\rlap","\\mathrlap{\\textrm{#1}}"),Sn("\\clap","\\mathclap{\\textrm{#1}}"),Sn("\\mathstrut","\\vphantom{(}"),Sn("\\underbar","\\underline{\\text{#1}}"),Sn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Sn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Sn("\\ne","\\neq"),Sn("≠","\\neq"),Sn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Sn("∉","\\notin"),Sn("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Sn("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Sn("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Sn("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Sn("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Sn("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Sn("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Sn("⟂","\\perp"),Sn("‼","\\mathclose{!\\mkern-0.8mu!}"),Sn("∌","\\notni"),Sn("⌜","\\ulcorner"),Sn("⌝","\\urcorner"),Sn("⌞","\\llcorner"),Sn("⌟","\\lrcorner"),Sn("©","\\copyright"),Sn("®","\\textregistered"),Sn("️","\\textregistered"),Sn("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Sn("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Sn("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Sn("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Sn("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Sn("⋮","\\vdots"),Sn("\\varGamma","\\mathit{\\Gamma}"),Sn("\\varDelta","\\mathit{\\Delta}"),Sn("\\varTheta","\\mathit{\\Theta}"),Sn("\\varLambda","\\mathit{\\Lambda}"),Sn("\\varXi","\\mathit{\\Xi}"),Sn("\\varPi","\\mathit{\\Pi}"),Sn("\\varSigma","\\mathit{\\Sigma}"),Sn("\\varUpsilon","\\mathit{\\Upsilon}"),Sn("\\varPhi","\\mathit{\\Phi}"),Sn("\\varPsi","\\mathit{\\Psi}"),Sn("\\varOmega","\\mathit{\\Omega}"),Sn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Sn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Sn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Sn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Sn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Sn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Sn("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Sn("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const Sr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Sn("\\dots",function(e){let t="\\dotso";const n=e.expandAfterFuture().text;return n in Sr?t=Sr[n]:("\\not"===n.slice(0,4)||n in ae.math&&l.contains(["bin","rel"],ae.math[n].group))&&(t="\\dotsb"),t});const Cr={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Sn("\\dotso",function(e){return e.future().text in Cr?"\\ldots\\,":"\\ldots"}),Sn("\\dotsc",function(e){const t=e.future().text;return t in Cr&&","!==t?"\\ldots\\,":"\\ldots"}),Sn("\\cdots",function(e){return e.future().text in Cr?"\\@cdots\\,":"\\@cdots"}),Sn("\\dotsb","\\cdots"),Sn("\\dotsm","\\cdots"),Sn("\\dotsi","\\!\\cdots"),Sn("\\dotsx","\\ldots\\,"),Sn("\\DOTSI","\\relax"),Sn("\\DOTSB","\\relax"),Sn("\\DOTSX","\\relax"),Sn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Sn("\\,","\\tmspace+{3mu}{.1667em}"),Sn("\\thinspace","\\,"),Sn("\\>","\\mskip{4mu}"),Sn("\\:","\\tmspace+{4mu}{.2222em}"),Sn("\\medspace","\\:"),Sn("\\;","\\tmspace+{5mu}{.2777em}"),Sn("\\thickspace","\\;"),Sn("\\!","\\tmspace-{3mu}{.1667em}"),Sn("\\negthinspace","\\!"),Sn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Sn("\\negthickspace","\\tmspace-{5mu}{.277em}"),Sn("\\enspace","\\kern.5em "),Sn("\\enskip","\\hskip.5em\\relax"),Sn("\\quad","\\hskip1em\\relax"),Sn("\\qquad","\\hskip2em\\relax"),Sn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Sn("\\tag@paren","\\tag@literal{({#1})}"),Sn("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Sn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Sn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Sn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Sn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Sn("\\newline","\\\\\\relax"),Sn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Ir=j(C["Main-Regular"]["T".charCodeAt(0)][1]-.7*C["Main-Regular"]["A".charCodeAt(0)][1]);Sn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Ir+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Sn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ir+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Sn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Sn("\\@hspace","\\hskip #1\\relax"),Sn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Sn("\\ordinarycolon",":"),Sn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Sn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Sn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Sn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Sn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Sn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Sn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Sn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Sn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Sn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Sn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Sn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Sn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Sn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Sn("∷","\\dblcolon"),Sn("∹","\\eqcolon"),Sn("≔","\\coloneqq"),Sn("≕","\\eqqcolon"),Sn("⩴","\\Coloneqq"),Sn("\\ratio","\\vcentcolon"),Sn("\\coloncolon","\\dblcolon"),Sn("\\colonequals","\\coloneqq"),Sn("\\coloncolonequals","\\Coloneqq"),Sn("\\equalscolon","\\eqqcolon"),Sn("\\equalscoloncolon","\\Eqqcolon"),Sn("\\colonminus","\\coloneq"),Sn("\\coloncolonminus","\\Coloneq"),Sn("\\minuscolon","\\eqcolon"),Sn("\\minuscoloncolon","\\Eqcolon"),Sn("\\coloncolonapprox","\\Colonapprox"),Sn("\\coloncolonsim","\\Colonsim"),Sn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Sn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Sn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Sn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Sn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Sn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Sn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Sn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Sn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Sn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Sn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Sn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Sn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Sn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Sn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Sn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Sn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Sn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Sn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Sn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Sn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Sn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Sn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Sn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Sn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Sn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Sn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Sn("\\imath","\\html@mathml{\\@imath}{ı}"),Sn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Sn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Sn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Sn("⟦","\\llbracket"),Sn("⟧","\\rrbracket"),Sn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Sn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Sn("⦃","\\lBrace"),Sn("⦄","\\rBrace"),Sn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Sn("⦵","\\minuso"),Sn("\\darr","\\downarrow"),Sn("\\dArr","\\Downarrow"),Sn("\\Darr","\\Downarrow"),Sn("\\lang","\\langle"),Sn("\\rang","\\rangle"),Sn("\\uarr","\\uparrow"),Sn("\\uArr","\\Uparrow"),Sn("\\Uarr","\\Uparrow"),Sn("\\N","\\mathbb{N}"),Sn("\\R","\\mathbb{R}"),Sn("\\Z","\\mathbb{Z}"),Sn("\\alef","\\aleph"),Sn("\\alefsym","\\aleph"),Sn("\\Alpha","\\mathrm{A}"),Sn("\\Beta","\\mathrm{B}"),Sn("\\bull","\\bullet"),Sn("\\Chi","\\mathrm{X}"),Sn("\\clubs","\\clubsuit"),Sn("\\cnums","\\mathbb{C}"),Sn("\\Complex","\\mathbb{C}"),Sn("\\Dagger","\\ddagger"),Sn("\\diamonds","\\diamondsuit"),Sn("\\empty","\\emptyset"),Sn("\\Epsilon","\\mathrm{E}"),Sn("\\Eta","\\mathrm{H}"),Sn("\\exist","\\exists"),Sn("\\harr","\\leftrightarrow"),Sn("\\hArr","\\Leftrightarrow"),Sn("\\Harr","\\Leftrightarrow"),Sn("\\hearts","\\heartsuit"),Sn("\\image","\\Im"),Sn("\\infin","\\infty"),Sn("\\Iota","\\mathrm{I}"),Sn("\\isin","\\in"),Sn("\\Kappa","\\mathrm{K}"),Sn("\\larr","\\leftarrow"),Sn("\\lArr","\\Leftarrow"),Sn("\\Larr","\\Leftarrow"),Sn("\\lrarr","\\leftrightarrow"),Sn("\\lrArr","\\Leftrightarrow"),Sn("\\Lrarr","\\Leftrightarrow"),Sn("\\Mu","\\mathrm{M}"),Sn("\\natnums","\\mathbb{N}"),Sn("\\Nu","\\mathrm{N}"),Sn("\\Omicron","\\mathrm{O}"),Sn("\\plusmn","\\pm"),Sn("\\rarr","\\rightarrow"),Sn("\\rArr","\\Rightarrow"),Sn("\\Rarr","\\Rightarrow"),Sn("\\real","\\Re"),Sn("\\reals","\\mathbb{R}"),Sn("\\Reals","\\mathbb{R}"),Sn("\\Rho","\\mathrm{P}"),Sn("\\sdot","\\cdot"),Sn("\\sect","\\S"),Sn("\\spades","\\spadesuit"),Sn("\\sub","\\subset"),Sn("\\sube","\\subseteq"),Sn("\\supe","\\supseteq"),Sn("\\Tau","\\mathrm{T}"),Sn("\\thetasym","\\vartheta"),Sn("\\weierp","\\wp"),Sn("\\Zeta","\\mathrm{Z}"),Sn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Sn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Sn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Sn("\\bra","\\mathinner{\\langle{#1}|}"),Sn("\\ket","\\mathinner{|{#1}\\rangle}"),Sn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Sn("\\Bra","\\left\\langle#1\\right|"),Sn("\\Ket","\\left|#1\\right\\rangle");const Tr=e=>t=>{const n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();const l=t=>n=>{e&&(n.macros.set("|",i),a.length&&n.macros.set("\\|",s));let o=t;return!t&&a.length&&"|"===n.future().text&&(n.popToken(),o=!0),{tokens:o?a:r,numArgs:0}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));const c=t.consumeArg().tokens,p=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:p.reverse(),numArgs:0}};Sn("\\bra@ket",Tr(!1)),Sn("\\bra@set",Tr(!0)),Sn("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Sn("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Sn("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Sn("\\angln","{\\angl n}"),Sn("\\blue","\\textcolor{##6495ed}{#1}"),Sn("\\orange","\\textcolor{##ffa500}{#1}"),Sn("\\pink","\\textcolor{##ff00af}{#1}"),Sn("\\red","\\textcolor{##df0030}{#1}"),Sn("\\green","\\textcolor{##28ae7b}{#1}"),Sn("\\gray","\\textcolor{gray}{#1}"),Sn("\\purple","\\textcolor{##9d38bd}{#1}"),Sn("\\blueA","\\textcolor{##ccfaff}{#1}"),Sn("\\blueB","\\textcolor{##80f6ff}{#1}"),Sn("\\blueC","\\textcolor{##63d9ea}{#1}"),Sn("\\blueD","\\textcolor{##11accd}{#1}"),Sn("\\blueE","\\textcolor{##0c7f99}{#1}"),Sn("\\tealA","\\textcolor{##94fff5}{#1}"),Sn("\\tealB","\\textcolor{##26edd5}{#1}"),Sn("\\tealC","\\textcolor{##01d1c1}{#1}"),Sn("\\tealD","\\textcolor{##01a995}{#1}"),Sn("\\tealE","\\textcolor{##208170}{#1}"),Sn("\\greenA","\\textcolor{##b6ffb0}{#1}"),Sn("\\greenB","\\textcolor{##8af281}{#1}"),Sn("\\greenC","\\textcolor{##74cf70}{#1}"),Sn("\\greenD","\\textcolor{##1fab54}{#1}"),Sn("\\greenE","\\textcolor{##0d923f}{#1}"),Sn("\\goldA","\\textcolor{##ffd0a9}{#1}"),Sn("\\goldB","\\textcolor{##ffbb71}{#1}"),Sn("\\goldC","\\textcolor{##ff9c39}{#1}"),Sn("\\goldD","\\textcolor{##e07d10}{#1}"),Sn("\\goldE","\\textcolor{##a75a05}{#1}"),Sn("\\redA","\\textcolor{##fca9a9}{#1}"),Sn("\\redB","\\textcolor{##ff8482}{#1}"),Sn("\\redC","\\textcolor{##f9685d}{#1}"),Sn("\\redD","\\textcolor{##e84d39}{#1}"),Sn("\\redE","\\textcolor{##bc2612}{#1}"),Sn("\\maroonA","\\textcolor{##ffbde0}{#1}"),Sn("\\maroonB","\\textcolor{##ff92c6}{#1}"),Sn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Sn("\\maroonD","\\textcolor{##ca337c}{#1}"),Sn("\\maroonE","\\textcolor{##9e034e}{#1}"),Sn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Sn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Sn("\\purpleC","\\textcolor{##aa87ff}{#1}"),Sn("\\purpleD","\\textcolor{##7854ab}{#1}"),Sn("\\purpleE","\\textcolor{##543b78}{#1}"),Sn("\\mintA","\\textcolor{##f5f9e8}{#1}"),Sn("\\mintB","\\textcolor{##edf2df}{#1}"),Sn("\\mintC","\\textcolor{##e0e5cc}{#1}"),Sn("\\grayA","\\textcolor{##f6f7f7}{#1}"),Sn("\\grayB","\\textcolor{##f0f1f2}{#1}"),Sn("\\grayC","\\textcolor{##e3e5e6}{#1}"),Sn("\\grayD","\\textcolor{##d6d8da}{#1}"),Sn("\\grayE","\\textcolor{##babec2}{#1}"),Sn("\\grayF","\\textcolor{##888d93}{#1}"),Sn("\\grayG","\\textcolor{##626569}{#1}"),Sn("\\grayH","\\textcolor{##3b3e40}{#1}"),Sn("\\grayI","\\textcolor{##21242c}{#1}"),Sn("\\kaBlue","\\textcolor{##314453}{#1}"),Sn("\\kaGreen","\\textcolor{##71B307}{#1}");const Mr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Br{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new xr(Ar,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new wr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new In("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){const t=[],n=e&&e.length>0;n||this.consumeSpaces();const a=this.future();let o,i=0,s=0;do{if(o=this.popToken(),t.push(o),"{"===o.text)++i;else if("}"===o.text){if(--i,-1===i)throw new r("Extra }",o)}else if("EOF"===o.text)throw new r("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",o);if(e&&n)if((0===i||1===i&&"{"===e[s])&&o.text===e[s]){if(++s,s===e.length){t.splice(-s,s);break}}else s=0}while(0!==i||n);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:o}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new r("The length of delimiters doesn't match the number of args!");const n=t[0];for(let e=0;ethis.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){const t=this.popToken(),n=t.text,a=t.noexpand?null:this._getExpansion(n);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===n[0]&&!this.isDefined(n))throw new r("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);let o=a.tokens;const i=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){o=o.slice();for(let e=o.length-1;e>=0;--e){let t=o[e];if("#"===t.text){if(0===e)throw new r("Incomplete placeholder at end of macro body",t);if(t=o[--e],"#"===t.text)o.splice(e+1,1);else{if(!/^[1-9]$/.test(t.text))throw new r("Not a valid argument number",t);o.splice(e,2,...i[+t.text-1])}}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new In(e)]):void 0}expandTokens(e){const t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const n="function"==typeof t?t(this):t;if("string"==typeof n){let e=0;if(-1!==n.indexOf("#")){const t=n.replace(/##/g,"");for(;-1!==t.indexOf("#"+(e+1));)++e}const t=new wr(n,this.settings),r=[];let a=t.lex();for(;"EOF"!==a.text;)r.push(a),a=t.lex();return r.reverse(),{tokens:r,numArgs:e}}return n}isDefined(e){return this.macros.has(e)||hr.hasOwnProperty(e)||ae.math.hasOwnProperty(e)||ae.text.hasOwnProperty(e)||Mr.hasOwnProperty(e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:hr.hasOwnProperty(e)&&!hr[e].primitive}}const Nr=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,zr=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Or={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Lr={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Rr{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Br(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new r("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new In("}")),this.gullet.pushTokens(e);const n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){const n=[];for(;;){"math"===this.mode&&this.consumeSpaces();const r=this.fetch();if(-1!==Rr.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&hr[r.text]&&hr[r.text].infix)break;const a=this.parseAtom(t);if(!a)break;"internal"!==a.type&&n.push(a)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){let t,n=-1;for(let a=0;a=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);const n=ae[this.mode][t].group,r=Cn.range(e);let o;if(te.hasOwnProperty(n)){const e=n;o={type:"atom",mode:this.mode,family:e,loc:r,text:t}}else o={type:n,mode:this.mode,loc:r,text:t};a=o}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(k(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),a={type:"textord",mode:"text",loc:Cn.range(e),text:t}}if(this.consume(),n)for(let t=0;t h3 { margin:0 56px 12px 0; font-size:16px; }\n .pta-assist-dialog > button { position:absolute; top:12px; right:12px; }\n .pta-assist-section { margin:12px 0; border:1px solid #e2e8f0; border-radius:10px; padding:12px; }\n .pta-assist-section > h4 { margin:0; color:#4338ca; font-size:13px; }\n .pta-assist-primary { border-left:3px solid #818cf8; background:#f8faff; }\n .pta-assist-sections > small { display:block; color:#64748b; font-size:11px; }\n .pta-assist-rendered strong { color:inherit; background:linear-gradient(transparent 32%,#fef08a 32%,#fef08a 92%,transparent 92%); padding:0 2px; border-radius:2px; }\n @keyframes pta-assist-enter { from { opacity:0; transform:translateY(5px) scale(.98); } to { opacity:1; transform:none; } }\n @media (prefers-reduced-motion:reduce) { .pta-assist-popover { animation:none; } }\n .pta-assist-dialog .pta-assist-rendered { clear:both; padding-top:16px; line-height:1.75; overflow-wrap:anywhere; }\n .pta-assist-rendered p, .pta-assist-rendered li, .pta-assist-rendered blockquote { white-space:pre-wrap; }\n .pta-assist-rendered pre { margin:12px 0; max-height:none; white-space:pre; overflow:auto; }\n .pta-assist-rendered code { font-family:ui-monospace,monospace; background:#f1f5f9; border-radius:4px; padding:2px 4px; }\n .pta-assist-rendered h1,.pta-assist-rendered h2,.pta-assist-rendered h3,.pta-assist-rendered h4 { margin:18px 0 8px; line-height:1.4; }\n .pta-assist-rendered blockquote { margin:12px 0; padding-left:12px; border-left:3px solid #a5b4fc; }\n .pta-assist-rendered math[display="block"] { display:block; overflow-x:auto; padding:12px 0; }\n .pta-assist-plain { white-space:pre-wrap; }\n .pta-assist-math-fallback { white-space:pre-wrap; }\n .pta-assist button:focus-visible, .pta-assist pre:focus-visible { outline:3px solid #818cf8; outline-offset:3px; }\n\n #pta-root{--pta-bg:#fff;--pta-panel:#f8f9fc;--pta-text:#17181c;--pta-muted:#737782;--pta-line:#e7e9ee;--pta-accent:#635bff;--pta-accent-soft:#eeedff;--pta-success:#219653;--pta-warn:#b7791f;position:fixed;right:22px;bottom:22px;z-index:2147483000;font:13px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--pta-text)}\n /* Script-owned scrollbars only: transparent tracks retain the actual panel surface. */\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview){--pta-scroll-thumb:rgba(82,82,91,.64);--pta-scroll-thumb-hover:rgba(63,63,70,.85);--pta-scroll-thumb-active:rgba(39,39,42,.95)}\n html.pta-theme-dark :is(#pta-root,#pta-class-home,#pta-api-diagnostic-preview){--pta-scroll-thumb:rgba(200,200,210,.62);--pta-scroll-thumb-hover:rgba(224,224,230,.82);--pta-scroll-thumb-active:rgba(245,245,245,.95)}\n /* The assistance popover currently has a light surface even in the dark page theme. */\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview),:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *{scrollbar-color:var(--pta-scroll-thumb) transparent}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar{width:12px;height:12px;background:transparent}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-track,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-track{background:transparent;box-shadow:none;border:0}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-track-piece,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-track-piece{background:transparent;box-shadow:none}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-corner,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-corner{background:transparent}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-thumb,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-thumb{background:var(--pta-scroll-thumb);background-clip:padding-box;border:2px solid transparent;border-radius:999px;min-height:28px;min-width:28px}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-thumb:hover,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-thumb:hover{background-color:var(--pta-scroll-thumb-hover)}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-thumb:active,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-thumb:active{background-color:var(--pta-scroll-thumb-active)}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-button,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-button{background-color:transparent}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-resizer,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-resizer{background-color:transparent}\n @media(forced-colors:active){\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview),:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *{scrollbar-color:auto}\n :is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview)::-webkit-scrollbar-thumb,:is(#pta-root,#pta-class-home,.pta-assist-popover,#pta-api-diagnostic-preview) *::-webkit-scrollbar-thumb{background:ButtonText;border-color:Canvas}\n }\n\n /* Both header rules share the home header coordinate; settings text stays lowered. */\n #pta-root{--pta-header-rule-y:62px}\n #pta-root .pta-top{height:var(--pta-header-rule-y);border-bottom-color:var(--pta-line)}\n #pta-root .pta-drawer-head{position:relative;border-bottom:0}\n #pta-root .pta-drawer-head::after{content:"";position:absolute;left:0;right:0;top:calc(var(--pta-header-rule-y) - 1px);border-bottom:1px solid var(--pta-line);pointer-events:none}\n\n /* Symmetric answer-panel insets; short viewports scroll instead of clipping the log. */\n #pta-shell:not(.collapsed){display:flex;flex-direction:column}\n #pta-shell:not(.collapsed)>.pta-top{flex:0 0 auto}\n #pta-root .pta-expanded{flex:1 1 auto;min-height:0;min-width:0;width:100%;max-width:100%;padding:14px;overflow-y:auto;overflow-x:hidden}\n /* Reflow content before suppressing incidental horizontal overflow. */\n #pta-root .pta-drawer-head{height:var(--pta-header-rule-y);min-height:var(--pta-header-rule-y);flex:0 0 var(--pta-header-rule-y);padding:0 14px;min-width:0}\n #pta-root .pta-drawer-title{min-width:0;overflow-wrap:anywhere}\n #pta-root .pta-save-hint{flex:none;white-space:normal;text-align:right}\n #pta-root .pta-drawer-body{flex:1 1 auto;min-height:0;min-width:0;max-width:100%;overflow-y:auto;overflow-x:hidden}\n #pta-root .pta-drawer-body>*{min-width:0;max-width:100%}\n #pta-root .pta-provider-card,#pta-root .pta-field,#pta-root .pta-model-select,#pta-root .pta-dev-collapse,#pta-root .pta-dev-collapse-inner{min-width:0;max-width:100%;overflow-wrap:anywhere}\n #pta-root .pta-provider-card{white-space:normal}\n #pta-root .pta-fixed{gap:8px;flex-wrap:wrap}\n #pta-root .pta-fixed>*{min-width:0;max-width:100%;overflow-wrap:anywhere}\n #pta-root .pta-drawer-actions,#pta-root .pta-range-head{flex-wrap:wrap;gap:8px}\n #pta-root .pta-image-option,#pta-root .pta-range-badge{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.4}\n #pta-root .pta-select-trigger{height:auto;min-height:38px;padding:9px 10px;min-width:0}\n #pta-root .pta-select-value{min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.4}\n #pta-root .pta-select-chevron{flex:none}\n #pta-root .pta-select-menu{max-width:100%;overflow-y:auto;overflow-x:hidden}\n #pta-root .pta-select-option{min-width:0;white-space:normal;overflow-wrap:anywhere}\n #pta-root .pta-log{overflow-y:auto;overflow-x:hidden;overflow-wrap:anywhere}\n #pta-root .pta-log>*{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}\n #pta-api-diagnostic-preview .pta-dev-preview{overflow-y:auto;overflow-x:hidden}\n .pta-dev-preview textarea{white-space:pre-wrap;overflow-wrap:anywhere;overflow-y:auto;overflow-x:hidden}\n\n /* Developer controls: local styles, no changes to recording/export behavior. */\n #pta-root .pta-dev-options{margin-top:16px;border:1px solid var(--pta-line);border-radius:12px;overflow:hidden;background:var(--pta-panel)}\n #pta-root .pta-dev-options>summary{padding:12px;min-height:44px;font-size:12px;font-weight:650;color:var(--pta-text);cursor:pointer;user-select:none}\n #pta-root .pta-dev-options>summary::marker{color:var(--pta-muted)}\n #pta-root .pta-dev-options>summary:hover{background:var(--pta-accent-soft)}\n #pta-root .pta-dev-options[open]>summary{border-bottom:1px solid var(--pta-line)}\n #pta-root .pta-dev-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .18s ease}\n #pta-root .pta-dev-collapse-inner{min-height:0;overflow:hidden}\n #pta-root .pta-dev-options[data-dev-expanded="true"]>.pta-dev-collapse{grid-template-rows:1fr;opacity:1}\n #pta-root .pta-dev-options:not([data-dev-expanded])[open]>.pta-dev-collapse{grid-template-rows:1fr;opacity:1}\n @media(prefers-reduced-motion:reduce){#pta-root .pta-dev-collapse{transition:none}}\n #pta-root .pta-dev-card{margin:10px;padding:12px;border:1px solid var(--pta-line);border-radius:10px;background:var(--pta-bg);min-width:0}\n #pta-root .pta-dev-card .pta-dev-toggle{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:36px;margin:0;font-size:12px;color:var(--pta-text);cursor:pointer}\n #pta-root .pta-dev-toggle input[type=checkbox]{appearance:auto;flex:0 0 auto;width:16px;height:16px;margin:0;padding:0;accent-color:var(--pta-accent);box-shadow:none;cursor:pointer}\n #pta-root .pta-dev-status{display:block;margin:4px 0 12px 25px;font-size:11px;line-height:1.6;color:var(--pta-muted);overflow-wrap:anywhere}\n #pta-root .pta-dev-actions{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px}\n #pta-root .pta-dev-btn,.pta-dev-preview .pta-dev-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:44px;padding:8px 12px;border:1px solid var(--pta-line,#e7e9ee);border-radius:8px;background:var(--pta-bg,#fff);color:var(--pta-text,#17181c);font:600 12px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;text-align:center;white-space:normal;overflow-wrap:anywhere;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}\n #pta-root .pta-dev-btn-primary,.pta-dev-preview .pta-dev-btn-primary{background:var(--pta-accent-soft,#eeedff);border-color:var(--pta-accent,#635bff);color:var(--pta-accent,#635bff)}\n #pta-root .pta-dev-btn:not(:disabled):hover,.pta-dev-preview .pta-dev-btn:not(:disabled):hover{background:var(--pta-accent-soft,#eeedff);border-color:var(--pta-accent,#635bff);color:var(--pta-accent,#635bff)}\n #pta-root .pta-dev-btn-primary:not(:disabled):hover,.pta-dev-preview .pta-dev-btn-primary:not(:disabled):hover{background:var(--pta-accent,#635bff);color:#fff}\n #pta-root .pta-dev-btn-clear:not(:disabled):hover{border-color:#b42318;background:#fff1f0;color:#b42318}\n #pta-root .pta-dev-options>summary:focus-visible,#pta-root .pta-dev-btn:focus-visible,#pta-root .pta-dev-toggle input:focus-visible,.pta-dev-preview .pta-dev-btn:focus-visible,.pta-dev-preview textarea:focus-visible{outline:2px solid var(--pta-accent,#635bff);outline-offset:3px}\n #pta-root .pta-dev-options>summary:focus-visible{outline-offset:-4px}\n #pta-root .pta-dev-btn:disabled,.pta-dev-preview .pta-dev-btn:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}\n #pta-root .pta-dev-btn:not(:disabled):active,.pta-dev-preview .pta-dev-btn:not(:disabled):active{filter:brightness(.94)}\n html.pta-theme-dark #pta-root .pta-dev-btn-clear:not(:disabled):hover{background:#492522;border-color:#fda29b;color:#fda29b}\n html.pta-theme-dark #pta-root .pta-dev-btn-primary:not(:disabled):hover{color:#111}\n .pta-dev-preview{--pta-bg:#fff;--pta-text:#17181c;--pta-line:#e7e9ee;--pta-accent:#111;--pta-accent-soft:rgba(0,0,0,.07);background:#fff;color:#17181c;padding:20px;border:1px solid #e7e9ee;border-radius:14px;width:min(90vw,800px);max-height:90vh;overflow:auto;box-sizing:border-box;font:13px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}\n .pta-dev-preview h3{margin:0 0 12px;font-size:16px}\n .pta-dev-preview textarea{display:block;width:100%;height:55vh;max-height:60vh;box-sizing:border-box;resize:vertical;padding:12px;border:1px solid #d4d7df;border-radius:8px;background:#f8f9fc;color:inherit;font:12px/1.6 ui-monospace,monospace}\n .pta-dev-preview .pta-dev-btn{margin:12px 8px 0 0}\n html.pta-theme-dark .pta-dev-preview{--pta-bg:#202127;--pta-text:#f5f5f5;--pta-line:#41424a;--pta-accent:#f5f5f5;--pta-accent-soft:rgba(255,255,255,.1);background:var(--pta-bg);color:var(--pta-text);border-color:var(--pta-line)}\n html.pta-theme-dark .pta-dev-preview textarea{background:#17181d;border-color:var(--pta-line)}\n html.pta-theme-dark .pta-dev-preview .pta-dev-btn-primary:not(:disabled):hover{color:#17181c}\n @media(max-width:380px){#pta-root .pta-dev-card{margin:8px;padding:10px}#pta-root .pta-dev-actions{gap:6px}#pta-root .pta-dev-btn{padding:8px 6px}.pta-dev-preview{padding:14px}}\n @media(prefers-reduced-motion:reduce){#pta-root .pta-dev-btn,.pta-dev-preview .pta-dev-btn{transition:none}}\n\n .pta-platform-link{color:var(--pta-text);font-weight:600;font-size:11px;text-align:right;overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:2px}.pta-platform-link:hover{color:var(--pta-accent)}.pta-platform-link:focus-visible{outline:2px solid var(--pta-accent);outline-offset:3px;border-radius:2px}\n /* The answer controls stay mounted below an independent pull-down catalogue. */\n #pta-root .pta-expanded.pta-answer-home-host{position:relative}\n #pta-home-pull{--pta-pull-surface:#fff;--pta-pull-handle:#f8f9fc;position:absolute;left:0;right:0;top:0;bottom:0;z-index:12;display:flex;flex-direction:column;pointer-events:none;transform:translateY(calc(-100% + 20px));transition:transform .3s cubic-bezier(.2,.8,.2,1)}\n #pta-home-pull.open{transform:translateY(0)}\n html.pta-theme-dark #pta-home-pull{--pta-pull-surface:#18181a;--pta-pull-handle:#242428}\n #pta-shell.collapsed #pta-home-pull{visibility:hidden;pointer-events:none}\n #pta-home-pull[hidden]{display:none!important}\n #pta-home-pull .pta-home-pull-fold{display:block;height:calc(100% - 20px);min-height:0;flex:none;overflow:hidden;pointer-events:none}\n #pta-home-pull.open .pta-home-pull-fold{pointer-events:auto}\n #pta-home-pull .pta-home-pull-inner{height:100%;min-height:0;overflow:hidden;background:var(--pta-pull-surface);border-radius:0 0 14px 14px;box-shadow:0 10px 18px #0002}\n #pta-home-pull #pta-class-home{height:100%;min-height:0;max-height:none;background:var(--pta-pull-surface);overflow:auto;padding:12px 14px;overscroll-behavior:contain}\n #pta-root #pta-home-pull-handle{position:relative;display:block;width:2em;height:20px;flex:none;margin:0 auto;padding:0;border:0;background:transparent;color:var(--pta-text);font:600 14px/1 sans-serif;cursor:pointer;pointer-events:auto;filter:drop-shadow(0 3px 3px #0004)}\n #pta-home-pull-handle svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.62;transition:opacity .15s ease}\n #pta-root #pta-home-pull-handle:hover svg,#pta-root #pta-home-pull-handle:focus-visible svg{opacity:1}\n #pta-home-pull-handle path{fill:var(--pta-pull-handle);stroke:var(--pta-line);stroke-width:1}\n #pta-home-pull-handle span{position:relative;display:block;padding-bottom:3px}\n #pta-root #pta-home-pull-handle:focus-visible{outline:2px solid var(--pta-accent);outline-offset:2px;border-radius:8px}\n #pta-root #pta-home-pull-handle:hover path{fill:var(--pta-accent-soft)}\n #pta-root .pta-top-actions .pta-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-width:32px;padding:0;border:1px solid var(--pta-line);border-radius:9px;background:var(--pta-panel);line-height:1;flex:none}\n #pta-root .pta-drawer{z-index:30}\n #pta-root #pta-drawer-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-width:32px;padding:0;border:1px solid var(--pta-line);border-radius:9px;background:var(--pta-panel);font-size:20px;line-height:1;flex:none}\n #pta-root .pta-top-actions .pta-icon-btn:focus-visible,#pta-root #pta-drawer-close:focus-visible{outline:2px solid var(--pta-accent);outline-offset:2px}\n @media(prefers-reduced-motion:reduce){#pta-home-pull{transition:none}}\n #pta-root *{box-sizing:border-box}#pta-shell{position:relative;z-index:2;width:390px;height:554px;max-height:calc(100vh - 44px);border:1px solid rgba(20,24,40,.12);border-radius:18px;background:var(--pta-bg);box-shadow:0 18px 55px rgba(22,24,40,.18),0 3px 12px rgba(22,24,40,.08);overflow:hidden;transition:width .72s cubic-bezier(.16,1,.3,1),height .72s cubic-bezier(.16,1,.3,1),border-radius .72s cubic-bezier(.16,1,.3,1)}\n #pta-shell.collapsed{width:58px;height:58px;border-radius:19px;cursor:pointer;opacity:.7}\n #pta-tw-ready{position:absolute;top:-3px;right:-3px;width:10px;height:10px;border-radius:50%;background:#219653;opacity:0;transition:opacity .3s ease;box-shadow:0 0 0 2px #fff}\n #pta-root.tw-ready #pta-tw-ready{opacity:.85}\n .pta-aura{position:absolute;right:0;bottom:0;width:58px;height:58px;border-radius:19px;pointer-events:none;z-index:1;opacity:0;visibility:hidden;transition:none;display:flex;align-items:center;justify-content:center}\n #pta-shell.collapsed.running + .pta-aura,#pta-root.running #pta-shell.collapsed + .pta-aura{opacity:1;visibility:visible;transition:opacity .3s ease .72s,visibility 0s linear .72s}\n .pta-aura-ambient{position:absolute;left:50%;top:50%;margin-left:-42px;margin-top:-42px;width:84px;height:84px;border-radius:50%;background:radial-gradient(circle at center,rgba(245,180,0,.3) 0%,rgba(99,91,255,.18) 45%,transparent 70%);filter:blur(16px);animation:pta-ambient-breathe 3.6s ease-in-out infinite alternate}\n .pta-aura-disc{position:absolute;left:50%;top:50%;margin-left:-46px;margin-top:-46px;width:92px;height:92px;border-radius:50%;background:conic-gradient(from 0deg,rgba(245,175,0,.82) 0deg,rgba(235,95,30,.7) 60deg,rgba(99,91,255,.82) 135deg,rgba(14,165,233,.75) 220deg,rgba(16,185,129,.68) 285deg,rgba(245,175,0,.82) 360deg);filter:blur(15px);opacity:.78;animation:pta-orb-spin 6.5s linear infinite,pta-orb-morph 9s ease-in-out infinite alternate;will-change:transform,filter}\n /* Keep PAS glyphs stationary: text clipping on transformed children can leave displaced glyphs. */\n #pta-shell.collapsed .pta-drawer{visibility:hidden!important;pointer-events:none!important}\n #pta-shell.collapsed{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}\n html.pta-theme-dark #pta-shell.collapsed{background:#18181a;backdrop-filter:none;-webkit-backdrop-filter:none}\n html.pta-theme-dark .pta-aura-ambient{background:radial-gradient(circle at center,rgba(255,200,50,.32) 0%,rgba(138,120,255,.2) 45%,transparent 70%);filter:blur(16px)}\n html.pta-theme-dark .pta-aura-disc{background:conic-gradient(from 0deg,rgba(255,204,0,.88) 0deg,rgba(255,136,0,.75) 55deg,rgba(155,89,255,.82) 130deg,rgba(56,189,248,.78) 215deg,rgba(52,211,153,.72) 280deg,rgba(255,204,0,.88) 360deg);filter:blur(14px);opacity:.85}\n @keyframes pta-orb-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}\n @keyframes pta-orb-morph{0%{filter:blur(13px) hue-rotate(0deg)}50%{filter:blur(16px) hue-rotate(75deg)}100%{filter:blur(13px) hue-rotate(150deg)}}\n @keyframes pta-ambient-breathe{0%{opacity:.3;transform:scale(.92)}100%{opacity:.65;transform:scale(1.08)}}\n /* Answer panel: no outer scrollbar; retain scrolling for short/zoomed viewports.\n The log keeps its own visible scrollbar. Catalogue and settings are excluded. */\n #pta-root .pta-expanded.pta-catalog-mode{display:flex;flex-direction:column;overflow:hidden}\n #pta-root .pta-expanded:not(.pta-catalog-mode){scrollbar-width:none}\n #pta-root .pta-expanded:not(.pta-catalog-mode)::-webkit-scrollbar{display:none;width:0;height:0}\n #pta-shell.collapsed .pta-top{height:58px;padding:0;border-bottom:0;background:transparent}#pta-shell.collapsed .pta-expanded{opacity:0;pointer-events:none;visibility:hidden;transition:opacity .28s ease,visibility 0s linear .28s}#pta-shell.collapsed .pta-brand{padding:0;justify-content:center;align-items:center;gap:0;width:100%;height:100%}#pta-shell.collapsed .pta-brand-copy{align-items:center;justify-content:center;width:100%;height:100%;text-align:center}#pta-shell.collapsed .pta-brand-meta{display:none;opacity:0;max-height:0}#pta-shell.collapsed .pta-top-actions{display:none}\n /* Own the decorative header box model before PTA\'s asynchronous CSS arrives.\n Never interpolate host border/outline defaults via transition:all. */\n #pta-root .pta-brand,#pta-root .pta-brand-copy,#pta-root .pta-brand-title,#pta-root .pta-brand-meta,#pta-root .pta-pas-letter,#pta-root .pta-pas-rest,#pta-root .pta-pas-space{border:0;outline:0;box-shadow:none}\n .pta-top{height:62px;display:flex;align-items:center;padding:0 14px;border-bottom:1px solid var(--pta-line);background:linear-gradient(135deg,#fff 0%,#f7f7ff 100%);transition:padding .72s cubic-bezier(.16,1,.3,1),height .72s cubic-bezier(.16,1,.3,1);cursor:move;user-select:none}.pta-brand{display:flex;align-items:center;gap:0;flex:1;min-width:0;height:100%;transition:width .72s cubic-bezier(.16,1,.3,1),padding .72s cubic-bezier(.16,1,.3,1),gap .72s cubic-bezier(.16,1,.3,1)}.pta-brand-copy{min-width:0;display:flex;flex-direction:column;justify-content:center;transition:width .72s cubic-bezier(.16,1,.3,1),height .72s cubic-bezier(.16,1,.3,1)}.pta-brand-title{font-weight:700;font-size:13px;letter-spacing:-.2px;color:var(--pta-text);display:flex;align-items:center;white-space:nowrap;line-height:1.2;transition:font-size .72s cubic-bezier(.16,1,.3,1),font-weight .72s ease,letter-spacing .72s ease,transform .25s ease}#pta-shell.collapsed .pta-brand-title{font-size:14px;font-weight:800;letter-spacing:1px;justify-content:center}#pta-shell.collapsed:hover .pta-brand-title{transform:scale(1.08)}.pta-pas-letter{display:inline-block;font-weight:inherit;font-size:inherit;transition:font-size .72s cubic-bezier(.16,1,.3,1),font-weight .72s cubic-bezier(.16,1,.3,1)}.pta-pas-rest{display:inline-block;max-width:55px;opacity:1;overflow:hidden;white-space:nowrap;vertical-align:bottom;transition:max-width .72s cubic-bezier(.16,1,.3,1),opacity .38s ease}#pta-shell.collapsed .pta-pas-rest{max-width:0;opacity:0;margin:0;padding:0}.pta-pas-space{display:inline-block;width:3px;max-width:3px;overflow:hidden;transition:width .72s cubic-bezier(.16,1,.3,1),max-width .72s cubic-bezier(.16,1,.3,1),opacity .72s cubic-bezier(.16,1,.3,1)}#pta-shell.collapsed .pta-pas-space{width:0;max-width:0;opacity:0}.pta-brand-meta{font-size:11px;color:var(--pta-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:1;max-height:18px;transition:opacity .28s ease,max-height .72s cubic-bezier(.16,1,.3,1)}.pta-top-actions{display:flex;gap:5px}.pta-icon-btn,.pta-link-btn{border:0;background:transparent;color:var(--pta-muted);cursor:pointer;border-radius:8px;padding:7px;transition:transform .2s ease,background .2s ease,color .2s ease}.pta-icon-btn:hover,.pta-link-btn:hover{background:var(--pta-accent-soft);color:var(--pta-accent);transform:translateY(-1px)}\n .pta-expanded{width:390px;padding:14px;opacity:1;transition:opacity .38s ease .18s}.pta-status{display:flex;align-items:center;gap:8px;padding:10px 11px;border-radius:12px;background:var(--pta-panel);border:1px solid var(--pta-line);margin-bottom:12px}.pta-status-dot{width:8px;height:8px;border-radius:50%;background:var(--pta-muted)}.pta-status-dot.live{background:var(--pta-accent);box-shadow:0 0 0 5px var(--pta-accent-soft);animation:pta-breathe 1.8s ease-in-out infinite}.pta-status-dot.ok{background:var(--pta-success)}.pta-status-text{flex:1}.pta-status-label{font-weight:600}.pta-status-sub{font-size:11px;color:var(--pta-muted);margin-top:1px}.pta-progress{margin:12px 2px 15px}.pta-progress-head{display:flex;justify-content:space-between;color:var(--pta-muted);font-size:11px;margin-bottom:7px}.pta-progress-head strong{color:var(--pta-text);font-weight:600}.pta-progress-track{height:5px;border-radius:99px;background:#eceef3;overflow:hidden}.pta-progress-fill{height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#8178ff,#5149dc);transition:width .38s ease}.pta-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.pta-sub-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.pta-check{display:flex;align-items:center;gap:7px;color:var(--pta-muted);font-size:12px;cursor:pointer}.pta-check input{accent-color:var(--pta-accent)}.pta-primary{width:100%;height:42px;border:0;border-radius:11px;background:var(--pta-accent);color:#fff;font:600 13px inherit;cursor:pointer;box-shadow:0 7px 16px rgba(99,91,255,.23);transition:transform .2s ease,box-shadow .2s ease,background .2s ease}.pta-primary:hover{transform:translateY(-1px);box-shadow:0 10px 19px rgba(99,91,255,.28)}.pta-primary:active{transform:scale(.98)}.pta-primary.stop{background:#d84c5b;box-shadow:0 7px 16px rgba(216,76,91,.2)}.pta-log-head{display:flex;align-items:center;margin:16px 1px 7px;color:var(--pta-muted);font-size:11px}.pta-log-head strong{color:var(--pta-text);font-weight:600;margin-right:5px}.pta-log-clear{margin-left:auto;padding:0}.pta-log{height:108px;border-top:1px solid var(--pta-line);padding-top:5px;overflow:auto;scrollbar-width:thin}.pta-log-item{display:flex;align-items:flex-start;gap:7px;padding:4px 2px;color:var(--pta-muted);font-size:11px;animation:pta-rise .25s ease both}.pta-log-item.success{color:var(--pta-success)}.pta-log-item.warning{color:var(--pta-warn)}.pta-log-dot{width:5px;height:5px;border-radius:50%;background:currentColor;margin-top:6px;flex:0 0 auto}.pta-empty{color:#a4a8b0;padding:10px 2px}.pta-drawer{position:absolute;inset:0;background:var(--pta-bg);transform:translateX(104%);transition:transform .55s cubic-bezier(.16,1,.3,1);display:flex;flex-direction:column}.pta-drawer.open{transform:translateX(0)}.pta-drawer-head{height:62px;display:flex;align-items:center;gap:8px;padding:0 14px;border-bottom:1px solid var(--pta-line)}.pta-drawer-title{font-weight:700;flex:1}.pta-drawer-body{padding:14px;overflow:auto}.pta-tabs{display:grid;grid-template-columns:1fr 1fr;background:var(--pta-panel);border-radius:10px;padding:3px;margin-bottom:15px}.pta-tab{border:0;background:transparent;color:var(--pta-muted);border-radius:8px;padding:8px;cursor:pointer;font:600 12px inherit}.pta-tab.active{background:#fff;color:var(--pta-text);box-shadow:0 1px 4px rgba(22,24,40,.1)}.pta-pane{display:none}.pta-pane.active{display:block;animation:pta-rise .25s ease both}.pta-provider{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}.pta-provider-card{padding:11px;border:1px solid var(--pta-line);border-radius:11px;text-align:left;background:#fff;cursor:pointer;transition:border .2s ease,background .2s ease,transform .2s ease}.pta-provider-card:hover{transform:translateY(-1px)}.pta-provider-card.active{border-color:var(--pta-accent);background:var(--pta-accent-soft)}.pta-provider-name{font-weight:700}.pta-provider-hint{display:block;color:var(--pta-muted);font-size:10px;margin-top:3px}.pta-field{margin:12px 0}.pta-field label{display:block;font-size:11px;font-weight:600;color:var(--pta-muted);margin-bottom:6px}.pta-field input,.pta-field select{width:100%;height:36px;border:1px solid var(--pta-line);border-radius:9px;padding:0 10px;outline:none;background:#fff;color:var(--pta-text);font:12px inherit}.pta-field input:focus,.pta-field select:focus{border-color:var(--pta-accent);box-shadow:0 0 0 3px var(--pta-accent-soft)}.pta-fixed{display:flex;align-items:center;justify-content:space-between;padding:10px 11px;border-radius:10px;background:var(--pta-panel);color:var(--pta-muted);font-size:11px}.pta-fixed strong{color:var(--pta-text);font-weight:600}.pta-save-hint{font-size:11px;color:var(--pta-muted);user-select:none;transition:all .2s ease}.pta-save-hint.saved{color:var(--pta-success);font-weight:600}.pta-provider-desc{font-size:11px;line-height:1.5;color:var(--pta-muted);padding:2px 2px 10px;margin-top:-6px;transition:color .2s ease}.pta-help{font-size:11px;line-height:1.7;color:var(--pta-muted);margin:12px 1px}.pta-switch-row{display:flex;align-items:center;justify-content:space-between;padding:12px;border:1px solid var(--pta-line);border-radius:11px}.pta-switch{position:relative;width:38px;height:22px}.pta-switch input{opacity:0;width:0;height:0}.pta-slider{position:absolute;inset:0;border-radius:99px;background:#d9dce4;cursor:pointer;transition:.2s}.pta-slider:before{content:\'\';position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.2s}.pta-switch input:checked+.pta-slider{background:var(--pta-accent)}.pta-switch input:checked+.pta-slider:before{transform:translateX(16px)}.pta-toast{position:fixed;right:22px;bottom:92px;z-index:2147483001;padding:10px 13px;border-radius:10px;background:#1b1d23;color:#fff;box-shadow:0 8px 25px rgba(0,0,0,.18);animation:pta-toast-in .25s ease both}.pta-toast.out{animation:pta-toast-out .25s ease both}@keyframes pta-breathe{50%{opacity:.55;transform:scale(.85)}}@keyframes pta-rise{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes pta-toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes pta-toast-out{to{opacity:0;transform:translateY(8px)}}\n @media(max-width:600px){#pta-root{right:12px;bottom:12px}#pta-shell{width:min(390px,calc(100vw - 24px));height:min(554px,calc(100vh - 24px))}#pta-shell.collapsed{width:58px;height:58px}.pta-expanded{width:min(390px,calc(100vw - 24px))}}\n #pta-root{--pta-bg:rgba(255,255,255,.84);--pta-panel:rgba(246,246,246,.72);--pta-text:#101010;--pta-muted:#777;--pta-line:rgba(0,0,0,.12);--pta-accent:#111;--pta-accent-soft:rgba(0,0,0,.07);--pta-success:#111;--pta-warn:#444}\n /* Isolate animated geometry from the host document without removing blur, shadows or morphing. */\n #pta-root{contain:layout style}\n #pta-drawer{width:390px;right:auto}\n @media(max-width:600px){#pta-drawer{width:min(390px,calc(100vw - 24px))}}\n #pta-shell,.pta-drawer{background:var(--pta-bg);backdrop-filter:blur(24px) saturate(105%);-webkit-backdrop-filter:blur(24px) saturate(105%)}\n #pta-shell{border-color:rgba(0,0,0,.14);box-shadow:0 22px 65px rgba(0,0,0,.14),0 3px 12px rgba(0,0,0,.06)}\n .pta-top{background:rgba(255,255,255,.58);border-bottom-color:rgba(0,0,0,.1)}\n .pta-primary{background:#111;box-shadow:0 8px 18px rgba(0,0,0,.16)}.pta-progress-fill{background:#111}.pta-primary.stop{background:#444;box-shadow:0 8px 18px rgba(0,0,0,.12)}\n .pta-status{border-color:rgba(0,0,0,.1)}.pta-status-dot.live{background:#111;box-shadow:0 0 0 5px rgba(0,0,0,.08)}\n .pta-provider-card{background:rgba(255,255,255,.4);border-color:rgba(0,0,0,.12);transition:border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.22,1,.36,1)}.pta-provider-card.active{border-color:#111;background:rgba(0,0,0,.06)}.pta-home-language{margin:0 1px 13px;padding:10px 11px;border:1px solid rgba(0,0,0,.1);border-radius:11px;background:rgba(245,245,245,.52)}.pta-home-language-head{display:flex;align-items:center;justify-content:space-between;color:#555;font-size:11px;font-weight:600}.pta-home-language-head span:last-child{color:#888;font-weight:500}.pta-home-language .pta-model-select{margin-top:7px}\n #pta-root .pta-drawer{background:#fff}html.pta-theme-dark #pta-root .pta-drawer{background:#18181a}\n html.pta-theme-dark{color-scheme:dark;background:#101114}html.pta-theme-dark body{background:#101114!important;color:#ededed!important}html.pta-theme-dark body>*:not(#pta-root){filter:invert(1) hue-rotate(180deg)}html.pta-theme-dark body>*:not(#pta-root) img,html.pta-theme-dark body>*:not(#pta-root) video{filter:invert(1) hue-rotate(180deg)}html.pta-theme-dark #pta-root{--pta-bg:rgba(24,24,26,.9);--pta-panel:rgba(42,42,45,.76);--pta-text:#f5f5f5;--pta-muted:#a5a5aa;--pta-line:rgba(255,255,255,.15);--pta-accent:#f5f5f5;--pta-accent-soft:rgba(255,255,255,.1);--pta-success:#f5f5f5;--pta-warn:#d4d4d4}html.pta-theme-dark #pta-shell,html.pta-theme-dark .pta-drawer{background:var(--pta-bg);color:var(--pta-text)}html.pta-theme-dark .pta-top{background:rgba(28,28,30,.72);border-bottom-color:var(--pta-line)}html.pta-theme-dark .pta-status,html.pta-theme-dark .pta-fixed{background:rgba(42,42,45,.64);border-color:var(--pta-line)}html.pta-theme-dark .pta-select-trigger{background:rgba(38,38,41,.78);color:var(--pta-text);border-color:var(--pta-line)}html.pta-theme-dark .pta-select-trigger:hover,html.pta-theme-dark .pta-model-select.open .pta-select-trigger{background:#303034;border-color:#f5f5f5}html.pta-theme-dark .pta-select-menu{background:rgba(32,32,35,.96);border-color:var(--pta-line)}html.pta-theme-dark .pta-select-option{color:#d4d4d8}html.pta-theme-dark .pta-select-option:hover,html.pta-theme-dark .pta-select-option.active{background:#f5f5f5;color:#111}\n html.pta-theme-dark .pta-field input,html.pta-theme-dark .pta-field select{background:rgba(255,255,255,.065);border-color:rgba(255,255,255,.16);color:#f5f5f5;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}html.pta-theme-dark .pta-field input::placeholder{color:#8f8f96}html.pta-theme-dark .pta-field input:focus,html.pta-theme-dark .pta-field select:focus{background:rgba(255,255,255,.1);border-color:#f5f5f5;box-shadow:0 0 0 3px rgba(255,255,255,.1),inset 0 1px 0 rgba(255,255,255,.06)}html.pta-theme-dark .pta-select-trigger{background:rgba(255,255,255,.065);border-color:rgba(255,255,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}html.pta-theme-dark .pta-select-trigger:hover,html.pta-theme-dark .pta-model-select.open .pta-select-trigger{background:rgba(255,255,255,.12);border-color:#f5f5f5;box-shadow:0 0 0 3px rgba(255,255,255,.1),inset 0 1px 0 rgba(255,255,255,.06)}html.pta-theme-dark .pta-select-menu{background:rgba(26,26,29,.97);border-color:rgba(255,255,255,.16);box-shadow:0 18px 38px rgba(0,0,0,.38)}html.pta-theme-dark .pta-select-option{color:#d9d9de}html.pta-theme-dark .pta-select-option:hover,html.pta-theme-dark .pta-select-option.active{background:#f5f5f5;color:#111}html.pta-theme-dark .pta-select-option[aria-disabled="true"]{color:#77777f}html.pta-theme-dark .pta-provider-card{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.14);color:#f5f5f5}html.pta-theme-dark .pta-provider-card.active{background:rgba(255,255,255,.13);border-color:#f5f5f5}html.pta-theme-dark .pta-tabs{background:rgba(255,255,255,.07)}html.pta-theme-dark .pta-tab{color:#aaaab2}html.pta-theme-dark .pta-tab.active{background:#f5f5f5;color:#111;box-shadow:0 1px 6px rgba(0,0,0,.28)}html.pta-theme-dark .pta-save-hint{color:#8c909c}html.pta-theme-dark .pta-save-hint.saved{color:#3dd68c}html.pta-theme-dark .pta-provider-desc{color:#8c909c}html.pta-theme-dark .pta-secondary{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16);color:#f5f5f5}html.pta-theme-dark .pta-secondary:hover{background:#f5f5f5;color:#111}html.pta-theme-dark .pta-home-language{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.14)}html.pta-theme-dark .pta-home-language-head{color:#d0d0d5}html.pta-theme-dark .pta-home-language-head span:last-child{color:#9999a2}\n .pta-check,.pta-image-option{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:0 12px;border:1px solid var(--pta-line);border-radius:999px;background:rgba(255,255,255,.48);color:var(--pta-muted);font-size:11px;line-height:1;cursor:pointer;user-select:none;white-space:nowrap;transition:background .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease,transform .2s ease}.pta-check:hover,.pta-image-option:hover{transform:translateY(-1px);border-color:var(--pta-text);color:var(--pta-text)}.pta-check input,.pta-image-option input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}.pta-check:has(input:checked),.pta-image-option:has(input:checked){background:var(--pta-text);border-color:var(--pta-text);color:var(--pta-bg);box-shadow:0 5px 14px rgba(0,0,0,.12)}.pta-check:has(input:focus-visible),.pta-image-option:has(input:focus-visible){outline:2px solid var(--pta-text);outline-offset:2px}.pta-check:has(input:disabled),.pta-image-option:has(input:disabled){cursor:not-allowed;opacity:.48;transform:none}.pta-image-option{justify-content:flex-start}.pta-image-option:has(input:checked){background:var(--pta-text);color:var(--pta-bg)}html.pta-theme-dark .pta-range-badge{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16);color:#f5f5f5}\n html.pta-theme-dark .pta-range{background:rgba(255,255,255,.16)}\n html.pta-theme-dark .pta-range::-webkit-slider-thumb{background:#f5f5f5;border-color:#1c1d21;box-shadow:0 1px 4px rgba(0,0,0,.6)}\n html.pta-theme-dark .pta-range::-moz-range-thumb{background:#f5f5f5;border-color:#1c1d21;box-shadow:0 1px 4px rgba(0,0,0,.6)}\n html.pta-theme-dark .pta-scale-item strong{color:#f5f5f5}\n html.pta-theme-dark .pta-max-tokens-scale .pta-scale-item.active strong,html.pta-theme-dark .pta-thinking-scale .pta-scale-item.active strong{color:#fff}\n html.pta-theme-dark .pta-max-tokens-scale .pta-scale-item.active span,html.pta-theme-dark .pta-thinking-scale .pta-scale-item.active span{color:#fff}\n html.pta-theme-dark .pta-check,html.pta-theme-dark .pta-image-option{background:rgba(255,255,255,.065);border-color:rgba(255,255,255,.16);color:#aaaab2}html.pta-theme-dark .pta-check:hover,html.pta-theme-dark .pta-image-option:hover{border-color:#f5f5f5;color:#f5f5f5}html.pta-theme-dark .pta-check:has(input:checked),html.pta-theme-dark .pta-image-option:has(input:checked){background:#f5f5f5;border-color:#f5f5f5;color:#111;box-shadow:0 5px 16px rgba(0,0,0,.28)}html.pta-theme-dark .pta-check:has(input:focus-visible),html.pta-theme-dark .pta-image-option:has(input:focus-visible){outline-color:#f5f5f5}\n #pta-root .pta-review-switch{position:relative;min-height:36px;padding-right:46px!important}#pta-root .pta-review-switch::before{content:\'\';position:absolute;right:5px;top:calc(50% - 9px);width:32px;height:18px;border-radius:10px;background:#777}#pta-root .pta-review-switch::after{content:\'\';position:absolute;right:21px;top:calc(50% - 7px);width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .16s}#pta-root .pta-review-switch[aria-checked="true"]::before{background:#15803d}#pta-root .pta-review-switch[aria-checked="true"]::after{transform:translateX(14px)}#pta-root .pta-review-switch:focus-visible{outline:2px solid var(--pta-text);outline-offset:2px}@media(prefers-reduced-motion:reduce){#pta-root .pta-review-switch::after{transition:none}}\n .pta-secondary{height:32px;border:1px solid var(--pta-line);border-radius:8px;background:rgba(255,255,255,.52);color:var(--pta-text);padding:0 11px;cursor:pointer;font:600 11px inherit;transition:background .2s ease,color .2s ease,transform .2s ease}.pta-secondary:hover{background:#111;color:#fff;transform:translateY(-1px)}.pta-drawer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}.pta-image-option{display:flex;align-items:center;gap:6px;color:var(--pta-muted);font-size:11px}.pta-image-option input{accent-color:#111}.pta-fixed,.pta-status{background:rgba(245,245,245,.6)}.pta-toast{background:#111}.pta-icon-btn:hover,.pta-link-btn:hover{background:rgba(0,0,0,.08);color:#111}.pta-error{color:#333!important;font-weight:600}\n .pta-model-select{position:relative}.pta-model-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.pta-select-trigger{width:100%;height:38px;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--pta-line);border-radius:10px;padding:0 11px;background:rgba(255,255,255,.56);color:var(--pta-text);font:12px inherit;text-align:left;cursor:pointer;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}.pta-select-trigger:hover,.pta-model-select.open .pta-select-trigger{border-color:#111;background:#fff}.pta-model-select.open .pta-select-trigger{box-shadow:0 0 0 3px rgba(0,0,0,.06)}.pta-select-trigger:disabled{cursor:not-allowed;opacity:.55}.pta-select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pta-select-chevron{width:7px;height:7px;flex:0 0 auto;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .24s cubic-bezier(.22,1,.36,1)}.pta-model-select.open .pta-select-chevron{transform:rotate(225deg) translate(-1px,-2px)}.pta-select-menu{position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:20;padding:4px;border:1px solid rgba(0,0,0,.12);border-radius:11px;background:rgba(255,255,255,.92);box-shadow:0 14px 32px rgba(0,0,0,.12);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);opacity:0;visibility:hidden;transform:translateY(-5px) scale(.985);transform-origin:top center;transition:opacity .2s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s;max-height:176px;overflow:auto}.pta-model-select.open .pta-select-menu{opacity:1;visibility:visible;transform:none;transition-delay:0s}.pta-select-option{display:flex;align-items:center;min-height:32px;padding:0 9px;border-radius:7px;color:#555;font-size:12px;cursor:pointer;opacity:0;transform:translateY(-3px);transition:background .16s ease,color .16s ease,opacity .2s ease,transform .24s cubic-bezier(.22,1,.36,1)}.pta-model-select.open .pta-select-option{opacity:1;transform:none;transition-delay:calc(var(--option-index,0) * 22ms)}.pta-select-option:hover,.pta-select-option.active{background:#111;color:#fff}.pta-select-option[aria-disabled="true"]{color:#999;cursor:default}.pta-select-option[aria-disabled="true"]:hover{background:transparent;color:#999}\n .pta-model-select.closing .pta-select-menu{opacity:0;visibility:visible;transform:translateY(-4px) scale(.985);transition:opacity .15s ease,transform .17s cubic-bezier(.4,0,.2,1),visibility 0s linear .17s}.pta-model-select.closing .pta-select-option{opacity:0;transform:translateY(-2px);transition-delay:calc(var(--option-index,0) * 8ms)}\n .pta-range-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}\n .pta-range-head label{display:block;font-size:11px;font-weight:600;color:var(--pta-muted);margin:0}\n .pta-range-badge{font-size:11px;font-weight:600;color:var(--pta-text);background:rgba(0,0,0,.05);padding:2px 7px;border-radius:6px;border:1px solid var(--pta-line);white-space:nowrap}\n #pta-class-home .pta-catalog-item{display:grid;grid-template-columns:minmax(0,1fr)64px;align-items:center;gap:10px}\n #pta-class-home .pta-catalog-item-copy{min-width:0}\n #pta-class-home .pta-catalog-time-ring{position:relative;width:64px;height:64px;color:var(--pta-text)}\n #pta-class-home .pta-catalog-time-ring.urgent .pta-catalog-ring-center strong,#pta-class-home .pta-catalog-time-ring.urgent .pta-catalog-ring-center small{color:#dc2626}\n #pta-root[data-theme=dark] #pta-class-home .pta-catalog-time-ring.urgent .pta-catalog-ring-center strong,#pta-root[data-theme=dark] #pta-class-home .pta-catalog-time-ring.urgent .pta-catalog-ring-center small{color:#f87171}\n #pta-class-home .pta-catalog-time-ring svg{display:block;width:100%;height:100%}\n #pta-class-home .pta-catalog-ring-track{stroke:var(--pta-line)}\n #pta-class-home .pta-catalog-ring-arc{stroke:var(--pta-text);stroke-linecap:round}\n #pta-class-home .pta-catalog-time-ring.unknown .pta-catalog-ring-arc{stroke:var(--pta-muted);opacity:.5}\n #pta-class-home .pta-catalog-ring-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none}\n #pta-class-home .pta-catalog-ring-center strong{font-size:12px;line-height:1.3}\n #pta-class-home .pta-catalog-ring-center small{font-size:9px;color:var(--pta-muted);line-height:1.3}\n #pta-class-home .pta-catalog-group{padding:0}\n #pta-class-home .pta-catalog-group > summary{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px;padding:10px;list-style:none;cursor:pointer}\n #pta-class-home .pta-catalog-group > summary::-webkit-details-marker{display:none}\n #pta-class-home .pta-catalog-group > summary::before{content:\'›\';flex:0 0 auto;transition:transform .18s ease}\n #pta-class-home .pta-catalog-group[data-expanded=true] > summary::before{transform:rotate(90deg)}\n #pta-class-home .pta-catalog-group > summary:focus-visible{outline:2px solid var(--pta-text);outline-offset:-2px;border-radius:10px}\n #pta-class-home .pta-catalog-body{overflow:hidden;padding:0 10px}\n #pta-class-home .pta-catalog-archive-list{max-height:min(320px,45vh);overflow-y:auto;overscroll-behavior:auto;scrollbar-width:thin}\n @media(prefers-reduced-motion:reduce){#pta-class-home .pta-catalog-group > summary::before{transition:none}}\n #pta-class-home .pta-catalog-items{max-height:min(240px,38vh);overflow-y:auto;overscroll-behavior:auto;scrollbar-width:thin;padding-right:5px}\n #pta-class-home .pta-catalog-items:focus-visible{outline:2px solid var(--pta-text);outline-offset:-2px}\n #pta-class-home .pta-catalog-note{margin:8px 0 0;font-size:10px;line-height:1.4}\n #pta-root .pta-ai-cache-row{display:flex;align-items:center;gap:10px}\n #pta-root .pta-ai-cache-row>button{flex:0 0 auto;max-width:48%}\n #pta-root .pta-ai-cache-row>.pta-dev-status{display:block;flex:1;min-width:0;margin:0;line-height:1.5}\n #pta-root .pta-reminder-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:10px}\n #pta-root .pta-reminder-row>.pta-check{display:flex;align-items:center;justify-content:center;margin:0;min-width:0;min-height:36px;height:auto;box-sizing:border-box;padding:8px 6px;white-space:normal;line-height:1.35;text-align:center}\n #pta-root .pta-reminder-row>.pta-check>.pta-reminder-label{display:block;min-width:0;margin:0;padding:0;line-height:inherit;text-align:center}\n #pta-root .pta-reminder-threshold{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0}\n #pta-root .pta-reminder-threshold>label{margin:0;font-size:11px;line-height:1.3;min-width:0}\n #pta-root .pta-reminder-threshold>select{width:66px;min-width:0;flex:0 0 66px;padding:6px 4px;font-size:12px}\n #pta-root #pta-helper-copy-pair{margin-top:10px;max-width:100%}\n #pta-root .pta-options > .pta-check{min-width:0;min-height:36px;padding:6px;gap:0;white-space:normal;line-height:1.35;text-align:center;overflow-wrap:anywhere}\n .pta-range-wrap{position:relative;width:100%;margin-top:2px}\n .pta-range{display:block;width:100%;height:6px;margin:8px 0 6px;-webkit-appearance:none;appearance:none;background:var(--pta-line);border-radius:99px;outline:none;cursor:pointer;transition:background .2s ease}\n .pta-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--pta-text);border:2px solid var(--pta-bg);box-shadow:0 1px 4px rgba(0,0,0,.22);cursor:pointer;transition:transform .15s ease}\n .pta-range::-webkit-slider-thumb:hover{transform:scale(1.18)}\n .pta-range::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--pta-text);border:2px solid var(--pta-bg);box-shadow:0 1px 4px rgba(0,0,0,.22);cursor:pointer;transition:transform .15s ease}\n .pta-range-scale{position:relative;display:flex;align-items:flex-start;justify-content:space-between;margin-top:4px;font-size:10px;color:var(--pta-muted);line-height:1.25}\n .pta-scale-item{display:flex;flex-direction:column}\n .pta-scale-item.min{text-align:left}\n .pta-scale-item.max{text-align:right}\n .pta-scale-item.mid{position:absolute;transform:translateX(-50%);text-align:center;white-space:nowrap}\n .pta-scale-item strong{font-weight:600;color:var(--pta-text)}\n .pta-max-tokens-scale,.pta-thinking-scale{position:relative;width:100%;height:28px;margin-top:5px;display:block}\n .pta-max-tokens-scale .pta-scale-item,.pta-thinking-scale .pta-scale-item{position:absolute;top:0;transform:translateX(-50%);text-align:center;white-space:nowrap;cursor:pointer;color:var(--pta-muted);transition:color .18s ease,transform .18s ease}\n .pta-max-tokens-scale .pta-scale-item span,.pta-thinking-scale .pta-scale-item span{display:block;font-size:10px;font-weight:700;line-height:1.2}\n .pta-max-tokens-scale .pta-scale-item strong,.pta-thinking-scale .pta-scale-item strong{display:block;font-size:9px;font-weight:600;line-height:1.2;color:var(--pta-muted);transition:color .18s ease}\n .pta-max-tokens-scale .pta-scale-item:hover,.pta-thinking-scale .pta-scale-item:hover{transform:translateX(-50%) translateY(-1px);color:var(--pta-text)}\n .pta-max-tokens-scale .pta-scale-item:hover strong,.pta-thinking-scale .pta-scale-item:hover strong{color:var(--pta-text)}\n .pta-max-tokens-scale .pta-scale-item.active,.pta-thinking-scale .pta-scale-item.active{color:var(--pta-text)}\n .pta-max-tokens-scale .pta-scale-item.active strong,.pta-thinking-scale .pta-scale-item.active strong{color:var(--pta-text);font-weight:700}\n /* Range controls must not inherit the text-input padding/border/36px box. */\n #pta-root input[type="range"].pta-range{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:0;height:20px;margin:8px 0 0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;appearance:none;-webkit-appearance:none}\n #pta-root input[type="range"].pta-range:focus{border:0;box-shadow:none}\n #pta-root input[type="range"].pta-range:focus-visible{outline:2px solid var(--pta-accent);outline-offset:3px;border-radius:4px}\n #pta-root input[type="range"].pta-range::-webkit-slider-runnable-track{height:6px;border:0;border-radius:99px;background:var(--pta-line)}\n #pta-root input[type="range"].pta-range::-moz-range-track{height:6px;border:0;border-radius:99px;background:var(--pta-line)}\n #pta-root input[type="range"].pta-range::-webkit-slider-thumb{box-sizing:border-box;width:16px;height:16px;margin-top:-5px}\n #pta-root input[type="range"].pta-range::-moz-range-thumb{box-sizing:border-box;width:16px;height:16px}\n #pta-root .pta-labeled-range{padding:0 20px}\n #pta-root .pta-max-tokens-scale{height:38px;margin-top:4px}\n #pta-root .pta-thinking-scale{height:36px;margin-top:4px}\n #pta-root .pta-max-tokens-scale .pta-scale-item,#pta-root .pta-thinking-scale .pta-scale-item{max-width:none;white-space:nowrap;overflow-wrap:normal;text-align:center;transform:translateX(-50%)}\n #pta-root .pta-max-tokens-scale .max-token-step{border:0;border-radius:4px;background:none;padding:2px 0;margin:0;min-width:0;min-height:0;font:inherit;line-height:1.2;box-shadow:none}\n #pta-root .pta-max-tokens-scale .max-token-step:nth-child(even){top:18px}\n #pta-root .pta-max-tokens-scale .max-token-step span{font:600 10px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums}\n #pta-root .pta-max-tokens-scale .max-token-step:focus-visible{outline:2px solid var(--pta-accent);outline-offset:2px}\n #pta-root .pta-max-tokens-scale .max-token-step.active span{font-weight:800;text-decoration:underline;text-underline-offset:3px}\n #pta-root .pta-range-note{margin:4px 0 0;font-size:11px;line-height:1.5;color:var(--pta-muted);white-space:normal;overflow-wrap:break-word}\n .pta-provider{grid-template-columns:repeat(3,minmax(0,1fr))}\n @media(prefers-reduced-motion:reduce){#pta-shell,.pta-drawer,.pta-select-menu,.pta-select-option,.pta-select-chevron,.pta-primary,.pta-secondary{transition-duration:.01ms!important;animation-duration:.01ms!important}}\n .pta-modal-mask{position:fixed;inset:0;background:rgba(15,17,24,.52);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:2147483647;display:flex;align-items:center;justify-content:center;padding:16px;font:13px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}\n .pta-modal-card{width:min(420px,100%);max-height:86vh;display:flex;flex-direction:column;background:rgba(255,255,255,.94);color:#111;border:1px solid rgba(0,0,0,.1);border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.22);overflow:hidden;animation:pta-rise .2s ease both}\n html.pta-theme-dark .pta-modal-card{background:rgba(26,27,31,.95);color:#f3f4f6;border-color:rgba(255,255,255,.14);box-shadow:0 24px 60px rgba(0,0,0,.55)}\n .pta-modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid rgba(0,0,0,.08)}\n html.pta-theme-dark .pta-modal-head{border-bottom-color:rgba(255,255,255,.1)}\n .pta-modal-head h2,.pta-modal-head strong{margin:0;font-size:15px;font-weight:700}\n .pta-modal-body{padding:16px 18px;overflow-y:auto;flex:1 1 auto}\n .pta-modal-foot{padding:12px 18px;border-top:1px solid rgba(0,0,0,.08);display:flex;gap:8px;justify-content:flex-end}\n html.pta-theme-dark .pta-modal-foot{border-top-color:rgba(255,255,255,.1)}\n .pta-modal-input,.pta-modal-textarea{width:100%;box-sizing:border-box;border:1px solid rgba(0,0,0,.14);border-radius:10px;padding:9px 12px;font:13px/1.5 inherit;background:rgba(255,255,255,.75);color:inherit;outline:none;transition:border-color .15s,box-shadow .15s}\n .pta-modal-input:focus,.pta-modal-textarea:focus{border-color:#111;box-shadow:0 0 0 3px rgba(0,0,0,.07)}\n html.pta-theme-dark .pta-modal-input,html.pta-theme-dark .pta-modal-textarea{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.16);color:#f3f4f6}\n html.pta-theme-dark .pta-modal-input:focus,html.pta-theme-dark .pta-modal-textarea:focus{border-color:#f3f4f6;box-shadow:0 0 0 3px rgba(255,255,255,.1)}\n .pta-modal-btn{height:36px;padding:0 16px;border-radius:9px;border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit;font:600 13px inherit;cursor:pointer;transition:opacity .15s,transform .15s}\n .pta-modal-btn:hover{opacity:.88;transform:translateY(-1px)}\n .pta-modal-btn-primary{background:#111;border-color:#111;color:#fff}\n html.pta-theme-dark .pta-modal-btn{border-color:rgba(255,255,255,.18)}\n html.pta-theme-dark .pta-modal-btn-primary{background:#f3f4f6;border-color:#f3f4f6;color:#111}\n .pta-modal-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:3px;border-radius:10px;background:rgba(0,0,0,.06);margin-bottom:14px}\n html.pta-theme-dark .pta-modal-tabs{background:rgba(255,255,255,.08)}\n .pta-modal-tab{border:0;border-radius:8px;padding:7px;background:transparent;color:inherit;opacity:.65;font:600 13px inherit;cursor:pointer}\n .pta-modal-tab.active{background:#fff;opacity:1;box-shadow:0 1px 4px rgba(0,0,0,.1)}\n html.pta-theme-dark .pta-modal-tab.active{background:#f3f4f6;color:#111}\n ',P={open:!1,path:"",host:null,button:null,fold:null},H={rows:[],status:"idle",message:"",run:0,suspended:!1,job:null,total:null,source:"dom",domSignature:"",failure:"",directoryComplete:!1,cacheVerified:!1,snapshotAt:null},q=0,j="pta-catalogue-cache-v1",Q={loaded:!1,loading:null,stored:null,timer:null,dirty:!1,generation:0,queue:Promise.resolve(),status:"pending"},F=null,G={owner:null,items:new Map,snapshot:null},J="pta-catalogue-visits-v1",U={loaded:!1,lastSet:null,owner:null,ids:new Map},Y={generation:0,setId:null,url:null,set:null,timer:null,panels:[],pending:!1,statusNode:null,startedAt:0},V={busy:!1,enabled:!1,preferenceReady:!1,preferenceBusy:!1,showTools:!1,status:"",revision:0,epoch:0,activeSet:null,timer:null,autoKey:""},X="pta-review-enabled-v1",K={generation:0,job:null,owner:null,index:new Map,pending:new Set,persistenceError:"",verified:new Map,sets:new Map,writeQueue:Promise.resolve()},Z="pta-review-questions-v1",W="pta-review-index-v2",_="pta-review-clear-epoch-v2",$=["TRUE_OR_FALSE","MULTIPLE_CHOICE","MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER","FILL_IN_THE_BLANK","FILL_IN_THE_BLANK_FOR_PROGRAMMING","CODE_COMPLETION","PROGRAMMING","MULTIPLE_FILE","SUBJECTIVE"],ee="",te=null,ne="pta-panel-page-v1",re={bound:!1,reason:null,timer:null,epoch:0,alive:!0,motionTimer:null,moving:!1},ae={target:null,timer:null},oe={last:"",pendingSnapshot:null,timer:null,bound:!1},ie="pnc-reminder-v2:",se=Promise.resolve(),le="pnc-reminder-signing-v1",ce=Aa;Aa=async function(e,t){await ce(e,t),await Ba()};var pe=Ca;Ca=async function(){await pe();var e=document.getElementById("pta-deadline-reminder-status"),t=e&&e.textContent;await Ba()&&e&&!/失败|不可用|超限|超过|账号已变化/.test(t||"")&&(e.textContent="签名配置已发送;需手动配对通用 Helper。是否接收请查看扩展菜单,不代表通知已送达。")};var de=!1,ue=null,me=0;"function"==typeof window.addEventListener&&window.addEventListener("message",function(e){"https://pintia.cn"===e.origin&&e.data&&"pnc-helper-request-sync-v1"===e.data.channel&&Na()}),"function"==typeof document.addEventListener&&document.addEventListener("pnc-helper-request-sync-v1",Na);var he=null,ge={enabled:!1,records:[],bytes:0,generation:0,timer:null,restore:null,readers:new Set,pending:0,continuation:!1,resumed:!1},fe="pta-api-diagnostic-continuation-v1",be={enabled:!1,records:[],bytes:0,observer:null,timer:null,routeTimer:null,endTimer:null,lastURL:""},ve="",ye={TRUE_OR_FALSE:"判断题",MULTIPLE_CHOICE:"单选题",MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER:"多选题",FILL_IN_THE_BLANK:"填空题",FILL_IN_THE_BLANK_FOR_PROGRAMMING:"程序填空题",PROGRAMMING:"编程题",choice:"单选题",multi_choice:"多选题",fill:"填空题",programming:"编程题",judge:"判断题"};!function(){if(t.developer){var e=null;try{var n=sessionStorage.getItem(fe);sessionStorage.removeItem(fe),n&&n.length<100&&(e=JSON.parse(n))}catch(e){}e&&1===e.remaining&&Number.isFinite(e.expiresAt)&&e.expiresAt>Date.now()&&e.expiresAt<=Date.now()+3e5&&Fa({resumed:!0,expiresAt:e.expiresAt})}else ja()}(),window.addEventListener("pagehide",function(){ja(!0),ge.records=[],ge.bytes=0}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",lo):lo()}function we(){return"paid"===m.tier||"unlimited"===m.tier}function xe(e,t,n){return new Promise(function(r,a){var o={"Content-Type":"application/json","x-pta-ts":String(Date.now())};m.token&&(o.Authorization="Bearer "+m.token),GM_xmlhttpRequest({method:e,url:d+t,headers:o,data:n?JSON.stringify(n):void 0,timeout:15e3,onload:function(e){var n=null;try{n=JSON.parse(String(e.responseText||"{}"))}catch(e){}if(401===e.status&&"/api/login"!==t&&"/api/register"!==t){m.valid=!1,m.token="";try{localStorage.removeItem("pta_token")}catch(e){}}r({status:e.status,data:n||{}})},onerror:function(){a(new Error("network"))},ontimeout:function(){a(new Error("timeout"))}})})}function Ae(){var e=document.getElementById("pta-usage");e&&(m.valid?e.textContent=we()?"付费用户 · 无限制":"剩余 "+Math.max(0,m.quota-m.usageCount)+"/"+m.quota+" 次":e.textContent="")}function ke(e){if(e){var t=e.prompt_tokens||e.input_tokens||0,n=e.completion_tokens||e.output_tokens||0;!n&&e.total_tokens&&(n=Math.max(0,e.total_tokens-t)),h.prompt+=t,h.completion+=n}}function Ee(){try{var e=document.createElement("canvas"),t=e.getContext("2d");t.textBaseline="top",t.font="14px Arial",t.fillText("PTA-AutoTool_"+navigator.userAgent.length+screen.width+"x"+screen.height+navigator.language,2,2);for(var n=e.toDataURL(),r=0,a=0;a2048)return n;if(!t)return 131072;var r=String(t).toLowerCase();if("deepseek"===e||r.indexOf("deepseek")>=0){if(/v4|flash/i.test(r))return 1048576;if(/chat|reasoner|r1|v3/i.test(r))return 65536}if("mimo"===e||r.indexOf("mimo")>=0){if(/v2\.5|v2-pro/i.test(r))return 1048576;if(/omni/i.test(r))return 262144;if(/flash/i.test(r))return 131072}return/1m|1000k/i.test(r)?1048576:/256k/i.test(r)?262144:/200k|claude/i.test(r)?2e5:/gemini/i.test(r)?1048576:/128k|gpt-4o|o1|o3|qwen|llama/i.test(r)?131072:/64k/i.test(r)?65536:/32k/i.test(r)?32768:131072}function Me(e){var t=Number(e)||131072,n=f.filter(function(e){return e.val<=t});return n.length||(n=[f[0]]),n}function Be(e,t){var n=document.getElementById("pta-max-tokens-scale");if(n&&e&&e.length){n.replaceChildren(),e.forEach(function(r,a){var o=document.createElement("button");o.type="button",o.className="pta-scale-item max-token-step"+(a===t?" active":""),o.dataset.index=String(a),o.style.left="calc(8px + (100% - 16px) * "+a+" / "+Math.max(1,e.length-1)+")",o.setAttribute("aria-label",r.label+","+r.val+" Token"),o.setAttribute("aria-pressed",String(a===t));var i=document.createElement("span");i.textContent=r.label,o.appendChild(i),o.addEventListener("click",function(){var e=document.getElementById("pta-max-tokens");e&&(e.value=a,e.dispatchEvent(new Event("input",{bubbles:!0})))}),n.appendChild(o)});var r=document.getElementById("pta-max-tokens-note");if(r){var a=e.find(function(e){return 131072===e.val});r.textContent="最小 "+e[0].label+" · 模型上限 "+e[e.length-1].label+(a?" · 建议 "+a.label:"")}}}function Ne(e){return new Promise(function(t){setTimeout(t,e)})}function ze(e,t){var n=[];t=t||document;try{n=Array.prototype.slice.call(t.querySelectorAll(e))}catch(e){}var r=[];try{r=Array.prototype.slice.call(t.querySelectorAll("*"))}catch(e){}return r.forEach(function(t){t.shadowRoot&&(n=n.concat(ze(e,t.shadowRoot)))}),n}function Oe(e){return e?String(e.innerText||e.textContent||"").replace(/\u200b/g,"").replace(/\n{3,}/g,"\n\n").trim():""}function Le(e){return String(e||"").trim()}function Re(e){for(var t=e;t&&t!==document.body;){var n=t.className&&String(t.className),r=Oe(t);if(t.classList&&(t.classList.contains("pc-x")||t.classList.contains("space-y-4")||/question|problem|exam-item/i.test(n||""))&&r.length>10)return t;t=t.parentElement}return e&&e.closest&&e.closest("section, form")||e&&e.parentElement||document.body}function De(e){if(!e)return"";if("TEXTAREA"===e.tagName)return String(e.value||"");var t=e.querySelector(".cm-content");if(t){try{var n=t.cmTile;if(n&&n.view&&n.view.state&&n.view.state.doc)return n.view.state.doc.sliceString(0,n.view.state.doc.length)}catch(e){}var r=t._view||e._view||e._cmView;if(r&&r.state&&r.state.doc)try{return r.state.doc.sliceString(0,r.state.doc.length)}catch(e){}return String(null!=t.innerText?t.innerText:t.textContent||"")}var a=e.querySelector(".CodeMirror-code");if(a)return String(a.innerText||a.textContent||"");var o=e.querySelector(".monaco-editor .view-lines, .view-lines");if(o)return String(o.innerText||o.textContent||"");var i=e.querySelector("textarea");return String(i?i.value||"":e.innerText||e.textContent||"")}function Pe(e){return De(e).trim().length<2}function He(e){if(!e||"TEXTAREA"!==e.tagName)return!1;var t=parseInt(e.getAttribute("rows")||"",10),n=String(e.className||"")+" "+String(e.id||"");return t>=4||/code|editor|answer|program|source/i.test(n)}function qe(e){for(var t=e;t&&t!==document.body;){if(t.classList&&(t.classList.contains("cm-editor")||t.classList.contains("CodeMirror")||t.classList.contains("monaco-editor")))return t;t=t.parentElement}return null}function je(e){var t=qe(e);if(t)return t;for(var n=e;n&&n!==document.body;){if(He(n))return n;n=n.parentElement}return null}function Qe(e){for(var t=ze(".cm-editor"),n=0;n0})}function We(e,t,n){var r=Array.prototype.slice.call(e.querySelectorAll("h1,h2,h3,h4,.cm-editor")),a=!1,o=[];return r.forEach(function(e){if(/^H[1-4]$/.test(e.tagName)){var r=Le(Oe(e));return a&&n&&n.test(r)&&(a=!1),void(t.test(r)&&(a=!0))}if(a&&e.classList&&e.classList.contains("cm-editor")){var i=De(e);i.trim()&&o.push(i)}}),o}function _e(e){var t={input:[],output:[],codes:[],found:!1},n=null,r=[];function a(){n&&r.length&&t[n].push(r.join("\n")),r=[]}function o(e){return 3===e.nodeType?e.nodeValue||"":1!==e.nodeType||/^(BUTTON|INPUT|SCRIPT|STYLE)$/.test(e.tagName)?"":"BR"===e.tagName?"\n":Array.prototype.map.call(e.childNodes,o).join("")}return Array.prototype.forEach.call(e.childNodes||[],function e(i){if(3!==i.nodeType){if(1===i.nodeType&&!i.matches(".pta-assist, #pta-root, button, input, script, style, .cm-gutters")){var s,l,c=(s=i.textContent,l=String(s||"").replace(/\s/g,""),/^(?:样例输入|输入样例|SampleInput)\d*[::]?$/i.test(l)?"input":/^(?:样例输出|输出样例|SampleOutput)\d*[::]?$/i.test(l)?"output":""),p=/^H[1-6]$/.test(i.tagName),d=/^(P|DIV|STRONG|B)$/.test(i.tagName)&&c&&!i.querySelector("pre,code,.cm-editor"),u=/^(P|DIV|STRONG|B)$/.test(i.tagName)&&/^(?:样例\s*解释|提示|代码长度限制|时间限制|内存限制|栈限制)[::]?\s*$/.test(i.textContent||"");if(p||d||u)return a(),n=c||null,void(c&&(t.found=!0));if(i.classList.contains("cm-editor")){if(!n)return;var m=i.querySelector(".cm-content");if(m&&"true"===m.getAttribute("contenteditable")&&!/readonly/i.test(String(i.parentElement&&i.parentElement.className||"")))return;var h=De(i);h.length&&(r.push(h),t.codes.push(h))}else n&&!i.querySelector("h1,h2,h3,h4,h5,h6,.cm-editor")&&(/^(PRE|P|CODE)$/.test(i.tagName)||i.classList.contains("pc-code")||"DIV"===i.tagName&&!i.querySelector("div,p,pre,code"))?r.push(o(i)):Array.prototype.forEach.call(i.childNodes,e)}}else n&&/\S/.test(i.nodeValue||"")&&r.push(i.nodeValue)}),a(),t}function $e(e){var t=String(e||"").search(/函数接口定义[::]|裁判测试程序样例[::]|输入格式[::]|输出格式[::]|样\s*例\s*输\s*入|输\s*入\s*样\s*例|样\s*例\s*输\s*出|输\s*出\s*样\s*例|Sample\s+Input|Sample\s+Output/i);return Le(t>=0?e.slice(0,t):e).slice(0,6e3)}function et(e,t,n){var r=-1;if(t.some(function(t){var n=e.match(t);return!(!n||!(r<0||n.index0})}function at(e){return e.inputs.some(function(e){return e.checked})}function ot(e,t){var n=String(e||"").trim(),r=n.match(/^```[^\n]*\n?([\s\S]*?)\n?```$/);return r&&(n=r[1].trim()),t||(n=function(e){var t=String(e||"").split(/\r?\n/).map(function(e){return e.trim()}).filter(Boolean);return t.length>1?t[t.length-1]:t[0]||""}(n)),n.replace(/^```[a-z]*\s*/i,"").replace(/\s*```$/,"").trim()}function it(){var e=ze("input").filter(function(e){return!(e.closest&&e.closest("#pta-root")||/hidden|radio|checkbox|button|submit|file|password|image|range|color/i.test(e.type||"")||je(e))}),t=[];return e.forEach(function(e){var n=Re(e),r=t.find(function(e){return e.problem===n});r?r.inputs.push(e):t.push({problem:n,inputs:[e]})}),t}function st(){var e=ze(".cm-widgetBuffer + span input"),t=[];return e.forEach(function(e){var n=je(e),r=t.find(function(e){return e.editor===n});r?r.inputs.push(e):t.push({editor:n,inputs:[e],problem:Re(e)})}),t}function lt(e){var t=s.configs[e];return"mimo"===e&&t&&/^tp-/i.test(t.apiKey||"")?"https://token-plan-cn.xiaomimimo.com/v1":"opencode"===e?c.baseUrl:r[e].baseUrl}function ct(e){return lt(e)+"/chat/completions"}function pt(e){return lt(e)+"/models"}function dt(e,t,n){var a="GET"===n?{}:{"Content-Type":"application/json"};return t&&("api-key"===r[e].auth?a["api-key"]=t:a.Authorization="Bearer "+t),a}function ut(e){var t=s.configs[e];return a[e]?!(!t||!t.available):!(!t||!(r[e].optionalKey?c.available:t.apiKey))}function mt(e){return new Promise(function(t){GM_xmlhttpRequest({method:"GET",url:"http://"+e+":8788/health",timeout:1800,onload:function(n){t(n.status>=200&&n.status<300?"http://"+e+":8788/v1":"")},onerror:function(){t("")},ontimeout:function(){t("")},onabort:function(){t("")}})})}function ht(e){if(c.checking)return Promise.resolve(c.available);var t=c.available;return c.checking=!0,wa(),mt("127.0.0.1").then(function(e){return e||mt("localhost")}).then(function(n){return c.checking=!1,c.available=!!n,n&&(c.baseUrl=n),n||(c.baseUrl=r.opencode.baseUrl,"opencode"===s.provider&&(s.configs.opencode.models=[],s.configs.opencode.model="")),wa(),n&&!t&&(e||(Tn("已检测到 OpenCode Free 本地代理"),Xt("OpenCode Free 已连接:"+n,"success")),"opencode"===s.provider&&La("opencode",!0)),c.available})}function gt(e,t,n){var r=n&&n.error&&(n.error.message||n.error.code)||n&&n.message||"请求失败";return 401===t||403===t?e+":API Key 无效或无权限(HTTP "+t+")":402===t?e+":账户余额不足(HTTP 402)":429===t?e+":请求过于频繁(HTTP 429)":e+" HTTP "+t+":"+r}function ft(e,t){var n=String(e&&e.responseText||"").replace(/^\uFEFF/,"").trim();try{return JSON.parse(n||"{}")}catch(i){var a=e&&e.status?"(HTTP "+e.status+")":"",o=n.replace(/\s+/g," ").slice(0,180);throw new Error(r[s.provider].name+" "+t+"不是有效 JSON"+a+(o?":"+o:":空响应"))}}function bt(e){if(!e)return!1;var t=String(e.id||"");if(/-free$/i.test(t)||"big-pickle"===t||/:(free)$/i.test(t)||"openrouter/free"===t)return!0;var n=e.pricing||{},r=["prompt","completion","request","image"];return r.some(function(e){return void 0!==n[e]})&&r.every(function(e){return void 0===n[e]||0===Number(n[e])})}function vt(e,t,n){if(!t)return!1;var r=String(t).toLowerCase();return"deepseek"===e?/v4|flash|vision/i.test(r)&&!/chat|reasoner/i.test(r):"mimo"===e?/v2|omni|pro|flash/i.test(r):"opencode_zen"===e&&(n&&void 0!==n.images?!!n.images:/vision|vl|gemini|gpt-4|claude|omni/i.test(r))}function yt(e,t,n,o,i){var l=r[s.provider],c=s.configs[s.provider];return new Promise(function(r,p){var d,u=!1;function m(){o&&o.removeEventListener("abort",f)}function h(e){u||(u=!0,m(),r(e))}function g(e){u||(u=!0,m(),p(e))}function f(){if(d&&d.abort)try{d.abort()}catch(e){}g(new Error("请求已停止"))}if(o&&o.aborted)g(new Error("请求已停止"));else if(ut(s.provider))if(c.model){var b=void 0!==n?n:void 0!==c.thinking?c.thinking:2,v={model:c.model,messages:e,temperature:0,max_tokens:t||c.maxTokens||2048,stream:!1};if(null!=b){var y={0:"none",1:"low",2:"medium",3:"high"}[b]||"medium";0===b?(v.thinking={type:"disabled"},v.reasoning={effort:"none"},v.reasoning_effort="low"):(v.thinking={type:"enabled"},v.reasoning={effort:y},v.reasoning_effort=y)}if(a[s.provider]){var w={provider:s.provider,model:c.model,max_tokens:v.max_tokens,thinking:b,temperature:0};return i&&i.type?(w.type=i.type,w.data=i.data,w.language=i.language,w.perturb=i.perturb,w.images=i.images):w.messages=e,void xe("POST","/api/ai/chat",w).then(function(e){if(e.status<200||e.status>=300)g(new Error(gt("AI 请求失败",e.status,e.data)));else{var t=e.data||{},n=t.choices&&t.choices[0]&&t.choices[0].message&&t.choices[0].message.content;Array.isArray(n)&&(n=n.map(function(e){return e.text||""}).join("")),n?(ke(t.usage),h(String(n).trim())):g(new Error(t.choices&&t.choices[0]&&t.choices[0].message&&t.choices[0].message.reasoning_content?"AI 返回为空:本次只返回了推理内容,建议在设置中调大 Max Token 或降低思考强度":"AI 返回为空:请检查模型是否支持当前请求"))}}).catch(function(){g(new Error("AI 请求失败:网络请求失败,请稍后检查网络或登录状态"))})}var x=dt(s.provider,c.apiKey,"POST");d=GM_xmlhttpRequest({method:"POST",url:ct(s.provider),headers:x,data:JSON.stringify(v),timeout:12e4,onload:function(e){var t;try{t=ft(e,"AI 响应")}catch(e){return void g(e)}if(e.status<200||e.status>=300)g(new Error(gt("AI 请求失败",e.status,t)));else{var n=t.choices&&t.choices[0]&&t.choices[0].message&&t.choices[0].message.content;Array.isArray(n)&&(n=n.map(function(e){return e.text||""}).join("")),n?(ke(t.usage),h(String(n).trim())):g(new Error(t.choices&&t.choices[0]&&t.choices[0].message&&t.choices[0].message.reasoning_content?"AI 返回为空:本次只返回了推理内容,建议在设置中调大 Max Token 或降低思考强度":"AI 返回为空:请检查模型是否支持当前请求"))}},onerror:function(){g(new Error("AI 请求失败:网络请求失败,请检查网络、脚本连接权限或 API Key"))},ontimeout:function(){g(new Error("AI 请求失败:请求超时(120 秒)"))},onabort:function(){g(new Error("AI 请求失败:请求被中止"))}}),o&&!u&&(o.addEventListener("abort",f,{once:!0}),o.aborted&&f())}else g(new Error("请先获取并选择一个模型"));else g(new Error(l.optionalKey?"未检测到 OpenCode Free 本地代理(127.0.0.1:8788)":"请先配置 "+l.name+" API Key"))})}function wt(e){var t=k,n=y,r={version:2,owner:t,items:Array.from(b.entries())};return C=C.catch(function(){}).then(function(){return e?"function"==typeof GM_deleteValue?GM_deleteValue(x):void 0:t&&n===y&&t===k&&"function"==typeof GM_setValue?GM_setValue(x,JSON.stringify(r)):void 0}).then(function(){return!0}).catch(function(){return Xt("AI 缓存本地存储操作失败,本次仍可正常作答","warning"),!1})}function xt(e){var t;return Promise.race([Promise.resolve(e),new Promise(function(e,n){t=setTimeout(function(){n(new Error("cache storage timeout"))},2e3)})]).finally(function(){clearTimeout(t)})}async function At(e){var t=location.pathname.match(/^\/problem-sets\/(\d{1,25})(?:\/|$)/),n=JSON.stringify([s.runId,"object"==typeof T&&T.run,location.pathname]);if(E===n&&S)return S;E=n,k=null,b.clear(),v=0;var r=++y;return S=async function(){if(!t||"function"!=typeof GM_getValue||"function"!=typeof GM_setValue)return!1;var n=new AbortController,a=setTimeout(function(){n.abort()},8e3);function o(){n.abort()}e&&(e.aborted?o():e.addEventListener("abort",o,{once:!0}));try{var i=await fetch("/api/problem-sets/"+t[1]+"/exams",{credentials:"same-origin",mode:"same-origin",headers:{Accept:"application/json;charset=UTF-8"},signal:n.signal,redirect:"error",cache:"no-store"});if(!i.ok||!/json/i.test(i.headers.get("content-type")||""))return!1;var s=await async function(e,t){var n=1048576,r=Number(e.headers.get("content-length"));if(Number.isFinite(r)&&r>n)throw new Error("response too large");if(!e.body||"function"!=typeof e.body.getReader)throw new Error("stream unavailable");var a=e.body.getReader(),o=0,i=[],s=new TextDecoder;function l(){try{Promise.resolve(a.cancel()).catch(function(){})}catch(e){}}t&&t.addEventListener("abort",l,{once:!0});try{for(;;){if(t&&t.aborted)throw new Error("cancelled");var c=await a.read();if(t&&t.aborted)throw new Error("cancelled");if(c.done)break;if((o+=c.value.byteLength)>n)throw new Error("response too large");i.push(s.decode(c.value,{stream:!0}))}return i.push(s.decode()),i.join("")}finally{l(),t&&t.removeEventListener("abort",l);try{a.releaseLock()}catch(e){}}}(i,n.signal),l=JSON.parse(s).exam;if(!l||"string"!=typeof l.userId||!/^\d{1,25}$/.test(l.userId)||"string"!=typeof l.id||!/^\d{1,25}$/.test(l.id)||void 0!==l.problemSetId&&l.problemSetId!==t[1])return!1;await xt(C);var c,p=await xt(GM_getValue(x,null));if(r!==y||n.signal.aborted)return!1;if(k=l.userId,"string"!=typeof p||p.length>4194304)return!0;try{c=JSON.parse(p)}catch(e){return!0}return!c||2!==c.version||c.owner!==k||!Array.isArray(c.items)||(c.items.slice(-200).forEach(function(e){if(Array.isArray(e)&&"string"==typeof e[0]&&e[1]&&"string"==typeof e[1].answer){var t=e[1],n=2*(e[0].length+t.answer.length);!t.answer.trim()||!Number.isFinite(t.time)||t.time>Date.now()||Date.now()-t.time>A||n>131072||v+n>2097152||(b.set(e[0],{answer:t.answer,time:t.time,bytes:n}),v+=n)}}),!0)}catch(e){return!1}finally{clearTimeout(a),e&&e.removeEventListener("abort",o)}}()}function kt(){return b.clear(),v=0,y++,wt(!0)}function Et(e,t,n,r,a){var o=s.configs[s.provider]||{},i=JSON.stringify(n,function(e,t){if(!("input"===e&&t&&"object"==typeof t||t&&t.nodeType||/^(apiKey|cookie|token)$/i.test(e)))return t});return JSON.stringify([2,k,location.origin,location.pathname,location.hash,r&&r.id||"",null==a?"":a,e,t,s.provider,ct(s.provider),o.model,o.thinking,o.maxTokens,!!o.images,s.language,i])}function St(e,t){if(t||!e||!k)return null;var n=b.get(e);return n?Date.now()-n.time>A?(b.delete(e),v-=n.bytes,null):(b.delete(e),b.set(e,n),n.answer):null}function Ct(e,t,n){if(k&&e&&n===y&&"string"==typeof t&&t.trim()){var r=2*(e.length+t.length);if(!(r>131072)){var a=b.get(e);for(a&&(v-=a.bytes,b.delete(e)),b.set(e,{answer:t,time:Date.now(),bytes:r}),v+=r;b.size>200||v>2097152;){var o=b.keys().next().value;v-=b.get(o).bytes,b.delete(o)}wt(!1)}}}function It(e,t){var n=r[s.provider],a=s.configs[s.provider],o=void 0!==a.thinking?Number(a.thinking):2;we()||(o=2);var i=a.maxTokens||2048,c=/programming|function/.test(e)?i:Math.min(i,Math.max(2048,Math.floor(i/2))),p="你是 PTA 编程题答题助手。先在内部完成严谨分析,最终严格遵守用户的输出格式。";0===o?p="你是 PTA 答题助手。直接分析并给出最精简最终答案,严禁输出任何思考或推理过程,严格遵守输出格式。":3===o&&(p="你是 PTA 编程题答题助手。先在内部进行全面深度的推导与多重边界验证,最终严格遵守用户的输出格式。");var d=function(e,t,n){var r=Ye(t.language||s.language||"auto",[t.description,t.code,t.previousCode,t.interfaceCode,t.frameworkCode,t.supportCode,t.referenceCode].filter(Boolean).join("\n")),a={judge:"只输出一行 true 或 false。",choice:"只输出一个选项字母,例如 B。",multi_choice:"只输出正确选项字母拼接,例如 ACD。",fill:"只输出答案;多个空用英文竖线 | 分隔,不要解释。",program_fill:"严格按空的顺序输出答案,用英文竖线 | 分隔,不要解释。",function:"只输出可直接粘贴的函数代码,不要 markdown 代码块、解释或 main。",programming:"只输出完整、可运行的程序代码,不要 markdown 代码块、解释或注释。"}[e]||"只输出最终答案,不要解释。",o=["【编程语言】"+r,"【题干】\n"+(t.description||"")];t.options&&t.options.length&&o.push("【选项】\n"+t.options.map(function(e){return(e.label||"")+". "+e.text}).join("\n")),t.interfaceCode&&o.push("【函数接口】\n"+t.interfaceCode),t.frameworkCode&&o.push("【代码框架】\n"+t.frameworkCode),t.supportCode&&o.push("【类型与裁判参考代码】\n"+t.supportCode),t.referenceCode&&o.push("【参考代码】\n"+t.referenceCode),t.code&&o.push("【当前代码】\n"+t.code),t.previousCode&&o.push("【上次提交代码】\n"+t.previousCode),t.input&&o.push("【输入格式】\n"+t.input),t.output&&o.push("【输出格式】\n"+t.output),t.sampleInput&&o.push("【样例输入】\n"+t.sampleInput),t.sampleOutput&&o.push("【样例输出】\n"+t.sampleOutput),t.blankCount&&o.push("【空数量】"+t.blankCount),o.push("【输出要求】"+a);var i={0:"无需长篇思考,直接输出最终答案,严禁输出任何分析或思考过程。",1:"快速思考,简要推理后直接输出答案。",2:"适度思考,在内部严谨推导后输出最终答案,不要输出分析过程。",3:"深度严谨思考,仔细验证所有边界条件和特殊情况后输出最终答案,不要输出分析过程。"},l=i[void 0!==n?n:2]||i[2];if(o.push("【思考约束】"+l),o.push("【答题约束】只依据以上题干、接口和代码上下文作答;不要重复题目,不要输出分析过程。编程题代码排版紧凑自然,模拟真人手写风格,不要多余空行和过度缩进,空格使用符合常规 C/Python 风格即可。"),s.perturb){var c=["代码风格:变量名简洁直观,适当使用局部变量,不要多余注释。","代码风格:命名略微口语化,表达式顺序自然,减少不必要的临时变量。","代码风格:优先使用基础循环和简单条件分支,写法贴近初学者手写。","代码风格:紧凑排版,关键步骤保留简短注释,空格习惯自然。"];o.push("【风格随机】"+c[Math.floor(Math.random()*c.length)])}return o.join("\n\n")}(e,t,o),u=n.supportsImages&&a.images&&t.images&&t.images.length&&vt(s.provider,a.model,a.modelMeta&&a.modelMeta[a.model]);u&&(d=[{type:"text",text:d}].concat(t.images.map(function(e){return{type:"image_url",image_url:{url:e}}})));var m={type:e,data:t,language:Ye(t.language||s.language||"auto",[t.description,t.code,t.previousCode,t.interfaceCode,t.frameworkCode,t.supportCode,t.referenceCode].filter(Boolean).join("\n")),perturb:!!s.perturb,images:u?t.images:[]};return yt([{role:"system",content:p},{role:"user",content:d}],c,o,l&&l.signal,m)}function Tt(e){var t=String(e||"").replace(/\r\n?/g,"\n");if(/^\s*"[\s\S]*"\s*$/.test(t))try{var n=JSON.parse(t);"string"==typeof n&&(t=n)}catch(e){}return t}function Mt(e,t,n){var r=document.createElement("code");if(r.className="pta-assist-math-fallback",r.textContent=e,r.title="公式无法排版,显示原始 LaTeX",e.length>12e3)return r;n&&(e=e.replace(/\\\\(?=[a-zA-Z{}()[\]])/g,"\\"));try{if(!I||"function"!=typeof DOMParser)return r;var a=I.renderToString(e,{output:"mathml",displayMode:t,throwOnError:!0,trust:!1,strict:"error",maxExpand:500,maxSize:20}),o=(new DOMParser).parseFromString(a,"text/html").querySelector("math");if(!o)return r;var i=/^(math|semantics|annotation|mrow|mi|mn|mo|mtext|mspace|msup|msub|msubsup|mfrac|msqrt|mroot|mover|munder|munderover|mtable|mtr|mtd|mstyle|mpadded|mphantom|menclose)$/,s=/^(display|mathvariant|mathsize|mathcolor|mathbackground|displaystyle|scriptlevel|stretchy|symmetric|fence|separator|accent|accentunder|lspace|rspace|linethickness|columnalign|rowalign|columnspacing|rowspacing|columnlines|rowlines|frame|width|height|depth|voffset|notation|encoding|maxsize|minsize|movablelimits)$/;function c(e){if(3===e.nodeType)return document.createTextNode(e.textContent);if(1!==e.nodeType||!i.test(e.localName))return document.createTextNode(e.textContent||"");var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",e.localName);return Array.prototype.forEach.call(e.attributes,function(e){s.test(e.name)&&!/url\s*\(|javascript:|data:|https?:/i.test(e.value)&&t.setAttribute(e.name,e.value)}),Array.prototype.forEach.call(e.childNodes,function(e){t.appendChild(c(e))}),t}var l=c(o);return l.setAttribute("aria-label",e),l}catch(p){return r}}function Bt(e,t,n){if((n=n||0)>8)e.appendChild(document.createTextNode(t));else{for(var r,a=/(`+)([\s\S]*?)\1|\\\\\(([\s\S]*?)\\\\\)|\\\\\[([\s\S]*?)\\\\\]|\\\(([\s\S]*?)\\\)|\\\[([\s\S]*?)\\\]|\$\$([\s\S]*?)\$\$|\$([^$\n]+?)\$|\*\*([^*\n]+)\*\*|__([^_\n]+)__|\*([^*\n]+)\*/g,o=0;r=a.exec(t);){var i;e.appendChild(document.createTextNode(t.slice(o,r.index))),r[1]?(i=document.createElement("code")).textContent=r[2]:void 0!==r[3]||void 0!==r[4]||void 0!==r[5]||void 0!==r[6]||void 0!==r[7]||void 0!==r[8]?i=Mt(void 0!==r[3]?r[3]:void 0!==r[4]?r[4]:void 0!==r[5]?r[5]:void 0!==r[6]?r[6]:void 0!==r[7]?r[7]:r[8],void 0!==r[4]||void 0!==r[6]||void 0!==r[7],void 0!==r[3]||void 0!==r[4]):Bt(i=document.createElement(void 0!==r[11]?"em":"strong"),r[9]||r[10]||r[11],n+1),e.appendChild(i),o=a.lastIndex}e.appendChild(document.createTextNode(t.slice(o)))}}function Nt(e){var t=document.createElement("div");t.className="pta-assist-rendered",t.tabIndex=0;var n=Tt(e);if(n.length>2e5)return t.textContent=n,t.className+=" pta-assist-plain",t;var r=n.split("\n"),a=0;function o(e,n){var r=document.createElement(e);return Bt(r,n),t.appendChild(r),r}for(;a\s?/.test(s)){for(var m=[];a/.test(r[a]);)m.push(r[a++].replace(/^\s*>\s?/,""));o("blockquote",m.join("\n"))}else if(/^\s*(?:[-+*]|\d+[.)])\s+/.test(s)){for(var h=/^\s*\d/.test(s),g=document.createElement(h?"ol":"ul"),f=h?/^\s*\d+[.)]\s+(.+)$/:/^\s*[-+*]\s+(.+)$/;a|[-+*]\s|\d+[.)]\s)/.test(r[a]);)v.push(r[a++]);o("p",v.join("\n"))}else a++}return t}function zt(e){if(!e||null!==e.answer||"unknown"!==e.answerSource)return{error:"已有答案或来源并非未知,不进行 AI 补全。",skip:!0};var t="string"==typeof e.id?e.id:Number.isSafeInteger(e.id)?String(e.id):"";if(!t.trim()||t.length>200)return{error:"题目标识缺失或无效。"};var n=function(e){var t={1:"judge",2:"choice",3:"multi_choice",4:"fill",TRUE_OR_FALSE:"judge",MULTIPLE_CHOICE:"choice",MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER:"multi_choice",FILL_IN_THE_BLANK:"fill",judge:"judge",choice:"choice",multi_choice:"multi_choice",fill:"fill"};return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}(e.type);if(!n)return{error:"仅支持缺答案的单选、多选和填空小题。"};if("string"!=typeof e.content||!e.content.trim()||e.content.length>5e4)return{error:"题干缺失或过长,未发送给 AI。"};var r={id:t,type:n,content:e.content};if("fill"===n){if(!Number.isInteger(e.blankCount)||e.blankCount<1||e.blankCount>50)return{error:"缺少可靠的填空数量,不能猜测空数。"};r.blankCount=e.blankCount}else{if(!Array.isArray(e.choices)||e.choices.length<2||e.choices.length>26)return{error:"选项缺失或数量无效。"};var a={},o=!0;if(r.choices=e.choices.map(function(e,t){var n="string"==typeof e||e&&void 0===e.label?String.fromCharCode(65+t):e&&e.label,r="string"==typeof e?e:e&&(void 0===e.text?e.content:e.text);return e&&"object"==typeof e&&void 0!==e.text&&void 0!==e.content&&e.text!==e.content&&(o=!1),("string"!=typeof n||!/^[A-Z]$/.test(n)||a[n]||"string"!=typeof r||!r.trim()||r.length>1e4)&&(o=!1),a[n]=!0,{label:n,text:r}}),!o||JSON.stringify(r.choices).length>5e4)return{error:"选项字母/内容缺失、重复或过长,无法可靠映射。"}}return{value:r}}function Ot(e,t){if("string"!=typeof e||e.length>1e5)throw new Error("模型回复为空或过长。");var n;try{n=JSON.parse(e)}catch(e){throw new Error("模型未返回严格 JSON,未采纳答案。")}if(!n||Array.isArray(n)||"object"!=typeof n||"answer,explanation"!==Object.keys(n).sort().join(","))throw new Error("模型回复结构不符合要求。");if("string"!=typeof n.explanation||!n.explanation.trim()||n.explanation.length>2e4)throw new Error("模型解析缺失或过长。");if(null===n.answer)throw new Error("模型无法确定答案,保留未知状态。");if(!Array.isArray(n.answer)||!n.answer.length||n.answer.some(function(e){return"string"!=typeof e||!e.trim()||e.length>1e4}))throw new Error("模型答案格式无效。");if("fill"===t.type){if(n.answer.some(function(e){return/^(未知|不确定|无法确定|无法判断|不知道|信息不足|unknown|uncertain|n\/a)$/i.test(e.trim())}))throw new Error("模型未能确定填空答案,保留未知状态。");if(n.answer.length!==t.blankCount)throw new Error("模型答案数量与题目空数不一致。")}else{var r=t.choices.map(function(e){return e.label});if("multi_choice"!==t.type&&1!==n.answer.length)throw new Error("单选题不能采纳多个选项。");if(n.answer.some(function(e,t){return r.indexOf(e)<0||n.answer.indexOf(e)!==t}))throw new Error("模型选择了不存在或重复的选项。")}return{answer:n.answer.slice(),explanation:n.explanation}}async function Lt(e,t){if(t=t||{},!Array.isArray(e))throw new Error("题目列表格式无效。");var n=s.configs[s.provider]||{},r=s.provider,a={provider:r,model:"string"==typeof n.model?n.model:""},o=JSON.stringify([r,n.model,n.apiKey,n.maxTokens,n.thinking]),i=new AbortController,l=i.signal;function c(){i.abort()}function p(){if(l.aborted)return!1;try{return function(){var e=s.configs[s.provider]||{};return JSON.stringify([s.provider,e.model,e.apiKey,e.maxTokens,e.thinking])===o}()&&(!t.isCurrent||t.isCurrent())}catch(e){return!1}}t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c,{once:!0}));var d=Object.create(null);e.forEach(function(e){var t=e&&String(e.id);d[t]=(d[t]||0)+1});var u=e.map(function(e,t){var n=t>=50?{error:"每批最多补全 50 题,请分批重试。"}:zt(e),r=e&&("string"==typeof e.id||Number.isSafeInteger(e.id))?String(e.id):"",a=n.error||(t>=50?"每批最多补全 50 题,请分批重试。":d[r]>1?"题目标识重复,不能可靠绑定答案。":"");return{question:e,snapshot:n.value,signature:n.value&&JSON.stringify(n.value),result:{questionId:r,status:a?n.skip?"skipped":"failed":"pending",answer:null,answerSource:"unknown",message:a}}});function m(e,n){if(e.result=Object.assign({},e.result,n),t.onUpdate)try{t.onUpdate(Object.assign({},e.result,{answer:e.result.answer&&e.result.answer.slice(),model:e.result.model&&Object.assign({},e.result.model)}))}catch(e){}}function h(e){var t=zt(e.question);return t.value&&JSON.stringify(t.value)===e.signature}var g=0,f=Math.floor(Number(t.concurrency)),b=Number.isFinite(f)&&f>0?Math.min(10,f):1;try{await Promise.all(Array.from({length:Math.min(b,u.length)},async function(){for(;gwindow.innerHeight)l(!1);else{var r=function(e,t,n,r,a){var o=Math.max(0,Math.min(440,r-24)),i=Math.max(0,Math.min(n,a-24)),s=Math.max(12,Math.min(e.right-o,r-o-12)),l=e.bottom+8;return l+i>a-12&&(l=e.top-8-i),{left:s,top:Math.max(12,Math.min(l,a-i-12)),width:o,maxHeight:Math.max(0,a-24)}}(e,0,Math.min(560,n.scrollHeight||560),window.innerWidth,window.innerHeight);n.style.left=r.left+"px",n.style.top=r.top+"px",n.style.width=r.width+"px",n.style.maxHeight=Math.min(560,r.maxHeight)+"px"}}else l(!1)}function p(e){"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),l())}function d(e){n.contains(e.target)||t.contains(e.target)||l(!1)}function u(e){n.contains(e.target)||t.contains(e.target)||l(!1)}}function Yt(e){var t=document.createElement("div");t.className="pta-assist";var n=document.createElement("div");n.className="pta-assist-actions";var r=document.createElement("button");r.type="button",r.textContent=e.failed?"查看解析 · 失败":"查看解析",r.setAttribute("aria-haspopup","dialog"),r.setAttribute("aria-expanded","false"),r.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),Ut(e,r)});var a=document.createElement("span");a.textContent=Pt(e.type)?"仅思路与语句示例 · 不自动填写":"AI 参考 · 不自动填写或保存",n.appendChild(a),n.appendChild(r),t.appendChild(n);var o=function(e){if(!e||!e.querySelectorAll)return null;function t(e){if(!e||!e.querySelectorAll)return null;var t=Array.prototype.slice.call(e.querySelectorAll('button[class*="label_"], span.text-lg.font-bold, h1, h2, h3, [data-question-title]')).filter(function(e){return/^R?\d+[--]\d+(?:\s|$)/i.test(Oe(e))&&!e.closest(".rendered-markdown, .pta-assist, nav, aside, a")});if(1!==t.length)return null;var n=t[0].parentElement;return n&&n.classList.contains("flex")&&!n.querySelector(".rendered-markdown")?n:null}var n=t(e);if(n)return n;for(var r=e,a=0;a<5&&r&&r.parentElement&&r.parentElement!==document.body;a++,r=r.parentElement){var o=r.previousElementSibling;if(o&&!o.matches(".rendered-markdown")&&!o.querySelector(".rendered-markdown")){var i=t(o);if(i)return i}}return null}(e.group.problem);o?(t.className+=" pta-assist-in-heading",t.title=a.textContent,a.hidden=!0,o.appendChild(t)):(t.className+=" pta-assist-fallback",e.group.problem.appendChild(t)),e.ui=t}function Vt(e){return document.documentElement.contains(e.group.problem)&&(!e.ui||document.documentElement.contains(e.ui))&&JSON.stringify(Dt(e.group,e.type))===e.signature}function Xt(e,t){var n=document.getElementById("pta-log");if(n){var r=document.createElement("div");r.className="pta-log-item "+(t||"info"),r.innerHTML=''+Kt(e)+"",n.appendChild(r),n.scrollTop=n.scrollHeight;var a=document.getElementById("pta-log-count");a&&(a.textContent=n.children.length)}console.log("[PTA Neuron Copilot] "+e)}function Kt(e){return String(e).replace(/[&<>"']/g,function(e){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[e]})}function Zt(){var e=document.getElementById("pta-continuous");return e?e.checked:s.continuous}function Wt(){var e=document.getElementById("pta-skip");return e?e.checked:s.skipAnswered}function _t(e,t,n){var r=document.getElementById("pta-progress-title"),a=document.getElementById("pta-progress-count"),o=document.getElementById("pta-progress-fill");r&&(r.textContent=e),a&&(a.textContent=n?t+" / "+n:"准备中"),o&&(o.style.width=n?Math.min(100,t/n*100)+"%":"8%")}function $t(){return ze("button").find(function(e){return/下一题|下一道|next/i.test(Oe(e))&&!e.disabled})}function en(){var e=$t();return!!e&&(e.click(),!0)}function tn(){return!$t()||/完成考试|提交试卷|考试结束|查看成绩/.test(Oe(document.body))}function nn(e){try{var t=new URL(e,location.href),n=t.pathname.match(/^\/problem-sets\/([^/]+)\/exam\/problems\/type\/([1-7])\/?$/);return n?{origin:t.origin,set:n[1],id:n[2],path:t.pathname.replace(/\/$/,""),url:t.href}:null}catch(e){return null}}function rn(e){var t;return{nodes:t=(t="judge"===e||"choice"===e||"multi_choice"===e?rt().map(function(e){return e.problem}):"fill"===e?it().map(function(e){return e.problem}):"program_fill"===e?st().map(function(e){return e.problem}):ze(".rendered-markdown").filter(function(e){return!(e.closest&&e.closest("#pta-root"))})).filter(function(e){return e&&!(e.closest&&e.closest("#pta-root"))}),text:t.map(Oe).join("\n")}}async function an(e,t){if(!s.running||s.runId!==t||!Zt()||s.pageErrors)return!1;var n=function(e){var t=nn(location.href);if(!t)return null;var n={1:"判断题",2:"单选题",3:"多选题",4:"填空题",5:"程序填空题|程序填空",6:"函数题",7:"编程题"},r={},a=[];ze("a[href]").forEach(function(e){var o=nn(e.href||e.getAttribute("href"));if(o&&o.origin===t.origin&&o.set===t.set&&!r[o.id]){var i=Oe(e).match(new RegExp("^\\s*(?:"+n[o.id]+")\\s*(\\d+)\\s*/\\s*(\\d+)\\s*$"));i&&(r[o.id]=!0,a.push({link:e,route:o,answered:Number(i[1]),total:Number(i[2])}))}});var o=a.findIndex(function(e){return e.route.id===t.id});return o<0?null:a.slice(o+1).find(function(t){return t.total>0&&t.answered=2))return Xt("当前题型完成,切换到下一题型","success"),!0}await Ne(200)}return s.running&&s.runId===t&&(s.pageErrors=!0),Xt("题型切换未完成或已停止,未继续填写","warning"),!1}function on(){var e=function(){var e=location.pathname.match(/\/exam\/problems\/type\/(\d+)/),t=location.href.match(/[?&]problemSetProblemId=([^&#]+)/),n=t?decodeURIComponent(t[1]):"",r=ze("a").map(function(t){var n=(t.href||t.getAttribute("href")||"").match(/\/exam\/problems\/type\/(\d+)[?&]problemSetProblemId=([^&#]+)/);return!n||e&&n[1]!==e[1]?"":decodeURIComponent(n[2])}).filter(Boolean).filter(function(e,t,n){return n.indexOf(e)===t}),a=n?r.indexOf(n)+1:0;if(a>0&&r.length>0)return{current:a,total:r.length};var o=e&&{1:"判断题",2:"单选题",3:"多选题",4:"填空题",5:"程序填空题|程序填空",6:"函数题",7:"编程题"}[e[1]];if(!o)return null;for(var i=new RegExp("(?:^|\\s)(?:"+o+")\\s*(\\d+)\\s*/\\s*(\\d+)(?:\\s|$)"),s=ze("a").filter(function(e){return(e.href||e.getAttribute("href")||"").split(/[?#]/)[0].replace(/\/$/,"")===location.href.split(/[?#]/)[0].replace(/\/$/,"")}),l=null,c=0;c0})))return!1;var o=function(e){if(!e)return"";var t=e.getAttribute&&(e.getAttribute("data-problem-id")||e.getAttribute("data-question-id")||e.getAttribute("id"));if(t)return"id:"+t;var n=Oe(e).match(/(?:^|\s)(R\d+-\d+)(?:\s|$)/);return n?"label:"+n[1]:(M.objectIds.has(e)||M.objectIds.set(e,++M.nextId),"node:"+M.objectIds.get(e))}(e);return!(!o||M.written.has(o)||(M.written.add(o),M.current=Math.min(a.total,a.current+1),0))}function cn(e,t,n){var r=on();_t(e,r?r.current:t||0,r?r.total:n||0)}function pn(){return ze('[role="dialog"], .ant-modal-content, .modal-content, .pc-modal-container').find(function(e){return e.getClientRects().length&&/提交结果/.test(Oe(e))})||null}function dn(){var e=sn(location.href);return(N.url!==location.href||e&&N.signature&&e!==N.signature)&&(N={url:location.href,items:[]}),e&&(N.signature=e),N.items}function un(e){var t=dn(),n=e.allInputs||e.inputs,r={problem:e.problem,inputs:n.slice(),values:n.map(function(e){return[e.value,e.checked]})},a=t.findIndex(function(t){return t.problem===e.problem||e.problem.id&&t.problem.id===e.problem.id});a<0?t.push(r):t[a]=r}async function mn(e){if(!vn())return s.pageErrors=!0,Xt("上次保存状态未确认,请刷新页面后再试","warning"),0;var t,n=s.runId,r=location.href,a=s.routeRevision,o=function(){return s.running&&s.runId===n&&location.href===r&&s.routeRevision===a},i=(on(),{page:M.page,generation:M.generation}),c=(t="fill"===e?it():"program_fill"===e?st():rt(function(t){var n=t.closest("label"),r=n&&/^(T|F|正确|错误)\b/i.test(Oe(n));return!n||("judge"===e?r:!r)})).map(function(t,n){return function(e,t,n,r){var a=/^(choice|multi_choice|judge)$/.test(t);if(a&&Wt()&&at(e))return null;var o=e.inputs.filter(function(e){return!e.disabled&&!e.readOnly&&(a||!e.value.trim())});if(!o.length||a&&o.length!==e.inputs.length)return null;var i=Ke(e.problem),c=a?Ve(e.problem):null;if(a&&(!c||!c.length))return null;var p,d,u=a?at(e):e.inputs.every(function(e){return e.value.trim().length>0}),m=o.map(function(e){return a?e.checked:e.value}),h=e.inputs.map(function(e){return a?e.checked:e.value}),g="program_fill"===t?De(e.editor):"",f={description:i,options:c,images:Xe(e.problem),language:Ue(g||i,s.language)};if(!a){f.blankCount=o.length;var b=o.map(function(t){return e.inputs.indexOf(t)+1});f.description+="\n【填空定位】本题共 "+e.inputs.length+" 空,仅回答第 "+b.join("、")+" 空,按上述顺序用 | 分隔,不要输出其他空。";var v=e.inputs.map(function(e,t){return e.value.trim()?"第 "+(t+1)+" 空:"+e.value:""}).filter(Boolean);v.length&&(f.description+="\n【已填写,仅作上下文】\n"+v.join("\n"))}if("program_fill"===t){var x=0;f.code=g.replace(/______+/g,function(){return"【空"+ ++x+"】"})}var A=c&&c.map(function(e){return e.label+":"+e.text}).join("\n");return{label:"第 "+(n+1)+" 题",valid:function(){if(!document.documentElement.contains(e.problem)||Ke(e.problem)!==i)return!1;if(!e.inputs.every(function(e,t){return(a?e.checked:e.value)===h[t]}))return!1;if(!o.every(function(t,n){return document.documentElement.contains(t)&&e.problem.contains(t)&&!t.disabled&&!t.readOnly&&(a?t.checked:t.value)===m[n]}))return!1;if("program_fill"===t&&De(e.editor)!==g)return!1;if(a){var n=Ve(e.problem);if(!n||n.map(function(e){return e.label+":"+e.text}).join("\n")!==A)return!1;if(!n.every(function(e,t){return c[t]&&e.input===c[t].input}))return!1}return!0},reveal:function(){document.documentElement.contains(e.problem)&&"function"==typeof e.problem.scrollIntoView&&e.problem.scrollIntoView({behavior:"smooth",block:"center"})},problem:e.problem,inputs:o,allInputs:e.inputs,wasAnswered:u,progressToken:r,request:async function(){await At(l&&l.signal),p=y;var r=St(d=Et("answer",t,f,e.problem,n),w);return null===r?It(t,f):Promise.resolve(r)},cacheAccepted:function(e){Ct(d,e,p)},apply:function(n){if(a)return function(e,t,n){var r=ot(t),a=Ve(e);if(!a)return!1;var o=r.toLowerCase(),i=/^(true|正确|对|yes|t|1)$/.test(o),s=/^(false|错误|错|no|f|0)$/.test(o),l=[];if(i||s)l=[i?"T":"F"];else{var c=r.toUpperCase().match(/^(?:答案\s*(?:是|为|[::])?\s*)?([A-F](?:[\s,,、]*[A-F])*)[.。]?$/);if(!c)return!1;var p=c[1].match(/[A-F]/g)||[];if(!n&&1!==p.length)return!1;l=p}var d=!1;if(a.forEach(function(e){var t=e.label||(e.text.match(/^\s*([A-F])/i)||[])[1];t&&l.indexOf(t.toUpperCase())>=0&&e.input&&(e.input.click(),d=!0)}),!d&&2===a.length&&(i||s)){var u=a[i?0:1];u&&u.input&&(u.input.click(),d=!0)}return d}(e.problem,n,"multi_choice"===t)?1:0;var r=ot(n).split("|").map(function(e){return e.trim()});if(r.length!==o.length||r.some(function(e){return!e}))return 0;var i=0;return o.forEach(function(e,t){document.documentElement.contains(e)&&e.value===m[t]&&Ge(e,r[t])&&i++}),i===o.length?1:0}}}(t,e,n,i)}).filter(Boolean);if(!c.length)return t.length&&function(e){if(dn().length)return!0;var t=yn(e);return!(!t.button||!/\d+\s*题答案待保存/.test(Oe(t.button.parentElement)))}(t[0].problem)&&(s.pageErrors=!0,Xt("页面仍有未确认的保存状态,请手动保存并刷新后再继续","warning")),0;Xt("同页 "+c.length+" 题,最多 "+(Zt()?Ce(s.concurrency):1)+" 个并发请求","info");var p=await function(e,t){var n=0,r=0,a=0,o=0,i=0,l=!1,c=[],p=!Zt(),d=-1;function u(e,n){if(t()&&!(n<=d)){d=n;try{"function"==typeof e.reveal&&e.reveal()}catch(e){}}}return new Promise(function(d){!function m(){var h=!l&&t()&&(!p&&Zt()||0===n),g=Ce(s.concurrency);for(we()||(g=Math.min(g,2)),!p&&Zt()||(g=1);h&&n=e.length||l||!t()||(p||!Zt())&&n>0)&&d({written:o,failed:i,applied:c})}()})}(c,o);if(!o())return 0;if(p.failed)return s.pageErrors=!0,Xt("存在未完成题目,本页未自动保存,请检查后手动保存或重试","warning"),p.written;if(p.written){var d=z.then(async function(){if(!o())return{status:"cancelled"};if(!dn().every(function(e){return document.documentElement.contains(e.problem)&&e.inputs.every(function(t,n){return document.documentElement.contains(t)&&e.problem.contains(t)&&t.value===e.values[n][0]&&t.checked===e.values[n][1]})}))return{status:"changed"};var e=dn(),t=e[0].problem,n=t.closest&&t.closest("main")||t,r=[];return e.forEach(function(e){r=r.concat(e.inputs)}),r.every(function(e){return n.contains(e)})?function(e,t,n){var r=location.href,a=s.runId,o=s.routeRevision,i=(t||[]).slice(),l=i.map(function(e){return[e.value,e.checked]}),c=function(){return s.running&&s.runId===a&&location.href===r&&s.routeRevision===o&&(!n||n())&&document.documentElement.contains(e)&&i.every(function(t,n){return document.documentElement.contains(t)&&e.contains(t)&&t.value===l[n][0]&&t.checked===l[n][1]})},p=!1,d=async function(){if(!vn())return{status:"unverified",clicked:!1};var t=!1,n=!1,a=Date.now()+8e3;for(await Ne(100);Date.now()1)return{status:"ambiguous"};if(1===n.length)return{button:n[0]};var r=e.closest&&e.closest("main");if(!r)return{status:"missing"};var a=ze("button",r).filter(function(e){return t(e)&&e.closest(".sticky.bottom-0")});return 1!==a.length?{status:a.length?"ambiguous":"missing"}:{button:a[0]}}function wn(e){var t=String(e||"").trim();return/c\+\+|\bcpp\b/i.test(t)?"cpp":/(^|[^a-z])java(?![a-z])/i.test(t)?"java":/(^|[^a-z])python(?![a-z])/i.test(t)?"python":/pascal|delphi/i.test(t)?"pascal":/(^|[^a-z])c(?:\d{2})?(?![a-z+])/i.test(t)?"c":""}function xn(e){return e&&e.closest&&(e.closest('[class*="CodingProblemAnswerForm"]')||e.closest("form"))}function An(e){var t=ze(".select__control",e).filter(function(e){return e.getClientRects().length&&!(e.closest&&e.closest('#pta-root, [role="dialog"], .pc-modal-container'))});if(1!==t.length)throw new Error("未找到唯一的 PTA 编译语言选择器,已停止,请手动确认页面");return t[0]}function kn(e){var t=e.querySelector(".select__single-value");return t?Oe(t):""}function En(e,t){for(var n=((t.getAttribute("aria-controls")||"")+" "+(t.getAttribute("aria-owns")||"")).trim().split(/\s+/).filter(Boolean),r=0;r=4)return R.targetCode=A,Xt("PTA 编译语言已切换为 "+kn(y),"info"),{editor:f,language:r}}else b=0;await Ne(150)}throw d(),new Error("编译语言切换后编辑器未就绪,已停止;如需原代码,请点“切换前代码”复制,刷新会丢失快照")}async function In(e){var t,n=s.runId,r=location.href,a=s.routeRevision,o=function(){return s.running&&s.runId===n&&location.href===r&&s.routeRevision===a},i=ze(".rendered-markdown")[0]||document.querySelector("section");if(!i)return{processed:0,fullScore:!1};cn("读取题目",1,1),(t=pn())&&Oe(t),function(){var e=pn();if(!e)return!1;var t=ze("button",e).find(function(e){return/^(确认|关闭|返回)$/.test(Oe(e))||/close|关闭/i.test(e.getAttribute("aria-label")||"")});t&&(void 0!==be&&be.enabled&&Ka("before-close-submission-result"),t.click())}();for(var c="programming"===e?tt(i):nt(i),d=null;o();){if(cn("生成答案",1,1),d&&document.documentElement.contains(d)||(d=Qe(Wt())),!d)return Wt()&&Qe(!1)?(cn("已跳过",1,1),Xt("当前题已有答案,已跳过","info"),{processed:0,fullScore:!1,skipped:!0}):(Xt("未找到可写代码编辑器","warning"),{processed:0,fullScore:!1});var u=await Cn(d,c,o);if(!o())return{processed:0,fullScore:!1};if(d=u.editor,Wt()&&!Pe(d))return Xt("目标语言已有答案,已跳过","info"),{processed:0,fullScore:!1,skipped:!0};i=ze(".rendered-markdown")[0]||i,c="programming"===e?tt(i):nt(i);var m=De(d),h=Ke(i),g={description:(c.fullText||c.desc||Ke(i))+"",code:m,previousCode:"",interfaceCode:c.interfaceCode,supportCode:c.supportCode,frameworkCode:c.frameworkCode,referenceCode:c.referenceCode,input:c.input,output:c.output,sampleInput:c.sampleInput,sampleOutput:c.sampleOutput,images:c.images||Xe(i),language:u.language};if(await At(l&&l.signal),!o())return{processed:0,fullScore:!1};var f=St(Et("answer",e,g,i),w||!1);if(null===f&&(f=await It(e,g)),!o())return{processed:0,fullScore:!1};if(!document.documentElement.contains(i)||Ke(i)!==h||!Sn(d,u.language)||De(d)!==m)throw new Error("模型生成期间编译器或代码发生变化,已停止,未覆盖当前答案");var b=ot(f,!0);if(p.buffer=b,p.index=0,p.editor=d,p.active){Xt("打字机模式:答案已缓存,按任意键逐字输入,输完手动提交","success"),Ra("答案已缓存","打字机模式:按任意键逐字输入","ok");var v=document.getElementById("pta-root");return v&&v.classList.add("tw-ready"),{processed:1,fullScore:!1}}return Fe(d,b)?(cn("代码已写入",1,1),Xt("代码已写入编辑器,手动检查后提交","success"),Ra("代码已写入","请手动检查并提交","ok"),{processed:1,fullScore:!1}):(Xt("代码已复制,请在编辑器中手动粘贴","warning"),{processed:0,fullScore:!1})}return{processed:1,fullScore:!1}}function Tn(e){if(!1!==s.notifications){var t=document.querySelector(".pta-toast");t&&t.remove();var n=document.createElement("div");n.className="pta-toast",n.textContent=e,document.body.appendChild(n),setTimeout(function(){n.classList.add("out"),setTimeout(function(){n.remove()},250)},2200)}}function Mn(e){return/^\/problem-sets\/(dashboard|active|all)\/?$/.test(e||"")||/^\/home(?:\/|$)/.test(e||"")}function Bn(){return/^\/problem-sets\/\d{1,25}\/exam(?:\/|$)/.test(location.pathname)}function Nn(){return Mn(location.pathname)||Bn()&&P.open}function zn(e){if(Bn()&&P.host){if(P.open=!!e,P.path=location.pathname,aa(P.open?"catalogue":"answer"),P.host.classList.toggle("open",P.open),P.button.setAttribute("aria-expanded",String(P.open)),P.button.setAttribute("aria-label",P.open?"收起班级题集":"展开班级题集"),P.button.querySelector("span").textContent=P.open?"▴":"▾",P.fold.inert=!P.open,P.fold.setAttribute("aria-hidden",String(!P.open)),!P.open)return P.fold.contains(document.activeElement)&&P.button.focus(),H.job&&(H.job.controller.abort(),clearTimeout(H.job.timer),H.job=null,H.run++),"loading"===H.status&&(H.status="partial",H.message="已暂停读取,保留当前目录;展开可继续"),void H.rows.forEach(function(e){"loading"===e.metricsState&&(e.metricsState="unavailable")});var t=Qn();if(H.rows.length&&"ready"===H.status&&t)ra();else{ir();var n=location.pathname.match(/^\/problem-sets\/(\d+)/);n&&(U.ids.set(n[1],Date.now()),or()),lr()}}}function On(e){var t=String(e||"").match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2})(?::(\d{2}))?$/);if(!t)return 1/0;var n=+t[1],r=+t[2],a=+t[3],o=+t[4],i=+t[5],s=+(t[6]||0),l=new Date(n,r-1,a,o,i,s),c=l.getTime();return r>=1&&r<=12&&l.getFullYear()===n&&l.getMonth()===r-1&&l.getDate()===a&&l.getHours()===o&&l.getMinutes()===i&&o<24&&i<60&&s<60?c:1/0}function Ln(e){var t=new Map;e.forEach(function(e){(e.groups&&e.groups.length?e.groups:[{id:"",name:e.group}]).forEach(function(n){var r=n.id?"id:"+n.id:"name:"+n.name;t.has(r)||t.set(r,{key:r,name:n.name,items:[]}),t.get(r).items.push(e)})});var n=Array.from(t.values()),r=Date.now();function a(e){var t=Number.isFinite(e.endTime)?e.endTime:e.deadlineOrder;return Number.isFinite(t)&&t>0?{rank:t<=r?2:0,deadline:t}:{rank:"ended"===e.lifecycle?2:1,deadline:1/0}}return n.forEach(function(e){e.items.sort(function(e,t){var n=a(e),r=a(t);return n.rank-r.rank||(n.deadline===r.deadline?0:n.deadline-r.deadline)||e.title.localeCompare(t.title)})}),n.sort(function(e,t){return/^(未标注班级|班级待确认)$/.test(e.name)?1:/^(未标注班级|班级待确认)$/.test(t.name)?-1:e.name.localeCompare(t.name)}),{count:e.length,groups:n}}function Rn(e){var t=new Set,n=[];return Ln(e).groups.forEach(function(e){e.items.forEach(function(e){"active"!==e.lifecycle||t.has(e.id)||(t.add(e.id),n.push(e))})}),n}function Dn(e){var t=new Error(e);return t.catalogueCode=e,t}function Pn(e){if(H.job!==e||H.suspended||!Nn())throw Dn("cancelled");if(Date.now()>=e.deadline)throw Dn("deadline");if(e.controller.signal.aborted)throw Dn("cancelled")}function Hn(){void 0!==Q&&Q&&Q.dirty&&Un(),H.job&&(H.job.controller.abort(),clearTimeout(H.job.timer)),H.job=null,H.run++,H.rows=[],H.status="idle",H.message="",H.total=null,H.source="dom",H.domSignature="",H.failure="",H.directoryComplete=!1,H.cacheVerified=!1,H.snapshotAt=null}function qn(){if("dom"===H.source&&!H.suspended&&Nn()){var e=function(e){var t=new Set,n=[];return Array.from(e.querySelectorAll('.pc-list a[href*="/overview"]')).forEach(function(e){if(!e.closest("#pta-root")){var r=function(e){var t;try{t=new URL(e.getAttribute("href"),location.origin)}catch(e){return null}var n=t.pathname.match(/^\/problem-sets\/(\d+)\/overview\/?$/);if(t.origin!==location.origin||!n)return null;var r=e.querySelector(".font-bold"),a=r&&r.textContent.trim();if(!a)return null;var o=Array.from(e.querySelectorAll("span")),i=o.find(function(e){return/^来源用户组\s*[::]$/.test(e.textContent.trim())}),s=i&&i.nextElementSibling?i.nextElementSibling.textContent.trim():"",l=(e.textContent||"").match(/关闭时间\s*[::]\s*(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}(?::\d{2})?)/),c=l?l[1]:"",p=[];return o.forEach(function(e){var t=e.textContent.trim();/^(已开放|已关闭|未开放|已开考|未开考)$/.test(t)&&p.indexOf(t)<0&&p.push(t)}),{id:n[1],title:a,group:s||"未标注班级",deadline:c,deadlineOrder:On(c),status:p.join(" · ")||"状态未提供",href:t.origin+"/problem-sets/"+n[1]+"/exam"}}(e);r&&!t.has(r.id)&&(t.add(r.id),n.push(r))}}),n}(document),t=function(){var e=document.querySelector('[class*="paginationSummary_"]'),t=e&&e.textContent.match(/显示\s*(\d+)\s*至\s*(\d+)\s*条[,,]\s*共\s*(\d+)\s*条/);if(!t)return null;var n=+t[1],r=+t[2],a=+t[3];return n>=0&&r>=n&&a>=r?{start:n,end:r,total:a}:null}(),n=JSON.stringify({rows:e,page:t});n!==H.domSignature&&(H.domSignature=n,e.forEach(function(e){e.metricsState="unavailable"}),H.rows=e,H.total=t?t.total:null),"loading"!==H.status&&(H.message="当前页 "+e.length+(t?"/"+t.total:"")+" 个题集。"+(H.failure?H.failure+"。":"后台数据未读取。"))}}function jn(e,t,n,r){if(void 0!==ge&&ge.enabled){var a=Pa(e,"GET");a&&(["json","html","empty","non-json"].indexOf(n)<0||Qa(a,t,void 0,"catalogue fetch: "+n+"; bytes="+r,ge.generation))}}function Qn(){return!F||Date.now()6e4?null:{userId:F.userId,verifiedAt:F.verifiedAt}}function Fn(e){if(!e||"string"!=typeof e.id||!/^\d{1,25}$/.test(e.id)||"string"!=typeof e.title)return null;var t=[];return Array.isArray(e.groups)&&e.groups.slice(0,20).forEach(function(e){e&&"string"==typeof e.id&&/^\d{1,25}$/.test(e.id)&&"string"==typeof e.name&&t.push({id:e.id,name:e.name.slice(0,200)})}),{id:e.id,title:e.title.slice(0,300),groups:t,groupsVerified:!0===e.groupsVerified&&Array.isArray(e.groups)&&t.length===e.groups.length,listedExamId:"string"==typeof e.listedExamId&&/^\d{1,25}$/.test(e.listedExamId)?e.listedExamId:null,deadlineOrder:Number.isFinite(e.deadlineOrder)?e.deadlineOrder:null,startTime:Number.isFinite(e.startTime)?e.startTime:null,endTime:Number.isFinite(e.endTime)?e.endTime:null}}function Gn(e){return"function"==typeof TextEncoder?(new TextEncoder).encode(e).length:3*e.length}function Jn(e){if("string"!=typeof e||e.length>1048576||Gn(e)>1048576)return null;var t;try{t=JSON.parse(e)}catch(e){return null}if(!t||1!==t.version||"string"!=typeof t.owner||!/^\d{1,25}$/.test(t.owner)||!Array.isArray(t.entries)||t.entries.length>500)return null;var n=Date.now(),r=[],a=new Set;t.entries.forEach(function(e){if(!(!e||"string"!=typeof e.id||!/^\d{1,25}$/.test(e.id)||"string"!=typeof e.examId||!/^\d{1,25}$/.test(e.examId)||a.has(e.id)||!Number.isFinite(e.at)||e.at>n||n-e.at>6048e5)){var t=function(e){if(!e||!Number.isInteger(e.answered)||!Number.isInteger(e.total)||e.answered<0||e.total1e6)return null;var t=e.score;return null!==t&&("string"!=typeof t||!/^\d+(?:\.\d+)?$/.test(t)||Number(t)>1e9)?null:{score:t,answered:e.answered,total:e.total,progress:(e.total?Math.round(e.answered/e.total*1e3)/10:0)+"%"}}(e.metrics);t&&(a.add(e.id),r.push({id:e.id,examId:e.examId,at:e.at,metrics:t}))}});var o=null;if(t.snapshot&&Number.isFinite(t.snapshot.at)&&t.snapshot.at<=n&&n-t.snapshot.at<=864e5&&Array.isArray(t.snapshot.rows)&&t.snapshot.rows.length<=500){var i=t.snapshot.rows.map(Fn).filter(Boolean);o={at:t.snapshot.at,rows:i,complete:!0===t.snapshot.complete&&Number.isInteger(t.snapshot.total)&&t.snapshot.total===i.length&&i.length===t.snapshot.rows.length&&new Set(i.map(function(e){return e.id})).size===i.length&&i.every(function(e){return e.groupsVerified}),total:i.length}}return{version:1,owner:t.owner,entries:r,snapshot:o}}function Un(){if(clearTimeout(Q.timer),Q.timer=null,!Q.dirty||!G.owner||"function"!=typeof GM_setValue)return Q.queue;Q.dirty=!1;var e={version:1,owner:G.owner,entries:[],snapshot:G.snapshot||null};G.items.forEach(function(t,n){e.entries.push({id:n,examId:t.examId,metrics:t.metrics,at:t.at})});var t=JSON.stringify(e);for(Gn(t)>1048576&&(e.snapshot=null,t=JSON.stringify(e));Gn(t)>1048576&&e.entries.length;)e.entries.shift(),t=JSON.stringify(e);var n=Q.generation;return Q.stored=Jn(t),Q.queue=Q.queue.then(async function(){if(n===Q.generation)try{await GM_setValue(j,t),Q.status="ready"}catch(e){Q.status="unavailable"}}),Q.queue}function Yn(){Q.dirty=!0,clearTimeout(Q.timer),Q.timer=setTimeout(Un,750)}function Vn(){F=null,G.owner=null,G.items.clear(),G.snapshot=null}function Xn(e,t){var n=t&&t.userId;if("string"!=typeof n||!/^\d{1,25}$/.test(n))return null;if(e.userId&&e.userId!==n)throw Ea("account-changed"),Vn(),H.rows.forEach(function(e){delete e.metrics,e.metricsState="unavailable",e.metricsNote="账号发生变化,请重新读取"}),Q.generation++,e.controller.abort(),Dn("account-changed");if(G.owner!==n){Vn(),G.owner=n,Q.generation++;var r=Q.stored;r&&r.owner===n&&(r.entries.forEach(function(e){G.items.set(e.id,{examId:e.examId,metrics:e.metrics,at:e.at})}),G.snapshot=r.snapshot)}return F={userId:n,verifiedAt:Date.now()},Sa(n),e.userId=n,n}function Kn(e,t,n){if(e.userId&&G.owner===e.userId&&n&&n.userId===e.userId&&"string"==typeof n.id&&/^\d{1,25}$/.test(n.id)&&t.metrics&&null!==t.metrics.answered){for(G.items.delete(t.id),G.items.set(t.id,{examId:n.id,metrics:Object.assign({},t.metrics),at:Date.now()});G.items.size>500;)G.items.delete(G.items.keys().next().value);Yn()}}function Zn(e,t,n,r){if(!e.userId||G.owner!==e.userId)return!1;var a=G.items.get(t.id);return!(!a||Date.now()6048e5||n&&(n.userId!==e.userId||n.id!==a.examId)||!(n||r&&t.listedExamId===a.examId)||!r&&(e.forceRefresh||Date.now()=3e5||!n||n.id!==a.examId||String(n.score)!==a.metrics.score)||(t.metrics=Object.assign({},a.metrics),t.metricsAt=a.at,t.metricsCached=!0,t.metricsState="ready",t.metricsNote=(r?"缓存于 ":"进度缓存于 ")+new Date(a.at).toLocaleString("zh-CN",{hour12:!1})+(r?"(已结束,不再刷新)":";分数本次更新"),0))}function Wn(e,t){return new Promise(function(n,r){if(e.controller.signal.aborted)r(Dn("cancelled"));else{var a,o=!1;a=setTimeout(function(){i()},t),e.controller.signal.addEventListener("abort",s,{once:!0})}function i(t){o||(o=!0,clearTimeout(a),e.controller.signal.removeEventListener("abort",s),t?r(t):n())}function s(){i(Dn(Date.now()>=e.deadline?"deadline":"cancelled"))}})}async function _n(e,t){for(var n=0;n<2;n++)try{return await $n(e,t)}catch(t){if("login"===t.catalogueCode&&(Ea("login-invalid"),Vn(),"cache"===H.source&&(H.source="dom",H.cacheVerified=!1,H.snapshotAt=null,H.rows=[],qn())),"rate-limit"!==t.catalogueCode||1===n||e.rateRetries>=3)throw t;Pn(e),e.rateRetries++;var r=Math.max(Date.now()+5e3*Math.pow(2,e.rateRetries-1),t.retryAt||0);if(r>=e.deadline)throw t;e.pauseUntil=Math.max(e.pauseUntil,r),H.message="平台限流,退避后重试("+e.rateRetries+"/3)…",ra(),await Wn(e,r-Date.now())}}async function $n(e,t){Pn(e);var n=new URL(t,"https://pintia.cn");if("https://pintia.cn"!==location.origin||n.origin!==location.origin||!/^\/api\/problem-sets$/.test(n.pathname)&&!/^\/api\/problem-sets\/\d+\/exams$/.test(n.pathname)&&!/^\/api\/exams\/\d+\/problem-sets\/\d+\/problem-status$/.test(n.pathname))throw Dn("invalid-route");for(;;){Pn(e);var r=Math.max(Date.now(),q,e.pauseUntil);if(!(r>Date.now())){q=Date.now()+200;break}await Wn(e,r-Date.now())}Pn(e);var a=new AbortController,o=function(){a.abort()};e.controller.signal.addEventListener("abort",o,{once:!0});var i=setTimeout(o,15e3);try{var s=await fetch(n.href,{method:"GET",credentials:"same-origin",mode:"same-origin",redirect:"error",cache:"no-store",headers:{Accept:"application/json;charset=UTF-8"},signal:a.signal});if(Pn(e),401===s.status)throw Dn("login");if(403===s.status)throw Dn("permission");if(429===s.status){var l=Dn("rate-limit"),c=s.headers&&s.headers.get?s.headers.get("Retry-After"):null;if("string"==typeof c){var p=/^\d+$/.test(c.trim())?Number(c.trim()):NaN,d=Date.parse(c);Number.isFinite(p)?l.retryAt=Date.now()+1e3*p:Number.isFinite(d)&&(l.retryAt=d)}throw l}if(!s.ok)throw Dn("http");if(s.redirected||new URL(s.url).origin!==location.origin||new URL(s.url).pathname!==n.pathname)throw Dn("redirect");if(!s.body||!s.body.getReader)throw Dn("unsupported-stream");for(var u=s.body.getReader(),m=[],h=0;;){var g=await u.read();if(Pn(e),g.done)break;if((h+=g.value.byteLength)>2097152)throw u.cancel().catch(function(){}),Dn("too-large");m.push(g.value)}var f=new Uint8Array(h),b=0;m.forEach(function(e){f.set(e,b),b+=e.byteLength});var v,y=(new TextDecoder).decode(f),w=y.trim(),x=w?/^(?:=e.deadline?"deadline":"cancelled");throw Dn(a.signal.aborted?"timeout":"network")}finally{clearTimeout(i),e.controller.signal.removeEventListener("abort",o)}}function er(e,t,n,r){if(!e||"string"!=typeof e.id||!/^\d{1,25}$/.test(e.id)||"string"!=typeof e.name||!e.name.trim())return null;var a="string"==typeof e.endAt?Date.parse(e.endAt):NaN,o="string"==typeof e.startAt?Date.parse(e.startAt):NaN,i=n&&Object.prototype.hasOwnProperty.call(n,e.id)?n[e.id]:null,s=[],l=new Set;i&&Array.isArray(i.items)&&i.items.forEach(function(e){e&&"string"==typeof e.id&&/^\d{1,25}$/.test(e.id)&&"string"==typeof e.name&&e.name.trim()&&!l.has(e.id)&&(l.add(e.id),s.push({id:e.id,name:e.name.trim().slice(0,200)}))});var c=s.length?s[0].name:i&&Array.isArray(i.items)&&0===i.items.length?"未标注班级":t.get(e.id)||"班级待确认";return{id:e.id,listedExamId:r&&Object.prototype.hasOwnProperty.call(r,e.id)&&"string"==typeof r[e.id]&&/^\d{1,25}$/.test(r[e.id])?r[e.id]:null,title:e.name.trim().slice(0,300),group:c,groups:s,groupsVerified:!(!i||!Array.isArray(i.items)||s.length!==i.items.length),deadline:Number.isFinite(a)?new Date(a).toLocaleString("zh-CN",{hour12:!1}):"",deadlineOrder:Number.isFinite(a)?a:1/0,startTime:Number.isFinite(o)?o:null,endTime:Number.isFinite(a)?a:null,lifecycle:Number.isFinite(a)&&a<=Date.now()?"ended":Number.isFinite(o)&&o>Date.now()?"upcoming":Number.isFinite(a)&&a>Date.now()?"active":"unknown",status:Number.isFinite(o)&&o>Date.now()?"未开放":Number.isFinite(a)&&a<=Date.now()?"已关闭":Number.isFinite(o)?"已开放":"状态未提供",href:"https://pintia.cn/problem-sets/"+e.id+"/exam",metricsState:"pending"}}function tr(e,t){var n=e&&e.exam,r={score:n&&"number"==typeof n.score&&Number.isFinite(n.score)&&n.score>=0?String(n.score):null,answered:null,total:null,progress:null},a=t&&t.problemStatus;if(!Array.isArray(a))return r;var o=new Set,i=0,s=!0;return a.forEach(function(e){e&&"string"==typeof e.id&&/^\d{1,25}$/.test(e.id)&&!o.has(e.id)?(o.add(e.id),["PROBLEM_SUBMITTED","PROBLEM_ACCEPTED","PROBLEM_WRONG_ANSWER"].indexOf(e.problemSubmissionStatus)>=0?i++:"PROBLEM_NO_ANSWER"!==e.problemSubmissionStatus&&(s=!1)):s=!1}),r.total=a.length,void 0===t.total||Number.isInteger(t.total)&&t.total===a.length||(s=!1),t.examLabelByProblemSetProblemId&&(Object.keys(t.examLabelByProblemSetProblemId).length!==a.length||a.some(function(e){return!e||!Object.prototype.hasOwnProperty.call(t.examLabelByProblemSetProblemId,e.id)}))&&(s=!1),s&&(r.answered=i,r.progress=(a.length?Math.round(i/a.length*1e3)/10:0)+"%"),r}function nr(e){return{"account-changed":"账号发生变化,已清空缓存",login:"登录状态失效,已停止读取",permission:"没有读取权限","rate-limit":"平台限流,已停止读取",deadline:"达到读取时限",cancelled:"读取已取消",timeout:"读取超时",network:"网络或登录跳转阻止读取","invalid-data":"接口结构不符合已验证格式","invalid-json":"接口返回非JSON(可开启接口诊断后重新读取)","html-response":"接口返回网页(可开启接口诊断后重新读取)","empty-response":"接口返回空内容","too-large":"响应超过大小限制",pagination:"目录分页变化或重复,未宣称完整"}[e]||"未能读取"}function rr(e){return e&&e.complete&&Array.isArray(e.rows)?e.rows.map(function(e){var t={};t[e.id]={items:e.groups};var n={};return e.listedExamId&&(n[e.id]=e.listedExamId),er({id:e.id,name:e.title,startAt:Number.isFinite(e.startTime)?new Date(e.startTime).toISOString():"",endAt:Number.isFinite(e.endTime)?new Date(e.endTime).toISOString():""},new Map,t,n)}).filter(Boolean):[]}function ar(){if(!U.loaded){U.loaded=!0;try{var e=sessionStorage.getItem(J);if(!e||e.length>16e3)return;var t=JSON.parse(e);if(!t||1!==t.version||!Array.isArray(t.items))return;"string"==typeof t.owner&&/^\d{1,25}$/.test(t.owner)&&(U.owner=t.owner),t.items.slice(-200).forEach(function(e){Array.isArray(e)&&"string"==typeof e[0]&&/^\d{1,25}$/.test(e[0])&&Number.isFinite(e[1])&&e[1]<=Date.now()&&Date.now()-e[1]<864e5&&U.ids.set(e[0],e[1])})}catch(e){}}}function or(){try{sessionStorage.setItem(J,JSON.stringify({version:1,owner:U.owner,items:Array.from(U.ids)}))}catch(e){}}function ir(){ar();var e=location.pathname.match(/^\/problem-sets\/(\d{1,25})(?:\/|$)/),t=e&&e[1];if(t&&t!==U.lastSet){for(U.ids.delete(t),U.ids.set(t,Date.now());U.ids.size>200;)U.ids.delete(U.ids.keys().next().value);or()}U.lastSet=t||null}function sr(e,t){U.ids.get(e)===t&&(U.ids.delete(e),or())}async function lr(e){if(Hn(),!H.suspended&&Nn()){qn();var t=new Map;H.rows.forEach(function(e){"未标注班级"!==e.group&&t.set(e.id,e.group)}),ar();var n=new Map(U.ids),r={controller:new AbortController,deadline:Date.now()+3e5,timer:null,run:H.run,userId:null,forceRefresh:!0===e||!(!e||"click"!==e.type),pauseUntil:0,rateRetries:0,probedExams:new Map};H.job=r,r.timer=setTimeout(function(){r.controller.abort()},3e5),H.status="loading",H.message=r.forceRefresh?"重新读取全部题集目录…":"检查本地目录缓存与账号…",ra();var a=!1,o="",i=new Set,s=[],l=null;try{if(await async function(){if(!Q.loaded)return Q.loading||(Q.loading=async function(){if("function"!=typeof GM_getValue||"function"!=typeof GM_setValue)return Q.status="unavailable",void(Q.loaded=!0);try{var e,t,n=Q.generation;try{t=await Promise.race([Promise.resolve(GM_getValue(j,null)),new Promise(function(t,n){e=setTimeout(function(){n(new Error("storage-timeout"))},2e3)})])}finally{clearTimeout(e)}n===Q.generation&&(Q.stored=Jn(t),Q.status="ready")}catch(e){Q.status="unavailable"}Q.loaded=!0}()),Q.loading}(),Pn(r),await async function(e){if(ar(),e.forceRefresh)return e.cacheMissReason="手动重新读取",!1;var t=Q.stored,n=t&&t.snapshot||G.snapshot,r=t&&t.owner||G.owner;if(!n||!n.complete)return e.cacheMissReason="目录缓存缺失或不完整",!1;if(n.at>Date.now()||Date.now()-n.at>864e5)return e.cacheMissReason="目录缓存已过期",!1;var a=rr(n),o=new Map(U.ids);if(!a.length||Array.from(o.keys()).some(function(e){return!a.some(function(t){return t.id===e})}))return e.cacheMissReason="访问的题集未在完整缓存中",!1;var i=[],s=new Set;Ln(a).groups.forEach(function(e){e.items.forEach(function(e){o.has(e.id)&&!s.has(e.id)&&(s.add(e.id),i.push(e))})});var l,c=i[0]||Rn(a)[0]||a.find(function(e){return"string"==typeof e.listedExamId});if(!c)return e.selectiveHandled=!0,e.selectiveFailures=1,H.message="缓存目录暂无法核验账号,本地数据保留;可手动重新读取。",!0;try{l=await _n(e,"/api/problem-sets/"+c.id+"/exams")}catch(t){if(["login","rate-limit","cancelled","deadline"].indexOf(t.catalogueCode)>=0)throw t;return e.selectiveHandled=!0,e.selectiveFailures=1,H.message="未能核验当前账号,未显示旧目录;本地缓存保留,请重试。",!0}if(Pn(e),!l.exam||l.exam.problemSetId!==c.id||!Xn(e,l.exam))return e.selectiveHandled=!0,e.selectiveFailures=1,H.message="未能核验当前账号,未显示旧目录;本地缓存保留,可重试。",!0;if(e.userId!==r||U.owner&&U.owner!==e.userId)return e.cacheMissReason="账号已变化",U.ids.clear(),U.owner=e.userId,or(),!1;if(U.owner=e.userId,or(),H.rows=a,H.total=a.length,H.source="cache",H.directoryComplete=!0,H.cacheVerified=!0,H.snapshotAt=n.at,a.forEach(function(t){t.metricsState="unavailable",t.metricsNote="无可用历史缓存",function(e,t){var n=G.items.get(t.id);!e.userId||e.userId!==G.owner||!n||n.examId!==t.listedExamId||n.at>Date.now()||Date.now()-n.at>6048e5||(t.metrics=Object.assign({},n.metrics),t.metricsAt=n.at,t.metricsCached=!0,t.metricsState="ready",t.metricsNote="缓存于 "+new Date(n.at).toLocaleString("zh-CN",{hour12:!1})+";本次未刷新")}(e,t)}),l.exam.id!==c.listedExamId){var p=a.find(function(e){return e.id===c.id});delete p.metrics,p.metricsState="unavailable",p.metricsNote="场次已变化,旧进度暂不显示"}if(!i.length)return e.selectiveHandled=!0,e.selectiveFailures=0,H.message="已使用完整缓存目录("+new Date(n.at).toLocaleString("zh-CN",{hour12:!1})+");仅核验账号,未刷新题集进度。",ra(),!0;H.message="使用缓存目录,仅更新访问过的 "+i.length+" 个题集…",ra();var d=0,u=0,m=0;async function h(){for(;d=0)throw H.rows=[],H.source="dom",H.cacheVerified=!1,H.directoryComplete=!1,qn(),r;if(Pn(e),m++,n.metrics?(t.metrics=n.metrics,t.metricsAt=n.at,t.metricsCached=!0,t.metricsState="ready",t.metricsNote="更新未成功,保留缓存于 "+new Date(n.at).toLocaleString("zh-CN",{hour12:!1})+";"+nr(r.catalogueCode)):(t.metricsState="unavailable",t.metricsNote=nr(r.catalogueCode)),"rate-limit"===r.catalogueCode)throw r}ra()}}return e.forceRefresh=!0,await Promise.all([h(),h(),h(),h(),h()]),Pn(e),G.snapshot&&(G.snapshot.rows=a.map(Fn).filter(Boolean),Yn()),e.selectiveHandled=!0,e.selectiveFailures=m,H.message="缓存目录 "+a.length+" 个;仅更新访问过的题集 "+u+"/"+i.length+"。"+(m?" "+m+" 个更新未成功,保留旧缓存,可重试。":"其他题集使用历史缓存。"),!0}(r))return void(a=!0);await async function(e){var t=Q.stored,n=t&&t.snapshot;if(!(!n||!n.complete||n.at>Date.now()||Date.now()-n.at>864e5)){var r=rr(n),a=Rn(r)[0];if(a){var o;try{o=await _n(e,"/api/problem-sets/"+a.id+"/exams")}catch(e){if(["login","rate-limit","cancelled","deadline"].indexOf(e.catalogueCode)>=0)throw e;return}Pn(e),o.exam&&o.exam.problemSetId===a.id&&Xn(e,o.exam)&&(e.probedExams.set(a.id,o),e.userId===t.owner&&G.owner===t.owner&&(H.rows=r,H.total=r.length,H.source="cache",H.cacheVerified=!0,H.snapshotAt=n.at,r.forEach(function(e){e.metricsState="unavailable",e.metricsNote="缓存目录;进度等待本次场次核验"}),o.exam.id===a.listedExamId&&Zn(e,r.find(function(e){return e.id===a.id}),o.exam,!1),H.message="已显示完整缓存("+new Date(n.at).toLocaleString("zh-CN",{hour12:!1})+"),后台更新中…",ra()))}}}(r),Pn(r);for(var c=0;c<50;c++){var p=await _n(r,"/api/problem-sets?filter=%7B%7D&page="+c+"&limit=30");if(Pn(r),!Array.isArray(p.problemSets)||!Number.isInteger(p.total)||p.total<0)throw Dn("invalid-data");if(null===l)l=p.total;else if(l!==p.total)throw Dn("pagination");for(var d=[],u=new Set,m=0;mp.total||!p.problemSets.length)throw Dn("pagination")}if(!a&&"cache"===H.source)throw Dn("pagination");H.source="api",H.rows=s,H.total=l,H.directoryComplete=a,H.cacheVerified=!1,ra(),H.rows.forEach(function(e){"active"!==e.lifecycle&&(e.metricsState="unavailable",e.metricsNote="ended"===e.lifecycle?"已结束,无可用缓存":"upcoming"===e.lifecycle?"尚未开放,未读取概览":"截止时间未知,未刷新概览")});var g=Rn(H.rows).slice(0,200),f=0,b=0;async function y(){for(;f200?"仅刷新前200个未结束题集。":"")+(v?v+" 个题集的班级关系待确认。":"")),"dom"===H.source&&qn(),"cache"!==H.source||r.selectiveHandled||(H.message="保留完整缓存("+new Date(H.snapshotAt).toLocaleString("zh-CN",{hour12:!1})+")。"+(o?o+"。":"")),Un().then(function(){H.run===r.run&&("unavailable"===Q.status&&(H.message+="本地缓存暂不可用。"),ra())}),ra()}}}}function cr(e){return{TRUE_OR_FALSE:1,MULTIPLE_CHOICE:2,MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER:3,MULTIPLE_CHOICE_MORE_THAN_ONE:3,FILL_IN_THE_BLANK:4,FILL_IN_THE_BLANKS:4,FILL_IN_THE_BLANK_FOR_PROGRAMMING:5,CODE_COMPLETION:6,PROGRAMMING:7}[e]||0}function pr(e){return String(e||"").replace(/\s+/g," ").trim()}function dr(e){try{return pr(Nt(e).textContent)}catch(t){return pr(e)}}function ur(e){return JSON.stringify([pr((e.querySelector(".rendered-markdown")||{}).textContent),Array.from(e.querySelectorAll("input,textarea")).filter(function(e){return!e.closest(".pta-local-review,.cm-editor")}).map(function(e){return[e.id,e.getAttribute("type"),e.closest("label")?pr(e.closest("label").textContent):"","boolean"==typeof e.checked?e.checked:e.hasAttribute("checked"),e.value||""]})])}function mr(e){return{"accepted-submission":"平台判正确的历史作答","binary-verdict-inversion":"二元判断结果反推","ai-generated":"AI 生成,未获平台验证",platform:"平台参考答案"}[e]||"答案未获取"}function hr(e){e.controller&&e.controller.abort(),e.panel.remove(),e.hidden.forEach(function(e){null===e.value?e.node.removeAttribute("style"):e.node.setAttribute("style",e.value)})}function gr(){Y.generation++,Y.statusNode&&Y.statusNode.remove(),Y.statusNode=null,Y.timer&&clearInterval(Y.timer),Y.timer=null,Y.panels.forEach(hr),Y.panels=[],Y.setId=null,Y.url=null,Y.set=null,Y.pending=!1}function fr(e){return Y.generation===e&&Y.url===location.href&&new RegExp("^/problem-sets/"+Y.setId+"/exam(?:/|$)").test(location.pathname)&&(!Y.set||(t=Y.setId,((n=K.verified.get(t))?$r(t,n.owner,n.examId):null)===Y.set));var t,n}function br(e,t){if(!Array.isArray(e.answer)||!e.answer.length||"unknown"===e.answerSource)return null;var n=cr(e.type);if(n>=4)return e.answer.every(function(e){return"string"==typeof e})?e.answer:null;var r=e.answer.map(function(t){if(Number.isInteger(t))return t;if("string"==typeof t&&/^[A-Z]$/.test(t)){var r=e.choices||[];return r.length?r.findIndex(function(e,n){return(e&&e.label||String.fromCharCode(65+n))===t}):t.charCodeAt(0)-65}return 1===n&&/^(TRUE|FALSE)$/.test(t)?"TRUE"===t?0:1:-1});return r.every(function(e){return e>=0&&e=1&&r<=3){if(!c.length||l.some(function(e){return!e}))return null;if(1===r){if(2!==c.length||2!==new Set(c).size||c.some(function(e){return"T"!==e&&"F"!==e}))return null;"T"===c[0]&&"F"===c[1]||(o=!1)}else(p.length!==c.length||p.some(function(e,t){return dr(e)!==c[t].replace(/^[A-Z][..、::]\s*/,"")}))&&(o=!1)}var d=i.filter(function(e){return"TEXTAREA"===e.tagName||!e.getAttribute("type")||/^(text|number)$/.test(e.getAttribute("type"))});if(4===r||5===r){if(d.length<1||d.length>50)return null;Number.isInteger(t.blankCount)&&t.blankCount>0&&t.blankCount!==d.length&&(o=!1),t=Object.assign({},t,{blankCount:d.length})}var u=ur(e),m=r<=5?function(e,t){if(!e||!/^\d{1,25}$/.test(e.id||"")||[1,2,3,4,5].indexOf(t)<0)return null;var n=e.querySelector(".rendered-markdown");if(!n)return null;var r=Array.from(e.querySelectorAll(".text-light")).filter(function(e){return"评测结果"===e.textContent.trim()}).map(function(e){return e.nextElementSibling&&e.nextElementSibling.textContent.trim()}),a=1===r.length?r[0]:"",o=[],i=[],s=null,l="unknown";if([1,2,3].indexOf(t)>=0){var c=Array.from(e.querySelectorAll('input[type="radio"],input[type="checkbox"]'));c.forEach(function(e){var t=e.closest("label");if(t){var n=t.textContent.trim();o.push(n),("boolean"==typeof e.checked?e.checked:e.hasAttribute("checked"))&&i.push(o.length-1)}});var p=c.length===o.length&&o.length>=2&&i.length>0&&(3===t||1===i.length);p&&"答案正确"===a?(s=i.slice(),l="accepted-submission"):p&&1===t&&"答案错误"===a&&2===o.length&&2===new Set(o).size&&o.every(function(e){return"T"===e||"F"===e})&&(s=[1-i[0]],l="binary-verdict-inversion")}else{var d=Array.from(e.querySelectorAll('input:not([type]),input[type="text"],input[type="number"],textarea')).filter(function(e){return!e.closest(".cm-editor")});(i=d.map(function(e){return"string"==typeof e.value?e.value:e.getAttribute("value")||""})).length&&i.every(function(e){return""!==e.trim()})&&"答案正确"===a&&(s=i.slice(),l="accepted-submission")}return{id:e.id,type:t,statement:n.textContent,options:o,answer:s,answerSource:l,verdict:a}}(e,r):null,h=Object.assign({},t);o||(h.content=a.textContent,h.choices=c.map(function(e,t){return{label:String.fromCharCode(65+t),content:e.replace(/^[A-Z][..、::]\s*/,"")}}),h.answer=null,h.answerSource="unknown"),1!==r||h.choices&&h.choices.length||(h.choices=c.map(function(e,t){return{label:String.fromCharCode(65+t),content:e}})),!m||null===m.answer||"unknown"!==h.answerSource&&"ai-generated"!==h.answerSource||(h.answer=m.answer,h.answerSource=m.answerSource,o&&Promise.resolve(_r(Y.setId,[{id:t.id,answer:m.answer,answerSource:m.answerSource,blankCount:t.blankCount}])).catch(function(){}));var g=document.createElement("section");g.className="pta-local-review",g.setAttribute("aria-label","本地复习"),g.style.cssText="display:block;visibility:visible;pointer-events:auto;opacity:1;margin:12px 0;padding:12px;border:1px solid #8886;border-radius:10px;",["input","change","click","pointerdown","pointerup","mousedown","mouseup","keydown","keyup","focusin","focusout"].forEach(function(e){g.addEventListener(e,function(e){e.stopPropagation()})}),g.addEventListener("keydown",function(e){"Enter"===e.key&&e.target&&"INPUT"===e.target.tagName&&(e.preventDefault(),e.stopPropagation(),T&&T.click())});var f=document.createElement("strong");f.textContent="本地复习(Beta) · 不提交到 PTA",g.appendChild(f);var b=document.createElement("p");b.textContent=(o?"":"缓存题面/选项不匹配,仅按当前页面练习,不使用或覆盖缓存答案。 ")+mr(h.answerSource),g.appendChild(b);var v=[],y=[];function w(e){e&&!v.some(function(t){return t.node===e})&&(v.push({node:e,value:e.getAttribute("style")}),e.style.setProperty("visibility","hidden"))}if(r>=1&&r<=3)s.forEach(w),c.forEach(function(e,a){var o=document.createElement("label");o.style.cssText="display:flex;gap:8px;margin:8px 0;align-items:baseline;";var i=document.createElement("input");i.type=3===r?"checkbox":"radio",i.disabled=!1,i.setAttribute("form","pta-local-review-detached-"+n),i.style.cssText="pointer-events:auto;visibility:visible;opacity:1;cursor:pointer;",i.name="pta-local-review-"+n+"-"+t.id,i.value=String(a),o.appendChild(i),o.appendChild(document.createTextNode(e)),g.appendChild(o),y.push(i)});else if(4===r||5===r){d.forEach(w);for(var x=0;x=1&&r<=5){var I=document.createElement("button");I.type="button",I.textContent="此题缺少答案 · AI 补充",I.style.cssText="margin:8px;padding:6px 12px;border:1px solid #888;border-radius:6px;",I.addEventListener("click",async function(r){if(r.preventDefault(),r.stopPropagation(),!I.disabled&&l()){I.disabled=!0,C.textContent="正在生成 AI 参考答案…";try{var a=await Lt([Object.assign({},h,{blankCount:t.blankCount})],{signal:S.signal,isCurrent:l,concurrency:1});if(!l())return;var o=a&&a[0];if(!o||o.questionId!==t.id||"generated"!==o.status||"ai-generated"!==o.answerSource||!Array.isArray(o.answer))return C.textContent="AI 未能确定答案,仍标记为未知。",void(I.disabled=!1);var i=br(Object.assign({},h,{answer:o.answer,answerSource:"ai-generated"}),y.length);if(!i)return C.textContent="AI 答案格式不匹配,仍标记为未知。",void(I.disabled=!1);var s=await _r(Y.setId,[{id:t.id,answer:i,answerSource:"ai-generated",blankCount:t.blankCount}]);if(!l())return;h.answer=i.slice(),h.answerSource="ai-generated",b.textContent="AI 生成,未获平台验证"+(s?"":"(本地缓存保存未确认)"),C.textContent="AI 参考答案已生成,可填写后进行本地比对。",I.remove()}catch(e){l()&&(C.textContent="AI 补充失败,答案仍未知。",I.disabled=!1)}}function l(){return fr(n)&&e.isConnected&&g.isConnected&&ur(e)===u&&null===h.answer&&"unknown"===h.answerSource}}),g.appendChild(I)}if(y.length){var T=document.createElement("button");T.type="button",T.textContent="本地检查",T.style.cssText="padding:6px 12px;border:1px solid #888;border-radius:6px;",T.addEventListener("click",function(t){if(t.preventDefault(),t.stopPropagation(),fr(n)&&e.isConnected&&ur(e)===u){var a=br(h,y.length),o=r<=3?y.map(function(e,t){return e.checked?t:-1}).filter(function(e){return e>=0}):y.map(function(e){return e.value.trim()});if(a)if(r<=3&&!o.length||r>=4&&o.some(function(e){return!e}))C.textContent="请先完成本题。";else{var i=r<=3?a.slice().sort(function(e,t){return e-t}):a.map(function(e){return e.trim()}),s=JSON.stringify(o)===JSON.stringify(i);C.textContent=(s?"与缓存答案一致":"与缓存答案不一致")+"(仅本地比对) · "+mr(h.answerSource)+":"+(r<=3?i.map(function(e){return c[e]}).join(";"):i.join(";"))}else C.textContent="此题答案未获取,不能判断对错。"}}),g.appendChild(T)}g.appendChild(C);var M=document.createElement("button");M.type="button",M.textContent="退出复习",M.style.cssText="margin-top:8px;padding:6px 12px;border:1px solid #888;border-radius:6px;",M.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),kr()}),g.appendChild(M);for(var B=null,N=e;N&&N!==document.body;)(N.hasAttribute("inert")||"FIELDSET"===N.tagName&&N.hasAttribute("disabled"))&&(B=N),N=N.parentElement;return B&&B.parentElement?B.parentElement.insertBefore(g,B.nextSibling):e.appendChild(g),{root:e,panel:g,hidden:v,controller:S,question:t,signature:u,cacheMatches:o}}(n,t,e);r&&Y.panels.push(r)}}});var t=Y.panels.length,n=Y.panels.filter(function(e){return!e.cacheMatches}).length;vr(t?"本地复习:"+t+" 题可手动填写"+(n?";"+n+" 题缓存不匹配,未套用缓存答案":""):"本地复习:"+(/\/problems\//.test(location.pathname)?Date.now()-Y.startedAt>15e3?"未找到可挂载题卡,请检查题型或退出后重试。":"等待原版题卡加载…":"请打开原版题型页面。"))}else gr()}function wr(){V.revision++,ee="",ra()}async function xr(e){if(t.review)if(V.enabled)if(V.busy)Tn("复习题集正在读取,请先停止或等待");else{V.activeSet&&kr();var n=++V.epoch,r=new AbortController,a=null;V.controller=r,V.busy=!0,V.status="复习(Beta):后台读取题目,不切换页面",wr();var o=new Map((e||[]).map(function(e){return[e.id,e.title||e.id]}));try{var i=await function(e,t){return async function(e,t){Mr();var n={generation:K.generation,controller:new AbortController,deadline:1/0,nextStart:0,owner:null},r=[];K.job=n;var a=new Map;(e||[]).forEach(function(e){e&&/^\d{1,25}$/.test(e.id||"")&&Number.isFinite(e.endTime)&&e.endTime<=Date.now()&&a.set(e.id,e)});var o=Array.from(a.values()).slice(),i=!1,s=0;try{for(var l of o){s++,Tr(n);var c={id:l.id,status:"loading"};t&&t(c);try{var p=zr(await Nr(n,"/api/problem-sets/"+l.id+"/exams"),l.id);if(n.owner&&p.owner!==n.owner)throw Ir("account-changed");if(n.owner=p.owner,K.owner=p.owner,K.verified.set(l.id,p),!i){await Ur(n,p),i=!0;var d=o.slice(s),u=d.filter(function(e){return!K.index.has(e.id)}),m=d.filter(function(e){return K.index.has(e.id)});o.splice.apply(o,[s,o.length-s].concat(u,m))}var h=await Yr(n,l.id,p);if(h)c={id:l.id,status:"cached",questions:h.questions.length,missingAnswers:h.questions.filter(function(e){return null===e.answer}).length};else{var g=(await Nr(n,"/api/problem-sets/"+l.id+"/problem-summaries")).summaries;if(!g||"object"!=typeof g||Array.isArray(g)||!Object.keys(g).length)throw Ir("invalid-summary");var f=0;if(Object.keys(g).forEach(function(e){if($.indexOf(e)<0||!g[e]||!Number.isInteger(g[e].total)||g[e].total<0)throw Ir("invalid-summary");f+=g[e].total}),f<1||f>2e3)throw Ir("invalid-summary");var b=[],v=new Set;for(var y of Object.keys(g))if(g[y].total){var w=await Nr(n,"/api/problem-sets/"+l.id+"/exam-problems?problem_type="+encodeURIComponent(y));b=b.concat(Or(w,y,g[y].total,v))}var x=zr(await Nr(n,"/api/problem-sets/"+l.id+"/exams"),l.id);if(x.owner!==p.owner||x.examId!==p.examId)throw Ir("account-changed");Tr(n);var A={id:l.id,examId:p.examId,at:Date.now(),complete:!0,questions:b};if(new Blob([JSON.stringify(A)]).size>4194304)throw Ir("too-large");jr(A);var k=await Vr(n,l.id);c={id:l.id,status:"complete",questions:b.length,missingAnswers:b.length,persisted:k,persistenceError:k?null:K.persistenceError||"storage-unavailable"}}}catch(e){if(c={id:l.id,status:"error",code:e.reviewCode||"unknown"},["login","account-changed","rate-limit","cancelled","deadline"].indexOf(c.code)>=0||/^storage-(?!record-invalid)/.test(c.code))throw r.push(c),t&&t(c),e}if(r.push(c),t&&t(c),!1===c.persisted)return{results:r,stopped:c.persistenceError||"storage-write-failed",omitted:Math.max(0,a.size-s)};s%25==0&&await Br(n,0)}}catch(e){return["login","account-changed"].indexOf(e.reviewCode)>=0&&(K.owner=null,K.index.clear(),K.verified.clear(),K.sets.clear()),{results:r,stopped:e.reviewCode||"unknown",omitted:Math.max(0,a.size-s)}}return n.deadline=1/0,{results:r,stopped:null,omitted:Math.max(0,a.size-s)}}(e,t)}(e,function(e){if(A()){var t={loading:"读取中",complete:"题目完整",cached:"复用缓存",error:"未完成"}[e.status]||"处理中";V.status="复习(Beta):"+(o.get(e.id)||e.id)+" · "+t+(void 0!==e.questions?" "+e.questions+"题":"")+(e.code?"("+e.code+")":"")+(!1===e.persisted?" · 本地保存未确认":""),wr()}});if(!A())return;var l=i.results.filter(function(e){return"complete"===e.status||"cached"===e.status}),c=0,p=0,d=i.results.some(function(e){return!1===e.persisted}),u=Date.now()+6e5;for(var m of(a=setTimeout(function(){n===V.epoch&&(r.abort(),V.busy=!1,V.controller=null,V.status="复习(Beta):AI 补充达到10分钟上限,已保存内容保留,未完成答案仍未知",wr())},6e5),l)){if(!A())return;var h=await Zr(m.id);if(!A())return;if(h){var g=h.questions.filter(function(e){return null===e.answer&&"unknown"===e.answerSource&&["TRUE_OR_FALSE","MULTIPLE_CHOICE","MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER","FILL_IN_THE_BLANK"].indexOf(e.type)>=0});if(!/^storage-/.test(i.stopped||"")&&ut(s.provider))for(var f=0;f=0}).length}}var x=l.filter(function(e){var t=Wr(e.id);return t&&t.complete});A()&&(V.status="复习(Beta):"+x.length+"/"+i.results.length+" 个题集当前可复习;AI 补充 "+c+" 题,仍缺小题答案 "+p+" 题。"+(i.stopped?"读取已停止("+i.stopped+"),可重试。":"")+(i.omitted?"本轮达到上限,另有 "+i.omitted+" 个未处理。":"")+(d?"部分缓存持久保存未确认,刷新后可能丢失。":"")+"绿色仅表示题目完整,非全部答案正确。")}catch(e){A()&&(V.status="复习(Beta):读取或答案补充未完成,已获取内容保留,未确认题集不会标完整")}finally{null!==a&&clearTimeout(a),A()&&(V.busy=!1,V.controller=null,wr())}}else Tn("请先开启复习(Beta)");function A(){return n===V.epoch&&!r.signal.aborted}}function Ar(){V.epoch++,V.controller&&V.controller.abort(),V.controller=null,V.busy=!1,Mr(),gr(),V.activeSet=null,Sr()}function kr(){try{sessionStorage.removeItem("pta-review-intent-v1")}catch(e){}Ar(),V.failedURL=null,Tn("已退出本地复习,原页面已恢复")}function Er(){try{var e=JSON.parse(sessionStorage.getItem("pta-review-intent-v1")||"null");return e&&/^\d{1,25}$/.test(e.id)&&Number.isFinite(e.at)&&e.at<=Date.now()&&Date.now()-e.at<18e5?e:null}catch(e){return null}}function Sr(){if("undefined"!=typeof document){var e=document.getElementById("pta-review-exit");e&&(e.hidden=!V.activeSet)}}function Cr(){if(t.review&&V.preferenceReady&&V.enabled){Sr();var e=Er(),n=location.pathname.match(/^\/problem-sets\/(\d{1,25})\/exam(?:\/|$)/);if(e&&n&&n[1]===e.id){if(V.activeSet!==e.id)V.failedURL!==location.href&&(V.activeSet=e.id,Sr(),s.running&&Da(),Ft(!0),Promise.resolve(async function(e){if(!t.review)return{status:"hidden"};if(gr(),!/^\d{1,25}$/.test(String(e))||!new RegExp("^/problem-sets/"+e+"/exam(?:/|$)").test(location.pathname))return{status:"wrong-page"};Da(),Ft(!0),Y.setId=String(e),Y.url=location.href,Y.pending=!0,Y.startedAt=Date.now(),vr("本地复习:正在核验缓存与账号…");var n,r=Y.generation;try{n=await Xr(String(e))}catch(e){return fr(r)&&gr(),{status:"unavailable"}}return fr(r)?n&&n.complete&&Array.isArray(n.questions)?(Y.set=n,Y.pending=!1,yr(r),Y.timer=setInterval(function(){yr(r)},500),{status:"ready",mounted:Y.panels.length}):(gr(),{status:"incomplete"}):{status:"cancelled"}}(e.id)).then(function(t){V.activeSet===e.id&&("ready"!==t.status?(Tn("复习暂不可用:缓存未完整或账号未核验"),vr("复习暂不可用:缓存未完整或账号未核验,请返回目录重试。"),V.failedURL=location.href,V.activeSet=null):t.mounted||Tn("复习(Beta):等待原题加载或核对题面;未匹配的题不会挂载"))}).catch(function(){V.activeSet===e.id&&(Tn("复习缓存校验未完成,请返回题集列表重试"),vr("复习缓存校验未完成,请返回题集列表重试。"),V.failedURL=location.href,V.activeSet=null)}));else if(Date.now()-e.at>6e4)try{sessionStorage.setItem("pta-review-intent-v1",JSON.stringify({id:e.id,at:Date.now()}))}catch(e){}}else V.activeSet&&(gr(),V.activeSet=null)}}function Ir(e){var t=new Error(e);return t.reviewCode=e,t}function Tr(e){if(e!==K.job||e.generation!==K.generation||e.controller.signal.aborted)throw Ir("cancelled");if(Date.now()>e.deadline)throw Ir("deadline")}function Mr(){K.generation++,K.job&&K.job.controller.abort(),K.job=null,K.owner=null,K.index.clear(),K.verified.clear(),K.sets.clear()}function Br(e,t){return new Promise(function(n,r){var a=function(){clearTimeout(o),r(Ir("cancelled"))},o=setTimeout(function(){clearTimeout(o),e.controller.signal.removeEventListener("abort",a),n()},t);e.controller.signal.addEventListener("abort",a,{once:!0}),e.controller.signal.aborted&&a()})}async function Nr(e,t){Tr(e);var n=new URL(t,"https://pintia.cn");if("https://pintia.cn"!==location.origin||n.origin!==location.origin||!/^\/api\/problem-sets\/\d{1,25}\/(exams|problem-summaries|exam-problems)$/.test(n.pathname))throw Ir("invalid-route");for(;Date.now()2097152)throw Ir("too-large");l.push(p.value)}var d,u=new Uint8Array(c),m=0;l.forEach(function(e){u.set(e,m),m+=e.byteLength});try{d=JSON.parse((new TextDecoder).decode(u))}catch(e){throw Ir("invalid-json")}if(!d||"object"!=typeof d||Array.isArray(d))throw Ir("invalid-data");return d}catch(t){if(t.reviewCode)throw t;throw Ir(e.controller.signal.aborted?"cancelled":r.signal.aborted?"timeout":"network")}finally{clearTimeout(i),e.controller.signal.removeEventListener("abort",o),a&&a.cancel().catch(function(){})}}function zr(e,t){var n=e&&e.exam,r=e&&e.problemSet,a=r&&Date.parse(r.endAt);if(!(n&&r&&r.id===t&&n.problemSetId===t&&"string"==typeof n.userId&&"string"==typeof n.id&&/^\d{1,25}$/.test(n.userId||"")&&/^\d{1,25}$/.test(n.id||"")))throw Ir("identity-unknown");if(!Number.isFinite(a)||a>Date.now())throw Ir("not-ended");return{owner:n.userId,examId:n.id,endTime:a,at:Date.now()}}function Or(e,t,n,r){if(!e||!Array.isArray(e.problemSetProblems)||e.problemSetProblems.length!==n)throw Ir("incomplete");return e.problemSetProblems.map(function(e){var n=function(e,t){if(!e||"string"!=typeof e.id||!/^\d{1,25}$/.test(e.id||"")||e.type!==t||"string"!=typeof e.content||!e.content.trim()||e.content.length>2e5)throw Ir("invalid-question");var n=[],r=[],a=e.problemConfig;if(a&&"object"==typeof a&&!Array.isArray(a)&&Object.keys(a).forEach(function(e){if(/^(trueOrFalse|multipleChoice|multipleChoiceMoreThanOneAnswer|fillInTheBlank|fillInTheBlankForProgramming|codeCompletion|programming|multipleFile|subjective)ProblemConfig$/.test(e)){var t=a[e];if(t&&"object"==typeof t){if(Array.isArray(t.choices)){if(n.length||t.choices.length>100)throw Ir("invalid-options");n=t.choices.map(function(e){if("string"==typeof e&&e.length<=5e4)return{content:e};if(e&&"string"==typeof e.content&&e.content.length<=5e4)return{content:e.content,label:"string"==typeof e.label?e.label.slice(0,10):""};throw Ir("invalid-options")})}if(Array.isArray(t.exampleTestDatas)){if(t.exampleTestDatas.length>50)throw Ir("too-large");r=t.exampleTestDatas.map(function(e){if(!e||"string"!=typeof e.input||"string"!=typeof e.output||e.input.length>5e4||e.output.length>5e4)throw Ir("invalid-examples");return{input:e.input,output:e.output}})}}}}),/^MULTIPLE_CHOICE/.test(t)&&n.length<2)throw Ir("missing-options");return{id:e.id,type:t,title:"string"==typeof e.title?e.title.slice(0,300):"",content:String(e.description||e.content||""),choices:n,examples:r,blankCount:0,answer:null,answerSource:"unknown"}}(e,t);if(r.has(n.id))throw Ir("duplicate-question");return r.add(n.id),n})}function Lr(e,t,n){if(["TRUE_OR_FALSE","MULTIPLE_CHOICE","MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER","FILL_IN_THE_BLANK","FILL_IN_THE_BLANK_FOR_PROGRAMMING"].indexOf(e)<0)return null;if(["accepted-submission","binary-verdict-inversion","ai-generated"].indexOf(n)<0||!Array.isArray(t)||!t.length||t.length>100)return null;if("binary-verdict-inversion"===n&&"TRUE_OR_FALSE"!==e)return null;if("TRUE_OR_FALSE"===e||/^MULTIPLE_CHOICE/.test(e)){if(!t.every(function(t){return Number.isInteger(t)&&t>=0&&t<("TRUE_OR_FALSE"===e?2:100)})||new Set(t).size!==t.length||("TRUE_OR_FALSE"===e||"MULTIPLE_CHOICE"===e)&&1!==t.length)return null}else if(!t.every(function(e){return"string"==typeof e&&""!==e.trim()&&e.length<=2e4}))return null;return t.slice()}function Rr(e){if(!e||!/^\d{1,25}$/.test(e.id||"")||!/^\d{1,25}$/.test(e.examId||"")||!0!==e.complete||!Array.isArray(e.questions)||!e.questions.length||e.questions.length>2e3||!Number.isFinite(e.at)||e.at>Date.now())return null;var t=new Set,n=[];for(var r of e.questions){if(!r||!/^\d{1,25}$/.test(r.id||"")||t.has(r.id)||$.indexOf(r.type)<0||"string"!=typeof r.content||!r.content.trim()||r.content.length>2e5||!Array.isArray(r.choices)||r.choices.length>100)return null;if(t.add(r.id),!r.choices.every(function(e){return e&&"string"==typeof e.content&&e.content.length<=5e4}))return null;var a=Number.isInteger(r.blankCount)&&r.blankCount>=1&&r.blankCount<=100?r.blankCount:0,o=Lr(r.type,r.answer,r.answerSource);!o||!/^FILL_IN_THE_BLANK/.test(r.type)||a&&o.length===a||(o=null),o&&/^MULTIPLE_CHOICE/.test(r.type)&&o.some(function(e){return e>=r.choices.length})&&(o=null),n.push({id:r.id,type:r.type,title:"string"==typeof r.title?r.title.slice(0,300):"",content:r.content,choices:r.choices.map(function(e){return{content:e.content,label:"string"==typeof e.label?e.label.slice(0,10):""}}),examples:Array.isArray(r.examples)?r.examples.slice(0,50).map(function(e){return{input:"string"==typeof e.input?e.input.slice(0,5e4):"",output:"string"==typeof e.output?e.output.slice(0,5e4):""}}):[],blankCount:a,answer:o,answerSource:o?r.answerSource:"unknown"})}return{id:e.id,examId:e.examId,at:e.at,complete:!0,questions:n}}function Dr(e){return new Promise(function(t,n){var r=setTimeout(function(){n(Ir("storage-timeout"))},2e3);Promise.resolve(e).then(function(e){clearTimeout(r),t(e)},function(e){clearTimeout(r),n(e)})})}function Pr(e){return"string"==typeof e&&/^pta-review-set-v2-\d{1,25}-\d{1,25}-[a-z0-9-]{1,80}$/.test(e)}function Hr(){return Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,12)}function qr(e){if(null==e)return{version:2,revision:"",entries:[]};if(!e||2!==e.version||"string"!=typeof e.revision||!Array.isArray(e.entries)||e.entries.length>1e4||new Blob([JSON.stringify(e)]).size>2097152)throw Ir("storage-index-invalid");var t=new Set,n=e.entries.map(function(e){if(!e||"string"!=typeof e.owner||!/^\d{1,25}$/.test(e.owner)||"string"!=typeof e.id||!/^\d{1,25}$/.test(e.id)||"string"!=typeof e.examId||!/^\d{1,25}$/.test(e.examId)||!Pr(e.key)||0!==e.key.indexOf("pta-review-set-v2-"+e.owner+"-"+e.id+"-")||!Number.isFinite(e.at)||!Number.isInteger(e.bytes)||e.bytes<0||e.bytes>4194304||!Number.isInteger(e.questionCount)||e.questionCount<1||e.questionCount>2e3||!Number.isInteger(e.missingAnswers)||e.missingAnswers<0||e.missingAnswers>e.questionCount)throw Ir("storage-index-invalid");var n=e.owner+":"+e.id;if(t.has(n))throw Ir("storage-index-invalid");return t.add(n),{owner:e.owner,id:e.id,examId:e.examId,key:e.key,at:e.at,bytes:e.bytes,questionCount:e.questionCount,missingAnswers:e.missingAnswers}});return{version:2,revision:e.revision,entries:n}}function jr(e){K.sets.delete(e.id),K.sets.set(e.id,e);var t=0;for(Array.from(K.sets.values()).forEach(function(e){t+=new Blob([JSON.stringify(e)]).size});K.sets.size>8||t>16777216;){var n=K.sets.keys().next().value,r=K.sets.get(n);t-=new Blob([JSON.stringify(r)]).size,K.sets.delete(n)}}async function Qr(){return"function"!=typeof GM_getValue?{version:2,revision:"",entries:[]}:qr(await Dr(Promise.resolve(GM_getValue(W,null))))}async function Fr(){var e=await GM_getValue(_,null);if(e&&e.clearing)throw Ir("storage-clearing");return e&&"string"==typeof e.token?e.token:""}function Gr(e){return"undefined"!=typeof navigator&&navigator.locks&&"function"==typeof navigator.locks.request?navigator.locks.request("pta-copilot-review-storage-v2",{mode:"exclusive"},e):Promise.reject(Ir("storage-lock-unavailable"))}async function Jr(e,t){if(Tr(e),"function"!=typeof GM_getValue||"function"!=typeof GM_setValue)return!1;if("undefined"==typeof navigator||!navigator.locks||"function"!=typeof navigator.locks.request)return K.persistenceError="storage-lock-unavailable",!1;var n;try{if(n=await Dr(Fr()),void 0!==e.storageEpoch&&e.storageEpoch!==n)throw Ir("storage-cleared")}catch(e){return K.persistenceError=e.reviewCode||"storage-read-failed",!1}Tr(e);var r=Rr(t),a=r&&new Blob([JSON.stringify(r)]).size;if(!r||a>4194304)throw Ir("too-large");var o="pta-review-set-v2-"+e.owner+"-"+t.id+"-"+Hr(),i=e.generation;K.pending.add(o);var s=K.writeQueue.catch(function(){}).then(function(){return Gr(async function(){Tr(e);var s=await Fr();if(s!==n)throw Ir("storage-cleared");var l=qr(await GM_getValue(W,null));if(!l.entries.some(function(n){return n.owner===e.owner&&n.id===t.id})&&l.entries.length>=1e4)throw Ir("storage-index-full");if(i!==K.generation)throw Ir("cancelled");var c=l.entries.find(function(n){return n.owner===e.owner&&n.id===t.id&&n.examId===t.examId});if(c){var p=await GM_getValue(c.key,null),d=p&&p.owner===e.owner&&Rr(p.record);if(d&&(r.questions.forEach(function(e){var t=d.questions.find(function(t){return t.id===e.id&&t.type===e.type&&t.content===e.content&&JSON.stringify(t.choices)===JSON.stringify(e.choices)});t&&null!==t.answer&&(null===e.answer||"ai-generated"===e.answerSource&&["accepted-submission","binary-verdict-inversion"].indexOf(t.answerSource)>=0)&&(e.answer=t.answer.slice(),e.answerSource=t.answerSource,e.blankCount=t.blankCount)}),(a=new Blob([JSON.stringify(r)]).size)>4194304))throw Ir("too-large")}if(await GM_setValue(o,{version:2,owner:e.owner,record:r}),Tr(e),await Fr()!==s)throw Ir("storage-cleared");for(var u=0;u<3;u++){var m=(l=qr(await GM_getValue(W,null))).entries.find(function(n){return n.owner===e.owner&&n.id===t.id}),h=l.entries.filter(function(n){return!(n.owner===e.owner&&n.id===t.id)});h.push({owner:e.owner,id:t.id,examId:t.examId,key:o,at:t.at,bytes:a,questionCount:r.questions.length,missingAnswers:r.questions.filter(function(e){return null===e.answer}).length});var g={version:2,revision:Hr(),entries:h};if(h.length>1e4||new Blob([JSON.stringify(g)]).size>2097152)throw Ir("storage-index-full");if(qr(await GM_getValue(W,null)).revision===l.revision){if(Tr(e),await Fr()!==s)throw Ir("storage-cleared");await GM_setValue(W,g);var f=qr(await GM_getValue(W,null)),b=f.entries.find(function(n){return n.owner===e.owner&&n.id===t.id});if(b&&b.key===o){Tr(e),K.index.set(t.id,b);var v=K.verified.get(t.id);if(v&&v.owner===e.owner&&v.examId===t.examId&&jr(r),K.pending.delete(o),m&&m.key!==o&&!f.entries.some(function(e){return e.key===m.key})&&"function"==typeof GM_deleteValue)try{await GM_deleteValue(m.key)}catch(e){}return!0}}}throw Ir("storage-contention")})});K.writeQueue=s;try{return await Dr(s)}catch(e){if("cancelled"===e.reviewCode||"deadline"===e.reviewCode)throw e;return K.persistenceError=e.reviewCode||"storage-write-failed",!1}}async function Ur(e,t){if(Tr(e),K.index.clear(),K.persistenceError="","function"==typeof GM_getValue){await Dr(K.writeQueue.catch(function(){})),e.storageEpoch=await Dr(Fr());var n=await Qr();Tr(e),n.entries.forEach(function(e){e.owner===t.owner&&K.index.set(e.id,e)});var r=await Dr(Promise.resolve(GM_getValue(Z,null)));if(Tr(e),!(!r||1!==r.version||r.owner!==t.owner||!Array.isArray(r.sets)||r.sets.length>100||new Blob([JSON.stringify(r)]).size>8388608))for(var a of r.sets){Tr(e);var o=Rr(a);if(o&&!K.index.has(o.id)&&!await Jr(e,o))break}}}async function Yr(e,t,n){Tr(e);var r=$r(t,n.owner,n.examId);if(r)return r;if("function"!=typeof GM_getValue)return null;var a=async function(){Tr(e);var r=(await Qr()).entries.find(function(e){return e.id===t&&e.owner===n.owner});if(Tr(e),!r||r.examId!==n.examId)return null;K.index.set(t,r);var a=await Dr(Promise.resolve(GM_getValue(r.key,null)));if(Tr(e),!a||2!==a.version||a.owner!==n.owner||new Blob([JSON.stringify(a)]).size>4194804)throw Ir("storage-record-invalid");var o=Rr(a.record);if(!o||o.id!==t||o.examId!==n.examId)throw Ir("storage-record-invalid");return jr(o),o};return"undefined"!=typeof navigator&&navigator.locks&&"function"==typeof navigator.locks.request?Dr(Gr(a)):a()}async function Vr(e,t){Tr(e);var n=K.sets.get(t);if(!n)throw Ir("cache-not-loaded");return Jr(e,n)}async function Xr(e){if("string"!=typeof e||!/^\d{1,25}$/.test(e))throw Ir("invalid-route");Mr();var t={generation:K.generation,controller:new AbortController,deadline:Date.now()+3e4,nextStart:0,owner:null};K.job=t;var n=zr(await Nr(t,"/api/problem-sets/"+e+"/exams"),e);return Tr(t),t.owner=n.owner,K.owner=n.owner,K.verified.set(e,n),t.deadline=1/0,await Ur(t,n),Tr(t),Yr(t,e,n)}async function Kr(e){if("string"!=typeof e||!/^\d{1,25}$/.test(e))throw Ir("invalid-route");var t=K.job;if(!t||!t.owner)return Xr(e);Tr(t);var n=K.verified.get(e);if(!n||Date.now()-n.at>3e5){try{n=zr(await Nr(t,"/api/problem-sets/"+e+"/exams"),e)}catch(t){throw"login"===t.reviewCode?Mr():K.verified.delete(e),t}if(n.owner!==t.owner)throw Mr(),Ir("account-changed");var r=K.verified.get(e);r&&r.examId!==n.examId&&K.sets.delete(e),K.verified.set(e,n)}return Yr(t,e,n)}function Zr(e){return Kr(e)}function Wr(e){var t=K.verified.get(e),n=K.index.get(e);return!t||t.owner!==K.owner||Date.now()-t.at>3e5||!n||n.owner!==t.owner||n.examId!==t.examId?null:{id:e,examId:n.examId,at:n.at,complete:!0,questionCount:n.questionCount,missingAnswers:n.missingAnswers,persisted:!0}}async function _r(e,t){var n=await Kr(e),r=K.job;if(!n||!r)throw Ir("identity-unknown");if(r!==K.job||r.generation!==K.generation||r.controller.signal.aborted)throw Ir("cancelled");if(Date.now()>r.deadline||Date.now()-K.verified.get(e).at>3e5){var a;r.deadline=Date.now()+3e4;try{a=zr(await Nr(r,"/api/problem-sets/"+e+"/exams"),e)}catch(t){throw"login"===t.reviewCode?Mr():(K.verified.delete(e),r.deadline=0),t}if(a.owner!==r.owner||a.examId!==n.examId)throw Mr(),Ir("account-changed");K.verified.set(e,a),r.deadline=Date.now()+3e5}if(Tr(r),!Array.isArray(t)||t.length>2e3)throw Ir("invalid-answer");return t.forEach(function(e){var t=n.questions.find(function(t){return t.id===e.id});if(t&&!("ai-generated"===e.answerSource&&["accepted-submission","binary-verdict-inversion"].indexOf(t.answerSource)>=0)){var r=Lr(t.type,e.answer,e.answerSource);if(r&&/^MULTIPLE_CHOICE/.test(t.type)&&r.some(function(e){return e>=t.choices.length})&&(r=null),r&&/^FILL_IN_THE_BLANK/.test(t.type)){var a=Number.isInteger(e.blankCount)&&e.blankCount>=1&&e.blankCount<=100?e.blankCount:0,o=t.blankCount||a;!o||r.length!==o||t.blankCount&&a&&a!==t.blankCount?r=null:t.blankCount=o}r&&(t.answer=r,t.answerSource=e.answerSource)}}),Vr(r,e)}function $r(e,t,n){var r=K.sets.get(e);return t&&t===K.owner&&r&&r.examId===n?(K.sets.delete(e),K.sets.set(e,r),r):null}function ea(e,t){e.forEach(function(e){var n=e.endTime,r=e.startTime;Number.isFinite(n)&&(n<=t?("ended"!==e.lifecycle&&(e.clockEnded=!0),e.lifecycle="ended",e.status="已关闭"):("upcoming"===e.lifecycle||e.clockEnded)&&(e.lifecycle=Number.isFinite(r)&&r>t?"upcoming":"active",e.status="upcoming"===e.lifecycle?"未开放":"已开放",delete e.clockEnded))})}function ta(e,t){var n=e.endTime,r=e.startTime,a=e.metrics,o=a&&Number.isInteger(a.answered)&&Number.isInteger(a.total)&&a.total>0&&a.answered>=0&&a.answered<=a.total,i=o?a.answered/a.total:null,s="—",l="截止未知",c="截止时间未知",p=!1;if(Number.isFinite(n))if(n<=t)s="已截止",l="",c="已截止";else{var d=n-t;p=d<864e5,s=d>=864e5?Math.floor(d/864e5)+"天":d>=36e5?Math.floor(d/36e5)+"小时":Math.max(1,Math.ceil(d/6e4))+"分钟",l=Number.isFinite(r)&&r=864e5?"(整天向下取整)":d>=36e5?"(整小时向下取整)":"(分钟向上取整)")}var u=o?"已保存作答 "+a.answered+"/"+a.total+",完成度 "+Math.round(1e3*i)/10+"%":"已保存完成度未知";return e.metricsCached&&(u+="(缓存)"),{days:s,caption:l,ratio:i,urgent:p,label:c+";环形表示"+u}}function na(e,t,n){var r="true"!==e.dataset.expanded,a=e.open?t.getBoundingClientRect().height:0;if(e.ptaAnimation&&(e.ptaAnimation.cancel(),e.ptaAnimation=null),e.dataset.expanded=String(r),n.setAttribute("aria-expanded",String(r)),"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||"function"!=typeof t.animate)e.open=r;else{e.open=!0;var o=t.animate([{height:a+"px",opacity:r?.4:1},{height:(r?t.scrollHeight:0)+"px",opacity:r?1:0}],{duration:180,easing:"ease-out",fill:"both"});e.ptaAnimation=o,o.onfinish=function(){e.ptaAnimation===o&&(e.open=r,e.ptaAnimation=null,o.cancel())}}}function ra(){var e=document.getElementById("pta-class-home"),n=document.querySelector("#pta-root .pta-expanded");if(e&&n){var r=function(e,t){var n=Bn(),r=Mn(location.pathname);if(!P.host){var a=document.createElement("div");a.id="pta-home-pull",a.hidden=!0;var o=document.createElement("div");o.className="pta-home-pull-fold",o.id="pta-home-pull-content",o.inert=!0,o.setAttribute("aria-hidden","true");var i=document.createElement("div");i.className="pta-home-pull-inner",o.appendChild(i);var s=document.createElement("button");s.type="button",s.id="pta-home-pull-handle",s.setAttribute("aria-controls",o.id),s.setAttribute("aria-expanded","false"),s.setAttribute("aria-label","展开班级题集");var l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 120 32"),l.setAttribute("preserveAspectRatio","none"),l.setAttribute("aria-hidden","true"),l.setAttribute("focusable","false");var c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("d","M5 1 H115 Q120 1 116 7 L102 27 Q99 31 94 31 H26 Q21 31 18 27 L4 7 Q0 1 5 1Z"),l.appendChild(c),s.appendChild(l);var p=document.createElement("span");p.textContent="▾",s.appendChild(p),s.addEventListener("click",function(){zn(!P.open)}),a.addEventListener("keydown",function(e){"Escape"===e.key&&P.open&&(e.preventDefault(),zn(!1),s.focus())}),a.appendChild(o),a.appendChild(s),(document.getElementById("pta-shell")||t).appendChild(a),P.host=a,P.fold=o,P.button=s,P.inner=i}return P.path&&P.path!==location.pathname&&(P.open=!1,P.host.classList.remove("open"),P.button.setAttribute("aria-expanded","false"),P.button.setAttribute("aria-label","展开班级题集"),P.button.querySelector("span").textContent="▾",P.fold.inert=!0,P.fold.setAttribute("aria-hidden","true")),P.path=location.pathname,P.host.hidden=!n,t.classList.toggle("pta-answer-home-host",n),n&&e.parentElement!==P.inner?P.inner.appendChild(e):r&&e.parentElement!==t&&t.insertBefore(e,t.firstChild),n&&(e.hidden=!1),n}(e,n),a=Nn();if(n.classList.toggle("pta-catalog-mode",Mn(location.pathname)),r||(e.hidden=!a),!a){if(r)return;return ee&&e.replaceChildren(),ee="",void("idle"!==H.status&&Hn())}if(!ca()){ea(H.rows,Date.now());var o,i,s=Ln(H.rows),l=function(e){var t=H.rows,n=("api"===H.source&&(!0===H.directoryComplete||"ready"===H.status)||"cache"===H.source&&!0===H.cacheVerified&&F&&G.owner===F.userId&&Number.isFinite(H.snapshotAt)&&Date.now()>=H.snapshotAt&&Date.now()-H.snapshotAt<=864e5)&&Number.isInteger(H.total)&&t.length===H.total&&new Set(t.map(function(e){return e.id})).size===t.length&&t.every(function(e){return!0===e.groupsVerified}),r=[],a=[],o=!n;return e.groups.forEach(function(e){var t=e.items.length>0&&e.items.every(function(e){return"已关闭"===e.status&&Number.isFinite(e.deadlineOrder)&&e.deadlineOrder<=Date.now()});n&&/^id:/.test(e.key||"")&&t?a.push(e):r.push(e),e.items.some(function(e){return"状态未提供"===e.status||!Number.isFinite(e.deadlineOrder)})&&(o=!0)}),{current:r,archived:a,uncertain:o}}(s),c=location.href+"|"+H.status+"|"+H.message+"|"+JSON.stringify(s)+"|"+JSON.stringify(l)+"|"+(o=H.rows,i=Date.now(),o.map(function(e){var t=ta(e,i);return t.days+":"+t.caption}).join("|")+"|")+(void 0!==V?V.revision:0);if(c!==ee){ee=c;var p=e._ptaCatalogueMemory||(e._ptaCatalogueMemory={opened:new Set,scrolls:new Map,outer:0}),d=p.opened,u=p.scrolls,m=e.querySelector(".pta-catalog-group")?e.scrollTop:p.outer;Array.from(e.querySelectorAll("details")).forEach(function(e){"true"===e.dataset.expanded||void 0===e.dataset.expanded&&e.open?d.add(e.dataset.group):d.delete(e.dataset.group);var t=e.querySelector(":scope > .pta-catalog-body > .pta-catalog-scroll");t&&u.set(e.dataset.group,t.scrollTop)});var h=document.createDocumentFragment();h.appendChild(E("strong","班级题集","pta-catalog-title"));var g=E("button","重新读取","pta-link-btn");g.type="button",g.disabled="loading"===H.status,g.addEventListener("click",lr),h.appendChild(g);var f=E("button","清除缓存","pta-link-btn");if(f.type="button",f.setAttribute("aria-label","清除本地题集缓存"),f.addEventListener("click",async function(){f.disabled=!0;try{Tn(await async function(){Hn(),clearTimeout(Q.timer),Q.timer=null,Q.dirty=!1,Q.generation++,Q.stored=null,Q.loaded=!0,Vn();var e=!1;return Q.queue=Q.queue.then(async function(){try{if("function"==typeof GM_deleteValue)await GM_deleteValue(j);else{if("function"!=typeof GM_setValue)return;await GM_setValue(j,null)}e=!0}catch(e){}}),await Q.queue,H.status="partial",qn(),H.message=e?"本地题集缓存已清除。":"内存缓存已清除,本地存储暂不可用。",ra(),e}()?"本地题集缓存已清除":"内存缓存已清除,本地存储暂不可用")}catch(e){Tn("题集缓存清除失败,请重试")}finally{f.disabled=!1}}),h.appendChild(f),t.review){var b=E("button","复习(Beta) · "+(V.enabled?"开启":"关闭"),"pta-link-btn pta-review-switch");b.type="button",b.setAttribute("role","switch"),b.setAttribute("aria-checked",String(V.enabled)),b.disabled=V.preferenceBusy,b.addEventListener("click",function(){!async function(e){if(t.review&&!V.preferenceBusy){e=!0===e,V.preferenceBusy=!0,e||(V.enabled=!1,kr()),wr();try{await GM_setValue(X,e),V.enabled=e,V.preferenceReady=!0,V.showTools=e,V.autoKey="",V.status=e?"复习(Beta)已开启,将在完整目录就绪后自动缓存;刷新后保持开启":"复习(Beta)已关闭,已有缓存保留"}catch(e){V.status="复习开关保存失败,刷新后的状态未确认",Tn(V.status)}finally{V.preferenceBusy=!1,wr()}}}(!V.enabled)}),h.appendChild(b),V.showTools&&h.appendChild(E("p","复习(Beta):后台缓存全部未缓存的已结束可访问题集;已有缓存不重复拉取,缺失答案和 AI 生成答案单独标出。","pta-catalog-note"))}if(l.current.forEach(function(e){h.appendChild(S(e))}),l.archived.length){var v=E("details",void 0,"pta-catalog-group pta-catalog-archive");v.dataset.group="archive:closed",v.open=d.has("archive:closed"),v.dataset.expanded=String(v.open);var y=E("summary","已归档班级 · "+l.archived.length);y.setAttribute("aria-expanded",String(v.open));var w=E("div",void 0,"pta-catalog-body"),x=E("div",void 0,"pta-catalog-archive-list pta-catalog-scroll");x.tabIndex=0,x.setAttribute("aria-label","已归档班级"),l.archived.forEach(function(e){x.appendChild(S(e))}),y.addEventListener("click",function(e){e.preventDefault(),na(v,w,y)}),w.appendChild(x),v.appendChild(y),v.appendChild(w),h.appendChild(v)}if(void 0!==V&&t.review&&V.status&&h.appendChild(E("p",V.status,"pta-catalog-note")),t.review&&V.showTools){var A=E("button","清除复习缓存","pta-link-btn");if(A.type="button",A.addEventListener("click",async function(){Ar(),A.disabled=!0;try{await async function(){Mr();var e=K.generation;if("function"!=typeof GM_getValue||"function"!=typeof GM_setValue||"function"!=typeof GM_deleteValue||"function"!=typeof GM_listValues)throw Ir("storage-clear-unavailable");if("undefined"==typeof navigator||!navigator.locks||"function"!=typeof navigator.locks.request)throw Ir("storage-lock-unavailable");var t=Hr();return K.writeQueue=K.writeQueue.catch(function(){}).then(function(){return Gr(async function(){await GM_setValue(_,{token:t,clearing:!0});var e=await GM_listValues();if(!Array.isArray(e))throw Ir("storage-clear-failed");var n=e.filter(Pr);for(var r of(K.pending.forEach(function(e){Pr(e)&&n.indexOf(e)<0&&n.push(e)}),n))await GM_deleteValue(r);await GM_deleteValue(W),await GM_deleteValue(Z),K.pending.clear(),await GM_setValue(_,{token:t,clearing:!1})})}),await K.writeQueue,e===K.generation}(),V.status="复习缓存已清除,开关保持原状态;重新开启或手动缓存可再次读取"}catch(e){V.status="复习缓存删除失败,请重试",Tn(V.status)}finally{A.disabled=!1,wr()}}),h.appendChild(A),V.busy){var k=E("button","停止复习缓存","pta-link-btn");k.type="button",k.addEventListener("click",function(){Ar(),V.status="已停止复习缓存",wr()}),h.appendChild(k)}}h.appendChild(E("p",(H.message||"准备读取…")+" 已保存进度 · 未知不代表0。"+(l.uncertain?" 目录或状态未确认的班级暂不归档。":""),"pta-catalog-note")),e.replaceChildren(h),Array.from(e.querySelectorAll("details")).forEach(function(e){var t=e.querySelector(":scope > .pta-catalog-body > .pta-catalog-scroll");t&&(t.scrollTop=u.get(e.dataset.group)||0)}),e.scrollTop=m,p.outer=m}}}function E(e,t,n){var r=document.createElement(e);return void 0!==t&&(r.textContent=t),n&&(r.className=n),r}function S(e){var n=E("details",void 0,"pta-catalog-group");n.open=!1,n.dataset.group=e.key||e.name,d.has(e.key||e.name)&&(n.open=!0),n.dataset.expanded=String(n.open);var r=E("summary",e.name+" · "+e.items.length);r.setAttribute("aria-expanded",String(n.open)),n.appendChild(r);var a=E("div",void 0,"pta-catalog-body"),o=E("ul",void 0,"pta-catalog-items pta-catalog-scroll");if(o.tabIndex=0,o.setAttribute("aria-label",e.name+" 题集"),r.addEventListener("click",function(e){e.preventDefault(),na(n,a,r)}),e.items.forEach(function(e){var n=E("li"),r=E("div",void 0,"pta-catalog-item-copy"),a=E("a",e.title);n.className="pta-catalog-item",a.href=e.href,r.appendChild(a),e.metricsNote&&(n.title=e.metricsNote),r.appendChild(E("div","截止 "+(e.deadline||"未提供")+" · "+e.status,"pta-catalog-meta"));var i=e.metrics;r.appendChild(E("div",i?"已作答 "+(null===i.answered?"未提供":i.answered+"/"+i.total)+" · 进度 "+(null===i.progress?"未提供":i.progress)+" · 分数 "+(null===i.score?"未提供":i.score):"进度 / 分数:"+("unavailable"===e.metricsState?"未能读取":"loading"===e.metricsState?"读取中…":"等待读取…"),"pta-catalog-meta"));var s=function(e){return/^更新于 /.test(e||"")?"":/^进度缓存于 /.test(e||"")?"进度来自缓存":/^缓存于 /.test(e||"")?"历史缓存":e||""}(e.metricsNote);s&&r.appendChild(E("div",s,"pta-catalog-meta")),n.appendChild(r),n.appendChild(function(e){var n=ta(e,Date.now()),r=document.createElement("div");r.className="pta-catalog-time-ring",n.urgent&&r.classList.add("urgent"),r.setAttribute("role","img"),r.setAttribute("aria-label",n.label),r.title=n.label;var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg");function i(e){var t=document.createElementNS(a,"circle");return t.setAttribute("cx","28"),t.setAttribute("cy","28"),t.setAttribute("r","24"),t.setAttribute("class",e),t.setAttribute("fill","none"),t.setAttribute("stroke-width","3"),o.appendChild(t),t}o.setAttribute("viewBox","0 0 56 56"),o.setAttribute("aria-hidden","true"),i("pta-catalog-ring-track");var s=i("pta-catalog-ring-arc"),l=2*Math.PI*24;s.setAttribute("transform","rotate(-90 28 28)"),null===n.ratio?(s.setAttribute("stroke-dasharray","3 5"),r.classList.add("unknown")):(s.setAttribute("stroke-dasharray",String(l)),s.setAttribute("stroke-dashoffset",String(l*(1-n.ratio))));var c=document.createElement("span");c.className="pta-catalog-ring-center";var p=document.createElement("strong");p.textContent=n.days;var d=document.createElement("small");d.textContent=n.caption;var u=Wr(e.id);if(u&&u.complete&&V.enabled&&t.review){var m=document.createElement("button");m.type="button",m.textContent="复习",m.className="pta-review-open",m.style.cssText="pointer-events:auto;min-width:40px;min-height:40px;border:0;border-radius:8px;padding:6px;color:#166534;background:#dcfce7;font-weight:700;cursor:pointer",m.title="复习(Beta):题目已缓存;缺失或 AI 答案会单独标明",m.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation(),function(e){if(t.review)if(V.enabled){var n=Wr(e.id);if(n&&n.complete){try{sessionStorage.setItem("pta-review-intent-v1",JSON.stringify({id:e.id,at:Date.now()}))}catch(e){return void Tn("浏览器无法保存本次复习入口,请检查存储权限")}location.href=e.href}else Tn("题目缓存尚未完整或账号未核验")}else Tn("请先开启复习(Beta)")}(e)}),c.appendChild(m),r.removeAttribute("role"),r.setAttribute("aria-label",n.label+";题目已缓存,可复习")}else c.appendChild(p),c.appendChild(d);return r.appendChild(o),r.appendChild(c),r}(e)),o.appendChild(n)}),t.review&&V.showTools&&e.items.some(function(e){return"ended"===e.lifecycle})){var i=E("button",V.busy?"正在缓存复习题目…":"缓存本班已结束题集(Beta)","pta-link-btn");i.type="button",i.disabled=V.busy,i.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),xr(e.items)}),a.appendChild(i)}return a.appendChild(o),n.appendChild(a),n}}function aa(e){if(!(["answer","settings","catalogue"].indexOf(e)<0))try{localStorage.setItem(ne,JSON.stringify({version:1,page:e}))}catch(e){}}function oa(e){var t=e&&1===e.nodeType?e:e&&e.parentElement;return!(!t||"function"!=typeof t.closest||!t.closest("#pta-root,.pta-assist-popover,#pta-api-diagnostic-preview,.pta-toast,.pta-local-review,.pta-local-review-status"))}function ia(){clearTimeout(ae.timer),ae.timer=null,ae.target=null}function sa(e){ia(),ae.target=e,ae.timer=setTimeout(ia,800),la(),"scroll"===re.reason&&da(!1)}function la(){clearTimeout(re.timer),re.timer=null,re.epoch++}function ca(){var e=document.getElementById("pta-shell");return!(!e||!e.classList.contains("collapsed")&&!re.moving)}function pa(){clearTimeout(re.motionTimer),re.motionTimer=null,re.moving=!1,re.alive&&!ca()&&ra()}function da(e,t){var n=document.getElementById("pta-shell");if(n){la(),re.reason=e?t||"manual":null;var r=n.classList.contains("collapsed")!==!!e;if(r||!n.hasAttribute("aria-expanded")){r&&(clearTimeout(re.motionTimer),re.moving=!0,re.motionTimer=setTimeout(pa,760)),n.classList.toggle("collapsed",!!e),n.setAttribute("aria-expanded",String(!e)),!e&&r&&setTimeout(function(){var e=document.getElementById("pta-root")||n;if(e){var t=e.getBoundingClientRect(),r=window.innerWidth,a=window.innerHeight,o=t.left,i=t.top;t.right>r-10&&(o=r-t.width-10),t.left<10&&(o=10),t.bottom>a-10&&(i=a-t.height-10),t.top<10&&(i=10),e.style.left=o+"px",e.style.top=i+"px"}},300);var a=document.getElementById("pta-drawer"),o=n.querySelector(".pta-expanded");a&&(a.inert=!!e||!a.classList.contains("open")),o&&(o.inert=!!e),void 0!==P&&P.host&&(P.host.inert=!!e)}}}function ua(e){if(re.alive&&"hidden"!==document.visibilityState&&!oa(e.target)&&!ae.target){var t=document.getElementById("pta-shell");if(t&&(!t.classList.contains("collapsed")||"scroll"===re.reason)){da(!0,"scroll");var n=re.epoch,r=location.href;re.timer=setTimeout(function(){re.timer=null,n===re.epoch&&re.alive&&"hidden"!==document.visibilityState&&location.href===r&&"scroll"===re.reason&&da(!1)},500)}}}function ma(e){if(!oa(e.target)){var t=function(e){if(e.button>0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return null;var t=e.target&&1===e.target.nodeType?e.target:e.target&&e.target.parentElement,n=t&&t.closest&&t.closest("a[href]");if(!n||n.hasAttribute("download")||"_blank"===n.getAttribute("target"))return null;try{var r=new URL(location.href),a=new URL(n.getAttribute("href"),r.href),o=r.pathname.match(/^\/problem-sets\/([^/]+)\/exam\/problems\/type\/[1-7](?:\/|$)/),i=a.pathname.match(/^\/problem-sets\/([^/]+)\/exam\/problems\/type\/[1-7]\/?$/);return o&&i&&o[1]===i[1]&&r.origin===a.origin?a.href:null}catch(e){return null}}(e);t?sa(t):(ia(),da(!0,"outside"))}}function ha(){ae.target&&(location.href===ae.target?sa(location.href):ia()),la(),"scroll"===re.reason&&(re.reason="navigation")}function ga(){if(!document.getElementById("pta-root")){var n=document.createElement("style");n.id="pta-style",n.textContent=D+"\n .pta-expanded.pta-catalog-mode > :not(#pta-class-home){display:none!important}\n #pta-class-home{padding:0 2px;flex:1 1 auto;min-height:0;max-height:100%;overflow:auto;color:inherit;text-align:left}\n #pta-class-home[hidden]{display:none!important}\n .pta-catalog-title{font-size:15px}.pta-catalog-nav{display:flex;gap:12px;margin:10px 0}\n .pta-catalog-nav a,.pta-catalog-group a{color:inherit;text-decoration:underline;text-underline-offset:3px}\n .pta-catalog-note,.pta-catalog-meta{font-size:11px;opacity:.7;line-height:1.55}\n .pta-catalog-group{border:1px solid rgba(128,128,128,.25);border-radius:10px;margin:10px 0;padding:10px}\n .pta-catalog-group summary{cursor:pointer;font-size:12px;font-weight:700;overflow-wrap:anywhere}\n .pta-catalog-group ul{list-style:none;padding:0;margin:0}.pta-catalog-group li{border-top:1px solid rgba(128,128,128,.2);padding-top:8px;margin-top:8px;overflow-wrap:anywhere}\n .pta-catalog-group li a{font-size:12px;line-height:1.5;display:block}.pta-catalog-meta{margin-top:4px}\n",document.head.appendChild(n);var a=document.createElement("div");a.id="pta-root",a.innerHTML='\n
\n
\n
logo
未配置 AI
\n
\n
\n
\n \n
准备就绪
进入题目后开始
\n
等待开始—
\n
编程语言自动检测
\n
\n \n \n
\n \n \n
\n
运行记录0
\n
准备接收任务…
\n
\n
\n
设置
实时保存
\n
\n
\n
全能快速模型:官方 API 直连,代码生成与逻辑推导准确迅速,支持视觉图片输入。
\n \n
\n
模型由供应商接口实时返回。
\n
\n
\n
1(串行)
\n
\n
1 为串行,2–10 为同页并发请求数;关闭连续答题时仅处理一题。已发出的请求可能仍计费。
\n
\n
\n
2048 (2K)
\n
\n \n
\n
\n
\n
\n
\n
中 (Medium · 推荐)
\n
\n \n
\n
0关闭
\n
1低
\n
2中 (推荐)
\n
3高
\n
\n
\n
\n
本地保存 7 天,刷新保留 · 按账号隔离
\n
开发者选项\n
\n
\n \n 已关闭 · 0 条\n
\n
\n
\n \n 已关闭 · 0 条\n
\n
\n
\n
\n
配置均实时自动保存到当前浏览器本地。Key 仅保存在本地设备,不经任何中转。OpenCode Free 会自动探测 127.0.0.1:8788。
\n
\n
\n
\n ',document.body.appendChild(a),function(n){!function(){var e=document.getElementById("pta-deadline-reminder-toggle"),t=document.getElementById("pta-deadline-reminder-days"),n=document.getElementById("pta-deadline-reminder-status");async function r(r){if(r.isTrusted){var a=e.checked,o=Number(t.value),i=Qn();if(a&&(!i||!Number.isInteger(o)||o<1||o>30))return e.checked=!1,void(n.textContent="请先读取并验证当前账号题集目录");try{var s=await xa("revocation","");await Aa("control",{id:ka(),enabled:a,days:o,owner:i?i.userId:null,revocation:s}),oe.last="",await Ca()}catch(e){n.textContent="设置未保存,提醒配置失败"}}}e&&!oe.bound&&(oe.bound=!0,e.addEventListener("change",r),t.addEventListener("change",r),Ca(),oe.timer=setInterval(Ca,3e4))}();var a=document.getElementById("pta-helper-copy-pair");if(a&&a.addEventListener("click",function(t){t.isTrusted&&async function(){if(!de){de=!0,clearTimeout(ue);var t=document.getElementById("pta-helper-copy-pair"),n=document.getElementById("pta-helper-pair-status");t&&(t.disabled=!0,t.textContent="复制中…"),n&&(n.textContent="正在复制配对码…");try{var r=await Ta(async function(){var t=await Ia();return JSON.stringify(e.publicKey(t.publicKey))}),a=await function(e){return new Promise(function(t,n){var r=!1,a=setTimeout(function(){o(Error("未收到复制确认,请重试"))},5e3);function o(e,o){r||(r=!0,clearTimeout(a),e?n(e):t({confirmed:!0===o}))}function i(){if(!r)try{var t=GM_setClipboard(e,"text",function(){o(null,!1)});t&&"function"==typeof t.then&&t.then(function(){o(null,!1)},function(){o(Error("剪贴板写入失败,请重试"))})}catch(e){o(Error("剪贴板写入失败,请检查脚本管理器权限"))}}try{if("undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText){var s=navigator.clipboard.writeText(e);if(s&&"function"==typeof s.then)return void s.then(function(){o(null,!0)},i)}}catch(e){}i()})}(r);if(!a.confirmed)return t&&(t.textContent="已请求复制"),void(n?n.textContent="已请求复制,请粘贴检查;脚本管理器无法确认是否成功。":alert("已请求复制,请粘贴检查;脚本管理器无法确认是否成功。"));t&&(t.textContent="已复制 ✓"),n?n.textContent="配对码已复制,请在 Helper 菜单选择“配对”。":alert("配对码已复制。"),ue=setTimeout(function(){t&&(t.textContent="复制 Helper 配对码"),n&&(n.textContent="仅复制验证公钥,不含私钥或 API Key。")},2500)}catch(e){t&&(t.textContent="重试复制"),n?n.textContent="未确认复制成功,请重试并检查脚本管理器权限。":alert("未确认复制成功,请重试并检查脚本管理器权限。")}finally{de=!1,t&&(t.disabled=!1)}}}()}),function(e){var t=e.querySelector(".pta-dev-options");if(t&&!t._ptaDisclosureBound){var n=t.querySelector("summary"),r=t.querySelector(".pta-dev-collapse");if(n&&r){t._ptaDisclosureBound=!0;var a=!!t.open,o=a,i=null,s=0,l=[],c=window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null;n.setAttribute("aria-controls",r.id),t.setAttribute("data-dev-expanded",String(a)),p(a),n.addEventListener("click",function(e){e.preventDefault(),u(!a)}),r.addEventListener("transitionend",function(e){e.target===r&&"grid-template-rows"===e.propertyName&&d(s)}),t.addEventListener("toggle",function(){t.open!==o&&u(!!t.open)}),c&&c.addEventListener?c.addEventListener("change",m):c&&c.addListener&&c.addListener(m)}}function p(e){n.setAttribute("aria-expanded",String(e)),r.setAttribute("aria-hidden",String(!e)),e?(r.removeAttribute("inert"),l.forEach(function(e){null===e.value?e.node.removeAttribute("tabindex"):e.node.setAttribute("tabindex",e.value)}),l=[]):(r.contains(document.activeElement)&&n.focus(),r.setAttribute("inert",""),l.length||Array.prototype.forEach.call(r.querySelectorAll("a[href],button,input,select,textarea,[tabindex]"),function(e){l.push({node:e,value:e.getAttribute("tabindex")}),e.setAttribute("tabindex","-1")}))}function d(e){e===s&&(clearTimeout(i),i=null,o=a,t.open=a,t.removeAttribute("data-dev-animating"))}function u(e){var n=!!t.open,l=++s;a=e,clearTimeout(i),i=null,p(e),e&&(o=!0,t.open=!0,n||(t.setAttribute("data-dev-expanded","false"),r.getBoundingClientRect())),t.setAttribute("data-dev-expanded",String(e)),c&&c.matches||!n&&!e?d(l):(t.setAttribute("data-dev-animating","true"),i=setTimeout(function(){d(l)},280))}function m(){c.matches&&d(s)}}(n),!t.developer){var o=n.querySelector(".pta-dev-options");o&&(o.hidden=!0,o.setAttribute("inert",""),o.style.setProperty("display","none","important")),Xa(),ja()}document.getElementById("pta-api-diagnostic-toggle").addEventListener("change",function(){this.checked?Fa():ja()}),document.getElementById("pta-api-diagnostic-preview-btn").addEventListener("click",Ga),document.getElementById("pta-api-diagnostic-clear").addEventListener("click",function(){ja(),ge.records=[],ge.bytes=0,qa();var e=document.getElementById("pta-api-diagnostic-preview");e&&e.remove()}),document.getElementById("pta-diagnostic-toggle").addEventListener("change",function(){this.checked&&t.developer?(Xa(),"pintia.cn"===location.hostname&&"https:"===location.protocol&&(be.enabled=!0,be.lastURL=location.href,be.observer=new MutationObserver(function(e){e.some(function(e){var t=1===e.target.nodeType?e.target:e.target.parentElement;return t&&!t.closest("#pta-root")&&!t.closest("script, style")})&&Za("page mutation")}),be.observer.observe(document.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["class","role","aria-hidden","hidden"]}),be.routeTimer=setInterval(function(){location.href!==be.lastURL&&(be.lastURL=location.href,Za("SPA navigation"))},1e3),be.endTimer=setTimeout(function(){Ka("recording time limit"),Xa()},3e5),Ka("recording enabled"))):Xa()}),document.getElementById("pta-diagnostic-export").addEventListener("click",Wa),document.getElementById("pta-diagnostic-clear").addEventListener("click",function(){Xa(),be.records=[],be.bytes=0,Va()});var i=document.getElementById("pta-shell"),u=document.getElementById("pta-drawer"),h=null;function f(e,t){document.getElementById(e).addEventListener("click",function(e){e.stopPropagation();var n=document.getElementById(t);if(n&&!this.disabled){var r=n.classList.contains("open");fa(),r||(clearTimeout(n._ptaCloseTimer),n.classList.remove("closing"),n.classList.add("open"),this.setAttribute("aria-expanded","true"))}})}i.addEventListener("click",function(){i.classList.contains("collapsed")&&da(!1)}),document.getElementById("pta-collapse").addEventListener("click",function(e){e.stopPropagation(),da(!0,"manual")}),document.getElementById("pta-theme-toggle").addEventListener("click",function(e){e.stopPropagation(),s.theme="dark"===s.theme?"light":"dark",Ie(),va()}),document.getElementById("pta-export-md").addEventListener("click",io),document.getElementById("pta-user-center").addEventListener("click",function(){window.open(d+"/user.html","_blank")}),document.getElementById("pta-feedback").addEventListener("click",function(e){e.stopPropagation(),function(){$a();var e=document.getElementById("pta-feedback-dialog");e&&e.remove();var t=document.createElement("div");t.id="pta-feedback-dialog",t.className="pta-modal-mask";var n=document.createElement("div");n.className="pta-modal-card",n.innerHTML='

意见反馈

验证码
',t.appendChild(n),document.body.appendChild(t);var r="";function a(){var e=document.getElementById("pta-fb-captcha-img");xe("GET","/api/captcha").then(function(t){200===t.status&&t.data&&t.data.img&&(r=t.data.captchaId||"",e.src=t.data.img)}).catch(function(){})}function o(){t.remove()}a(),document.getElementById("pta-fb-captcha-img").addEventListener("click",a),document.getElementById("pta-fb-close").addEventListener("click",o),document.getElementById("pta-fb-cancel").addEventListener("click",o),t.addEventListener("click",function(e){e.target===t&&o()}),document.getElementById("pta-fb-submit").addEventListener("click",async function(){var e=this,t=(document.getElementById("pta-fb-content").value||"").trim(),n=(document.getElementById("pta-fb-contact").value||"").trim(),i=(document.getElementById("pta-fb-captcha").value||"").trim(),s=document.getElementById("pta-fb-msg");if(t.length<5)return s.textContent="反馈内容至少需要 5 个字",void(s.style.color="#d84c5b");if(!i)return s.textContent="请输入验证码",void(s.style.color="#d84c5b");e.disabled=!0,e.textContent="提交中…";try{var l=await xe("POST","/api/feedback",{content:t,contact:n,captchaId:r,captchaCode:i});l.status>=200&&l.status<300?(Tn("感谢反馈,已提交给管理员"),o()):(s.textContent=l.data&&l.data.error||"提交失败,请检查验证码后重试",s.style.color="#d84c5b",a())}catch(e){s.textContent="网络请求失败,请稍后重试",s.style.color="#d84c5b"}finally{e.disabled=!1,e.textContent="提交反馈"}})}()}),document.getElementById("pta-settings").addEventListener("click",function(e){e.stopPropagation(),u.classList.add("open"),u.inert=!1,aa("settings")}),document.getElementById("pta-drawer-close").addEventListener("click",function(){Oa(!1),u.classList.remove("open"),u.inert=!0,aa(Bn()&&P.open?"catalogue":"answer")}),f("pta-model-trigger","pta-model-select"),f("pta-language-trigger","pta-language-select"),document.addEventListener("click",function(e){var t=document.querySelectorAll(".pta-model-select");Array.prototype.some.call(t,function(t){return t.contains(e.target)})||fa()}),document.addEventListener("keydown",function(e){"Escape"===e.key&&fa()}),document.querySelectorAll(".pta-provider-card").forEach(function(e){e.addEventListener("click",function(){("opencode"!==e.dataset.provider||c.available)&&(s.provider=e.dataset.provider,Ie(),wa(),za("已切换并保存"),ut(s.provider)&&!s.configs[s.provider].models.length&&La(s.provider,!0))})}),document.getElementById("pta-api-key").addEventListener("input",function(){var e=this.value,t=s.configs[s.provider];e.trim()!==t.apiKey&&(t.models=[],t.model="",t.modelMeta={},t.modelError="",t.apiKey=e.trim(),Ie(),wa(),this.value=e,za("已保存")),clearTimeout(h);var n=s.provider;h=setTimeout(function(){n===s.provider&&(e.trim().length>=10||"opencode"===n&&c.available)&&(Oa(!1),La(n,!1))},800)}),document.getElementById("pta-api-key").addEventListener("blur",function(){Oa(!1),ut(s.provider)&&!s.configs[s.provider].models.length&&La(s.provider,!1)}),document.getElementById("pta-language").addEventListener("change",function(){s.language=this.value||"auto",Ie(),wa(),Xt("编程语言已设为 "+Ye(s.language),"info")}),document.getElementById("pta-model").addEventListener("change",function(){s.configs[s.provider].model=this.value,s.configs[s.provider].modelError="",Ie(),wa(),za("已保存")}),document.getElementById("pta-images").addEventListener("change",function(){s.configs[s.provider].images=this.checked,Ie(),za("已保存")});var b=document.getElementById("pta-concurrency");function v(){we()?(s.concurrency=Ce(b.value),ya(),Ie(),za("已保存")):ya()}[b].forEach(function(e){e&&["input","change"].forEach(function(t){e.addEventListener(t,v)})});var x=document.getElementById("pta-max-tokens");x&&x.addEventListener("input",function(){var e=Number(this.value),t=s.configs[s.provider],n=t.modelMeta&&t.modelMeta[t.model],r=n&&n.contextLength,a=Me(Te(s.provider,t.model,r)),o=a[e]||a[0];t.maxTokens=o.val;var i=document.getElementById("pta-max-tokens-val");i&&(i.textContent=o.val+" ("+o.label+")"),Be(a,e),Ie(),za("已保存")});var A=document.getElementById("pta-thinking");A&&A.addEventListener("input",function(){if(we()){var e=Number(this.value);isNaN(e)&&(e=2),s.configs[s.provider].thinking=e;var t=document.getElementById("pta-thinking-val");t&&(t.textContent=g[e]||e+" 级"),document.querySelectorAll(".pta-thinking-scale .pta-scale-item").forEach(function(t){var n=Number(t.dataset.step);t.classList.toggle("active",n===e)}),Ie(),za("已保存")}else this.value=2}),document.querySelectorAll(".pta-thinking-scale .pta-scale-item").forEach(function(e){e.addEventListener("click",function(){if(we()){var e=Number(this.dataset.step);if(!isNaN(e)){var t=document.getElementById("pta-thinking");t&&(t.value=e,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}),document.getElementById("pta-refresh-models").addEventListener("click",function(){Oa(!1),La(s.provider,!1)}),document.getElementById("pta-copy-compiler-backup").addEventListener("click",function(e){e.stopPropagation(),R&&R.code&&(GM_setClipboard(R.code),Tn("切换前代码已复制"))}),document.getElementById("pta-log-clear").addEventListener("click",function(e){e.stopPropagation(),document.getElementById("pta-log").innerHTML='
记录已清空
',document.getElementById("pta-log-count").textContent="0"}),document.getElementById("pta-test").addEventListener("click",async function(e){if(e.stopPropagation(),Oa(!1),!ut(s.provider))return Ra("未配置 Key",r[s.provider].optionalKey?"请先启动本地 OpenCode Free 代理":"请先填写 API Key",""),void Xt("测试失败:当前供应商尚未就绪","warning");Tn("正在测试连接…");try{await yt([{role:"user",content:"只回复 OK,不要输出思考过程"}],1024,0),Tn(r[s.provider].name+" 连接成功"),Ra("连接正常","测试通过","ok"),Xt(r[s.provider].name+" 连接测试通过","success")}catch(e){Tn("错误已记录到面板"),Ra(/API Key 无效/.test(e.message)?"Key 错误":"连接失败",e.message,""),Xt("连接失败:"+e.message,"warning")}}),document.getElementById("pta-assistance-mode").addEventListener("change",function(){s.running&&Da(),Ft(!0),s.assistanceMode=this.checked,Ie(),Qt(!1)}),document.getElementById("pta-perturb").addEventListener("change",function(){s.perturb=this.checked,Ie(),Xt("作答扰动:"+(this.checked?"开":"关"),"info")}),document.getElementById("pta-notifications").addEventListener("change",function(){s.notifications=this.checked,Ie(),Xt("消息通知:"+(this.checked?"开":"关"),"info")}),document.getElementById("pta-ai-cache-clear").addEventListener("click",function(e){e.stopPropagation(),kt().then(function(e){Tn(e?"AI 解答缓存已清除":"缓存清除失败,请检查脚本存储权限")})}),document.getElementById("pta-assistance-clear").addEventListener("click",function(e){e.stopPropagation(),Ft(!0)}),document.getElementById("pta-typewriter-toggle").addEventListener("click",function(e){e.stopPropagation(),p.active=!p.active,this.textContent=p.active?"打字机:开(按键输入)":"打字机:关",this.style.color=p.active?"var(--pta-success)":"var(--pta-warn)";var t=document.getElementById("pta-root");if(t&&t.classList.toggle("tw-ready",p.active&&!!p.buffer),p.active)if(p.buffer){p.index=0;var n=Qe(!1);n&&Fe(n,""),Tn("打字机模式已开启,按任意键逐字输入"),Xt("打字机模式已开启,剩余 "+p.buffer.length+" 字符","success")}else Tn("打字机模式已开启,解题后答案不会自动写入"),Xt("打字机模式已开启,AI生成答案后将不自动写入编辑器","success");else Xt("打字机模式已关闭","info")}),document.addEventListener("keydown",function(e){if(p.active&&p.buffer&&"Shift"!==e.key&&"Control"!==e.key&&"Alt"!==e.key&&"Meta"!==e.key&&"CapsLock"!==e.key&&!oa(e.target)){if(e.preventDefault(),p.index>=p.buffer.length){p.active=!1;var t=document.getElementById("pta-typewriter-toggle");t&&(t.textContent="打字机:关",t.style.color="var(--pta-warn)");var n=document.getElementById("pta-root");return n&&n.classList.remove("tw-ready"),Tn("答案已全部输入完毕"),void Xt("打字机模式完成,答案已全部输入","success")}!function(e){var t=p.editor&&document.documentElement.contains(p.editor)?p.editor:Qe(!1);if(t)if("TEXTAREA"!==t.tagName){var n=t.querySelector(".cm-content")||t,r=[];try{n.cmTile&&n.cmTile.view&&r.push(n.cmTile.view),ze("*",t).forEach(function(e){var t=e._view||e._cmView||e.__view;t&&t.dispatch&&t.state&&r.push(t)})}catch(e){}for(var a=0;a0&&m.usageCount>=m.quota)Tn("免费次数已用完("+m.usageCount+"/"+m.quota+"),请升级付费");else{var e=await(m.token?xe("POST","/api/usage",{tokens:0,action:"solve"}).then(function(e){return e.data&&void 0!==e.data.usage_count&&(m.usageCount=e.data.usage_count),e.data&&void 0!==e.data.quota&&(m.quota=e.data.quota),Ae(),e}).catch(function(){return{status:0,data:{error:"使用次数上报失败(网络)"}}}):Promise.resolve({status:401,data:{error:"未登录,无法记录使用次数"}}));if(403===e.status)return Tn(e.data.error||"免费次数已用完"),Xt("免费次数已用完","warning"),void Ae();if(200!==e.status)return Tn(e.data.error||"次数校验失败,请稍后再试"),void Xt("次数校验未通过,未启动作答","warning");Xt("已记录 1 次使用,剩余 "+(we()?"无限制":Math.max(0,m.quota-m.usageCount)+" 次"),"info"),w=Wt(),s.runId=(s.runId||0)+1;var t=s.runId;l=new AbortController,s.running=!0;var n=document.getElementById("pta-shell");n&&n.classList.add("running");var a=document.getElementById("pta-root");a&&a.classList.add("running"),document.getElementById("pta-start").textContent="停止解题",document.getElementById("pta-start").classList.add("stop"),Ra("正在处理",r[s.provider].name+" 工作中…","live"),Xt("任务开始","info"),async function(){var e=s.runId,t=Je(),n={},a=nn(location.href);if(a&&(n[a.id]=!0),cn("准备处理",1,1),Xt("识别为"+("unknown"===t?"未知题型":" "+t)+",语言 "+Ye(s.language)+",使用 "+r[s.provider].name,"info"),"unknown"!==t){var o=0;do{if(!s.running||s.runId!==e)break;var i=location.href,l=s.routeRevision;if(s.pageErrors=!1,"judge"===t)o+=await gn();else if("choice"===t||"multi_choice"===t)o+=await hn(t);else if("fill"===t)o+=await fn();else if("program_fill"===t)o+=await bn();else if("function"===t||"programming"===t){var c=await In(t);if(!s.running||s.runId!==e||location.href!==i||s.routeRevision!==l){s.pageErrors=!0;break}if(o+=c.processed,!c.fullScore&&!c.skipped){s.pageErrors=!0;break}}if(location.href!==i||s.routeRevision!==l){s.pageErrors=!0;break}if(!s.running||s.runId!==e||location.href!==i||s.pageErrors||!Zt())break;if(tn()||!en()){var p=on();if(p&&p.current2&&(s.concurrency=2);var t=document.getElementById("pta-concurrency"),n=document.getElementById("pta-concurrency-val");t&&(t.value=String(s.concurrency),t.max=e?"2":"10",t.disabled=e),n&&(n.textContent=e?String(s.concurrency)+"(免费上限2)":1===s.concurrency?"1(串行)":String(s.concurrency))}function wa(){va(),ya();var e=r[s.provider],t=s.configs[s.provider],n=!!a[s.provider],i=document.getElementById("pta-meta");i&&(i.textContent=n?t.available?e.name+" · "+(t.model||"等待模型"):"后端未开通该通道":t.apiKey||e.optionalKey&&c.available?e.name+" · "+(t.model||"等待模型"):"未配置 AI"),Ae();var l=document.getElementById("pta-api-key"),p=l&&l.closest(".pta-field");n?p&&(p.style.display="none"):(p&&(p.style.display=""),l&&(l.value=t.apiKey||""));var d=document.getElementById("pta-api-key-label");d&&(d.textContent=n?"后端通道":e.optionalKey?"本地 Token(可选)":"API Key"),l&&(l.placeholder=n?"由后端通道提供":e.optionalKey?"未设置 AUTH_TOKEN 时可留空":"填写后自动读取模型列表");var u=document.getElementById("pta-model");if(u)if(u.innerHTML="",t.models&&t.models.length)t.models.forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e+(t.modelMeta&&t.modelMeta[e]&&t.modelMeta[e].free?" · Free":""),u.appendChild(n)}),u.value=t.model||t.models[0],u.disabled=!1;else{var m=document.createElement("option");m.value="",m.textContent=n?t.available?"由后端通道提供模型":"后端未开通该通道":e.optionalKey&&!c.available?"等待检测到本地代理":t.apiKey||e.optionalKey?"正在等待模型列表…":"填写 API Key 后获取",u.appendChild(m),u.disabled=!0}ba("pta-model","pta-model-select","pta-model-trigger","pta-model-value","pta-model-menu");var h=document.getElementById("pta-language");h&&(h.value=s.language||"auto"),ba("pta-language","pta-language-select","pta-language-trigger","pta-language-value","pta-language-menu");var f=document.getElementById("pta-model-state");if(f){var b=n?t.available?"由后端通道提供模型。":"后端未开通该通道":e.optionalKey&&!c.available?"未检测到本地 OpenCode Free 服务(127.0.0.1:8788)。启动后会自动出现。":t.models&&t.models.length?"已读取 "+t.models.length+" 个可用模型。":e.optionalKey?"已连接,正在读取 Free 模型列表。":"填写 API Key 后自动读取模型列表。";f.textContent=t.modelsLoading?"正在向供应商读取模型列表…":t.modelError||b,f.classList.toggle("pta-error",!!t.modelError||e.optionalKey&&!c.available)}!function(){var e=r[s.provider],t=document.getElementById("pta-platform-label"),n=document.getElementById("pta-platform-link"),a=e.platformLabel||"开放平台";t&&(t.textContent=a),n&&(n.href=e.platformUrl,n.textContent=e.platformUrl,n.target="_blank",n.rel="noopener noreferrer",n.referrerPolicy="no-referrer",n.title="在新标签页打开"+a)}();var v=document.getElementById("pta-provider-desc");v&&(v.textContent=e.desc||e.hint||"");var y=document.getElementById("pta-language-mode");y&&(y.textContent=s.language&&"auto"!==s.language?"手动 · "+(o[s.language]||s.language):"自动检测");var w=document.getElementById("pta-max-tokens"),x=document.getElementById("pta-max-tokens-val"),A=document.getElementById("pta-thinking"),k=document.getElementById("pta-thinking-val"),E=t.modelMeta&&t.modelMeta[t.model],S=E&&E.contextLength,C=Me(Te(s.provider,t.model,S));if(w){w.min="0",w.max=String(C.length-1),w.step="1";var I=function(e,t){if(!e||!e.length)return 0;for(var n=Number(t)||2048,r=0,a=1/0,o=0;o3)&&(B=2),M&&(B=2),A.value=B,A.disabled=M,t.thinking=B,k&&(k.textContent=g[B]||"中 (Medium · 推荐)"),document.querySelectorAll(".pta-thinking-scale .pta-scale-item").forEach(function(e){var t=Number(e.dataset.step);e.classList.toggle("active",t===B),e.style.opacity=M&&2!==t?"0.4":"",e.style.pointerEvents=M?"none":""})}document.querySelectorAll(".pta-provider-card").forEach(function(e){var t="opencode"===e.dataset.provider;e.classList.toggle("active",e.dataset.provider===s.provider),t&&(e.hidden=!c.available,e.disabled=!c.available)});var N=document.getElementById("pta-images");N&&(N.checked=!!t.images,N.disabled=!e.supportsImages||!vt(s.provider,t.model,t.modelMeta&&t.modelMeta[t.model]));var z=document.getElementById("pta-skip");z&&(z.checked=s.skipAnswered);var O=document.getElementById("pta-continuous");O&&(O.checked=s.continuous);var L=document.getElementById("pta-assistance-mode");L&&(L.checked=s.assistanceMode);var R=document.getElementById("pta-perturb");R&&(R.checked=s.perturb);var D=document.getElementById("pta-notifications");D&&(D.checked=!1!==s.notifications),Qt(T.running)}function xa(e,t){return Promise.resolve(GM_getValue(ie+e,t))}function Aa(e,t){return Promise.resolve(GM_setValue(ie+e,t))}function ka(){return Array.from(crypto.getRandomValues(new Uint32Array(4))).map(function(e){return e.toString(16)}).join("-")}function Ea(e){if("function"==typeof GM_setValue)return Aa("revocation",e+":"+ka()).catch(function(){})}async function Sa(e){if("string"!=typeof e||!/^\d{1,25}$/.test(e))return!1;try{var t=await xa("control",null),n=await xa("revocation","");if(t&&t.enabled&&t.revocation===n&&t.owner!==e)return await Ea("verified-account-changed"),!0}catch(e){}return!1}async function Ca(){var e=document.getElementById("pta-deadline-reminder-toggle"),t=document.getElementById("pta-deadline-reminder-status"),n=document.getElementById("pta-deadline-reminder-days");if(e)try{var r=await xa("control",null),a=await xa("revocation",""),o=await xa("status",null);e.checked=!(!r||!r.enabled||r.revocation!==a),r&&Number.isInteger(r.days)&&(n.value=String(r.days)),t.textContent=o&&Date.now()-o.at<9e4?o.message:"未连接后台:请在脚本猫手动绑定并启用一个后台辅助脚本",oe.pendingSnapshot&&(o&&o.snapshotId===oe.pendingSnapshot?oe.pendingSnapshot=null:t.textContent="目录已写入,等待后台读取确认");var i=Qn(),s=G.snapshot;if(i&&await Sa(i.userId))return e.checked=!1,void(t.textContent="账号已变化,请在当前账号重新启用");if(!(e.checked&&i&&s&&s.complete&&G.owner===i.userId))return;if(s.rows.length>1e4)return t.textContent="题集超过10000条,已暂停同步;未静默截断",void await Aa("snapshot",null);var l=s.rows.map(function(e){return{id:e.id,title:String(e.title||"题集").slice(0,100),endTime:Number.isFinite(e.endTime)?e.endTime:e.deadlineOrder}}),c=JSON.stringify({owner:i.userId,rows:l});if(c===oe.last)return;var p={version:1,id:ka(),owner:i.userId,verifiedAt:i.verifiedAt,capturedAt:Date.now(),rows:l};await Aa("snapshot",p),oe.last=c,oe.pendingSnapshot=p.id,t.textContent="目录已写入,等待后台读取确认"}catch(e){t.textContent="提醒存储不可用,未完成同步"}}async function Ia(){var e=await Promise.resolve(GM_getValue(le,null));if(e){if(!e.privateKey||!e.publicKey||!Number.isSafeInteger(e.sequence)||e.sequence<0)throw Error("签名存储损坏,提醒暂停");return e}var t=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]);return e={privateKey:await crypto.subtle.exportKey("jwk",t.privateKey),publicKey:await crypto.subtle.exportKey("jwk",t.publicKey),sequence:0},await Promise.resolve(GM_setValue(le,e)),e}async function Ta(e){if("https://pintia.cn"!==location.origin||!crypto.subtle||!navigator.locks)throw Error("当前浏览器缺少安全签名/同源写锁,提醒同步暂停");return navigator.locks.request("pnc-reminder-signing-v1",e)}async function Ma(){return Ta(async function(){var t=await Ia(),n=await xa("control",null),r=await xa("revocation",""),a=await xa("snapshot",null);if(t.sequence>=Number.MAX_SAFE_INTEGER-1)throw Error("签名序号已耗尽");t.sequence++,await Promise.resolve(GM_setValue(le,t));var o=await e.sign(crypto,t.privateKey,{version:1,sequence:t.sequence,at:Date.now(),control:n,revocation:r,snapshot:a}),i=!1;try{window.postMessage(o,"https://pintia.cn"),i=!0}catch(e){}try{"function"==typeof document.dispatchEvent&&"function"==typeof CustomEvent&&(document.dispatchEvent(new CustomEvent("pnc-helper-signed-sync-v1",{detail:JSON.stringify(o)})),i=!0)}catch(e){}if(!i)throw Error("签名消息发送不可用")})}function Ba(){return se=se.catch(function(){}).then(Ma).then(function(){return!0}).catch(function(){var e=document.getElementById("pta-deadline-reminder-status");return e&&(e.textContent="安全签名同步失败,Helper仍可能保留旧配置;请在扩展菜单暂停Helper"),!1})}function Na(){"https://pintia.cn"!==location.origin||Date.now()-me<5e3||(me=Date.now(),Ca())}function za(e){var t=document.getElementById("pta-save-hint");t&&(t.textContent=e||"✓ 已保存",t.classList.add("saved"),clearTimeout(he),he=setTimeout(function(){t.textContent="实时保存",t.classList.remove("saved")},1400))}function Oa(e){var t=s.configs[s.provider],n=(document.getElementById("pta-api-key").value||"").trim();n!==t.apiKey&&(kt(),t.models=[],t.model="",t.modelMeta={},t.modelError=""),t.apiKey=n,t.model=(document.getElementById("pta-model").value||"").trim(),t.images=!!document.getElementById("pta-images").checked;var r=document.getElementById("pta-max-tokens");if(r){var a=Number(r.value),o=t.modelMeta&&t.modelMeta[t.model],i=o&&o.contextLength,l=Me(Te(s.provider,t.model,i));t.maxTokens=(l[a]||l[0]).val}var c=document.getElementById("pta-thinking");if(c){var p=Number(c.value);t.thinking=isNaN(p)?2:p}s.language=document.getElementById("pta-language").value||"auto",s.skipAnswered=document.getElementById("pta-skip").checked,s.continuous=document.getElementById("pta-continuous").checked,s.assistanceMode=document.getElementById("pta-assistance-mode").checked;var d=document.getElementById("pta-concurrency");d&&(s.concurrency=Ce(d.value)),Ie(),wa(),!1!==e&&za("已保存")}function La(e,t){var n=s.configs[e];ut(e)?(n.modelsLoading=!0,n.modelError="",wa(),function(e){var t=s.configs[e];return a[e]?xe("GET","/api/ai/models").then(function(n){if(200!==n.status)throw new Error(gt("获取模型失败",n.status,n.data));var r=n.data&&n.data[e]||{};t.available=!!r.available;var a=Array.isArray(r.models)&&r.models.length?r.models:r.model?[r.model]:[];if(!a.length)throw new Error("后台尚未配置该通道模型");return t.models=a,t.model=t.model||a[0],{ids:a,meta:{}}}):new Promise(function(n,a){ut(e)?GM_xmlhttpRequest({method:"GET",url:pt(e),headers:dt(e,t.apiKey,"GET"),timeout:3e4,onload:function(t){var r;try{r=ft(t,"模型列表响应")}catch(e){return void a(e)}if(t.status<200||t.status>=300)a(new Error(gt("获取模型失败",t.status,r)));else{var o=(Array.isArray(r.data)?r.data:[]).filter(function(e){if(!e||!e.id||/asr|tts|voiceclone|voicedesign|embedding/i.test(e.id))return!1;var t=e.architecture&&e.architecture.output_modalities;return!Array.isArray(t)||t.indexOf("text")>=0});"opencode_zen"===e&&o.sort(function(e,t){return Number(bt(t))-Number(bt(e))});var i={},s=o.map(function(e){return e.id}).filter(function(e){return!i[e]&&(i[e]=!0,!0)});if(s.length){var l={};o.forEach(function(t){var n,r,a=Number(t.context_length||t.context_window||t.max_model_len||t.max_context_length||t.top_provider&&t.top_provider.context_length||t.per_request_limits&&t.per_request_limits.max_tokens||0)||null,o=Te(e,t.id,a);l[t.id]={free:"opencode_zen"===e&&bt(t),images:"opencode_zen"===e&&(n=t,r=n&&n.architecture&&n.architecture.input_modalities,Array.isArray(r)&&r.indexOf("image")>=0),contextLength:o}}),n({ids:s,meta:l})}else a(new Error("接口没有返回可用于答题的模型"))}},onerror:function(){a(new Error("获取模型失败:网络请求失败,请检查网络、脚本连接权限或 API Key"))},ontimeout:function(){a(new Error("获取模型失败:请求超时(30 秒)"))},onabort:function(){a(new Error("获取模型失败:请求被中止"))}}):a(new Error(r[e].optionalKey?"未检测到 OpenCode Free 本地代理(127.0.0.1:8788)":"请先填写 "+r[e].name+" API Key"))})}(e).then(function(t){var a=t.ids||[];n.models=a,n.modelMeta=t.meta||{},(!n.model||a.indexOf(n.model)<0)&&(n.model=a[0]),n.modelsLoading=!1,n.modelError="",Ie(),e===s.provider&&wa(),Tn(r[e].name+" 已读取 "+a.length+" 个模型")}).catch(function(r){n.modelsLoading=!1,n.modelError=r.message,e===s.provider&&(wa(),Ra(/API Key 无效/.test(r.message)?"Key 错误":"模型读取失败",r.message,""),Xt("模型读取失败:"+r.message,"warning")),t||Tn("错误已记录到面板")})):t||Tn(r[e].optionalKey?"请先启动本地 OpenCode Free 代理":"请先填写 API Key")}function Ra(e,t,n){var r=document.getElementById("pta-status-dot"),a=document.getElementById("pta-status-label"),o=document.getElementById("pta-status-sub");r&&(r.className="pta-status-dot "+(n||"")),a&&(a.textContent=e),o&&(o.textContent=t)}function Da(e){!function(){if(m.token){if(h.prompt||h.completion){var e={prompt:h.prompt,completion:h.completion};h={prompt:0,completion:0},xe("POST","/api/tokens",e).catch(function(){})}}else h={prompt:0,completion:0}}(),s.running=!1,s.runId=(s.runId||0)+1,l&&l.abort(),l=null;var t=document.getElementById("pta-shell");t&&t.classList.remove("running");var n=document.getElementById("pta-root");n&&n.classList.remove("running");var r=document.getElementById("pta-start");r&&(r.textContent="开始解题",r.classList.remove("stop")),cn(e?"已完成":"已停止",1,1),Ra(e?"已完成":"已停止",e?"评分与答题流程已结束":"任务已暂停",e?"ok":"")}function Pa(e,t){if("GET"!==String(t||"GET").toUpperCase()||"string"!=typeof e)return null;var n;try{n=new URL(e,"https://pintia.cn")}catch(e){return null}if("https://pintia.cn"!==n.origin||n.username||n.password)return null;var r=n.pathname,a=!1;if(!/^\/api\/problem-sets(?:\/\d+\/(?:exams|exam-problem-types|exam-problem-status|exam-problem-list|exam-problems(?:\/\d+)?))?$/.test(r)&&!/^\/api\/exams\/\d+\/problem-sets\/\d+\/problem-status$/.test(r)){var o=r.match(/^\/api\/problem-sets\/\d{1,25}\/(.+)$/),i=new Set(["problems","problem","exams","exam","exam-problems","problem-list","problem-types","problem-summaries","problem-details","exam-problem-details","exam-problem-answers","answers","answer","review","reviews","status","types","list","summaries","details"]);if(!o)return null;var s=o[1].split("/");if(s.length>4||!s.every(function(e){return/^\d{1,25}$/.test(e)||i.has(e)}))return null;a=!0}var l={path:r.replace(/\/\d+/g,"/:id"),method:"GET"};a&&(l.structureOnly=!0);var c={};return["problem_type","question_type","type","problemType","questionType"].forEach(function(e){var t=n.searchParams.get(e);/^(TRUE_OR_FALSE|MULTIPLE_CHOICE|MULTIPLE_CHOICE_MORE_THAN_ONE|MULTIPLE_CHOICE_ONE_ANSWER|MULTIPLE_CHOICE_MULTIPLE_ANSWERS|FILL_IN_THE_BLANK|FILL_IN_THE_BLANK_FOR_PROGRAMMING|CODE_COMPLETION|PROGRAMMING|MULTIPLE_FILE|SUBJECTIVE)$/.test(t||"")&&(c[e]=t,l.problemType||(l.problemType=t))}),Object.keys(c).length&&(l.typeParameters=c),["page","limit"].forEach(function(e){var t=n.searchParams.get(e);null!==t&&/^\d{1,5}$/.test(t)&&(l[e]=Number(t))}),l}function Ha(e){if("string"!=typeof e||!/^PROBLEM_[A-Z_]{2,60}$/.test(e))return!1;var t=new Set("NO NOT ANSWER ANSWERED UNANSWERED SUBMITTED SUBMITTING ACCEPTED PARTIALLY PARTIAL WRONG CORRECT INCORRECT PENDING JUDGING QUEUED WAITING SAVED UNSAVED ERROR FAILED COMPLETED FINISHED UNKNOWN NEUTRAL".split(" ")),n=e.slice(8).split("_");return n.length<=6&&n.every(function(e){return t.has(e)})}function qa(){var e=document.getElementById("pta-api-diagnostic-status");e&&(e.textContent=(ge.enabled?ge.resumed?"正在记录题目内容(已续接) · ":ge.continuation?"正在记录题目内容(可续接一次重载) · ":"正在记录题目内容(不能跨刷新) · ":"已关闭 · ")+ge.records.length+" 条"+(ge.error?" · "+ge.error:""));var t=document.getElementById("pta-api-diagnostic-toggle");t&&(t.checked=ge.enabled);var n=document.getElementById("pta-api-diagnostic-badge");n&&(n.hidden=!ge.enabled)}function ja(e){if(!0!==e)try{sessionStorage.removeItem(fe)}catch(e){}ge.enabled=!1,ge.generation++,clearTimeout(ge.timer),ge.timer=null,ge.restore&&(ge.restore(),ge.restore=null),ge.readers.forEach(function(e){e()}),ge.readers.clear(),qa()}function Qa(e,t,n,r,a){if(ge.enabled&&a===ge.generation){var o,i,s={request:e,status:Number.isInteger(t)&&t>=0&&t<=599?t:0};e.structureOnly||void 0===n||(s.response=function(e){var t=new Set("problemSets total problemSet exams exam labels label problemSubmissionStatus ended existsSubmissionsNotCompleted problemTypes problemType problemStatus problems status score totalScore fullScore scores answered answeredCount totalCount problemCount count submittedCount acceptedCount progress percentage name title id userGroup userGroups userGroupId userGroupIds group groups groupId groupIds sourceUserGroup sourceUserGroupId sourceUserGroups sourceUserGroupIds problemSetUserGroups problemSetToUserGroups userGroupMap ownerGroupId ownerGroup nameMap endAt startAt createAt updateAt startedAt endedAt createdAt updatedAt duration type problemSetId examId problemSetProblemId problemId problemSetProblems problemSetProblemCounts problemCounts problemTypeCounts problemStatuses results result data statistics stats summary summaries totalProblems totalAnswered scoreSum problemScore problemScores judgingStatus lastSubmissionStatus statusByProblemType finished isEnded isStarted hasExam page limit totalPages offset nextPage totalElements totalResults totalItems FILL_IN_THE_BLANK_FOR_PROGRAMMING MULTIPLE_FILE TRUE_OR_FALSE MULTIPLE_CHOICE MULTIPLE_CHOICE_MORE_THAN_ONE FILL_IN_THE_BLANK CODE_COMPLETION PROGRAMMING SUBJECTIVE SINGLE_CHOICE MULTIPLE_CHOICE_ONE_ANSWER MULTIPLE_CHOICE_MULTIPLE_ANSWERS".split(" ")),n=new Set("total score totalScore fullScore answered answeredCount totalCount problemCount count submittedCount acceptedCount progress percentage duration totalProblems totalAnswered scoreSum problemScore page limit totalPages offset nextPage totalElements totalResults totalItems".split(" ")),r=new Set("PENDING READY PROCESSING END PROBLEM_ACCEPTED PROBLEM_WRONG_ANSWER PROBLEM_NO_ANSWER PROGRAMMING CODE_COMPLETION MULTIPLE_FILE TRUE_OR_FALSE MULTIPLE_CHOICE FILL_IN_THE_BLANK_FOR_PROGRAMMING".split(" ")),a=0;return function e(o,i,s){if(++a>500||s>7)return"[depth/node limit]";if(null===o)return null;if("problemSubmissionStatus"===i&&Ha(o))return o;if("string"==typeof o&&/^(status|problemSubmissionStatus|problemType|type)$/.test(i)&&(r.has(o)||"problemType"===i&&t.has(o)&&/^[A-Z_]+$/.test(o)))return o;if("string"==typeof o)return/^\d{4}-\d\d-\d\d[T ]/.test(o)?"[date-time string]":"[string]";if("number"==typeof o)return n.has(i)&&Number.isFinite(o)&&Math.abs(o)<=1e6?o:"[number]";if("boolean"==typeof o)return/^(ended|isEnded|isStarted|hasExam|finished|existsSubmissionsNotCompleted|answerVisible|solutionVisible)$/.test(i)?o:"[boolean]";if(Array.isArray(o)){var l={arrayLength:o.length,samples:o.slice(0,3).map(function(t){return e(t,i,s+1)})};if("problemStatus"===i){var c={},p=0;o.slice(0,5e3).forEach(function(e){var t=e&&e.problemSubmissionStatus;Ha(t)?c[t]=(c[t]||0)+1:p++}),l.statusCounts=c,p&&(l.omittedStatusCount=p),o.length>5e3&&(l.statusScanLimited=!0)}return l}if("object"!=typeof o)return"[unsupported]";var d={},u=0,m=0;return Object.keys(o).slice(0,100).forEach(function(n){t.has(n)||function(e){if("string"!=typeof e||!/^[a-z][a-zA-Z_]{0,79}$/.test(e)||/password|passwd|token|secret|auth|cookie|credential|session|csrf|api.?key|access.?key|refresh.?key/i.test(e))return!1;var t=new Set("problem problems set sets user users group groups id ids to by for of from map maps mapping mappings list lists source sources owner owners organization organizations tenant tenants class classes association associations relation relations membership memberships name names title titles label labels type types status statuses count counts total totals permission permissions collaborator collaborators manageable config configuration scoring rule rules time start end create update at duration stage feature index pool pools summary summaries statistics stats score scores full answered accepted submitted unsubmitted answer answers submission submissions progress percentage number numbers num nums size length pagination page pages limit offset next previous has more result results data items value values key keys is enabled ended started finished exists completed not expired available active joined ongoing pending exam exams info information metadata collection collections access visibility order sort filter filters description announcement visible solution solutions content option options choice choices blank blanks fill programming code completion true false more than one multiple single example examples test tests input output compiler compilers last detail details correct".split(" ")),n=e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").toLowerCase().split(/[ _]+/);return n.length<=12&&n.every(function(e){return t.has(e)})}(n)?d[n]=e(o[n],n,s+1):/^\d{1,24}$/.test(n)?m++<3&&(d.numericKeySamples||(d.numericKeySamples=[]),d.numericKeySamples.push(e(o[n],"",s+1))):u++}),m&&(d.numericKeyCount=m),u&&(d.omittedFieldCount=u),Object.keys(o).length>100&&(d.moreFieldsOmitted=!0),d}(e,"",0)}(n),/^\/api\/problem-sets\/:id\/(?:exam-problem-list|exam-problems(?:\/:id)?)$/.test(e.path)&&(s.questionContent=(o=0,i=!1,{data:function e(t,n){if(++o>1e4||n>16)return i=!0,"[size/depth limit]";if(null===t||"boolean"==typeof t)return t;if("number"==typeof t)return Number.isFinite(t)?t:null;if("string"==typeof t)return t.length>2e5?(i=!0,"[string size limit]"):Ua(t);if(Array.isArray(t))return t.length>2e3&&(i=!0),t.slice(0,2e3).map(function(t){return e(t,n+1)});if("object"!=typeof t)return"[unsupported]";var r=Object.create(null),a=Object.keys(t);return a.length>500&&(i=!0),a.slice(0,500).forEach(function(a){/password|passwd|token|secret|auth|cookie|credential|session|csrf|api.?key|access.?key|refresh.?key|headers?|private.?key|client.?secret/i.test(a)||/^(?:__proto__|constructor|prototype)$/i.test(a)||(a.length>120?i=!0:r[Ua(a)]=e(t[a],n+1))}),r}(n,0),possiblyTruncated:i}))),r&&(s.note=r);var l=new Blob([JSON.stringify(s)]).size;ge.records.length>=60||ge.bytes+l>4194304?ja():(ge.records.push(s),ge.bytes+=l,qa(),ge.records.length>=60&&ja())}}function Fa(e){if(t.developer){if(ja(),ge.error="",ge.continuation=!1,ge.resumed=!(!e||!e.resumed),"pintia.cn"===location.hostname&&"https:"===location.protocol){var n="undefined"!=typeof unsafeWindow?unsafeWindow:window,r=n.fetch,a=n.XMLHttpRequest&&n.XMLHttpRequest.prototype,o=a&&a.open,i=a&&a.send,s=new WeakMap,l=ge.generation,c=[];try{if("function"==typeof r){if(n.fetch=d,n.fetch!==d)throw Error();c.push(function(){n.fetch===d&&(n.fetch=r)})}if(a&&"function"==typeof o&&"function"==typeof i&&(a.open=u,c.push(function(){a.open===u&&(a.open=o)}),a.send=m,c.push(function(){a.send===m&&(a.send=i)}),a.open!==u||a.send!==m))throw Error();if(!c.length)throw Error()}catch(e){return c.reverse().forEach(function(e){try{e()}catch(e){}}),ge.error="当前浏览器无法记录接口诊断",document.body&&Tn(ge.error),void qa()}ge.restore=function(){c.reverse().forEach(function(e){try{e()}catch(e){}})};var p=e&&e.resumed?e.expiresAt:Date.now()+3e5;if(!Number.isFinite(p)||p<=Date.now()||p>Date.now()+3e5)ja();else{if(!ge.resumed)try{sessionStorage.setItem(fe,JSON.stringify({expiresAt:p,remaining:1})),ge.continuation=!0}catch(e){}ge.enabled=!0,ge.timer=setTimeout(ja,p-Date.now()),qa()}}}else ja();function d(e,t){var n=null;if(ge.enabled&&ge.generation===l)try{n=Pa("string"==typeof e?e:e&&"string"==typeof e.url?e.url:null,t&&t.method||e&&e.method||"GET")}catch(e){}var a=r.apply(this,arguments);return n&&Promise.resolve(a).then(function(e){!async function(e,t,n){if(ge.enabled&&n===ge.generation){var r=Pa(e.url,"GET");if(!e.redirected&&r)if(e.status<200||e.status>=300)Qa(t,e.status,void 0,"non-success response; body omitted",n);else if(t.structureOnly||r.structureOnly)Qa(t,e.status,void 0,"path discovery only; body not read",n);else if(ge.pending>=2)Qa(t,e.status,void 0,"capture concurrency limit; body omitted",n);else{ge.pending++;var a=null,o=null,i=null;try{var s=e.clone();if(!s.body||"function"!=typeof s.body.getReader)return void Qa(t,e.status,void 0,"stream unavailable; body omitted",n);a=s.body.getReader(),i=function(){try{Promise.resolve(a.cancel()).catch(function(){})}catch(e){}},ge.readers.add(i),o=setTimeout(i,5e3);for(var l=[],c=0;;){var p=await a.read();if(p.done)break;if(!ge.enabled||n!==ge.generation)return void i();if((c+=p.value.byteLength)>524288)return i(),void Qa(t,e.status,void 0,"body size limit",n);l.push(p.value)}var d=new Uint8Array(c),u=0;l.forEach(function(e){d.set(e,u),u+=e.byteLength});var m=JSON.parse((new TextDecoder).decode(d));Qa(t,e.status,m,null,n)}catch(r){Qa(t,e.status,void 0,"JSON unavailable or read stopped",n)}finally{clearTimeout(o),i&&ge.readers.delete(i),ge.pending--}}else Qa(t,e.status,void 0,"redirect or non-whitelisted response",n)}}(e,n,l)},function(){Qa(n,0,void 0,"request failed",l)}),a}function u(e,t){var n=null;try{n=Pa("string"==typeof t?t:null,e)}catch(e){}var r=s.get(this);r&&r.listener&&this.removeEventListener("loadend",r.listener);var a={target:n,listener:null};s.set(this,a);try{return o.apply(this,arguments)}catch(e){throw s.delete(this),e}}function m(){var e=this,t=s.get(e),n=t&&t.target;return n&&!t.listener&&ge.enabled&&l===ge.generation&&(t.listener=function(){if(s.get(e)===t&&t.listener&&(t.listener=null,ge.enabled&&l===ge.generation))try{var r=Pa(e.responseURL,"GET");if(!r)return void Qa(n,e.status,void 0,"non-whitelisted response",l);if(e.status<200||e.status>=300)return void Qa(n,e.status,void 0,"non-success response; body omitted",l);if(n.structureOnly||r.structureOnly)return void Qa(n,e.status,void 0,"path discovery only; body not read",l);if(""===e.responseType||"text"===e.responseType){var a=e.responseText;if(a.length>262144)return void Qa(n,e.status,void 0,"body size limit",l);Qa(n,e.status,JSON.parse(a),null,l)}else"json"===e.responseType?Qa(n,e.status,e.response,null,l):Qa(n,e.status,void 0,"response type omitted",l)}catch(e){Qa(n,0,void 0,"JSON unavailable",l)}},e.addEventListener("loadend",t.listener,{once:!0})),i.apply(this,arguments)}}function Ga(){var e=document.getElementById("pta-api-diagnostic-preview");e&&e.remove();var t=document.createElement("div");t.id="pta-api-diagnostic-preview",t.style.cssText="position:fixed;inset:0;z-index:2147483647;background:#0008;display:flex;align-items:center;justify-content:center;";var n=document.createElement("div");n.className="pta-dev-preview";var r=document.createElement("h3");r.textContent="接口诊断预览(含题目内容,请检查后导出)",n.appendChild(r);var a=document.createElement("textarea");a.readOnly=!0,a.setAttribute("aria-label","接口诊断预览内容"),a.value=JSON.stringify({format:"pta-api-shape-v2",records:ge.records},null,2),n.appendChild(a);var o=document.createElement("button");o.textContent="导出此预览",o.type="button",o.className="pta-dev-btn pta-dev-btn-primary",o.addEventListener("click",function(){var e=URL.createObjectURL(new Blob([a.value],{type:"application/json"})),t=document.createElement("a");t.href=e,t.download="pta-api-shape-"+Date.now()+".json",t.click(),setTimeout(function(){URL.revokeObjectURL(e)},1e3)}),n.appendChild(o);var i=document.createElement("button");i.textContent="关闭",i.type="button",i.className="pta-dev-btn",i.addEventListener("click",function(){t.remove()}),n.appendChild(i),t.addEventListener("click",function(e){e.target===t&&t.remove()}),t.appendChild(n),document.body.appendChild(t)}function Ja(e){try{var t=new URL(e,location.href);return"https:"!==t.protocol||"pintia.cn"!==t.hostname?"[external URL removed]":t.origin+t.pathname}catch(e){return"[invalid URL removed]"}}function Ua(e){return String(e).replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?-----END [^-]*PRIVATE KEY-----/g,"[REDACTED PRIVATE KEY]").replace(/(["'](?:password|passwd|token|secret|api[_ -]?key|authorization|cookie)["']\s*:\s*)["'][^"']*["']/gi,'$1"[REDACTED]"').replace(/https?:\/\/[^\s<>"']+/gi,Ja).replace(/Bearer\s+[\w.+/=-]+/gi,"Bearer [REDACTED]").replace(/\b(?:sk-|sk_)[A-Za-z0-9_-]{8,}/g,"[REDACTED KEY]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,"[REDACTED TOKEN]").replace(/((?:password|passwd|token|secret|api[_ -]?key)\s*[:=]\s*)[^\s,;<>]+/gi,"$1[REDACTED]")}function Ya(){if(!/^\/problem-sets\/\d+\/exam\/problems\/type\/[1-7](?:\/|$)/.test(location.pathname))return{questions:[],note:"not a question page"};if(document.getElementsByTagName("*").length>12e3)return{questions:[],possiblyTruncated:!0,note:"DOM exceeds 12000 nodes; question content omitted"};var e=[],t=!1;return ze(".rendered-markdown").forEach(function(t){if(!t.closest("#pta-root,.pta-assist,#pta-api-diagnostic-preview")&&t.getClientRects().length){for(var n=t,r=t;r&&r!==document.body;){if(/^\d{1,25}$/.test(r.id||"")){n=r;break}r=r.parentElement}e.some(function(e){return e===n||e.contains(n)})||e.push(n)}}),e.length>200&&(e=e.slice(0,200),t=!0),{questions:e.map(function(e){var n=e.cloneNode(!0),r=[e].concat(Array.from(e.querySelectorAll("*"))),a=[n].concat(Array.from(n.querySelectorAll("*")));r.forEach(function(e,t){var n=a[t],r="INPUT"===e.tagName&&/^(radio|checkbox)$/.test(e.type||"")&&e.closest("label")&&e.closest("label").getClientRects().length;if(/password|passwd|token|secret|api.?key|csrf|credential/i.test((e.id||"")+" "+(e.getAttribute("name")||""))||!e.getClientRects().length&&!r)n.remove();else{if("INPUT"===e.tagName){if(!/^(?:text|number|radio|checkbox)?$/.test(e.getAttribute("type")||""))return void n.remove();n.setAttribute("value",Ua(e.value||"")),e.checked?n.setAttribute("checked",""):n.removeAttribute("checked")}"TEXTAREA"===e.tagName&&(n.textContent=Ua(e.value||"")),"OPTION"===e.tagName&&(e.selected?n.setAttribute("selected",""):n.removeAttribute("selected"))}}),r.forEach(function(e,t){if(e.classList&&e.classList.contains("cm-editor")&&a[t].parentElement){var n=document.createElement("pre");n.textContent=Ua(De(e)),a[t].replaceWith(n)}}),n.querySelectorAll('script,style,iframe,frame,object,embed,link,meta,noscript,[hidden],[aria-hidden="true"],.pta-assist,.pta-local-review,#pta-root').forEach(function(e){e.remove()}),[n].concat(Array.from(n.querySelectorAll("*"))).forEach(function(e){Array.from(e.attributes).forEach(function(t){/^(href|src|action)$/i.test(t.name)?e.setAttribute(t.name,Ja(t.value)):/^(id|class|role|aria-label|aria-checked|aria-selected|colspan|rowspan|type|value|checked|selected|disabled|readonly)$/i.test(t.name)?e.setAttribute(t.name,Ua(t.value)):e.removeAttribute(t.name)})});var o=Ua(n.outerHTML);return o.length>2e5?(t=!0,{html:"[question exceeds size limit]",possiblyTruncated:!0}):{html:o}}),possiblyTruncated:t,note:"Visible question content including options, entered blanks, selected options and visible code; not proof of official answers. Resource URL queries removed."}}function Va(){var e=document.getElementById("pta-diagnostic-status");e&&(e.textContent=(be.enabled?"正在记录题目完整内容 · ":"诊断已关闭 · ")+be.records.length+" 条");var t=document.getElementById("pta-diagnostic-badge");t&&(t.hidden=!be.enabled);var n=document.getElementById("pta-diagnostic-toggle");n&&(n.checked=be.enabled)}function Xa(){be.enabled=!1,be.observer&&be.observer.disconnect(),clearTimeout(be.timer),clearTimeout(be.endTimer),clearInterval(be.routeTimer),be.timer=be.routeTimer=be.endTimer=null,Va()}function Ka(e){if(be.enabled&&"pintia.cn"===location.hostname&&"https:"===location.protocol){var t=function(){if(document.getElementsByTagName("*").length>12e3)return"[snapshot skipped: DOM exceeds 12000 nodes]";var e=document.documentElement.cloneNode(!0),t=document.documentElement.querySelectorAll("*"),n=e.querySelectorAll("*");t.forEach(function(e,t){(/password|passwd|token|secret|api.?key|csrf|credential/i.test((e.id||"")+" "+(e.getAttribute("name")||""))||!/^(HTML|HEAD|BODY)$/.test(e.tagName)&&!e.getClientRects().length)&&n[t].remove()}),e.querySelectorAll('.pta-assist, #pta-root, #pta-api-diagnostic-preview, script, style, iframe, frame, object, embed, link, meta, noscript, [hidden], [aria-hidden="true"], input, textarea, select, .cm-content, .monaco-editor, [contenteditable]').forEach(function(e){e.remove()}),e.querySelectorAll("*").forEach(function(e){Array.from(e.attributes).forEach(function(t){/^(href|src|action)$/i.test(t.name)?e.setAttribute(t.name,Ja(t.value)):/^(id|class|role|aria-label|aria-modal|aria-live|colspan|rowspan|type)$/i.test(t.name)?e.setAttribute(t.name,Ua(t.value)):e.removeAttribute(t.name)})}),Array.from(e.attributes).forEach(function(t){e.removeAttribute(t.name)});for(var r,a=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),o=[];r=a.nextNode();)o.push(r);return o.forEach(function(e){e.remove()}),Ua(e.outerHTML).slice(0,4e5)}(),n={time:(new Date).toISOString(),reason:e,url:Ja(location.href),html:t,questionContent:Ya(),possiblyTruncated:t.length>=4e5},r=new Blob([JSON.stringify(n)]).size,a=be.records[be.records.length-1];if(!a||a.url!==n.url||a.html!==n.html||JSON.stringify(a.questionContent)!==JSON.stringify(n.questionContent)){for(r>4194304&&(n.questionContent={questions:[],possiblyTruncated:!0,note:"Question content exceeds 4 MiB; omitted"},r=new Blob([JSON.stringify(n)]).size);be.records.length&&(be.records.length>=20||be.bytes+r>4194304);)be.bytes-=new Blob([JSON.stringify(be.records.shift())]).size;be.records.push(n),be.bytes+=r,Va()}}else Xa()}function Za(e){be.enabled&&!be.timer&&(be.timer=setTimeout(function(){be.timer=null,Ka(e)},1e3))}function Wa(){be.enabled&&Ka("export current question state");var e={format:"pta-diagnostics-v1",warning:"Contains full visible question content and entered answers. Best-effort credential redaction only. Review before sharing; may contain questions, scores and personal text.",records:be.records},t=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:"application/json"})),n=document.createElement("a");n.href=t,n.download="pta-diagnostics-"+Date.now()+".json",n.click(),setTimeout(function(){URL.revokeObjectURL(t)},1e3)}function _a(e){(e||location.href!==ve)&&(ve=location.href,ha(),ir(),V.busy&&(V.autoKey=""),Ar(),s.routeRevision=(s.routeRevision||0)+1,M=null,N={url:"",items:[]},Ft(!0),F=null,Hn(),ra(),l&&l.abort(),l=s.running?new AbortController:null,s.running||_t("页面已切换",0,0))}function $a(){if(!document.getElementById("pta-modal-style")&&!document.getElementById("pta-style")){var e=document.createElement("style");e.id="pta-modal-style",e.textContent=D,document.head.appendChild(e)}}async function eo(){var e=document.getElementById("pta-auth-user").value.trim(),t=document.getElementById("pta-auth-pass").value,n=document.getElementById("pta-auth-card").value.trim(),r=document.getElementById("pta-auth-msg");if(!e||!t)return r.textContent="请填写用户名和密码",void(r.style.color="#ff6b6b");r.textContent="注册中...",r.style.color="#888";try{var a=(await xe("POST","/api/register",{username:e,password:t,card:n,fingerprint:Ee()})).data;a.token?(m.token=a.token,m.user=a.user,m.valid=!0,m.tier=a.user.tier||"free",localStorage.setItem("pta_token",a.token),r.textContent="paid"===a.user.tier?"付费注册成功":"免费注册成功(限10次)",r.style.color="#51cf66",setTimeout(function(){document.getElementById("pta-auth-dialog").remove(),so()},800)):(r.textContent=a.error||"注册失败",r.style.color="#ff6b6b")}catch(e){r.textContent="服务器连接失败",r.style.color="#ff6b6b"}}async function to(){var e=document.getElementById("pta-auth-user").value.trim(),t=document.getElementById("pta-auth-pass").value,n=document.getElementById("pta-auth-msg");if(!e||!t)return n.textContent="请输入用户名和密码",void(n.style.color="#ff6b6b");n.textContent="登录中...",n.style.color="#888";try{var r=(await xe("POST","/api/login",{username:e,password:t})).data;r.token?(m.token=r.token,m.user=r.user,m.valid=!0,localStorage.setItem("pta_token",r.token),n.textContent="登录成功",n.style.color="#51cf66",setTimeout(function(){document.getElementById("pta-auth-dialog").remove(),so()},500)):(n.textContent=r.error||"登录失败",n.style.color="#ff6b6b")}catch(e){n.textContent="服务器连接失败",n.style.color="#ff6b6b"}}function no(e){return String(e||"").replace(/[^0-9.]/g,"").split(".").map(function(e){return parseInt(e,10)||0})}async function ro(e){var t=new URL(e,"https://pintia.cn");if("https://pintia.cn"!==location.origin||t.origin!==location.origin)throw new Error("origin");if(!/^\/api\/problem-sets\/\d{1,25}\/(exams|problem-summaries|exam-problems)$/.test(t.pathname))throw new Error("route");var n=new AbortController,r=setTimeout(function(){n.abort()},15e3),a=null;try{var o=await fetch(t.href,{method:"GET",credentials:"same-origin",mode:"same-origin",redirect:"error",cache:"no-store",headers:{Accept:"application/json;charset=UTF-8"},signal:n.signal});if(!o.ok)throw new Error("http"+o.status);if(!o.body||!o.body.getReader)throw new Error("stream");a=o.body.getReader();for(var i=[],s=0;;){var l=await a.read();if(l.done)break;if((s+=l.value.byteLength)>2097152)throw new Error("large");i.push(l.value)}var c=new Uint8Array(s),p=0;return i.forEach(function(e){c.set(e,p),p+=e.byteLength}),JSON.parse((new TextDecoder).decode(c))}finally{clearTimeout(r),a&&a.cancel().catch(function(){})}}function ao(e,t){var n=e.type||t||"unknown",r=String(e.description||e.content||"").trim(),a=String(e.title||"").trim(),o=function(e){var t=e.problemConfig||{},n=Object.keys(t).find(function(e){return/ProblemConfig$/.test(e)});return(n&&t[n]&&Array.isArray(t[n].choices)?t[n].choices:[]).map(function(e,t){var n=String.fromCharCode(65+t);return"string"==typeof e?{label:n,content:e}:e&&"object"==typeof e?{label:e.label||n,content:String(null!=e.content?e.content:e.text||"")}:{label:n,content:""}}).filter(function(e){return e.content&&e.content.trim()})}(e);return"TRUE_OR_FALSE"!==n||o.length||(o=[{label:"T",content:"正确"},{label:"F",content:"错误"}]),{id:String(e.id||""),type:n,title:a,content:r,choices:o,examples:[],blankCount:0,answer:null,answerSource:"unknown"}}function oo(){var e=[],t={};function n(n){if(n){var r=n.id?"id:"+n.id:"t:"+String(n.content||n.title||"").slice(0,80);t[r]||(t[r]=!0,e.push(n))}}try{void 0!==K&&K.sets&&K.sets.forEach(function(e){e&&Array.isArray(e.questions)&&e.questions.forEach(n)})}catch(e){}try{if("function"==typeof GM_getValue){var r=GM_getValue(W,null);r&&Array.isArray(r.entries)&&r.entries.forEach(function(e){var t=GM_getValue(e.key,null),r=t&&t.record?t.record:t;r&&Array.isArray(r.questions)&&r.questions.forEach(n)});var a=GM_getValue(Z,null);a&&Array.isArray(a.questions)&&a.questions.forEach(n)}}catch(e){}try{!function(e){var t=ze("div").filter(function(e){return/^\d{6,}$/.test(e.id||"")&&!(e.closest&&e.closest("#pta-root"))});if((t=t.filter(function(e){return!t.some(function(t){return t!==e&&t.contains(e)})})).length)t.forEach(function(t){var n=Ve(t)||[],r=function(e){var t=ze(".cm-editor, .CodeMirror, .monaco-editor",e).filter(function(e){var t=String(e.parentElement&&e.parentElement.className||"");return!(/readonly/i.test(t)||e.closest&&e.closest("#pta-root"))});return ze("textarea",e).forEach(function(e){!He(e)||qe(e)||e.closest&&e.closest("#pta-root")||t.push(e)}),t}(t),a=function(e){return ze("input",e).filter(function(e){return!/hidden|radio|checkbox|button|submit|file|password|image|range|color/i.test(e.type||"")})}(t),o=Ke(t),i=t.querySelector('a[data-e2e="problem-set-problem-list-link"], a'),s=i?i.innerText.trim():"";if(!o||o.trim().length<3)s&&e({id:t.id,title:s,content:"",choices:[],answer:null,type:"PROGRAMMING"});else{var l=n.map(function(e){return{label:e.label||"",content:e.text}}),c=null,p="unknown",d=r.map(De).filter(function(e){return e&&e.trim()}).join("\n\n");if(n.length){p=n.some(function(e){return e.input&&"checkbox"===e.input.type})?"MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER":"MULTIPLE_CHOICE";var u=n.filter(function(e){return e.input&&e.input.checked}).map(function(e){return e.label||(e.text.match(/^\s*([A-F]|T|F)/i)||[])[1]||""});c=u.length?u.join(""):null}else if(d)p="PROGRAMMING",c=d;else if(a.length){p="FILL_IN_THE_BLANK";var m=a.map(function(e){return(e.value||"").trim()}).filter(Boolean);c=m.length?m.join(" | "):null}else r.length&&(p="PROGRAMMING",c=null);e({id:t.id,title:s||o.trim().slice(0,80),content:o,choices:l,answer:c,type:p})}});else{var n=new Map;try{rt().forEach(function(e){var t=r(e.problem);t&&(t.options=Ve(e.problem)||[])})}catch(e){}try{it().forEach(function(e){var t=r(e.problem);t&&(t.fillInputs=e.inputs)})}catch(e){}try{ze(".cm-editor, .CodeMirror, .monaco-editor").forEach(function(e){var t=String(e.parentElement&&e.parentElement.className||"");if(!(/readonly/i.test(t)||e.closest&&e.closest("#pta-root"))){var n=r(Re(e));n&&n.editors.indexOf(e)<0&&n.editors.push(e)}}),ze("textarea").forEach(function(e){if(He(e)&&!(qe(e)||e.closest&&e.closest("#pta-root"))){var t=r(Re(e));t&&t.editors.indexOf(e)<0&&t.editors.push(e)}})}catch(e){}n.forEach(function(t){var n=Ke(t.problem);if(n&&!(n.trim().length<3)){var r=t.options.map(function(e){return{label:e.label||"",content:e.text}}),a=null,o="unknown",i=t.editors.map(De).filter(function(e){return e&&e.trim()}).join("\n\n"),s=/程序设计|编程题|编写程序|编写函数|程序填空|代码实现/i.test(n)&&t.editors.length>0;if(t.options.length){o=t.options.some(function(e){return e.input&&"checkbox"===e.input.type})?"MULTIPLE_CHOICE_MORE_THAN_ONE_ANSWER":"MULTIPLE_CHOICE";var l=t.options.filter(function(e){return e.input&&e.input.checked}).map(function(e){return e.label||(e.text.match(/^\s*([A-F]|T|F)/i)||[])[1]||""});a=l.length?l.join(""):null}else if(i)o="PROGRAMMING",a=i;else if(s)o="PROGRAMMING",a=null;else if(t.fillInputs.length){o="FILL_IN_THE_BLANK";var c=t.fillInputs.map(function(e){return(e.value||"").trim()}).filter(Boolean);a=c.length?c.join(" | "):null}else t.editors.length&&(o="PROGRAMMING",a=null);e({title:n.trim().slice(0,80),content:n,choices:r,answer:a,type:o})}})}function r(e){return e?(n.has(e)||n.set(e,{problem:e,options:[],fillInputs:[],editors:[]}),n.get(e)):null}}(n)}catch(e){}return e}async function io(){Tn("正在拉取题目…");var e=oo(),t=[];try{t=await async function(){var e,t=(e=location.pathname.match(/^\/problem-sets\/(\d{1,25})/))?e[1]:"";if(!t)return[];for(var n=await ro("/api/problem-sets/"+t+"/problem-summaries"),r=Object.keys(n&&n.summaries||{}),a=[],o=0;o=0?t+="**答案:**\n\n```\n"+a+"\n```\n\n":t+="**答案:**`"+a+"`\n\n"}}),t}(t),a=URL.createObjectURL(new Blob(["\ufeff"+r],{type:"text/markdown;charset=utf-8"})),o=document.createElement("a");o.href=a,o.download="pta_export_"+(new Date).toISOString().slice(0,10)+".md",o.click(),setTimeout(function(){URL.revokeObjectURL(a)},1e3),n.remove()}else Tn("请至少勾选一道题")})}(n):Tn("当前页面没有识别到题目,请进入题目列表或答题页后再导出")}function so(){document.getElementById("pta-root")||(function(){var e=Se(n,null);if(e)return"openrouter"===e.provider&&(e.provider="opencode_zen"),e.configs&&e.configs.openrouter&&!e.configs.opencode_zen&&(e.configs.opencode_zen=e.configs.openrouter,delete e.configs.openrouter),s.provider=["deepseek","doubao","qianwen","mimo","opencode_zen","opencode"].indexOf(e.provider)>=0?e.provider:"deepseek",s.configs=Object.assign(s.configs,e.configs||{}),s.configs.deepseek=Object.assign({apiKey:"",available:!1,model:"",models:[],modelMeta:{},modelError:"",images:!1,maxTokens:2048,thinking:2},s.configs.deepseek||{}),s.configs.doubao=Object.assign({apiKey:"",available:!1,model:"",models:[],modelMeta:{},modelError:"",images:!0,maxTokens:2048,thinking:2},s.configs.doubao||{}),s.configs.qianwen=Object.assign({apiKey:"",available:!1,model:"",models:[],modelMeta:{},modelError:"",images:!0,maxTokens:2048,thinking:2},s.configs.qianwen||{}),s.configs.mimo=Object.assign({apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!0,maxTokens:2048,thinking:2},s.configs.mimo||{}),s.configs.opencode_zen=Object.assign({apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!1,maxTokens:2048,thinking:2},s.configs.opencode_zen||{}),s.configs.opencode=Object.assign({apiKey:"",model:"",models:[],modelMeta:{},modelError:"",images:!1,maxTokens:2048,thinking:2},s.configs.opencode||{}),s.skipAnswered=!1!==e.skipAnswered,s.continuous=!1!==e.continuous,s.assistanceMode=!0===e.assistanceMode,s.perturb=!0===e.perturb,s.notifications=!1!==e.notifications,s.concurrency=Object.prototype.hasOwnProperty.call(e,"concurrentEnabled")&&!0!==e.concurrentEnabled?1:Ce(e.concurrency),s.language=["auto","c","cpp","python","java","pascal"].indexOf(e.language)>=0?e.language:"auto",void(s.theme="dark"===e.theme?"dark":"light");var t=Se("_ptaSettings",null)||Se("_ptaDsSettings",null);t&&(s.configs.deepseek.apiKey=t.key||t.apiKey||"",s.configs.deepseek.model=t.model||"",t.provider&&/mimo/i.test(t.provider)&&(s.provider="mimo")),Ie()}(),ga(),qa(),ve=location.href,["pushState","replaceState"].forEach(function(e){var t=history[e];try{history[e]=function(){var e=t.apply(this,arguments);return _a(!1),e}}catch(e){Xt("当前浏览器不支持同步路由监听,将使用轮询保护","warning")}}),window.addEventListener("popstate",function(){_a(!0)}),window.addEventListener("hashchange",function(){_a(!1)}),setInterval(function(){_a(!1)},250),null===te&&(ir(),ra(),window.addEventListener("pagehide",function(){Un(),H.suspended=!0,Hn(),Vn()}),window.addEventListener("pageshow",function(){H.suspended=!1,ra()}),te=setInterval(function(){ea(H.rows,Date.now()),ir(),Nn()?H.suspended||"idle"!==H.status||lr():(Bn()&&P.path===location.pathname||"idle"===H.status||Hn(),/^\/problem-sets(?:\/|$)/.test(location.pathname)||(Un(),F=null)),"dom"===H.source&&qn(),ra()},500),Mn(location.pathname)&&lr()),function(){if(!re.bound){re.bound=!0,function(){var e=null;try{var t=localStorage.getItem(ne);t&&t.length<100&&(e=JSON.parse(t))}catch(e){}if(e&&1===e.version&&!(["answer","settings","catalogue"].indexOf(e.page)<0)){var n=document.getElementById("pta-drawer");n&&n.classList.toggle("open","settings"===e.page),"catalogue"===e.page&&Bn()&&zn(!0)}}(),da(!0);var e=document.getElementById("pta-shell");e&&e.addEventListener("transitionend",function(t){t.target===e&&"width"===t.propertyName&&pa()}),document.addEventListener("click",ma,!0),["wheel","touchmove"].forEach(function(e){document.addEventListener(e,function(e){oa(e.target)||ia()},{capture:!0,passive:!0})}),document.addEventListener("keydown",function(e){!oa(e.target)&&["ArrowDown","ArrowUp","PageDown","PageUp","Home","End"," "].indexOf(e.key)>=0&&ia()},!0),document.addEventListener("keydown",function(e){if("Escape"===e.key){var t=document.getElementById("pta-shell");t&&!t.classList.contains("collapsed")&&da(!0,"esc")}}),function(){var e=document.getElementById("pta-root"),t=e&&e.querySelector(".pta-top");if(e&&t){try{var n=JSON.parse(localStorage.getItem("pta-panel-pos")||"null");if(n&&"number"==typeof n.left&&"number"==typeof n.top){var r=window.innerWidth-30,a=window.innerHeight-30;n.left-200&&n.top>-200?(e.style.right="auto",e.style.bottom="auto",e.style.left=n.left+"px",e.style.top=n.top+"px"):localStorage.removeItem("pta-panel-pos")}}catch(e){}var o={dragging:!1,startX:0,startY:0,origLeft:0,origTop:0};t.addEventListener("mousedown",function(t){if(!t.target.closest("button")){o.dragging=!0,o.startX=t.clientX,o.startY=t.clientY;var n=e.getBoundingClientRect();o.origLeft=n.left,o.origTop=n.top,e.style.right="auto",e.style.bottom="auto",e.style.left=n.left+"px",e.style.top=n.top+"px",t.preventDefault()}}),document.addEventListener("mousemove",function(t){if(o.dragging){var n=t.clientX-o.startX,r=t.clientY-o.startY,a=o.origLeft+n,i=o.origTop+r,s=e.offsetWidth||58,l=e.offsetHeight||58;a<20?a=15-s:a>window.innerWidth-20&&(a=window.innerWidth-15),i<20?i=15-l:i>window.innerHeight-20&&(i=window.innerHeight-15),a=Math.max(15-s,Math.min(window.innerWidth-15,a)),i=Math.max(15-l,Math.min(window.innerHeight-15,i)),e.style.left=a+"px",e.style.top=i+"px"}}),document.addEventListener("mouseup",function(){if(o.dragging){o.dragging=!1;try{var t=e.getBoundingClientRect();localStorage.setItem("pta-panel-pos",JSON.stringify({left:t.left,top:t.top}))}catch(e){}}})}}(),document.addEventListener("scroll",ua,{capture:!0,passive:!0}),window.addEventListener("scroll",ua,{passive:!0}),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&ha()}),window.addEventListener("pagehide",function(){re.alive=!1,ia(),ha(),clearTimeout(re.motionTimer),re.motionTimer=null,re.moving=!1}),window.addEventListener("pageshow",function(){re.alive=!0})}}(),t.review&&null===V.timer&&(window.addEventListener("pagehide",Ar),async function(){if(t.review&&!V.preferenceReady&&!V.preferenceBusy){V.preferenceBusy=!0;try{V.enabled=!0===await Dr(Promise.resolve(GM_getValue(X,!1)))}catch(e){V.enabled=!1,V.status="复习开关读取失败,请手动开启重试"}finally{V.preferenceReady=!0,V.preferenceBusy=!1,V.showTools=V.enabled,wr()}}}(),V.timer=setInterval(function(){Cr(),function(){if(t.review&&!(!V.preferenceReady||!V.enabled||V.preferenceBusy||V.busy||V.activeSet||Er()||H.suspended)&&Nn()&&(H.directoryComplete||H.cacheVerified)&&G.owner){var e=H.rows.filter(function(e){return"ended"===e.lifecycle});if(e.length){var n=G.owner+"|"+(H.snapshotAt||"")+"|"+e.map(function(e){return e.id+":"+(e.listedExamId||"")}).sort().join(",");V.autoKey!==n&&(V.autoKey=n,xr(e))}}}()},500),Cr()),ht(!1),setInterval(function(){ht(!0)},15e3),xe("GET","/api/verify").then(function(e){var t=e.data;if(200===e.status&&(m.tier=t.tier||m.tier,m.usageCount=t.usage_count||0,m.quota=t.quota||0,Ae(),t.announcement&&!t.announcement.read&&function(e){$a();var t=document.getElementById("pta-announce");t&&t.remove();var n=document.createElement("div");n.id="pta-announce",n.className="pta-modal-mask";var r=document.createElement("div");r.className="pta-modal-card";var a=document.createElement("div");a.className="pta-modal-head";var o=document.createElement("h2");o.textContent=e.title||"系统公告",a.appendChild(o);var i=document.createElement("div");i.className="pta-modal-body";var s=document.createElement("p");s.style.cssText="font-size:13px;line-height:1.75;margin:0;white-space:pre-wrap;word-break:break-word;",s.textContent=e.body||"",i.appendChild(s);var l=document.createElement("div");l.className="pta-modal-foot";var c=document.createElement("button");c.type="button",c.className="pta-modal-btn pta-modal-btn-primary",c.style.width="100%",c.textContent="我知道了",c.addEventListener("click",function(){xe("POST","/api/announcement/read",{}).catch(function(){}),n.remove()}),l.appendChild(c),r.appendChild(a),r.appendChild(i),r.appendChild(l),n.appendChild(r),document.body.appendChild(n)}(t.announcement),t.config)){var n=t.config,r={deepseek:["deepseek_available","deepseek_model"],doubao:["doubao_available","doubao_model"],qianwen:["qianwen_available","qianwen_model"]};Object.keys(r).forEach(function(e){var t=s.configs[e];if(t){t.available=!!n[r[e][0]];var a=n[r[e][1]];if(a){var o=String(a).split(/[,,\s]+/).map(function(e){return e.trim()}).filter(Boolean);o.length&&(t.model=t.model||o[0],t.models=o)}}}),n.default_provider&&s.configs[n.default_provider]&&(s.provider=n.default_provider),Ie(),wa(),ut(s.provider)&&!s.configs[s.provider].models.length&&setTimeout(function(){La(s.provider,!0)},250)}}).catch(function(){}))}async function lo(){document.getElementById("pta-root")?console.warn("[PTA-AutoTool] 已运行"):await async function(){if(!m.token)return!1;try{var e=await xe("GET","/api/verify");if(200===e.status){m.valid=!0;var t=e.data;return m.minVersion=t.min_version||"",m.tier=t.tier||m.tier,m.usageCount=t.usage_count||0,m.quota=t.quota||0,!0}return m.valid=!1,!1}catch(e){return!1}}()?function(e,t){if(!t)return!1;for(var n=no(e),r=no(t),a=Math.max(n.length,r.length),o=0;os)return!1}return!1}(u,m.minVersion)?function(e){$a();var t=document.getElementById("pta-version-lock");t&&t.remove();var n=document.createElement("div");n.id="pta-version-lock",n.className="pta-modal-mask";var r=document.createElement("div");r.className="pta-modal-card",r.style.textAlign="center",r.innerHTML='
⚠️

版本过低,请更新

当前版本 '+Kt(u)+",最低要求 "+Kt(e)+"。
旧版本已停止使用,请更新到最新版后再登录。

";var a=document.createElement("button");a.type="button",a.className="pta-modal-btn pta-modal-btn-primary",a.style.width="100%",a.textContent="前往下载最新版",a.addEventListener("click",function(){window.open(d+"/PTA-AutoTool.user.js","_blank")}),r.querySelector(".pta-modal-body").appendChild(a),n.appendChild(r),document.body.appendChild(n)}(m.minVersion):so():function(){$a();var e=document.getElementById("pta-auth-dialog");e&&e.remove();var t=document.createElement("div");t.id="pta-auth-dialog",t.className="pta-modal-mask",t.innerHTML='

PTA-AutoTool

v2.7.3
',document.body.appendChild(t);var n="login";function r(e){n=e,document.getElementById("pta-tab-login").classList.toggle("active","login"===e),document.getElementById("pta-tab-reg").classList.toggle("active","reg"===e),document.getElementById("pta-auth-card").style.display="reg"===e?"block":"none",document.getElementById("pta-auth-btn").textContent="reg"===e?"注 册":"登 录",document.getElementById("pta-auth-msg").textContent=""}document.getElementById("pta-tab-login").addEventListener("click",function(){r("login")}),document.getElementById("pta-tab-reg").addEventListener("click",function(){r("reg")}),document.getElementById("pta-auth-btn").addEventListener("click",function(){"reg"===n?eo():to()}),document.getElementById("pta-auth-pass").addEventListener("keydown",function(e){"Enter"===e.key&&("reg"===n?eo():to())})}()}}();