diff --git a/server-data/resources/[ox]/ox_lib/fxmanifest.lua b/server-data/resources/[ox]/ox_lib/fxmanifest.lua index a382d9751..7d431c08c 100644 --- a/server-data/resources/[ox]/ox_lib/fxmanifest.lua +++ b/server-data/resources/[ox]/ox_lib/fxmanifest.lua @@ -8,7 +8,7 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw --[[ Resource Information ]]-- name 'ox_lib' author 'Overextended' -version '3.9.1' +version '3.10.1' license 'LGPL-3.0-or-later' repository 'https://github.com/overextended/ox_lib' description 'A library of shared functions to utilise in other resources.' diff --git a/server-data/resources/[ox]/ox_lib/imports/callback/client.lua b/server-data/resources/[ox]/ox_lib/imports/callback/client.lua index a2b5ce1b7..8a0dc086a 100644 --- a/server-data/resources/[ox]/ox_lib/imports/callback/client.lua +++ b/server-data/resources/[ox]/ox_lib/imports/callback/client.lua @@ -67,8 +67,8 @@ lib.callback = setmetatable({}, { }) ---@param event string ----@param delay number | false prevent the event from being called for the given time ---- Sends an event to the server and halts the current thread until a response is returned. +---@param delay? number | false prevent the event from being called for the given time. +---Sends an event to the server and halts the current thread until a response is returned. function lib.callback.await(event, delay, ...) return triggerServerCallback(nil, event, delay, false, ...) end diff --git a/server-data/resources/[ox]/ox_lib/imports/print/shared.lua b/server-data/resources/[ox]/ox_lib/imports/print/shared.lua new file mode 100644 index 000000000..a067dd10f --- /dev/null +++ b/server-data/resources/[ox]/ox_lib/imports/print/shared.lua @@ -0,0 +1,47 @@ +---@enum PrintLevel +local printLevel = { + error = 1, + warn = 2, + info = 3, + verbose = 4, + debug = 5, +} + +local levelPrefixes = { + '^1[ERROR]', + '^3[WARN]', + '^7[INFO]', + '^4[VERBOSE]', + '^6[DEBUG]', +} + +local resourcePrintLevel = printLevel[GetConvar('ox:printlevel:' .. cache.resource, GetConvar('ox:printlevel', 'info'))] +local template = ('^5[%s] %%s %%s^7'):format(cache.resource) +local jsonOptions = { sort_keys = true, indent = true } + +---Prints to console conditionally based on what ox:printlevel is. +---Any print with a level more severe will also print. If ox:printlevel is info, then warn and error prints will appear as well, but debug prints will not. +---@param level PrintLevel +---@param ... any +local function libPrint(level, ...) + if level > resourcePrintLevel then return end + + local args = { ... } + + for i = 1, #args do + local arg = args[i] + args[i] = type(arg) == 'table' and json.encode(arg, jsonOptions) or tostring(arg) + end + + print(template:format(levelPrefixes[level], table.concat(args, '\t'))) +end + +lib.print = { + error = function(...) libPrint(printLevel.error, ...) end, + warn = function(...) libPrint(printLevel.warn, ...) end, + info = function(...) libPrint(printLevel.info, ...) end, + verbose = function(...) libPrint(printLevel.verbose, ...) end, + debug = function(...) libPrint(printLevel.debug, ...) end, +} + +return lib.print diff --git a/server-data/resources/[ox]/ox_lib/imports/require/shared.lua b/server-data/resources/[ox]/ox_lib/imports/require/shared.lua index ced340e1f..0454e1bae 100644 --- a/server-data/resources/[ox]/ox_lib/imports/require/shared.lua +++ b/server-data/resources/[ox]/ox_lib/imports/require/shared.lua @@ -17,29 +17,61 @@ local _require = require function lib.require(modname) if type(modname) ~= 'string' then return end + local modpath = modname:gsub('%.', '/') local module = loaded[modname] + if module then return module end + + local success, result = pcall(_require, modname) + + if success then + loaded[modname] = result + return result + end + + local resourceSrc + + if not modpath:find('^@') then + local idx = 1 + + while true do + local di = debug.getinfo(idx, 'S') + + if di then + if not di.short_src:find('^@ox_lib/imports/require') and not di.short_src:find('^%[C%]') and not di.short_src:find('^citizen') then + resourceSrc = di.short_src:gsub('^@(.-)/.+', '%1') + break + end + else + resourceSrc = cache.resource + break + end + + idx += 1 + end + + if resourceSrc ~= cache.resource then + modname = ('@%s.%s'):format(resourceSrc, modname) + end + end + if not module then if module == false then error(("^1circular-dependency occurred when loading module '%s'^0"):format(modname), 2) end - local success, result = pcall(_require, modname) - - if success then - loaded[modname] = result - return result + if not resourceSrc then + resourceSrc = modpath:gsub('^@(.-)/.+', '%1') + modpath = modpath:sub(#resourceSrc + 3) end - local modpath = modname:gsub('%.', '/') - for path in package.path:gmatch('[^;]+') do local scriptPath = path:gsub('?', modpath):gsub('%.+%/+', '') - local resourceFile = LoadResourceFile(cache.resource, scriptPath) + local resourceFile = LoadResourceFile(resourceSrc, scriptPath) if resourceFile then loaded[modname] = false - scriptPath = ('@@%s/%s'):format(cache.resource, scriptPath) + scriptPath = ('@@%s/%s'):format(resourceSrc, scriptPath) local chunk, err = load(resourceFile, scriptPath) diff --git a/server-data/resources/[ox]/ox_lib/locales/de.json b/server-data/resources/[ox]/ox_lib/locales/de.json index 6db70dc25..8bd71e74e 100644 --- a/server-data/resources/[ox]/ox_lib/locales/de.json +++ b/server-data/resources/[ox]/ox_lib/locales/de.json @@ -6,9 +6,9 @@ "confirm": "Bestätigen", "more": "Mehr..." }, - "txadmin_announcement": "Server announcement by %s", - "txadmin_dm": "Direct Message from %s", - "txadmin_warn": "You have been warned by %s", - "txadmin_warn_content": "%s \nAction ID: %s", - "txadmin_scheduledrestart": "Scheduled Restart" + "txadmin_announcement": "Serverankündigung von %s", + "txadmin_dm": "Direktnachricht von %s", + "txadmin_warn": "Du wurdest von %s gewarnt", + "txadmin_warn_content": "%s \nVerwarn ID: %s", + "txadmin_scheduledrestart": "Geplanter Neustart" } diff --git a/server-data/resources/[ox]/ox_lib/locales/nl.json b/server-data/resources/[ox]/ox_lib/locales/nl.json index cdec229dd..70de2c04e 100644 --- a/server-data/resources/[ox]/ox_lib/locales/nl.json +++ b/server-data/resources/[ox]/ox_lib/locales/nl.json @@ -3,12 +3,12 @@ "ui": { "cancel": "Annuleren", "close": "Sluiten", - "confirm": "Bevestig", - "more": "More..." + "confirm": "Bevestigen", + "more": "Meer..." }, - "txadmin_announcement": "Server announcement by %s", - "txadmin_dm": "Direct Message from %s", - "txadmin_warn": "You have been warned by %s", - "txadmin_warn_content": "%s \nAction ID: %s", - "txadmin_scheduledrestart": "Scheduled Restart" + "txadmin_announcement": "Server mededeling door %s", + "txadmin_dm": "Bericht van %s", + "txadmin_warn": "Je hebt een waarschuwing gekregen van %s", + "txadmin_warn_content": "%s \nActie ID: %s", + "txadmin_scheduledrestart": "Geplande Server Restart" } diff --git a/server-data/resources/[ox]/ox_lib/resource/interface/client/input.lua b/server-data/resources/[ox]/ox_lib/resource/interface/client/input.lua index 6b61f34c0..ace10f7ca 100644 --- a/server-data/resources/[ox]/ox_lib/resource/interface/client/input.lua +++ b/server-data/resources/[ox]/ox_lib/resource/interface/client/input.lua @@ -17,6 +17,7 @@ local input ---@field autosize? boolean ---@field required? boolean ---@field format? string +---@field returnString? boolean ---@field clearable? string ---@field description? string diff --git a/server-data/resources/[ox]/ox_lib/resource/vehicleProperties/client.lua b/server-data/resources/[ox]/ox_lib/resource/vehicleProperties/client.lua index 478ec3fc2..b33398569 100644 --- a/server-data/resources/[ox]/ox_lib/resource/vehicleProperties/client.lua +++ b/server-data/resources/[ox]/ox_lib/resource/vehicleProperties/client.lua @@ -114,6 +114,8 @@ AddStateBagChangeHandler('setVehicleProperties', '', function(bagName, _, value) end) ]] +local gameBuild = GetGameBuildNumber() + ---@param vehicle number ---@return VehicleProperties? function lib.getVehicleProperties(vehicle) @@ -269,7 +271,7 @@ function lib.getVehicleProperties(vehicle) doors = damage.doors, tyres = damage.tyres, bulletProofTyres = GetVehicleTyresCanBurst(vehicle), - driftTyres = GetDriftTyresEnabled(vehicle), + driftTyres = gameBuild >= 2372 and GetDriftTyresEnabled(vehicle), -- no setters? -- leftHeadlight = GetIsLeftVehicleHeadlightDamaged(vehicle), -- rightHeadlight = GetIsRightVehicleHeadlightDamaged(vehicle), @@ -298,7 +300,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle) local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle) SetVehicleModKit(vehicle, 0) - SetVehicleAutoRepairDisabled(vehicle, true) + -- SetVehicleAutoRepairDisabled(vehicle, true) if props.extras then for id, disable in pairs(props.extras) do @@ -306,10 +308,6 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle) end end - if fixVehicle then - SetVehicleFixed(vehicle) - end - if props.plate then SetVehicleNumberPlateText(vehicle, props.plate) end @@ -637,9 +635,13 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle) SetVehicleTyresCanBurst(vehicle, props.bulletProofTyres) end - if props.driftTyres then + if gameBuild >= 2372 and props.driftTyres then SetDriftTyresEnabled(vehicle, true) end + if fixVehicle then + SetVehicleFixed(vehicle) + end + return true -end \ No newline at end of file +end diff --git a/server-data/resources/[ox]/ox_lib/web/build/assets/index-c23fc323.js b/server-data/resources/[ox]/ox_lib/web/build/assets/index-6e94cd7b.js similarity index 99% rename from server-data/resources/[ox]/ox_lib/web/build/assets/index-c23fc323.js rename to server-data/resources/[ox]/ox_lib/web/build/assets/index-6e94cd7b.js index f572b159c..f7740876a 100644 --- a/server-data/resources/[ox]/ox_lib/web/build/assets/index-c23fc323.js +++ b/server-data/resources/[ox]/ox_lib/web/build/assets/index-6e94cd7b.js @@ -980,7 +980,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * @license MIT */var xx=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};function v5(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lh(e.position):"start"in e||"end"in e?Lh(e):"line"in e||"column"in e?Xs(e):""}function Xs(e){return Sh(e&&e.line)+":"+Sh(e&&e.column)}function Lh(e){return Xs(e&&e.start)+"-"+Xs(e&&e.end)}function Sh(e){return e&&typeof e=="number"?e:1}class c4 extends Error{constructor(t,r,n){const a=[null,null];let c={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof r=="string"&&(n=r,r=void 0),typeof n=="string"){const i=n.indexOf(":");i===-1?a[1]=n:(a[0]=n.slice(0,i),a[1]=n.slice(i+1))}r&&("type"in r||"position"in r?r.position&&(c=r.position):"start"in r||"end"in r?c=r:("line"in r||"column"in r)&&(c.start=r)),this.name=v5(r)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=c.start.line,this.column=c.start.column,this.position=c,this.source=a[0],this.ruleId=a[1],this.file,this.actual,this.expected,this.url,this.note}}c4.prototype.file="";c4.prototype.name="";c4.prototype.reason="";c4.prototype.message="";c4.prototype.stack="";c4.prototype.fatal=null;c4.prototype.column=null;c4.prototype.line=null;c4.prototype.source=null;c4.prototype.ruleId=null;c4.prototype.position=null;const k4={basename:pZ,dirname:mZ,extname:hZ,join:vZ,sep:"/"};function pZ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');h7(e);let r=0,n=-1,a=e.length,c;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(c){r=a+1;break}}else n<0&&(c=!0,n=a+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let i=-1,o=t.length-1;for(;a--;)if(e.charCodeAt(a)===47){if(c){r=a+1;break}}else i<0&&(c=!0,i=a+1),o>-1&&(e.charCodeAt(a)===t.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=i));return r===n?n=i:n<0&&(n=e.length),e.slice(r,n)}function mZ(e){if(h7(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.charCodeAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function hZ(e){h7(e);let t=e.length,r=-1,n=0,a=-1,c=0,i;for(;t--;){const o=e.charCodeAt(t);if(o===47){if(i){n=t+1;break}continue}r<0&&(i=!0,r=t+1),o===46?a<0?a=t:c!==1&&(c=1):a>-1&&(c=-1)}return a<0||r<0||c===0||c===1&&a===r-1&&a===n+1?"":e.slice(a,r)}function vZ(...e){let t=-1,r;for(;++t0&&e.charCodeAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function zZ(e,t){let r="",n=0,a=-1,c=0,i=-1,o,s;for(;++i<=e.length;){if(i2){if(s=r.lastIndexOf("/"),s!==r.length-1){s<0?(r="",n=0):(r=r.slice(0,s),n=r.length-1-r.lastIndexOf("/")),a=i,c=0;continue}}else if(r.length>0){r="",n=0,a=i,c=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(a+1,i):r=e.slice(a+1,i),n=i-a-1;a=i,c=0}else o===46&&c>-1?c++:c=-1}return r}function h7(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yZ={cwd:CZ};function CZ(){return"/"}function Qs(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function HZ(e){if(typeof e=="string")e=new URL(e);else if(!Qs(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return VZ(e)}function VZ(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r"u"||tr.call(t,a)},Eh=function(t,r){Nh&&r.name==="__proto__"?Nh(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},$h=function(t,r){if(r==="__proto__")if(tr.call(t,r)){if(_h)return _h(t,r).value}else return;return t[r]},Th=function e(){var t,r,n,a,c,i,o=arguments[0],s=1,l=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});si.length;let s;o&&i.push(a);try{s=e.apply(this,i)}catch(l){const f=l;if(o&&r)throw f;return a(f)}o||(s instanceof Promise?s.then(c,a):s instanceof Error?a(s):c(s))}function a(i,...o){r||(r=!0,t(i,...o))}function c(i){a(null,i)}}const wZ=kx().freeze(),Sx={}.hasOwnProperty;function kx(){const e=MZ(),t=[];let r={},n,a=-1;return c.data=i,c.Parser=void 0,c.Compiler=void 0,c.freeze=o,c.attachers=t,c.use=s,c.parse=l,c.stringify=f,c.run=u,c.runSync=d,c.process=p,c.processSync=m,c;function c(){const v=kx();let C=-1;for(;++C{if(H||!M||!w)x(H);else{const P=c.stringify(M,w);P==null||(kZ(P)?w.value=P:w.result=P),x(H,w)}});function x(H,M){H||!M?y(H):g?g(M):C(null,M)}}}function m(v){let C;c.freeze(),xi("processSync",c.Parser),wi("processSync",c.Compiler);const h=O8(v);return c.process(h,g),Fh("processSync","process",C),h;function g(y){C=!0,Ph(y)}}}function Dh(e,t){return typeof e=="function"&&e.prototype&&(LZ(e.prototype)||t in e.prototype)}function LZ(e){let t;for(t in e)if(Sx.call(e,t))return!0;return!1}function xi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function wi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Li(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rh(e){if(!Js(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fh(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function O8(e){return SZ(e)?e:new wx(e)}function SZ(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kZ(e){return typeof e=="string"||xx(e)}function PZ(e,t){const r=(t||{}).includeImageAlt;return Px(e,typeof r=="boolean"?r:!0)}function Px(e,t){return NZ(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&Ih(e.children,t))||Array.isArray(e)&&Ih(e,t)||""}function Ih(e,t){const r=[];let n=-1;for(;++na?0:a+t:t=t>a?a:t,r=r>0?r:0,n.length<1e4)i=Array.from(n),i.unshift(t,r),[].splice.apply(e,i);else for(r&&[].splice.apply(e,[t,r]);c0?(D3(e,e.length,0,t),e):t}const Bh={}.hasOwnProperty;function Nx(e){const t={};let r=-1;for(;++ri))return;const M=t.events.length;let w=M,P,N;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){if(P){N=t.events[w][1].end;break}P=!0}for(h(n),H=M;Hy;){const x=r[V];t.containerState=x[1],x[0].exit.call(t,e)}r.length=y}function g(){a.write([null]),c=void 0,a=void 0,t.containerState._closeFlow=void 0}}function IZ(e,t,r){return W1(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zr(e){if(e===null||k2(e)||kc(e))return 1;if(Pc(e))return 2}function Nc(e,t,r){const n=[];let a=-1;for(;++a1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const u=Object.assign({},e[n][1].end),d=Object.assign({},e[r][1].start);Uh(u,-s),Uh(d,s),i={type:s>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[n][1].end)},o={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:d},c={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},a={type:s>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},o.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=X3(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=X3(l,[["enter",a,t],["enter",i,t],["exit",i,t],["enter",c,t]]),l=X3(l,Nc(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=X3(l,[["exit",c,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(f=2,l=X3(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):f=0,D3(e,n-1,r-n+3,l),r=n+l.length-f-2;break}}for(r=-1;++r=4?i(l):r(l)}function i(l){return l===null?s(l):w1(l)?e.attempt(JZ,i,s)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||w1(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function s(l){return e.exit("codeIndented"),t(l)}}function tK(e,t,r){const n=this;return a;function a(i){return n.parser.lazy[n.now().line]?r(i):w1(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):W1(e,c,"linePrefix",4+1)(i)}function c(i){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):w1(i)?a(i):r(i)}}const rK={name:"codeText",tokenize:cK,resolve:nK,previous:aK};function nK(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}}function $x(e,t,r,n,a,c,i,o,s){const l=s||Number.POSITIVE_INFINITY;let f=0;return u;function u(h){return h===60?(e.enter(n),e.enter(a),e.enter(c),e.consume(h),e.exit(c),d):h===null||h===41||K5(h)?r(h):(e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),v(h))}function d(h){return h===62?(e.enter(c),e.consume(h),e.exit(c),e.exit(a),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===62?(e.exit("chunkString"),e.exit(o),d(h)):h===null||h===60||w1(h)?r(h):(e.consume(h),h===92?m:p)}function m(h){return h===60||h===62||h===92?(e.consume(h),p):p(h)}function v(h){return h===40?++f>l?r(h):(e.consume(h),v):h===41?f--?(e.consume(h),v):(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),t(h)):h===null||k2(h)?f?r(h):(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),t(h)):K5(h)?r(h):(e.consume(h),h===92?C:v)}function C(h){return h===40||h===41||h===92?(e.consume(h),v):v(h)}}function Tx(e,t,r,n,a,c){const i=this;let o=0,s;return l;function l(p){return e.enter(n),e.enter(a),e.consume(p),e.exit(a),e.enter(c),f}function f(p){return p===null||p===91||p===93&&!s||p===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs||o>999?r(p):p===93?(e.exit(c),e.enter(a),e.consume(p),e.exit(a),e.exit(n),t):w1(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===null||p===91||p===93||w1(p)||o++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s=s||!r2(p),p===92?d:u)}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,u):u(p)}}function Dx(e,t,r,n,a,c){let i;return o;function o(d){return e.enter(n),e.enter(a),e.consume(d),e.exit(a),i=d===40?41:d,s}function s(d){return d===i?(e.enter(a),e.consume(d),e.exit(a),e.exit(n),t):(e.enter(c),l(d))}function l(d){return d===i?(e.exit(c),s(i)):d===null?r(d):w1(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),W1(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===i||d===null||w1(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?u:f)}function u(d){return d===i||d===92?(e.consume(d),f):f(d)}}function g5(e,t){let r;return n;function n(a){return w1(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n):r2(a)?W1(e,n,r?"linePrefix":"lineSuffix")(a):t(a)}}function C4(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dK={name:"definition",tokenize:mK},pK={tokenize:hK,partial:!0};function mK(e,t,r){const n=this;let a;return c;function c(s){return e.enter("definition"),Tx.call(n,e,i,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(s)}function i(s){return a=C4(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),s===58?(e.enter("definitionMarker"),e.consume(s),e.exit("definitionMarker"),g5(e,$x(e,e.attempt(pK,W1(e,o,"whitespace"),W1(e,o,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(s)}function o(s){return s===null||w1(s)?(e.exit("definition"),n.parser.defined.includes(a)||n.parser.defined.push(a),t(s)):r(s)}}function hK(e,t,r){return n;function n(i){return k2(i)?g5(e,a)(i):r(i)}function a(i){return i===34||i===39||i===40?Dx(e,W1(e,c,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(i):r(i)}function c(i){return i===null||w1(i)?t(i):r(i)}}const vK={name:"hardBreakEscape",tokenize:gK};function gK(e,t,r){return n;function n(c){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(c),a}function a(c){return w1(c)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(c)):r(c)}}const zK={name:"headingAtx",tokenize:CK,resolve:yK};function yK(e,t){let r=e.length-2,n=3,a,c;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(a={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},c={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},D3(e,n,r-n+1,[["enter",a,t],["enter",c,t],["exit",c,t],["exit",a,t]])),e}function CK(e,t,r){const n=this;let a=0;return c;function c(f){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),i(f)}function i(f){return f===35&&a++<6?(e.consume(f),i):f===null||k2(f)?(e.exit("atxHeadingSequence"),n.interrupt?t(f):o(f)):r(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||w1(f)?(e.exit("atxHeading"),t(f)):r2(f)?W1(e,o,"whitespace")(f):(e.enter("atxHeadingText"),l(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),o(f))}function l(f){return f===null||f===35||k2(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),l)}}const HK=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Yh=["pre","script","style","textarea"],VK={name:"htmlFlow",tokenize:xK,resolveTo:MK,concrete:!0},bK={tokenize:wK,partial:!0};function MK(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xK(e,t,r){const n=this;let a,c,i,o,s;return l;function l(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),m):S===63?(e.consume(S),a=3,n.interrupt?t:B):Q3(S)?(e.consume(S),i=String.fromCharCode(S),c=!0,v):r(S)}function u(S){return S===45?(e.consume(S),a=2,d):S===91?(e.consume(S),a=5,i="CDATA[",o=0,p):Q3(S)?(e.consume(S),a=4,n.interrupt?t:B):r(S)}function d(S){return S===45?(e.consume(S),n.interrupt?t:B):r(S)}function p(S){return S===i.charCodeAt(o++)?(e.consume(S),o===i.length?n.interrupt?t:O:p):r(S)}function m(S){return Q3(S)?(e.consume(S),i=String.fromCharCode(S),v):r(S)}function v(S){return S===null||S===47||S===62||k2(S)?S!==47&&c&&Yh.includes(i.toLowerCase())?(a=1,n.interrupt?t(S):O(S)):HK.includes(i.toLowerCase())?(a=6,S===47?(e.consume(S),C):n.interrupt?t(S):O(S)):(a=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(S):c?g(S):h(S)):S===45||f3(S)?(e.consume(S),i+=String.fromCharCode(S),v):r(S)}function C(S){return S===62?(e.consume(S),n.interrupt?t:O):r(S)}function h(S){return r2(S)?(e.consume(S),h):P(S)}function g(S){return S===47?(e.consume(S),P):S===58||S===95||Q3(S)?(e.consume(S),y):r2(S)?(e.consume(S),g):P(S)}function y(S){return S===45||S===46||S===58||S===95||f3(S)?(e.consume(S),y):V(S)}function V(S){return S===61?(e.consume(S),x):r2(S)?(e.consume(S),V):g(S)}function x(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(e.consume(S),s=S,H):r2(S)?(e.consume(S),x):(s=null,M(S))}function H(S){return S===null||w1(S)?r(S):S===s?(e.consume(S),w):(e.consume(S),H)}function M(S){return S===null||S===34||S===39||S===60||S===61||S===62||S===96||k2(S)?V(S):(e.consume(S),M)}function w(S){return S===47||S===62||r2(S)?g(S):r(S)}function P(S){return S===62?(e.consume(S),N):r(S)}function N(S){return r2(S)?(e.consume(S),N):S===null||w1(S)?O(S):r(S)}function O(S){return S===45&&a===2?(e.consume(S),D):S===60&&a===1?(e.consume(S),k):S===62&&a===4?(e.consume(S),I):S===63&&a===3?(e.consume(S),B):S===93&&a===5?(e.consume(S),E):w1(S)&&(a===6||a===7)?e.check(bK,I,A)(S):S===null||w1(S)?A(S):(e.consume(S),O)}function A(S){return e.exit("htmlFlowData"),$(S)}function $(S){return S===null?L(S):w1(S)?e.attempt({tokenize:_,partial:!0},$,L)(S):(e.enter("htmlFlowData"),O(S))}function _(S,Z,n1){return h1;function h1(c1){return S.enter("lineEnding"),S.consume(c1),S.exit("lineEnding"),K}function K(c1){return n.parser.lazy[n.now().line]?n1(c1):Z(c1)}}function D(S){return S===45?(e.consume(S),B):O(S)}function k(S){return S===47?(e.consume(S),i="",R):O(S)}function R(S){return S===62&&Yh.includes(i.toLowerCase())?(e.consume(S),I):Q3(S)&&i.length<8?(e.consume(S),i+=String.fromCharCode(S),R):O(S)}function E(S){return S===93?(e.consume(S),B):O(S)}function B(S){return S===62?(e.consume(S),I):S===45&&a===2?(e.consume(S),B):O(S)}function I(S){return S===null||w1(S)?(e.exit("htmlFlowData"),L(S)):(e.consume(S),I)}function L(S){return e.exit("htmlFlow"),t(S)}}function wK(e,t,r){return n;function n(a){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),e.attempt(v7,t,r)}}const LK={name:"htmlText",tokenize:SK};function SK(e,t,r){const n=this;let a,c,i,o;return s;function s(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),M):L===63?(e.consume(L),x):Q3(L)?(e.consume(L),N):r(L)}function f(L){return L===45?(e.consume(L),u):L===91?(e.consume(L),c="CDATA[",i=0,C):Q3(L)?(e.consume(L),V):r(L)}function u(L){return L===45?(e.consume(L),d):r(L)}function d(L){return L===null||L===62?r(L):L===45?(e.consume(L),p):m(L)}function p(L){return L===null||L===62?r(L):m(L)}function m(L){return L===null?r(L):L===45?(e.consume(L),v):w1(L)?(o=m,E(L)):(e.consume(L),m)}function v(L){return L===45?(e.consume(L),I):m(L)}function C(L){return L===c.charCodeAt(i++)?(e.consume(L),i===c.length?h:C):r(L)}function h(L){return L===null?r(L):L===93?(e.consume(L),g):w1(L)?(o=h,E(L)):(e.consume(L),h)}function g(L){return L===93?(e.consume(L),y):h(L)}function y(L){return L===62?I(L):L===93?(e.consume(L),y):h(L)}function V(L){return L===null||L===62?I(L):w1(L)?(o=V,E(L)):(e.consume(L),V)}function x(L){return L===null?r(L):L===63?(e.consume(L),H):w1(L)?(o=x,E(L)):(e.consume(L),x)}function H(L){return L===62?I(L):x(L)}function M(L){return Q3(L)?(e.consume(L),w):r(L)}function w(L){return L===45||f3(L)?(e.consume(L),w):P(L)}function P(L){return w1(L)?(o=P,E(L)):r2(L)?(e.consume(L),P):I(L)}function N(L){return L===45||f3(L)?(e.consume(L),N):L===47||L===62||k2(L)?O(L):r(L)}function O(L){return L===47?(e.consume(L),I):L===58||L===95||Q3(L)?(e.consume(L),A):w1(L)?(o=O,E(L)):r2(L)?(e.consume(L),O):I(L)}function A(L){return L===45||L===46||L===58||L===95||f3(L)?(e.consume(L),A):$(L)}function $(L){return L===61?(e.consume(L),_):w1(L)?(o=$,E(L)):r2(L)?(e.consume(L),$):O(L)}function _(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),a=L,D):w1(L)?(o=_,E(L)):r2(L)?(e.consume(L),_):(e.consume(L),a=void 0,R)}function D(L){return L===a?(e.consume(L),k):L===null?r(L):w1(L)?(o=D,E(L)):(e.consume(L),D)}function k(L){return L===62||L===47||k2(L)?O(L):r(L)}function R(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===62||k2(L)?O(L):(e.consume(L),R)}function E(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),W1(e,B,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function B(L){return e.enter("htmlTextData"),o(L)}function I(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}}const su={name:"labelEnd",tokenize:AK,resolveTo:OK,resolveAll:_K},kK={tokenize:EK},PK={tokenize:$K},NK={tokenize:TK};function _K(e){let t=-1,r;for(;++t-1&&(i[0]=i[0].slice(n)),c>0&&i.push(e[a].slice(0,c))),i}function oX(e,t){let r=-1;const n=[];let a;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCharCode(r)}const HX=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bx(e){return e.replace(HX,VX)}function VX(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),c=a===120||a===88;return Ix(r.slice(c?2:1),c?16:10)}return ou(r)||e}const jx={}.hasOwnProperty,bX=function(e,t,r){return typeof t!="string"&&(r=t,t=void 0),MX(r)(CX(zX(r).document().write(yX()(e,t,!0))))};function MX(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(G),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(j),blockQuote:o(i1),characterEscape:O,characterReference:O,codeFenced:o(f1),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(f1,s),codeText:o(x1,s),codeTextData:O,data:O,codeFlowValue:O,definition:o(M1),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(T),hardBreakEscape:o(W),hardBreakTrailing:o(W),htmlFlow:o(Y,s),htmlFlowData:O,htmlText:o(Y,s),htmlTextData:O,image:o(J),label:s,link:o(G),listItem:o(C1),listItemValue:m,listOrdered:o(e1,p),listUnordered:o(e1),paragraph:o(k1),reference:h1,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(j),strong:o(A1),thematicBreak:o(B1)},exit:{atxHeading:f(),atxHeadingSequence:M,autolink:f(),autolinkEmail:V1,autolinkProtocol:l1,blockQuote:f(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:c1,characterReferenceMarkerNumeric:c1,characterReferenceValue:H1,codeFenced:f(g),codeFencedFence:h,codeFencedFenceInfo:v,codeFencedFenceMeta:C,codeFlowValue:A,codeIndented:f(y),codeText:f(R),codeTextData:A,data:A,definition:f(),definitionDestinationString:H,definitionLabelString:V,definitionTitleString:x,emphasis:f(),hardBreakEscape:f(_),hardBreakTrailing:f(_),htmlFlow:f(D),htmlFlowData:A,htmlText:f(k),htmlTextData:A,image:f(B),label:L,labelText:I,lineEnding:$,link:f(E),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:K,resourceDestinationString:S,resourceTitleString:Z,resource:n1,setextHeading:f(N),setextHeadingLineSequence:P,setextHeadingText:w,strong:f(),thematicBreak:f()}};Wx(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(U){let q={type:"root",children:[]};const a1={stack:[q],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:d,setData:c,getData:i},r1=[];let v1=-1;for(;++v10){const Y1=a1.tokenStack[a1.tokenStack.length-1];(Y1[1]||Xh).call(a1,void 0,Y1[0])}for(q.position={start:b6(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:b6(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},v1=-1;++v1{const n=this.data("settings");return bX(r,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function LX(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function SX(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:` +`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&a)continue;i=" ";break}default:i=String.fromCharCode(c)}a=c===-2,n.push(i)}return n.join("")}const sX={[42]:g3,[43]:g3,[45]:g3,[48]:g3,[49]:g3,[50]:g3,[51]:g3,[52]:g3,[53]:g3,[54]:g3,[55]:g3,[56]:g3,[57]:g3,[62]:_x},lX={[91]:dK},fX={[-2]:Si,[-1]:Si,[32]:Si},uX={[35]:zK,[42]:rr,[45]:[Zh,rr],[60]:VK,[61]:Zh,[95]:rr,[96]:Gh,[126]:Gh},dX={[38]:Ax,[92]:Ox},pX={[-5]:ki,[-4]:ki,[-3]:ki,[33]:DK,[38]:Ax,[42]:el,[60]:[WZ,LK],[91]:FK,[92]:[vK,Ox],[93]:su,[95]:el,[96]:rK},mX={null:[el,tX]},hX={null:[42,95]},vX={null:[]},gX=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:hX,contentInitial:lX,disable:vX,document:sX,flow:uX,flowInitial:fX,insideSpan:mX,string:dX,text:pX},Symbol.toStringTag,{value:"Module"}));function zX(e={}){const t=Nx([gX].concat(e.extensions||[])),r={defined:[],lazy:{},constructs:t,content:n(TZ),document:n(RZ),flow:n(JK),string:n(rX),text:n(nX)};return r;function n(a){return c;function c(i){return cX(r,a,i)}}}const Kh=/[\0\t\n\r]/g;function yX(){let e=1,t="",r=!0,n;return a;function a(c,i,o){const s=[];let l,f,u,d,p;for(c=t+c.toString(i),u=0,t="",r&&(c.charCodeAt(0)===65279&&u++,r=void 0);u13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCharCode(r)}const HX=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bx(e){return e.replace(HX,VX)}function VX(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),c=a===120||a===88;return Ix(r.slice(c?2:1),c?16:10)}return ou(r)||e}const jx={}.hasOwnProperty,bX=function(e,t,r){return typeof t!="string"&&(r=t,t=void 0),MX(r)(CX(zX(r).document().write(yX()(e,t,!0))))};function MX(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(G),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(j),blockQuote:o(i1),characterEscape:O,characterReference:O,codeFenced:o(f1),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(f1,s),codeText:o(x1,s),codeTextData:O,data:O,codeFlowValue:O,definition:o(M1),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(T),hardBreakEscape:o(W),hardBreakTrailing:o(W),htmlFlow:o(Y,s),htmlFlowData:O,htmlText:o(Y,s),htmlTextData:O,image:o(J),label:s,link:o(G),listItem:o(C1),listItemValue:m,listOrdered:o(e1,p),listUnordered:o(e1),paragraph:o(k1),reference:h1,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(j),strong:o(A1),thematicBreak:o(B1)},exit:{atxHeading:f(),atxHeadingSequence:M,autolink:f(),autolinkEmail:V1,autolinkProtocol:l1,blockQuote:f(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:c1,characterReferenceMarkerNumeric:c1,characterReferenceValue:H1,codeFenced:f(g),codeFencedFence:h,codeFencedFenceInfo:v,codeFencedFenceMeta:C,codeFlowValue:A,codeIndented:f(y),codeText:f(R),codeTextData:A,data:A,definition:f(),definitionDestinationString:H,definitionLabelString:V,definitionTitleString:x,emphasis:f(),hardBreakEscape:f(_),hardBreakTrailing:f(_),htmlFlow:f(D),htmlFlowData:A,htmlText:f(k),htmlTextData:A,image:f(B),label:L,labelText:I,lineEnding:$,link:f(E),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:K,resourceDestinationString:S,resourceTitleString:Z,resource:n1,setextHeading:f(N),setextHeadingLineSequence:P,setextHeadingText:w,strong:f(),thematicBreak:f()}};Wx(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(U){let q={type:"root",children:[]};const a1={stack:[q],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:d,setData:c,getData:i},r1=[];let v1=-1;for(;++v10){const Y1=a1.tokenStack[a1.tokenStack.length-1];(Y1[1]||Xh).call(a1,void 0,Y1[0])}for(q.position={start:b6(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:b6(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},v1=-1;++v1{const n=this.data("settings");return bX(r,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function LX(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function SX(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:` `}]}function kX(e,t){const r=t.value?t.value+` `:"",n=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,a={};n&&(a.className=["language-"+n]);let c={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(c.data={meta:t.meta}),e.patch(t,c),c=e.applyData(t,c),c={type:"element",tagName:"pre",properties:{},children:[c]},e.patch(t,c),c}function PX(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NX(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function h8(e){const t=[];let r=-1,n=0,a=0;for(;++r55295&&c<57344){const o=e.charCodeAt(r+1);c<56320&&o>56319&&o<57344?(i=String.fromCharCode(c,o),a=1):i="�"}else i=String.fromCharCode(c);i&&(t.push(e.slice(n,r),encodeURIComponent(i)),n=r+a+1,i=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}function Ux(e,t){const r=String(t.identifier).toUpperCase(),n=h8(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let c;a===-1?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,c=e.footnoteOrder.length):(e.footnoteCounts[r]++,c=a+1);const i=e.footnoteCounts[r],o={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+n,id:e.clobberPrefix+"fnref-"+n+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,o);const s={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,s),e.applyData(t,s)}function _X(e,t){const r=e.footnoteById;let n=1;for(;n in r;)n++;const a=String(n);return r[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},Ux(e,{type:"footnoteReference",identifier:a,position:t.position})}function OX(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function AX(e,t){if(e.dangerous){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}return null}function qx(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+n};const a=e.all(t),c=a[0];c&&c.type==="text"?c.value="["+c.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&i.type==="text"?i.value+=n:a.push({type:"text",value:n}),a}function EX(e,t){const r=e.definition(t.identifier);if(!r)return qx(e,t);const n={src:h8(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(n.title=r.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function $X(e,t){const r={src:h8(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function TX(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function DX(e,t){const r=e.definition(t.identifier);if(!r)return qx(e,t);const n={href:h8(r.url||"")};r.title!==null&&r.title!==void 0&&(n.title=r.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function RX(e,t){const r={href:h8(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FX(e,t,r){const n=e.all(t),a=r?IX(r):Gx(t),c={},i=[];if(typeof t.checked=="boolean"){const f=n[0];let u;f&&f.type==="element"&&f.tagName==="p"?u=f:(u={type:"element",tagName:"p",properties:{},children:[]},n.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let o=-1;for(;++o