diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json index 2df5235c..1926f98e 100644 --- a/.obsidian/plugins/obsidian-activity-history/data.json +++ b/.obsidian/plugins/obsidian-activity-history/data.json @@ -12,8 +12,8 @@ "checkpointList": [ { "path": "/", - "date": "2023-03-23", - "size": 14124674 + "date": "2023-03-26", + "size": 14150024 } ], "activityHistory": [ @@ -1770,7 +1770,19 @@ }, { "date": "2023-03-23", - "value": 11381 + "value": 11391 + }, + { + "date": "2023-03-24", + "value": 22845 + }, + { + "date": "2023-03-25", + "value": 3753 + }, + { + "date": "2023-03-26", + "value": 1412 } ] } diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json index 28d8cf4f..ba7a10e7 100644 --- a/.obsidian/plugins/obsidian-commits/data.json +++ b/.obsidian/plugins/obsidian-commits/data.json @@ -1525,7 +1525,7 @@ "links": 18 }, "05.02 Networks/Configuring UFW.md": { - "size": 5187, + "size": 5831, "tags": 2, "links": 7 }, @@ -1540,7 +1540,7 @@ "links": 13 }, "05.02 Networks/Server Alias.md": { - "size": 6817, + "size": 7529, "tags": 6, "links": 11 }, @@ -3000,7 +3000,7 @@ "links": 1 }, "03.02 Travels/@@Travels.md": { - "size": 1653, + "size": 1919, "tags": 2, "links": 13 }, @@ -3016,7 +3016,7 @@ }, "03.02 Travels/Arles.md": { "size": 1696, - "tags": 5, + "tags": 6, "links": 1 }, "03.02 Travels/Marseille.md": { @@ -7435,7 +7435,7 @@ "links": 4 }, "00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md": { - "size": 261, + "size": 332, "tags": 0, "links": 5 }, @@ -8599,11 +8599,6 @@ "tags": 0, "links": 2 }, - "00.01 Admin/Calendars/Events/2023-09-08 Trip to NYC.md": { - "size": 213, - "tags": 0, - "links": 4 - }, "00.01 Admin/Calendars/Events/2023-02-14 Bayern - PSG.md": { "size": 191, "tags": 0, @@ -8812,7 +8807,7 @@ "00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md": { "size": 27014, "tags": 3, - "links": 1 + "links": 2 }, "00.03 News/How a civil war erupted at Fox News after the 2020 election.md": { "size": 10467, @@ -8827,7 +8822,7 @@ "00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md": { "size": 29531, "tags": 3, - "links": 1 + "links": 2 }, "03.04 Cinematheque/John Wick (2014).md": { "size": 2042, @@ -8842,7 +8837,7 @@ "00.03 News/The Silicon Valley Bank Contagion Is Just Beginning.md": { "size": 7608, "tags": 5, - "links": 1 + "links": 2 }, "00.03 News/Bull elephants – their importance as individuals in elephant societies - Africa Geographic.md": { "size": 10672, @@ -8984,11 +8979,6 @@ "tags": 3, "links": 2 }, - "00.03 News/How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times.md": { - "size": 46429, - "tags": 5, - "links": 1 - }, "00.03 News/The Brilliant Inventor Who Made Two of History’s Biggest Mistakes.md": { "size": 52286, "tags": 3, @@ -9033,14 +9023,54 @@ "size": 3274, "tags": 1, "links": 2 + }, + "01.05 Done/2023-09-08 Trip to NYC.md": { + "size": 213, + "tags": 0, + "links": 4 + }, + "00.01 Admin/Calendars/2023-03-24.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.03 News/The Limits and Wonders of John Wick’s Last Fight.md": { + "size": 12024, + "tags": 3, + "links": 1 + }, + "00.03 News/Last Stand of the Hot Dog King.md": { + "size": 8583, + "tags": 4, + "links": 2 + }, + "00.03 News/How an FBI agent stained an NCAA basketball corruption probe.md": { + "size": 46429, + "tags": 5, + "links": 2 + }, + "00.01 Admin/Calendars/2023-03-25.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "02.02 Paris/Narro.md": { + "size": 1606, + "tags": 2, + "links": 2 + }, + "00.01 Admin/Calendars/2023-03-26.md": { + "size": 1412, + "tags": 0, + "links": 4 } }, "commitTypes": { "/": { - "Refactor": 2755, - "Create": 1611, - "Link": 3904, - "Expand": 1580 + "Refactor": 2760, + "Create": 1617, + "Link": 3919, + "Expand": 1585 } }, "dailyCommits": { @@ -9051,20 +9081,20 @@ "3": 11, "4": 17, "5": 13, - "6": 63, - "7": 602, - "8": 792, - "9": 688, - "10": 516, + "6": 64, + "7": 616, + "8": 797, + "9": 690, + "10": 517, "11": 401, - "12": 365, + "12": 370, "13": 420, "14": 414, "15": 417, - "16": 530, + "16": 531, "17": 565, - "18": 758, - "19": 481, + "18": 759, + "19": 482, "20": 445, "21": 449, "22": 439, @@ -9076,15 +9106,20 @@ "Mon": 2259, "Tue": 1253, "Wed": 1261, - "Thu": 849, - "Fri": 913, + "Thu": 850, + "Fri": 928, "Sat": 0, - "Sun": 3315 + "Sun": 3330 } }, "recentCommits": { "/": { "Expanded": [ + " @@Travels ", + " Server Alias ", + " 2023-03-26 Mallorca ", + " Narro ", + " Configuring UFW ", " Zaalouk ", " Batman Begins (2005) ", " The Dark Knight Rises (2012) ", @@ -9130,14 +9165,15 @@ " Health ", " Dr Awad Abuawad ", " The Power And The Glory ", - " 2023-03-06 Médecin ", - " 2023-03-04 Diner Baur au Lac ", - " 2023-03-05 ", - " 2023-03-04 Diner Baur au Lac ", - " Entertainment ", - " Entertainment " + " 2023-03-06 Médecin " ], "Created": [ + " 2023-03-26 ", + " Untitled ", + " 2023-03-25 ", + " Last Stand of the Hot Dog King ", + " The Limits and Wonders of John Wick’s Last Fight ", + " 2023-03-24 ", " Taktouka — My Moroccan Food ", " Zaalouk - Moroccan Aubergine Salad — My Moroccan Food ", " Esterno notte (2022) ", @@ -9182,15 +9218,14 @@ " John Wick (2014) ", " An Icelandic Town Goes All Out to Save Baby Puffins ", " The Untold Story Of Notorious Influencer Andrew Tate ", - " How a civil war erupted at Fox News after the 2020 election ", - " Mel Brooks Isn’t Done Punching Up the History of the World ", - " 2023-03-12 ", - " Untitled ", - " The One Big Question Bernie Sanders Won’t Answer ", - " 2023-03-11 ", - " Red Army (2014) " + " How a civil war erupted at Fox News after the 2020 election " ], "Renamed": [ + " Narro ", + " How an FBI agent stained an NCAA basketball corruption probe ", + " Last Stand of the Hot Dog King ", + " The Limits and Wonders of John Wick’s Last Fight ", + " 2023-09-08 Trip to NYC ", " Brown Butter Farro with Mushrooms & Burrata ", " Brown Butter Farro with Mushrooms & Burrata - T Dish ", " Taktouka ", @@ -9236,14 +9271,13 @@ " @Email template ", " @Email generation ", " Email template ", - " Email generation ", - " Humans Started Riding Horses 5,000 Years Ago, New Evidence Suggests ", - " Servers - notes ", - " 2021-12-31 Quits smoking ", - " 2020-05-06 Checkup ", - " 2021-05-05 Checkup " + " Email generation " ], "Tagged": [ + " Arles ", + " Narro ", + " The Limits and Wonders of John Wick’s Last Fight ", + " Last Stand of the Hot Dog King ", " Zaalouk ", " Adam Sandler doesn’t need your respect. But he’s getting it anyway. ", " How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times ", @@ -9290,11 +9324,7 @@ " Checkup ", " Health ", " Entertainment ", - " Sport ", - " US-China 1MDB Scandal Pits FBI Against Former Fugee Pras Michel ", - " Sanctuary ", - " How the Biggest Fraud in German History Unravelled ", - " EVT Will Save Millions of Lives From Stroke. Eventually. " + " Sport " ], "Refactored": [ " Korean Barbecue-Style Meatballs Recipe ", @@ -9403,6 +9433,17 @@ " Mail Import " ], "Linked": [ + " 2023-03-26 ", + " Narro ", + " Mel Brooks Isn’t Done Punching Up the History of the World ", + " 2023-03-25 ", + " An Icelandic Town Goes All Out to Save Baby Puffins ", + " How an FBI agent stained an NCAA basketball corruption probe ", + " Last Stand of the Hot Dog King ", + " The Limits and Wonders of John Wick’s Last Fight ", + " Last Stand of the Hot Dog King ", + " 2023-03-24 ", + " The Silicon Valley Bank Contagion Is Just Beginning ", " Taktouka ", " Zaalouk ", " 2023-03-22 ", @@ -9442,18 +9483,7 @@ " 2023-03-20 ", " Batman (1989) ", " Batman Robin (1997) ", - " Batman Returns (1992) ", - " Batman Forever (1995) ", - " Batman Begins (2005) ", - " 2023-03-20 ", - " 2023-03-19 ", - " 2023-03-18 ", - " 2023-03-19 ", - " Is Fox News Really Doomed ", - " Boulangerie Sain ", - " 2023-03-11 England - France ", - " 2023-03-18 France - Wales ", - " Striking French workers dispute that they want a right to ‘laziness’ " + " Batman Returns (1992) " ], "Removed Tags from": [ " ‘Incredibly intelligent, highly elusive’ US faces new threat from Canadian ‘super pig’ ", diff --git a/.obsidian/plugins/obsidian-dice-roller/main.js b/.obsidian/plugins/obsidian-dice-roller/main.js index 0d71efb2..bd84f1c0 100644 --- a/.obsidian/plugins/obsidian-dice-roller/main.js +++ b/.obsidian/plugins/obsidian-dice-roller/main.js @@ -3,10 +3,10 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ -var Po=Object.create;var Kt=Object.defineProperty;var Io=Object.getOwnPropertyDescriptor;var ko=Object.getOwnPropertyNames;var Uo=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty;var Pi=n=>Kt(n,"__esModule",{value:!0});var b0=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Go=(n,e)=>{Pi(n);for(var t in e)Kt(n,t,{get:e[t],enumerable:!0})},qo=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ko(e))!Oo.call(n,i)&&i!=="default"&&Kt(n,i,{get:()=>e[i],enumerable:!(t=Io(e,i))||t.enumerable});return n},w2=n=>qo(Pi(Kt(n!=null?Po(Uo(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Ii=b0(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});require("obsidian");var Wo=n=>{var e;return n?(e=n.plugins.plugins.dataview)===null||e===void 0?void 0:e.api:window.DataviewAPI},jo=n=>n.plugins.enabledPlugins.has("dataview");Jt.getAPI=Wo;Jt.isPluginEnabled=jo});var ya=b0((s6,bt)=>{(function(n){var e=typeof s6=="object"&&s6,t=typeof bt=="object"&&bt&&bt.exports==e&&bt,i=typeof global=="object"&&global;(i.global===i||i.window===i)&&(n=i);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/[\x01-\x7F]/g,s=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,o=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},l=/["&'<>`]/g,u={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,v={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` -`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},g={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},x={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},m=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],d=String.fromCharCode,A={},b=A.hasOwnProperty,C=function(N,U){return b.call(N,U)},E=function(N,U){for(var Z=-1,O=N.length;++Z=55296&&N<=57343||N>1114111?(U&&M("character reference outside the permissible Unicode range"),"\uFFFD"):C(x,N)?(U&&M("disallowed character reference"),x[N]):(U&&E(m,N)&&M("disallowed character reference"),N>65535&&(N-=65536,Z+=d(N>>>10&1023|55296),N=56320|N&1023),Z+=d(N),Z)},P=function(N){return"&#x"+N.toString(16).toUpperCase()+";"},F=function(N){return"&#"+N+";"},M=function(N){throw Error("Parse error: "+N)},D=function(N,U){U=T(U,D.options);var Z=U.strict;Z&&h.test(N)&&M("forbidden code point");var O=U.encodeEverything,W=U.useNamedReferences,X=U.allowUnsafeSymbols,Q=U.decimal?F:P,a1=function(B){return Q(B.charCodeAt(0))};return O?(N=N.replace(r,function(B){return W&&C(c,B)?"&"+c[B]+";":a1(B)}),W&&(N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),W&&(N=N.replace(o,function(B){return"&"+c[B]+";"}))):W?(X||(N=N.replace(l,function(B){return"&"+c[B]+";"})),N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),N=N.replace(o,function(B){return"&"+c[B]+";"})):X||(N=N.replace(l,a1)),N.replace(a,function(B){var M1=B.charCodeAt(0),u1=B.charCodeAt(1),v1=(M1-55296)*1024+u1-56320+65536;return Q(v1)}).replace(s,a1)};D.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var z=function(N,U){U=T(U,z.options);var Z=U.strict;return Z&&f.test(N)&&M("malformed character reference"),N.replace(p,function(O,W,X,Q,a1,B,M1,u1,v1){var n1,T1,A1,C1,u2,J1;return W?(u2=W,v[u2]):X?(u2=X,J1=Q,J1&&U.isAttributeValue?(Z&&J1=="="&&M("`&` did not start a character reference"),O):(Z&&M("named character reference was not terminated by a semicolon"),g[u2]+(J1||""))):a1?(A1=a1,T1=B,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(A1,10),_(n1,Z)):M1?(C1=M1,T1=u1,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(C1,16),_(n1,Z)):(Z&&M("named character reference was not terminated by a semicolon"),O)})};z.options={isAttributeValue:!1,strict:!1};var H=function(N){return N.replace(l,function(U){return u[U]})},V={version:"1.2.0",encode:D,decode:z,escape:H,unescape:z};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return V});else if(e&&!e.nodeType)if(t)t.exports=V;else for(var L in V)C(V,L)&&(e[L]=V[L]);else n.he=V})(s6)});var _o=b0((So,g0)=>{(function(n,e){typeof define=="function"&&define.amd?define([],e):typeof g0=="object"&&g0.exports?g0.exports=e():n.moo=e()})(So,function(){"use strict";var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=typeof new RegExp().sticky=="boolean";function i(_){return _&&e.call(_)==="[object RegExp]"}function a(_){return _&&typeof _=="object"&&!i(_)&&!Array.isArray(_)}function r(_){return _.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(_){var P=new RegExp("|"+_);return P.exec("").length-1}function o(_){return"("+_+")"}function c(_){if(!_.length)return"(?!)";var P=_.map(function(F){return"(?:"+F+")"}).join("|");return"(?:"+P+")"}function l(_){if(typeof _=="string")return"(?:"+r(_)+")";if(i(_)){if(_.ignoreCase)throw new Error("RegExp /i flag not allowed");if(_.global)throw new Error("RegExp /g flag is implied");if(_.sticky)throw new Error("RegExp /y flag is implied");if(_.multiline)throw new Error("RegExp /m flag is implied");return _.source}else throw new Error("Not a pattern: "+_)}function u(_){for(var P=Object.getOwnPropertyNames(_),F=[],M=0;M0)throw new Error("RegExp has capture groups: "+Q+` +var Io=Object.create;var J4=Object.defineProperty;var ko=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Oo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Pi=n=>J4(n,"__esModule",{value:!0});var y0=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),qo=(n,e)=>{Pi(n);for(var t in e)J4(n,t,{get:e[t],enumerable:!0})},Wo=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Uo(e))!Go.call(n,i)&&i!=="default"&&J4(n,i,{get:()=>e[i],enumerable:!(t=ko(e,i))||t.enumerable});return n},w2=n=>Wo(Pi(J4(n!=null?Io(Oo(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Ii=y0(Q4=>{"use strict";Object.defineProperty(Q4,"__esModule",{value:!0});require("obsidian");var jo=n=>{var e;return n?(e=n.plugins.plugins.dataview)===null||e===void 0?void 0:e.api:window.DataviewAPI},Xo=n=>n.plugins.enabledPlugins.has("dataview");Q4.getAPI=jo;Q4.isPluginEnabled=Xo});var ya=y0((o6,y4)=>{(function(n){var e=typeof o6=="object"&&o6,t=typeof y4=="object"&&y4&&y4.exports==e&&y4,i=typeof global=="object"&&global;(i.global===i||i.window===i)&&(n=i);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/[\x01-\x7F]/g,s=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,o=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},l=/["&'<>`]/g,u={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,v={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},g={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},x={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},p=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],d=String.fromCharCode,A={},b=A.hasOwnProperty,C=function(N,U){return b.call(N,U)},E=function(N,U){for(var Z=-1,O=N.length;++Z=55296&&N<=57343||N>1114111?(U&&M("character reference outside the permissible Unicode range"),"\uFFFD"):C(x,N)?(U&&M("disallowed character reference"),x[N]):(U&&E(p,N)&&M("disallowed character reference"),N>65535&&(N-=65536,Z+=d(N>>>10&1023|55296),N=56320|N&1023),Z+=d(N),Z)},P=function(N){return"&#x"+N.toString(16).toUpperCase()+";"},F=function(N){return"&#"+N+";"},M=function(N){throw Error("Parse error: "+N)},D=function(N,U){U=T(U,D.options);var Z=U.strict;Z&&h.test(N)&&M("forbidden code point");var O=U.encodeEverything,W=U.useNamedReferences,X=U.allowUnsafeSymbols,Q=U.decimal?F:P,a1=function(B){return Q(B.charCodeAt(0))};return O?(N=N.replace(r,function(B){return W&&C(c,B)?"&"+c[B]+";":a1(B)}),W&&(N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),W&&(N=N.replace(o,function(B){return"&"+c[B]+";"}))):W?(X||(N=N.replace(l,function(B){return"&"+c[B]+";"})),N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),N=N.replace(o,function(B){return"&"+c[B]+";"})):X||(N=N.replace(l,a1)),N.replace(a,function(B){var M1=B.charCodeAt(0),u1=B.charCodeAt(1),v1=(M1-55296)*1024+u1-56320+65536;return Q(v1)}).replace(s,a1)};D.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var z=function(N,U){U=T(U,z.options);var Z=U.strict;return Z&&f.test(N)&&M("malformed character reference"),N.replace(m,function(O,W,X,Q,a1,B,M1,u1,v1){var n1,T1,A1,C1,u2,J1;return W?(u2=W,v[u2]):X?(u2=X,J1=Q,J1&&U.isAttributeValue?(Z&&J1=="="&&M("`&` did not start a character reference"),O):(Z&&M("named character reference was not terminated by a semicolon"),g[u2]+(J1||""))):a1?(A1=a1,T1=B,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(A1,10),_(n1,Z)):M1?(C1=M1,T1=u1,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(C1,16),_(n1,Z)):(Z&&M("named character reference was not terminated by a semicolon"),O)})};z.options={isAttributeValue:!1,strict:!1};var H=function(N){return N.replace(l,function(U){return u[U]})},V={version:"1.2.0",encode:D,decode:z,escape:H,unescape:z};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return V});else if(e&&!e.nodeType)if(t)t.exports=V;else for(var L in V)C(V,L)&&(e[L]=V[L]);else n.he=V})(o6)});var _o=y0((So,x0)=>{(function(n,e){typeof define=="function"&&define.amd?define([],e):typeof x0=="object"&&x0.exports?x0.exports=e():n.moo=e()})(So,function(){"use strict";var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=typeof new RegExp().sticky=="boolean";function i(_){return _&&e.call(_)==="[object RegExp]"}function a(_){return _&&typeof _=="object"&&!i(_)&&!Array.isArray(_)}function r(_){return _.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(_){var P=new RegExp("|"+_);return P.exec("").length-1}function o(_){return"("+_+")"}function c(_){if(!_.length)return"(?!)";var P=_.map(function(F){return"(?:"+F+")"}).join("|");return"(?:"+P+")"}function l(_){if(typeof _=="string")return"(?:"+r(_)+")";if(i(_)){if(_.ignoreCase)throw new Error("RegExp /i flag not allowed");if(_.global)throw new Error("RegExp /g flag is implied");if(_.sticky)throw new Error("RegExp /y flag is implied");if(_.multiline)throw new Error("RegExp /m flag is implied");return _.source}else throw new Error("Not a pattern: "+_)}function u(_){for(var P=Object.getOwnPropertyNames(_),F=[],M=0;M0)throw new Error("RegExp has capture groups: "+Q+` Use (?: \u2026 ) instead`);if(!N.lineBreaks&&Q.test(` -`))throw new Error("Rule should declare lineBreaks: "+Q);V.push(o(X))}}var B=F&&F.fallback,M1=t&&!B?"ym":"gm",u1=t||B?"":"|";z===!0&&(M1+="u");var v1=new RegExp(c(V)+u1,M1);return{regexp:v1,groups:H,fast:M,error:F||v}}function x(_){var P=g(p(_));return new b({start:P},"start")}function m(_,P,F){var M=_&&(_.push||_.next);if(M&&!F[M])throw new Error("Missing state '"+M+"' (in token '"+_.defaultType+"' of state '"+P+"')");if(_&&_.pop&&+_.pop!=1)throw new Error("pop must be 1 (in token '"+_.defaultType+"' of state '"+P+"')")}function d(_,P){var F=_.$all?p(_.$all):[];delete _.$all;var M=Object.getOwnPropertyNames(_);P||(P=M[0]);for(var D=Object.create(null),z=0;zf6,default:()=>Fi});var Z1=w2(require("obsidian")),Vo=w2(Ii());var ki={prefix:"fas",iconName:"dice",icon:[640,512,[],"f522","M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]};var Ui={prefix:"far",iconName:"copy",icon:[448,512,[],"f0c5","M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"]};function gt(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gt=function(e){return typeof e}:gt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(n)}function Xo(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Oi(n,e){for(var t=0;t-1;a--){var r=t[a],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(i=r)}return C2.head.insertBefore(e,i),n}}var vc="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function r6(){for(var n=12,e="";n-- >0;)e+=vc[Math.random()*62|0];return e}function sa(n){return"".concat(n).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function gc(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,'="').concat(sa(n[t]),'" ')},"").trim()}function oa(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,": ").concat(n[t],";")},"")}function ca(n){return n.size!==F4.size||n.x!==F4.x||n.y!==F4.y||n.rotate!==F4.rotate||n.flipX||n.flipY}function la(n){var e=n.transform,t=n.containerWidth,i=n.iconWidth,a={transform:"translate(".concat(t/2," 256)")},r="translate(".concat(e.x*32,", ").concat(e.y*32,") "),s="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),o="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(r," ").concat(s," ").concat(o)},l={transform:"translate(".concat(i/2*-1," -256)")};return{outer:a,inner:c,path:l}}var E0={x:0,y:0,width:"100%",height:"100%"};function ua(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.attributes&&(n.attributes.fill||e)&&(n.attributes.fill="black"),n}function xc(n){return n.tag==="g"?n.children:[n]}function Mc(n){var e=n.children,t=n.attributes,i=n.main,a=n.mask,r=n.maskId,s=n.transform,o=i.width,c=i.icon,l=a.width,u=a.icon,f=la({transform:s,containerWidth:l,iconWidth:o}),h={tag:"rect",attributes:F1({},E0,{fill:"white"})},p=c.children?{children:c.children.map(ua)}:{},v={tag:"g",attributes:F1({},f.inner),children:[ua(F1({tag:c.tag,attributes:F1({},c.attributes,f.path)},p))]},g={tag:"g",attributes:F1({},f.outer),children:[v]},x="mask-".concat(r||r6()),m="clip-".concat(r||r6()),d={tag:"mask",attributes:F1({},E0,{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},A={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:xc(u)},d]};return e.push(A,{tag:"rect",attributes:F1({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(x,")")},E0)}),{children:e,attributes:t}}function bc(n){var e=n.children,t=n.attributes,i=n.main,a=n.transform,r=n.styles,s=oa(r);if(s.length>0&&(t.style=s),ca(a)){var o=la({transform:a,containerWidth:i.width,iconWidth:i.width});e.push({tag:"g",attributes:F1({},o.outer),children:[{tag:"g",attributes:F1({},o.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:F1({},i.icon.attributes,o.path)}]}]})}else e.push(i.icon);return{children:e,attributes:t}}function yc(n){var e=n.children,t=n.main,i=n.mask,a=n.attributes,r=n.styles,s=n.transform;if(ca(s)&&t.found&&!i.found){var o=t.width,c=t.height,l={x:o/c/2,y:.5};a.style=oa(F1({},r,{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:a,children:e}]}function Cc(n){var e=n.prefix,t=n.iconName,i=n.children,a=n.attributes,r=n.symbol,s=r===!0?"".concat(e,"-").concat(V2.familyPrefix,"-").concat(t):r;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:F1({},a,{id:s}),children:i}]}]}function zc(n){var e=n.icons,t=e.main,i=e.mask,a=n.prefix,r=n.iconName,s=n.transform,o=n.symbol,c=n.title,l=n.maskId,u=n.titleId,f=n.extra,h=n.watchable,p=h===void 0?!1:h,v=i.found?i:t,g=v.width,x=v.height,m=a==="fak",d=m?"":"fa-w-".concat(Math.ceil(g/x*16)),A=[V2.replacementClass,r?"".concat(V2.familyPrefix,"-").concat(r):"",d].filter(function(F){return f.classes.indexOf(F)===-1}).filter(function(F){return F!==""||!!F}).concat(f.classes).join(" "),b={children:[],attributes:F1({},f.attributes,{"data-prefix":a,"data-icon":r,class:A,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(x)})},C=m&&!~f.classes.indexOf("fa-fw")?{width:"".concat(g/x*16*.0625,"em")}:{};p&&(b.attributes[tc]=""),c&&b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(u||r6())},children:[c]});var E=F1({},b,{prefix:a,iconName:r,main:t,mask:i,maskId:l,transform:s,symbol:o,styles:F1({},C,f.styles)}),T=i.found&&t.found?Mc(E):bc(E),_=T.children,P=T.attributes;return E.children=_,E.attributes=P,o?Cc(E):yc(E)}var ha=function(){},bh=V2.measurePerformance&&e6&&e6.mark&&e6.measure?e6:{mark:ha,measure:ha};var Ac=function(e,t){return function(i,a,r,s){return e.call(t,i,a,r,s)}},L0=function(e,t,i,a){var r=Object.keys(e),s=r.length,o=a!==void 0?Ac(t,a):t,c,l,u;for(i===void 0?(c=1,u=e[r[0]]):(c=0,u=i);c2&&arguments[2]!==void 0?arguments[2]:{},i=t.skipHooks,a=i===void 0?!1:i,r=Object.keys(e).reduce(function(s,o){var c=e[o],l=!!c.icon;return l?s[c.iconName]=c.icon:s[o]=c,s},{});typeof de.hooks.addPack=="function"&&!a?de.hooks.addPack(n,r):de.styles[n]=F1({},de.styles[n]||{},r),n==="fas"&&fa("fa",e)}var da=de.styles,wc=de.shims,Sc={},_c={},Ec={},pa=function(){var e=function(a){return L0(da,function(r,s,o){return r[o]=L0(s,a,{}),r},{})};Sc=e(function(i,a,r){return a[3]&&(i[a[3]]=r),i}),_c=e(function(i,a,r){var s=a[2];return i[r]=r,s.forEach(function(o){i[o]=r}),i});var t="far"in da;Ec=L0(wc,function(i,a){var r=a[0],s=a[1],o=a[2];return s==="far"&&!t&&(s="fas"),i[r]={prefix:s,iconName:o},i},{})};pa();var yh=de.styles;function ma(n,e,t){if(n&&n[e]&&n[e][t])return{prefix:e,iconName:t,icon:n[e][t]}}function va(n){var e=n.tag,t=n.attributes,i=t===void 0?{}:t,a=n.children,r=a===void 0?[]:a;return typeof n=="string"?sa(n):"<".concat(e," ").concat(gc(i),">").concat(r.map(va).join(""),"")}function D0(n){this.name="MissingIcon",this.message=n||"Icon unavailable",this.stack=new Error().stack}D0.prototype=Object.create(Error.prototype);D0.prototype.constructor=D0;var n6={fill:"currentColor"},ga={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Ch={tag:"path",attributes:F1({},n6,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},T0=F1({},ga,{attributeName:"opacity"}),zh={tag:"circle",attributes:F1({},n6,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:F1({},ga,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:F1({},T0,{values:"1;0;1;1;0;1;"})}]},Ah={tag:"path",attributes:F1({},n6,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:F1({},T0,{values:"1;0;0;0;0;1;"})}]},wh={tag:"path",attributes:F1({},n6,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:F1({},T0,{values:"0;0;1;1;0;0;"})}]};var Sh=de.styles;function xa(n){var e=n[0],t=n[1],i=n.slice(4),a=Gi(i,1),r=a[0],s=null;return Array.isArray(r)?s={tag:"g",attributes:{class:"".concat(V2.familyPrefix,"-").concat(m4.GROUP)},children:[{tag:"path",attributes:{class:"".concat(V2.familyPrefix,"-").concat(m4.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(V2.familyPrefix,"-").concat(m4.PRIMARY),fill:"currentColor",d:r[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:e,height:t,icon:s}}var _h=de.styles;var Lc=`svg:not(:root).svg-inline--fa { +`,P+=" "+Array(_.col).join(" ")+"^",P},b.prototype.clone=function(){return new b(this.states,this.state)},b.prototype.has=function(_){return!0},{compile:x,states:d,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:A}})});qo(exports,{DEFAULT_SETTINGS:()=>d6,default:()=>Fi});var Z1=w2(require("obsidian")),Vo=w2(Ii());var ki={prefix:"fas",iconName:"dice",icon:[640,512,[],"f522","M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]};var Ui={prefix:"far",iconName:"copy",icon:[448,512,[],"f0c5","M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"]};function x4(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x4=function(e){return typeof e}:x4=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x4(n)}function Zo(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Oi(n,e){for(var t=0;t-1;a--){var r=t[a],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(i=r)}return C2.head.insertBefore(e,i),n}}var gc="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function n6(){for(var n=12,e="";n-- >0;)e+=gc[Math.random()*62|0];return e}function sa(n){return"".concat(n).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function xc(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,'="').concat(sa(n[t]),'" ')},"").trim()}function oa(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,": ").concat(n[t],";")},"")}function ca(n){return n.size!==Bt.size||n.x!==Bt.x||n.y!==Bt.y||n.rotate!==Bt.rotate||n.flipX||n.flipY}function la(n){var e=n.transform,t=n.containerWidth,i=n.iconWidth,a={transform:"translate(".concat(t/2," 256)")},r="translate(".concat(e.x*32,", ").concat(e.y*32,") "),s="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),o="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(r," ").concat(s," ").concat(o)},l={transform:"translate(".concat(i/2*-1," -256)")};return{outer:a,inner:c,path:l}}var L0={x:0,y:0,width:"100%",height:"100%"};function ua(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.attributes&&(n.attributes.fill||e)&&(n.attributes.fill="black"),n}function Mc(n){return n.tag==="g"?n.children:[n]}function bc(n){var e=n.children,t=n.attributes,i=n.main,a=n.mask,r=n.maskId,s=n.transform,o=i.width,c=i.icon,l=a.width,u=a.icon,f=la({transform:s,containerWidth:l,iconWidth:o}),h={tag:"rect",attributes:F1({},L0,{fill:"white"})},m=c.children?{children:c.children.map(ua)}:{},v={tag:"g",attributes:F1({},f.inner),children:[ua(F1({tag:c.tag,attributes:F1({},c.attributes,f.path)},m))]},g={tag:"g",attributes:F1({},f.outer),children:[v]},x="mask-".concat(r||n6()),p="clip-".concat(r||n6()),d={tag:"mask",attributes:F1({},L0,{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},A={tag:"defs",children:[{tag:"clipPath",attributes:{id:p},children:Mc(u)},d]};return e.push(A,{tag:"rect",attributes:F1({fill:"currentColor","clip-path":"url(#".concat(p,")"),mask:"url(#".concat(x,")")},L0)}),{children:e,attributes:t}}function yc(n){var e=n.children,t=n.attributes,i=n.main,a=n.transform,r=n.styles,s=oa(r);if(s.length>0&&(t.style=s),ca(a)){var o=la({transform:a,containerWidth:i.width,iconWidth:i.width});e.push({tag:"g",attributes:F1({},o.outer),children:[{tag:"g",attributes:F1({},o.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:F1({},i.icon.attributes,o.path)}]}]})}else e.push(i.icon);return{children:e,attributes:t}}function Cc(n){var e=n.children,t=n.main,i=n.mask,a=n.attributes,r=n.styles,s=n.transform;if(ca(s)&&t.found&&!i.found){var o=t.width,c=t.height,l={x:o/c/2,y:.5};a.style=oa(F1({},r,{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:a,children:e}]}function zc(n){var e=n.prefix,t=n.iconName,i=n.children,a=n.attributes,r=n.symbol,s=r===!0?"".concat(e,"-").concat(V2.familyPrefix,"-").concat(t):r;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:F1({},a,{id:s}),children:i}]}]}function Ac(n){var e=n.icons,t=e.main,i=e.mask,a=n.prefix,r=n.iconName,s=n.transform,o=n.symbol,c=n.title,l=n.maskId,u=n.titleId,f=n.extra,h=n.watchable,m=h===void 0?!1:h,v=i.found?i:t,g=v.width,x=v.height,p=a==="fak",d=p?"":"fa-w-".concat(Math.ceil(g/x*16)),A=[V2.replacementClass,r?"".concat(V2.familyPrefix,"-").concat(r):"",d].filter(function(F){return f.classes.indexOf(F)===-1}).filter(function(F){return F!==""||!!F}).concat(f.classes).join(" "),b={children:[],attributes:F1({},f.attributes,{"data-prefix":a,"data-icon":r,class:A,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(x)})},C=p&&!~f.classes.indexOf("fa-fw")?{width:"".concat(g/x*16*.0625,"em")}:{};m&&(b.attributes[ic]=""),c&&b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(u||n6())},children:[c]});var E=F1({},b,{prefix:a,iconName:r,main:t,mask:i,maskId:l,transform:s,symbol:o,styles:F1({},C,f.styles)}),T=i.found&&t.found?bc(E):yc(E),_=T.children,P=T.attributes;return E.children=_,E.attributes=P,o?zc(E):Cc(E)}var ha=function(){},yh=V2.measurePerformance&&t6&&t6.mark&&t6.measure?t6:{mark:ha,measure:ha};var wc=function(e,t){return function(i,a,r,s){return e.call(t,i,a,r,s)}},D0=function(e,t,i,a){var r=Object.keys(e),s=r.length,o=a!==void 0?wc(t,a):t,c,l,u;for(i===void 0?(c=1,u=e[r[0]]):(c=0,u=i);c2&&arguments[2]!==void 0?arguments[2]:{},i=t.skipHooks,a=i===void 0?!1:i,r=Object.keys(e).reduce(function(s,o){var c=e[o],l=!!c.icon;return l?s[c.iconName]=c.icon:s[o]=c,s},{});typeof de.hooks.addPack=="function"&&!a?de.hooks.addPack(n,r):de.styles[n]=F1({},de.styles[n]||{},r),n==="fas"&&fa("fa",e)}var da=de.styles,Sc=de.shims,_c={},Ec={},Lc={},pa=function(){var e=function(a){return D0(da,function(r,s,o){return r[o]=D0(s,a,{}),r},{})};_c=e(function(i,a,r){return a[3]&&(i[a[3]]=r),i}),Ec=e(function(i,a,r){var s=a[2];return i[r]=r,s.forEach(function(o){i[o]=r}),i});var t="far"in da;Lc=D0(Sc,function(i,a){var r=a[0],s=a[1],o=a[2];return s==="far"&&!t&&(s="fas"),i[r]={prefix:s,iconName:o},i},{})};pa();var Ch=de.styles;function ma(n,e,t){if(n&&n[e]&&n[e][t])return{prefix:e,iconName:t,icon:n[e][t]}}function va(n){var e=n.tag,t=n.attributes,i=t===void 0?{}:t,a=n.children,r=a===void 0?[]:a;return typeof n=="string"?sa(n):"<".concat(e," ").concat(xc(i),">").concat(r.map(va).join(""),"")}function T0(n){this.name="MissingIcon",this.message=n||"Icon unavailable",this.stack=new Error().stack}T0.prototype=Object.create(Error.prototype);T0.prototype.constructor=T0;var s6={fill:"currentColor"},ga={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},zh={tag:"path",attributes:F1({},s6,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},H0=F1({},ga,{attributeName:"opacity"}),Ah={tag:"circle",attributes:F1({},s6,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:F1({},ga,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:F1({},H0,{values:"1;0;1;1;0;1;"})}]},wh={tag:"path",attributes:F1({},s6,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:F1({},H0,{values:"1;0;0;0;0;1;"})}]},Sh={tag:"path",attributes:F1({},s6,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:F1({},H0,{values:"0;0;1;1;0;0;"})}]};var _h=de.styles;function xa(n){var e=n[0],t=n[1],i=n.slice(4),a=Gi(i,1),r=a[0],s=null;return Array.isArray(r)?s={tag:"g",attributes:{class:"".concat(V2.familyPrefix,"-").concat(vt.GROUP)},children:[{tag:"path",attributes:{class:"".concat(V2.familyPrefix,"-").concat(vt.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(V2.familyPrefix,"-").concat(vt.PRIMARY),fill:"currentColor",d:r[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:e,height:t,icon:s}}var Eh=de.styles;var Dc=`svg:not(:root).svg-inline--fa { overflow: visible; } @@ -469,61 +469,62 @@ Use (?: \u2026 ) instead`);if(!N.lineBreaks&&Q.test(` .fad.fa-inverse { color: #fff; -}`;function Dc(){var n=Yi,e=$i,t=V2.familyPrefix,i=V2.replacementClass,a=Lc;if(t!==n||i!==e){var r=new RegExp("\\.".concat(n,"\\-"),"g"),s=new RegExp("\\--".concat(n,"\\-"),"g"),o=new RegExp("\\.".concat(e),"g");a=a.replace(r,".".concat(t,"-")).replace(s,"--".concat(t,"-")).replace(o,".".concat(i))}return a}var Tc=function(){function n(){Xo(this,n),this.definitions={}}return Zo(n,[{key:"add",value:function(){for(var t=this,i=arguments.length,a=new Array(i),r=0;r1&&arguments[1]!==void 0?arguments[1]:{},i=(e||{}).icon?e:Ma(e||{}),a=t.mask;return a&&(a=(a||{}).icon?a:Ma(a||{})),n(i,F1({},t,{mask:a}))}}var Rc=new Tc;var ba=!1;var H0=Nc(function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.transform,i=t===void 0?F4:t,a=e.symbol,r=a===void 0?!1:a,s=e.mask,o=s===void 0?null:s,c=e.maskId,l=c===void 0?null:c,u=e.title,f=u===void 0?null:u,h=e.titleId,p=h===void 0?null:h,v=e.classes,g=v===void 0?[]:v,x=e.attributes,m=x===void 0?{}:x,d=e.styles,A=d===void 0?{}:d;if(!!n){var b=n.prefix,C=n.iconName,E=n.icon;return Vc(F1({type:"icon"},n),function(){return Hc(),V2.autoA11y&&(f?m["aria-labelledby"]="".concat(V2.replacementClass,"-title-").concat(p||r6()):(m["aria-hidden"]="true",m.focusable="false")),zc({icons:{main:xa(E),mask:o?xa(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:b,iconName:C,transform:F1({},F4,i),symbol:r,title:f,maskId:l,titleId:p,extra:{attributes:m,styles:A,classes:g}})})}});function V0(n,e){let t=Object.keys(e).map(i=>Fc(n,i,e[i]));return t.length===1?t[0]:function(){t.forEach(i=>i())}}function Fc(n,e,t){let i=n[e],a=n.hasOwnProperty(e),r=t(i);return i&&Object.setPrototypeOf(r,i),Object.setPrototypeOf(s,r),n[e]=s,o;function s(...c){return r===i&&n[e]===s&&o(),r.apply(this,c)}function o(){n[e]===s&&(a?n[e]=i:delete n[e]),r!==i&&(r=i,Object.setPrototypeOf(s,i||Function))}}var Ri=w2(ya());var N0=/(?:(?\d+)[Dd])?#(?[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?[\+-]))?(?:\|(?[^\+-]+))?/u,Ca=/(?.*)?(?:\[.*\]\(|\[\[)(?.+?)#?\^(?.+?)(?:\]\]|\))(?:\|(?
.+))?/,R0=/(?:(?\d+)[Dd])?(?:\[.*\]\(|\[\[)(?.+)(?:\]\]|\))\|?(?.+)?/;var Y2="dice-roller-icon",Ke="dice-roller-copy";var g4=w2(require("obsidian"));var pe=(a=>(a.None="None",a.Normal="Normal",a.Up="Up",a.Down="Down",a))(pe||{}),h2=(i=>(i.None="None",i.Average="Average",i.Roll="Roll",i))(h2||{});function za(n,e,t){[...n].slice(e).reverse().forEach(([a,r])=>{n.set(a+1,r)}),n.set(e,t)}var B4=w2(require("obsidian"));var F0=class extends B4.Events{constructor(e,t="",i=e.data.showDice){super();this.plugin=e;this.original=t;this.loaded=!1;this.containerEl=createSpan({cls:"dice-roller",attr:{"aria-label-position":"top","data-dice":this.original}});this.resultEl=this.containerEl.createSpan("dice-roller-result");if(i){let a=this.containerEl.createSpan({cls:"dice-roller-button"});(0,B4.setIcon)(a,Y2),a.onclick=this.onClick.bind(this)}else this.containerEl.addClass("no-icon");this.containerEl.onclick=this.onClick.bind(this)}setTooltip(){this.plugin.data.displayResultsInline||this.containerEl.setAttrs({"aria-label":this.tooltip})}getRandomBetween(e,t){let i=new Uint32Array(1);crypto.getRandomValues(i);let a=i[0]/(4294967295+1);return Math.floor(a*(t-e+1))+e}async render(){this.setTooltip(),await this.build()}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),window.getSelection()?.isCollapsed&&await this.roll()}},o6=class extends F0{constructor(e,t,i,a=e.data.showDice){super(e,t,a);this.plugin=e;this.original=t;this.lexemes=i;this.showDice=a;this.save=!1}get inlineText(){return`${this.tooltip.split(` -`).join(" -> ")} -> `}},v4=class extends o6{},yt=class extends v4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.watch=!0;this.getPath(),this.init=this.getFile()}async getFile(){if(this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.path,this.source),!this.file||!(this.file instanceof B4.TFile))throw new Error("Could not load file.");await this.load()}},B0=class extends F0{constructor(e,t,i){super(e,"");this.options=t;this.rolls=i}get tooltip(){return`${this.options.toString()} +}`;function Tc(){var n=Yi,e=$i,t=V2.familyPrefix,i=V2.replacementClass,a=Dc;if(t!==n||i!==e){var r=new RegExp("\\.".concat(n,"\\-"),"g"),s=new RegExp("\\--".concat(n,"\\-"),"g"),o=new RegExp("\\.".concat(e),"g");a=a.replace(r,".".concat(t,"-")).replace(s,"--".concat(t,"-")).replace(o,".".concat(i))}return a}var Hc=function(){function n(){Zo(this,n),this.definitions={}}return Yo(n,[{key:"add",value:function(){for(var t=this,i=arguments.length,a=new Array(i),r=0;r1&&arguments[1]!==void 0?arguments[1]:{},i=(e||{}).icon?e:Ma(e||{}),a=t.mask;return a&&(a=(a||{}).icon?a:Ma(a||{})),n(i,F1({},t,{mask:a}))}}var Fc=new Hc;var ba=!1;var V0=Rc(function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.transform,i=t===void 0?Bt:t,a=e.symbol,r=a===void 0?!1:a,s=e.mask,o=s===void 0?null:s,c=e.maskId,l=c===void 0?null:c,u=e.title,f=u===void 0?null:u,h=e.titleId,m=h===void 0?null:h,v=e.classes,g=v===void 0?[]:v,x=e.attributes,p=x===void 0?{}:x,d=e.styles,A=d===void 0?{}:d;if(!!n){var b=n.prefix,C=n.iconName,E=n.icon;return Nc(F1({type:"icon"},n),function(){return Vc(),V2.autoA11y&&(f?p["aria-labelledby"]="".concat(V2.replacementClass,"-title-").concat(m||n6()):(p["aria-hidden"]="true",p.focusable="false")),Ac({icons:{main:xa(E),mask:o?xa(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:b,iconName:C,transform:F1({},Bt,i),symbol:r,title:f,maskId:l,titleId:m,extra:{attributes:p,styles:A,classes:g}})})}});function N0(n,e){let t=Object.keys(e).map(i=>Bc(n,i,e[i]));return t.length===1?t[0]:function(){t.forEach(i=>i())}}function Bc(n,e,t){let i=n[e],a=n.hasOwnProperty(e),r=t(i);return i&&Object.setPrototypeOf(r,i),Object.setPrototypeOf(s,r),n[e]=s,o;function s(...c){return r===i&&n[e]===s&&o(),r.apply(this,c)}function o(){n[e]===s&&(a?n[e]=i:delete n[e]),r!==i&&(r=i,Object.setPrototypeOf(s,i||Function))}}var No=w2(ya());var R0=/(?:(?\d+)[Dd])?#(?[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?[\+-]))?(?:\|(?[^\+-]+))?/u,Ca=/(?.*)?(?:\[.*\]\(|\[\[)(?.+?)#?\^(?.+?)(?:\]\]|\))(?:\|(?
.+))?/,F0=/(?:(?\d+)[Dd])?(?:\[.*\]\(|\[\[)(?.+)(?:\]\]|\))\|?(?.+)?/;var Y2="dice-roller-icon",Je="dice-roller-copy";var xt=w2(require("obsidian"));var pe=(a=>(a.None="None",a.Normal="Normal",a.Up="Up",a.Down="Down",a))(pe||{}),g2=(i=>(i.None="None",i.Average="Average",i.Roll="Roll",i))(g2||{});function za(n,e,t){[...n].slice(e).reverse().forEach(([a,r])=>{n.set(a+1,r)}),n.set(e,t)}var Pt=w2(require("obsidian"));var B0=class extends Pt.Events{constructor(e,t="",i=e.data.showDice){super();this.plugin=e;this.original=t;this.loaded=!1;this.containerEl=createSpan({cls:"dice-roller",attr:{"aria-label-position":"top","data-dice":this.original}});this.resultEl=this.containerEl.createSpan("dice-roller-result");i?(this.iconEl=this.containerEl.createSpan({cls:"dice-roller-button"}),(0,Pt.setIcon)(this.iconEl,Y2),this.iconEl.onclick=this.onClick.bind(this)):this.containerEl.addClass("no-icon"),this.containerEl.onclick=this.onClick.bind(this)}setTooltip(){this.plugin.data.displayResultsInline||this.containerEl.setAttrs({"aria-label":this.tooltip})}getRandomBetween(e,t){let i=new Uint32Array(1);crypto.getRandomValues(i);let a=i[0]/(4294967295+1);return Math.floor(a*(t-e+1))+e}async render(){this.setTooltip(),await this.build()}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),window.getSelection()?.isCollapsed&&await this.roll()}},c6=class extends B0{constructor(e,t,i,a=e.data.showDice){super(e,t,a);this.plugin=e;this.original=t;this.lexemes=i;this.showDice=a;this.save=!1}get inlineText(){return`${this.tooltip.split(` +`).join(" -> ")} -> `}},gt=class extends c6{},C4=class extends gt{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.watch=!0;this.getPath(),this.init=this.getFile()}async getFile(){if(this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.path,this.source),!this.file||!(this.file instanceof Pt.TFile))throw new Error("Could not load file.");await this.load()}},P0=class extends B0{constructor(e,t,i){super(e,"");this.options=t;this.rolls=i}get tooltip(){return`${this.options.toString()} -${this.results.toString()}`}async roll(){let e=[...this.options];return this.results=[...Array(this.rolls)].map(()=>{let t=e[this.getRandomBetween(0,e.length-1)];return e.splice(e.indexOf(t),1),t}).filter(t=>t),this.render(),this.trigger("new-result"),this.result=this.results[0],this.results[0]}async build(){this.resultEl.empty(),this.resultEl.setText(this.results.toString())}};var k2=class{constructor(e,t={value:e,conditions:[],type:"dice"}){this.lexeme=t;this.modifiers=new Map;this.modifiersAllowed=!0;this.static=!1;this.conditions=[];this.fudge=!1;if(!/(\-?\d+)[dD]?(\d+|%|\[\d+,\s?\d+\])?/.test(e))throw new Error("Non parseable dice string passed to DiceRoll.");this.dice=e.split(" ").join(""),/^-?\d+(?:\.\d+)?$/.test(this.dice)&&(this.static=!0,this.modifiersAllowed=!1);let[,i,a=null,r=1]=this.dice.match(/(\-?\d+)[dD]\[?(?:(-?\d+)\s?,)?\s?(-?\d+|%|F)\]?/)||[,1,null,1];i=Number(i),this.multiplier=i<0?-1:1;let s=isNaN(Number(a))?null:Number(a),o;this.rolls=Math.abs(Number(i))||1,r==="%"?o=100:r==="F"?(o=1,s=-1,this.fudge=!0):o=Number(r),Number(o)<0&&!s&&(s=-1),Number(o)t?i:0).reduce((t,i)=>t+i,0)}get display(){return this.static?`${this.result}`:`[${[...this.results].map(([,{modifiers:e,display:t}])=>`${t}${[...e].join("")}`).join(", ")}]`}get modifierText(){if(!this.modifiers.size)return"";let e=[...this.conditions].map(({value:i})=>i).join(""),t=[...this.modifiers].map(([i,{conditionals:a,value:r}])=>{let s=a.map(o=>o.value);return`${r}${s.join("")}`}).join("");return`${e}${t}`}keepLow(e=1){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>t[1].value-i[1].value).slice(e-this.results.size).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}keepHigh(e=1){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>i[1].value-t[1].value).slice(e).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}reroll(e,t){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.min,value:""});let i=0,a=[...this.results].filter(([,{value:r}])=>this.checkCondition(r,t));for(;ithis.checkCondition(r,t)).length>0;)i++,a.map(([,r])=>{r.modifiers.add("r"),r.value=this.getValue()});a.forEach(([r,s])=>{this.results.set(r,s)})}explodeAndCombine(e,t){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.max,value:""}),[...this.results].filter(([,{value:a}])=>this.checkCondition(a,t)).forEach(([a,r])=>{let s=this.getValue(),o=0;for(r.modifiers.add("!"),r.value+=s,r.display=`${r.value}`,this.results.set(a,r);othis.checkCondition(r,t)),a=0;i.forEach(([r,s])=>{let o=s.value,c=0;for(;cthis.getValue())}getValue(){return this.multiplier*this.getRandomBetween(this.faces.min,this.faces.max)}setResults(e){this.results=new Map([...e].map((t,i)=>[i,{usable:!0,value:t,display:`${t}`,modifiers:new Set}])),this.updateResultArray()}applyModifiers(){for(let[e,t]of this.modifiers)this.applyModifier(e,t)}roll(){let e=this._roll();return this.setResults(e),this.applyModifiers(),this.conditions?.length&&this.applyConditions(),e}applyConditions(){for(let[e,t]of this.results){let i=this.conditions.find(({operator:r})=>r==="-="||r==="=-");if(i&&t.value===i.comparer){t.value=-1,t.modifiers.add("-");continue}this.checkCondition(t.value,this.conditions)?(t.modifiers.add("*"),t.value=1):t.usable=!1}}updateResultArray(){this.resultArray=[...this.results.values()].map(e=>e.value)}applyModifier(e,t){switch(e){case"sort":{let i;t.value=="sa"?i=[...this.results.values()].sort((a,r)=>a.value-r.value):i=[...this.results.values()].sort((a,r)=>r.value-a.value),this.results=new Map([...this.results.keys()].map(a=>[a,i[a]])),this.updateResultArray();break}case"kh":{this.keepHigh(t.data);break}case"kl":{this.keepLow(t.data);break}case"!":{this.explode(t.data,t.conditionals);break}case"!!":{this.explodeAndCombine(t.data,t.conditionals);break}case"r":{this.reroll(t.data,t.conditionals);break}case"u":{this.makeUnique();break}case"condition":}}makeUnique(){let e=[...this.results.values()];if(this.faces.max-this.faces.min+1i.value)).size==this.results.size)return;let t=0;for(;new Set(e.map(i=>i.value)).size!=this.results.size&&t<100;){for(let i of e){let a=e.find(r=>r.value==i.value&&r!=i);a&&(a.value=this.getValue(),a.display=`${a.value}`,a.modifiers.add("u"))}e=[...this.results.values()],t++}}checkCondition(e,t){return!t||!t.length?e:t.some(({operator:i,comparer:a})=>{if(Number.isNaN(e)||Number.isNaN(a))return!1;let r=!1;switch(i){case"=":r=e===a;break;case"!=":case"=!":r=e!==a;break;case"<":r=e":r=e>a;break;case">=":r=e>=a;break}return r})}allowAverage(){return!0}average(){return(this.faces.min+this.faces.max)/2}getRandomBetween(e,t){return Math.floor(Math.random()*(t-e+1))+e}},P4=class extends k2{constructor(e,t){super("3d6",t);this.dice=e;this.lexeme=t}get doubles(){return new Set([...this.results].map(([,{usable:e,value:t}])=>e?t:0)).size<3}get result(){return this.static?Number(this.dice):[...this.results].map(([,{usable:t,value:i}])=>t?i:0).reduce((t,i)=>t+i,0)}get display(){let e=[];for(let t of this.results){if(t[0]==0&&this.doubles){e.push(`${t[1].value}S`);continue}e.push(`${t[1].value}`)}return`[${e.join(", ")}]`}allowAverage(){return!1}},Aa=class extends k2{constructor(e,t){super(e,t);this.dice=e;this.lexeme=t;this.stack=[];let i=`${this.faces.max}`.split("");for(let a=0;aNumber(e.map(t=>t.result).join(""))).reduce((e,t)=>e+t)}get display(){return this.stack.map(e=>e.map(t=>t.result).join(",")).join("|")}roll(){return!this.stack||!this.stack.length?super.roll():(this.stack.forEach(e=>e.map(t=>t.roll())),[...this.stack.map(e=>e.map(t=>t.result)).flat()])}allowAverage(){return!1}},S2=class extends v4{constructor(e,t,i,a=e.data.showDice,r,s,o=e.data.displayFormulaAfter){super(e,t,i,a);this.plugin=e;this.original=t;this.lexemes=i;this.displayFixedText=!1;this.stunted="";this.shouldRender=!1;this.showFormula=!1;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.stack=[];this.stackCopy=[];this.dice=[];this.hasRunOnce=!1;o&&this.containerEl.createSpan({cls:"dice-roller-formula",text:`(${t})`}),this.fixedText=r,this.expectedValue=s,this.displayFixedText=this.fixedText!=="",this.loaded=!0,this.trigger("loaded")}get replacer(){return`${this.result}`}get resultText(){let e=[],t=0;return this.dice.forEach(i=>{let a=this.original.slice(t);e.push(a.slice(0,a.indexOf(i.lexeme.text)),i.display),t+=a.indexOf(i.lexeme.text)+i.lexeme.text.length+i.modifierText.length}),e.push(this.original.slice(t)),e.join("")}get tooltip(){return this._tooltip?this._tooltip:this.expectedValue===h2.Roll||this.shouldRender?this.displayFixedText?`${this.original} +${this.results.toString()}`}async roll(){let e=[...this.options];return this.results=[...Array(this.rolls)].map(()=>{let t=e[this.getRandomBetween(0,e.length-1)];return e.splice(e.indexOf(t),1),t}).filter(t=>t),this.render(),this.trigger("new-result"),this.result=this.results[0],this.results[0]}async build(){this.resultEl.empty(),this.resultEl.setText(this.results.toString())}};var k2=class{constructor(e,t={value:e,conditions:[],type:"dice"}){this.lexeme=t;this.modifiers=new Map;this.modifiersAllowed=!0;this.static=!1;this.conditions=[];this.fudge=!1;if(!/(\-?\d+)[dD]?(\d+|%|\[\d+,\s?\d+\])?/.test(e))throw new Error("Non parseable dice string passed to DiceRoll.");this.dice=e.split(" ").join(""),/^-?\d+(?:\.\d+)?$/.test(this.dice)&&(this.static=!0,this.modifiersAllowed=!1);let[,i,a=null,r=1]=this.dice.match(/(\-?\d+)[dD]\[?(?:(-?\d+)\s?,)?\s?(-?\d+|%|F)\]?/)||[,1,null,1];i=Number(i),this.multiplier=i<0?-1:1;let s=isNaN(Number(a))?null:Number(a),o;this.rolls=Math.abs(Number(i))||1,r==="%"?o=100:r==="F"?(o=1,s=-1,this.fudge=!0):o=Number(r),Number(o)<0&&!s&&(s=-1),Number(o)t?i:0).reduce((t,i)=>t+i,0)}get display(){return this.static?`${this.result}`:`[${[...this.results].map(([,{modifiers:e,display:t}])=>`${t}${[...e].join("")}`).join(", ")}]`}get modifierText(){if(!this.modifiers.size)return"";let e=[...this.conditions].map(({value:i})=>i).join(""),t=[...this.modifiers].map(([i,{conditionals:a,value:r}])=>{let s=a.map(o=>o.value);return`${r}${s.join("")}`}).join("");return`${e}${t}`}keepLow(e=1){if(!this.modifiersAllowed){new xt.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>t[1].value-i[1].value).slice(e-this.results.size).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}keepHigh(e=1){if(!this.modifiersAllowed){new xt.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>i[1].value-t[1].value).slice(e).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}reroll(e,t){if(!this.modifiersAllowed){new xt.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.min,value:""});let i=0,a=[...this.results].filter(([,{value:r}])=>this.checkCondition(r,t));for(;ithis.checkCondition(r,t)).length>0;)i++,a.map(([,r])=>{r.modifiers.add("r"),r.value=this.getValue()});a.forEach(([r,s])=>{this.results.set(r,s)})}explodeAndCombine(e,t){if(!this.modifiersAllowed){new xt.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.max,value:""}),[...this.results].filter(([,{value:a}])=>this.checkCondition(a,t)).forEach(([a,r])=>{let s=this.getValue(),o=0;for(r.modifiers.add("!"),r.value+=s,r.display=`${r.value}`,this.results.set(a,r);othis.checkCondition(r,t)),a=0;i.forEach(([r,s])=>{let o=s.value,c=0;for(;cthis.getValue())}getValue(){return this.multiplier*this.getRandomBetween(this.faces.min,this.faces.max)}setResults(e){this.results=new Map([...e].map((t,i)=>[i,{usable:!0,value:t,display:`${t}`,modifiers:new Set}])),this.updateResultArray()}applyModifiers(){for(let[e,t]of this.modifiers)this.applyModifier(e,t)}roll(){let e=this._roll();return this.setResults(e),this.applyModifiers(),this.conditions?.length&&this.applyConditions(),e}applyConditions(){for(let[e,t]of this.results){let i=this.conditions.find(({operator:r})=>r==="-="||r==="=-");if(i&&t.value===i.comparer){t.value=-1,t.modifiers.add("-");continue}this.checkCondition(t.value,this.conditions)?(t.modifiers.add("*"),t.value=1):t.usable=!1}}updateResultArray(){this.resultArray=[...this.results.values()].map(e=>e.value)}applyModifier(e,t){switch(e){case"sort":{let i;t.value=="sa"?i=[...this.results.values()].sort((a,r)=>a.value-r.value):i=[...this.results.values()].sort((a,r)=>r.value-a.value),this.results=new Map([...this.results.keys()].map(a=>[a,i[a]])),this.updateResultArray();break}case"kh":{this.keepHigh(t.data);break}case"kl":{this.keepLow(t.data);break}case"!":{this.explode(t.data,t.conditionals);break}case"!!":{this.explodeAndCombine(t.data,t.conditionals);break}case"r":{this.reroll(t.data,t.conditionals);break}case"u":{this.makeUnique();break}case"condition":}}makeUnique(){let e=[...this.results.values()];if(this.faces.max-this.faces.min+1i.value)).size==this.results.size)return;let t=0;for(;new Set(e.map(i=>i.value)).size!=this.results.size&&t<100;){for(let i of e){let a=e.find(r=>r.value==i.value&&r!=i);a&&(a.value=this.getValue(),a.display=`${a.value}`,a.modifiers.add("u"))}e=[...this.results.values()],t++}}checkCondition(e,t){return!t||!t.length?e:t.some(({operator:i,comparer:a})=>{if(Number.isNaN(e)||Number.isNaN(a))return!1;let r=!1;switch(i){case"=":r=e===a;break;case"!=":case"=!":r=e!==a;break;case"<":r=e":r=e>a;break;case">=":r=e>=a;break}return r})}allowAverage(){return!0}average(){return(this.faces.min+this.faces.max)/2}getRandomBetween(e,t){return Math.floor(Math.random()*(t-e+1))+e}},It=class extends k2{constructor(e,t){super("3d6",t);this.dice=e;this.lexeme=t}get doubles(){return new Set([...this.results].map(([,{usable:e,value:t}])=>e?t:0)).size<3}get result(){return this.static?Number(this.dice):[...this.results].map(([,{usable:t,value:i}])=>t?i:0).reduce((t,i)=>t+i,0)}get display(){let e=[];for(let t of this.results){if(t[0]==0&&this.doubles){e.push(`${t[1].value}S`);continue}e.push(`${t[1].value}`)}return`[${e.join(", ")}]`}allowAverage(){return!1}},Aa=class extends k2{constructor(e,t){super(e,t);this.dice=e;this.lexeme=t;this.stack=[];let i=`${this.faces.max}`.split("");for(let a=0;aNumber(e.map(t=>t.result).join(""))).reduce((e,t)=>e+t)}get display(){return this.stack.map(e=>e.map(t=>t.result).join(",")).join("|")}roll(){return!this.stack||!this.stack.length?super.roll():(this.stack.forEach(e=>e.map(t=>t.roll())),[...this.stack.map(e=>e.map(t=>t.result)).flat()])}allowAverage(){return!1}},S2=class extends gt{constructor(e,t,i,a=e.data.showDice,r,s,o=e.data.displayFormulaAfter){super(e,t,i,a);this.plugin=e;this.original=t;this.lexemes=i;this.displayFixedText=!1;this.stunted="";this.shouldRender=!1;this.showFormula=!1;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.stack=[];this.stackCopy=[];this.dice=[];this.hasRunOnce=!1;o&&this.containerEl.createSpan({cls:"dice-roller-formula",text:`(${t})`}),this.fixedText=r,this.expectedValue=s,this.displayFixedText=this.fixedText!=="",this.loaded=!0,this.trigger("loaded")}get replacer(){return`${this.result}`}get resultText(){let e=[],t=0;return this.dice.forEach(i=>{let a=this.original.slice(t);e.push(a.slice(0,a.indexOf(i.lexeme.text)),i.display),t+=a.indexOf(i.lexeme.text)+i.lexeme.text.length+i.modifierText.length}),e.push(this.original.slice(t)),e.join("")}get tooltip(){return this._tooltip?this._tooltip:this.expectedValue===g2.Roll||this.shouldRender?this.displayFixedText?`${this.original} ${this.result} = ${this.resultText}`:`${this.original} -${this.resultText}`:this.expectedValue===h2.Average?this.displayFixedText?`${this.original} +${this.resultText}`:this.expectedValue===g2.Average?this.displayFixedText?`${this.original} ${this.result} = average: ${this.resultText}`:`${this.original} average: ${this.resultText}`:`${this.original} -empty`}allowAverage(){let e=t=>t.allowAverage();return this.dynamic.every(e)}async build(){if(this.expectedValue===h2.Average&&!this.shouldRender){if(this.allowAverage())for(let a of this.dynamic){let r=a.average();var e=Array(a.rolls).fill(r);a.setResults(e),this.recalculate()}else this.expectedValue=h2.Roll;this.result=Math.floor(this.result),this.setTooltip()}let t=this.result;switch(this.plugin.data.round){case pe.None:{t=Math.trunc(t*100)/100;break}case pe.Normal:{t=Math.round(t);break}case pe.Up:{t=Math.ceil(t);break}case pe.Down:{t=Math.floor(t);break}}let i;this.expectedValue===h2.None&&!this.shouldRender?(this.showDice?i=[""]:i=["\xA0"],this.showFormula&&i.unshift(this.original+" -> ")):(i=[`${t}`],this.showFormula&&i.unshift(this.inlineText)),this.expectedValue=h2.Roll,this.displayFixedText?this.resultEl.setText(this.fixedText):this.resultEl.setText(i.join("")+this.stunted)}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),e.getModifierState("Alt")?this.expectedValue=h2.Average:e.getModifierState("Control")&&(this.expectedValue=h2.None),e.getModifierState("Shift")?(await this.plugin.renderRoll(this),this.render(),this.trigger("new-result"),this.hasRunOnce=!0):window.getSelection()?.isCollapsed&&await this.roll()}get dynamic(){return this.dice.filter(e=>!e.static)}get static(){return this.dice.filter(e=>e.static)}get isStatic(){return this.dice.every(e=>e.static)}rollSync(){this.stunted="",this.parseLexemes();let e=this.stack.pop();return e.roll(),e instanceof P4&&e.doubles&&(this.stunted=` - ${e.results.get(0).value} Stunt Points`),this.result=e.result,this._tooltip=null,this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}async roll(e){if(this.stunted="",this.stackCopy=[],this.parseLexemes(),e||this.shouldRender&&this.hasRunOnce)await this.plugin.renderRoll(this),new g4.Notice(`${this.tooltip} +empty`}allowAverage(){let e=t=>t.allowAverage();return this.dynamic.every(e)}async build(){if(this.expectedValue===g2.Average&&!this.shouldRender){if(this.allowAverage())for(let a of this.dynamic){let r=a.average();var e=Array(a.rolls).fill(r);a.setResults(e),this.recalculate()}else this.expectedValue=g2.Roll;this.result=Math.floor(this.result),this.setTooltip()}let t=this.result;switch(this.plugin.data.round){case pe.None:{t=Math.trunc(t*100)/100;break}case pe.Normal:{t=Math.round(t);break}case pe.Up:{t=Math.ceil(t);break}case pe.Down:{t=Math.floor(t);break}}let i;this.expectedValue===g2.None&&!this.shouldRender?(this.showDice?i=[""]:i=["\xA0"],this.showFormula&&i.unshift(this.original+" -> ")):(i=[`${t}`],this.showFormula&&i.unshift(this.inlineText)),this.expectedValue=g2.Roll,this.displayFixedText?this.resultEl.setText(this.fixedText):this.resultEl.setText(i.join("")+this.stunted)}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),e.getModifierState("Alt")?this.expectedValue=g2.Average:e.getModifierState("Control")&&(this.expectedValue=g2.None),e.getModifierState("Shift")?(await this.plugin.renderRoll(this),this.render(),this.trigger("new-result"),this.hasRunOnce=!0):window.getSelection()?.isCollapsed&&await this.roll()}get dynamic(){return this.dice.filter(e=>!e.static)}get static(){return this.dice.filter(e=>e.static)}get isStatic(){return this.dice.every(e=>e.static)}rollSync(){this.stunted="",this.parseLexemes();let e=this.stack.pop();return e.roll(),e instanceof It&&e.doubles&&(this.stunted=` - ${e.results.get(0).value} Stunt Points`),this.result=e.result,this._tooltip=null,this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}async roll(e){if(this.stunted="",this.stackCopy=[],this.parseLexemes(),e||this.shouldRender&&this.hasRunOnce)await this.plugin.renderRoll(this),new xt.Notice(`${this.tooltip} -Result: ${this.result}`);else{let t=this.stack.pop();t.roll(),t instanceof P4&&t.doubles&&(this.stunted=` - ${t.results.get(0).value} Stunt Points`),this.result=t.result,this._tooltip=null}return this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}parseLexemes(){let e=0;for(let t of this.lexemes)switch(t.type){case"+":case"-":case"*":case"/":case"^":case"math":let i=this.stack.pop(),a=this.stack.pop();if(!a){t.value==="-"&&(i=new k2(`-${i.dice}`,i.lexeme)),this.stackCopy.push(t.value),this.stack.push(i);continue}i.roll(),i instanceof P4&&i.doubles&&(this.stunted=` - ${i.results.get(0).value} Stunt Points`),a.roll(),a instanceof P4&&a.doubles&&(this.stunted=` - ${a.results.get(0).value} Stunt Points`);let r=this.operators[t.value](a.result,i.result);this.stackCopy.push(t.value),this.stack.push(new k2(`${r}`,t));break;case"u":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("u",{data:o,conditionals:[],value:t.text});break}case"kh":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("kh",{data:o,conditionals:[],value:t.text});break}case"dl":{let s=this.dice[e-1],o=t.value?Number(t.value):1;o=s.results.size-o,s.modifiers.set("kh",{data:o,conditionals:[],value:t.text});break}case"kl":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("kl",{data:o,conditionals:[],value:t.text});break}case"dh":{let s=this.dice[e-1],o=t.value?Number(t.value):1;o=s.results.size-o,s.modifiers.set("kl",{data:o,conditionals:[],value:t.text});break}case"!":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("!",{data:o,conditionals:t.conditions??[],value:t.text});break}case"!!":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("!!",{data:o,conditionals:t.conditions??[],value:t.text});break}case"r":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("r",{data:o,conditionals:t.conditions??[],value:t.text});break}case"sort":{let s=this.dice[e-1],o=Number(t.value);s.modifiers.set("sort",{data:o,conditionals:t.conditions??[],value:t.value});break}case"dice":{if(t.parenedDice&&/^d/.test(t.value)&&this.stack.length){let s=this.stack.pop();t.value=`${s.result}${t.value}`,this.dice[e]=new k2(t.value,t)}this.dice[e]||(this.dice[e]=new k2(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"stunt":{this.dice[e]||(this.dice[e]=new P4(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"%":{this.dice[e]||(this.dice[e]=new Aa(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}}}recalculate(){let e=[],t=0;if(!this.stackCopy.length)return this.roll();for(let i of this.stackCopy)if(typeof i=="string"){let a=e.pop(),r=e.pop();if(!r){i==="-"&&(a=new k2(`-${a.result}`,a.lexeme)),e.push(a);continue}let s=this.operators[i](r.result,a.result);e.push(new k2(`${s}`))}else e.push(i),i instanceof k2&&this.stackCopy.indexOf(i)!=this.stackCopy.length-1&&i.applyModifiers();e.length&&e[0]instanceof k2&&(e[0].applyModifiers(),t+=e[0].result),this.result=t,this.stackCopy=[]}toResult(){return{type:"dice",result:this.result,tooltip:this.tooltip}}async applyResult(e){e.type==="dice"&&(e.result&&(this.result=e.result),e.tooltip&&(this._tooltip=e.tooltip),await this.render())}setResult(e){}};var x2=w2(require("obsidian"));function Bc(n){let e="",t="abcdefghijklmnopqrstuvwxyz0123456789",i=t.length;for(let a=0;a{o.stopPropagation(),navigator.clipboard.writeText(this.results.join(` -`)).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(this.copy,Ke)}getEmbedClass(){return this.plugin.data.displayAsEmbed?"markdown-embed":""}},Ct=class extends P0{constructor(e,t,i,a,r=!0,s=e.data.showDice){super(e,t,i,a,s);this.plugin=e;this.original=t;this.lexeme=i;this.inline=r}get replacer(){let e=this.getBlockId(this.result);return e?`![[${this.path}#^${e}]]`:""}get tooltip(){return`${this.original} -${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:this.getEmbedClass()});if(!this.plugin.data.displayResultsInline){let i="type"in e?e.type:"List Item";t.setAttrs({"aria-label":`${this.file.basename}: ${i}`})}if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(x2.MarkdownRenderer.renderMarkdown(this.displayFromCache(e),t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(this.displayFromCache(e).trim()).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(i,Ke)}}}async load(){await this.getOptions()}displayFromCache(...e){let t=[];for(let i of e)t.push(this.content.slice(i.position.start.offset,i.position.end.offset));return t.join(` +Result: ${this.result}`);else{let t=this.stack.pop();t.roll(),t instanceof It&&t.doubles&&(this.stunted=` - ${t.results.get(0).value} Stunt Points`),this.result=t.result,this._tooltip=null}return this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}parseLexemes(){let e=0;for(let t of this.lexemes)switch(t.type){case"+":case"-":case"*":case"/":case"^":case"math":let i=this.stack.pop(),a=this.stack.pop();if(!a){t.value==="-"&&(i=new k2(`-${i.dice}`,i.lexeme)),this.stackCopy.push(t.value),this.stack.push(i);continue}i.roll(),i instanceof It&&i.doubles&&(this.stunted=` - ${i.results.get(0).value} Stunt Points`),a.roll(),a instanceof It&&a.doubles&&(this.stunted=` - ${a.results.get(0).value} Stunt Points`);let r=this.operators[t.value](a.result,i.result);this.stackCopy.push(t.value),this.stack.push(new k2(`${r}`,t));break;case"u":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("u",{data:o,conditionals:[],value:t.text});break}case"kh":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("kh",{data:o,conditionals:[],value:t.text});break}case"dl":{let s=this.dice[e-1],o=t.value?Number(t.value):1;o=s.results.size-o,s.modifiers.set("kh",{data:o,conditionals:[],value:t.text});break}case"kl":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("kl",{data:o,conditionals:[],value:t.text});break}case"dh":{let s=this.dice[e-1],o=t.value?Number(t.value):1;o=s.results.size-o,s.modifiers.set("kl",{data:o,conditionals:[],value:t.text});break}case"!":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("!",{data:o,conditionals:t.conditions??[],value:t.text});break}case"!!":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("!!",{data:o,conditionals:t.conditions??[],value:t.text});break}case"r":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("r",{data:o,conditionals:t.conditions??[],value:t.text});break}case"sort":{let s=this.dice[e-1],o=Number(t.value);s.modifiers.set("sort",{data:o,conditionals:t.conditions??[],value:t.value});break}case"dice":{if(t.parenedDice&&/^d/.test(t.value)&&this.stack.length){let s=this.stack.pop();t.value=`${s.result}${t.value}`,this.dice[e]=new k2(t.value,t)}this.dice[e]||(this.dice[e]=new k2(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"stunt":{this.dice[e]||(this.dice[e]=new It(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"%":{this.dice[e]||(this.dice[e]=new Aa(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}}}recalculate(){let e=[],t=0;if(!this.stackCopy.length)return this.roll();for(let i of this.stackCopy)if(typeof i=="string"){let a=e.pop(),r=e.pop();if(!r){i==="-"&&(a=new k2(`-${a.result}`,a.lexeme)),e.push(a);continue}let s=this.operators[i](r.result,a.result);e.push(new k2(`${s}`))}else e.push(i),i instanceof k2&&this.stackCopy.indexOf(i)!=this.stackCopy.length-1&&i.applyModifiers();e.length&&e[0]instanceof k2&&(e[0].applyModifiers(),t+=e[0].result),this.result=t,this.stackCopy=[],this.render()}toResult(){return{type:"dice",result:this.result,tooltip:this.tooltip}}async applyResult(e){e.type==="dice"&&(e.result&&(this.result=e.result),e.tooltip&&(this._tooltip=e.tooltip),await this.render())}setResult(e){}};var x2=w2(require("obsidian"));function Pc(n){let e="",t="abcdefghijklmnopqrstuvwxyz0123456789",i=t.length;for(let a=0;a{o.stopPropagation(),navigator.clipboard.writeText(this.transformResultsToString()).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(this.copy,Je)}getEmbedClass(){return this.plugin.data.displayAsEmbed?"markdown-embed":""}},z4=class extends I0{constructor(e,t,i,a,r=!0,s=e.data.showDice){super(e,t,i,a,s);this.plugin=e;this.original=t;this.lexeme=i;this.inline=r}get replacer(){let e=this.getBlockId(this.result);return e?`![[${this.path}#^${e}]]`:""}get tooltip(){return`${this.original} +${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:this.getEmbedClass()});if(!this.plugin.data.displayResultsInline){let i="type"in e?e.type:"List Item";t.setAttrs({"aria-label":`${this.file.basename}: ${i}`})}if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(x2.MarkdownRenderer.renderMarkdown(this.displayFromCache(e),t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(this.displayFromCache(e).trim()).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(i,Je)}}}async load(){await this.getOptions()}displayFromCache(...e){let t=[];for(let i of e)t.push(this.content.slice(i.position.start.offset,i.position.end.offset));return t.join(` -`)}getBlockId(e){let t=this.cache.blocks??{},i=Object.entries(t).find(([a,r])=>wa(r.position,e.position));if(!i){let a=`${Pc(4)}`,r=`${this.content.slice(0,this.result.position.end.offset+1)}^${a}${this.content.slice(this.result.position.end.offset)}`;return this.watch=!1,this.plugin.app.vault.modify(this.file,r),a}return i[0]}getPath(){let{groups:e}=this.lexeme.value.match(R0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.types=a?.split(","),this.levels=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").pop():null).filter(r=>r),this.types=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").shift():r)}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.sections)throw new Error("Could not read file cache.");this.content=await this.plugin.app.vault.cachedRead(this.file),this.options=this.cache.sections.filter(({type:e,position:t})=>this.types?e=="heading"&&this.types.includes(e)&&this.levels.length?(this.cache.headings??[]).filter(({level:a})=>this.levels.includes(`${a}`)).some(({position:a})=>wa(a,t)):this.types.includes(e):!["yaml","thematicBreak"].includes(e)),this.types&&this.types.includes("listItem")&&this.options.push(...this.cache.listItems),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},c6=class extends v4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.loaded=!1;if(!this.plugin.canUseDataview)throw new x2.Notice("A tag can only be rolled with the Dataview plugin enabled."),new Error("A tag can only be rolled with the Dataview plugin enabled.");e.data.displayAsEmbed&&this.containerEl.addClasses(["has-embed","markdown-embed"]);let{roll:s=1,tag:o,collapse:c,types:l}=i.value.match(N0).groups;this.collapse=c==="-"?!0:c==="+"?!1:!this.plugin.data.returnAllTags,this.tag=`#${o}`,this.rolls=Number(s),this.types=l,this.getFiles()}get replacer(){return this.result.replacer}get typeText(){return this.types?.length?`|${this.types}`:""}async getFiles(){if(!this.plugin.dataviewAPI){new x2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? +`)}transformResultsToString(){return this.displayFromCache(...this.results)}getBlockId(e){let t=this.cache.blocks??{},i=Object.entries(t).find(([a,r])=>wa(r.position,e.position));if(!i){let a=`${Ic(4)}`,r=`${this.content.slice(0,this.result.position.end.offset+1)}^${a}${this.content.slice(this.result.position.end.offset)}`;return this.watch=!1,this.plugin.app.vault.modify(this.file,r),a}return i[0]}getPath(){let{groups:e}=this.lexeme.value.match(F0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.types=a?.split(","),this.levels=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").pop():null).filter(r=>r),this.types=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").shift():r)}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.sections)throw new Error("Could not read file cache.");this.content=await this.plugin.app.vault.cachedRead(this.file),this.options=this.cache.sections.filter(({type:e,position:t})=>this.types?e=="heading"&&this.types.includes(e)&&this.levels.length?(this.cache.headings??[]).filter(({level:a})=>this.levels.includes(`${a}`)).some(({position:a})=>wa(a,t)):this.types.includes(e):!["yaml","thematicBreak"].includes(e)),this.types&&this.types.includes("listItem")&&this.options.push(...this.cache.listItems),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},l6=class extends gt{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.loaded=!1;if(!this.plugin.canUseDataview)throw new x2.Notice("A tag can only be rolled with the Dataview plugin enabled."),new Error("A tag can only be rolled with the Dataview plugin enabled.");e.data.displayAsEmbed&&this.containerEl.addClasses(["has-embed","markdown-embed"]);let{roll:s=1,tag:o,collapse:c,types:l}=i.value.match(R0).groups;this.collapse=c==="-"?!0:c==="+"?!1:!this.plugin.data.returnAllTags,this.tag=`#${o}`,this.rolls=Number(s),this.types=l,this.getFiles()}get replacer(){return this.result.replacer}get typeText(){return this.types?.length?`|${this.types}`:""}async getFiles(){if(!this.plugin.dataviewAPI){new x2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? `+this.tag);let t=new Set(e.value.values.reduce((a,r)=>(r.type=="file"&&a.push(r.path),a),[]));if(t&&t.delete(this.source),!t||!t.size)throw new Error(`No files found with that tag. Is the tag correct? -`+this.tag);let i=Array.from(t).map(a=>`${this.rolls}d[[${a}]]${this.typeText}`);this.results=i.map(a=>new Ct(this.plugin,a,{...this.lexeme,value:a,type:"section"},this.source,!1)),this.loaded=!0,this.trigger("loaded")}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText}),this.collapse){this.chosen=this.random??this.getRandomBetween(0,this.results.length-1);let e=this.results[this.chosen];this.random=null;let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}else for(let e of this.results){let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}}async roll(){return new Promise((e,t)=>{this.loaded?(this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)):this.on("loaded",()=>{this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)})})}get tooltip(){return this.original}toResult(){return{type:"tag",random:this.chosen,result:Object.fromEntries(this.results.map(e=>[e.path,e.toResult()]))}}async applyResult(e){if(e.type==="tag"){if(e.result)for(let t in e.result){let i=this.results.find(a=>a.path===t);!i||i.applyResult(e.result[t])}e.random&&(this.random=e.random),await this.render()}}},l6=class extends v4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;let{roll:s=1,tag:o}=i.value.match(N0).groups;this.tag=`#${o}`,this.rolls=(s&&!isNaN(Number(s))&&Number(s))??1,this.getFiles()}get replacer(){return`[[${this.result.basename}]]`}get tooltip(){return`${this.original} +`+this.tag);let i=Array.from(t).map(a=>`${this.rolls}d[[${a}]]${this.typeText}`);this.results=i.map(a=>new z4(this.plugin,a,{...this.lexeme,value:a,type:"section"},this.source,!1)),this.loaded=!0,this.trigger("loaded")}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText}),this.collapse){this.chosen=this.random??this.getRandomBetween(0,this.results.length-1);let e=this.results[this.chosen];this.random=null;let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}else for(let e of this.results){let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}}async roll(){return new Promise((e,t)=>{this.loaded?(this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)):this.on("loaded",()=>{this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)})})}get tooltip(){return this.original}toResult(){return{type:"tag",random:this.chosen,result:Object.fromEntries(this.results.map(e=>[e.path,e.toResult()]))}}async applyResult(e){if(e.type==="tag"){if(e.result)for(let t in e.result){let i=this.results.find(a=>a.path===t);!i||i.applyResult(e.result[t])}e.random&&(this.random=e.random),await this.render()}}},u6=class extends gt{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;let{roll:s=1,tag:o}=i.value.match(R0).groups;this.tag=`#${o}`,this.rolls=(s&&!isNaN(Number(s))&&Number(s))??1,this.getFiles()}get replacer(){return`[[${this.result.basename}]]`}get tooltip(){return`${this.original} ${this.result.basename}`}async roll(){return new Promise((e,t)=>{this.loaded?(this.result=this.links[this.getRandomBetween(0,this.links.length-1)],this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",()=>{this.result=this.links[this.getRandomBetween(0,this.links.length-1)],this.render(),this.trigger("new-result"),e(this.result)})})}async build(){this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText});let e=this.resultEl.createEl("a",{cls:"internal-link",text:this.result.basename});e.onclick=async t=>{t.stopPropagation(),this.plugin.app.workspace.openLinkText(this.result.path,this.plugin.app.workspace.getActiveFile()?.path,t.getModifierState("Control"))},e.onmouseenter=async t=>{this.plugin.app.workspace.trigger("link-hover",this,e,this.result.path,this.plugin.app.workspace.getActiveFile()?.path)}}async getFiles(){if(!this.plugin.dataviewAPI){new x2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? `+this.tag);let t=new Set(e.value.values.reduce((i,a)=>(a.type=="file"&&i.push(a.path),i),[]));if(t&&t.delete(this.source),!t||!t.size)throw new Error(`No files found with that tag. Is the tag correct? -`+this.tag);this.links=Array.from(t).map(i=>this.plugin.app.metadataCache.getFirstLinkpathDest(i,this.source)),this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"link",result:this.result.path}}async applyResult(e){if(e.type==="link"){if(e.result){let t=this.plugin.app.vault.getAbstractFileByPath(e.result);t&&t instanceof x2.TFile&&(this.result=t)}await this.render()}}},u6=class extends P0{constructor(e,t,i,a,r=!0,s=e.data.showDice){super(e,t,i,a,s);this.plugin=e;this.original=t;this.lexeme=i}get replacer(){return this.result}get tooltip(){return`${this.original} -${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:this.getEmbedClass()});if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(x2.MarkdownRenderer.renderMarkdown(e,t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(e).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(i,Ke)}}}async load(){await this.getOptions()}getPath(){let{groups:e}=this.lexeme.value.match(R0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=i.replace(/(\[|\])/g,""),this.types=a?.split(",")}async getOptions(){if(this.content=await this.plugin.app.vault.cachedRead(this.file),!this.content)throw new Error("Could not read file cache.");this.options=this.content.trim().split(` -`).map(e=>e.trim()).filter(e=>e&&e.length),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},wa=(n,e)=>n.start.col==e.start.col&&n.start.line==e.start.line&&n.start.offset==e.start.offset;var x4=w2(require("obsidian"));var Sa=class{constructor(){this.result="";this.combinedTooltip=""}},I4=class extends yt{constructor(){super(...arguments);this.combinedTooltip="";this.prettyTooltip=""}getPath(){let{groups:e}=this.lexeme.value.match(Ca),{diceRoll:t="1",link:i,block:a,header:r}=e;if(!i||!a)throw new Error("Could not parse link.");let s=t.match(/(\d*?)[Dd]$/);if(s){let[,o="1"]=s;this.rollsFormula=o}else this.rollsFormula=t;this.rolls=1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.block=a.replace(/(\^|#)/g,"").trim().toLowerCase(),this.header=r}get tooltip(){return this.prettyTooltip}get replacer(){return this.result}async build(){this.resultEl.empty();let e=[this.result];this.plugin.data.displayResultsInline&&e.unshift(this.inlineText);let t=createSpan();await x4.MarkdownRenderer.renderMarkdown(e.join(""),t,this.source,null);let i=this.resultEl.createSpan("embedded-table-result");t.childElementCount==1&&t.firstElementChild instanceof HTMLParagraphElement?i.append(...Array.from(t.firstElementChild.childNodes)):i.append(...Array.from(t.childNodes))}prettify(e){let t=/(.*?)(\(|\)|;|\|\|)(.*)/,i=" ",a=0,r="",s=e,o;for(;o=s.match(t);){let[,c,l,u]=o;r+=c,l==")"?(a--,r+=` +`+this.tag);this.links=Array.from(t).map(i=>this.plugin.app.metadataCache.getFirstLinkpathDest(i,this.source)),this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"link",result:this.result.path}}async applyResult(e){if(e.type==="link"){if(e.result){let t=this.plugin.app.vault.getAbstractFileByPath(e.result);t&&t instanceof x2.TFile&&(this.result=t)}await this.render()}}},h6=class extends I0{constructor(e,t,i,a,r=!0,s=e.data.showDice){super(e,t,i,a,s);this.plugin=e;this.original=t;this.lexeme=i}get replacer(){return this.result}get tooltip(){return`${this.original} +${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:this.getEmbedClass()});if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(x2.MarkdownRenderer.renderMarkdown(e,t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(e).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(i,Je)}}}transformResultsToString(){return this.results.join(` + +`)}async load(){await this.getOptions()}getPath(){let{groups:e}=this.lexeme.value.match(F0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=i.replace(/(\[|\])/g,""),this.types=a?.split(",")}async getOptions(){if(this.content=await this.plugin.app.vault.cachedRead(this.file),!this.content)throw new Error("Could not read file cache.");this.options=this.content.trim().split(` +`).map(e=>e.trim()).filter(e=>e&&e.length),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},wa=(n,e)=>n.start.col==e.start.col&&n.start.line==e.start.line&&n.start.offset==e.start.offset;var Mt=w2(require("obsidian"));var Sa=class{constructor(){this.result="";this.combinedTooltip=""}},kt=class extends C4{constructor(){super(...arguments);this.combinedTooltip="";this.prettyTooltip=""}getPath(){let{groups:e}=this.lexeme.value.match(Ca),{diceRoll:t="1",link:i,block:a,header:r}=e;if(!i||!a)throw new Error("Could not parse link.");let s=t.match(/(\d*?)[Dd]$/);if(s){let[,o="1"]=s;this.rollsFormula=o}else this.rollsFormula=t;this.rolls=1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.block=a.replace(/(\^|#)/g,"").trim().toLowerCase(),this.header=r}get tooltip(){return this.prettyTooltip}get replacer(){return this.result}async build(){this.resultEl.empty();let e=[this.result];this.plugin.data.displayResultsInline&&e.unshift(this.inlineText);let t=createSpan();await Mt.MarkdownRenderer.renderMarkdown(e.join(""),t,this.source,null);let i=this.resultEl.createSpan("embedded-table-result");t.childElementCount==1&&t.firstElementChild instanceof HTMLParagraphElement?i.append(...Array.from(t.firstElementChild.childNodes)):i.append(...Array.from(t.childNodes))}prettify(e){let t=/(.*?)(\(|\)|;|\|\|)(.*)/,i=" ",a=0,r="",s=e,o;for(;o=s.match(t);){let[,c,l,u]=o;r+=c,l==")"?(a--,r+=` `,r+=i.repeat(a),r+=")"):(l=="("?(a++,r+="("):l==";"?r+=",":l=="||"&&(r+="|"),r+=` -`,r+=i.repeat(a)),s=u}return r+=s,r}async getSubResult(e){let t=new Sa;typeof e=="number"?t.result=e.toString():t.result=e;let i=[];if(typeof e=="string"){let a=/(?:\`dice:)(.*?)(?:\`)/g,r=e.matchAll(a);for(let s of r){let o=s[1].trim(),c=await this.plugin.getRoller(o,this.source);await c.roll();let l=await this.getSubResult(c.result),u;if(l.result instanceof x4.TFile?u=l.result.basename:u=l.result,t.result=t.result.replace(s[0],u),c instanceof I4)i.push(c.combinedTooltip);else{let[f,h]=c.tooltip.split(` -`);i.push(f+" --> "+h)}}}return t.combinedTooltip=i.join(";"),t}async getResult(){let e=[],t=[],i=this.original;if(this.rollsFormula)try{let a=await this.plugin.getRoller(this.rollsFormula,this.source);if(!(a instanceof S2))return this.prettyTooltip="TableRoller only supports dice rolls to select multiple elements.",new x4.Notice(this.prettyTooltip),"ERROR";let r=a;await r.roll(),this.rolls=r.result,r.isStatic||(i=i.replace(this.rollsFormula,`${this.rollsFormula.trim()} --> ${r.resultText} > `))}catch{return this.prettyTooltip=`TableRoller: '${this.rollsFormula}' is not a valid dice roll.`,new x4.Notice(this.prettyTooltip),"ERROR"}for(let a=0;au[1]===void 0&&c===u[0]||c>=u[0]&&u[1]>=c);l&&(r=this.lookupRoller.original.trim()+" --> "+`${this.lookupRoller.resultText}${this.header?" | "+this.header:""}`.trim(),o=l[1])}else{let c=[...this.options],l=this.getRandomBetween(0,c.length-1);r=c.length+" rows --> [row "+(l+1)+"]",o=c[l]}s=await this.getSubResult(o),e.push(s.result),s.combinedTooltip&&(r+=" > ("+s.combinedTooltip+")"),t.push(r)}return t.length==0?this.combinedTooltip=i:t.length==1?this.combinedTooltip=i+" "+t.join(""):this.combinedTooltip=i+" ==> ("+t.join(" ||")+")",this.prettyTooltip=this.prettify(this.combinedTooltip),e.join("||")}async roll(){return new Promise(async e=>{this.loaded?(this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",async()=>{this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)})})}async load(){await this.getOptions()}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.blocks||!(this.block in this.cache.blocks))throw new Error(`Could not read file cache. Does the block reference exist? +`,r+=i.repeat(a)),s=u}return r+=s,r}async getSubResult(e){let t=new Sa;typeof e=="number"?t.result=e.toString():t.result=e;let i=[];if(typeof e=="string"){let a=/(?:\`dice:)(.*?)(?:\`)/g,r=e.matchAll(a);for(let s of r){let o=s[1].trim(),c=await this.plugin.getRoller(o,this.source);await c.roll();let l=await this.getSubResult(c.result),u;if(l.result instanceof Mt.TFile?u=l.result.basename:u=l.result,t.result=t.result.replace(s[0],u),c instanceof kt)i.push(c.combinedTooltip);else{let[f,h]=c.tooltip.split(` +`);i.push(f+" --> "+h)}}}return t.combinedTooltip=i.join(";"),t}async getResult(){let e=[],t=[],i=this.original;if(this.rollsFormula)try{let a=await this.plugin.getRoller(this.rollsFormula,this.source);if(!(a instanceof S2))return this.prettyTooltip="TableRoller only supports dice rolls to select multiple elements.",new Mt.Notice(this.prettyTooltip),"ERROR";let r=a;await r.roll(),this.rolls=r.result,r.isStatic||(i=i.replace(this.rollsFormula,`${this.rollsFormula.trim()} --> ${r.resultText} > `))}catch{return this.prettyTooltip=`TableRoller: '${this.rollsFormula}' is not a valid dice roll.`,new Mt.Notice(this.prettyTooltip),"ERROR"}for(let a=0;au[1]===void 0&&c===u[0]||c>=u[0]&&u[1]>=c);l&&(r=this.lookupRoller.original.trim()+" --> "+`${this.lookupRoller.resultText}${this.header?" | "+this.header:""}`.trim(),o=l[1])}else{let c=[...this.options],l=this.getRandomBetween(0,c.length-1);r=c.length+" rows --> [row "+(l+1)+"]",o=c[l]}s=await this.getSubResult(o),e.push(s.result),s.combinedTooltip&&(r+=" > ("+s.combinedTooltip+")"),t.push(r)}return t.length==0?this.combinedTooltip=i:t.length==1?this.combinedTooltip=i+" "+t.join(""):this.combinedTooltip=i+" ==> ("+t.join(" ||")+")",this.prettyTooltip=this.prettify(this.combinedTooltip),e.join("||")}async roll(){return new Promise(async e=>{this.loaded?(this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",async()=>{this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)})})}async load(){await this.getOptions()}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.blocks||!(this.block in this.cache.blocks))throw new Error(`Could not read file cache. Does the block reference exist? ${this.path} > ${this.block}`);let e=this.cache.sections?.find(t=>t.position==this.cache.blocks[this.block].position);if(this.position=this.cache.blocks[this.block].position,this.content=(await this.plugin.app.vault.cachedRead(this.file))?.slice(this.position.start.offset,this.position.end.offset),e&&e.type==="list")this.options=this.content.split(` -`);else{let t=kc(this.content);if(t.columns.size===2&&/dice:\s*([\s\S]+)\s*?/.test(Array.from(t.columns.keys())[0])){let i=await this.plugin.getRoller(Array.from(t.columns.keys())[0].split(":").pop(),this.source);i instanceof S2&&(this.lookupRoller=i,this.lookupRanges=t.rows.map(a=>{let[r,s]=a.replace(/\\\|/g,"{ESCAPED_PIPE}").split("|").map(l=>l.replace(/{ESCAPED_PIPE}/g,"\\|")).map(l=>l.trim()),[,o,c]=r.match(/(\d+)(?:[^\d]+?(\d+))?/)??[];if(!(!o&&!c))return[[Number(o),c?Number(c):void 0],s]}),this.isLookup=!0)}if(this.header==="xy"&&!t.columns.has("xy")){this.options=[];for(let i of Array.from(t.columns.values()).slice(1))this.options.push(...i)}else if(this.header&&t.columns.has(this.header))this.options=t.columns.get(this.header);else{if(this.header)throw new Error(`Header ${this.header} was not found in table ${this.path} > ${this.block}.`);this.options=t.rows}}this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"table",result:this.result}}async applyResult(e){e.type==="table"&&(e.result&&(this.result=e.result),await this.render())}},Ic=/^\|?([\s\S]+?)\|?$/,_a=/\|/g;function kc(n){let e=n.split(` -`),i=e.map(s=>(s.trim().match(Ic)??[,s.trim()])[1])[0].replace("\\|","{ESCAPED_PIPE}").split(_a),a=[],r=[];for(let s in i){let o=i[s];o.trim().length||(o=s),r.push([o.trim(),[]])}for(let s of e.slice(2)){let o=s.trim().replace(/\\\|/g,"{ESCAPED_PIPE}").split(_a).map(c=>c.replace(/{ESCAPED_PIPE}/g,"\\|")).map(c=>c.trim()).filter(c=>c.length);a.push(o.join(" | "));for(let c in o){let l=o[c].trim();!l.length||!r[c]||r[c][1].push(l)}}return{columns:new Map(r),rows:a}}var S1=w2(require("obsidian"));var h6=class extends S1.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t;this.plugin=t}async display(){let{containerEl:e}=this;e.empty(),e.addClass("dice-roller-settings"),e.createEl("h2",{text:"Dice Roller Settings"}),this.buildGenerics(e.createDiv()),this.buildDisplay(e.createDiv()),this.buildDice(e.createDiv()),this.buildTables(e.createDiv()),this.buildSections(e.createDiv()),this.buildTags(e.createDiv()),this.buildView(e.createDiv()),this.buildRender(e.createDiv()),this.buildFormulaSettings(e.createDiv("dice-roller-setting-additional-container")),e.createDiv("coffee").createEl("a",{href:"https://www.buymeacoffee.com/valentine195"}).createEl("img",{attr:{src:"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=\u2615&slug=valentine195&button_colour=e3e7ef&font_colour=262626&font_family=Inter&outline_colour=262626&coffee_colour=ff0000"}})}buildGenerics(e){e.empty(),new S1.Setting(e).setName("Globally Save Results").setDesc(createFragment(t=>{t.createSpan({text:"Dice results will be saved by default. This can be overridden using "}),t.createEl("code",{text:"dice-: formula"}),t.createEl("p",{text:"Please note that the plugin will attempt to save the result but may not be able to."})})).addToggle(t=>{t.setValue(this.plugin.data.persistResults),t.onChange(async i=>{this.plugin.data.persistResults=i,await this.plugin.saveSettings()})})}buildDisplay(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice Display"),new S1.Setting(e).setName("Display Formula With Results").setDesc("Both the formula and the results will both be displayed in preview mode.").addToggle(t=>{t.setValue(this.plugin.data.displayResultsInline),t.onChange(async i=>{this.plugin.data.displayResultsInline=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Dice Button With Results").setDesc("A dice button will appear next to results.").addToggle(t=>{t.setValue(this.plugin.data.showDice),t.onChange(async i=>{this.plugin.data.showDice=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Add Formula When Using Modify Dice").setDesc(createFragment(t=>{t.createSpan({text:"Both the formula and the results will both be added to the note when using "}),t.createEl("code",{text:"dice-mod"}),t.createSpan({text:"."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaForMod),t.onChange(async i=>{this.plugin.data.displayFormulaForMod=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Formula in Parentheses After").setDesc(createFragment(t=>{t.createSpan({text:"For example, "}),t.createEl("code",{text:"`dice: 1d6`"}),t.createSpan({text:" will become "});let i=t.createSpan("dice-roller");i.createSpan({cls:"dice-roller-result",text:"3"}),(0,S1.setIcon)(i.createSpan("dice-roller-button"),Y2),t.createSpan({text:" (1d6). This only affects Dice Rollers."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaAfter),t.onChange(async i=>{this.plugin.data.displayFormulaAfter=i,await this.plugin.saveSettings()})})}buildDice(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice Rollers"),new S1.Setting(e).setName("Default Face").setDesc("Use this as the number of faces when it is omitted.").addText(t=>{t.setValue(`${this.plugin.data.defaultFace}`),t.inputEl.onblur=async()=>{isNaN(Number(t.inputEl.value))&&new S1.Notice("The default face must be a number."),this.plugin.data.defaultFace=Number(t.inputEl.value),await this.plugin.saveSettings()}}),new S1.Setting(e).setName("Round Results").setDesc("Determine the rounding behavior for dice results.").addDropdown(t=>{t.addOptions(pe).setValue(this.plugin.data.round).onChange(i=>{this.plugin.data.round=i,this.plugin.saveSettings()})}),new S1.Setting(e).setName("Always Render Dice").setDesc(createFragment(t=>{t.createSpan({text:"Dice rolled in notes will always be rendered. Use the "}),t.createEl("code",{text:"|norender"}),t.createSpan({text:" flag to prevent it."})})).addToggle(t=>{t.setValue(this.plugin.data.renderAllDice).onChange(i=>{this.plugin.data.renderAllDice=i,this.plugin.saveSettings()})})}buildTables(e){e.empty(),new S1.Setting(e).setHeading().setName("Table Rollers"),new S1.Setting(e).setName("Display Lookup Table Roll").setDesc("Lookup table rolls will display the rolled number along with the result.").addToggle(t=>{t.setValue(this.plugin.data.displayLookupRoll),t.onChange(async i=>{this.plugin.data.displayLookupRoll=i,await this.plugin.saveSettings()})})}buildSections(e){e.empty(),new S1.Setting(e).setHeading().setName("Section Rollers"),new S1.Setting(e).setName("Add Copy Button to Section Results").setDesc("Randomly rolled sections will have a copy-content button to easy add result to clipboard.").addToggle(t=>{t.setValue(this.plugin.data.copyContentButton),t.onChange(async i=>{this.plugin.data.copyContentButton=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display As Embeds").setDesc("Sections returned from Section & Tag Rollers will display as embedded fields.").addToggle(t=>{t.setValue(this.plugin.data.displayAsEmbed),t.onChange(async i=>{this.plugin.data.displayAsEmbed=i,await this.plugin.saveSettings()})})}buildTags(e){e.empty(),new S1.Setting(e).setHeading().setName("Tag Rollers"),new S1.Setting(e).setName("Roll All Files for Tags").setDesc("Return a result for each file when rolling tags.").addToggle(t=>{t.setValue(this.plugin.data.returnAllTags),t.onChange(async i=>{this.plugin.data.returnAllTags=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Always Return Links for Tags").setDesc("Enables random link rolling with the link parameter. Override by specifying a section type.").addToggle(t=>{t.setValue(this.plugin.data.rollLinksForTags),t.onChange(async i=>{this.plugin.data.rollLinksForTags=i,await this.plugin.saveSettings()})})}buildView(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice View"),new S1.Setting(e).setName("Open Dice View on Startup").setDesc("The dice view can always be opened using the command from the command palette.").addToggle(t=>{t.setValue(this.plugin.data.showLeafOnStartup),t.onChange(async i=>{this.plugin.data.showLeafOnStartup=i,await this.plugin.saveSettings()})})}buildRender(e){e.empty(),new S1.Setting(e).setHeading().setName("Graphical Dice"),new S1.Setting(e).setName("Display graphics for Dice View Rolls").setDesc("Dice rolls from dice view will be displayed on screen.").addToggle(a=>{a.setValue(this.plugin.data.renderer),a.onChange(async r=>{this.plugin.data.renderer=r,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Time for Dice Graphics").setDesc("Rendered dice will stay on screen for this number of milliseconds. Leave blank to require a click to clear dice.").addText(a=>{a.inputEl.setAttr("type","number"),a.inputEl.onblur=r=>{Number(a.getValue())<0&&(new S1.Notice("Render time cannot be less than 0."),a.setValue("0"))},a.setValue(`${this.plugin.data.renderTime}`),a.onChange(async r=>{r&&Number(r)<0||isNaN(Number(r))||(this.plugin.data.renderTime=Number(r),await this.plugin.saveSettings())})}).addExtraButton(a=>{a.setIcon("reset").setTooltip("Reset to Default").onClick(async()=>{this.plugin.data.renderTime=f6.renderTime,await this.plugin.saveSettings(),this.buildRender(e)})}),new S1.Setting(e).setName("Dice Base Color").setDesc("Rendered dice will be this color.").controlEl.createEl("input",{type:"color",value:this.plugin.data.diceColor},a=>{a.value=this.plugin.data.diceColor,a.onchange=async({target:r})=>{let s=r.value;this.plugin.data.diceColor=s,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors")}}),new S1.Setting(e).setName("Dice Text Color").setDesc("Rendered dice will use this color for their numbers.").controlEl.createEl("input",{type:"color",value:this.plugin.data.textColor},a=>{a.value=this.plugin.data.textColor,a.onchange=async({target:r})=>{let s=r.value;!s||(this.plugin.data.textColor=s,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors"))}})}buildFormulaSettings(e){e.empty(),new S1.Setting(e).setHeading().setName("Saved Formulas");let t=e.createDiv();new S1.Setting(t).setName("Add Formula").setDesc("Add a new formula shortcut.").addButton(r=>r.setTooltip("Add Formula").setButtonText("+").onClick(async()=>{let o=await this.buildFormulaForm(t);o&&(this.plugin.data.formulas[o.alias]=o.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())}));let i=e.createDiv("additional"),a=this.plugin.data.formulas;for(let[r,s]of Object.entries(a)){let o=new S1.Setting(i).setName(r);o.controlEl.createSpan({text:s}),o.addExtraButton(c=>c.setIcon("pencil").setTooltip("Edit").onClick(async()=>{let l=await this.buildFormulaForm(t,{alias:r,formula:s});l&&(delete this.plugin.data.formulas[r],this.plugin.data.formulas[l.alias]=l.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())})).addExtraButton(c=>c.setIcon("trash").setTooltip("Delete").onClick(async()=>{delete this.plugin.data.formulas[r],await this.plugin.saveSettings(),this.buildFormulaSettings(e)}))}Object.values(a).length||i.createSpan({text:"Create a formula to see it here!",cls:"no-formulas"})}async buildFormulaForm(e,t={alias:null,formula:null}){return new Promise(i=>{let a=e.createDiv("add-new-formula"),r=a.createDiv("formula-data");new S1.Setting(r).setName("Alias").addText(o=>{o.setValue(t.alias).onChange(c=>t.alias=c)}),new S1.Setting(r).setName("Formula").addText(o=>{o.setValue(t.formula).onChange(c=>t.formula=c)});let s=a.createDiv("formula-buttons");new S1.Setting(s).addButton(o=>o.setCta().setButtonText("Save").onClick(async()=>{a.detach(),i(t)})).addExtraButton(o=>o.setIcon("cross").setTooltip("Cancel").onClick(()=>{a.detach(),i(null)}))})}};var L1=w2(require("obsidian"));var M4="DICE_ROLLER_VIEW",Uc='',Oc='',Gc='',qc='',Wc='',jc='',Xc='';(0,L1.addIcon)("d4",Uc);(0,L1.addIcon)("d6",Oc);(0,L1.addIcon)("d8",Gc);(0,L1.addIcon)("d10",qc);(0,L1.addIcon)("d12",Wc);(0,L1.addIcon)("d20",jc);(0,L1.addIcon)("d100",Xc);(0,L1.addIcon)("dice-roller-save",'');(0,L1.addIcon)("dice-roller-plus",'');(0,L1.addIcon)("dice-roller-minus",'');var Je=class extends L1.ItemView{constructor(e,t){super(t);this.plugin=e;this.leaf=t;this.dice=Je.DICE();this.custom="";this.adv=!1;this.dis=!1;this.add=0;this.contentEl.addClass("dice-roller-view"),this.registerEvent(this.plugin.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()}))}static DICE(){return{d4:0,d6:0,d8:0,d10:0,d12:0,d20:0,d100:0}}get customFormulas(){return this.plugin.data.customFormulas}get renderer(){return this.plugin.renderer}async onOpen(){this.display()}async display(){this.contentEl.empty(),this.gridEl=this.contentEl.createDiv("dice-roller-grid"),this.formulaEl=this.contentEl.createDiv("dice-roller-formula");let e=this.contentEl.createDiv("dice-roller-results-container"),t=e.createDiv("dice-roller-results-header");t.createEl("h4",{text:"Results"}),new L1.ExtraButtonComponent(t.createDiv("clear-all")).setIcon("trash").setTooltip("Clear All").onClick(()=>{this.resultEl.empty(),this.resultEl.append(this.noResultsEl)}),this.resultEl=e.createDiv("dice-roller-results"),this.noResultsEl=this.resultEl.createSpan({text:"No results yet! Roll some dice to get started :)"}),this.buildButtons(),this.buildFormula()}buildButtons(){this.gridEl.empty();let e=this.gridEl.createDiv("dice-buttons");for(let o in this.dice){let c=new L1.ExtraButtonComponent(e.createDiv("dice-button")).setIcon(o);c.extraSettingsEl.onclick=async l=>{let u=l.getModifierState("Shift")?-1:1;this.dice[o]+=u,this.setFormula();let f=await this.plugin.getRoller(this.formulaComponent.inputEl.value,"view");f instanceof S2&&(this.stack=f)}}let t=this.gridEl.createDiv("advantage-disadvantage"),i=new L1.ButtonComponent(t).setButtonText("ADV").onClick(()=>{this.adv=!this.adv,this.dis=!1,this.adv?(i.setCta(),a.removeCta()):i.removeCta(),this.setFormula()}),a=new L1.ButtonComponent(t).setButtonText("DIS").onClick(()=>{this.dis=!this.dis,this.dis?(a.setCta(),i.removeCta()):a.removeCta(),this.adv=!1,this.setFormula()}),r=this.gridEl.createDiv("dice-context").createDiv("add-subtract");new L1.ExtraButtonComponent(r).setIcon("dice-roller-minus").onClick(()=>{this.add-=1,s.setValue(`${this.add}`),this.setFormula()});let s=new L1.TextComponent(r).setValue(`${this.add?this.add:""}`).onChange(o=>{isNaN(Number(o))||(this.add=Number(o)),this.setFormula()});if(new L1.ExtraButtonComponent(r).setIcon("dice-roller-plus").onClick(()=>{this.add+=1,s.setValue(`${this.add}`),this.setFormula()}),this.customFormulas.length){let o=this.gridEl.createDiv("dice-roller-results-container");o.createDiv("dice-roller-results-header").createEl("h4",{text:"Saved Formulas"});for(let l of this.customFormulas){let u=o.createDiv("dice-custom-formula-container"),f=u.createDiv("dice-custom-formula");new L1.ExtraButtonComponent(f).setIcon(Y2).setTooltip("Roll").onClick(()=>this.roll(l)),f.createSpan({text:l}),new L1.ExtraButtonComponent(u).setIcon("trash").setTooltip("Remove").onClick(()=>{this.plugin.data.customFormulas=this.plugin.data.customFormulas.filter(h=>h!=l),this.plugin.saveSettings(),this.buildButtons()})}}}async roll(e=this.formulaComponent.inputEl.value){if(!e)return;this.rollButton.setDisabled(!0);let t=await this.plugin.getRoller(e,"view");if(!(t instanceof S2)){new L1.Notice("The Dice View only supports dice rolls.");return}if(await t.roll(),!t.dice.length){new L1.Notice("Invalid formula.");return}try{this.plugin.data.renderer&&(this.addChild(this.renderer),this.renderer.setDice(t),await this.renderer.start(),t.recalculate())}catch(i){new L1.Notice("There was an error rendering the roll."),console.error(i)}this.rollButton.setDisabled(!1),this.addResult({result:t.result,original:t.original,resultText:t.resultText}),this.dice=Je.DICE(),this.add=null,this.adv=!1,this.dis=!1,this.buildButtons(),this.setFormula()}buildFormula(){this.formulaEl.empty(),this.formulaComponent=new L1.TextAreaComponent(this.formulaEl).setPlaceholder("Dice Formula"),this.formulaComponent.onChange((0,L1.debounce)(async t=>{},500,!0));let e=this.formulaEl.createDiv("action-buttons");this.saveButton=new L1.ButtonComponent(e).setIcon("plus-with-circle").setCta().setTooltip("Save Formula").onClick(()=>this.save()),this.saveButton.buttonEl.addClass("dice-roller-roll"),this.rollButton=new L1.ButtonComponent(e).setIcon(Y2).setCta().setTooltip("Roll").onClick(()=>this.roll()),this.rollButton.buttonEl.addClass("dice-roller-roll")}save(){!this.formulaComponent.inputEl.value||(this.plugin.data.customFormulas.push(this.formulaComponent.inputEl.value),this.buildButtons(),this.plugin.saveSettings())}addResult(e){this.noResultsEl&&this.noResultsEl.detach();let t=createDiv("view-result");t.createSpan({text:e.original}),t.createEl("strong",{text:`${e.result}`,attr:{"aria-label":e.resultText}});let i=t.createDiv("result-context");i.createEl("em",{text:new Date().toLocaleString()}),new L1.ExtraButtonComponent(i).setIcon("trash").onClick(()=>{t.detach(),this.resultEl.children.length===0&&this.resultEl.prepend(this.noResultsEl)}),new L1.ExtraButtonComponent(i).setIcon(Ke).setTooltip("Copy Result").onClick(async()=>{await navigator.clipboard.writeText(`${e.result}`)}).extraSettingsEl.addClass("dice-content-copy"),new L1.ExtraButtonComponent(i).setIcon(Y2).setTooltip("Roll Again").onClick(()=>this.roll(e.original)).extraSettingsEl.addClass("dice-result-reroll"),this.resultEl.prepend(t)}get formulaString(){let e=[],t=Object.entries(this.dice).filter(([a,r])=>r!=0);if(!t.length)return"";t.sort((a,r)=>Number(r[0].slice(1))-Number(a[0].slice(1)));let i=t.shift();return e.push(`${i[1]}${i[0]}`),this.adv?e.push("kh"):this.dis&&e.push("dh"),t.length&&e.push(...t.map(([a,r])=>`${r>0?"+":"-"}${Math.abs(r)}${a}`)),this.add&&this.add!=0&&(e.push(this.add>0?"+":"-"),e.push(Math.abs(this.add))),e.join("")}setFormula(){this.formulaComponent.setValue(this.formulaString)}getDisplayText(){return"Dice Roller"}getViewType(){return M4}getIcon(){return Y2}async onClose(){await super.onClose(),this.renderer.unload()}};var Xt=w2(require("obsidian"));var _2=class{constructor(e=[0,0,0,0,0,0,0,0,0]){this.elements=void 0,this.elements=e}identity(){let e=this.elements;e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1}setZero(){let e=this.elements;e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0}setTrace(e){let t=this.elements;t[0]=e.x,t[4]=e.y,t[8]=e.z}getTrace(e=new y){let t=this.elements;return e.x=t[0],e.y=t[4],e.z=t[8],e}vmult(e,t=new y){let i=this.elements,a=e.x,r=e.y,s=e.z;return t.x=i[0]*a+i[1]*r+i[2]*s,t.y=i[3]*a+i[4]*r+i[5]*s,t.z=i[6]*a+i[7]*r+i[8]*s,t}smult(e){for(let t=0;t0){let r=1/a;this.x*=r,this.y*=r,this.z*=r}else this.x=0,this.y=0,this.z=0;return a}unit(e=new y){let t=this.x,i=this.y,a=this.z,r=Math.sqrt(t*t+i*i+a*a);return r>0?(r=1/r,e.x=t*r,e.y=i*r,e.z=a*r):(e.x=1,e.y=0,e.z=0),e}length(){let e=this.x,t=this.y,i=this.z;return Math.sqrt(e*e+t*t+i*i)}lengthSquared(){return this.dot(this)}distanceTo(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z;return Math.sqrt((r-t)*(r-t)+(s-i)*(s-i)+(o-a)*(o-a))}distanceSquared(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z;return(r-t)*(r-t)+(s-i)*(s-i)+(o-a)*(o-a)}scale(e,t=new y){let i=this.x,a=this.y,r=this.z;return t.x=e*i,t.y=e*a,t.z=e*r,t}vmul(e,t=new y){return t.x=e.x*this.x,t.y=e.y*this.y,t.z=e.z*this.z,t}addScaledVector(e,t,i=new y){return i.x=this.x+e*t.x,i.y=this.y+e*t.y,i.z=this.z+e*t.z,i}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isZero(){return this.x===0&&this.y===0&&this.z===0}negate(e=new y){return e.x=-this.x,e.y=-this.y,e.z=-this.z,e}tangents(e,t){let i=this.length();if(i>0){let a=Yc,r=1/i;a.set(this.x*r,this.y*r,this.z*r);let s=$c;Math.abs(a.x)<.9?(s.set(1,0,0),a.cross(s,e)):(s.set(0,1,0),a.cross(s,e)),a.cross(e,t)}else e.set(1,0,0),t.set(0,1,0)}toString(){return this.x+","+this.y+","+this.z}toArray(){return[this.x,this.y,this.z]}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}lerp(e,t,i){let a=this.x,r=this.y,s=this.z;i.x=a+(e.x-a)*t,i.y=r+(e.y-r)*t,i.z=s+(e.z-s)*t}almostEquals(e,t=1e-6){return!(Math.abs(this.x-e.x)>t||Math.abs(this.y-e.y)>t||Math.abs(this.z-e.z)>t)}almostZero(e=1e-6){return!(Math.abs(this.x)>e||Math.abs(this.y)>e||Math.abs(this.z)>e)}isAntiparallelTo(e,t){return this.negate(Ea),Ea.almostEquals(e,t)}clone(){return new y(this.x,this.y,this.z)}};y.ZERO=void 0;y.UNIT_X=void 0;y.UNIT_Y=void 0;y.UNIT_Z=void 0;y.ZERO=new y(0,0,0);y.UNIT_X=new y(1,0,0);y.UNIT_Y=new y(0,1,0);y.UNIT_Z=new y(0,0,1);var Yc=new y,$c=new y,Ea=new y,E2=class{constructor(e={}){this.lowerBound=void 0,this.upperBound=void 0,this.lowerBound=new y,this.upperBound=new y,e.lowerBound&&this.lowerBound.copy(e.lowerBound),e.upperBound&&this.upperBound.copy(e.upperBound)}setFromPoints(e,t,i,a){let r=this.lowerBound,s=this.upperBound,o=i;r.copy(e[0]),o&&o.vmult(r,r),s.copy(r);for(let c=1;cs.x&&(s.x=l.x),l.xs.y&&(s.y=l.y),l.ys.z&&(s.z=l.z),l.z=r.x&&t.y<=a.y&&i.y>=r.y&&t.z<=a.z&&i.z>=r.z}getCorners(e,t,i,a,r,s,o,c){let l=this.lowerBound,u=this.upperBound;e.copy(l),t.set(u.x,l.y,l.z),i.set(u.x,u.y,l.z),a.set(l.x,u.y,u.z),r.set(u.x,l.y,u.z),s.set(l.x,u.y,l.z),o.set(l.x,l.y,u.z),c.copy(u)}toLocalFrame(e,t){let i=Da,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,s,o,c,l,u,f);for(let h=0;h!==8;h++){let p=i[h];e.pointToLocal(p,p)}return t.setFromPoints(i)}toWorldFrame(e,t){let i=Da,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,s,o,c,l,u,f);for(let h=0;h!==8;h++){let p=i[h];e.pointToWorld(p,p)}return t.setFromPoints(i)}overlapsRay(e){let{direction:t,from:i}=e,a=1/t.x,r=1/t.y,s=1/t.z,o=(this.lowerBound.x-i.x)*a,c=(this.upperBound.x-i.x)*a,l=(this.lowerBound.y-i.y)*r,u=(this.upperBound.y-i.y)*r,f=(this.lowerBound.z-i.z)*s,h=(this.upperBound.z-i.z)*s,p=Math.max(Math.max(Math.min(o,c),Math.min(l,u)),Math.min(f,h)),v=Math.min(Math.min(Math.max(o,c),Math.max(l,u)),Math.max(f,h));return!(v<0||p>v)}},La=new y,Da=[new y,new y,new y,new y,new y,new y,new y,new y],I0=class{constructor(){this.matrix=void 0,this.matrix=[]}get(e,t){let{index:i}=e,{index:a}=t;if(a>i){let r=a;a=i,i=r}return this.matrix[(i*(i+1)>>1)+a-1]}set(e,t,i){let{index:a}=e,{index:r}=t;if(r>a){let s=r;r=a,a=s}this.matrix[(a*(a+1)>>1)+r-1]=i?1:0}reset(){for(let e=0,t=this.matrix.length;e!==t;e++)this.matrix[e]=0}setNumObjects(e){this.matrix.length=e*(e-1)>>1}},k0=class{constructor(){this._listeners=void 0}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;return i[e]===void 0&&(i[e]=[]),i[e].includes(t)||i[e].push(t),this}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return!!(i[e]!==void 0&&i[e].includes(t))}hasAnyEventListener(e){return this._listeners===void 0?!1:this._listeners[e]!==void 0}removeEventListener(e,t){if(this._listeners===void 0)return this;let i=this._listeners;if(i[e]===void 0)return this;let a=i[e].indexOf(t);return a!==-1&&i[e].splice(a,1),this}dispatchEvent(e){if(this._listeners===void 0)return this;let i=this._listeners[e.type];if(i!==void 0){e.target=this;for(let a=0,r=i.length;a.499&&(i=2*Math.atan2(s,l),a=Math.PI/2,r=0),u<-.499&&(i=-2*Math.atan2(s,l),a=-Math.PI/2,r=0),i===void 0){let f=s*s,h=o*o,p=c*c;i=Math.atan2(2*o*l-2*s*c,1-2*h-2*p),a=Math.asin(2*u),r=Math.atan2(2*s*l-2*o*c,1-2*f-2*p)}break;default:throw new Error("Euler order "+t+" not supported yet.")}e.y=i,e.z=a,e.x=r}setFromEuler(e,t,i,a="XYZ"){let r=Math.cos(e/2),s=Math.cos(t/2),o=Math.cos(i/2),c=Math.sin(e/2),l=Math.sin(t/2),u=Math.sin(i/2);return a==="XYZ"?(this.x=c*s*o+r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o-c*l*u):a==="YXZ"?(this.x=c*s*o+r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o+c*l*u):a==="ZXY"?(this.x=c*s*o-r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o-c*l*u):a==="ZYX"?(this.x=c*s*o-r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o+c*l*u):a==="YZX"?(this.x=c*s*o+r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o-c*l*u):a==="XZY"&&(this.x=c*s*o-r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o+c*l*u),this}clone(){return new O1(this.x,this.y,this.z,this.w)}slerp(e,t,i=new O1){let a=this.x,r=this.y,s=this.z,o=this.w,c=e.x,l=e.y,u=e.z,f=e.w,h,p,v,g,x;return p=a*c+r*l+s*u+o*f,p<0&&(p=-p,c=-c,l=-l,u=-u,f=-f),1-p>1e-6?(h=Math.acos(p),v=Math.sin(h),g=Math.sin((1-t)*h)/v,x=Math.sin(t*h)/v):(g=1-t,x=t),i.x=g*a+x*c,i.y=g*r+x*l,i.z=g*s+x*u,i.w=g*o+x*f,i}integrate(e,t,i,a=new O1){let r=e.x*i.x,s=e.y*i.y,o=e.z*i.z,c=this.x,l=this.y,u=this.z,f=this.w,h=t*.5;return a.x+=h*(r*f+s*u-o*l),a.y+=h*(s*f+o*c-r*u),a.z+=h*(o*f+r*l-s*c),a.w+=h*(-r*c-s*l-o*u),a}},Kc=new y,Jc=new y,Qc={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256},c1=class{constructor(e={}){this.id=void 0,this.type=void 0,this.boundingSphereRadius=void 0,this.collisionResponse=void 0,this.collisionFilterGroup=void 0,this.collisionFilterMask=void 0,this.material=void 0,this.body=void 0,this.id=c1.idCounter++,this.type=e.type||0,this.boundingSphereRadius=0,this.collisionResponse=e.collisionResponse?e.collisionResponse:!0,this.collisionFilterGroup=e.collisionFilterGroup!==void 0?e.collisionFilterGroup:1,this.collisionFilterMask=e.collisionFilterMask!==void 0?e.collisionFilterMask:-1,this.material=e.material?e.material:null,this.body=null}updateBoundingSphereRadius(){throw"computeBoundingSphereRadius() not implemented for shape type "+this.type}volume(){throw"volume() not implemented for shape type "+this.type}calculateLocalInertia(e,t){throw"calculateLocalInertia() not implemented for shape type "+this.type}calculateWorldAABB(e,t,i,a){throw"calculateWorldAABB() not implemented for shape type "+this.type}};c1.idCounter=0;c1.types=Qc;var N1=class{constructor(e={}){this.position=void 0,this.quaternion=void 0,this.position=new y,this.quaternion=new O1,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion)}pointToLocal(e,t){return N1.pointToLocalFrame(this.position,this.quaternion,e,t)}pointToWorld(e,t){return N1.pointToWorldFrame(this.position,this.quaternion,e,t)}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}static pointToLocalFrame(e,t,i,a=new y){return i.vsub(e,a),t.conjugate(Ta),Ta.vmult(a,a),a}static pointToWorldFrame(e,t,i,a=new y){return t.vmult(i,a),a.vadd(e,a),a}static vectorToWorldFrame(e,t,i=new y){return e.vmult(t,i),i}static vectorToLocalFrame(e,t,i,a=new y){return t.w*=-1,t.vmult(i,a),t.w*=-1,a}},Ta=new O1,Qe=class extends c1{constructor(e={}){let{vertices:t=[],faces:i=[],normals:a=[],axes:r,boundingSphereRadius:s}=e;super({type:c1.types.CONVEXPOLYHEDRON});this.vertices=void 0,this.faces=void 0,this.faceNormals=void 0,this.worldVertices=void 0,this.worldVerticesNeedsUpdate=void 0,this.worldFaceNormals=void 0,this.worldFaceNormalsNeedsUpdate=void 0,this.uniqueAxes=void 0,this.uniqueEdges=void 0,this.vertices=t,this.faces=i,this.faceNormals=a,this.faceNormals.length===0&&this.computeNormals(),s?this.boundingSphereRadius=s:this.updateBoundingSphereRadius(),this.worldVertices=[],this.worldVerticesNeedsUpdate=!0,this.worldFaceNormals=[],this.worldFaceNormalsNeedsUpdate=!0,this.uniqueAxes=r?r.slice():null,this.uniqueEdges=[],this.computeEdges()}computeEdges(){let e=this.faces,t=this.vertices,i=this.uniqueEdges;i.length=0;let a=new y;for(let r=0;r!==e.length;r++){let s=e[r],o=s.length;for(let c=0;c!==o;c++){let l=(c+1)%o;t[s[c]].vsub(t[s[l]],a),a.normalize();let u=!1;for(let f=0;f!==i.length;f++)if(i[f].almostEquals(a)||i[f].almostEquals(a)){u=!0;break}u||i.push(a.clone())}}}computeNormals(){this.faceNormals.length=this.faces.length;for(let e=0;eh&&(h=g,f=v)}let p=[];for(let v=0;v=0&&this.clipFaceAgainstHull(s,e,t,p,o,c,l)}findSeparatingAxis(e,t,i,a,r,s,o,c){let l=new y,u=new y,f=new y,h=new y,p=new y,v=new y,g=Number.MAX_VALUE,x=this;if(x.uniqueAxes)for(let m=0;m!==x.uniqueAxes.length;m++){i.vmult(x.uniqueAxes[m],l);let d=x.testSepAxis(l,e,t,i,a,r);if(d===!1)return!1;d0&&s.negate(s),!0}testSepAxis(e,t,i,a,r,s){let o=this;Qe.project(o,e,i,a,U0),Qe.project(t,e,r,s,O0);let c=U0[0],l=U0[1],u=O0[0],f=O0[1];if(c0?1/t:0,this.material=e.material||null,this.linearDamping=typeof e.linearDamping=="number"?e.linearDamping:.01,this.type=t<=0?i1.STATIC:i1.DYNAMIC,typeof e.type==typeof i1.STATIC&&(this.type=e.type),this.allowSleep=typeof e.allowSleep!="undefined"?e.allowSleep:!0,this.sleepState=i1.AWAKE,this.sleepSpeedLimit=typeof e.sleepSpeedLimit!="undefined"?e.sleepSpeedLimit:.1,this.sleepTimeLimit=typeof e.sleepTimeLimit!="undefined"?e.sleepTimeLimit:1,this.timeLastSleepy=0,this.wakeUpAfterNarrowphase=!1,this.torque=new y,this.quaternion=new O1,this.initQuaternion=new O1,this.previousQuaternion=new O1,this.interpolatedQuaternion=new O1,e.quaternion&&(this.quaternion.copy(e.quaternion),this.initQuaternion.copy(e.quaternion),this.previousQuaternion.copy(e.quaternion),this.interpolatedQuaternion.copy(e.quaternion)),this.angularVelocity=new y,e.angularVelocity&&this.angularVelocity.copy(e.angularVelocity),this.initAngularVelocity=new y,this.shapes=[],this.shapeOffsets=[],this.shapeOrientations=[],this.inertia=new y,this.invInertia=new y,this.invInertiaWorld=new _2,this.invMassSolve=0,this.invInertiaSolve=new y,this.invInertiaWorldSolve=new _2,this.fixedRotation=typeof e.fixedRotation!="undefined"?e.fixedRotation:!1,this.angularDamping=typeof e.angularDamping!="undefined"?e.angularDamping:.01,this.linearFactor=new y(1,1,1),e.linearFactor&&this.linearFactor.copy(e.linearFactor),this.angularFactor=new y(1,1,1),e.angularFactor&&this.angularFactor.copy(e.angularFactor),this.aabb=new E2,this.aabbNeedsUpdate=!0,this.boundingRadius=0,this.wlambda=new y,this.isTrigger=Boolean(e.isTrigger),e.shape&&this.addShape(e.shape),this.updateMassProperties()}wakeUp(){let e=this.sleepState;this.sleepState=i1.AWAKE,this.wakeUpAfterNarrowphase=!1,e===i1.SLEEPING&&this.dispatchEvent(i1.wakeupEvent)}sleep(){this.sleepState=i1.SLEEPING,this.velocity.set(0,0,0),this.angularVelocity.set(0,0,0),this.wakeUpAfterNarrowphase=!1}sleepTick(e){if(this.allowSleep){let t=this.sleepState,i=this.velocity.lengthSquared()+this.angularVelocity.lengthSquared(),a=this.sleepSpeedLimit**2;t===i1.AWAKE&&ia?this.wakeUp():t===i1.SLEEPY&&e-this.timeLastSleepy>this.sleepTimeLimit&&(this.sleep(),this.dispatchEvent(i1.sleepEvent))}}updateSolveMassProperties(){this.sleepState===i1.SLEEPING||this.type===i1.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve.setZero(),this.invInertiaWorldSolve.setZero()):(this.invMassSolve=this.invMass,this.invInertiaSolve.copy(this.invInertia),this.invInertiaWorldSolve.copy(this.invInertiaWorld))}pointToLocalFrame(e,t=new y){return e.vsub(this.position,t),this.quaternion.conjugate().vmult(t,t),t}vectorToLocalFrame(e,t=new y){return this.quaternion.conjugate().vmult(e,t),t}pointToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t.vadd(this.position,t),t}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}addShape(e,t,i){let a=new y,r=new O1;return t&&a.copy(t),i&&r.copy(i),this.shapes.push(e),this.shapeOffsets.push(a),this.shapeOrientations.push(r),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=this,this}removeShape(e){let t=this.shapes.indexOf(e);return t===-1?(console.warn("Shape does not belong to the body"),this):(this.shapes.splice(t,1),this.shapeOffsets.splice(t,1),this.shapeOrientations.splice(t,1),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=null,this)}updateBoundingRadius(){let e=this.shapes,t=this.shapeOffsets,i=e.length,a=0;for(let r=0;r!==i;r++){let s=e[r];s.updateBoundingSphereRadius();let o=t[r].length(),c=s.boundingSphereRadius;o+c>a&&(a=o+c)}this.boundingRadius=a}updateAABB(){let e=this.shapes,t=this.shapeOffsets,i=this.shapeOrientations,a=e.length,r=i7,s=a7,o=this.quaternion,c=this.aabb,l=r7;for(let u=0;u!==a;u++){let f=e[u];o.vmult(t[u],r),r.vadd(this.position,r),o.mult(i[u],s),f.calculateWorldAABB(r,s,l.lowerBound,l.upperBound),u===0?c.copy(l):c.extend(l)}this.aabbNeedsUpdate=!1}updateInertiaWorld(e){let t=this.invInertia;if(!(t.x===t.y&&t.y===t.z&&!e)){let i=n7,a=s7;i.setRotationFromQuaternion(this.quaternion),i.transpose(a),i.scale(t,i),i.mmult(a,this.invInertiaWorld)}}applyForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=o7;t.cross(e,i),this.force.vadd(e,this.force),this.torque.vadd(i,this.torque)}applyLocalForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=c7,a=l7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyForce(i,a)}applyTorque(e){this.type===i1.DYNAMIC&&(this.sleepState===i1.SLEEPING&&this.wakeUp(),this.torque.vadd(e,this.torque))}applyImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=t,a=u7;a.copy(e),a.scale(this.invMass,a),this.velocity.vadd(a,this.velocity);let r=h7;i.cross(e,r),this.invInertiaWorld.vmult(r,r),this.angularVelocity.vadd(r,this.angularVelocity)}applyLocalImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=f7,a=d7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyImpulse(i,a)}updateMassProperties(){let e=p7;this.invMass=this.mass>0?1/this.mass:0;let t=this.inertia,i=this.fixedRotation;this.updateAABB(),e.set((this.aabb.upperBound.x-this.aabb.lowerBound.x)/2,(this.aabb.upperBound.y-this.aabb.lowerBound.y)/2,(this.aabb.upperBound.z-this.aabb.lowerBound.z)/2),d6.calculateInertia(e,this.mass,t),this.invInertia.set(t.x>0&&!i?1/t.x:0,t.y>0&&!i?1/t.y:0,t.z>0&&!i?1/t.z:0),this.updateInertiaWorld(!0)}getVelocityAtWorldPoint(e,t){let i=new y;return e.vsub(this.position,i),this.angularVelocity.cross(i,t),this.velocity.vadd(t,t),t}integrate(e,t,i){if(this.previousPosition.copy(this.position),this.previousQuaternion.copy(this.quaternion),!(this.type===i1.DYNAMIC||this.type===i1.KINEMATIC)||this.sleepState===i1.SLEEPING)return;let a=this.velocity,r=this.angularVelocity,s=this.position,o=this.force,c=this.torque,l=this.quaternion,u=this.invMass,f=this.invInertiaWorld,h=this.linearFactor,p=u*e;a.x+=o.x*p*h.x,a.y+=o.y*p*h.y,a.z+=o.z*p*h.z;let v=f.elements,g=this.angularFactor,x=c.x*g.x,m=c.y*g.y,d=c.z*g.z;r.x+=e*(v[0]*x+v[1]*m+v[2]*d),r.y+=e*(v[3]*x+v[4]*m+v[5]*d),r.z+=e*(v[6]*x+v[7]*m+v[8]*d),s.x+=a.x*e,s.y+=a.y*e,s.z+=a.z*e,l.integrate(this.angularVelocity,e,this.angularFactor,l),t&&(i?l.normalizeFast():l.normalize()),this.aabbNeedsUpdate=!0,this.updateInertiaWorld()}};i1.idCounter=0;i1.COLLIDE_EVENT_NAME="collide";i1.DYNAMIC=G0.DYNAMIC;i1.STATIC=G0.STATIC;i1.KINEMATIC=G0.KINEMATIC;i1.AWAKE=q0.AWAKE;i1.SLEEPY=q0.SLEEPY;i1.SLEEPING=q0.SLEEPING;i1.wakeupEvent={type:"wakeup"};i1.sleepyEvent={type:"sleepy"};i1.sleepEvent={type:"sleep"};var i7=new y,a7=new O1,r7=new E2,n7=new _2,s7=new _2,o7=new y,c7=new y,l7=new y,u7=new y,h7=new y,f7=new y,d7=new y,p7=new y,Ha=class{constructor(){this.world=void 0,this.useBoundingBoxes=void 0,this.dirty=void 0,this.world=null,this.useBoundingBoxes=!1,this.dirty=!0}collisionPairs(e,t,i){throw new Error("collisionPairs not implemented for this BroadPhase class!")}needBroadphaseCollision(e,t){return!((e.collisionFilterGroup&t.collisionFilterMask)==0||(t.collisionFilterGroup&e.collisionFilterMask)==0||((e.type&i1.STATIC)!=0||e.sleepState===i1.SLEEPING)&&((t.type&i1.STATIC)!=0||t.sleepState===i1.SLEEPING))}intersectionTest(e,t,i,a){this.useBoundingBoxes?this.doBoundingBoxBroadphase(e,t,i,a):this.doBoundingSphereBroadphase(e,t,i,a)}doBoundingSphereBroadphase(e,t,i,a){let r=m7;t.position.vsub(e.position,r);let s=(e.boundingRadius+t.boundingRadius)**2;r.lengthSquared()i.lengthSquared()}aabbQuery(e,t,i){return console.warn(".aabbQuery is not implemented in this Broadphase subclass."),[]}},m7=new y,v7={keys:[]},g7=[],x7=[];var bf=new y,p6=class extends Ha{constructor(){super()}collisionPairs(e,t,i){let a=e.bodies,r=a.length,s,o;for(let c=0;c!==r;c++)for(let l=0;l!==c;l++)s=a[c],o=a[l],!!this.needBroadphaseCollision(s,o)&&this.intersectionTest(s,o,t,i)}aabbQuery(e,t,i=[]){for(let a=0;a{}}intersectWorld(e,t){return this.mode=t.mode||Q1.ANY,this.result=t.result||new m6,this.skipBackfaces=!!t.skipBackfaces,this.collisionFilterMask=typeof t.collisionFilterMask!="undefined"?t.collisionFilterMask:-1,this.collisionFilterGroup=typeof t.collisionFilterGroup!="undefined"?t.collisionFilterGroup:-1,this.checkCollisionResponse=typeof t.checkCollisionResponse!="undefined"?t.checkCollisionResponse:!0,t.from&&this.from.copy(t.from),t.to&&this.to.copy(t.to),this.callback=t.callback||(()=>{}),this.hasHit=!1,this.result.reset(),this.updateDirection(),this.getAABB(ka),j0.length=0,e.broadphase.aabbQuery(e,ka,j0),this.intersectBodies(j0),this.hasHit}intersectBody(e,t){t&&(this.result=t,this.updateDirection());let i=this.checkCollisionResponse;if(i&&!e.collisionResponse||(this.collisionFilterGroup&e.collisionFilterMask)==0||(e.collisionFilterGroup&this.collisionFilterMask)==0)return;let a=M7,r=b7;for(let s=0,o=e.shapes.length;se.boundingSphereRadius)return;let o=this[e.type];o&&o.call(this,e,t,i,a,e)}_intersectBox(e,t,i,a,r){return this._intersectConvex(e.convexPolyhedronRepresentation,t,i,a,r)}_intersectPlane(e,t,i,a,r){let s=this.from,o=this.to,c=this.direction,l=new y(0,0,1);t.vmult(l,l);let u=new y;s.vsub(i,u);let f=u.dot(l);o.vsub(i,u);let h=u.dot(l);if(f*h>0||s.distanceTo(o)=0&&g<=1&&(s.lerp(o,g,p),p.vsub(i,v),v.normalize(),this.reportIntersection(v,p,r,a,-1)),this.result.shouldStop)return;x>=0&&x<=1&&(s.lerp(o,x,p),p.vsub(i,v),v.normalize(),this.reportIntersection(v,p,r,a,-1))}}_intersectConvex(e,t,i,a,r,s){let o=w7,c=Oa,l=s&&s.faceList||null,u=e.faces,f=e.vertices,h=e.faceNormals,p=this.direction,v=this.from,g=this.to,x=v.distanceTo(g),m=l?l.length:u.length,d=this.result;for(let A=0;!d.shouldStop&&Ax||this.reportIntersection(o,L2,r,a,b)}}}}_intersectTrimesh(e,t,i,a,r,s){let o=S7,c=H7,l=V7,u=Oa,f=_7,h=E7,p=L7,v=T7,g=D7,x=e.indices;e.vertices;let m=this.from,d=this.to,A=this.direction;l.position.copy(i),l.quaternion.copy(t),N1.vectorToLocalFrame(i,t,A,f),N1.pointToLocalFrame(i,t,m,h),N1.pointToLocalFrame(i,t,d,p),p.x*=e.scale.x,p.y*=e.scale.y,p.z*=e.scale.z,h.x*=e.scale.x,h.y*=e.scale.y,h.z*=e.scale.z,p.vsub(h,f),f.normalize();let b=h.distanceSquared(p);e.tree.rayQuery(this,l,c);for(let C=0,E=c.length;!this.result.shouldStop&&C!==E;C++){let T=c[C];e.getNormal(T,o),e.getVertex(x[T*3],$2),$2.vsub(h,u);let _=f.dot(o),P=o.dot(u)/_;if(P<0)continue;f.scale(P,L2),L2.vadd(h,L2),e.getVertex(x[T*3+1],ve),e.getVertex(x[T*3+2],ge);let F=L2.distanceSquared(h);!(Q1.pointInTriangle(L2,ve,$2,ge)||Q1.pointInTriangle(L2,$2,ve,ge))||F>b||(N1.vectorToWorldFrame(t,o,g),N1.pointToWorldFrame(i,t,L2,v),this.reportIntersection(g,v,r,a,T))}c.length=0}reportIntersection(e,t,i,a,r){let s=this.from,o=this.to,c=s.distanceTo(t),l=this.result;if(!(this.skipBackfaces&&e.dot(this.direction)>0))switch(l.hitFaceIndex=typeof r!="undefined"?r:-1,this.mode){case Q1.ALL:this.hasHit=!0,l.set(s,o,e,t,i,a,c),l.hasHit=!0,this.callback(l);break;case Q1.CLOSEST:(c=0&&(f=r*l-s*o)>=0&&u+fT.maxForce&&(p=T.maxForce-x),A[E]+=p,v+=p>0?p:-p,T.addToWlambda(p)}if(v*ve;)t.pop();for(;t.length=0&&u.restitution>=0&&(o.restitution=l.restitution*u.restitution),o.si=r||i,o.sj=s||a,o}createFrictionEquationsFromContact(e,t){let i=e.bi,a=e.bj,r=e.si,s=e.sj,o=this.world,c=this.currentContactMaterial,l=c.friction,u=r.material||i.material,f=s.material||a.material;if(u&&f&&u.friction>=0&&f.friction>=0&&(l=u.friction*f.friction),l>0){let h=l*o.gravity.length(),p=i.invMass+a.invMass;p>0&&(p=1/p);let v=this.frictionEquationPool,g=v.length?v.pop():new $0(i,a,h*p),x=v.length?v.pop():new $0(i,a,h*p);return g.bi=x.bi=i,g.bj=x.bj=a,g.minForce=x.minForce=-h*p,g.maxForce=x.maxForce=h*p,g.ri.copy(e.ri),g.rj.copy(e.rj),x.ri.copy(e.ri),x.rj.copy(e.rj),e.ni.tangents(g.t,x.t),g.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,o.dt),x.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,o.dt),g.enabled=x.enabled=e.enabled,t.push(g,x),!0}return!1}createFrictionFromAverage(e){let t=this.result[this.result.length-1];if(!this.createFrictionEquationsFromContact(t,this.frictionResult)||e===1)return;let i=this.frictionResult[this.frictionResult.length-2],a=this.frictionResult[this.frictionResult.length-1];y4.setZero(),U4.setZero(),O4.setZero();let r=t.bi;t.bj;for(let o=0;o!==e;o++)t=this.result[this.result.length-1-o],t.bi!==r?(y4.vadd(t.ni,y4),U4.vadd(t.ri,U4),O4.vadd(t.rj,O4)):(y4.vsub(t.ni,y4),U4.vadd(t.rj,U4),O4.vadd(t.ri,O4));let s=1/e;U4.scale(s,i.ri),O4.scale(s,i.rj),a.ri.copy(i.ri),a.rj.copy(i.rj),y4.normalize(),y4.tangents(i.t,a.t)}getContacts(e,t,i,a,r,s,o){this.contactPointPool=r,this.frictionEquationPool=o,this.result=a,this.frictionResult=s;let c=K7,l=J7,u=Y7,f=$7;for(let h=0,p=e.length;h!==p;h++){let v=e[h],g=t[h],x=null;v.material&&g.material&&(x=i.getContactMaterial(v.material,g.material)||null);let m=v.type&i1.KINEMATIC&&g.type&i1.STATIC||v.type&i1.STATIC&&g.type&i1.KINEMATIC||v.type&i1.KINEMATIC&&g.type&i1.KINEMATIC;for(let d=0;dA.boundingSphereRadius+C.boundingSphereRadius)continue;let E=null;A.material&&C.material&&(E=i.getContactMaterial(A.material,C.material)||null),this.currentContactMaterial=E||x||i.defaultContactMaterial;let T=A.type|C.type,_=this[T];if(_){let P=!1;A.type0){let W=Cl,X=zl;W.copy(p[(L+1)%3]),X.copy(p[(L+2)%3]);let Q=W.length(),a1=X.length();W.normalize(),X.normalize();let B=y6.dot(W),M1=y6.dot(X);if(B-Q&&M1-a1){let u1=Math.abs(O-Z-v);if((T===null||u1e.boundingSphereRadius+t.boundingSphereRadius)&&e.findSeparatingAxis(t,i,r,a,s,v,h,p)){let g=[],x=ql;e.clipAgainstHull(i,r,t,a,s,v,-100,100,g);let m=0;for(let d=0;d!==g.length;d++){if(f)return!0;let A=this.createContactEquation(o,c,e,t,l,u),b=A.ri,C=A.rj;v.negate(A.ni),g[d].normal.negate(x),x.scale(g[d].depth,x),g[d].point.vadd(x,b),C.copy(g[d].point),b.vsub(i,b),C.vsub(a,C),b.vadd(i,b),b.vsub(o.position,b),C.vadd(a,C),C.vsub(c.position,C),this.result.push(A),m++,this.enableFrictionReduction||this.createFrictionEquationsFromContact(A,this.frictionResult)}this.enableFrictionReduction&&m&&this.createFrictionFromAverage(m)}}sphereConvex(e,t,i,a,r,s,o,c,l,u,f){let h=this.v3pool;i.vsub(a,Ll);let p=t.faceNormals,v=t.faces,g=t.vertices,x=e.radius,m=!1;for(let d=0;d!==g.length;d++){let A=g[d],b=Vl;s.vmult(A,b),a.vadd(b,b);let C=Hl;if(b.vsub(i,C),C.lengthSquared()0){let D=[];for(let z=0,H=C.length;z!==H;z++){let V=h.get();s.vmult(g[C[z]],V),a.vadd(V,V),D.push(V)}if(bl(D,E,i)){if(f)return!0;m=!0;let z=this.createContactEquation(o,c,e,t,l,u);E.scale(-x,z.ri),E.negate(z.ni);let H=h.get();E.scale(-F,H);let V=h.get();E.scale(-x,V),i.vsub(a,z.rj),z.rj.vadd(V,z.rj),z.rj.vadd(H,z.rj),z.rj.vadd(a,z.rj),z.rj.vsub(c.position,z.rj),z.ri.vadd(i,z.ri),z.ri.vsub(o.position,z.ri),h.release(H),h.release(V),this.result.push(z),this.createFrictionEquationsFromContact(z,this.frictionResult);for(let L=0,N=D.length;L!==N;L++)h.release(D[L]);return}else for(let z=0;z!==C.length;z++){let H=h.get(),V=h.get();s.vmult(g[C[(z+1)%C.length]],H),s.vmult(g[C[(z+2)%C.length]],V),a.vadd(H,H),a.vadd(V,V);let L=Dl;V.vsub(H,L);let N=Tl;L.unit(N);let U=h.get(),Z=h.get();i.vsub(H,Z);let O=Z.dot(N);N.scale(O,U),U.vadd(H,U);let W=h.get();if(U.vsub(i,W),O>0&&O*Oh.length||A>h[0].length)return;m<0&&(m=0),d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),m>=h.length&&(m=h.length-1),d>=h.length&&(d=h.length-1),b>=h[0].length&&(b=h[0].length-1),A>=h[0].length&&(A=h[0].length-1);let C=[];t.getRectMinMax(m,A,d,b,C);let E=C[0],T=C[1];if(x.z-p>T||x.z+p2)return}}boxHeightfield(e,t,i,a,r,s,o,c,l,u,f){return e.convexPolyhedronRepresentation.material=e.material,e.convexPolyhedronRepresentation.collisionResponse=e.collisionResponse,this.convexHeightfield(e.convexPolyhedronRepresentation,t,i,a,r,s,o,c,e,t,f)}convexHeightfield(e,t,i,a,r,s,o,c,l,u,f){let h=t.data,p=t.elementSize,v=e.boundingSphereRadius,g=Ql,x=e9,m=Jl;N1.pointToLocalFrame(a,s,i,m);let d=Math.floor((m.x-v)/p)-1,A=Math.ceil((m.x+v)/p)+1,b=Math.floor((m.y-v)/p)-1,C=Math.ceil((m.y+v)/p)+1;if(A<0||C<0||d>h.length||b>h[0].length)return;d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),C<0&&(C=0),d>=h.length&&(d=h.length-1),A>=h.length&&(A=h.length-1),C>=h[0].length&&(C=h[0].length-1),b>=h[0].length&&(b=h[0].length-1);let E=[];t.getRectMinMax(d,b,A,C,E);let T=E[0],_=E[1];if(!(m.z-v>_||m.z+v0&&V<0&&(x.vsub(h,m),g.copy(v),g.normalize(),L=m.dot(g),g.scale(L,m),m.vadd(h,m),m.distanceTo(x)0&&i===!0||u<=0&&i===!1){i===null&&(i=u>0);continue}else return!1}return!0}var y6=new y,yl=new y,Cl=new y,zl=new y,Al=[new y,new y,new y,new y,new y,new y],wl=new y,Sl=new y,_l=new y,El=new y,Ll=new y,Dl=new y,Tl=new y,Hl=new y,Vl=new y,Nl=new y,Rl=new y,Fl=new y,Bl=new y,Pl=new y,Il=new y,kl=new y,Ul=new y,Ol=new y,Gl=new y,ql=new y,Wl=new y,jl=new y,Xl=new y,Zl=new y,wr=new O1,Yl=new y,$l=new y,Sr=new y,Kl=new y,Jl=new y,Ql=new y,e9=[0],t9=new y,i9=new y,K0=class{constructor(){this.current=void 0,this.previous=void 0,this.current=[],this.previous=[]}getKey(e,t){if(ta[r];)r++;if(i!==a[r]){for(let s=a.length-1;s>=r;s--)a[s+1]=a[s];a[r]=i}}tick(){let e=this.current;this.current=this.previous,this.previous=e,this.current.length=0}getDiff(e,t){let i=this.current,a=this.previous,r=i.length,s=a.length,o=0;for(let c=0;ca[o];)o++;l=u===a[o],l||_r(e,u)}o=0;for(let c=0;ci[o];)o++;l=i[o]===u,l||_r(t,u)}}};function _r(n,e){n.push((e&4294901760)>>16,e&65535)}var Er=class{constructor(){this.data={keys:[]}}get(e,t){if(e>t){let i=t;t=e,e=i}return this.data[e+"-"+t]}set(e,t,i){if(e>t){let r=t;t=e,e=r}let a=e+"-"+t;this.get(e,t)||this.data.keys.push(a),this.data[a]=i}reset(){let e=this.data,t=e.keys;for(;t.length>0;){let i=t.pop();delete e[i]}}},J0=class extends k0{constructor(e={}){super();this.dt=void 0,this.allowSleep=void 0,this.contacts=void 0,this.frictionEquations=void 0,this.quatNormalizeSkip=void 0,this.quatNormalizeFast=void 0,this.time=void 0,this.stepnumber=void 0,this.default_dt=void 0,this.nextId=void 0,this.gravity=void 0,this.broadphase=void 0,this.bodies=void 0,this.hasActiveBodies=void 0,this.solver=void 0,this.constraints=void 0,this.narrowphase=void 0,this.collisionMatrix=void 0,this.collisionMatrixPrevious=void 0,this.bodyOverlapKeeper=void 0,this.shapeOverlapKeeper=void 0,this.materials=void 0,this.contactmaterials=void 0,this.contactMaterialTable=void 0,this.defaultMaterial=void 0,this.defaultContactMaterial=void 0,this.doProfiling=void 0,this.profile=void 0,this.accumulator=void 0,this.subsystems=void 0,this.addBodyEvent=void 0,this.removeBodyEvent=void 0,this.idToBodyMap=void 0,this.dt=-1,this.allowSleep=!!e.allowSleep,this.contacts=[],this.frictionEquations=[],this.quatNormalizeSkip=e.quatNormalizeSkip!==void 0?e.quatNormalizeSkip:0,this.quatNormalizeFast=e.quatNormalizeFast!==void 0?e.quatNormalizeFast:!1,this.time=0,this.stepnumber=0,this.default_dt=1/60,this.nextId=0,this.gravity=new y,e.gravity&&this.gravity.copy(e.gravity),this.broadphase=e.broadphase!==void 0?e.broadphase:new p6,this.bodies=[],this.hasActiveBodies=!1,this.solver=e.solver!==void 0?e.solver:new Ya,this.constraints=[],this.narrowphase=new zr(this),this.collisionMatrix=new I0,this.collisionMatrixPrevious=new I0,this.bodyOverlapKeeper=new K0,this.shapeOverlapKeeper=new K0,this.materials=[],this.contactmaterials=[],this.contactMaterialTable=new Er,this.defaultMaterial=new He("default"),this.defaultContactMaterial=new Te(this.defaultMaterial,this.defaultMaterial,{friction:.3,restitution:0}),this.doProfiling=!1,this.profile={solve:0,makeContactConstraints:0,broadphase:0,integrate:0,narrowphase:0},this.accumulator=0,this.subsystems=[],this.addBodyEvent={type:"addBody",body:null},this.removeBodyEvent={type:"removeBody",body:null},this.idToBodyMap={},this.broadphase.setWorld(this)}getContactMaterial(e,t){return this.contactMaterialTable.get(e.id,t.id)}numObjects(){return this.bodies.length}collisionMatrixTick(){let e=this.collisionMatrixPrevious;this.collisionMatrixPrevious=this.collisionMatrix,this.collisionMatrix=e,this.collisionMatrix.reset(),this.bodyOverlapKeeper.tick(),this.shapeOverlapKeeper.tick()}addConstraint(e){this.constraints.push(e)}removeConstraint(e){let t=this.constraints.indexOf(e);t!==-1&&this.constraints.splice(t,1)}rayTest(e,t,i){i instanceof m6?this.raycastClosest(e,t,{skipBackfaces:!0},i):this.raycastAll(e,t,{skipBackfaces:!0},i)}raycastAll(e,t,i={},a){return i.mode=Q1.ALL,i.from=e,i.to=t,i.callback=a,Q0.intersectWorld(this,i)}raycastAny(e,t,i={},a){return i.mode=Q1.ANY,i.from=e,i.to=t,i.result=a,Q0.intersectWorld(this,i)}raycastClosest(e,t,i={},a){return i.mode=Q1.CLOSEST,i.from=e,i.to=t,i.result=a,Q0.intersectWorld(this,i)}addBody(e){this.bodies.includes(e)||(e.index=this.bodies.length,this.bodies.push(e),e.world=this,e.initPosition.copy(e.position),e.initVelocity.copy(e.velocity),e.timeLastSleepy=this.time,e instanceof i1&&(e.initAngularVelocity.copy(e.angularVelocity),e.initQuaternion.copy(e.quaternion)),this.collisionMatrix.setNumObjects(this.bodies.length),this.addBodyEvent.body=e,this.idToBodyMap[e.id]=e,this.dispatchEvent(this.addBodyEvent))}removeBody(e){e.world=null;let t=this.bodies.length-1,i=this.bodies,a=i.indexOf(e);if(a!==-1){i.splice(a,1);for(let r=0;r!==i.length;r++)i[r].index=r;this.collisionMatrix.setNumObjects(t),this.removeBodyEvent.body=e,delete this.idToBodyMap[e.id],this.dispatchEvent(this.removeBodyEvent)}}getBodyById(e){return this.idToBodyMap[e]}getShapeById(e){let t=this.bodies;for(let i=0;i=e&&re*1e3)););this.accumulator=this.accumulator%e;let s=this.accumulator/e;for(let o=0;o!==this.bodies.length;o++){let c=this.bodies[o];c.previousPosition.lerp(c.position,s,c.interpolatedPosition),c.previousQuaternion.slerp(c.quaternion,s,c.interpolatedQuaternion),c.previousQuaternion.normalize()}this.time+=t}}internalStep(e){this.dt=e;let t=this.contacts,i=o9,a=c9,r=this.numObjects(),s=this.bodies,o=this.solver,c=this.gravity,l=this.doProfiling,u=this.profile,f=i1.DYNAMIC,h=-1/0,p=this.constraints,v=s9;c.length();let g=c.x,x=c.y,m=c.z,d=0;for(l&&(h=s2.now()),d=0;d!==r;d++){let z=s[d];if(z.type===f){let H=z.force,V=z.mass;H.x+=V*g,H.y+=V*x,H.z+=V*m}}for(let z=0,H=this.subsystems.length;z!==H;z++)this.subsystems[z].update();l&&(h=s2.now()),i.length=0,a.length=0,this.broadphase.collisionPairs(this,i,a),l&&(u.broadphase=s2.now()-h);let A=p.length;for(d=0;d!==A;d++){let z=p[d];if(!z.collideConnected)for(let H=i.length-1;H>=0;H-=1)(z.bodyA===i[H]&&z.bodyB===a[H]||z.bodyB===i[H]&&z.bodyA===a[H])&&(i.splice(H,1),a.splice(H,1))}this.collisionMatrixTick(),l&&(h=s2.now());let b=n9,C=t.length;for(d=0;d!==C;d++)b.push(t[d]);t.length=0;let E=this.frictionEquations.length;for(d=0;d!==E;d++)v.push(this.frictionEquations[d]);for(this.frictionEquations.length=0,this.narrowphase.getContacts(i,a,this,t,b,this.frictionEquations,v),l&&(u.narrowphase=s2.now()-h),l&&(h=s2.now()),d=0;d=0&&L.material.friction>=0&&V.material.friction*L.material.friction,V.material.restitution>=0&&L.material.restitution>=0&&(H.restitution=V.material.restitution*L.material.restitution)),o.addEquation(H),V.allowSleep&&V.type===i1.DYNAMIC&&V.sleepState===i1.SLEEPING&&L.sleepState===i1.AWAKE&&L.type!==i1.STATIC){let O=L.velocity.lengthSquared()+L.angularVelocity.lengthSquared(),W=L.sleepSpeedLimit**2;O>=W*2&&(V.wakeUpAfterNarrowphase=!0)}if(L.allowSleep&&L.type===i1.DYNAMIC&&L.sleepState===i1.SLEEPING&&V.sleepState===i1.AWAKE&&V.type!==i1.STATIC){let O=V.velocity.lengthSquared()+V.angularVelocity.lengthSquared(),W=V.sleepSpeedLimit**2;O>=W*2&&(L.wakeUpAfterNarrowphase=!0)}this.collisionMatrix.set(V,L,!0),this.collisionMatrixPrevious.get(V,L)||(At.body=L,At.contact=H,V.dispatchEvent(At),At.body=V,L.dispatchEvent(At)),this.bodyOverlapKeeper.set(V.id,L.id),this.shapeOverlapKeeper.set(N.id,U.id)}for(this.emitContactEvents(),l&&(u.makeContactConstraints=s2.now()-h,h=s2.now()),d=0;d!==r;d++){let z=s[d];z.wakeUpAfterNarrowphase&&(z.wakeUp(),z.wakeUpAfterNarrowphase=!1)}for(A=p.length,d=0;d!==A;d++){let z=p[d];z.update();for(let H=0,V=z.equations.length;H!==V;H++){let L=z.equations[H];o.addEquation(L)}}o.solve(e,this),l&&(u.solve=s2.now()-h),o.removeAllEquations();let _=Math.pow;for(d=0;d!==r;d++){let z=s[d];if(z.type&f){let H=_(1-z.linearDamping,e),V=z.velocity;V.scale(H,V);let L=z.angularVelocity;if(L){let N=_(1-z.angularDamping,e);L.scale(N,L)}}}for(this.dispatchEvent(r9),d=0;d!==r;d++){let z=s[d];z.preStep&&z.preStep.call(z)}l&&(h=s2.now());let F=this.stepnumber%(this.quatNormalizeSkip+1)==0,M=this.quatNormalizeFast;for(d=0;d!==r;d++)s[d].integrate(e,F,M);for(this.clearForces(),this.broadphase.dirty=!0,l&&(u.integrate=s2.now()-h),this.stepnumber+=1,this.dispatchEvent(a9),d=0;d!==r;d++){let z=s[d],H=z.postStep;H&&H.call(z)}let D=!0;if(this.allowSleep)for(D=!1,d=0;d!==r;d++){let z=s[d];z.sleepTick(this.time),z.sleepState!==i1.SLEEPING&&(D=!0)}this.hasActiveBodies=D}emitContactEvents(){let e=this.hasAnyEventListener("beginContact"),t=this.hasAnyEventListener("endContact");if((e||t)&&this.bodyOverlapKeeper.getDiff(Ne,Re),e){for(let r=0,s=Ne.length;rDate.now()-n}var a9={type:"postStep"},r9={type:"preStep"},At={type:i1.COLLIDE_EVENT_NAME,body:null,contact:null},n9=[],s9=[],o9=[],c9=[],Ne=[],Re=[],wt={type:"beginContact",bodyA:null,bodyB:null},St={type:"endContact",bodyA:null,bodyB:null},Fe={type:"beginShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null},Be={type:"endShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null};var q1=class{constructor(e=0,t=0,i=0,a=1){this.x=e,this.y=t,this.z=i,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,a){return this.x=e,this.y=t,this.z=i,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*a+s[12]*r,this.y=s[1]*t+s[5]*i+s[9]*a+s[13]*r,this.z=s[2]*t+s[6]*i+s[10]*a+s[14]*r,this.w=s[3]*t+s[7]*i+s[11]*a+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,a,r,s=.01,o=.1,c=e.elements,l=c[0],u=c[4],f=c[8],h=c[1],p=c[5],v=c[9],g=c[2],x=c[6],m=c[10];if(Math.abs(u-h)b&&A>C?AC?b>8&255]+f2[n>>16&255]+f2[n>>24&255]+"-"+f2[e&255]+f2[e>>8&255]+"-"+f2[e>>16&15|64]+f2[e>>24&255]+"-"+f2[t&63|128]+f2[t>>8&255]+"-"+f2[t>>16&255]+f2[t>>24&255]+f2[i&255]+f2[i>>8&255]+f2[i>>16&255]+f2[i>>24&255]).toUpperCase()}function D2(n,e,t){return Math.max(e,Math.min(t,n))}function Lr(n,e){return(n%e+e)%e}function z6(n,e,t){return(1-t)*n+t*e}function e3(n){return(n&n-1)==0&&n!==0}function Dr(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var Me=class{constructor(e=0,t=0,i=0,a=1){this._x=e,this._y=t,this._z=i,this._w=a}static slerp(e,t,i,a){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),i.slerpQuaternions(e,t,a)}static slerpFlat(e,t,i,a,r,s,o){let c=i[a+0],l=i[a+1],u=i[a+2],f=i[a+3],h=r[s+0],p=r[s+1],v=r[s+2],g=r[s+3];if(o===0){e[t+0]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f;return}if(o===1){e[t+0]=h,e[t+1]=p,e[t+2]=v,e[t+3]=g;return}if(f!==g||c!==h||l!==p||u!==v){let x=1-o,m=c*h+l*p+u*v+f*g,d=m>=0?1:-1,A=1-m*m;if(A>Number.EPSILON){let C=Math.sqrt(A),E=Math.atan2(C,m*d);x=Math.sin(x*E)/C,o=Math.sin(o*E)/C}let b=o*d;if(c=c*x+h*b,l=l*x+p*b,u=u*x+v*b,f=f*x+g*b,x===1-o){let C=1/Math.sqrt(c*c+l*l+u*u+f*f);c*=C,l*=C,u*=C,f*=C}}e[t]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,a,r,s){let o=i[a],c=i[a+1],l=i[a+2],u=i[a+3],f=r[s],h=r[s+1],p=r[s+2],v=r[s+3];return e[t]=o*v+u*f+c*p-l*h,e[t+1]=c*v+u*h+l*f-o*p,e[t+2]=l*v+u*p+o*h-c*f,e[t+3]=u*v-o*f-c*h-l*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,a){return this._x=e,this._y=t,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let i=e._x,a=e._y,r=e._z,s=e._order,o=Math.cos,c=Math.sin,l=o(i/2),u=o(a/2),f=o(r/2),h=c(i/2),p=c(a/2),v=c(r/2);switch(s){case"XYZ":this._x=h*u*f+l*p*v,this._y=l*p*f-h*u*v,this._z=l*u*v+h*p*f,this._w=l*u*f-h*p*v;break;case"YXZ":this._x=h*u*f+l*p*v,this._y=l*p*f-h*u*v,this._z=l*u*v-h*p*f,this._w=l*u*f+h*p*v;break;case"ZXY":this._x=h*u*f-l*p*v,this._y=l*p*f+h*u*v,this._z=l*u*v+h*p*f,this._w=l*u*f-h*p*v;break;case"ZYX":this._x=h*u*f-l*p*v,this._y=l*p*f+h*u*v,this._z=l*u*v-h*p*f,this._w=l*u*f+h*p*v;break;case"YZX":this._x=h*u*f+l*p*v,this._y=l*p*f+h*u*v,this._z=l*u*v-h*p*f,this._w=l*u*f-h*p*v;break;case"XZY":this._x=h*u*f-l*p*v,this._y=l*p*f-h*u*v,this._z=l*u*v+h*p*f,this._w=l*u*f+h*p*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,a=Math.sin(i);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],a=t[4],r=t[8],s=t[1],o=t[5],c=t[9],l=t[2],u=t[6],f=t[10],h=i+o+f;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-c)*p,this._y=(r-l)*p,this._z=(s-a)*p}else if(i>o&&i>f){let p=2*Math.sqrt(1+i-o-f);this._w=(u-c)/p,this._x=.25*p,this._y=(a+s)/p,this._z=(r+l)/p}else if(o>f){let p=2*Math.sqrt(1+o-i-f);this._w=(r-l)/p,this._x=(a+s)/p,this._y=.25*p,this._z=(c+u)/p}else{let p=2*Math.sqrt(1+f-i-o);this._w=(s-a)/p,this._x=(r+l)/p,this._y=(c+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(D2(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let a=Math.min(1,t/i);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,a=e._y,r=e._z,s=e._w,o=t._x,c=t._y,l=t._z,u=t._w;return this._x=i*u+s*o+a*l-r*c,this._y=a*u+s*c+r*o-i*l,this._z=r*u+s*l+i*c-a*o,this._w=s*u-i*o-a*c-r*l,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let i=this._x,a=this._y,r=this._z,s=this._w,o=s*e._w+i*e._x+a*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=s,this._x=i,this._y=a,this._z=r,this;let c=1-o*o;if(c<=Number.EPSILON){let p=1-t;return this._w=p*s+t*this._w,this._x=p*i+t*this._x,this._y=p*a+t*this._y,this._z=p*r+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),u=Math.atan2(l,o),f=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=s*f+this._w*h,this._x=i*f+this._x*h,this._y=a*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),a=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(a),i*Math.sin(r),i*Math.cos(r),t*Math.sin(a))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Me.prototype.isQuaternion=!0;var k=class{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Tr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Tr.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*a,this.y=r[1]*t+r[4]*i+r[7]*a,this.z=r[2]*t+r[5]*i+r[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=e.elements,s=1/(r[3]*t+r[7]*i+r[11]*a+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*a+r[12])*s,this.y=(r[1]*t+r[5]*i+r[9]*a+r[13])*s,this.z=(r[2]*t+r[6]*i+r[10]*a+r[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z,c=e.w,l=c*t+s*a-o*i,u=c*i+o*t-r*a,f=c*a+r*i-s*t,h=-r*t-s*i-o*a;return this.x=l*c+h*-r+u*-o-f*-s,this.y=u*c+h*-s+f*-r-l*-o,this.z=f*c+h*-o+l*-s-u*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*a,this.y=r[1]*t+r[5]*i+r[9]*a,this.z=r[2]*t+r[6]*i+r[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,a=e.y,r=e.z,s=t.x,o=t.y,c=t.z;return this.x=a*c-r*o,this.y=r*s-i*c,this.z=i*o-a*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return t3.copy(this).projectOnVector(e),this.sub(t3)}reflect(e){return this.sub(t3.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(D2(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,a=this.z-e.z;return t*t+i*i+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let a=Math.sin(t)*e;return this.x=a*Math.sin(i),this.y=Math.cos(t)*e,this.z=a*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};k.prototype.isVector3=!0;var t3=new k,Tr=new Me;var z1=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6],this.y=a[1]*t+a[4]*i+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),a=Math.sin(t),r=this.x-e.x,s=this.y-e.y;return this.x=r*i-s*a+e.x,this.y=r*a+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};z1.prototype.isVector2=!0;var Hr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},K2={h:0,s:0,l:0},A6={h:0,s:0,l:0};function i3(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}function C4(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function a3(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var x1=class{constructor(e,t,i){return t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,t,i){return this.r=e,this.g=t,this.b=i,this}setHSL(e,t,i){if(e=Lr(e,1),t=D2(t,0,1),i=D2(i,0,1),t===0)this.r=this.g=this.b=i;else{let a=i<=.5?i*(1+t):i+t-i*t,r=2*i-a;this.r=i3(r,a,e+1/3),this.g=i3(r,a,e),this.b=i3(r,a,e-1/3)}return this}setStyle(e){function t(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let a,r=i[1],s=i[2];switch(r){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,t(a[4]),this;if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(a[1],10))/100,this.g=Math.min(100,parseInt(a[2],10))/100,this.b=Math.min(100,parseInt(a[3],10))/100,t(a[4]),this;break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){let o=parseFloat(a[1])/360,c=parseInt(a[2],10)/100,l=parseInt(a[3],10)/100;return t(a[4]),this.setHSL(o,c,l)}break}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let a=i[1],r=a.length;if(r===3)return this.r=parseInt(a.charAt(0)+a.charAt(0),16)/255,this.g=parseInt(a.charAt(1)+a.charAt(1),16)/255,this.b=parseInt(a.charAt(2)+a.charAt(2),16)/255,this;if(r===6)return this.r=parseInt(a.charAt(0)+a.charAt(1),16)/255,this.g=parseInt(a.charAt(2)+a.charAt(3),16)/255,this.b=parseInt(a.charAt(4)+a.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=Hr[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=C4(e.r),this.g=C4(e.g),this.b=C4(e.b),this}copyLinearToSRGB(e){return this.r=a3(e.r),this.g=a3(e.g),this.b=a3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let t=this.r,i=this.g,a=this.b,r=Math.max(t,i,a),s=Math.min(t,i,a),o,c,l=(s+r)/2;if(s===r)o=0,c=0;else{let u=r-s;switch(c=l<=.5?u/(r+s):u/(2-r-s),r){case t:o=(i-a)/u+(ir&&(r=u),f>s&&(s=f),h>o&&(o=h)}return this.min.set(t,i,a),this.max.set(r,s,o),this}setFromBufferAttribute(e){let t=1/0,i=1/0,a=1/0,r=-1/0,s=-1/0,o=-1/0;for(let c=0,l=e.count;cr&&(r=u),f>s&&(s=f),h>o&&(o=h)}return this.min.set(t,i,a),this.max.set(r,s,o),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,w4),w4.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Bt),F6.subVectors(this.max,Bt),W4.subVectors(e.a,Bt),j4.subVectors(e.b,Bt),X4.subVectors(e.c,Bt),n4.subVectors(j4,W4),s4.subVectors(X4,j4),S4.subVectors(W4,X4);let t=[0,-n4.z,n4.y,0,-s4.z,s4.y,0,-S4.z,S4.y,n4.z,0,-n4.x,s4.z,0,-s4.x,S4.z,0,-S4.x,-n4.y,n4.x,0,-s4.y,s4.x,0,-S4.y,S4.x,0];return!B3(t,W4,j4,X4,F6)||(t=[1,0,0,0,1,0,0,0,1],!B3(t,W4,j4,X4,F6))?!1:(B6.crossVectors(n4,s4),t=[B6.x,B6.y,B6.z],B3(t,W4,j4,X4,F6))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return w4.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(w4).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ge[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ge[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ge[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ge[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ge[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ge[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ge[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ge[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ge),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};Oe.prototype.isBox3=!0;var Ge=[new k,new k,new k,new k,new k,new k,new k,new k],w4=new k,F3=new Oe,W4=new k,j4=new k,X4=new k,n4=new k,s4=new k,S4=new k,Bt=new k,F6=new k,B6=new k,_4=new k;function B3(n,e,t,i,a){for(let r=0,s=n.length-3;r<=s;r+=3){_4.fromArray(n,r);let o=a.x*Math.abs(_4.x)+a.y*Math.abs(_4.y)+a.z*Math.abs(_4.z),c=e.dot(_4),l=t.dot(_4),u=i.dot(_4);if(Math.max(-Math.max(c,l,u),Math.min(c,l,u))>o)return!1}return!0}var F2=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let a=this._listeners[e];if(a!==void 0){let r=a.indexOf(t);r!==-1&&a.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let i=this._listeners[e.type];if(i!==void 0){e.target=this;let a=i.slice(0);for(let r=0,s=a.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){P3.subVectors(e,this.center);let t=P3.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),a=(i-this.radius)*.5;this.center.add(P3.multiplyScalar(a/i)),this.radius+=a}return this}union(e){return this.center.equals(e.center)===!0?P6.set(0,0,1).multiplyScalar(e.radius):P6.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(L8.copy(e.center).add(P6)),this.expandByPoint(L8.copy(e.center).sub(P6)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};var k1=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,s,o,c,l,u,f,h,p,v,g,x){let m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=a,m[1]=r,m[5]=s,m[9]=o,m[13]=c,m[2]=l,m[6]=u,m[10]=f,m[14]=h,m[3]=p,m[7]=v,m[11]=g,m[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new k1().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,a=1/Z4.setFromMatrixColumn(e,0).length(),r=1/Z4.setFromMatrixColumn(e,1).length(),s=1/Z4.setFromMatrixColumn(e,2).length();return t[0]=i[0]*a,t[1]=i[1]*a,t[2]=i[2]*a,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,i=e.x,a=e.y,r=e.z,s=Math.cos(i),o=Math.sin(i),c=Math.cos(a),l=Math.sin(a),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){let h=s*u,p=s*f,v=o*u,g=o*f;t[0]=c*u,t[4]=-c*f,t[8]=l,t[1]=p+v*l,t[5]=h-g*l,t[9]=-o*c,t[2]=g-h*l,t[6]=v+p*l,t[10]=s*c}else if(e.order==="YXZ"){let h=c*u,p=c*f,v=l*u,g=l*f;t[0]=h+g*o,t[4]=v*o-p,t[8]=s*l,t[1]=s*f,t[5]=s*u,t[9]=-o,t[2]=p*o-v,t[6]=g+h*o,t[10]=s*c}else if(e.order==="ZXY"){let h=c*u,p=c*f,v=l*u,g=l*f;t[0]=h-g*o,t[4]=-s*f,t[8]=v+p*o,t[1]=p+v*o,t[5]=s*u,t[9]=g-h*o,t[2]=-s*l,t[6]=o,t[10]=s*c}else if(e.order==="ZYX"){let h=s*u,p=s*f,v=o*u,g=o*f;t[0]=c*u,t[4]=v*l-p,t[8]=h*l+g,t[1]=c*f,t[5]=g*l+h,t[9]=p*l-v,t[2]=-l,t[6]=o*c,t[10]=s*c}else if(e.order==="YZX"){let h=s*c,p=s*l,v=o*c,g=o*l;t[0]=c*u,t[4]=g-h*f,t[8]=v*f+p,t[1]=f,t[5]=s*u,t[9]=-o*u,t[2]=-l*u,t[6]=p*f+v,t[10]=h-g*f}else if(e.order==="XZY"){let h=s*c,p=s*l,v=o*c,g=o*l;t[0]=c*u,t[4]=-f,t[8]=l*u,t[1]=h*f+g,t[5]=s*u,t[9]=p*f-v,t[2]=v*f-p,t[6]=o*u,t[10]=g*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(u9,e,h9)}lookAt(e,t,i){let a=this.elements;return B2.subVectors(e,t),B2.lengthSq()===0&&(B2.z=1),B2.normalize(),o4.crossVectors(i,B2),o4.lengthSq()===0&&(Math.abs(i.z)===1?B2.x+=1e-4:B2.z+=1e-4,B2.normalize(),o4.crossVectors(i,B2)),o4.normalize(),I6.crossVectors(B2,o4),a[0]=o4.x,a[4]=I6.x,a[8]=B2.x,a[1]=o4.y,a[5]=I6.y,a[9]=B2.y,a[2]=o4.z,a[6]=I6.z,a[10]=B2.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,s=i[0],o=i[4],c=i[8],l=i[12],u=i[1],f=i[5],h=i[9],p=i[13],v=i[2],g=i[6],x=i[10],m=i[14],d=i[3],A=i[7],b=i[11],C=i[15],E=a[0],T=a[4],_=a[8],P=a[12],F=a[1],M=a[5],D=a[9],z=a[13],H=a[2],V=a[6],L=a[10],N=a[14],U=a[3],Z=a[7],O=a[11],W=a[15];return r[0]=s*E+o*F+c*H+l*U,r[4]=s*T+o*M+c*V+l*Z,r[8]=s*_+o*D+c*L+l*O,r[12]=s*P+o*z+c*N+l*W,r[1]=u*E+f*F+h*H+p*U,r[5]=u*T+f*M+h*V+p*Z,r[9]=u*_+f*D+h*L+p*O,r[13]=u*P+f*z+h*N+p*W,r[2]=v*E+g*F+x*H+m*U,r[6]=v*T+g*M+x*V+m*Z,r[10]=v*_+g*D+x*L+m*O,r[14]=v*P+g*z+x*N+m*W,r[3]=d*E+A*F+b*H+C*U,r[7]=d*T+A*M+b*V+C*Z,r[11]=d*_+A*D+b*L+C*O,r[15]=d*P+A*z+b*N+C*W,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],a=e[8],r=e[12],s=e[1],o=e[5],c=e[9],l=e[13],u=e[2],f=e[6],h=e[10],p=e[14],v=e[3],g=e[7],x=e[11],m=e[15];return v*(+r*c*f-a*l*f-r*o*h+i*l*h+a*o*p-i*c*p)+g*(+t*c*p-t*l*h+r*s*h-a*s*p+a*l*u-r*c*u)+x*(+t*l*f-t*o*p-r*s*f+i*s*p+r*o*u-i*l*u)+m*(-a*o*u-t*c*f+t*o*h+a*s*f-i*s*h+i*c*u)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],p=e[11],v=e[12],g=e[13],x=e[14],m=e[15],d=f*x*l-g*h*l+g*c*p-o*x*p-f*c*m+o*h*m,A=v*h*l-u*x*l-v*c*p+s*x*p+u*c*m-s*h*m,b=u*g*l-v*f*l+v*o*p-s*g*p-u*o*m+s*f*m,C=v*f*c-u*g*c-v*o*h+s*g*h+u*o*x-s*f*x,E=t*d+i*A+a*b+r*C;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/E;return e[0]=d*T,e[1]=(g*h*r-f*x*r-g*a*p+i*x*p+f*a*m-i*h*m)*T,e[2]=(o*x*r-g*c*r+g*a*l-i*x*l-o*a*m+i*c*m)*T,e[3]=(f*c*r-o*h*r-f*a*l+i*h*l+o*a*p-i*c*p)*T,e[4]=A*T,e[5]=(u*x*r-v*h*r+v*a*p-t*x*p-u*a*m+t*h*m)*T,e[6]=(v*c*r-s*x*r-v*a*l+t*x*l+s*a*m-t*c*m)*T,e[7]=(s*h*r-u*c*r+u*a*l-t*h*l-s*a*p+t*c*p)*T,e[8]=b*T,e[9]=(v*f*r-u*g*r-v*i*p+t*g*p+u*i*m-t*f*m)*T,e[10]=(s*g*r-v*o*r+v*i*l-t*g*l-s*i*m+t*o*m)*T,e[11]=(u*o*r-s*f*r-u*i*l+t*f*l+s*i*p-t*o*p)*T,e[12]=C*T,e[13]=(u*g*a-v*f*a+v*i*h-t*g*h-u*i*x+t*f*x)*T,e[14]=(v*o*a-s*g*a-v*i*c+t*g*c+s*i*x-t*o*x)*T,e[15]=(s*f*a-u*o*a+u*i*c-t*f*c-s*i*h+t*o*h)*T,this}scale(e){let t=this.elements,i=e.x,a=e.y,r=e.z;return t[0]*=i,t[4]*=a,t[8]*=r,t[1]*=i,t[5]*=a,t[9]*=r,t[2]*=i,t[6]*=a,t[10]*=r,t[3]*=i,t[7]*=a,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,a))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),a=Math.sin(t),r=1-i,s=e.x,o=e.y,c=e.z,l=r*s,u=r*o;return this.set(l*s+i,l*o-a*c,l*c+a*o,0,l*o+a*c,u*o+i,u*c-a*s,0,l*c-a*o,u*c+a*s,r*c*c+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,a,r,s){return this.set(1,i,r,0,e,1,s,0,t,a,1,0,0,0,0,1),this}compose(e,t,i){let a=this.elements,r=t._x,s=t._y,o=t._z,c=t._w,l=r+r,u=s+s,f=o+o,h=r*l,p=r*u,v=r*f,g=s*u,x=s*f,m=o*f,d=c*l,A=c*u,b=c*f,C=i.x,E=i.y,T=i.z;return a[0]=(1-(g+m))*C,a[1]=(p+b)*C,a[2]=(v-A)*C,a[3]=0,a[4]=(p-b)*E,a[5]=(1-(h+m))*E,a[6]=(x+d)*E,a[7]=0,a[8]=(v+A)*T,a[9]=(x-d)*T,a[10]=(1-(h+g))*T,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,i){let a=this.elements,r=Z4.set(a[0],a[1],a[2]).length(),s=Z4.set(a[4],a[5],a[6]).length(),o=Z4.set(a[8],a[9],a[10]).length();this.determinant()<0&&(r=-r),e.x=a[12],e.y=a[13],e.z=a[14],te.copy(this);let l=1/r,u=1/s,f=1/o;return te.elements[0]*=l,te.elements[1]*=l,te.elements[2]*=l,te.elements[4]*=u,te.elements[5]*=u,te.elements[6]*=u,te.elements[8]*=f,te.elements[9]*=f,te.elements[10]*=f,t.setFromRotationMatrix(te),i.x=r,i.y=s,i.z=o,this}makePerspective(e,t,i,a,r,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let o=this.elements,c=2*r/(t-e),l=2*r/(i-a),u=(t+e)/(t-e),f=(i+a)/(i-a),h=-(s+r)/(s-r),p=-2*s*r/(s-r);return o[0]=c,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=l,o[9]=f,o[13]=0,o[2]=0,o[6]=0,o[10]=h,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,i,a,r,s){let o=this.elements,c=1/(t-e),l=1/(i-a),u=1/(s-r),f=(t+e)*c,h=(i+a)*l,p=(s+r)*u;return o[0]=2*c,o[4]=0,o[8]=0,o[12]=-f,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-h,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<16;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}};k1.prototype.isMatrix4=!0;var Z4=new k,te=new k1,u9=new k(0,0,0),h9=new k(1,1,1),o4=new k,I6=new k,B2=new k;var D8=new k1,T8=new Me,c4=class{constructor(e=0,t=0,i=0,a=c4.DefaultOrder){this._x=e,this._y=t,this._z=i,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,a=this._order){return this._x=e,this._y=t,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){let a=e.elements,r=a[0],s=a[4],o=a[8],c=a[1],l=a[5],u=a[9],f=a[2],h=a[6],p=a[10];switch(t){case"XYZ":this._y=Math.asin(D2(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-D2(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(D2(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-D2(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(D2(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-D2(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return D8.makeRotationFromQuaternion(e),this.setFromRotationMatrix(D8,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return T8.setFromEuler(this),this.setFromQuaternion(T8,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new k(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};c4.prototype.isEuler=!0;c4.DefaultOrder="XYZ";c4.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var Pt=class{constructor(){this.mask=1|0}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,s,o,c,l){let u=this.elements;return u[0]=e,u[1]=a,u[2]=o,u[3]=t,u[4]=r,u[5]=c,u[6]=i,u[7]=s,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,s=i[0],o=i[3],c=i[6],l=i[1],u=i[4],f=i[7],h=i[2],p=i[5],v=i[8],g=a[0],x=a[3],m=a[6],d=a[1],A=a[4],b=a[7],C=a[2],E=a[5],T=a[8];return r[0]=s*g+o*d+c*C,r[3]=s*x+o*A+c*E,r[6]=s*m+o*b+c*T,r[1]=l*g+u*d+f*C,r[4]=l*x+u*A+f*E,r[7]=l*m+u*b+f*T,r[2]=h*g+p*d+v*C,r[5]=h*x+p*A+v*E,r[8]=h*m+p*b+v*T,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8];return t*s*u-t*o*l-i*r*u+i*o*c+a*r*l-a*s*c}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8],f=u*s-o*l,h=o*c-u*r,p=l*r-s*c,v=t*f+i*h+a*p;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/v;return e[0]=f*g,e[1]=(a*l-u*i)*g,e[2]=(o*i-a*s)*g,e[3]=h*g,e[4]=(u*t-a*c)*g,e[5]=(a*r-o*t)*g,e[6]=p*g,e[7]=(i*c-l*t)*g,e[8]=(s*t-i*r)*g,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,a,r,s,o){let c=Math.cos(r),l=Math.sin(r);return this.set(i*c,i*l,-i*(c*s+l*o)+s+e,-a*l,a*c,-a*(-l*s+c*o)+o+t,0,0,1),this}scale(e,t){let i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7]*=t,this}rotate(e){let t=Math.cos(e),i=Math.sin(e),a=this.elements,r=a[0],s=a[3],o=a[6],c=a[1],l=a[4],u=a[7];return a[0]=t*r+i*c,a[3]=t*s+i*l,a[6]=t*o+i*u,a[1]=-i*r+t*c,a[4]=-i*s+t*l,a[7]=-i*o+t*u,this}translate(e,t){let i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<9;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}};n2.prototype.isMatrix3=!0;var f9=0,H8=new k,Y4=new Me,We=new k1,k6=new k,It=new k,d9=new k,p9=new Me,V8=new k(1,0,0),N8=new k(0,1,0),R8=new k(0,0,1),m9={type:"added"},F8={type:"removed"},j1=class extends F2{constructor(){super();Object.defineProperty(this,"id",{value:f9++}),this.uuid=Pe(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=j1.DefaultUp.clone();let e=new k,t=new c4,i=new Me,a=new k(1,1,1);function r(){i.setFromEuler(t,!1)}function s(){t.setFromQuaternion(i,void 0,!1)}t._onChange(r),i._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new k1},normalMatrix:{value:new n2}}),this.matrix=new k1,this.matrixWorld=new k1,this.matrixAutoUpdate=j1.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Pt,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Y4.setFromAxisAngle(e,t),this.quaternion.multiply(Y4),this}rotateOnWorldAxis(e,t){return Y4.setFromAxisAngle(e,t),this.quaternion.premultiply(Y4),this}rotateX(e){return this.rotateOnAxis(V8,e)}rotateY(e){return this.rotateOnAxis(N8,e)}rotateZ(e){return this.rotateOnAxis(R8,e)}translateOnAxis(e,t){return H8.copy(e).applyQuaternion(this.quaternion),this.position.add(H8.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(V8,e)}translateY(e){return this.translateOnAxis(N8,e)}translateZ(e){return this.translateOnAxis(R8,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(We.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?k6.copy(e):k6.set(e,t,i);let a=this.parent;this.updateWorldMatrix(!0,!1),It.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?We.lookAt(It,k6,this.up):We.lookAt(k6,It,this.up),this.quaternion.setFromRotationMatrix(We),a&&(We.extractRotation(a.matrixWorld),Y4.setFromRotationMatrix(We),this.quaternion.premultiply(Y4.invert()))}add(e){if(arguments.length>1){for(let t=0;t1){for(let i=0;i0){a.children=[];for(let o=0;o0){a.animations=[];for(let o=0;o0&&(i.geometries=o),c.length>0&&(i.materials=c),l.length>0&&(i.textures=l),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),p.length>0&&(i.animations=p)}return i.object=a,i;function s(o){let c=[];for(let l in o){let u=o[l];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i=0;--e)if(n[e]>65535)return!0;return!1}function E4(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}var v9=0,G2=new k1,I3=new j1,$4=new k,P2=new Oe,kt=new Oe,c2=new k,b2=class extends F2{constructor(){super();Object.defineProperty(this,"id",{value:v9++}),this.uuid=Pe(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(U6(e)?Ft:Rt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let r=new n2().getNormalMatrix(e);i.applyNormalMatrix(r),i.needsUpdate=!0}let a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return G2.makeRotationFromQuaternion(e),this.applyMatrix4(G2),this}rotateX(e){return G2.makeRotationX(e),this.applyMatrix4(G2),this}rotateY(e){return G2.makeRotationY(e),this.applyMatrix4(G2),this}rotateZ(e){return G2.makeRotationZ(e),this.applyMatrix4(G2),this}translate(e,t,i){return G2.makeTranslation(e,t,i),this.applyMatrix4(G2),this}scale(e,t,i){return G2.makeScale(e,t,i),this.applyMatrix4(G2),this}lookAt(e){return I3.lookAt(e),I3.updateMatrix(),this.applyMatrix4(I3.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter($4).negate(),this.translate($4.x,$4.y,$4.z),this}setFromPoints(e){let t=[];for(let i=0,a=e.length;i0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let c in i){let l=i[c];e.data.attributes[c]=l.toJSON(e.data)}let a={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],u=[];for(let f=0,h=l.length;f0&&(a[c]=u,r=!0)}r&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone(t));let a=e.attributes;for(let l in a){let u=a[l];this.setAttribute(l,u.clone(t))}let r=e.morphAttributes;for(let l in r){let u=[],f=r[l];for(let h=0,p=f.length;h0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===Fr;continue}let a=this[t];if(a===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}a&&a.isColor?a.set(i):a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==A4&&(i.blending=this.blending),this.side!==Ie&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.alphaWrite=this.alphaWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData);function a(r){let s=[];for(let o in r){let c=r[o];delete c.metadata,s.push(c)}return s}if(t){let r=a(e.textures),s=a(e.images);r.length>0&&(i.textures=r),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let a=t.length;i=new Array(a);for(let r=0;r!==a;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.alphaWrite=e.alphaWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};T2.prototype.isMaterial=!0;var Ut=class extends T2{constructor(e){super();this.type="MeshPhongMaterial",this.color=new x1(16777215),this.specular=new x1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=V6,this.normalScale=new z1(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=G4,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}};Ut.prototype.isMeshPhongMaterial=!0;var je=new k,k3=new k,O6=new k,l4=new k,U3=new k,G6=new k,O3=new k,G3=class{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,je)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=je.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(je.copy(this.direction).multiplyScalar(t).add(this.origin),je.distanceToSquared(e))}distanceSqToSegment(e,t,i,a){k3.copy(e).add(t).multiplyScalar(.5),O6.copy(t).sub(e).normalize(),l4.copy(this.origin).sub(k3);let r=e.distanceTo(t)*.5,s=-this.direction.dot(O6),o=l4.dot(this.direction),c=-l4.dot(O6),l=l4.lengthSq(),u=Math.abs(1-s*s),f,h,p,v;if(u>0)if(f=s*c-o,h=s*o-c,v=r*u,f>=0)if(h>=-v)if(h<=v){let g=1/u;f*=g,h*=g,p=f*(f+s*h+2*o)+h*(s*f+h+2*c)+l}else h=r,f=Math.max(0,-(s*h+o)),p=-f*f+h*(h+2*c)+l;else h=-r,f=Math.max(0,-(s*h+o)),p=-f*f+h*(h+2*c)+l;else h<=-v?(f=Math.max(0,-(-s*r+o)),h=f>0?-r:Math.min(Math.max(-r,-c),r),p=-f*f+h*(h+2*c)+l):h<=v?(f=0,h=Math.min(Math.max(-r,-c),r),p=h*(h+2*c)+l):(f=Math.max(0,-(s*r+o)),h=f>0?r:Math.min(Math.max(-r,-c),r),p=-f*f+h*(h+2*c)+l);else h=s>0?-r:r,f=Math.max(0,-(s*h+o)),p=-f*f+h*(h+2*c)+l;return i&&i.copy(this.direction).multiplyScalar(f).add(this.origin),a&&a.copy(O6).multiplyScalar(h).add(k3),p}intersectSphere(e,t){je.subVectors(e.center,this.origin);let i=je.dot(this.direction),a=je.dot(je)-i*i,r=e.radius*e.radius;if(a>r)return null;let s=Math.sqrt(r-a),o=i-s,c=i+s;return o<0&&c<0?null:o<0?this.at(c,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,a,r,s,o,c,l=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return l>=0?(i=(e.min.x-h.x)*l,a=(e.max.x-h.x)*l):(i=(e.max.x-h.x)*l,a=(e.min.x-h.x)*l),u>=0?(r=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),i>s||r>a||((r>i||i!==i)&&(i=r),(s=0?(o=(e.min.z-h.z)*f,c=(e.max.z-h.z)*f):(o=(e.max.z-h.z)*f,c=(e.min.z-h.z)*f),i>c||o>a)||((o>i||i!==i)&&(i=o),(c=0?i:a,t)}intersectsBox(e){return this.intersectBox(e,je)!==null}intersectTriangle(e,t,i,a,r){U3.subVectors(t,e),G6.subVectors(i,e),O3.crossVectors(U3,G6);let s=this.direction.dot(O3),o;if(s>0){if(a)return null;o=1}else if(s<0)o=-1,s=-s;else return null;l4.subVectors(this.origin,e);let c=o*this.direction.dot(G6.crossVectors(l4,G6));if(c<0)return null;let l=o*this.direction.dot(U3.cross(l4));if(l<0||c+l>s)return null;let u=-o*l4.dot(O3);return u<0?null:this.at(u/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};var ie=new k,Xe=new k,q3=new k,Ze=new k,K4=new k,J4=new k,B8=new k,W3=new k,j3=new k,X3=new k,ae=class{constructor(e=new k,t=new k,i=new k){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,a){a.subVectors(i,t),ie.subVectors(e,t),a.cross(ie);let r=a.lengthSq();return r>0?a.multiplyScalar(1/Math.sqrt(r)):a.set(0,0,0)}static getBarycoord(e,t,i,a,r){ie.subVectors(a,t),Xe.subVectors(i,t),q3.subVectors(e,t);let s=ie.dot(ie),o=ie.dot(Xe),c=ie.dot(q3),l=Xe.dot(Xe),u=Xe.dot(q3),f=s*l-o*o;if(f===0)return r.set(-2,-1,-1);let h=1/f,p=(l*c-o*u)*h,v=(s*u-o*c)*h;return r.set(1-p-v,v,p)}static containsPoint(e,t,i,a){return this.getBarycoord(e,t,i,a,Ze),Ze.x>=0&&Ze.y>=0&&Ze.x+Ze.y<=1}static getUV(e,t,i,a,r,s,o,c){return this.getBarycoord(e,t,i,a,Ze),c.set(0,0),c.addScaledVector(r,Ze.x),c.addScaledVector(s,Ze.y),c.addScaledVector(o,Ze.z),c}static isFrontFacing(e,t,i,a){return ie.subVectors(i,t),Xe.subVectors(e,t),ie.cross(Xe).dot(a)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,a){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,i,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ie.subVectors(this.c,this.b),Xe.subVectors(this.a,this.b),ie.cross(Xe).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ae.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ae.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,a,r){return ae.getUV(e,this.a,this.b,this.c,t,i,a,r)}containsPoint(e){return ae.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ae.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,a=this.b,r=this.c,s,o;K4.subVectors(a,i),J4.subVectors(r,i),W3.subVectors(e,i);let c=K4.dot(W3),l=J4.dot(W3);if(c<=0&&l<=0)return t.copy(i);j3.subVectors(e,a);let u=K4.dot(j3),f=J4.dot(j3);if(u>=0&&f<=u)return t.copy(a);let h=c*f-u*l;if(h<=0&&c>=0&&u<=0)return s=c/(c-u),t.copy(i).addScaledVector(K4,s);X3.subVectors(e,r);let p=K4.dot(X3),v=J4.dot(X3);if(v>=0&&p<=v)return t.copy(r);let g=p*l-c*v;if(g<=0&&l>=0&&v<=0)return o=l/(l-v),t.copy(i).addScaledVector(J4,o);let x=u*v-p*f;if(x<=0&&f-u>=0&&p-v>=0)return B8.subVectors(r,a),o=(f-u)/(f-u+(p-v)),t.copy(a).addScaledVector(B8,o);let m=1/(x+g+h);return s=g*m,o=h*m,t.copy(i).addScaledVector(K4,s).addScaledVector(J4,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};var Q4=class extends T2{constructor(e){super();this.type="MeshBasicMaterial",this.color=new x1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=G4,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};Q4.prototype.isMeshBasicMaterial=!0;var P8=new k1,et=new G3,Z3=new qe,u4=new k,h4=new k,f4=new k,Y3=new k,$3=new k,K3=new k,q6=new k,W6=new k,j6=new k,X6=new z1,Z6=new z1,Y6=new z1,J3=new k,$6=new k,l2=class extends j1{constructor(e=new b2,t=new Q4){super();this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,i=Object.keys(t);if(i.length>0){let a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=a.length;r0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let i=this.geometry,a=this.material,r=this.matrixWorld;if(a===void 0||(i.boundingSphere===null&&i.computeBoundingSphere(),Z3.copy(i.boundingSphere),Z3.applyMatrix4(r),e.ray.intersectsSphere(Z3)===!1)||(P8.copy(r).invert(),et.copy(e.ray).applyMatrix4(P8),i.boundingBox!==null&&et.intersectsBox(i.boundingBox)===!1))return;let s;if(i.isBufferGeometry){let o=i.index,c=i.attributes.position,l=i.morphAttributes.position,u=i.morphTargetsRelative,f=i.attributes.uv,h=i.attributes.uv2,p=i.groups,v=i.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,x=p.length;gt.far?null:{distance:l,point:$6.clone(),object:n}}function K6(n,e,t,i,a,r,s,o,c,l,u,f){u4.fromBufferAttribute(a,l),h4.fromBufferAttribute(a,u),f4.fromBufferAttribute(a,f);let h=n.morphTargetInfluences;if(r&&h){q6.set(0,0,0),W6.set(0,0,0),j6.set(0,0,0);for(let v=0,g=r.length;v2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){let t=E4("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let a=i.getImageData(0,0,e.width,e.height),r=a.data;for(let s=0;s1)switch(this.wrapS){case Ht:e.x=e.x-Math.floor(e.x);break;case o2:e.x=e.x<0?0:1;break;case Vt:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ht:e.y=e.y-Math.floor(e.y);break;case o2:e.y=e.y<0?0:1;break;case Vt:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};K1.DEFAULT_IMAGE=void 0;K1.DEFAULT_MAPPING=u3;K1.prototype.isTexture=!0;function Q3(n){return typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&n instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap?Ot.getDataURL(n):n.data?{data:Array.prototype.slice.call(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var I8={specular:1515554,color:15790320,shininess:60,flatShading:!0},q2={diceColor:"#202020",textColor:"#ffffff"},re=class{constructor(e,t,i={diceColor:"#202020",textColor:"#aaaaaa"}){this.w=e;this.h=t;this.options=i;this.scale=50;this.labels=[" ","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"];this.fontFace="Arial";this.options={...q2,...i}}setColor({diceColor:e,textColor:t}){e&&(this.options.diceColor=e),t&&(this.options.textColor=t)}get radius(){return this.scale*this.scaleFactor}get diceColor(){return this.options.diceColor}get textColor(){return this.options.textColor}get buffer(){return this.geometry.geometry}create(){this.textureSize=this.calculateTextureSize(this.scale/2+this.scale*this.margin)*2;let e=this.getGeometry(),t=this.getMaterials();return this.geometry=new l2(e,t),this.geometry.receiveShadow=!0,this.geometry.castShadow=!0,this.body.position.set(0+this.radius*2*Math.random(),0+this.radius*2*Math.random(),0+this.radius*4),this.body.velocity.x=500*Math.random()*2-1,this.body.velocity.y=500*Math.random()*2-1,this.body.angularVelocity.x=100*Math.random(),this.body.angularVelocity.y=100*Math.random(),this}getGeometry(){let e=new Array(this.vertices.length);for(let i=0;i=0&&u=0&&l!==c+1?o.unshift([r,l],[s,u]):o.push([r,l],[s,u]),c=l)}o.length===4&&i.push([i[o[0][0]][o[0][1]],i[o[1][0]][o[1][1]],i[o[3][0]][o[3][1]],i[o[2][0]][o[2][1]],-1])}for(let r=0;r=0&&u<4){--u==-1&&(u=3);let f=i[l][u];if(s.indexOf(f)>=0){o.push(f);break}}}--c}o.push(-1),i.push(o)}return{vectors:t,faces:i}}makeGeometry(e,t){let i=new b2;for(let f=0;f1&&(o=o/l.length,s.font=`${o}pt '${this.fontFace}'`,c=s.measureText("M").width*1.2,a-=c*l.length/2);for(let f=0,h=l.length;f{let[r,s]=a.replace(/\\\|/g,"{ESCAPED_PIPE}").split("|").map(l=>l.replace(/{ESCAPED_PIPE}/g,"\\|")).map(l=>l.trim()),[,o,c]=r.match(/(\d+)(?:[^\d]+?(\d+))?/)??[];if(!(!o&&!c))return[[Number(o),c?Number(c):void 0],s]}),this.isLookup=!0)}if(this.header==="xy"&&!t.columns.has("xy")){this.options=[];for(let i of Array.from(t.columns.values()).slice(1))this.options.push(...i)}else if(this.header&&t.columns.has(this.header))this.options=t.columns.get(this.header);else{if(this.header)throw new Error(`Header ${this.header} was not found in table ${this.path} > ${this.block}.`);this.options=t.rows}}this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"table",result:this.result}}async applyResult(e){e.type==="table"&&(e.result&&(this.result=e.result),await this.render())}},kc=/^\|?([\s\S]+?)\|?$/,_a=/\|/g;function Uc(n){let e=n.split(` +`),i=e.map(s=>(s.trim().match(kc)??[,s.trim()])[1])[0].replace("\\|","{ESCAPED_PIPE}").split(_a),a=[],r=[];for(let s in i){let o=i[s];o.trim().length||(o=s),r.push([o.trim(),[]])}for(let s of e.slice(2)){let o=s.trim().replace(/\\\|/g,"{ESCAPED_PIPE}").split(_a).map(c=>c.replace(/{ESCAPED_PIPE}/g,"\\|")).map(c=>c.trim()).filter(c=>c.length);a.push(o.join(" | "));for(let c in o){let l=o[c].trim();!l.length||!r[c]||r[c][1].push(l)}}return{columns:new Map(r),rows:a}}var S1=w2(require("obsidian"));var f6=class extends S1.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t;this.plugin=t}async display(){let{containerEl:e}=this;e.empty(),e.addClass("dice-roller-settings"),e.createEl("h2",{text:"Dice Roller Settings"}),this.buildGenerics(e.createDiv()),this.buildDisplay(e.createDiv()),this.buildDice(e.createDiv()),this.buildTables(e.createDiv()),this.buildSections(e.createDiv()),this.buildTags(e.createDiv()),this.buildView(e.createDiv()),this.buildRender(e.createDiv()),this.buildFormulaSettings(e.createDiv("dice-roller-setting-additional-container")),e.createDiv("coffee").createEl("a",{href:"https://www.buymeacoffee.com/valentine195"}).createEl("img",{attr:{src:"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=\u2615&slug=valentine195&button_colour=e3e7ef&font_colour=262626&font_family=Inter&outline_colour=262626&coffee_colour=ff0000"}})}buildGenerics(e){e.empty(),new S1.Setting(e).setName("Globally Save Results").setDesc(createFragment(t=>{t.createSpan({text:"Dice results will be saved by default. This can be overridden using "}),t.createEl("code",{text:"dice-: formula"}),t.createEl("p",{text:"Please note that the plugin will attempt to save the result but may not be able to."})})).addToggle(t=>{t.setValue(this.plugin.data.persistResults),t.onChange(async i=>{this.plugin.data.persistResults=i,await this.plugin.saveSettings()})})}buildDisplay(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice Display"),new S1.Setting(e).setName("Display Formula With Results").setDesc("Both the formula and the results will both be displayed in preview mode.").addToggle(t=>{t.setValue(this.plugin.data.displayResultsInline),t.onChange(async i=>{this.plugin.data.displayResultsInline=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Dice Button With Results").setDesc("A dice button will appear next to results.").addToggle(t=>{t.setValue(this.plugin.data.showDice),t.onChange(async i=>{this.plugin.data.showDice=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Add Formula When Using Modify Dice").setDesc(createFragment(t=>{t.createSpan({text:"Both the formula and the results will both be added to the note when using "}),t.createEl("code",{text:"dice-mod"}),t.createSpan({text:"."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaForMod),t.onChange(async i=>{this.plugin.data.displayFormulaForMod=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Formula in Parentheses After").setDesc(createFragment(t=>{t.createSpan({text:"For example, "}),t.createEl("code",{text:"`dice: 1d6`"}),t.createSpan({text:" will become "});let i=t.createSpan("dice-roller");i.createSpan({cls:"dice-roller-result",text:"3"}),(0,S1.setIcon)(i.createSpan("dice-roller-button"),Y2),t.createSpan({text:" (1d6). This only affects Dice Rollers."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaAfter),t.onChange(async i=>{this.plugin.data.displayFormulaAfter=i,await this.plugin.saveSettings()})})}buildDice(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice Rollers"),new S1.Setting(e).setName("Default Face").setDesc("Use this as the number of faces when it is omitted.").addText(t=>{t.setValue(`${this.plugin.data.defaultFace}`),t.inputEl.onblur=async()=>{isNaN(Number(t.inputEl.value))&&new S1.Notice("The default face must be a number."),this.plugin.data.defaultFace=Number(t.inputEl.value),await this.plugin.saveSettings()}}),new S1.Setting(e).setName("Round Results").setDesc("Determine the rounding behavior for dice results.").addDropdown(t=>{t.addOptions(pe).setValue(this.plugin.data.round).onChange(i=>{this.plugin.data.round=i,this.plugin.saveSettings()})}),new S1.Setting(e).setName("Always Render Dice").setDesc(createFragment(t=>{t.createSpan({text:"Dice rolled in notes will always be rendered. Use the "}),t.createEl("code",{text:"|norender"}),t.createSpan({text:" flag to prevent it."})})).addToggle(t=>{t.setValue(this.plugin.data.renderAllDice).onChange(i=>{this.plugin.data.renderAllDice=i,this.plugin.saveSettings()})})}buildTables(e){e.empty(),new S1.Setting(e).setHeading().setName("Table Rollers"),new S1.Setting(e).setName("Display Lookup Table Roll").setDesc("Lookup table rolls will display the rolled number along with the result.").addToggle(t=>{t.setValue(this.plugin.data.displayLookupRoll),t.onChange(async i=>{this.plugin.data.displayLookupRoll=i,await this.plugin.saveSettings()})})}buildSections(e){e.empty(),new S1.Setting(e).setHeading().setName("Section Rollers"),new S1.Setting(e).setName("Add Copy Button to Section Results").setDesc("Randomly rolled sections will have a copy-content button to easy add result to clipboard.").addToggle(t=>{t.setValue(this.plugin.data.copyContentButton),t.onChange(async i=>{this.plugin.data.copyContentButton=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display As Embeds").setDesc("Sections returned from Section & Tag Rollers will display as embedded fields.").addToggle(t=>{t.setValue(this.plugin.data.displayAsEmbed),t.onChange(async i=>{this.plugin.data.displayAsEmbed=i,await this.plugin.saveSettings()})})}buildTags(e){e.empty(),new S1.Setting(e).setHeading().setName("Tag Rollers"),new S1.Setting(e).setName("Roll All Files for Tags").setDesc("Return a result for each file when rolling tags.").addToggle(t=>{t.setValue(this.plugin.data.returnAllTags),t.onChange(async i=>{this.plugin.data.returnAllTags=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Always Return Links for Tags").setDesc("Enables random link rolling with the link parameter. Override by specifying a section type.").addToggle(t=>{t.setValue(this.plugin.data.rollLinksForTags),t.onChange(async i=>{this.plugin.data.rollLinksForTags=i,await this.plugin.saveSettings()})})}buildView(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice View"),new S1.Setting(e).setName("Open Dice View on Startup").setDesc("The dice view can always be opened using the command from the command palette.").addToggle(t=>{t.setValue(this.plugin.data.showLeafOnStartup),t.onChange(async i=>{this.plugin.data.showLeafOnStartup=i,await this.plugin.saveSettings()})})}buildRender(e){e.empty(),new S1.Setting(e).setHeading().setName("Graphical Dice"),new S1.Setting(e).setName("Display graphics for Dice View Rolls").setDesc("Dice rolls from dice view will be displayed on screen.").addToggle(a=>{a.setValue(this.plugin.data.renderer),a.onChange(async r=>{this.plugin.data.renderer=r,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Time for Dice Graphics").setDesc("Rendered dice will stay on screen for this number of milliseconds. Leave blank to require a click to clear dice.").addText(a=>{a.inputEl.setAttr("type","number"),a.inputEl.onblur=r=>{Number(a.getValue())<0&&(new S1.Notice("Render time cannot be less than 0."),a.setValue("0"))},a.setValue(`${this.plugin.data.renderTime}`),a.onChange(async r=>{r&&Number(r)<0||isNaN(Number(r))||(this.plugin.data.renderTime=Number(r),await this.plugin.saveSettings())})}).addExtraButton(a=>{a.setIcon("reset").setTooltip("Reset to Default").onClick(async()=>{this.plugin.data.renderTime=d6.renderTime,await this.plugin.saveSettings(),this.buildRender(e)})}),new S1.Setting(e).setName("Dice Base Color").setDesc("Rendered dice will be this color.").controlEl.createEl("input",{type:"color",value:this.plugin.data.diceColor},a=>{a.value=this.plugin.data.diceColor,a.onchange=async({target:r})=>{let s=r.value;this.plugin.data.diceColor=s,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors")}}),new S1.Setting(e).setName("Dice Text Color").setDesc("Rendered dice will use this color for their numbers.").controlEl.createEl("input",{type:"color",value:this.plugin.data.textColor},a=>{a.value=this.plugin.data.textColor,a.onchange=async({target:r})=>{let s=r.value;!s||(this.plugin.data.textColor=s,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors"))}})}buildFormulaSettings(e){e.empty(),new S1.Setting(e).setHeading().setName("Saved Formulas");let t=e.createDiv();new S1.Setting(t).setName("Add Formula").setDesc("Add a new formula shortcut.").addButton(r=>r.setTooltip("Add Formula").setButtonText("+").onClick(async()=>{let o=await this.buildFormulaForm(t);o&&(this.plugin.data.formulas[o.alias]=o.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())}));let i=e.createDiv("additional"),a=this.plugin.data.formulas;for(let[r,s]of Object.entries(a)){let o=new S1.Setting(i).setName(r);o.controlEl.createSpan({text:s}),o.addExtraButton(c=>c.setIcon("pencil").setTooltip("Edit").onClick(async()=>{let l=await this.buildFormulaForm(t,{alias:r,formula:s});l&&(delete this.plugin.data.formulas[r],this.plugin.data.formulas[l.alias]=l.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())})).addExtraButton(c=>c.setIcon("trash").setTooltip("Delete").onClick(async()=>{delete this.plugin.data.formulas[r],await this.plugin.saveSettings(),this.buildFormulaSettings(e)}))}Object.values(a).length||i.createSpan({text:"Create a formula to see it here!",cls:"no-formulas"})}async buildFormulaForm(e,t={alias:null,formula:null}){return new Promise(i=>{let a=e.createDiv("add-new-formula"),r=a.createDiv("formula-data");new S1.Setting(r).setName("Alias").addText(o=>{o.setValue(t.alias).onChange(c=>t.alias=c)}),new S1.Setting(r).setName("Formula").addText(o=>{o.setValue(t.formula).onChange(c=>t.formula=c)});let s=a.createDiv("formula-buttons");new S1.Setting(s).addButton(o=>o.setCta().setButtonText("Save").onClick(async()=>{a.detach(),i(t)})).addExtraButton(o=>o.setIcon("cross").setTooltip("Cancel").onClick(()=>{a.detach(),i(null)}))})}};var L1=w2(require("obsidian"));var bt="DICE_ROLLER_VIEW",Oc='',Gc='',qc='',Wc='',jc='',Xc='',Zc='';(0,L1.addIcon)("d4",Oc);(0,L1.addIcon)("d6",Gc);(0,L1.addIcon)("d8",qc);(0,L1.addIcon)("d10",Wc);(0,L1.addIcon)("d12",jc);(0,L1.addIcon)("d20",Xc);(0,L1.addIcon)("d100",Zc);(0,L1.addIcon)("dice-roller-save",'');(0,L1.addIcon)("dice-roller-plus",'');(0,L1.addIcon)("dice-roller-minus",'');var Qe=class extends L1.ItemView{constructor(e,t){super(t);this.plugin=e;this.leaf=t;this.dice=Qe.DICE();this.custom="";this.adv=!1;this.dis=!1;this.add=0;this.contentEl.addClass("dice-roller-view"),this.registerEvent(this.plugin.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()}))}static DICE(){return{d4:0,d6:0,d8:0,d10:0,d12:0,d20:0,d100:0}}get customFormulas(){return this.plugin.data.customFormulas}get renderer(){return this.plugin.renderer}async onOpen(){this.display()}async display(){this.contentEl.empty(),this.gridEl=this.contentEl.createDiv("dice-roller-grid"),this.formulaEl=this.contentEl.createDiv("dice-roller-formula");let e=this.contentEl.createDiv("dice-roller-results-container"),t=e.createDiv("dice-roller-results-header");t.createEl("h4",{text:"Results"}),new L1.ExtraButtonComponent(t.createDiv("clear-all")).setIcon("trash").setTooltip("Clear All").onClick(()=>{this.resultEl.empty(),this.resultEl.append(this.noResultsEl)}),this.resultEl=e.createDiv("dice-roller-results"),this.noResultsEl=this.resultEl.createSpan({text:"No results yet! Roll some dice to get started :)"}),this.buildButtons(),this.buildFormula()}buildButtons(){this.gridEl.empty();let e=this.gridEl.createDiv("dice-buttons");for(let o in this.dice){let c=new L1.ExtraButtonComponent(e.createDiv("dice-button")).setIcon(o);c.extraSettingsEl.onclick=async l=>{let u=l.getModifierState("Shift")?-1:1;this.dice[o]+=u,this.setFormula();let f=await this.plugin.getRoller(this.formulaComponent.inputEl.value,"view");f instanceof S2&&(this.stack=f)}}let t=this.gridEl.createDiv("advantage-disadvantage"),i=new L1.ButtonComponent(t).setButtonText("ADV").onClick(()=>{this.adv=!this.adv,this.dis=!1,this.adv?(i.setCta(),a.removeCta()):i.removeCta(),this.setFormula()}),a=new L1.ButtonComponent(t).setButtonText("DIS").onClick(()=>{this.dis=!this.dis,this.dis?(a.setCta(),i.removeCta()):a.removeCta(),this.adv=!1,this.setFormula()}),r=this.gridEl.createDiv("dice-context").createDiv("add-subtract");new L1.ExtraButtonComponent(r).setIcon("dice-roller-minus").onClick(()=>{this.add-=1,s.setValue(`${this.add}`),this.setFormula()});let s=new L1.TextComponent(r).setValue(`${this.add?this.add:""}`).onChange(o=>{isNaN(Number(o))||(this.add=Number(o)),this.setFormula()});if(new L1.ExtraButtonComponent(r).setIcon("dice-roller-plus").onClick(()=>{this.add+=1,s.setValue(`${this.add}`),this.setFormula()}),this.customFormulas.length){let o=this.gridEl.createDiv("dice-roller-results-container");o.createDiv("dice-roller-results-header").createEl("h4",{text:"Saved Formulas"});for(let l of this.customFormulas){let u=o.createDiv("dice-custom-formula-container"),f=u.createDiv("dice-custom-formula");new L1.ExtraButtonComponent(f).setIcon(Y2).setTooltip("Roll").onClick(()=>this.roll(l)),f.createSpan({text:l}),new L1.ExtraButtonComponent(u).setIcon("trash").setTooltip("Remove").onClick(()=>{this.plugin.data.customFormulas=this.plugin.data.customFormulas.filter(h=>h!=l),this.plugin.saveSettings(),this.buildButtons()})}}}async roll(e=this.formulaComponent.inputEl.value){if(!e)return;this.rollButton.setDisabled(!0);let t=await this.plugin.getRoller(e,"view");if(!(t instanceof S2)){new L1.Notice("The Dice View only supports dice rolls.");return}if(t.iconEl.detach(),t.containerEl.onclick=null,await t.roll(),!t.dice.length){new L1.Notice("Invalid formula.");return}try{this.plugin.data.renderer&&(this.addChild(this.renderer),this.renderer.setDice(t),await this.renderer.start(),t.recalculate())}catch(i){new L1.Notice("There was an error rendering the roll."),console.error(i)}this.rollButton.setDisabled(!1),this.addResult(t),this.dice=Qe.DICE(),this.add=null,this.adv=!1,this.dis=!1,this.buildButtons(),this.setFormula()}buildFormula(){this.formulaEl.empty(),this.formulaComponent=new L1.TextAreaComponent(this.formulaEl).setPlaceholder("Dice Formula"),this.formulaComponent.onChange((0,L1.debounce)(async t=>{},500,!0));let e=this.formulaEl.createDiv("action-buttons");this.saveButton=new L1.ButtonComponent(e).setIcon("plus-with-circle").setCta().setTooltip("Save Formula").onClick(()=>this.save()),this.saveButton.buttonEl.addClass("dice-roller-roll"),this.rollButton=new L1.ButtonComponent(e).setIcon(Y2).setCta().setTooltip("Roll").onClick(()=>this.roll()),this.rollButton.buttonEl.addClass("dice-roller-roll")}save(){!this.formulaComponent.inputEl.value||(this.plugin.data.customFormulas.push(this.formulaComponent.inputEl.value),this.buildButtons(),this.plugin.saveSettings())}addResult(e){this.noResultsEl&&this.noResultsEl.detach();let t=createDiv("view-result");t.createSpan({text:e.original}),t.createEl("strong",{attr:{"aria-label":e.resultText}}).appendChild(e.containerEl);let i=t.createDiv("result-context");i.createEl("em",{text:new Date().toLocaleString()}),new L1.ExtraButtonComponent(i).setIcon("trash").onClick(()=>{t.detach(),this.resultEl.children.length===0&&this.resultEl.prepend(this.noResultsEl)}),new L1.ExtraButtonComponent(i).setIcon(Je).setTooltip("Copy Result").onClick(async()=>{await navigator.clipboard.writeText(`${e.result}`)}).extraSettingsEl.addClass("dice-content-copy"),new L1.ExtraButtonComponent(i).setIcon(Y2).setTooltip("Roll Again").onClick(()=>this.roll(e.original)).extraSettingsEl.addClass("dice-result-reroll"),this.resultEl.prepend(t)}get formulaString(){let e=[],t=Object.entries(this.dice).filter(([a,r])=>r!=0);if(!t.length)return"";t.sort((a,r)=>Number(r[0].slice(1))-Number(a[0].slice(1)));let i=t.shift();return e.push(`${i[1]}${i[0]}`),this.adv?e.push("kh"):this.dis&&e.push("dh"),t.length&&e.push(...t.map(([a,r])=>`${r>0?"+":"-"}${Math.abs(r)}${a}`)),this.add&&this.add!=0&&(e.push(this.add>0?"+":"-"),e.push(Math.abs(this.add))),e.join("")}setFormula(){this.formulaComponent.setValue(this.formulaString)}getDisplayText(){return"Dice Roller"}getViewType(){return bt}getIcon(){return Y2}async onClose(){await super.onClose(),this.renderer.unload()}};var Z4=w2(require("obsidian"));var _2=class{constructor(e=[0,0,0,0,0,0,0,0,0]){this.elements=void 0,this.elements=e}identity(){let e=this.elements;e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1}setZero(){let e=this.elements;e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0}setTrace(e){let t=this.elements;t[0]=e.x,t[4]=e.y,t[8]=e.z}getTrace(e=new y){let t=this.elements;return e.x=t[0],e.y=t[4],e.z=t[8],e}vmult(e,t=new y){let i=this.elements,a=e.x,r=e.y,s=e.z;return t.x=i[0]*a+i[1]*r+i[2]*s,t.y=i[3]*a+i[4]*r+i[5]*s,t.z=i[6]*a+i[7]*r+i[8]*s,t}smult(e){for(let t=0;t0){let r=1/a;this.x*=r,this.y*=r,this.z*=r}else this.x=0,this.y=0,this.z=0;return a}unit(e=new y){let t=this.x,i=this.y,a=this.z,r=Math.sqrt(t*t+i*i+a*a);return r>0?(r=1/r,e.x=t*r,e.y=i*r,e.z=a*r):(e.x=1,e.y=0,e.z=0),e}length(){let e=this.x,t=this.y,i=this.z;return Math.sqrt(e*e+t*t+i*i)}lengthSquared(){return this.dot(this)}distanceTo(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z;return Math.sqrt((r-t)*(r-t)+(s-i)*(s-i)+(o-a)*(o-a))}distanceSquared(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z;return(r-t)*(r-t)+(s-i)*(s-i)+(o-a)*(o-a)}scale(e,t=new y){let i=this.x,a=this.y,r=this.z;return t.x=e*i,t.y=e*a,t.z=e*r,t}vmul(e,t=new y){return t.x=e.x*this.x,t.y=e.y*this.y,t.z=e.z*this.z,t}addScaledVector(e,t,i=new y){return i.x=this.x+e*t.x,i.y=this.y+e*t.y,i.z=this.z+e*t.z,i}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isZero(){return this.x===0&&this.y===0&&this.z===0}negate(e=new y){return e.x=-this.x,e.y=-this.y,e.z=-this.z,e}tangents(e,t){let i=this.length();if(i>0){let a=$c,r=1/i;a.set(this.x*r,this.y*r,this.z*r);let s=Kc;Math.abs(a.x)<.9?(s.set(1,0,0),a.cross(s,e)):(s.set(0,1,0),a.cross(s,e)),a.cross(e,t)}else e.set(1,0,0),t.set(0,1,0)}toString(){return this.x+","+this.y+","+this.z}toArray(){return[this.x,this.y,this.z]}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}lerp(e,t,i){let a=this.x,r=this.y,s=this.z;i.x=a+(e.x-a)*t,i.y=r+(e.y-r)*t,i.z=s+(e.z-s)*t}almostEquals(e,t=1e-6){return!(Math.abs(this.x-e.x)>t||Math.abs(this.y-e.y)>t||Math.abs(this.z-e.z)>t)}almostZero(e=1e-6){return!(Math.abs(this.x)>e||Math.abs(this.y)>e||Math.abs(this.z)>e)}isAntiparallelTo(e,t){return this.negate(Ea),Ea.almostEquals(e,t)}clone(){return new y(this.x,this.y,this.z)}};y.ZERO=void 0;y.UNIT_X=void 0;y.UNIT_Y=void 0;y.UNIT_Z=void 0;y.ZERO=new y(0,0,0);y.UNIT_X=new y(1,0,0);y.UNIT_Y=new y(0,1,0);y.UNIT_Z=new y(0,0,1);var $c=new y,Kc=new y,Ea=new y,E2=class{constructor(e={}){this.lowerBound=void 0,this.upperBound=void 0,this.lowerBound=new y,this.upperBound=new y,e.lowerBound&&this.lowerBound.copy(e.lowerBound),e.upperBound&&this.upperBound.copy(e.upperBound)}setFromPoints(e,t,i,a){let r=this.lowerBound,s=this.upperBound,o=i;r.copy(e[0]),o&&o.vmult(r,r),s.copy(r);for(let c=1;cs.x&&(s.x=l.x),l.xs.y&&(s.y=l.y),l.ys.z&&(s.z=l.z),l.z=r.x&&t.y<=a.y&&i.y>=r.y&&t.z<=a.z&&i.z>=r.z}getCorners(e,t,i,a,r,s,o,c){let l=this.lowerBound,u=this.upperBound;e.copy(l),t.set(u.x,l.y,l.z),i.set(u.x,u.y,l.z),a.set(l.x,u.y,u.z),r.set(u.x,l.y,u.z),s.set(l.x,u.y,l.z),o.set(l.x,l.y,u.z),c.copy(u)}toLocalFrame(e,t){let i=Da,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,s,o,c,l,u,f);for(let h=0;h!==8;h++){let m=i[h];e.pointToLocal(m,m)}return t.setFromPoints(i)}toWorldFrame(e,t){let i=Da,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,s,o,c,l,u,f);for(let h=0;h!==8;h++){let m=i[h];e.pointToWorld(m,m)}return t.setFromPoints(i)}overlapsRay(e){let{direction:t,from:i}=e,a=1/t.x,r=1/t.y,s=1/t.z,o=(this.lowerBound.x-i.x)*a,c=(this.upperBound.x-i.x)*a,l=(this.lowerBound.y-i.y)*r,u=(this.upperBound.y-i.y)*r,f=(this.lowerBound.z-i.z)*s,h=(this.upperBound.z-i.z)*s,m=Math.max(Math.max(Math.min(o,c),Math.min(l,u)),Math.min(f,h)),v=Math.min(Math.min(Math.max(o,c),Math.max(l,u)),Math.max(f,h));return!(v<0||m>v)}},La=new y,Da=[new y,new y,new y,new y,new y,new y,new y,new y],k0=class{constructor(){this.matrix=void 0,this.matrix=[]}get(e,t){let{index:i}=e,{index:a}=t;if(a>i){let r=a;a=i,i=r}return this.matrix[(i*(i+1)>>1)+a-1]}set(e,t,i){let{index:a}=e,{index:r}=t;if(r>a){let s=r;r=a,a=s}this.matrix[(a*(a+1)>>1)+r-1]=i?1:0}reset(){for(let e=0,t=this.matrix.length;e!==t;e++)this.matrix[e]=0}setNumObjects(e){this.matrix.length=e*(e-1)>>1}},U0=class{constructor(){this._listeners=void 0}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;return i[e]===void 0&&(i[e]=[]),i[e].includes(t)||i[e].push(t),this}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return!!(i[e]!==void 0&&i[e].includes(t))}hasAnyEventListener(e){return this._listeners===void 0?!1:this._listeners[e]!==void 0}removeEventListener(e,t){if(this._listeners===void 0)return this;let i=this._listeners;if(i[e]===void 0)return this;let a=i[e].indexOf(t);return a!==-1&&i[e].splice(a,1),this}dispatchEvent(e){if(this._listeners===void 0)return this;let i=this._listeners[e.type];if(i!==void 0){e.target=this;for(let a=0,r=i.length;a.499&&(i=2*Math.atan2(s,l),a=Math.PI/2,r=0),u<-.499&&(i=-2*Math.atan2(s,l),a=-Math.PI/2,r=0),i===void 0){let f=s*s,h=o*o,m=c*c;i=Math.atan2(2*o*l-2*s*c,1-2*h-2*m),a=Math.asin(2*u),r=Math.atan2(2*s*l-2*o*c,1-2*f-2*m)}break;default:throw new Error("Euler order "+t+" not supported yet.")}e.y=i,e.z=a,e.x=r}setFromEuler(e,t,i,a="XYZ"){let r=Math.cos(e/2),s=Math.cos(t/2),o=Math.cos(i/2),c=Math.sin(e/2),l=Math.sin(t/2),u=Math.sin(i/2);return a==="XYZ"?(this.x=c*s*o+r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o-c*l*u):a==="YXZ"?(this.x=c*s*o+r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o+c*l*u):a==="ZXY"?(this.x=c*s*o-r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o-c*l*u):a==="ZYX"?(this.x=c*s*o-r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o+c*l*u):a==="YZX"?(this.x=c*s*o+r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o-c*l*u):a==="XZY"&&(this.x=c*s*o-r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o+c*l*u),this}clone(){return new O1(this.x,this.y,this.z,this.w)}slerp(e,t,i=new O1){let a=this.x,r=this.y,s=this.z,o=this.w,c=e.x,l=e.y,u=e.z,f=e.w,h,m,v,g,x;return m=a*c+r*l+s*u+o*f,m<0&&(m=-m,c=-c,l=-l,u=-u,f=-f),1-m>1e-6?(h=Math.acos(m),v=Math.sin(h),g=Math.sin((1-t)*h)/v,x=Math.sin(t*h)/v):(g=1-t,x=t),i.x=g*a+x*c,i.y=g*r+x*l,i.z=g*s+x*u,i.w=g*o+x*f,i}integrate(e,t,i,a=new O1){let r=e.x*i.x,s=e.y*i.y,o=e.z*i.z,c=this.x,l=this.y,u=this.z,f=this.w,h=t*.5;return a.x+=h*(r*f+s*u-o*l),a.y+=h*(s*f+o*c-r*u),a.z+=h*(o*f+r*l-s*c),a.w+=h*(-r*c-s*l-o*u),a}},Jc=new y,Qc=new y,e7={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256},c1=class{constructor(e={}){this.id=void 0,this.type=void 0,this.boundingSphereRadius=void 0,this.collisionResponse=void 0,this.collisionFilterGroup=void 0,this.collisionFilterMask=void 0,this.material=void 0,this.body=void 0,this.id=c1.idCounter++,this.type=e.type||0,this.boundingSphereRadius=0,this.collisionResponse=e.collisionResponse?e.collisionResponse:!0,this.collisionFilterGroup=e.collisionFilterGroup!==void 0?e.collisionFilterGroup:1,this.collisionFilterMask=e.collisionFilterMask!==void 0?e.collisionFilterMask:-1,this.material=e.material?e.material:null,this.body=null}updateBoundingSphereRadius(){throw"computeBoundingSphereRadius() not implemented for shape type "+this.type}volume(){throw"volume() not implemented for shape type "+this.type}calculateLocalInertia(e,t){throw"calculateLocalInertia() not implemented for shape type "+this.type}calculateWorldAABB(e,t,i,a){throw"calculateWorldAABB() not implemented for shape type "+this.type}};c1.idCounter=0;c1.types=e7;var N1=class{constructor(e={}){this.position=void 0,this.quaternion=void 0,this.position=new y,this.quaternion=new O1,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion)}pointToLocal(e,t){return N1.pointToLocalFrame(this.position,this.quaternion,e,t)}pointToWorld(e,t){return N1.pointToWorldFrame(this.position,this.quaternion,e,t)}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}static pointToLocalFrame(e,t,i,a=new y){return i.vsub(e,a),t.conjugate(Ta),Ta.vmult(a,a),a}static pointToWorldFrame(e,t,i,a=new y){return t.vmult(i,a),a.vadd(e,a),a}static vectorToWorldFrame(e,t,i=new y){return e.vmult(t,i),i}static vectorToLocalFrame(e,t,i,a=new y){return t.w*=-1,t.vmult(i,a),t.w*=-1,a}},Ta=new O1,et=class extends c1{constructor(e={}){let{vertices:t=[],faces:i=[],normals:a=[],axes:r,boundingSphereRadius:s}=e;super({type:c1.types.CONVEXPOLYHEDRON});this.vertices=void 0,this.faces=void 0,this.faceNormals=void 0,this.worldVertices=void 0,this.worldVerticesNeedsUpdate=void 0,this.worldFaceNormals=void 0,this.worldFaceNormalsNeedsUpdate=void 0,this.uniqueAxes=void 0,this.uniqueEdges=void 0,this.vertices=t,this.faces=i,this.faceNormals=a,this.faceNormals.length===0&&this.computeNormals(),s?this.boundingSphereRadius=s:this.updateBoundingSphereRadius(),this.worldVertices=[],this.worldVerticesNeedsUpdate=!0,this.worldFaceNormals=[],this.worldFaceNormalsNeedsUpdate=!0,this.uniqueAxes=r?r.slice():null,this.uniqueEdges=[],this.computeEdges()}computeEdges(){let e=this.faces,t=this.vertices,i=this.uniqueEdges;i.length=0;let a=new y;for(let r=0;r!==e.length;r++){let s=e[r],o=s.length;for(let c=0;c!==o;c++){let l=(c+1)%o;t[s[c]].vsub(t[s[l]],a),a.normalize();let u=!1;for(let f=0;f!==i.length;f++)if(i[f].almostEquals(a)||i[f].almostEquals(a)){u=!0;break}u||i.push(a.clone())}}}computeNormals(){this.faceNormals.length=this.faces.length;for(let e=0;eh&&(h=g,f=v)}let m=[];for(let v=0;v=0&&this.clipFaceAgainstHull(s,e,t,m,o,c,l)}findSeparatingAxis(e,t,i,a,r,s,o,c){let l=new y,u=new y,f=new y,h=new y,m=new y,v=new y,g=Number.MAX_VALUE,x=this;if(x.uniqueAxes)for(let p=0;p!==x.uniqueAxes.length;p++){i.vmult(x.uniqueAxes[p],l);let d=x.testSepAxis(l,e,t,i,a,r);if(d===!1)return!1;d0&&s.negate(s),!0}testSepAxis(e,t,i,a,r,s){let o=this;et.project(o,e,i,a,O0),et.project(t,e,r,s,G0);let c=O0[0],l=O0[1],u=G0[0],f=G0[1];if(c0?1/t:0,this.material=e.material||null,this.linearDamping=typeof e.linearDamping=="number"?e.linearDamping:.01,this.type=t<=0?i1.STATIC:i1.DYNAMIC,typeof e.type==typeof i1.STATIC&&(this.type=e.type),this.allowSleep=typeof e.allowSleep!="undefined"?e.allowSleep:!0,this.sleepState=i1.AWAKE,this.sleepSpeedLimit=typeof e.sleepSpeedLimit!="undefined"?e.sleepSpeedLimit:.1,this.sleepTimeLimit=typeof e.sleepTimeLimit!="undefined"?e.sleepTimeLimit:1,this.timeLastSleepy=0,this.wakeUpAfterNarrowphase=!1,this.torque=new y,this.quaternion=new O1,this.initQuaternion=new O1,this.previousQuaternion=new O1,this.interpolatedQuaternion=new O1,e.quaternion&&(this.quaternion.copy(e.quaternion),this.initQuaternion.copy(e.quaternion),this.previousQuaternion.copy(e.quaternion),this.interpolatedQuaternion.copy(e.quaternion)),this.angularVelocity=new y,e.angularVelocity&&this.angularVelocity.copy(e.angularVelocity),this.initAngularVelocity=new y,this.shapes=[],this.shapeOffsets=[],this.shapeOrientations=[],this.inertia=new y,this.invInertia=new y,this.invInertiaWorld=new _2,this.invMassSolve=0,this.invInertiaSolve=new y,this.invInertiaWorldSolve=new _2,this.fixedRotation=typeof e.fixedRotation!="undefined"?e.fixedRotation:!1,this.angularDamping=typeof e.angularDamping!="undefined"?e.angularDamping:.01,this.linearFactor=new y(1,1,1),e.linearFactor&&this.linearFactor.copy(e.linearFactor),this.angularFactor=new y(1,1,1),e.angularFactor&&this.angularFactor.copy(e.angularFactor),this.aabb=new E2,this.aabbNeedsUpdate=!0,this.boundingRadius=0,this.wlambda=new y,this.isTrigger=Boolean(e.isTrigger),e.shape&&this.addShape(e.shape),this.updateMassProperties()}wakeUp(){let e=this.sleepState;this.sleepState=i1.AWAKE,this.wakeUpAfterNarrowphase=!1,e===i1.SLEEPING&&this.dispatchEvent(i1.wakeupEvent)}sleep(){this.sleepState=i1.SLEEPING,this.velocity.set(0,0,0),this.angularVelocity.set(0,0,0),this.wakeUpAfterNarrowphase=!1}sleepTick(e){if(this.allowSleep){let t=this.sleepState,i=this.velocity.lengthSquared()+this.angularVelocity.lengthSquared(),a=this.sleepSpeedLimit**2;t===i1.AWAKE&&ia?this.wakeUp():t===i1.SLEEPY&&e-this.timeLastSleepy>this.sleepTimeLimit&&(this.sleep(),this.dispatchEvent(i1.sleepEvent))}}updateSolveMassProperties(){this.sleepState===i1.SLEEPING||this.type===i1.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve.setZero(),this.invInertiaWorldSolve.setZero()):(this.invMassSolve=this.invMass,this.invInertiaSolve.copy(this.invInertia),this.invInertiaWorldSolve.copy(this.invInertiaWorld))}pointToLocalFrame(e,t=new y){return e.vsub(this.position,t),this.quaternion.conjugate().vmult(t,t),t}vectorToLocalFrame(e,t=new y){return this.quaternion.conjugate().vmult(e,t),t}pointToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t.vadd(this.position,t),t}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}addShape(e,t,i){let a=new y,r=new O1;return t&&a.copy(t),i&&r.copy(i),this.shapes.push(e),this.shapeOffsets.push(a),this.shapeOrientations.push(r),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=this,this}removeShape(e){let t=this.shapes.indexOf(e);return t===-1?(console.warn("Shape does not belong to the body"),this):(this.shapes.splice(t,1),this.shapeOffsets.splice(t,1),this.shapeOrientations.splice(t,1),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=null,this)}updateBoundingRadius(){let e=this.shapes,t=this.shapeOffsets,i=e.length,a=0;for(let r=0;r!==i;r++){let s=e[r];s.updateBoundingSphereRadius();let o=t[r].length(),c=s.boundingSphereRadius;o+c>a&&(a=o+c)}this.boundingRadius=a}updateAABB(){let e=this.shapes,t=this.shapeOffsets,i=this.shapeOrientations,a=e.length,r=a7,s=r7,o=this.quaternion,c=this.aabb,l=n7;for(let u=0;u!==a;u++){let f=e[u];o.vmult(t[u],r),r.vadd(this.position,r),o.mult(i[u],s),f.calculateWorldAABB(r,s,l.lowerBound,l.upperBound),u===0?c.copy(l):c.extend(l)}this.aabbNeedsUpdate=!1}updateInertiaWorld(e){let t=this.invInertia;if(!(t.x===t.y&&t.y===t.z&&!e)){let i=s7,a=o7;i.setRotationFromQuaternion(this.quaternion),i.transpose(a),i.scale(t,i),i.mmult(a,this.invInertiaWorld)}}applyForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=c7;t.cross(e,i),this.force.vadd(e,this.force),this.torque.vadd(i,this.torque)}applyLocalForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=l7,a=u7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyForce(i,a)}applyTorque(e){this.type===i1.DYNAMIC&&(this.sleepState===i1.SLEEPING&&this.wakeUp(),this.torque.vadd(e,this.torque))}applyImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=t,a=h7;a.copy(e),a.scale(this.invMass,a),this.velocity.vadd(a,this.velocity);let r=f7;i.cross(e,r),this.invInertiaWorld.vmult(r,r),this.angularVelocity.vadd(r,this.angularVelocity)}applyLocalImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=d7,a=p7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyImpulse(i,a)}updateMassProperties(){let e=m7;this.invMass=this.mass>0?1/this.mass:0;let t=this.inertia,i=this.fixedRotation;this.updateAABB(),e.set((this.aabb.upperBound.x-this.aabb.lowerBound.x)/2,(this.aabb.upperBound.y-this.aabb.lowerBound.y)/2,(this.aabb.upperBound.z-this.aabb.lowerBound.z)/2),p6.calculateInertia(e,this.mass,t),this.invInertia.set(t.x>0&&!i?1/t.x:0,t.y>0&&!i?1/t.y:0,t.z>0&&!i?1/t.z:0),this.updateInertiaWorld(!0)}getVelocityAtWorldPoint(e,t){let i=new y;return e.vsub(this.position,i),this.angularVelocity.cross(i,t),this.velocity.vadd(t,t),t}integrate(e,t,i){if(this.previousPosition.copy(this.position),this.previousQuaternion.copy(this.quaternion),!(this.type===i1.DYNAMIC||this.type===i1.KINEMATIC)||this.sleepState===i1.SLEEPING)return;let a=this.velocity,r=this.angularVelocity,s=this.position,o=this.force,c=this.torque,l=this.quaternion,u=this.invMass,f=this.invInertiaWorld,h=this.linearFactor,m=u*e;a.x+=o.x*m*h.x,a.y+=o.y*m*h.y,a.z+=o.z*m*h.z;let v=f.elements,g=this.angularFactor,x=c.x*g.x,p=c.y*g.y,d=c.z*g.z;r.x+=e*(v[0]*x+v[1]*p+v[2]*d),r.y+=e*(v[3]*x+v[4]*p+v[5]*d),r.z+=e*(v[6]*x+v[7]*p+v[8]*d),s.x+=a.x*e,s.y+=a.y*e,s.z+=a.z*e,l.integrate(this.angularVelocity,e,this.angularFactor,l),t&&(i?l.normalizeFast():l.normalize()),this.aabbNeedsUpdate=!0,this.updateInertiaWorld()}};i1.idCounter=0;i1.COLLIDE_EVENT_NAME="collide";i1.DYNAMIC=q0.DYNAMIC;i1.STATIC=q0.STATIC;i1.KINEMATIC=q0.KINEMATIC;i1.AWAKE=W0.AWAKE;i1.SLEEPY=W0.SLEEPY;i1.SLEEPING=W0.SLEEPING;i1.wakeupEvent={type:"wakeup"};i1.sleepyEvent={type:"sleepy"};i1.sleepEvent={type:"sleep"};var a7=new y,r7=new O1,n7=new E2,s7=new _2,o7=new _2,c7=new y,l7=new y,u7=new y,h7=new y,f7=new y,d7=new y,p7=new y,m7=new y,Ha=class{constructor(){this.world=void 0,this.useBoundingBoxes=void 0,this.dirty=void 0,this.world=null,this.useBoundingBoxes=!1,this.dirty=!0}collisionPairs(e,t,i){throw new Error("collisionPairs not implemented for this BroadPhase class!")}needBroadphaseCollision(e,t){return!((e.collisionFilterGroup&t.collisionFilterMask)==0||(t.collisionFilterGroup&e.collisionFilterMask)==0||((e.type&i1.STATIC)!=0||e.sleepState===i1.SLEEPING)&&((t.type&i1.STATIC)!=0||t.sleepState===i1.SLEEPING))}intersectionTest(e,t,i,a){this.useBoundingBoxes?this.doBoundingBoxBroadphase(e,t,i,a):this.doBoundingSphereBroadphase(e,t,i,a)}doBoundingSphereBroadphase(e,t,i,a){let r=v7;t.position.vsub(e.position,r);let s=(e.boundingRadius+t.boundingRadius)**2;r.lengthSquared()i.lengthSquared()}aabbQuery(e,t,i){return console.warn(".aabbQuery is not implemented in this Broadphase subclass."),[]}},v7=new y,g7={keys:[]},x7=[],M7=[];var yf=new y,m6=class extends Ha{constructor(){super()}collisionPairs(e,t,i){let a=e.bodies,r=a.length,s,o;for(let c=0;c!==r;c++)for(let l=0;l!==c;l++)s=a[c],o=a[l],!!this.needBroadphaseCollision(s,o)&&this.intersectionTest(s,o,t,i)}aabbQuery(e,t,i=[]){for(let a=0;a{}}intersectWorld(e,t){return this.mode=t.mode||Q1.ANY,this.result=t.result||new v6,this.skipBackfaces=!!t.skipBackfaces,this.collisionFilterMask=typeof t.collisionFilterMask!="undefined"?t.collisionFilterMask:-1,this.collisionFilterGroup=typeof t.collisionFilterGroup!="undefined"?t.collisionFilterGroup:-1,this.checkCollisionResponse=typeof t.checkCollisionResponse!="undefined"?t.checkCollisionResponse:!0,t.from&&this.from.copy(t.from),t.to&&this.to.copy(t.to),this.callback=t.callback||(()=>{}),this.hasHit=!1,this.result.reset(),this.updateDirection(),this.getAABB(ka),X0.length=0,e.broadphase.aabbQuery(e,ka,X0),this.intersectBodies(X0),this.hasHit}intersectBody(e,t){t&&(this.result=t,this.updateDirection());let i=this.checkCollisionResponse;if(i&&!e.collisionResponse||(this.collisionFilterGroup&e.collisionFilterMask)==0||(e.collisionFilterGroup&this.collisionFilterMask)==0)return;let a=b7,r=y7;for(let s=0,o=e.shapes.length;se.boundingSphereRadius)return;let o=this[e.type];o&&o.call(this,e,t,i,a,e)}_intersectBox(e,t,i,a,r){return this._intersectConvex(e.convexPolyhedronRepresentation,t,i,a,r)}_intersectPlane(e,t,i,a,r){let s=this.from,o=this.to,c=this.direction,l=new y(0,0,1);t.vmult(l,l);let u=new y;s.vsub(i,u);let f=u.dot(l);o.vsub(i,u);let h=u.dot(l);if(f*h>0||s.distanceTo(o)=0&&g<=1&&(s.lerp(o,g,m),m.vsub(i,v),v.normalize(),this.reportIntersection(v,m,r,a,-1)),this.result.shouldStop)return;x>=0&&x<=1&&(s.lerp(o,x,m),m.vsub(i,v),v.normalize(),this.reportIntersection(v,m,r,a,-1))}}_intersectConvex(e,t,i,a,r,s){let o=S7,c=Oa,l=s&&s.faceList||null,u=e.faces,f=e.vertices,h=e.faceNormals,m=this.direction,v=this.from,g=this.to,x=v.distanceTo(g),p=l?l.length:u.length,d=this.result;for(let A=0;!d.shouldStop&&Ax||this.reportIntersection(o,L2,r,a,b)}}}}_intersectTrimesh(e,t,i,a,r,s){let o=_7,c=V7,l=N7,u=Oa,f=E7,h=L7,m=D7,v=H7,g=T7,x=e.indices;e.vertices;let p=this.from,d=this.to,A=this.direction;l.position.copy(i),l.quaternion.copy(t),N1.vectorToLocalFrame(i,t,A,f),N1.pointToLocalFrame(i,t,p,h),N1.pointToLocalFrame(i,t,d,m),m.x*=e.scale.x,m.y*=e.scale.y,m.z*=e.scale.z,h.x*=e.scale.x,h.y*=e.scale.y,h.z*=e.scale.z,m.vsub(h,f),f.normalize();let b=h.distanceSquared(m);e.tree.rayQuery(this,l,c);for(let C=0,E=c.length;!this.result.shouldStop&&C!==E;C++){let T=c[C];e.getNormal(T,o),e.getVertex(x[T*3],$2),$2.vsub(h,u);let _=f.dot(o),P=o.dot(u)/_;if(P<0)continue;f.scale(P,L2),L2.vadd(h,L2),e.getVertex(x[T*3+1],ve),e.getVertex(x[T*3+2],ge);let F=L2.distanceSquared(h);!(Q1.pointInTriangle(L2,ve,$2,ge)||Q1.pointInTriangle(L2,$2,ve,ge))||F>b||(N1.vectorToWorldFrame(t,o,g),N1.pointToWorldFrame(i,t,L2,v),this.reportIntersection(g,v,r,a,T))}c.length=0}reportIntersection(e,t,i,a,r){let s=this.from,o=this.to,c=s.distanceTo(t),l=this.result;if(!(this.skipBackfaces&&e.dot(this.direction)>0))switch(l.hitFaceIndex=typeof r!="undefined"?r:-1,this.mode){case Q1.ALL:this.hasHit=!0,l.set(s,o,e,t,i,a,c),l.hasHit=!0,this.callback(l);break;case Q1.CLOSEST:(c=0&&(f=r*l-s*o)>=0&&u+fT.maxForce&&(m=T.maxForce-x),A[E]+=m,v+=m>0?m:-m,T.addToWlambda(m)}if(v*ve;)t.pop();for(;t.length=0&&u.restitution>=0&&(o.restitution=l.restitution*u.restitution),o.si=r||i,o.sj=s||a,o}createFrictionEquationsFromContact(e,t){let i=e.bi,a=e.bj,r=e.si,s=e.sj,o=this.world,c=this.currentContactMaterial,l=c.friction,u=r.material||i.material,f=s.material||a.material;if(u&&f&&u.friction>=0&&f.friction>=0&&(l=u.friction*f.friction),l>0){let h=l*o.gravity.length(),m=i.invMass+a.invMass;m>0&&(m=1/m);let v=this.frictionEquationPool,g=v.length?v.pop():new K0(i,a,h*m),x=v.length?v.pop():new K0(i,a,h*m);return g.bi=x.bi=i,g.bj=x.bj=a,g.minForce=x.minForce=-h*m,g.maxForce=x.maxForce=h*m,g.ri.copy(e.ri),g.rj.copy(e.rj),x.ri.copy(e.ri),x.rj.copy(e.rj),e.ni.tangents(g.t,x.t),g.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,o.dt),x.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,o.dt),g.enabled=x.enabled=e.enabled,t.push(g,x),!0}return!1}createFrictionFromAverage(e){let t=this.result[this.result.length-1];if(!this.createFrictionEquationsFromContact(t,this.frictionResult)||e===1)return;let i=this.frictionResult[this.frictionResult.length-2],a=this.frictionResult[this.frictionResult.length-1];Ct.setZero(),Ot.setZero(),Gt.setZero();let r=t.bi;t.bj;for(let o=0;o!==e;o++)t=this.result[this.result.length-1-o],t.bi!==r?(Ct.vadd(t.ni,Ct),Ot.vadd(t.ri,Ot),Gt.vadd(t.rj,Gt)):(Ct.vsub(t.ni,Ct),Ot.vadd(t.rj,Ot),Gt.vadd(t.ri,Gt));let s=1/e;Ot.scale(s,i.ri),Gt.scale(s,i.rj),a.ri.copy(i.ri),a.rj.copy(i.rj),Ct.normalize(),Ct.tangents(i.t,a.t)}getContacts(e,t,i,a,r,s,o){this.contactPointPool=r,this.frictionEquationPool=o,this.result=a,this.frictionResult=s;let c=J7,l=Q7,u=$7,f=K7;for(let h=0,m=e.length;h!==m;h++){let v=e[h],g=t[h],x=null;v.material&&g.material&&(x=i.getContactMaterial(v.material,g.material)||null);let p=v.type&i1.KINEMATIC&&g.type&i1.STATIC||v.type&i1.STATIC&&g.type&i1.KINEMATIC||v.type&i1.KINEMATIC&&g.type&i1.KINEMATIC;for(let d=0;dA.boundingSphereRadius+C.boundingSphereRadius)continue;let E=null;A.material&&C.material&&(E=i.getContactMaterial(A.material,C.material)||null),this.currentContactMaterial=E||x||i.defaultContactMaterial;let T=A.type|C.type,_=this[T];if(_){let P=!1;A.type0){let W=zl,X=Al;W.copy(m[(L+1)%3]),X.copy(m[(L+2)%3]);let Q=W.length(),a1=X.length();W.normalize(),X.normalize();let B=C6.dot(W),M1=C6.dot(X);if(B-Q&&M1-a1){let u1=Math.abs(O-Z-v);if((T===null||u1e.boundingSphereRadius+t.boundingSphereRadius)&&e.findSeparatingAxis(t,i,r,a,s,v,h,m)){let g=[],x=Wl;e.clipAgainstHull(i,r,t,a,s,v,-100,100,g);let p=0;for(let d=0;d!==g.length;d++){if(f)return!0;let A=this.createContactEquation(o,c,e,t,l,u),b=A.ri,C=A.rj;v.negate(A.ni),g[d].normal.negate(x),x.scale(g[d].depth,x),g[d].point.vadd(x,b),C.copy(g[d].point),b.vsub(i,b),C.vsub(a,C),b.vadd(i,b),b.vsub(o.position,b),C.vadd(a,C),C.vsub(c.position,C),this.result.push(A),p++,this.enableFrictionReduction||this.createFrictionEquationsFromContact(A,this.frictionResult)}this.enableFrictionReduction&&p&&this.createFrictionFromAverage(p)}}sphereConvex(e,t,i,a,r,s,o,c,l,u,f){let h=this.v3pool;i.vsub(a,Dl);let m=t.faceNormals,v=t.faces,g=t.vertices,x=e.radius,p=!1;for(let d=0;d!==g.length;d++){let A=g[d],b=Nl;s.vmult(A,b),a.vadd(b,b);let C=Vl;if(b.vsub(i,C),C.lengthSquared()0){let D=[];for(let z=0,H=C.length;z!==H;z++){let V=h.get();s.vmult(g[C[z]],V),a.vadd(V,V),D.push(V)}if(yl(D,E,i)){if(f)return!0;p=!0;let z=this.createContactEquation(o,c,e,t,l,u);E.scale(-x,z.ri),E.negate(z.ni);let H=h.get();E.scale(-F,H);let V=h.get();E.scale(-x,V),i.vsub(a,z.rj),z.rj.vadd(V,z.rj),z.rj.vadd(H,z.rj),z.rj.vadd(a,z.rj),z.rj.vsub(c.position,z.rj),z.ri.vadd(i,z.ri),z.ri.vsub(o.position,z.ri),h.release(H),h.release(V),this.result.push(z),this.createFrictionEquationsFromContact(z,this.frictionResult);for(let L=0,N=D.length;L!==N;L++)h.release(D[L]);return}else for(let z=0;z!==C.length;z++){let H=h.get(),V=h.get();s.vmult(g[C[(z+1)%C.length]],H),s.vmult(g[C[(z+2)%C.length]],V),a.vadd(H,H),a.vadd(V,V);let L=Tl;V.vsub(H,L);let N=Hl;L.unit(N);let U=h.get(),Z=h.get();i.vsub(H,Z);let O=Z.dot(N);N.scale(O,U),U.vadd(H,U);let W=h.get();if(U.vsub(i,W),O>0&&O*Oh.length||A>h[0].length)return;p<0&&(p=0),d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),p>=h.length&&(p=h.length-1),d>=h.length&&(d=h.length-1),b>=h[0].length&&(b=h[0].length-1),A>=h[0].length&&(A=h[0].length-1);let C=[];t.getRectMinMax(p,A,d,b,C);let E=C[0],T=C[1];if(x.z-m>T||x.z+m2)return}}boxHeightfield(e,t,i,a,r,s,o,c,l,u,f){return e.convexPolyhedronRepresentation.material=e.material,e.convexPolyhedronRepresentation.collisionResponse=e.collisionResponse,this.convexHeightfield(e.convexPolyhedronRepresentation,t,i,a,r,s,o,c,e,t,f)}convexHeightfield(e,t,i,a,r,s,o,c,l,u,f){let h=t.data,m=t.elementSize,v=e.boundingSphereRadius,g=e9,x=t9,p=Ql;N1.pointToLocalFrame(a,s,i,p);let d=Math.floor((p.x-v)/m)-1,A=Math.ceil((p.x+v)/m)+1,b=Math.floor((p.y-v)/m)-1,C=Math.ceil((p.y+v)/m)+1;if(A<0||C<0||d>h.length||b>h[0].length)return;d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),C<0&&(C=0),d>=h.length&&(d=h.length-1),A>=h.length&&(A=h.length-1),C>=h[0].length&&(C=h[0].length-1),b>=h[0].length&&(b=h[0].length-1);let E=[];t.getRectMinMax(d,b,A,C,E);let T=E[0],_=E[1];if(!(p.z-v>_||p.z+v0&&V<0&&(x.vsub(h,p),g.copy(v),g.normalize(),L=p.dot(g),g.scale(L,p),p.vadd(h,p),p.distanceTo(x)0&&i===!0||u<=0&&i===!1){i===null&&(i=u>0);continue}else return!1}return!0}var C6=new y,Cl=new y,zl=new y,Al=new y,wl=[new y,new y,new y,new y,new y,new y],Sl=new y,_l=new y,El=new y,Ll=new y,Dl=new y,Tl=new y,Hl=new y,Vl=new y,Nl=new y,Rl=new y,Fl=new y,Bl=new y,Pl=new y,Il=new y,kl=new y,Ul=new y,Ol=new y,Gl=new y,ql=new y,Wl=new y,jl=new y,Xl=new y,Zl=new y,Yl=new y,wr=new O1,$l=new y,Kl=new y,Sr=new y,Jl=new y,Ql=new y,e9=new y,t9=[0],i9=new y,a9=new y,J0=class{constructor(){this.current=void 0,this.previous=void 0,this.current=[],this.previous=[]}getKey(e,t){if(ta[r];)r++;if(i!==a[r]){for(let s=a.length-1;s>=r;s--)a[s+1]=a[s];a[r]=i}}tick(){let e=this.current;this.current=this.previous,this.previous=e,this.current.length=0}getDiff(e,t){let i=this.current,a=this.previous,r=i.length,s=a.length,o=0;for(let c=0;ca[o];)o++;l=u===a[o],l||_r(e,u)}o=0;for(let c=0;ci[o];)o++;l=i[o]===u,l||_r(t,u)}}};function _r(n,e){n.push((e&4294901760)>>16,e&65535)}var Er=class{constructor(){this.data={keys:[]}}get(e,t){if(e>t){let i=t;t=e,e=i}return this.data[e+"-"+t]}set(e,t,i){if(e>t){let r=t;t=e,e=r}let a=e+"-"+t;this.get(e,t)||this.data.keys.push(a),this.data[a]=i}reset(){let e=this.data,t=e.keys;for(;t.length>0;){let i=t.pop();delete e[i]}}},Q0=class extends U0{constructor(e={}){super();this.dt=void 0,this.allowSleep=void 0,this.contacts=void 0,this.frictionEquations=void 0,this.quatNormalizeSkip=void 0,this.quatNormalizeFast=void 0,this.time=void 0,this.stepnumber=void 0,this.default_dt=void 0,this.nextId=void 0,this.gravity=void 0,this.broadphase=void 0,this.bodies=void 0,this.hasActiveBodies=void 0,this.solver=void 0,this.constraints=void 0,this.narrowphase=void 0,this.collisionMatrix=void 0,this.collisionMatrixPrevious=void 0,this.bodyOverlapKeeper=void 0,this.shapeOverlapKeeper=void 0,this.materials=void 0,this.contactmaterials=void 0,this.contactMaterialTable=void 0,this.defaultMaterial=void 0,this.defaultContactMaterial=void 0,this.doProfiling=void 0,this.profile=void 0,this.accumulator=void 0,this.subsystems=void 0,this.addBodyEvent=void 0,this.removeBodyEvent=void 0,this.idToBodyMap=void 0,this.dt=-1,this.allowSleep=!!e.allowSleep,this.contacts=[],this.frictionEquations=[],this.quatNormalizeSkip=e.quatNormalizeSkip!==void 0?e.quatNormalizeSkip:0,this.quatNormalizeFast=e.quatNormalizeFast!==void 0?e.quatNormalizeFast:!1,this.time=0,this.stepnumber=0,this.default_dt=1/60,this.nextId=0,this.gravity=new y,e.gravity&&this.gravity.copy(e.gravity),this.broadphase=e.broadphase!==void 0?e.broadphase:new m6,this.bodies=[],this.hasActiveBodies=!1,this.solver=e.solver!==void 0?e.solver:new Ya,this.constraints=[],this.narrowphase=new zr(this),this.collisionMatrix=new k0,this.collisionMatrixPrevious=new k0,this.bodyOverlapKeeper=new J0,this.shapeOverlapKeeper=new J0,this.materials=[],this.contactmaterials=[],this.contactMaterialTable=new Er,this.defaultMaterial=new He("default"),this.defaultContactMaterial=new Te(this.defaultMaterial,this.defaultMaterial,{friction:.3,restitution:0}),this.doProfiling=!1,this.profile={solve:0,makeContactConstraints:0,broadphase:0,integrate:0,narrowphase:0},this.accumulator=0,this.subsystems=[],this.addBodyEvent={type:"addBody",body:null},this.removeBodyEvent={type:"removeBody",body:null},this.idToBodyMap={},this.broadphase.setWorld(this)}getContactMaterial(e,t){return this.contactMaterialTable.get(e.id,t.id)}numObjects(){return this.bodies.length}collisionMatrixTick(){let e=this.collisionMatrixPrevious;this.collisionMatrixPrevious=this.collisionMatrix,this.collisionMatrix=e,this.collisionMatrix.reset(),this.bodyOverlapKeeper.tick(),this.shapeOverlapKeeper.tick()}addConstraint(e){this.constraints.push(e)}removeConstraint(e){let t=this.constraints.indexOf(e);t!==-1&&this.constraints.splice(t,1)}rayTest(e,t,i){i instanceof v6?this.raycastClosest(e,t,{skipBackfaces:!0},i):this.raycastAll(e,t,{skipBackfaces:!0},i)}raycastAll(e,t,i={},a){return i.mode=Q1.ALL,i.from=e,i.to=t,i.callback=a,e3.intersectWorld(this,i)}raycastAny(e,t,i={},a){return i.mode=Q1.ANY,i.from=e,i.to=t,i.result=a,e3.intersectWorld(this,i)}raycastClosest(e,t,i={},a){return i.mode=Q1.CLOSEST,i.from=e,i.to=t,i.result=a,e3.intersectWorld(this,i)}addBody(e){this.bodies.includes(e)||(e.index=this.bodies.length,this.bodies.push(e),e.world=this,e.initPosition.copy(e.position),e.initVelocity.copy(e.velocity),e.timeLastSleepy=this.time,e instanceof i1&&(e.initAngularVelocity.copy(e.angularVelocity),e.initQuaternion.copy(e.quaternion)),this.collisionMatrix.setNumObjects(this.bodies.length),this.addBodyEvent.body=e,this.idToBodyMap[e.id]=e,this.dispatchEvent(this.addBodyEvent))}removeBody(e){e.world=null;let t=this.bodies.length-1,i=this.bodies,a=i.indexOf(e);if(a!==-1){i.splice(a,1);for(let r=0;r!==i.length;r++)i[r].index=r;this.collisionMatrix.setNumObjects(t),this.removeBodyEvent.body=e,delete this.idToBodyMap[e.id],this.dispatchEvent(this.removeBodyEvent)}}getBodyById(e){return this.idToBodyMap[e]}getShapeById(e){let t=this.bodies;for(let i=0;i=e&&re*1e3)););this.accumulator=this.accumulator%e;let s=this.accumulator/e;for(let o=0;o!==this.bodies.length;o++){let c=this.bodies[o];c.previousPosition.lerp(c.position,s,c.interpolatedPosition),c.previousQuaternion.slerp(c.quaternion,s,c.interpolatedQuaternion),c.previousQuaternion.normalize()}this.time+=t}}internalStep(e){this.dt=e;let t=this.contacts,i=c9,a=l9,r=this.numObjects(),s=this.bodies,o=this.solver,c=this.gravity,l=this.doProfiling,u=this.profile,f=i1.DYNAMIC,h=-1/0,m=this.constraints,v=o9;c.length();let g=c.x,x=c.y,p=c.z,d=0;for(l&&(h=s2.now()),d=0;d!==r;d++){let z=s[d];if(z.type===f){let H=z.force,V=z.mass;H.x+=V*g,H.y+=V*x,H.z+=V*p}}for(let z=0,H=this.subsystems.length;z!==H;z++)this.subsystems[z].update();l&&(h=s2.now()),i.length=0,a.length=0,this.broadphase.collisionPairs(this,i,a),l&&(u.broadphase=s2.now()-h);let A=m.length;for(d=0;d!==A;d++){let z=m[d];if(!z.collideConnected)for(let H=i.length-1;H>=0;H-=1)(z.bodyA===i[H]&&z.bodyB===a[H]||z.bodyB===i[H]&&z.bodyA===a[H])&&(i.splice(H,1),a.splice(H,1))}this.collisionMatrixTick(),l&&(h=s2.now());let b=s9,C=t.length;for(d=0;d!==C;d++)b.push(t[d]);t.length=0;let E=this.frictionEquations.length;for(d=0;d!==E;d++)v.push(this.frictionEquations[d]);for(this.frictionEquations.length=0,this.narrowphase.getContacts(i,a,this,t,b,this.frictionEquations,v),l&&(u.narrowphase=s2.now()-h),l&&(h=s2.now()),d=0;d=0&&L.material.friction>=0&&V.material.friction*L.material.friction,V.material.restitution>=0&&L.material.restitution>=0&&(H.restitution=V.material.restitution*L.material.restitution)),o.addEquation(H),V.allowSleep&&V.type===i1.DYNAMIC&&V.sleepState===i1.SLEEPING&&L.sleepState===i1.AWAKE&&L.type!==i1.STATIC){let O=L.velocity.lengthSquared()+L.angularVelocity.lengthSquared(),W=L.sleepSpeedLimit**2;O>=W*2&&(V.wakeUpAfterNarrowphase=!0)}if(L.allowSleep&&L.type===i1.DYNAMIC&&L.sleepState===i1.SLEEPING&&V.sleepState===i1.AWAKE&&V.type!==i1.STATIC){let O=V.velocity.lengthSquared()+V.angularVelocity.lengthSquared(),W=V.sleepSpeedLimit**2;O>=W*2&&(L.wakeUpAfterNarrowphase=!0)}this.collisionMatrix.set(V,L,!0),this.collisionMatrixPrevious.get(V,L)||(w4.body=L,w4.contact=H,V.dispatchEvent(w4),w4.body=V,L.dispatchEvent(w4)),this.bodyOverlapKeeper.set(V.id,L.id),this.shapeOverlapKeeper.set(N.id,U.id)}for(this.emitContactEvents(),l&&(u.makeContactConstraints=s2.now()-h,h=s2.now()),d=0;d!==r;d++){let z=s[d];z.wakeUpAfterNarrowphase&&(z.wakeUp(),z.wakeUpAfterNarrowphase=!1)}for(A=m.length,d=0;d!==A;d++){let z=m[d];z.update();for(let H=0,V=z.equations.length;H!==V;H++){let L=z.equations[H];o.addEquation(L)}}o.solve(e,this),l&&(u.solve=s2.now()-h),o.removeAllEquations();let _=Math.pow;for(d=0;d!==r;d++){let z=s[d];if(z.type&f){let H=_(1-z.linearDamping,e),V=z.velocity;V.scale(H,V);let L=z.angularVelocity;if(L){let N=_(1-z.angularDamping,e);L.scale(N,L)}}}for(this.dispatchEvent(n9),d=0;d!==r;d++){let z=s[d];z.preStep&&z.preStep.call(z)}l&&(h=s2.now());let F=this.stepnumber%(this.quatNormalizeSkip+1)==0,M=this.quatNormalizeFast;for(d=0;d!==r;d++)s[d].integrate(e,F,M);for(this.clearForces(),this.broadphase.dirty=!0,l&&(u.integrate=s2.now()-h),this.stepnumber+=1,this.dispatchEvent(r9),d=0;d!==r;d++){let z=s[d],H=z.postStep;H&&H.call(z)}let D=!0;if(this.allowSleep)for(D=!1,d=0;d!==r;d++){let z=s[d];z.sleepTick(this.time),z.sleepState!==i1.SLEEPING&&(D=!0)}this.hasActiveBodies=D}emitContactEvents(){let e=this.hasAnyEventListener("beginContact"),t=this.hasAnyEventListener("endContact");if((e||t)&&this.bodyOverlapKeeper.getDiff(Ne,Re),e){for(let r=0,s=Ne.length;rDate.now()-n}var r9={type:"postStep"},n9={type:"preStep"},w4={type:i1.COLLIDE_EVENT_NAME,body:null,contact:null},s9=[],o9=[],c9=[],l9=[],Ne=[],Re=[],S4={type:"beginContact",bodyA:null,bodyB:null},_4={type:"endContact",bodyA:null,bodyB:null},Fe={type:"beginShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null},Be={type:"endShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null};var q1=class{constructor(e=0,t=0,i=0,a=1){this.x=e,this.y=t,this.z=i,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,a){return this.x=e,this.y=t,this.z=i,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*a+s[12]*r,this.y=s[1]*t+s[5]*i+s[9]*a+s[13]*r,this.z=s[2]*t+s[6]*i+s[10]*a+s[14]*r,this.w=s[3]*t+s[7]*i+s[11]*a+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,a,r,s=.01,o=.1,c=e.elements,l=c[0],u=c[4],f=c[8],h=c[1],m=c[5],v=c[9],g=c[2],x=c[6],p=c[10];if(Math.abs(u-h)b&&A>C?AC?b>8&255]+h2[n>>16&255]+h2[n>>24&255]+"-"+h2[e&255]+h2[e>>8&255]+"-"+h2[e>>16&15|64]+h2[e>>24&255]+"-"+h2[t&63|128]+h2[t>>8&255]+"-"+h2[t>>16&255]+h2[t>>24&255]+h2[i&255]+h2[i>>8&255]+h2[i>>16&255]+h2[i>>24&255]).toUpperCase()}function D2(n,e,t){return Math.max(e,Math.min(t,n))}function Lr(n,e){return(n%e+e)%e}function A6(n,e,t){return(1-t)*n+t*e}function t3(n){return(n&n-1)==0&&n!==0}function Dr(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var Me=class{constructor(e=0,t=0,i=0,a=1){this._x=e,this._y=t,this._z=i,this._w=a}static slerp(e,t,i,a){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),i.slerpQuaternions(e,t,a)}static slerpFlat(e,t,i,a,r,s,o){let c=i[a+0],l=i[a+1],u=i[a+2],f=i[a+3],h=r[s+0],m=r[s+1],v=r[s+2],g=r[s+3];if(o===0){e[t+0]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f;return}if(o===1){e[t+0]=h,e[t+1]=m,e[t+2]=v,e[t+3]=g;return}if(f!==g||c!==h||l!==m||u!==v){let x=1-o,p=c*h+l*m+u*v+f*g,d=p>=0?1:-1,A=1-p*p;if(A>Number.EPSILON){let C=Math.sqrt(A),E=Math.atan2(C,p*d);x=Math.sin(x*E)/C,o=Math.sin(o*E)/C}let b=o*d;if(c=c*x+h*b,l=l*x+m*b,u=u*x+v*b,f=f*x+g*b,x===1-o){let C=1/Math.sqrt(c*c+l*l+u*u+f*f);c*=C,l*=C,u*=C,f*=C}}e[t]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,a,r,s){let o=i[a],c=i[a+1],l=i[a+2],u=i[a+3],f=r[s],h=r[s+1],m=r[s+2],v=r[s+3];return e[t]=o*v+u*f+c*m-l*h,e[t+1]=c*v+u*h+l*f-o*m,e[t+2]=l*v+u*m+o*h-c*f,e[t+3]=u*v-o*f-c*h-l*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,a){return this._x=e,this._y=t,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let i=e._x,a=e._y,r=e._z,s=e._order,o=Math.cos,c=Math.sin,l=o(i/2),u=o(a/2),f=o(r/2),h=c(i/2),m=c(a/2),v=c(r/2);switch(s){case"XYZ":this._x=h*u*f+l*m*v,this._y=l*m*f-h*u*v,this._z=l*u*v+h*m*f,this._w=l*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+l*m*v,this._y=l*m*f-h*u*v,this._z=l*u*v-h*m*f,this._w=l*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-l*m*v,this._y=l*m*f+h*u*v,this._z=l*u*v+h*m*f,this._w=l*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-l*m*v,this._y=l*m*f+h*u*v,this._z=l*u*v-h*m*f,this._w=l*u*f+h*m*v;break;case"YZX":this._x=h*u*f+l*m*v,this._y=l*m*f+h*u*v,this._z=l*u*v-h*m*f,this._w=l*u*f-h*m*v;break;case"XZY":this._x=h*u*f-l*m*v,this._y=l*m*f-h*u*v,this._z=l*u*v+h*m*f,this._w=l*u*f+h*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,a=Math.sin(i);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],a=t[4],r=t[8],s=t[1],o=t[5],c=t[9],l=t[2],u=t[6],f=t[10],h=i+o+f;if(h>0){let m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-c)*m,this._y=(r-l)*m,this._z=(s-a)*m}else if(i>o&&i>f){let m=2*Math.sqrt(1+i-o-f);this._w=(u-c)/m,this._x=.25*m,this._y=(a+s)/m,this._z=(r+l)/m}else if(o>f){let m=2*Math.sqrt(1+o-i-f);this._w=(r-l)/m,this._x=(a+s)/m,this._y=.25*m,this._z=(c+u)/m}else{let m=2*Math.sqrt(1+f-i-o);this._w=(s-a)/m,this._x=(r+l)/m,this._y=(c+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(D2(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let a=Math.min(1,t/i);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,a=e._y,r=e._z,s=e._w,o=t._x,c=t._y,l=t._z,u=t._w;return this._x=i*u+s*o+a*l-r*c,this._y=a*u+s*c+r*o-i*l,this._z=r*u+s*l+i*c-a*o,this._w=s*u-i*o-a*c-r*l,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let i=this._x,a=this._y,r=this._z,s=this._w,o=s*e._w+i*e._x+a*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=s,this._x=i,this._y=a,this._z=r,this;let c=1-o*o;if(c<=Number.EPSILON){let m=1-t;return this._w=m*s+t*this._w,this._x=m*i+t*this._x,this._y=m*a+t*this._y,this._z=m*r+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),u=Math.atan2(l,o),f=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=s*f+this._w*h,this._x=i*f+this._x*h,this._y=a*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),a=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(a),i*Math.sin(r),i*Math.cos(r),t*Math.sin(a))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Me.prototype.isQuaternion=!0;var k=class{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Tr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Tr.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*a,this.y=r[1]*t+r[4]*i+r[7]*a,this.z=r[2]*t+r[5]*i+r[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=e.elements,s=1/(r[3]*t+r[7]*i+r[11]*a+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*a+r[12])*s,this.y=(r[1]*t+r[5]*i+r[9]*a+r[13])*s,this.z=(r[2]*t+r[6]*i+r[10]*a+r[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z,c=e.w,l=c*t+s*a-o*i,u=c*i+o*t-r*a,f=c*a+r*i-s*t,h=-r*t-s*i-o*a;return this.x=l*c+h*-r+u*-o-f*-s,this.y=u*c+h*-s+f*-r-l*-o,this.z=f*c+h*-o+l*-s-u*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*a,this.y=r[1]*t+r[5]*i+r[9]*a,this.z=r[2]*t+r[6]*i+r[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,a=e.y,r=e.z,s=t.x,o=t.y,c=t.z;return this.x=a*c-r*o,this.y=r*s-i*c,this.z=i*o-a*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return i3.copy(this).projectOnVector(e),this.sub(i3)}reflect(e){return this.sub(i3.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(D2(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,a=this.z-e.z;return t*t+i*i+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let a=Math.sin(t)*e;return this.x=a*Math.sin(i),this.y=Math.cos(t)*e,this.z=a*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};k.prototype.isVector3=!0;var i3=new k,Tr=new Me;var z1=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6],this.y=a[1]*t+a[4]*i+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),a=Math.sin(t),r=this.x-e.x,s=this.y-e.y;return this.x=r*i-s*a+e.x,this.y=r*a+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};z1.prototype.isVector2=!0;var Hr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},K2={h:0,s:0,l:0},w6={h:0,s:0,l:0};function a3(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}function zt(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function r3(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var x1=class{constructor(e,t,i){return t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,t,i){return this.r=e,this.g=t,this.b=i,this}setHSL(e,t,i){if(e=Lr(e,1),t=D2(t,0,1),i=D2(i,0,1),t===0)this.r=this.g=this.b=i;else{let a=i<=.5?i*(1+t):i+t-i*t,r=2*i-a;this.r=a3(r,a,e+1/3),this.g=a3(r,a,e),this.b=a3(r,a,e-1/3)}return this}setStyle(e){function t(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let a,r=i[1],s=i[2];switch(r){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,t(a[4]),this;if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(a[1],10))/100,this.g=Math.min(100,parseInt(a[2],10))/100,this.b=Math.min(100,parseInt(a[3],10))/100,t(a[4]),this;break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){let o=parseFloat(a[1])/360,c=parseInt(a[2],10)/100,l=parseInt(a[3],10)/100;return t(a[4]),this.setHSL(o,c,l)}break}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let a=i[1],r=a.length;if(r===3)return this.r=parseInt(a.charAt(0)+a.charAt(0),16)/255,this.g=parseInt(a.charAt(1)+a.charAt(1),16)/255,this.b=parseInt(a.charAt(2)+a.charAt(2),16)/255,this;if(r===6)return this.r=parseInt(a.charAt(0)+a.charAt(1),16)/255,this.g=parseInt(a.charAt(2)+a.charAt(3),16)/255,this.b=parseInt(a.charAt(4)+a.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=Hr[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=zt(e.r),this.g=zt(e.g),this.b=zt(e.b),this}copyLinearToSRGB(e){return this.r=r3(e.r),this.g=r3(e.g),this.b=r3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let t=this.r,i=this.g,a=this.b,r=Math.max(t,i,a),s=Math.min(t,i,a),o,c,l=(s+r)/2;if(s===r)o=0,c=0;else{let u=r-s;switch(c=l<=.5?u/(r+s):u/(2-r-s),r){case t:o=(i-a)/u+(ir&&(r=u),f>s&&(s=f),h>o&&(o=h)}return this.min.set(t,i,a),this.max.set(r,s,o),this}setFromBufferAttribute(e){let t=1/0,i=1/0,a=1/0,r=-1/0,s=-1/0,o=-1/0;for(let c=0,l=e.count;cr&&(r=u),f>s&&(s=f),h>o&&(o=h)}return this.min.set(t,i,a),this.max.set(r,s,o),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,St),St.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(P4),B6.subVectors(this.max,P4),jt.subVectors(e.a,P4),Xt.subVectors(e.b,P4),Zt.subVectors(e.c,P4),st.subVectors(Xt,jt),ot.subVectors(Zt,Xt),_t.subVectors(jt,Zt);let t=[0,-st.z,st.y,0,-ot.z,ot.y,0,-_t.z,_t.y,st.z,0,-st.x,ot.z,0,-ot.x,_t.z,0,-_t.x,-st.y,st.x,0,-ot.y,ot.x,0,-_t.y,_t.x,0];return!P3(t,jt,Xt,Zt,B6)||(t=[1,0,0,0,1,0,0,0,1],!P3(t,jt,Xt,Zt,B6))?!1:(P6.crossVectors(st,ot),t=[P6.x,P6.y,P6.z],P3(t,jt,Xt,Zt,B6))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return St.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(St).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ge[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ge[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ge[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ge[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ge[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ge[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ge[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ge[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ge),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};Oe.prototype.isBox3=!0;var Ge=[new k,new k,new k,new k,new k,new k,new k,new k],St=new k,B3=new Oe,jt=new k,Xt=new k,Zt=new k,st=new k,ot=new k,_t=new k,P4=new k,B6=new k,P6=new k,Et=new k;function P3(n,e,t,i,a){for(let r=0,s=n.length-3;r<=s;r+=3){Et.fromArray(n,r);let o=a.x*Math.abs(Et.x)+a.y*Math.abs(Et.y)+a.z*Math.abs(Et.z),c=e.dot(Et),l=t.dot(Et),u=i.dot(Et);if(Math.max(-Math.max(c,l,u),Math.min(c,l,u))>o)return!1}return!0}var F2=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let a=this._listeners[e];if(a!==void 0){let r=a.indexOf(t);r!==-1&&a.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let i=this._listeners[e.type];if(i!==void 0){e.target=this;let a=i.slice(0);for(let r=0,s=a.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){I3.subVectors(e,this.center);let t=I3.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),a=(i-this.radius)*.5;this.center.add(I3.multiplyScalar(a/i)),this.radius+=a}return this}union(e){return this.center.equals(e.center)===!0?I6.set(0,0,1).multiplyScalar(e.radius):I6.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(L8.copy(e.center).add(I6)),this.expandByPoint(L8.copy(e.center).sub(I6)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};var k1=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,s,o,c,l,u,f,h,m,v,g,x){let p=this.elements;return p[0]=e,p[4]=t,p[8]=i,p[12]=a,p[1]=r,p[5]=s,p[9]=o,p[13]=c,p[2]=l,p[6]=u,p[10]=f,p[14]=h,p[3]=m,p[7]=v,p[11]=g,p[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new k1().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,a=1/Yt.setFromMatrixColumn(e,0).length(),r=1/Yt.setFromMatrixColumn(e,1).length(),s=1/Yt.setFromMatrixColumn(e,2).length();return t[0]=i[0]*a,t[1]=i[1]*a,t[2]=i[2]*a,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,i=e.x,a=e.y,r=e.z,s=Math.cos(i),o=Math.sin(i),c=Math.cos(a),l=Math.sin(a),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){let h=s*u,m=s*f,v=o*u,g=o*f;t[0]=c*u,t[4]=-c*f,t[8]=l,t[1]=m+v*l,t[5]=h-g*l,t[9]=-o*c,t[2]=g-h*l,t[6]=v+m*l,t[10]=s*c}else if(e.order==="YXZ"){let h=c*u,m=c*f,v=l*u,g=l*f;t[0]=h+g*o,t[4]=v*o-m,t[8]=s*l,t[1]=s*f,t[5]=s*u,t[9]=-o,t[2]=m*o-v,t[6]=g+h*o,t[10]=s*c}else if(e.order==="ZXY"){let h=c*u,m=c*f,v=l*u,g=l*f;t[0]=h-g*o,t[4]=-s*f,t[8]=v+m*o,t[1]=m+v*o,t[5]=s*u,t[9]=g-h*o,t[2]=-s*l,t[6]=o,t[10]=s*c}else if(e.order==="ZYX"){let h=s*u,m=s*f,v=o*u,g=o*f;t[0]=c*u,t[4]=v*l-m,t[8]=h*l+g,t[1]=c*f,t[5]=g*l+h,t[9]=m*l-v,t[2]=-l,t[6]=o*c,t[10]=s*c}else if(e.order==="YZX"){let h=s*c,m=s*l,v=o*c,g=o*l;t[0]=c*u,t[4]=g-h*f,t[8]=v*f+m,t[1]=f,t[5]=s*u,t[9]=-o*u,t[2]=-l*u,t[6]=m*f+v,t[10]=h-g*f}else if(e.order==="XZY"){let h=s*c,m=s*l,v=o*c,g=o*l;t[0]=c*u,t[4]=-f,t[8]=l*u,t[1]=h*f+g,t[5]=s*u,t[9]=m*f-v,t[2]=v*f-m,t[6]=o*u,t[10]=g*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(h9,e,f9)}lookAt(e,t,i){let a=this.elements;return B2.subVectors(e,t),B2.lengthSq()===0&&(B2.z=1),B2.normalize(),ct.crossVectors(i,B2),ct.lengthSq()===0&&(Math.abs(i.z)===1?B2.x+=1e-4:B2.z+=1e-4,B2.normalize(),ct.crossVectors(i,B2)),ct.normalize(),k6.crossVectors(B2,ct),a[0]=ct.x,a[4]=k6.x,a[8]=B2.x,a[1]=ct.y,a[5]=k6.y,a[9]=B2.y,a[2]=ct.z,a[6]=k6.z,a[10]=B2.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,s=i[0],o=i[4],c=i[8],l=i[12],u=i[1],f=i[5],h=i[9],m=i[13],v=i[2],g=i[6],x=i[10],p=i[14],d=i[3],A=i[7],b=i[11],C=i[15],E=a[0],T=a[4],_=a[8],P=a[12],F=a[1],M=a[5],D=a[9],z=a[13],H=a[2],V=a[6],L=a[10],N=a[14],U=a[3],Z=a[7],O=a[11],W=a[15];return r[0]=s*E+o*F+c*H+l*U,r[4]=s*T+o*M+c*V+l*Z,r[8]=s*_+o*D+c*L+l*O,r[12]=s*P+o*z+c*N+l*W,r[1]=u*E+f*F+h*H+m*U,r[5]=u*T+f*M+h*V+m*Z,r[9]=u*_+f*D+h*L+m*O,r[13]=u*P+f*z+h*N+m*W,r[2]=v*E+g*F+x*H+p*U,r[6]=v*T+g*M+x*V+p*Z,r[10]=v*_+g*D+x*L+p*O,r[14]=v*P+g*z+x*N+p*W,r[3]=d*E+A*F+b*H+C*U,r[7]=d*T+A*M+b*V+C*Z,r[11]=d*_+A*D+b*L+C*O,r[15]=d*P+A*z+b*N+C*W,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],a=e[8],r=e[12],s=e[1],o=e[5],c=e[9],l=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],g=e[7],x=e[11],p=e[15];return v*(+r*c*f-a*l*f-r*o*h+i*l*h+a*o*m-i*c*m)+g*(+t*c*m-t*l*h+r*s*h-a*s*m+a*l*u-r*c*u)+x*(+t*l*f-t*o*m-r*s*f+i*s*m+r*o*u-i*l*u)+p*(-a*o*u-t*c*f+t*o*h+a*s*f-i*s*h+i*c*u)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],g=e[13],x=e[14],p=e[15],d=f*x*l-g*h*l+g*c*m-o*x*m-f*c*p+o*h*p,A=v*h*l-u*x*l-v*c*m+s*x*m+u*c*p-s*h*p,b=u*g*l-v*f*l+v*o*m-s*g*m-u*o*p+s*f*p,C=v*f*c-u*g*c-v*o*h+s*g*h+u*o*x-s*f*x,E=t*d+i*A+a*b+r*C;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/E;return e[0]=d*T,e[1]=(g*h*r-f*x*r-g*a*m+i*x*m+f*a*p-i*h*p)*T,e[2]=(o*x*r-g*c*r+g*a*l-i*x*l-o*a*p+i*c*p)*T,e[3]=(f*c*r-o*h*r-f*a*l+i*h*l+o*a*m-i*c*m)*T,e[4]=A*T,e[5]=(u*x*r-v*h*r+v*a*m-t*x*m-u*a*p+t*h*p)*T,e[6]=(v*c*r-s*x*r-v*a*l+t*x*l+s*a*p-t*c*p)*T,e[7]=(s*h*r-u*c*r+u*a*l-t*h*l-s*a*m+t*c*m)*T,e[8]=b*T,e[9]=(v*f*r-u*g*r-v*i*m+t*g*m+u*i*p-t*f*p)*T,e[10]=(s*g*r-v*o*r+v*i*l-t*g*l-s*i*p+t*o*p)*T,e[11]=(u*o*r-s*f*r-u*i*l+t*f*l+s*i*m-t*o*m)*T,e[12]=C*T,e[13]=(u*g*a-v*f*a+v*i*h-t*g*h-u*i*x+t*f*x)*T,e[14]=(v*o*a-s*g*a-v*i*c+t*g*c+s*i*x-t*o*x)*T,e[15]=(s*f*a-u*o*a+u*i*c-t*f*c-s*i*h+t*o*h)*T,this}scale(e){let t=this.elements,i=e.x,a=e.y,r=e.z;return t[0]*=i,t[4]*=a,t[8]*=r,t[1]*=i,t[5]*=a,t[9]*=r,t[2]*=i,t[6]*=a,t[10]*=r,t[3]*=i,t[7]*=a,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,a))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),a=Math.sin(t),r=1-i,s=e.x,o=e.y,c=e.z,l=r*s,u=r*o;return this.set(l*s+i,l*o-a*c,l*c+a*o,0,l*o+a*c,u*o+i,u*c-a*s,0,l*c-a*o,u*c+a*s,r*c*c+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,a,r,s){return this.set(1,i,r,0,e,1,s,0,t,a,1,0,0,0,0,1),this}compose(e,t,i){let a=this.elements,r=t._x,s=t._y,o=t._z,c=t._w,l=r+r,u=s+s,f=o+o,h=r*l,m=r*u,v=r*f,g=s*u,x=s*f,p=o*f,d=c*l,A=c*u,b=c*f,C=i.x,E=i.y,T=i.z;return a[0]=(1-(g+p))*C,a[1]=(m+b)*C,a[2]=(v-A)*C,a[3]=0,a[4]=(m-b)*E,a[5]=(1-(h+p))*E,a[6]=(x+d)*E,a[7]=0,a[8]=(v+A)*T,a[9]=(x-d)*T,a[10]=(1-(h+g))*T,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,i){let a=this.elements,r=Yt.set(a[0],a[1],a[2]).length(),s=Yt.set(a[4],a[5],a[6]).length(),o=Yt.set(a[8],a[9],a[10]).length();this.determinant()<0&&(r=-r),e.x=a[12],e.y=a[13],e.z=a[14],te.copy(this);let l=1/r,u=1/s,f=1/o;return te.elements[0]*=l,te.elements[1]*=l,te.elements[2]*=l,te.elements[4]*=u,te.elements[5]*=u,te.elements[6]*=u,te.elements[8]*=f,te.elements[9]*=f,te.elements[10]*=f,t.setFromRotationMatrix(te),i.x=r,i.y=s,i.z=o,this}makePerspective(e,t,i,a,r,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let o=this.elements,c=2*r/(t-e),l=2*r/(i-a),u=(t+e)/(t-e),f=(i+a)/(i-a),h=-(s+r)/(s-r),m=-2*s*r/(s-r);return o[0]=c,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=l,o[9]=f,o[13]=0,o[2]=0,o[6]=0,o[10]=h,o[14]=m,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,i,a,r,s){let o=this.elements,c=1/(t-e),l=1/(i-a),u=1/(s-r),f=(t+e)*c,h=(i+a)*l,m=(s+r)*u;return o[0]=2*c,o[4]=0,o[8]=0,o[12]=-f,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-h,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-m,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<16;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}};k1.prototype.isMatrix4=!0;var Yt=new k,te=new k1,h9=new k(0,0,0),f9=new k(1,1,1),ct=new k,k6=new k,B2=new k;var D8=new k1,T8=new Me,lt=class{constructor(e=0,t=0,i=0,a=lt.DefaultOrder){this._x=e,this._y=t,this._z=i,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,a=this._order){return this._x=e,this._y=t,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){let a=e.elements,r=a[0],s=a[4],o=a[8],c=a[1],l=a[5],u=a[9],f=a[2],h=a[6],m=a[10];switch(t){case"XYZ":this._y=Math.asin(D2(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-D2(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,m),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(D2(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-D2(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(D2(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(o,m));break;case"XZY":this._z=Math.asin(-D2(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return D8.makeRotationFromQuaternion(e),this.setFromRotationMatrix(D8,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return T8.setFromEuler(this),this.setFromQuaternion(T8,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new k(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};lt.prototype.isEuler=!0;lt.DefaultOrder="XYZ";lt.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var I4=class{constructor(){this.mask=1|0}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,s,o,c,l){let u=this.elements;return u[0]=e,u[1]=a,u[2]=o,u[3]=t,u[4]=r,u[5]=c,u[6]=i,u[7]=s,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,s=i[0],o=i[3],c=i[6],l=i[1],u=i[4],f=i[7],h=i[2],m=i[5],v=i[8],g=a[0],x=a[3],p=a[6],d=a[1],A=a[4],b=a[7],C=a[2],E=a[5],T=a[8];return r[0]=s*g+o*d+c*C,r[3]=s*x+o*A+c*E,r[6]=s*p+o*b+c*T,r[1]=l*g+u*d+f*C,r[4]=l*x+u*A+f*E,r[7]=l*p+u*b+f*T,r[2]=h*g+m*d+v*C,r[5]=h*x+m*A+v*E,r[8]=h*p+m*b+v*T,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8];return t*s*u-t*o*l-i*r*u+i*o*c+a*r*l-a*s*c}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8],f=u*s-o*l,h=o*c-u*r,m=l*r-s*c,v=t*f+i*h+a*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/v;return e[0]=f*g,e[1]=(a*l-u*i)*g,e[2]=(o*i-a*s)*g,e[3]=h*g,e[4]=(u*t-a*c)*g,e[5]=(a*r-o*t)*g,e[6]=m*g,e[7]=(i*c-l*t)*g,e[8]=(s*t-i*r)*g,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,a,r,s,o){let c=Math.cos(r),l=Math.sin(r);return this.set(i*c,i*l,-i*(c*s+l*o)+s+e,-a*l,a*c,-a*(-l*s+c*o)+o+t,0,0,1),this}scale(e,t){let i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7]*=t,this}rotate(e){let t=Math.cos(e),i=Math.sin(e),a=this.elements,r=a[0],s=a[3],o=a[6],c=a[1],l=a[4],u=a[7];return a[0]=t*r+i*c,a[3]=t*s+i*l,a[6]=t*o+i*u,a[1]=-i*r+t*c,a[4]=-i*s+t*l,a[7]=-i*o+t*u,this}translate(e,t){let i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<9;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}};n2.prototype.isMatrix3=!0;var d9=0,H8=new k,$t=new Me,We=new k1,U6=new k,k4=new k,p9=new k,m9=new Me,V8=new k(1,0,0),N8=new k(0,1,0),R8=new k(0,0,1),v9={type:"added"},F8={type:"removed"},j1=class extends F2{constructor(){super();Object.defineProperty(this,"id",{value:d9++}),this.uuid=Pe(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=j1.DefaultUp.clone();let e=new k,t=new lt,i=new Me,a=new k(1,1,1);function r(){i.setFromEuler(t,!1)}function s(){t.setFromQuaternion(i,void 0,!1)}t._onChange(r),i._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new k1},normalMatrix:{value:new n2}}),this.matrix=new k1,this.matrixWorld=new k1,this.matrixAutoUpdate=j1.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new I4,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return $t.setFromAxisAngle(e,t),this.quaternion.multiply($t),this}rotateOnWorldAxis(e,t){return $t.setFromAxisAngle(e,t),this.quaternion.premultiply($t),this}rotateX(e){return this.rotateOnAxis(V8,e)}rotateY(e){return this.rotateOnAxis(N8,e)}rotateZ(e){return this.rotateOnAxis(R8,e)}translateOnAxis(e,t){return H8.copy(e).applyQuaternion(this.quaternion),this.position.add(H8.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(V8,e)}translateY(e){return this.translateOnAxis(N8,e)}translateZ(e){return this.translateOnAxis(R8,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(We.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?U6.copy(e):U6.set(e,t,i);let a=this.parent;this.updateWorldMatrix(!0,!1),k4.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?We.lookAt(k4,U6,this.up):We.lookAt(U6,k4,this.up),this.quaternion.setFromRotationMatrix(We),a&&(We.extractRotation(a.matrixWorld),$t.setFromRotationMatrix(We),this.quaternion.premultiply($t.invert()))}add(e){if(arguments.length>1){for(let t=0;t1){for(let i=0;i0){a.children=[];for(let o=0;o0){a.animations=[];for(let o=0;o0&&(i.geometries=o),c.length>0&&(i.materials=c),l.length>0&&(i.textures=l),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),m.length>0&&(i.animations=m)}return i.object=a,i;function s(o){let c=[];for(let l in o){let u=o[l];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i=0;--e)if(n[e]>65535)return!0;return!1}function Lt(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}var g9=0,G2=new k1,k3=new j1,Kt=new k,P2=new Oe,U4=new Oe,c2=new k,b2=class extends F2{constructor(){super();Object.defineProperty(this,"id",{value:g9++}),this.uuid=Pe(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(O6(e)?B4:F4)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let r=new n2().getNormalMatrix(e);i.applyNormalMatrix(r),i.needsUpdate=!0}let a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return G2.makeRotationFromQuaternion(e),this.applyMatrix4(G2),this}rotateX(e){return G2.makeRotationX(e),this.applyMatrix4(G2),this}rotateY(e){return G2.makeRotationY(e),this.applyMatrix4(G2),this}rotateZ(e){return G2.makeRotationZ(e),this.applyMatrix4(G2),this}translate(e,t,i){return G2.makeTranslation(e,t,i),this.applyMatrix4(G2),this}scale(e,t,i){return G2.makeScale(e,t,i),this.applyMatrix4(G2),this}lookAt(e){return k3.lookAt(e),k3.updateMatrix(),this.applyMatrix4(k3.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Kt).negate(),this.translate(Kt.x,Kt.y,Kt.z),this}setFromPoints(e){let t=[];for(let i=0,a=e.length;i0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let c in i){let l=i[c];e.data.attributes[c]=l.toJSON(e.data)}let a={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],u=[];for(let f=0,h=l.length;f0&&(a[c]=u,r=!0)}r&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone(t));let a=e.attributes;for(let l in a){let u=a[l];this.setAttribute(l,u.clone(t))}let r=e.morphAttributes;for(let l in r){let u=[],f=r[l];for(let h=0,m=f.length;h0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===Fr;continue}let a=this[t];if(a===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}a&&a.isColor?a.set(i):a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==wt&&(i.blending=this.blending),this.side!==Ie&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.alphaWrite=this.alphaWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData);function a(r){let s=[];for(let o in r){let c=r[o];delete c.metadata,s.push(c)}return s}if(t){let r=a(e.textures),s=a(e.images);r.length>0&&(i.textures=r),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let a=t.length;i=new Array(a);for(let r=0;r!==a;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.alphaWrite=e.alphaWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};T2.prototype.isMaterial=!0;var O4=class extends T2{constructor(e){super();this.type="MeshPhongMaterial",this.color=new x1(16777215),this.specular=new x1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=N6,this.normalScale=new z1(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}};O4.prototype.isMeshPhongMaterial=!0;var je=new k,U3=new k,G6=new k,ut=new k,O3=new k,q6=new k,G3=new k,q3=class{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,je)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=je.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(je.copy(this.direction).multiplyScalar(t).add(this.origin),je.distanceToSquared(e))}distanceSqToSegment(e,t,i,a){U3.copy(e).add(t).multiplyScalar(.5),G6.copy(t).sub(e).normalize(),ut.copy(this.origin).sub(U3);let r=e.distanceTo(t)*.5,s=-this.direction.dot(G6),o=ut.dot(this.direction),c=-ut.dot(G6),l=ut.lengthSq(),u=Math.abs(1-s*s),f,h,m,v;if(u>0)if(f=s*c-o,h=s*o-c,v=r*u,f>=0)if(h>=-v)if(h<=v){let g=1/u;f*=g,h*=g,m=f*(f+s*h+2*o)+h*(s*f+h+2*c)+l}else h=r,f=Math.max(0,-(s*h+o)),m=-f*f+h*(h+2*c)+l;else h=-r,f=Math.max(0,-(s*h+o)),m=-f*f+h*(h+2*c)+l;else h<=-v?(f=Math.max(0,-(-s*r+o)),h=f>0?-r:Math.min(Math.max(-r,-c),r),m=-f*f+h*(h+2*c)+l):h<=v?(f=0,h=Math.min(Math.max(-r,-c),r),m=h*(h+2*c)+l):(f=Math.max(0,-(s*r+o)),h=f>0?r:Math.min(Math.max(-r,-c),r),m=-f*f+h*(h+2*c)+l);else h=s>0?-r:r,f=Math.max(0,-(s*h+o)),m=-f*f+h*(h+2*c)+l;return i&&i.copy(this.direction).multiplyScalar(f).add(this.origin),a&&a.copy(G6).multiplyScalar(h).add(U3),m}intersectSphere(e,t){je.subVectors(e.center,this.origin);let i=je.dot(this.direction),a=je.dot(je)-i*i,r=e.radius*e.radius;if(a>r)return null;let s=Math.sqrt(r-a),o=i-s,c=i+s;return o<0&&c<0?null:o<0?this.at(c,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,a,r,s,o,c,l=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return l>=0?(i=(e.min.x-h.x)*l,a=(e.max.x-h.x)*l):(i=(e.max.x-h.x)*l,a=(e.min.x-h.x)*l),u>=0?(r=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),i>s||r>a||((r>i||i!==i)&&(i=r),(s=0?(o=(e.min.z-h.z)*f,c=(e.max.z-h.z)*f):(o=(e.max.z-h.z)*f,c=(e.min.z-h.z)*f),i>c||o>a)||((o>i||i!==i)&&(i=o),(c=0?i:a,t)}intersectsBox(e){return this.intersectBox(e,je)!==null}intersectTriangle(e,t,i,a,r){O3.subVectors(t,e),q6.subVectors(i,e),G3.crossVectors(O3,q6);let s=this.direction.dot(G3),o;if(s>0){if(a)return null;o=1}else if(s<0)o=-1,s=-s;else return null;ut.subVectors(this.origin,e);let c=o*this.direction.dot(q6.crossVectors(ut,q6));if(c<0)return null;let l=o*this.direction.dot(O3.cross(ut));if(l<0||c+l>s)return null;let u=-o*ut.dot(G3);return u<0?null:this.at(u/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};var ie=new k,Xe=new k,W3=new k,Ze=new k,Jt=new k,Qt=new k,B8=new k,j3=new k,X3=new k,Z3=new k,ae=class{constructor(e=new k,t=new k,i=new k){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,a){a.subVectors(i,t),ie.subVectors(e,t),a.cross(ie);let r=a.lengthSq();return r>0?a.multiplyScalar(1/Math.sqrt(r)):a.set(0,0,0)}static getBarycoord(e,t,i,a,r){ie.subVectors(a,t),Xe.subVectors(i,t),W3.subVectors(e,t);let s=ie.dot(ie),o=ie.dot(Xe),c=ie.dot(W3),l=Xe.dot(Xe),u=Xe.dot(W3),f=s*l-o*o;if(f===0)return r.set(-2,-1,-1);let h=1/f,m=(l*c-o*u)*h,v=(s*u-o*c)*h;return r.set(1-m-v,v,m)}static containsPoint(e,t,i,a){return this.getBarycoord(e,t,i,a,Ze),Ze.x>=0&&Ze.y>=0&&Ze.x+Ze.y<=1}static getUV(e,t,i,a,r,s,o,c){return this.getBarycoord(e,t,i,a,Ze),c.set(0,0),c.addScaledVector(r,Ze.x),c.addScaledVector(s,Ze.y),c.addScaledVector(o,Ze.z),c}static isFrontFacing(e,t,i,a){return ie.subVectors(i,t),Xe.subVectors(e,t),ie.cross(Xe).dot(a)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,a){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,i,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ie.subVectors(this.c,this.b),Xe.subVectors(this.a,this.b),ie.cross(Xe).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ae.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ae.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,a,r){return ae.getUV(e,this.a,this.b,this.c,t,i,a,r)}containsPoint(e){return ae.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ae.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,a=this.b,r=this.c,s,o;Jt.subVectors(a,i),Qt.subVectors(r,i),j3.subVectors(e,i);let c=Jt.dot(j3),l=Qt.dot(j3);if(c<=0&&l<=0)return t.copy(i);X3.subVectors(e,a);let u=Jt.dot(X3),f=Qt.dot(X3);if(u>=0&&f<=u)return t.copy(a);let h=c*f-u*l;if(h<=0&&c>=0&&u<=0)return s=c/(c-u),t.copy(i).addScaledVector(Jt,s);Z3.subVectors(e,r);let m=Jt.dot(Z3),v=Qt.dot(Z3);if(v>=0&&m<=v)return t.copy(r);let g=m*l-c*v;if(g<=0&&l>=0&&v<=0)return o=l/(l-v),t.copy(i).addScaledVector(Qt,o);let x=u*v-m*f;if(x<=0&&f-u>=0&&m-v>=0)return B8.subVectors(r,a),o=(f-u)/(f-u+(m-v)),t.copy(a).addScaledVector(B8,o);let p=1/(x+g+h);return s=g*p,o=h*p,t.copy(i).addScaledVector(Jt,s).addScaledVector(Qt,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};var e4=class extends T2{constructor(e){super();this.type="MeshBasicMaterial",this.color=new x1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};e4.prototype.isMeshBasicMaterial=!0;var P8=new k1,t4=new q3,Y3=new qe,ht=new k,ft=new k,dt=new k,$3=new k,K3=new k,J3=new k,W6=new k,j6=new k,X6=new k,Z6=new z1,Y6=new z1,$6=new z1,Q3=new k,K6=new k,l2=class extends j1{constructor(e=new b2,t=new e4){super();this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,i=Object.keys(t);if(i.length>0){let a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=a.length;r0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let i=this.geometry,a=this.material,r=this.matrixWorld;if(a===void 0||(i.boundingSphere===null&&i.computeBoundingSphere(),Y3.copy(i.boundingSphere),Y3.applyMatrix4(r),e.ray.intersectsSphere(Y3)===!1)||(P8.copy(r).invert(),t4.copy(e.ray).applyMatrix4(P8),i.boundingBox!==null&&t4.intersectsBox(i.boundingBox)===!1))return;let s;if(i.isBufferGeometry){let o=i.index,c=i.attributes.position,l=i.morphAttributes.position,u=i.morphTargetsRelative,f=i.attributes.uv,h=i.attributes.uv2,m=i.groups,v=i.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,x=m.length;gt.far?null:{distance:l,point:K6.clone(),object:n}}function J6(n,e,t,i,a,r,s,o,c,l,u,f){ht.fromBufferAttribute(a,l),ft.fromBufferAttribute(a,u),dt.fromBufferAttribute(a,f);let h=n.morphTargetInfluences;if(r&&h){W6.set(0,0,0),j6.set(0,0,0),X6.set(0,0,0);for(let v=0,g=r.length;v2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){let t=Lt("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let a=i.getImageData(0,0,e.width,e.height),r=a.data;for(let s=0;s1)switch(this.wrapS){case V4:e.x=e.x-Math.floor(e.x);break;case o2:e.x=e.x<0?0:1;break;case N4:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case V4:e.y=e.y-Math.floor(e.y);break;case o2:e.y=e.y<0?0:1;break;case N4:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};K1.DEFAULT_IMAGE=void 0;K1.DEFAULT_MAPPING=h3;K1.prototype.isTexture=!0;function ei(n){return typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&n instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap?G4.getDataURL(n):n.data?{data:Array.prototype.slice.call(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var I8={specular:1515554,color:15790320,shininess:60,flatShading:!0},q2={diceColor:"#202020",textColor:"#ffffff"},re=class{constructor(e,t,i={diceColor:"#202020",textColor:"#aaaaaa"}){this.w=e;this.h=t;this.options=i;this.scale=50;this.labels=[" ","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"];this.fontFace="Arial";this.options={...q2,...i}}setColor({diceColor:e,textColor:t}){e&&(this.options.diceColor=e),t&&(this.options.textColor=t)}get radius(){return this.scale*this.scaleFactor}get diceColor(){return this.options.diceColor}get textColor(){return this.options.textColor}get buffer(){return this.geometry.geometry}create(){this.textureSize=this.calculateTextureSize(this.scale/2+this.scale*this.margin)*2;let e=this.getGeometry(),t=this.getMaterials();return this.geometry=new l2(e,t),this.geometry.receiveShadow=!0,this.geometry.castShadow=!0,this.body.position.set(0+this.radius*2*Math.random(),0+this.radius*2*Math.random(),0+this.radius*4),this.body.velocity.x=500*Math.random()*2-1,this.body.velocity.y=500*Math.random()*2-1,this.body.angularVelocity.x=100*Math.random(),this.body.angularVelocity.y=100*Math.random(),this}getGeometry(){let e=new Array(this.vertices.length);for(let i=0;i=0&&u=0&&l!==c+1?o.unshift([r,l],[s,u]):o.push([r,l],[s,u]),c=l)}o.length===4&&i.push([i[o[0][0]][o[0][1]],i[o[1][0]][o[1][1]],i[o[3][0]][o[3][1]],i[o[2][0]][o[2][1]],-1])}for(let r=0;r=0&&u<4){--u==-1&&(u=3);let f=i[l][u];if(s.indexOf(f)>=0){o.push(f);break}}}--c}o.push(-1),i.push(o)}return{vectors:t,faces:i}}makeGeometry(e,t){let i=new b2;for(let f=0;f1&&(o=o/l.length,s.font=`${o}pt '${this.fontFace}'`,c=s.measureText("M").width*1.2,a-=c*l.length/2);for(let f=0,h=l.length;f0?-1:1)*.9,y:this.h*(r.y>0?-1:1)*.9,z:Math.random()*200+200},o=Math.abs(r.x/r.y);o>1?s.y/=o:s.x*=o;let c=this.makeRandomVector(a),l={x:c.x*i,y:c.y*i,z:-10},u={x:-(Math.random()*r.y*5+this.inertia*r.y),y:Math.random()*r.x*5+this.inertia*r.x,z:0},f={x:Math.random(),y:Math.random(),z:Math.random(),w:Math.random()};return{pos:s,velocity:l,angular:u,axis:f}}makeRandomVector(e){let t=Math.random()*Math.PI/5-Math.PI/5/2,i={x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)};return i.x==0&&(i.x=.01),i.y==0&&(i.y=.01),i}get buffer(){return this.geometry.geometry}get result(){return this.getUpsideValue()}getUpsideValue(){let e=new k(0,0,this.sides==4?-1:1),t,i=Math.PI*2,a=this.buffer.getAttribute("normal").array;for(let s=0,o=this.buffer.groups.length;sthis.sides;)s-=this.sides;for(;s<1;)s+=this.sides;t.groups[a].materialIndex=s+1}}this.updateMaterialsForValue(e-i),this.geometry.geometry=t}resetBody(){this.body.vlambda=new y,this.body.position=new y,this.body.previousPosition=new y,this.body.initPosition=new y,this.body.velocity=new y,this.body.initVelocity=new y,this.body.force=new y,this.body.torque=new y,this.body.quaternion=new O1,this.body.initQuaternion=new O1,this.body.angularVelocity=new y,this.body.initAngularVelocity=new y,this.body.interpolatedPosition=new y,this.body.interpolatedQuaternion=new O1,this.body.inertia=new y,this.body.invInertia=new y,this.body.invInertiaWorld=new _2,this.body.invInertiaSolve=new y,this.body.invInertiaWorldSolve=new _2,this.body.wlambda=new y,this.body.updateMassProperties()}updateMaterialsForValue(e){}set(){this.geometry.position.set(this.body.position.x,this.body.position.y,this.body.position.z),this.geometry.quaternion.set(this.body.quaternion.x,this.body.quaternion.y,this.body.quaternion.z,this.body.quaternion.w)}create(){this.body.position.set(this.vector.pos.x,this.vector.pos.y,this.vector.pos.z),this.body.quaternion.setFromAxisAngle(new y(this.vector.axis.x,this.vector.axis.y,this.vector.axis.z),this.vector.axis.w*Math.PI*2),this.body.angularVelocity.set(this.vector.angular.x,this.vector.angular.y,this.vector.angular.z),this.body.velocity.set(this.vector.velocity.x,this.vector.velocity.y,this.vector.velocity.z),this.body.linearDamping=.1,this.body.angularDamping=.1}},gi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=20;this.inertia=6;a&&(this.vector=this.generateVector(a)),this.create()}},xi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=12;this.inertia=8;a&&(this.vector=this.generateVector(a)),this.create()}},D4=class extends L4{constructor(e,t,i,a,r=!1){super(e,t,i);this.w=e;this.h=t;this.data=i;this.isPercentile=r;this.sides=10;this.inertia=9;a&&(this.vector=this.generateVector(a)),this.create()}},Mi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=8;this.inertia=10;a&&(this.vector=this.generateVector(a)),this.create()}},bi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=6;this.inertia=13;a&&(this.vector=this.generateVector(a)),this.create()}},yi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=4;this.inertia=5;a&&(this.vector=this.generateVector(a)),this.create()}};var Ci=new k,y9=new k,C9=new n2,ne=class{constructor(e=new k(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,a){return this.normal.set(e,t,i),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let a=Ci.subVectors(i,t).cross(y9.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let i=e.delta(Ci),a=this.normal.dot(i);if(a===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let r=-(e.start.dot(this.normal)+this.constant)/a;return r<0||r>1?null:t.copy(i).multiplyScalar(r).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||C9.getNormalMatrix(e),a=this.coplanarPoint(Ci).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};ne.prototype.isPlane=!0;var it=new qe,Q6=new k,T4=class{constructor(e=new ne,t=new ne,i=new ne,a=new ne,r=new ne,s=new ne){this.planes=[e,t,i,a,r,s]}set(e,t,i,a,r,s){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(a),o[4].copy(r),o[5].copy(s),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){let t=this.planes,i=e.elements,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7],h=i[8],p=i[9],v=i[10],g=i[11],x=i[12],m=i[13],d=i[14],A=i[15];return t[0].setComponents(o-a,f-c,g-h,A-x).normalize(),t[1].setComponents(o+a,f+c,g+h,A+x).normalize(),t[2].setComponents(o+r,f+l,g+p,A+m).normalize(),t[3].setComponents(o-r,f-l,g-p,A-m).normalize(),t[4].setComponents(o-s,f-u,g-v,A-d).normalize(),t[5].setComponents(o+s,f+u,g+v,A+d).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),it.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(it)}intersectsSprite(e){return it.center.set(0,0,0),it.radius=.7071067811865476,it.applyMatrix4(e.matrixWorld),this.intersectsSphere(it)}intersectsSphere(e){let t=this.planes,i=e.center,a=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Q6.y=a.normal.y>0?e.max.y:e.min.y,Q6.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(Q6)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function e0(){let n=null,e=!1,t=null,i=null;function a(r,s){t(r,s),i=n.requestAnimationFrame(a)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(a),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function k8(n,e){let t=e.isWebGL2,i=new WeakMap;function a(l,u){let f=l.array,h=l.usage,p=n.createBuffer();n.bindBuffer(u,p),n.bufferData(u,f,h),l.onUploadCallback();let v=n.FLOAT;return f instanceof Float32Array?v=n.FLOAT:f instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):f instanceof Uint16Array?l.isFloat16BufferAttribute?t?v=n.HALF_FLOAT:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):v=n.UNSIGNED_SHORT:f instanceof Int16Array?v=n.SHORT:f instanceof Uint32Array?v=n.UNSIGNED_INT:f instanceof Int32Array?v=n.INT:f instanceof Int8Array?v=n.BYTE:(f instanceof Uint8Array||f instanceof Uint8ClampedArray)&&(v=n.UNSIGNED_BYTE),{buffer:p,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function r(l,u,f){let h=u.array,p=u.updateRange;n.bindBuffer(f,l),p.count===-1?n.bufferSubData(f,0,h):(t?n.bufferSubData(f,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):n.bufferSubData(f,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1)}function s(l){return l.isInterleavedBufferAttribute&&(l=l.data),i.get(l)}function o(l){l.isInterleavedBufferAttribute&&(l=l.data);let u=i.get(l);u&&(n.deleteBuffer(u.buffer),i.delete(l))}function c(l,u){if(l.isGLBufferAttribute){let h=i.get(l);(!h||h.version0?1:-1,u.push(Z.x,Z.y,Z.z),f.push(X/T),f.push(1-O/_),N+=1}}for(let O=0;O<_;O++)for(let W=0;W0?-1:1)*.9,y:this.h*(r.y>0?-1:1)*.9,z:Math.random()*200+200},o=Math.abs(r.x/r.y);o>1?s.y/=o:s.x*=o;let c=this.makeRandomVector(a),l={x:c.x*i,y:c.y*i,z:-10},u={x:-(Math.random()*r.y*5+this.inertia*r.y),y:Math.random()*r.x*5+this.inertia*r.x,z:0},f={x:Math.random(),y:Math.random(),z:Math.random(),w:Math.random()};return{pos:s,velocity:l,angular:u,axis:f}}makeRandomVector(e){let t=Math.random()*Math.PI/5-Math.PI/5/2,i={x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)};return i.x==0&&(i.x=.01),i.y==0&&(i.y=.01),i}get buffer(){return this.geometry.geometry}get result(){return this.getUpsideValue()}getUpsideValue(){let e=new k(0,0,this.sides==4?-1:1),t,i=Math.PI*2,a=this.buffer.getAttribute("normal").array;for(let s=0,o=this.buffer.groups.length;sthis.sides;)s-=this.sides;for(;s<1;)s+=this.sides;t.groups[a].materialIndex=s+1}}this.updateMaterialsForValue(e-i),this.geometry.geometry=t}resetBody(){this.body.vlambda=new y,this.body.position=new y,this.body.previousPosition=new y,this.body.initPosition=new y,this.body.velocity=new y,this.body.initVelocity=new y,this.body.force=new y,this.body.torque=new y,this.body.quaternion=new O1,this.body.initQuaternion=new O1,this.body.angularVelocity=new y,this.body.initAngularVelocity=new y,this.body.interpolatedPosition=new y,this.body.interpolatedQuaternion=new O1,this.body.inertia=new y,this.body.invInertia=new y,this.body.invInertiaWorld=new _2,this.body.invInertiaSolve=new y,this.body.invInertiaWorldSolve=new _2,this.body.wlambda=new y,this.body.updateMassProperties()}updateMaterialsForValue(e){}set(){this.geometry.position.set(this.body.position.x,this.body.position.y,this.body.position.z),this.geometry.quaternion.set(this.body.quaternion.x,this.body.quaternion.y,this.body.quaternion.z,this.body.quaternion.w)}create(){this.body.position.set(this.vector.pos.x,this.vector.pos.y,this.vector.pos.z),this.body.quaternion.setFromAxisAngle(new y(this.vector.axis.x,this.vector.axis.y,this.vector.axis.z),this.vector.axis.w*Math.PI*2),this.body.angularVelocity.set(this.vector.angular.x,this.vector.angular.y,this.vector.angular.z),this.body.velocity.set(this.vector.velocity.x,this.vector.velocity.y,this.vector.velocity.z),this.body.linearDamping=.1,this.body.angularDamping=.1}},xi=class extends Dt{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=20;this.inertia=6;a&&(this.vector=this.generateVector(a)),this.create()}},Mi=class extends Dt{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=12;this.inertia=8;a&&(this.vector=this.generateVector(a)),this.create()}},Tt=class extends Dt{constructor(e,t,i,a,r=!1){super(e,t,i);this.w=e;this.h=t;this.data=i;this.isPercentile=r;this.sides=10;this.inertia=9;a&&(this.vector=this.generateVector(a)),this.create()}},bi=class extends Dt{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=8;this.inertia=10;a&&(this.vector=this.generateVector(a)),this.create()}},yi=class extends Dt{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=6;this.inertia=13;a&&(this.vector=this.generateVector(a)),this.create()}},Ci=class extends Dt{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=4;this.inertia=5;a&&(this.vector=this.generateVector(a)),this.create()}};var zi=new k,C9=new k,z9=new n2,ne=class{constructor(e=new k(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,a){return this.normal.set(e,t,i),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let a=zi.subVectors(i,t).cross(C9.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let i=e.delta(zi),a=this.normal.dot(i);if(a===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let r=-(e.start.dot(this.normal)+this.constant)/a;return r<0||r>1?null:t.copy(i).multiplyScalar(r).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||z9.getNormalMatrix(e),a=this.coplanarPoint(zi).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};ne.prototype.isPlane=!0;var a4=new qe,e0=new k,Ht=class{constructor(e=new ne,t=new ne,i=new ne,a=new ne,r=new ne,s=new ne){this.planes=[e,t,i,a,r,s]}set(e,t,i,a,r,s){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(a),o[4].copy(r),o[5].copy(s),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){let t=this.planes,i=e.elements,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7],h=i[8],m=i[9],v=i[10],g=i[11],x=i[12],p=i[13],d=i[14],A=i[15];return t[0].setComponents(o-a,f-c,g-h,A-x).normalize(),t[1].setComponents(o+a,f+c,g+h,A+x).normalize(),t[2].setComponents(o+r,f+l,g+m,A+p).normalize(),t[3].setComponents(o-r,f-l,g-m,A-p).normalize(),t[4].setComponents(o-s,f-u,g-v,A-d).normalize(),t[5].setComponents(o+s,f+u,g+v,A+d).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),a4.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(a4)}intersectsSprite(e){return a4.center.set(0,0,0),a4.radius=.7071067811865476,a4.applyMatrix4(e.matrixWorld),this.intersectsSphere(a4)}intersectsSphere(e){let t=this.planes,i=e.center,a=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,e0.y=a.normal.y>0?e.max.y:e.min.y,e0.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(e0)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function t0(){let n=null,e=!1,t=null,i=null;function a(r,s){t(r,s),i=n.requestAnimationFrame(a)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(a),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function k8(n,e){let t=e.isWebGL2,i=new WeakMap;function a(l,u){let f=l.array,h=l.usage,m=n.createBuffer();n.bindBuffer(u,m),n.bufferData(u,f,h),l.onUploadCallback();let v=n.FLOAT;return f instanceof Float32Array?v=n.FLOAT:f instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):f instanceof Uint16Array?l.isFloat16BufferAttribute?t?v=n.HALF_FLOAT:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):v=n.UNSIGNED_SHORT:f instanceof Int16Array?v=n.SHORT:f instanceof Uint32Array?v=n.UNSIGNED_INT:f instanceof Int32Array?v=n.INT:f instanceof Int8Array?v=n.BYTE:(f instanceof Uint8Array||f instanceof Uint8ClampedArray)&&(v=n.UNSIGNED_BYTE),{buffer:m,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function r(l,u,f){let h=u.array,m=u.updateRange;n.bindBuffer(f,l),m.count===-1?n.bufferSubData(f,0,h):(t?n.bufferSubData(f,m.offset*h.BYTES_PER_ELEMENT,h,m.offset,m.count):n.bufferSubData(f,m.offset*h.BYTES_PER_ELEMENT,h.subarray(m.offset,m.offset+m.count)),m.count=-1)}function s(l){return l.isInterleavedBufferAttribute&&(l=l.data),i.get(l)}function o(l){l.isInterleavedBufferAttribute&&(l=l.data);let u=i.get(l);u&&(n.deleteBuffer(u.buffer),i.delete(l))}function c(l,u){if(l.isGLBufferAttribute){let h=i.get(l);(!h||h.version0?1:-1,u.push(Z.x,Z.y,Z.z),f.push(X/T),f.push(1-O/_),N+=1}}for(let O=0;O<_;O++)for(let W=0;W } -`;var _1={alphamap_fragment:q8,alphamap_pars_fragment:W8,alphatest_fragment:j8,alphatest_pars_fragment:X8,aomap_fragment:Z8,aomap_pars_fragment:Y8,begin_vertex:$8,beginnormal_vertex:K8,bsdfs:J8,bumpmap_pars_fragment:Q8,clipping_planes_fragment:en,clipping_planes_pars_fragment:tn,clipping_planes_pars_vertex:an,clipping_planes_vertex:rn,color_fragment:nn,color_pars_fragment:sn,color_pars_vertex:on,color_vertex:cn,common:ln,cube_uv_reflection_fragment:un,defaultnormal_vertex:hn,displacementmap_pars_vertex:fn,displacementmap_vertex:dn,emissivemap_fragment:pn,emissivemap_pars_fragment:mn,encodings_fragment:vn,encodings_pars_fragment:gn,envmap_fragment:xn,envmap_common_pars_fragment:Mn,envmap_pars_fragment:bn,envmap_pars_vertex:yn,envmap_physical_pars_fragment:Hn,envmap_vertex:Cn,fog_vertex:zn,fog_pars_vertex:An,fog_fragment:wn,fog_pars_fragment:Sn,gradientmap_pars_fragment:_n,lightmap_fragment:En,lightmap_pars_fragment:Ln,lights_lambert_vertex:Dn,lights_pars_begin:Tn,lights_toon_fragment:Vn,lights_toon_pars_fragment:Nn,lights_phong_fragment:Rn,lights_phong_pars_fragment:Fn,lights_physical_fragment:Bn,lights_physical_pars_fragment:Pn,lights_fragment_begin:In,lights_fragment_maps:kn,lights_fragment_end:Un,logdepthbuf_fragment:On,logdepthbuf_pars_fragment:Gn,logdepthbuf_pars_vertex:qn,logdepthbuf_vertex:Wn,map_fragment:jn,map_pars_fragment:Xn,map_particle_fragment:Zn,map_particle_pars_fragment:Yn,metalnessmap_fragment:$n,metalnessmap_pars_fragment:Kn,morphnormal_vertex:Jn,morphtarget_pars_vertex:Qn,morphtarget_vertex:es,normal_fragment_begin:ts,normal_fragment_maps:is,normal_pars_fragment:as,normal_pars_vertex:rs,normal_vertex:ns,normalmap_pars_fragment:ss,clearcoat_normal_fragment_begin:os,clearcoat_normal_fragment_maps:cs,clearcoat_pars_fragment:ls,output_fragment:us,packing:hs,premultiplied_alpha_fragment:fs,project_vertex:ds,dithering_fragment:ps,dithering_pars_fragment:ms,roughnessmap_fragment:vs,roughnessmap_pars_fragment:gs,shadowmap_pars_fragment:xs,shadowmap_pars_vertex:Ms,shadowmap_vertex:bs,shadowmask_pars_fragment:ys,skinbase_vertex:Cs,skinning_pars_vertex:zs,skinning_vertex:As,skinnormal_vertex:ws,specularmap_fragment:Ss,specularmap_pars_fragment:_s,tonemapping_fragment:Es,tonemapping_pars_fragment:Ls,transmission_fragment:Ds,transmission_pars_fragment:Ts,uv_pars_fragment:Hs,uv_pars_vertex:Vs,uv_vertex:Ns,uv2_pars_fragment:Rs,uv2_pars_vertex:Fs,uv2_vertex:Bs,worldpos_vertex:Ps,background_vert:Is,background_frag:ks,cube_vert:Us,cube_frag:Os,depth_vert:Gs,depth_frag:qs,distanceRGBA_vert:Ws,distanceRGBA_frag:js,equirect_vert:Xs,equirect_frag:Zs,linedashed_vert:Ys,linedashed_frag:$s,meshbasic_vert:Ks,meshbasic_frag:Js,meshlambert_vert:Qs,meshlambert_frag:e5,meshmatcap_vert:t5,meshmatcap_frag:i5,meshnormal_vert:a5,meshnormal_frag:r5,meshphong_vert:n5,meshphong_frag:s5,meshphysical_vert:o5,meshphysical_frag:c5,meshtoon_vert:l5,meshtoon_frag:u5,points_vert:h5,points_frag:f5,shadow_vert:d5,shadow_frag:p5,sprite_vert:m5,sprite_frag:v5};var e1={common:{diffuse:{value:new x1(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new n2},uv2Transform:{value:new n2},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new z1(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new x1(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new x1(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new n2}},sprite:{diffuse:{value:new x1(16777215)},opacity:{value:1},center:{value:new z1(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new n2}}};var W2={basic:{uniforms:d2([e1.common,e1.specularmap,e1.envmap,e1.aomap,e1.lightmap,e1.fog]),vertexShader:_1.meshbasic_vert,fragmentShader:_1.meshbasic_frag},lambert:{uniforms:d2([e1.common,e1.specularmap,e1.envmap,e1.aomap,e1.lightmap,e1.emissivemap,e1.fog,e1.lights,{emissive:{value:new x1(0)}}]),vertexShader:_1.meshlambert_vert,fragmentShader:_1.meshlambert_frag},phong:{uniforms:d2([e1.common,e1.specularmap,e1.envmap,e1.aomap,e1.lightmap,e1.emissivemap,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.fog,e1.lights,{emissive:{value:new x1(0)},specular:{value:new x1(1118481)},shininess:{value:30}}]),vertexShader:_1.meshphong_vert,fragmentShader:_1.meshphong_frag},standard:{uniforms:d2([e1.common,e1.envmap,e1.aomap,e1.lightmap,e1.emissivemap,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.roughnessmap,e1.metalnessmap,e1.fog,e1.lights,{emissive:{value:new x1(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:_1.meshphysical_vert,fragmentShader:_1.meshphysical_frag},toon:{uniforms:d2([e1.common,e1.aomap,e1.lightmap,e1.emissivemap,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.gradientmap,e1.fog,e1.lights,{emissive:{value:new x1(0)}}]),vertexShader:_1.meshtoon_vert,fragmentShader:_1.meshtoon_frag},matcap:{uniforms:d2([e1.common,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.fog,{matcap:{value:null}}]),vertexShader:_1.meshmatcap_vert,fragmentShader:_1.meshmatcap_frag},points:{uniforms:d2([e1.points,e1.fog]),vertexShader:_1.points_vert,fragmentShader:_1.points_frag},dashed:{uniforms:d2([e1.common,e1.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:_1.linedashed_vert,fragmentShader:_1.linedashed_frag},depth:{uniforms:d2([e1.common,e1.displacementmap]),vertexShader:_1.depth_vert,fragmentShader:_1.depth_frag},normal:{uniforms:d2([e1.common,e1.bumpmap,e1.normalmap,e1.displacementmap,{opacity:{value:1}}]),vertexShader:_1.meshnormal_vert,fragmentShader:_1.meshnormal_frag},sprite:{uniforms:d2([e1.sprite,e1.fog]),vertexShader:_1.sprite_vert,fragmentShader:_1.sprite_frag},background:{uniforms:{uvTransform:{value:new n2},t2D:{value:null}},vertexShader:_1.background_vert,fragmentShader:_1.background_frag},cube:{uniforms:d2([e1.envmap,{opacity:{value:1}}]),vertexShader:_1.cube_vert,fragmentShader:_1.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:_1.equirect_vert,fragmentShader:_1.equirect_frag},distanceRGBA:{uniforms:d2([e1.common,e1.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:_1.distanceRGBA_vert,fragmentShader:_1.distanceRGBA_frag},shadow:{uniforms:d2([e1.lights,e1.fog,{color:{value:new x1(0)},opacity:{value:1}}]),vertexShader:_1.shadow_vert,fragmentShader:_1.shadow_frag}};W2.physical={uniforms:d2([W2.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new z1(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new x1(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new z1},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new x1(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new x1(1,1,1)},specularColorMap:{value:null}}]),vertexShader:_1.meshphysical_vert,fragmentShader:_1.meshphysical_frag};function g5(n,e,t,i,a,r){let s=new x1(0),o=a===!0?0:1,c,l,u=null,f=0,h=null;function p(g,x){let m=!1,d=x.isScene===!0?x.background:null;d&&d.isTexture&&(d=e.get(d));let A=n.xr,b=A.getSession&&A.getSession();b&&b.environmentBlendMode==="additive"&&(d=null),d===null?v(s,o):d&&d.isColor&&(v(d,1),m=!0),(n.autoClear||m)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),d&&(d.isCubeTexture||d.mapping===a4)?(l===void 0&&(l=new l2(new Ye(1,1,1),new se({name:"BackgroundCubeMaterial",uniforms:$e(W2.cube.uniforms),vertexShader:W2.cube.vertexShader,fragmentShader:W2.cube.fragmentShader,side:P1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(C,E,T){this.matrixWorld.copyPosition(T.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),l.material.uniforms.envMap.value=d,l.material.uniforms.flipEnvMap.value=d.isCubeTexture&&d.isRenderTargetTexture===!1?-1:1,(u!==d||f!==d.version||h!==n.toneMapping)&&(l.material.needsUpdate=!0,u=d,f=d.version,h=n.toneMapping),g.unshift(l,l.geometry,l.material,0,0,null)):d&&d.isTexture&&(c===void 0&&(c=new l2(new H4(2,2),new se({name:"BackgroundMaterial",uniforms:$e(W2.background.uniforms),vertexShader:W2.background.vertexShader,fragmentShader:W2.background.fragmentShader,side:Ie,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=d,d.matrixAutoUpdate===!0&&d.updateMatrix(),c.material.uniforms.uvTransform.value.copy(d.matrix),(u!==d||f!==d.version||h!==n.toneMapping)&&(c.material.needsUpdate=!0,u=d,f=d.version,h=n.toneMapping),g.unshift(c,c.geometry,c.material,0,0,null))}function v(g,x){t.buffers.color.setClear(g.r,g.g,g.b,x,r)}return{getClearColor:function(){return s},setClearColor:function(g,x=1){s.set(g),o=x,v(s,o)},getClearAlpha:function(){return o},setClearAlpha:function(g){o=g,v(s,o)},render:p}}function x5(n,e,t,i){let a=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),s=i.isWebGL2||r!==null,o={},c=g(null),l=c;function u(z,H,V,L,N){let U=!1;if(s){let Z=v(L,V,H);l!==Z&&(l=Z,h(l.object)),U=x(L,N),U&&m(L,N)}else{let Z=H.wireframe===!0;(l.geometry!==L.id||l.program!==V.id||l.wireframe!==Z)&&(l.geometry=L.id,l.program=V.id,l.wireframe=Z,U=!0)}z.isInstancedMesh===!0&&(U=!0),N!==null&&t.update(N,n.ELEMENT_ARRAY_BUFFER),U&&(T(z,H,V,L),N!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(N).buffer))}function f(){return i.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function h(z){return i.isWebGL2?n.bindVertexArray(z):r.bindVertexArrayOES(z)}function p(z){return i.isWebGL2?n.deleteVertexArray(z):r.deleteVertexArrayOES(z)}function v(z,H,V){let L=V.wireframe===!0,N=o[z.id];N===void 0&&(N={},o[z.id]=N);let U=N[H.id];U===void 0&&(U={},N[H.id]=U);let Z=U[L];return Z===void 0&&(Z=g(f()),U[L]=Z),Z}function g(z){let H=[],V=[],L=[];for(let N=0;N=0){let X=N[O];if(X===void 0&&(O==="instanceMatrix"&&z.instanceMatrix&&(X=z.instanceMatrix),O==="instanceColor"&&z.instanceColor&&(X=z.instanceColor)),X!==void 0){let Q=X.normalized,a1=X.itemSize,B=t.get(X);if(B===void 0)continue;let M1=B.buffer,u1=B.type,v1=B.bytesPerElement;if(X.isInterleavedBufferAttribute){let n1=X.data,T1=n1.stride,A1=X.offset;if(n1&&n1.isInstancedInterleavedBuffer){for(let C1=0;C10&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext!="undefined"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&n instanceof WebGL2ComputeRenderingContext,o=t.precision!==void 0?t.precision:"highp",c=r(o);c!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",c,"instead."),o=c);let l=s||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,f=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_TEXTURE_SIZE),v=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),g=n.getParameter(n.MAX_VERTEX_ATTRIBS),x=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),m=n.getParameter(n.MAX_VARYING_VECTORS),d=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),A=h>0,b=s||e.has("OES_texture_float"),C=A&&b,E=s?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:a,getMaxPrecision:r,precision:o,logarithmicDepthBuffer:u,maxTextures:f,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:v,maxAttributes:g,maxVertexUniforms:x,maxVaryings:m,maxFragmentUniforms:d,vertexTextures:A,floatFragmentTextures:b,floatVertexTextures:C,maxSamples:E}}function y5(n){let e=this,t=null,i=0,a=!1,r=!1,s=new ne,o=new n2,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h,p){let v=f.length!==0||h||i!==0||a;return a=h,t=u(f,p,0),i=f.length,v},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1,l()},this.setState=function(f,h,p){let v=f.clippingPlanes,g=f.clipIntersection,x=f.clipShadows,m=n.get(f);if(!a||v===null||v.length===0||r&&!x)r?u(null):l();else{let d=r?0:i,A=d*4,b=m.clippingState||null;c.value=b,b=u(v,h,A,p);for(let C=0;C!==A;++C)b[C]=t[C];m.clippingState=b,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=d}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,p,v){let g=f!==null?f.length:0,x=null;if(g!==0){if(x=c.value,v!==!0||x===null){let m=p+g*4,d=h.matrixWorldInverse;o.getNormalMatrix(d),(x===null||x.length=0){let X=N[O];if(X===void 0&&(O==="instanceMatrix"&&z.instanceMatrix&&(X=z.instanceMatrix),O==="instanceColor"&&z.instanceColor&&(X=z.instanceColor)),X!==void 0){let Q=X.normalized,a1=X.itemSize,B=t.get(X);if(B===void 0)continue;let M1=B.buffer,u1=B.type,v1=B.bytesPerElement;if(X.isInterleavedBufferAttribute){let n1=X.data,T1=n1.stride,A1=X.offset;if(n1&&n1.isInstancedInterleavedBuffer){for(let C1=0;C10&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext!="undefined"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&n instanceof WebGL2ComputeRenderingContext,o=t.precision!==void 0?t.precision:"highp",c=r(o);c!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",c,"instead."),o=c);let l=s||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,f=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_TEXTURE_SIZE),v=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),g=n.getParameter(n.MAX_VERTEX_ATTRIBS),x=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),p=n.getParameter(n.MAX_VARYING_VECTORS),d=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),A=h>0,b=s||e.has("OES_texture_float"),C=A&&b,E=s?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:a,getMaxPrecision:r,precision:o,logarithmicDepthBuffer:u,maxTextures:f,maxVertexTextures:h,maxTextureSize:m,maxCubemapSize:v,maxAttributes:g,maxVertexUniforms:x,maxVaryings:p,maxFragmentUniforms:d,vertexTextures:A,floatFragmentTextures:b,floatVertexTextures:C,maxSamples:E}}function y5(n){let e=this,t=null,i=0,a=!1,r=!1,s=new ne,o=new n2,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h,m){let v=f.length!==0||h||i!==0||a;return a=h,t=u(f,m,0),i=f.length,v},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1,l()},this.setState=function(f,h,m){let v=f.clippingPlanes,g=f.clipIntersection,x=f.clipShadows,p=n.get(f);if(!a||v===null||v.length===0||r&&!x)r?u(null):l();else{let d=r?0:i,A=d*4,b=p.clippingState||null;c.value=b,b=u(v,h,A,m);for(let C=0;C!==A;++C)b[C]=t[C];p.clippingState=b,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=d}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,m,v){let g=f!==null?f.length:0,x=null;if(g!==0){if(x=c.value,v!==!0||x===null){let p=m+g*4,d=h.matrixWorldInverse;o.getNormalMatrix(d),(x===null||x.length0){let l=new t0(c.height/2);return l.fromEquirectangularTexture(n,s),e.set(s,l),s.addEventListener("dispose",a),t(l.texture,s.mapping)}else return null}}return s}function a(s){let o=s.target;o.removeEventListener("dispose",a);let c=e.get(o);c!==void 0&&(e.delete(o),c.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}var i0=class extends at{constructor(e=-1,t=1,i=1,a=-1,r=.1,s=2e3){super();this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=a,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,a,r,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,a=(this.top+this.bottom)/2,r=i-e,s=i+e,o=a+t,c=a-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=l*this.view.offsetX,s=r+l*this.view.width,o-=u*this.view.offsetY,c=o-u*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};i0.prototype.isOrthographicCamera=!0;var ot=class extends se{constructor(e){super(e);this.type="RawShaderMaterial"}};ot.prototype.isRawShaderMaterial=!0;var ct=4,d4=8,Ae=Math.pow(2,d4),z5=[.125,.215,.35,.446,.526,.582],A5=d4-ct+1+z5.length,lt=20,Ai=new i0,{_lodPlanes:Gt,_sizeLods:w5,_sigmas:a0}=I9(),S5=new x1,wi=null,V4=(1+Math.sqrt(5))/2,ut=1/V4,_5=[new k(1,1,1),new k(-1,1,1),new k(1,1,-1),new k(-1,1,-1),new k(0,V4,ut),new k(0,V4,-ut),new k(ut,0,V4),new k(-ut,0,V4),new k(V4,ut,0),new k(-V4,ut,0)],r0=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=k9(lt),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,a=100){wi=this._renderer.getRenderTarget();let r=this._allocateTargets();return this._sceneToCubeUV(e,i,a,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=D5(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=L5(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ae:0,Ae,Ae),u.setRenderTarget(a),g&&u.render(v,o),u.render(e,o)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=x}_textureToCubeUV(e,t){let i=this._renderer,a=e.mapping===be||e.mapping===ke;a?(this._cubemapShader===null&&(this._cubemapShader=D5()),this._cubemapShader.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=L5());let r=a?this._cubemapShader:this._equirectShader,s=new l2(Gt[0],r),o=r.uniforms;o.envMap.value=e,a||o.texelSize.value.set(1/e.image.width,1/e.image.height),n0(t,0,0,3*Ae,2*Ae),i.setRenderTarget(t),i.render(s,Ai)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let a=1;alt&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${lt}`);let m=[],d=0;for(let E=0;Ed4-ct?a-d4+ct:0);n0(t,b,C,3*A,2*A),c.setRenderTarget(t),c.render(f,Ai)}};function I9(){let n=[],e=[],t=[],i=d4;for(let a=0;ad4-ct?s=z5[a-d4+ct-1]:a===0&&(s=0),t.push(s);let o=1/(r-1),c=-o/2,l=1+o/2,u=[c,c,l,c,l,l,c,c,l,l,c,l],f=6,h=6,p=3,v=2,g=1,x=new Float32Array(p*h*f),m=new Float32Array(v*h*f),d=new Float32Array(g*h*f);for(let b=0;b2?0:-1,T=[C,E,0,C+2/3,E,0,C+2/3,E+1,0,C,E,0,C+2/3,E+1,0,C,E+1,0];x.set(T,p*h*b),m.set(u,v*h*b);let _=[b,b,b,b,b,b];d.set(_,g*h*b)}let A=new b2;A.setAttribute("position",new M2(x,p)),A.setAttribute("uv",new M2(m,v)),A.setAttribute("faceIndex",new M2(d,g)),n.push(A),i>ct&&i--}return{_lodPlanes:n,_sizeLods:e,_sigmas:t}}function E5(n){let e=new p2(3*Ae,3*Ae,n);return e.texture.mapping=a4,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function n0(n,e,t,i,a){n.viewport.set(e,t,i,a),n.scissor.set(e,t,i,a)}function k9(n){let e=new Float32Array(n),t=new k(0,1,0);return new ot({name:"SphericalGaussianBlur",defines:{n},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t}},vertexShader:Si(),fragmentShader:` + `},a=new Ye(5,5,5),r=new se({name:"CubemapFromEquirect",uniforms:$e(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:P1,blending:U2});r.uniforms.tEquirect.value=t;let s=new l2(a,r),o=t.minFilter;return t.minFilter===nt&&(t.minFilter=t2),new Ai(1,10,this).update(e,s),t.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,i,a){let r=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(t,i,a);e.setRenderTarget(r)}};i0.prototype.isWebGLCubeRenderTarget=!0;function C5(n){let e=new WeakMap;function t(s,o){return o===D4?s.mapping=be:o===T4&&(s.mapping=ke),s}function i(s){if(s&&s.isTexture&&s.isRenderTargetTexture===!1){let o=s.mapping;if(o===D4||o===T4)if(e.has(s)){let c=e.get(s).texture;return t(c,s.mapping)}else{let c=s.image;if(c&&c.height>0){let l=new i0(c.height/2);return l.fromEquirectangularTexture(n,s),e.set(s,l),s.addEventListener("dispose",a),t(l.texture,s.mapping)}else return null}}return s}function a(s){let o=s.target;o.removeEventListener("dispose",a);let c=e.get(o);c!==void 0&&(e.delete(o),c.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}var a0=class extends r4{constructor(e=-1,t=1,i=1,a=-1,r=.1,s=2e3){super();this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=a,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,a,r,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,a=(this.top+this.bottom)/2,r=i-e,s=i+e,o=a+t,c=a-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=l*this.view.offsetX,s=r+l*this.view.width,o-=u*this.view.offsetY,c=o-u*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};a0.prototype.isOrthographicCamera=!0;var c4=class extends se{constructor(e){super(e);this.type="RawShaderMaterial"}};c4.prototype.isRawShaderMaterial=!0;var l4=4,pt=8,Ae=Math.pow(2,pt),z5=[.125,.215,.35,.446,.526,.582],A5=pt-l4+1+z5.length,u4=20,wi=new a0,{_lodPlanes:q4,_sizeLods:w5,_sigmas:r0}=k9(),S5=new x1,Si=null,Nt=(1+Math.sqrt(5))/2,h4=1/Nt,_5=[new k(1,1,1),new k(-1,1,1),new k(1,1,-1),new k(-1,1,-1),new k(0,Nt,h4),new k(0,Nt,-h4),new k(h4,0,Nt),new k(-h4,0,Nt),new k(Nt,h4,0),new k(-Nt,h4,0)],n0=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=U9(u4),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,a=100){Si=this._renderer.getRenderTarget();let r=this._allocateTargets();return this._sceneToCubeUV(e,i,a,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=D5(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=L5(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ae:0,Ae,Ae),u.setRenderTarget(a),g&&u.render(v,o),u.render(e,o)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=x}_textureToCubeUV(e,t){let i=this._renderer,a=e.mapping===be||e.mapping===ke;a?(this._cubemapShader===null&&(this._cubemapShader=D5()),this._cubemapShader.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=L5());let r=a?this._cubemapShader:this._equirectShader,s=new l2(q4[0],r),o=r.uniforms;o.envMap.value=e,a||o.texelSize.value.set(1/e.image.width,1/e.image.height),s0(t,0,0,3*Ae,2*Ae),i.setRenderTarget(t),i.render(s,wi)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let a=1;au4&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${u4}`);let p=[],d=0;for(let E=0;Ept-l4?a-pt+l4:0);s0(t,b,C,3*A,2*A),c.setRenderTarget(t),c.render(f,wi)}};function k9(){let n=[],e=[],t=[],i=pt;for(let a=0;apt-l4?s=z5[a-pt+l4-1]:a===0&&(s=0),t.push(s);let o=1/(r-1),c=-o/2,l=1+o/2,u=[c,c,l,c,l,l,c,c,l,l,c,l],f=6,h=6,m=3,v=2,g=1,x=new Float32Array(m*h*f),p=new Float32Array(v*h*f),d=new Float32Array(g*h*f);for(let b=0;b2?0:-1,T=[C,E,0,C+2/3,E,0,C+2/3,E+1,0,C,E,0,C+2/3,E+1,0,C,E+1,0];x.set(T,m*h*b),p.set(u,v*h*b);let _=[b,b,b,b,b,b];d.set(_,g*h*b)}let A=new b2;A.setAttribute("position",new M2(x,m)),A.setAttribute("uv",new M2(p,v)),A.setAttribute("faceIndex",new M2(d,g)),n.push(A),i>l4&&i--}return{_lodPlanes:n,_sizeLods:e,_sigmas:t}}function E5(n){let e=new d2(3*Ae,3*Ae,n);return e.texture.mapping=rt,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function s0(n,e,t,i,a){n.viewport.set(e,t,i,a),n.scissor.set(e,t,i,a)}function U9(n){let e=new Float32Array(n),t=new k(0,1,0);return new c4({name:"SphericalGaussianBlur",defines:{n},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t}},vertexShader:_i(),fragmentShader:` precision mediump float; precision mediump int; @@ -5538,7 +5539,7 @@ void main() { } } - `,blending:U2,depthTest:!1,depthWrite:!1})}function L5(){let n=new z1(1,1);return new ot({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:n}},vertexShader:Si(),fragmentShader:` + `,blending:U2,depthTest:!1,depthWrite:!1})}function L5(){let n=new z1(1,1);return new c4({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:n}},vertexShader:_i(),fragmentShader:` precision mediump float; precision mediump int; @@ -5572,7 +5573,7 @@ void main() { gl_FragColor.rgb = mix( tm, bm, f.y ); } - `,blending:U2,depthTest:!1,depthWrite:!1})}function D5(){return new ot({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Si(),fragmentShader:` + `,blending:U2,depthTest:!1,depthWrite:!1})}function D5(){return new c4({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_i(),fragmentShader:` precision mediump float; precision mediump int; @@ -5588,7 +5589,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:U2,depthTest:!1,depthWrite:!1})}function Si(){return` + `,blending:U2,depthTest:!1,depthWrite:!1})}function _i(){return` precision mediump float; precision mediump int; @@ -5645,37 +5646,37 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function T5(n){let e=new WeakMap,t=null;function i(o){if(o&&o.isTexture){let c=o.mapping,l=c===Lt||c===Dt,u=c===be||c===ke;if(l||u)if(o.isRenderTargetTexture&&o.needsPMREMUpdate===!0){o.needsPMREMUpdate=!1;let f=e.get(o);return t===null&&(t=new r0(n)),f=l?t.fromEquirectangular(o,f):t.fromCubemap(o,f),e.set(o,f),f.texture}else{if(e.has(o))return e.get(o).texture;{let f=o.image;if(l&&f&&f.height>0||u&&f&&a(f)){t===null&&(t=new r0(n));let h=l?t.fromEquirectangular(o):t.fromCubemap(o);return e.set(o,h),o.addEventListener("dispose",r),h.texture}else return null}}}return o}function a(o){let c=0,l=6;for(let u=0;ue.maxTextureSize&&(_=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);let P=new Float32Array(T*_*4*v),F=new ht(P,T,_,v);F.format=W1,F.type=Q2,F.needsUpdate=!0;let M=E*4;for(let z=0;z0)return n;let a=e*t,r=G5[a];if(r===void 0&&(r=new Float32Array(a),G5[a]=r),e!==0){i.toArray(r,0);for(let s=1,o=0;s!==e;++s)o+=t,n[s].toArray(r,o)}return r}function A2(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||u&&f&&a(f)){t===null&&(t=new n0(n));let h=l?t.fromEquirectangular(o):t.fromCubemap(o);return e.set(o,h),o.addEventListener("dispose",r),h.texture}else return null}}}return o}function a(o){let c=0,l=6;for(let u=0;ue.maxTextureSize&&(_=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);let P=new Float32Array(T*_*4*v),F=new f4(P,T,_,v);F.format=W1,F.type=Q2,F.needsUpdate=!0;let M=E*4;for(let z=0;z0)return n;let a=e*t,r=G5[a];if(r===void 0&&(r=new Float32Array(a),G5[a]=r),e!==0){i.toArray(r,0);for(let s=1,o=0;s!==e;++s)o+=t,n[s].toArray(r,o)}return r}function A2(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t/gm;function Li(n){return n.replace(Iu,ku)}function ku(n,e){let t=_1[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return Li(t)}var Uu=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Ou=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function eo(n){return n.replace(Ou,to).replace(Uu,Gu)}function Gu(n,e,t,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),to(n,e,t,i)}function to(n,e,t,i){let a="";for(let r=parseInt(e);r/gm;function Di(n){return n.replace(ku,Uu)}function Uu(n,e){let t=_1[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return Di(t)}var Ou=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Gu=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function eo(n){return n.replace(Gu,to).replace(Ou,qu)}function qu(n,e,t,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),to(n,e,t,i)}function to(n,e,t,i){let a="";for(let r=parseInt(e);r0&&(g+=` -`),x=[h,p].filter(qt).join(` +`),x=[h,m].filter(W4).join(` `),x.length>0&&(x+=` -`)):(g=[io(t),"#define SHADER_NAME "+t.shaderName,p,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(qt).join(` -`),x=[h,io(t),"#define SHADER_NAME "+t.shaderName,p,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+u:"",t.envMap?"#define "+f:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==O2?"#define TONE_MAPPING":"",t.toneMapping!==O2?_1.tonemapping_pars_fragment:"",t.toneMapping!==O2?Ru("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.alphaWrite?"":"#define OPAQUE",_1.encodings_pars_fragment,Nu("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(qt).join(` -`)),s=Li(s),s=J5(s,t),s=Q5(s,t),o=Li(o),o=J5(o,t),o=Q5(o,t),s=eo(s),o=eo(o),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(m=`#version 300 es +`)):(g=[io(t),"#define SHADER_NAME "+t.shaderName,m,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(W4).join(` +`),x=[h,io(t),"#define SHADER_NAME "+t.shaderName,m,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+u:"",t.envMap?"#define "+f:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==O2?"#define TONE_MAPPING":"",t.toneMapping!==O2?_1.tonemapping_pars_fragment:"",t.toneMapping!==O2?Fu("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.alphaWrite?"":"#define OPAQUE",_1.encodings_pars_fragment,Ru("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(W4).join(` +`)),s=Di(s),s=J5(s,t),s=Q5(s,t),o=Di(o),o=J5(o,t),o=Q5(o,t),s=eo(s),o=eo(o),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(p=`#version 300 es `,g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+g,x=["#define varying in",t.glslVersion===R3?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===R3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+g,x=["#define varying in",t.glslVersion===F3?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===F3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+x);let d=m+g+s,A=m+x+o,b=Ei(a,a.VERTEX_SHADER,d),C=Ei(a,a.FRAGMENT_SHADER,A);if(a.attachShader(v,b),a.attachShader(v,C),t.index0AttributeName!==void 0?a.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),n.debug.checkShaderErrors){let _=a.getProgramInfoLog(v).trim(),P=a.getShaderInfoLog(b).trim(),F=a.getShaderInfoLog(C).trim(),M=!0,D=!0;if(a.getProgramParameter(v,a.LINK_STATUS)===!1){M=!1;let z=K5(a,b,"vertex"),H=K5(a,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(v,a.VALIDATE_STATUS)+` +`+x);let d=p+g+s,A=p+x+o,b=Li(a,a.VERTEX_SHADER,d),C=Li(a,a.FRAGMENT_SHADER,A);if(a.attachShader(v,b),a.attachShader(v,C),t.index0AttributeName!==void 0?a.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),n.debug.checkShaderErrors){let _=a.getProgramInfoLog(v).trim(),P=a.getShaderInfoLog(b).trim(),F=a.getShaderInfoLog(C).trim(),M=!0,D=!0;if(a.getProgramParameter(v,a.LINK_STATUS)===!1){M=!1;let z=K5(a,b,"vertex"),H=K5(a,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(v,a.VALIDATE_STATUS)+` Program Info Log: `+_+` `+z+` -`+H)}else _!==""?console.warn("THREE.WebGLProgram: Program Info Log:",_):(P===""||F==="")&&(D=!1);D&&(this.diagnostics={runnable:M,programLog:_,vertexShader:{log:P,prefix:g},fragmentShader:{log:F,prefix:x}})}a.deleteShader(b),a.deleteShader(C);let E;this.getUniforms=function(){return E===void 0&&(E=new we(a,v)),E};let T;return this.getAttributes=function(){return T===void 0&&(T=Pu(a,v)),T},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=Tu++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=b,this.fragmentShader=C,this}var Zu=0,Di=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,a=this._getShaderStage(t),r=this._getShaderStage(i),s=this._getShaderCacheForMaterial(e);return s.has(a)===!1&&(s.add(a),a.usedTimes++),s.has(r)===!1&&(s.add(r),r.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache;return t.has(e)===!1&&t.set(e,new Set),t.get(e)}_getShaderStage(e){let t=this.shaderCache;if(t.has(e)===!1){let i=new ro;t.set(e,i)}return t.get(e)}},ro=class{constructor(){this.id=Zu++,this.usedTimes=0}};function no(n,e,t,i,a,r,s){let o=new Pt,c=new Di,l=[],u=a.isWebGL2,f=a.logarithmicDepthBuffer,h=a.floatVertexTextures,p=a.maxVertexUniforms,v=a.vertexTextures,g=a.precision,x={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(M){let z=M.skeleton.bones;if(h)return 1024;{let V=Math.floor((p-20)/4),L=Math.min(V,z.length);return L0,u1=M.clearcoat>0;return{isWebGL2:u,shaderID:Z,shaderName:M.type,vertexShader:W,fragmentShader:X,defines:M.defines,customVertexShaderID:Q,customFragmentShaderID:a1,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:g,instancing:V.isInstancedMesh===!0,instancingColor:V.isInstancedMesh===!0&&V.instanceColor!==null,supportsVertexTextures:v,outputEncoding:B===null?n.outputEncoding:B.isXRRenderTarget===!0?B.texture.encoding:R2,map:!!M.map,matcap:!!M.matcap,envMap:!!U,envMapMode:U&&U.mapping,envMapCubeUV:!!U&&(U.mapping===a4||U.mapping===Tt),lightMap:!!M.lightMap,aoMap:!!M.aoMap,emissiveMap:!!M.emissiveMap,bumpMap:!!M.bumpMap,normalMap:!!M.normalMap,objectSpaceNormalMap:M.normalMapType===S8,tangentSpaceNormalMap:M.normalMapType===V6,decodeVideoTexture:!!M.map&&M.map.isVideoTexture===!0&&M.map.encoding===I1,clearcoat:u1,clearcoatMap:u1&&!!M.clearcoatMap,clearcoatRoughnessMap:u1&&!!M.clearcoatRoughnessMap,clearcoatNormalMap:u1&&!!M.clearcoatNormalMap,displacementMap:!!M.displacementMap,roughnessMap:!!M.roughnessMap,metalnessMap:!!M.metalnessMap,specularMap:!!M.specularMap,specularIntensityMap:!!M.specularIntensityMap,specularColorMap:!!M.specularColorMap,alphaMap:!!M.alphaMap,alphaTest:M1,alphaWrite:M.alphaWrite||M.transparent,gradientMap:!!M.gradientMap,sheen:M.sheen>0,sheenColorMap:!!M.sheenColorMap,sheenRoughnessMap:!!M.sheenRoughnessMap,transmission:M.transmission>0,transmissionMap:!!M.transmissionMap,thicknessMap:!!M.thicknessMap,combine:M.combine,vertexTangents:!!M.normalMap&&!!V.geometry&&!!V.geometry.attributes.tangent,vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!V.geometry&&!!V.geometry.attributes.color&&V.geometry.attributes.color.itemSize===4,vertexUvs:!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatMap||!!M.clearcoatRoughnessMap||!!M.clearcoatNormalMap||!!M.displacementMap||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||!!M.sheenColorMap||!!M.sheenRoughnessMap,uvsVertexOnly:!(!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatNormalMap||M.transmission>0||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||M.sheen>0||!!M.sheenColorMap||!!M.sheenRoughnessMap)&&!!M.displacementMap,fog:!!L,useFog:M.fog,fogExp2:L&&L.isFogExp2,flatShading:!!M.flatShading,sizeAttenuation:M.sizeAttenuation,logarithmicDepthBuffer:f,skinning:V.isSkinnedMesh===!0&&O>0,maxBones:O,useVertexTexture:h,morphTargets:!!V.geometry&&!!V.geometry.morphAttributes.position,morphNormals:!!V.geometry&&!!V.geometry.morphAttributes.normal,morphTargetsCount:!!V.geometry&&!!V.geometry.morphAttributes.position?V.geometry.morphAttributes.position.length:0,numDirLights:D.directional.length,numPointLights:D.point.length,numSpotLights:D.spot.length,numRectAreaLights:D.rectArea.length,numHemiLights:D.hemi.length,numDirLightShadows:D.directionalShadowMap.length,numPointLightShadows:D.pointShadowMap.length,numSpotLightShadows:D.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&z.length>0,shadowMapType:n.shadowMap.type,toneMapping:M.toneMapped?n.toneMapping:O2,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===J2,flipSided:M.side===P1,depthPacking:M.depthPacking!==void 0?M.depthPacking:!1,index0AttributeName:M.index0AttributeName,extensionDerivatives:M.extensions&&M.extensions.derivatives,extensionFragDepth:M.extensions&&M.extensions.fragDepth,extensionDrawBuffers:M.extensions&&M.extensions.drawBuffers,extensionShaderTextureLOD:M.extensions&&M.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:M.customProgramCacheKey()}}function A(M){let D=[];if(M.shaderID?D.push(M.shaderID):(D.push(M.customVertexShaderID),D.push(M.customFragmentShaderID)),M.defines!==void 0)for(let z in M.defines)D.push(z),D.push(M.defines[z]);return M.isRawShaderMaterial===!1&&(b(D,M),C(D,M),D.push(n.outputEncoding)),D.push(M.customProgramCacheKey),D.join()}function b(M,D){M.push(D.precision),M.push(D.outputEncoding),M.push(D.envMapMode),M.push(D.combine),M.push(D.vertexUvs),M.push(D.fogExp2),M.push(D.sizeAttenuation),M.push(D.maxBones),M.push(D.morphTargetsCount),M.push(D.numDirLights),M.push(D.numPointLights),M.push(D.numSpotLights),M.push(D.numHemiLights),M.push(D.numRectAreaLights),M.push(D.numDirLightShadows),M.push(D.numPointLightShadows),M.push(D.numSpotLightShadows),M.push(D.shadowMapType),M.push(D.toneMapping),M.push(D.numClippingPlanes),M.push(D.numClipIntersection),M.push(D.alphaWrite)}function C(M,D){o.disableAll(),D.isWebGL2&&o.enable(0),D.supportsVertexTextures&&o.enable(1),D.instancing&&o.enable(2),D.instancingColor&&o.enable(3),D.map&&o.enable(4),D.matcap&&o.enable(5),D.envMap&&o.enable(6),D.envMapCubeUV&&o.enable(7),D.lightMap&&o.enable(8),D.aoMap&&o.enable(9),D.emissiveMap&&o.enable(10),D.bumpMap&&o.enable(11),D.normalMap&&o.enable(12),D.objectSpaceNormalMap&&o.enable(13),D.tangentSpaceNormalMap&&o.enable(14),D.clearcoat&&o.enable(15),D.clearcoatMap&&o.enable(16),D.clearcoatRoughnessMap&&o.enable(17),D.clearcoatNormalMap&&o.enable(18),D.displacementMap&&o.enable(19),D.specularMap&&o.enable(20),D.roughnessMap&&o.enable(21),D.metalnessMap&&o.enable(22),D.gradientMap&&o.enable(23),D.alphaMap&&o.enable(24),D.alphaTest&&o.enable(25),D.vertexColors&&o.enable(26),D.vertexAlphas&&o.enable(27),D.vertexUvs&&o.enable(28),D.vertexTangents&&o.enable(29),D.uvsVertexOnly&&o.enable(30),D.fog&&o.enable(31),M.push(o.mask),o.disableAll(),D.useFog&&o.enable(0),D.flatShading&&o.enable(1),D.logarithmicDepthBuffer&&o.enable(2),D.skinning&&o.enable(3),D.useVertexTexture&&o.enable(4),D.morphTargets&&o.enable(5),D.morphNormals&&o.enable(6),D.premultipliedAlpha&&o.enable(7),D.shadowMapEnabled&&o.enable(8),D.physicallyCorrectLights&&o.enable(9),D.doubleSided&&o.enable(10),D.flipSided&&o.enable(11),D.depthPacking&&o.enable(12),D.dithering&&o.enable(13),D.specularIntensityMap&&o.enable(14),D.specularColorMap&&o.enable(15),D.transmission&&o.enable(16),D.transmissionMap&&o.enable(17),D.thicknessMap&&o.enable(18),D.sheen&&o.enable(19),D.sheenColorMap&&o.enable(20),D.sheenRoughnessMap&&o.enable(21),D.decodeVideoTexture&&o.enable(22),M.push(o.mask)}function E(M){let D=x[M.type],z;if(D){let H=W2[D];z=U8.clone(H.uniforms)}else z=M.uniforms;return z}function T(M,D){let z;for(let H=0,V=l.length;H0?i.push(m):p.transparent===!0?a.push(m):t.push(m)}function c(f,h,p,v,g,x){let m=s(f,h,p,v,g,x);p.transmission>0?i.unshift(m):p.transparent===!0?a.unshift(m):t.unshift(m)}function l(f,h){t.length>1&&t.sort(f||Yu),i.length>1&&i.sort(h||oo),a.length>1&&a.sort(h||oo)}function u(){for(let f=e,h=n.length;f=n.get(i).length?(r=new co,n.get(i).push(r)):r=n.get(i)[a],r}function t(){n=new WeakMap}return{get:e,dispose:t}}function $u(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new x1};break;case"SpotLight":t={position:new k,direction:new k,color:new x1,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new x1,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new x1,groundColor:new x1};break;case"RectAreaLight":t={color:new x1,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function Ku(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}var Ju=0;function Qu(n,e){return(e.castShadow?1:0)-(n.castShadow?1:0)}function uo(n,e){let t=new $u,i=Ku(),a={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let u=0;u<9;u++)a.probe.push(new k);let r=new k,s=new k1,o=new k1;function c(u,f){let h=0,p=0,v=0;for(let P=0;P<9;P++)a.probe[P].set(0,0,0);let g=0,x=0,m=0,d=0,A=0,b=0,C=0,E=0;u.sort(Qu);let T=f!==!0?Math.PI:1;for(let P=0,F=u.length;P0&&(e.isWebGL2?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_HALF_1,a.rectAreaLTC2=e1.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),a.ambient[0]=h,a.ambient[1]=p,a.ambient[2]=v;let _=a.hash;(_.directionalLength!==g||_.pointLength!==x||_.spotLength!==m||_.rectAreaLength!==d||_.hemiLength!==A||_.numDirectionalShadows!==b||_.numPointShadows!==C||_.numSpotShadows!==E)&&(a.directional.length=g,a.spot.length=m,a.rectArea.length=d,a.point.length=x,a.hemi.length=A,a.directionalShadow.length=b,a.directionalShadowMap.length=b,a.pointShadow.length=C,a.pointShadowMap.length=C,a.spotShadow.length=E,a.spotShadowMap.length=E,a.directionalShadowMatrix.length=b,a.pointShadowMatrix.length=C,a.spotShadowMatrix.length=E,_.directionalLength=g,_.pointLength=x,_.spotLength=m,_.rectAreaLength=d,_.hemiLength=A,_.numDirectionalShadows=b,_.numPointShadows=C,_.numSpotShadows=E,a.version=Ju++)}function l(u,f){let h=0,p=0,v=0,g=0,x=0,m=f.matrixWorldInverse;for(let d=0,A=u.length;d=t.get(r).length?(o=new ho(n,e),t.get(r).push(o)):o=t.get(r)[s],o}function a(){t=new WeakMap}return{get:i,dispose:a}}var c0=class extends T2{constructor(e){super();this.type="MeshDepthMaterial",this.depthPacking=A8,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};c0.prototype.isMeshDepthMaterial=!0;var l0=class extends T2{constructor(e){super();this.type="MeshDistanceMaterial",this.referencePosition=new k,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};l0.prototype.isMeshDistanceMaterial=!0;var po=` +`+H)}else _!==""?console.warn("THREE.WebGLProgram: Program Info Log:",_):(P===""||F==="")&&(D=!1);D&&(this.diagnostics={runnable:M,programLog:_,vertexShader:{log:P,prefix:g},fragmentShader:{log:F,prefix:x}})}a.deleteShader(b),a.deleteShader(C);let E;this.getUniforms=function(){return E===void 0&&(E=new we(a,v)),E};let T;return this.getAttributes=function(){return T===void 0&&(T=Iu(a,v)),T},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=Hu++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=b,this.fragmentShader=C,this}var Yu=0,Ti=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,a=this._getShaderStage(t),r=this._getShaderStage(i),s=this._getShaderCacheForMaterial(e);return s.has(a)===!1&&(s.add(a),a.usedTimes++),s.has(r)===!1&&(s.add(r),r.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache;return t.has(e)===!1&&t.set(e,new Set),t.get(e)}_getShaderStage(e){let t=this.shaderCache;if(t.has(e)===!1){let i=new ro;t.set(e,i)}return t.get(e)}},ro=class{constructor(){this.id=Yu++,this.usedTimes=0}};function no(n,e,t,i,a,r,s){let o=new I4,c=new Ti,l=[],u=a.isWebGL2,f=a.logarithmicDepthBuffer,h=a.floatVertexTextures,m=a.maxVertexUniforms,v=a.vertexTextures,g=a.precision,x={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(M){let z=M.skeleton.bones;if(h)return 1024;{let V=Math.floor((m-20)/4),L=Math.min(V,z.length);return L0,u1=M.clearcoat>0;return{isWebGL2:u,shaderID:Z,shaderName:M.type,vertexShader:W,fragmentShader:X,defines:M.defines,customVertexShaderID:Q,customFragmentShaderID:a1,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:g,instancing:V.isInstancedMesh===!0,instancingColor:V.isInstancedMesh===!0&&V.instanceColor!==null,supportsVertexTextures:v,outputEncoding:B===null?n.outputEncoding:B.isXRRenderTarget===!0?B.texture.encoding:R2,map:!!M.map,matcap:!!M.matcap,envMap:!!U,envMapMode:U&&U.mapping,envMapCubeUV:!!U&&(U.mapping===rt||U.mapping===H4),lightMap:!!M.lightMap,aoMap:!!M.aoMap,emissiveMap:!!M.emissiveMap,bumpMap:!!M.bumpMap,normalMap:!!M.normalMap,objectSpaceNormalMap:M.normalMapType===S8,tangentSpaceNormalMap:M.normalMapType===N6,decodeVideoTexture:!!M.map&&M.map.isVideoTexture===!0&&M.map.encoding===I1,clearcoat:u1,clearcoatMap:u1&&!!M.clearcoatMap,clearcoatRoughnessMap:u1&&!!M.clearcoatRoughnessMap,clearcoatNormalMap:u1&&!!M.clearcoatNormalMap,displacementMap:!!M.displacementMap,roughnessMap:!!M.roughnessMap,metalnessMap:!!M.metalnessMap,specularMap:!!M.specularMap,specularIntensityMap:!!M.specularIntensityMap,specularColorMap:!!M.specularColorMap,alphaMap:!!M.alphaMap,alphaTest:M1,alphaWrite:M.alphaWrite||M.transparent,gradientMap:!!M.gradientMap,sheen:M.sheen>0,sheenColorMap:!!M.sheenColorMap,sheenRoughnessMap:!!M.sheenRoughnessMap,transmission:M.transmission>0,transmissionMap:!!M.transmissionMap,thicknessMap:!!M.thicknessMap,combine:M.combine,vertexTangents:!!M.normalMap&&!!V.geometry&&!!V.geometry.attributes.tangent,vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!V.geometry&&!!V.geometry.attributes.color&&V.geometry.attributes.color.itemSize===4,vertexUvs:!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatMap||!!M.clearcoatRoughnessMap||!!M.clearcoatNormalMap||!!M.displacementMap||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||!!M.sheenColorMap||!!M.sheenRoughnessMap,uvsVertexOnly:!(!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatNormalMap||M.transmission>0||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||M.sheen>0||!!M.sheenColorMap||!!M.sheenRoughnessMap)&&!!M.displacementMap,fog:!!L,useFog:M.fog,fogExp2:L&&L.isFogExp2,flatShading:!!M.flatShading,sizeAttenuation:M.sizeAttenuation,logarithmicDepthBuffer:f,skinning:V.isSkinnedMesh===!0&&O>0,maxBones:O,useVertexTexture:h,morphTargets:!!V.geometry&&!!V.geometry.morphAttributes.position,morphNormals:!!V.geometry&&!!V.geometry.morphAttributes.normal,morphTargetsCount:!!V.geometry&&!!V.geometry.morphAttributes.position?V.geometry.morphAttributes.position.length:0,numDirLights:D.directional.length,numPointLights:D.point.length,numSpotLights:D.spot.length,numRectAreaLights:D.rectArea.length,numHemiLights:D.hemi.length,numDirLightShadows:D.directionalShadowMap.length,numPointLightShadows:D.pointShadowMap.length,numSpotLightShadows:D.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&z.length>0,shadowMapType:n.shadowMap.type,toneMapping:M.toneMapped?n.toneMapping:O2,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===J2,flipSided:M.side===P1,depthPacking:M.depthPacking!==void 0?M.depthPacking:!1,index0AttributeName:M.index0AttributeName,extensionDerivatives:M.extensions&&M.extensions.derivatives,extensionFragDepth:M.extensions&&M.extensions.fragDepth,extensionDrawBuffers:M.extensions&&M.extensions.drawBuffers,extensionShaderTextureLOD:M.extensions&&M.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:M.customProgramCacheKey()}}function A(M){let D=[];if(M.shaderID?D.push(M.shaderID):(D.push(M.customVertexShaderID),D.push(M.customFragmentShaderID)),M.defines!==void 0)for(let z in M.defines)D.push(z),D.push(M.defines[z]);return M.isRawShaderMaterial===!1&&(b(D,M),C(D,M),D.push(n.outputEncoding)),D.push(M.customProgramCacheKey),D.join()}function b(M,D){M.push(D.precision),M.push(D.outputEncoding),M.push(D.envMapMode),M.push(D.combine),M.push(D.vertexUvs),M.push(D.fogExp2),M.push(D.sizeAttenuation),M.push(D.maxBones),M.push(D.morphTargetsCount),M.push(D.numDirLights),M.push(D.numPointLights),M.push(D.numSpotLights),M.push(D.numHemiLights),M.push(D.numRectAreaLights),M.push(D.numDirLightShadows),M.push(D.numPointLightShadows),M.push(D.numSpotLightShadows),M.push(D.shadowMapType),M.push(D.toneMapping),M.push(D.numClippingPlanes),M.push(D.numClipIntersection),M.push(D.alphaWrite)}function C(M,D){o.disableAll(),D.isWebGL2&&o.enable(0),D.supportsVertexTextures&&o.enable(1),D.instancing&&o.enable(2),D.instancingColor&&o.enable(3),D.map&&o.enable(4),D.matcap&&o.enable(5),D.envMap&&o.enable(6),D.envMapCubeUV&&o.enable(7),D.lightMap&&o.enable(8),D.aoMap&&o.enable(9),D.emissiveMap&&o.enable(10),D.bumpMap&&o.enable(11),D.normalMap&&o.enable(12),D.objectSpaceNormalMap&&o.enable(13),D.tangentSpaceNormalMap&&o.enable(14),D.clearcoat&&o.enable(15),D.clearcoatMap&&o.enable(16),D.clearcoatRoughnessMap&&o.enable(17),D.clearcoatNormalMap&&o.enable(18),D.displacementMap&&o.enable(19),D.specularMap&&o.enable(20),D.roughnessMap&&o.enable(21),D.metalnessMap&&o.enable(22),D.gradientMap&&o.enable(23),D.alphaMap&&o.enable(24),D.alphaTest&&o.enable(25),D.vertexColors&&o.enable(26),D.vertexAlphas&&o.enable(27),D.vertexUvs&&o.enable(28),D.vertexTangents&&o.enable(29),D.uvsVertexOnly&&o.enable(30),D.fog&&o.enable(31),M.push(o.mask),o.disableAll(),D.useFog&&o.enable(0),D.flatShading&&o.enable(1),D.logarithmicDepthBuffer&&o.enable(2),D.skinning&&o.enable(3),D.useVertexTexture&&o.enable(4),D.morphTargets&&o.enable(5),D.morphNormals&&o.enable(6),D.premultipliedAlpha&&o.enable(7),D.shadowMapEnabled&&o.enable(8),D.physicallyCorrectLights&&o.enable(9),D.doubleSided&&o.enable(10),D.flipSided&&o.enable(11),D.depthPacking&&o.enable(12),D.dithering&&o.enable(13),D.specularIntensityMap&&o.enable(14),D.specularColorMap&&o.enable(15),D.transmission&&o.enable(16),D.transmissionMap&&o.enable(17),D.thicknessMap&&o.enable(18),D.sheen&&o.enable(19),D.sheenColorMap&&o.enable(20),D.sheenRoughnessMap&&o.enable(21),D.decodeVideoTexture&&o.enable(22),M.push(o.mask)}function E(M){let D=x[M.type],z;if(D){let H=W2[D];z=U8.clone(H.uniforms)}else z=M.uniforms;return z}function T(M,D){let z;for(let H=0,V=l.length;H0?i.push(p):m.transparent===!0?a.push(p):t.push(p)}function c(f,h,m,v,g,x){let p=s(f,h,m,v,g,x);m.transmission>0?i.unshift(p):m.transparent===!0?a.unshift(p):t.unshift(p)}function l(f,h){t.length>1&&t.sort(f||$u),i.length>1&&i.sort(h||oo),a.length>1&&a.sort(h||oo)}function u(){for(let f=e,h=n.length;f=n.get(i).length?(r=new co,n.get(i).push(r)):r=n.get(i)[a],r}function t(){n=new WeakMap}return{get:e,dispose:t}}function Ku(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new x1};break;case"SpotLight":t={position:new k,direction:new k,color:new x1,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new x1,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new x1,groundColor:new x1};break;case"RectAreaLight":t={color:new x1,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function Ju(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}var Qu=0;function eh(n,e){return(e.castShadow?1:0)-(n.castShadow?1:0)}function uo(n,e){let t=new Ku,i=Ju(),a={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let u=0;u<9;u++)a.probe.push(new k);let r=new k,s=new k1,o=new k1;function c(u,f){let h=0,m=0,v=0;for(let P=0;P<9;P++)a.probe[P].set(0,0,0);let g=0,x=0,p=0,d=0,A=0,b=0,C=0,E=0;u.sort(eh);let T=f!==!0?Math.PI:1;for(let P=0,F=u.length;P0&&(e.isWebGL2?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_HALF_1,a.rectAreaLTC2=e1.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),a.ambient[0]=h,a.ambient[1]=m,a.ambient[2]=v;let _=a.hash;(_.directionalLength!==g||_.pointLength!==x||_.spotLength!==p||_.rectAreaLength!==d||_.hemiLength!==A||_.numDirectionalShadows!==b||_.numPointShadows!==C||_.numSpotShadows!==E)&&(a.directional.length=g,a.spot.length=p,a.rectArea.length=d,a.point.length=x,a.hemi.length=A,a.directionalShadow.length=b,a.directionalShadowMap.length=b,a.pointShadow.length=C,a.pointShadowMap.length=C,a.spotShadow.length=E,a.spotShadowMap.length=E,a.directionalShadowMatrix.length=b,a.pointShadowMatrix.length=C,a.spotShadowMatrix.length=E,_.directionalLength=g,_.pointLength=x,_.spotLength=p,_.rectAreaLength=d,_.hemiLength=A,_.numDirectionalShadows=b,_.numPointShadows=C,_.numSpotShadows=E,a.version=Qu++)}function l(u,f){let h=0,m=0,v=0,g=0,x=0,p=f.matrixWorldInverse;for(let d=0,A=u.length;d=t.get(r).length?(o=new ho(n,e),t.get(r).push(o)):o=t.get(r)[s],o}function a(){t=new WeakMap}return{get:i,dispose:a}}var l0=class extends T2{constructor(e){super();this.type="MeshDepthMaterial",this.depthPacking=A8,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};l0.prototype.isMeshDepthMaterial=!0;var u0=class extends T2{constructor(e){super();this.type="MeshDistanceMaterial",this.referencePosition=new k,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};u0.prototype.isMeshDistanceMaterial=!0;var po=` void main() { gl_Position = vec4( position, 1.0 ); @@ -5728,13 +5729,13 @@ void main() { gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); } -`;function vo(n,e,t){let i=new T4,a=new z1,r=new z1,s=new q1,o=new c0({depthPacking:w8}),c=new l0,l={},u=t.maxTextureSize,f={0:P1,1:Ie,2:J2},h=new se({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new z1},radius:{value:4}},vertexShader:po,fragmentShader:mo}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let v=new b2;v.setAttribute("position",new M2(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new l2(v,h),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w6,this.render=function(b,C,E){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||b.length===0)return;let T=n.getRenderTarget(),_=n.getActiveCubeFace(),P=n.getActiveMipmapLevel(),F=n.state;F.setBlending(U2),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);for(let M=0,D=b.length;Mu||a.y>u)&&(a.x>u&&(r.x=Math.floor(u/V.x),a.x=r.x*V.x,H.mapSize.x=r.x),a.y>u&&(r.y=Math.floor(u/V.y),a.y=r.y*V.y,H.mapSize.y=r.y)),H.map===null&&!H.isPointLightShadow&&this.type===z4){let N={minFilter:t2,magFilter:t2,format:W1};H.map=new p2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.mapPass=new p2(a.x,a.y,N),H.camera.updateProjectionMatrix()}if(H.map===null){let N={minFilter:e2,magFilter:e2,format:W1};H.map=new p2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.camera.updateProjectionMatrix()}n.setRenderTarget(H.map),n.clear();let L=H.getViewportCount();for(let N=0;N0){let z=M.uuid,H=E.uuid,V=l[z];V===void 0&&(V={},l[z]=V);let L=V[H];L===void 0&&(L=M.clone(),V[H]=L),M=L}return M.visible=E.visible,M.wireframe=E.wireframe,F===z4?M.side=E.shadowSide!==null?E.shadowSide:E.side:M.side=E.shadowSide!==null?E.shadowSide:f[E.side],M.alphaMap=E.alphaMap,M.alphaTest=E.alphaTest,M.clipShadows=E.clipShadows,M.clippingPlanes=E.clippingPlanes,M.clipIntersection=E.clipIntersection,M.displacementMap=E.displacementMap,M.displacementScale=E.displacementScale,M.displacementBias=E.displacementBias,M.wireframeLinewidth=E.wireframeLinewidth,M.linewidth=E.linewidth,T.isPointLight===!0&&M.isMeshDistanceMaterial===!0&&(M.referencePosition.setFromMatrixPosition(T.matrixWorld),M.nearDistance=_,M.farDistance=P),M}function A(b,C,E,T,_){if(b.visible===!1)return;if(b.layers.test(C.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&_===z4)&&(!b.frustumCulled||i.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(E.matrixWorldInverse,b.matrixWorld);let M=e.update(b),D=b.material;if(Array.isArray(D)){let z=M.groups;for(let H=0,V=z.length;H=1):L.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),H=V>=2);let N=null,U={},Z=n.getParameter(n.SCISSOR_BOX),O=n.getParameter(n.VIEWPORT),W=new q1().fromArray(Z),X=new q1().fromArray(O);function Q(I,l1,o1){let m1=new Uint8Array(4),$=n.createTexture();n.bindTexture(I,$),n.texParameteri(I,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(I,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let p1=0;p1t1||R.height>t1)&&(h1=t1/Math.max(R.width,R.height)),h1<1||w===!0)if(typeof HTMLImageElement!="undefined"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&R instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap){let Y=w?Dr:Math.floor,d1=Y(h1*R.width),f1=Y(h1*R.height);g===void 0&&(g=m(d1,f1));let s1=J?m(d1,f1):g;return s1.width=d1,s1.height=f1,s1.getContext("2d").drawImage(R,0,0,d1,f1),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+R.width+"x"+R.height+") to ("+d1+"x"+f1+")."),s1}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+R.width+"x"+R.height+")."),R;return R}function A(R){return e3(R.width)&&e3(R.height)}function b(R){return o?!1:R.wrapS!==o2||R.wrapT!==o2||R.minFilter!==e2&&R.minFilter!==t2}function C(R,w){return R.generateMipmaps&&w&&R.minFilter!==e2&&R.minFilter!==t2}function E(R){n.generateMipmap(R)}function T(R,w,J,t1,h1=!1){if(o===!1)return w;if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let Y=w;return w===n.RED&&(J===n.FLOAT&&(Y=n.R32F),J===n.HALF_FLOAT&&(Y=n.R16F),J===n.UNSIGNED_BYTE&&(Y=n.R8)),w===n.RG&&(J===n.FLOAT&&(Y=n.RG32F),J===n.HALF_FLOAT&&(Y=n.RG16F),J===n.UNSIGNED_BYTE&&(Y=n.RG8)),w===n.RGBA&&(J===n.FLOAT&&(Y=n.RGBA32F),J===n.HALF_FLOAT&&(Y=n.RGBA16F),J===n.UNSIGNED_BYTE&&(Y=t1===I1&&h1===!1?n.SRGB8_ALPHA8:n.RGBA8),J===n.UNSIGNED_SHORT_4_4_4_4&&(Y=n.RGBA4),J===n.UNSIGNED_SHORT_5_5_5_1&&(Y=n.RGB5_A1)),(Y===n.R16F||Y===n.R32F||Y===n.RG16F||Y===n.RG32F||Y===n.RGBA16F||Y===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Y}function _(R,w,J){return C(R,J)===!0||R.isFramebufferTexture&&R.minFilter!==e2&&R.minFilter!==t2?Math.log2(Math.max(w.width,w.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?w.mipmaps.length:1}function P(R){return R===e2||R===h3||R===f3?n.NEAREST:n.LINEAR}function F(R){let w=R.target;w.removeEventListener("dispose",F),D(w),w.isVideoTexture&&v.delete(w),s.memory.textures--}function M(R){let w=R.target;w.removeEventListener("dispose",M),z(w)}function D(R){let w=i.get(R);w.__webglInit!==void 0&&(n.deleteTexture(w.__webglTexture),i.remove(R))}function z(R){let w=R.texture,J=i.get(R),t1=i.get(w);if(!!R){if(t1.__webglTexture!==void 0&&(n.deleteTexture(t1.__webglTexture),s.memory.textures--),R.depthTexture&&R.depthTexture.dispose(),R.isWebGLCubeRenderTarget)for(let h1=0;h1<6;h1++)n.deleteFramebuffer(J.__webglFramebuffer[h1]),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer[h1]);else n.deleteFramebuffer(J.__webglFramebuffer),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer),J.__webglMultisampledFramebuffer&&n.deleteFramebuffer(J.__webglMultisampledFramebuffer),J.__webglColorRenderbuffer&&n.deleteRenderbuffer(J.__webglColorRenderbuffer),J.__webglDepthRenderbuffer&&n.deleteRenderbuffer(J.__webglDepthRenderbuffer);if(R.isWebGLMultipleRenderTargets)for(let h1=0,Y=w.length;h1=c&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+c),H+=1,R}function N(R,w){let J=i.get(R);if(R.isVideoTexture&&j2(R),R.version>0&&J.__version!==R.version){let t1=R.image;if(t1===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(t1.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{B(J,R,w);return}}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D,J.__webglTexture)}function U(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D_ARRAY,J.__webglTexture)}function Z(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_3D,J.__webglTexture)}function O(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){M1(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_CUBE_MAP,J.__webglTexture)}let W={[Ht]:n.REPEAT,[o2]:n.CLAMP_TO_EDGE,[Vt]:n.MIRRORED_REPEAT},X={[e2]:n.NEAREST,[h3]:n.NEAREST_MIPMAP_NEAREST,[f3]:n.NEAREST_MIPMAP_LINEAR,[t2]:n.LINEAR,[l8]:n.LINEAR_MIPMAP_NEAREST,[r4]:n.LINEAR_MIPMAP_LINEAR};function Q(R,w,J){if(J?(n.texParameteri(R,n.TEXTURE_WRAP_S,W[w.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,W[w.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,W[w.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,X[w.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,X[w.minFilter])):(n.texParameteri(R,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(R,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(w.wrapS!==o2||w.wrapT!==o2)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(R,n.TEXTURE_MAG_FILTER,P(w.magFilter)),n.texParameteri(R,n.TEXTURE_MIN_FILTER,P(w.minFilter)),w.minFilter!==e2&&w.minFilter!==t2&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let t1=e.get("EXT_texture_filter_anisotropic");if(w.type===Q2&&e.has("OES_texture_float_linear")===!1||o===!1&&w.type===ye&&e.has("OES_texture_half_float_linear")===!1)return;(w.anisotropy>1||i.get(w).__currentAnisotropy)&&(n.texParameterf(R,t1.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(w.anisotropy,a.getMaxAnisotropy())),i.get(w).__currentAnisotropy=w.anisotropy)}}function a1(R,w){R.__webglInit===void 0&&(R.__webglInit=!0,w.addEventListener("dispose",F),R.__webglTexture=n.createTexture(),s.memory.textures++)}function B(R,w,J){let t1=n.TEXTURE_2D;w.isDataTexture2DArray&&(t1=n.TEXTURE_2D_ARRAY),w.isDataTexture3D&&(t1=n.TEXTURE_3D),a1(R,w),t.activeTexture(n.TEXTURE0+J),t.bindTexture(t1,R.__webglTexture),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,w.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,w.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);let h1=b(w)&&A(w.image)===!1,Y=d(w.image,h1,!1,u);Y=m2(w,Y);let d1=A(Y)||o,f1=r.convert(w.format,w.encoding),s1=r.convert(w.type),r1=T(w.internalFormat,f1,s1,w.encoding,w.isVideoTexture);Q(t1,w,d1);let b1,I=w.mipmaps,l1=o&&w.isVideoTexture!==!0,o1=R.__version===void 0,m1=_(w,Y,d1);if(w.isDepthTexture)r1=n.DEPTH_COMPONENT,o?w.type===Q2?r1=n.DEPTH_COMPONENT32F:w.type===q4?r1=n.DEPTH_COMPONENT24:w.type===Ce?r1=n.DEPTH24_STENCIL8:r1=n.DEPTH_COMPONENT16:w.type===Q2&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),w.format===ee&&r1===n.DEPTH_COMPONENT&&w.type!==Ue&&w.type!==q4&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),w.type=Ue,s1=r.convert(w.type)),w.format===ze&&r1===n.DEPTH_COMPONENT&&(r1=n.DEPTH_STENCIL,w.type!==Ce&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),w.type=Ce,s1=r.convert(w.type))),l1&&o1?t.texStorage2D(n.TEXTURE_2D,1,r1,Y.width,Y.height):t.texImage2D(n.TEXTURE_2D,0,r1,Y.width,Y.height,0,f1,s1,null);else if(w.isDataTexture)if(I.length>0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&o1++,t.texStorage2D(n.TEXTURE_CUBE_MAP,o1,b1,Y[0].width,Y[0].height));for(let $=0;$<6;$++)if(h1){I?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,0,0,Y[$].width,Y[$].height,s1,r1,Y[$].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,b1,Y[$].width,Y[$].height,0,s1,r1,Y[$].data);for(let p1=0;p1p+v?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&h<=p-v&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));return o!==null&&(o.visible=a!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=s!==null),this}};var jt=class extends K1{constructor(e,t,i,a,r,s,o,c,l,u){if(u=u!==void 0?u:ee,u!==ee&&u!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===ee&&(i=Ue),i===void 0&&u===ze&&(i=Ce);super(null,a,r,s,o,c,u,i,l);this.image={width:e,height:t},this.magFilter=o!==void 0?o:e2,this.minFilter=c!==void 0?c:e2,this.flipY=!1,this.generateMipmaps=!1}};jt.prototype.isDepthTexture=!0;var Ti=class extends F2{constructor(e,t){super();let i=this,a=null,r=1,s=null,o="local-floor",c=e.extensions.has("WEBGL_multisampled_render_to_texture"),l=null,u=null,f=null,h=null,p=!1,v=null,g=t.getContextAttributes(),x=null,m=null,d=[],A=new Map,b=new i2;b.layers.enable(1),b.viewport=new q1;let C=new i2;C.layers.enable(2),C.viewport=new q1;let E=[b,C],T=new u0;T.layers.enable(1),T.layers.enable(2);let _=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getTargetRaySpace()},this.getControllerGrip=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getGripSpace()},this.getHand=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getHandSpace()};function F(O){let W=A.get(O.inputSource);W&&W.dispatchEvent({type:O.type,data:O.inputSource})}function M(){A.forEach(function(O,W){O.disconnect(W)}),A.clear(),_=null,P=null,e.setRenderTarget(x),h=null,f=null,u=null,a=null,m=null,Z.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(O){r=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(O){o=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){return u},this.getFrame=function(){return v},this.getSession=function(){return a},this.setSession=async function(O){if(a=O,a!==null){if(x=e.getRenderTarget(),a.addEventListener("select",F),a.addEventListener("selectstart",F),a.addEventListener("selectend",F),a.addEventListener("squeeze",F),a.addEventListener("squeezestart",F),a.addEventListener("squeezeend",F),a.addEventListener("end",M),a.addEventListener("inputsourceschange",D),g.xrCompatible!==!0&&await t.makeXRCompatible(),a.renderState.layers===void 0||e.capabilities.isWebGL2===!1){let W={antialias:a.renderState.layers===void 0?g.antialias:!0,alpha:g.alpha,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(a,t,W),a.updateRenderState({baseLayer:h}),m=new p2(h.framebufferWidth,h.framebufferHeight,{format:W1,type:N2,encoding:e.outputEncoding})}else{p=g.antialias;let W=null,X=null,Q=null;g.depth&&(Q=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,W=g.stencil?ze:ee,X=g.stencil?Ce:Ue);let a1={colorFormat:e.outputEncoding===I1?t.SRGB8_ALPHA8:t.RGBA8,depthFormat:Q,scaleFactor:r};u=new XRWebGLBinding(a,t),f=u.createProjectionLayer(a1),a.updateRenderState({layers:[f]}),p?m=new ft(f.textureWidth,f.textureHeight,{format:W1,type:N2,depthTexture:new jt(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,useRenderToTexture:c,encoding:e.outputEncoding}):m=new p2(f.textureWidth,f.textureHeight,{format:W1,type:N2,depthTexture:new jt(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,encoding:e.outputEncoding})}m.isXRRenderTarget=!0,this.setFoveation(1),s=await a.requestReferenceSpace(o),Z.setContext(a),Z.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function D(O){let W=a.inputSources;for(let X=0;X0&&(m.alphaTest.value=d.alphaTest);let A=n.get(d).envMap;A&&(m.envMap.value=A,m.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=d.reflectivity,m.ior.value=d.ior,m.refractionRatio.value=d.refractionRatio),d.lightMap&&(m.lightMap.value=d.lightMap,m.lightMapIntensity.value=d.lightMapIntensity),d.aoMap&&(m.aoMap.value=d.aoMap,m.aoMapIntensity.value=d.aoMapIntensity);let b;d.map?b=d.map:d.specularMap?b=d.specularMap:d.displacementMap?b=d.displacementMap:d.normalMap?b=d.normalMap:d.bumpMap?b=d.bumpMap:d.roughnessMap?b=d.roughnessMap:d.metalnessMap?b=d.metalnessMap:d.alphaMap?b=d.alphaMap:d.emissiveMap?b=d.emissiveMap:d.clearcoatMap?b=d.clearcoatMap:d.clearcoatNormalMap?b=d.clearcoatNormalMap:d.clearcoatRoughnessMap?b=d.clearcoatRoughnessMap:d.specularIntensityMap?b=d.specularIntensityMap:d.specularColorMap?b=d.specularColorMap:d.transmissionMap?b=d.transmissionMap:d.thicknessMap?b=d.thicknessMap:d.sheenColorMap?b=d.sheenColorMap:d.sheenRoughnessMap&&(b=d.sheenRoughnessMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),m.uvTransform.value.copy(b.matrix));let C;d.aoMap?C=d.aoMap:d.lightMap&&(C=d.lightMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),m.uv2Transform.value.copy(C.matrix))}function a(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity}function r(m,d){m.dashSize.value=d.dashSize,m.totalSize.value=d.dashSize+d.gapSize,m.scale.value=d.scale}function s(m,d,A,b){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.size.value=d.size*A,m.scale.value=b*.5,d.map&&(m.map.value=d.map),d.alphaMap&&(m.alphaMap.value=d.alphaMap),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest);let C;d.map?C=d.map:d.alphaMap&&(C=d.alphaMap),C!==void 0&&(C.matrixAutoUpdate===!0&&C.updateMatrix(),m.uvTransform.value.copy(C.matrix))}function o(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.rotation.value=d.rotation,d.map&&(m.map.value=d.map),d.alphaMap&&(m.alphaMap.value=d.alphaMap),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest);let A;d.map?A=d.map:d.alphaMap&&(A=d.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),m.uvTransform.value.copy(A.matrix))}function c(m,d){d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap)}function l(m,d){m.specular.value.copy(d.specular),m.shininess.value=Math.max(d.shininess,1e-4),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function u(m,d){d.gradientMap&&(m.gradientMap.value=d.gradientMap),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function f(m,d){m.roughness.value=d.roughness,m.metalness.value=d.metalness,d.roughnessMap&&(m.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(m.metalnessMap.value=d.metalnessMap),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias),n.get(d).envMap&&(m.envMapIntensity.value=d.envMapIntensity)}function h(m,d,A){f(m,d),m.ior.value=d.ior,d.sheen>0&&(m.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),m.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(m.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(m.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(m.clearcoat.value=d.clearcoat,m.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(m.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(m.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),m.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===P1&&m.clearcoatNormalScale.value.negate())),d.transmission>0&&(m.transmission.value=d.transmission,m.transmissionSamplerMap.value=A.texture,m.transmissionSamplerSize.value.set(A.width,A.height),d.transmissionMap&&(m.transmissionMap.value=d.transmissionMap),m.thickness.value=d.thickness,d.thicknessMap&&(m.thicknessMap.value=d.thicknessMap),m.attenuationDistance.value=d.attenuationDistance,m.attenuationColor.value.copy(d.attenuationColor)),m.specularIntensity.value=d.specularIntensity,m.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(m.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(m.specularColorMap.value=d.specularColorMap)}function p(m,d){d.matcap&&(m.matcap.value=d.matcap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function v(m,d){d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function g(m,d){d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias),m.referencePosition.value.copy(d.referencePosition),m.nearDistance.value=d.nearDistance,m.farDistance.value=d.farDistance}function x(m,d){d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function ih(){let n=E4("canvas");return n.style.display="block",n}function Hi(n={}){let e=n.canvas!==void 0?n.canvas:ih(),t=n.context!==void 0?n.context:null,i=n.alpha!==void 0?n.alpha:!1,a=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,c=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1,f=null,h=null,p=[],v=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=R2,this.physicallyCorrectLights=!1,this.toneMapping=O2,this.toneMappingExposure=1;let g=this,x=!1,m=0,d=0,A=null,b=-1,C=null,E=new q1,T=new q1,_=null,P=e.width,F=e.height,M=1,D=null,z=null,H=new q1(0,0,P,F),V=new q1(0,0,P,F),L=!1,N=new T4,U=!1,Z=!1,O=null,W=new k1,X=new k,Q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function a1(){return A===null?M:1}let B=t;function M1(S,G){for(let j=0;j0?h=v[v.length-1]:h=null,p.pop(),p.length>0?f=p[p.length-1]:f=null};function Y1(S,G,j,q){if(S.visible===!1)return;if(S.layers.test(G.layers)){if(S.isGroup)j=S.renderOrder;else if(S.isLOD)S.autoUpdate===!0&&S.update(G);else if(S.isLight)h.pushLight(S),S.castShadow&&h.pushShadow(S);else if(S.isSprite){if(!S.frustumCulled||N.intersectsSprite(S)){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=m2.update(S),E1=S.material;E1.visible&&f.push(S,y1,E1,j,X.z,null)}}else if((S.isMesh||S.isLine||S.isPoints)&&(S.isSkinnedMesh&&S.skeleton.frame!==T1.render.frame&&(S.skeleton.update(),S.skeleton.frame=T1.render.frame),!S.frustumCulled||N.intersectsObject(S))){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=m2.update(S),E1=S.material;if(Array.isArray(E1)){let w1=y1.groups;for(let B1=0,H1=w1.length;B10&&_e(K,G,j),q&&n1.viewport(E.copy(q)),K.length>0&&Yt(K,G,j),g1.length>0&&Yt(g1,G,j),y1.length>0&&Yt(y1,G,j)}function _e(S,G,j){if(O===null){let y1=s===!0&&v1.isWebGL2===!0?ft:p2;O=new y1(1024,1024,{generateMipmaps:!0,type:d1.convert(ye)!==null?ye:N2,minFilter:r4,magFilter:e2,wrapS:o2,wrapT:o2,useRenderToTexture:u1.has("WEBGL_multisampled_render_to_texture")})}let q=g.getRenderTarget();g.setRenderTarget(O),g.clear();let K=g.toneMapping;g.toneMapping=O2,Yt(S,G,j),g.toneMapping=K,C1.updateMultisampleRenderTarget(O),C1.updateRenderTargetMipmap(O),g.setRenderTarget(q)}function Yt(S,G,j){let q=G.isScene===!0?G.overrideMaterial:null;for(let K=0,g1=S.length;K=0&&G<=S.width-q&&j>=0&&j<=S.height-K&&B.readPixels(G,j,q,K,d1.convert(B1),d1.convert(H1),g1):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let w1=A!==null?A1.get(A).__webglFramebuffer:null;n1.bindFramebuffer(B.FRAMEBUFFER,w1)}}},this.copyFramebufferToTexture=function(S,G,j=0){if(G.isFramebufferTexture!==!0){console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");return}let q=Math.pow(2,-j),K=Math.floor(G.image.width*q),g1=Math.floor(G.image.height*q);C1.setTexture2D(G,0),B.copyTexSubImage2D(B.TEXTURE_2D,j,0,0,S.x,S.y,K,g1),n1.unbindTexture()},this.copyTextureToTexture=function(S,G,j,q=0){let K=G.image.width,g1=G.image.height,y1=d1.convert(j.format),E1=d1.convert(j.type);C1.setTexture2D(j,0),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,j.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,j.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,j.unpackAlignment),G.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,K,g1,y1,E1,G.image.data):G.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,q,S.x,S.y,G.mipmaps[0].width,G.mipmaps[0].height,y1,G.mipmaps[0].data):B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,y1,E1,G.image),q===0&&j.generateMipmaps&&B.generateMipmap(B.TEXTURE_2D),n1.unbindTexture()},this.copyTextureToTexture3D=function(S,G,j,q,K=0){if(g.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let g1=S.max.x-S.min.x+1,y1=S.max.y-S.min.y+1,E1=S.max.z-S.min.z+1,w1=d1.convert(q.format),B1=d1.convert(q.type),H1;if(q.isDataTexture3D)C1.setTexture3D(q,0),H1=B.TEXTURE_3D;else if(q.isDataTexture2DArray)C1.setTexture2DArray(q,0),H1=B.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,q.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,q.unpackAlignment);let V1=B.getParameter(B.UNPACK_ROW_LENGTH),$1=B.getParameter(B.UNPACK_IMAGE_HEIGHT),p4=B.getParameter(B.UNPACK_SKIP_PIXELS),R4=B.getParameter(B.UNPACK_SKIP_ROWS),R1=B.getParameter(B.UNPACK_SKIP_IMAGES),ue=j.isCompressedTexture?j.mipmaps[0]:j.image;B.pixelStorei(B.UNPACK_ROW_LENGTH,ue.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,ue.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,S.min.x),B.pixelStorei(B.UNPACK_SKIP_ROWS,S.min.y),B.pixelStorei(B.UNPACK_SKIP_IMAGES,S.min.z),j.isDataTexture||j.isDataTexture3D?B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,B1,ue.data):j.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),B.compressedTexSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,ue.data)):B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,B1,ue),B.pixelStorei(B.UNPACK_ROW_LENGTH,V1),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,$1),B.pixelStorei(B.UNPACK_SKIP_PIXELS,p4),B.pixelStorei(B.UNPACK_SKIP_ROWS,R4),B.pixelStorei(B.UNPACK_SKIP_IMAGES,R1),K===0&&q.generateMipmaps&&B.generateMipmap(H1),n1.unbindTexture()},this.initTexture=function(S){C1.setTexture2D(S,0),n1.unbindTexture()},this.resetState=function(){m=0,d=0,A=null,n1.reset(),f1.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Hi.prototype.isWebGLRenderer=!0;var h0=class extends j1{constructor(){super();this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};h0.prototype.isScene=!0;var pt=class extends j1{constructor(e,t=1){super();this.type="Light",this.color=new x1(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}};pt.prototype.isLight=!0;var f0=class extends pt{constructor(e,t){super(e,t);this.type="AmbientLight"}};f0.prototype.isAmbientLight=!0;var yo=new k1,Co=new k,zo=new k,Vi=class{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new z1(512,512),this.map=null,this.mapPass=null,this.matrix=new k1,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new T4,this._frameExtents=new z1(1,1),this._viewportCount=1,this._viewports=[new q1(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;Co.setFromMatrixPosition(e.matrixWorld),t.position.copy(Co),zo.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(zo),t.updateMatrixWorld(),yo.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(yo),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(t.projectionMatrix),i.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}};var d0=class extends Vi{constructor(){super(new i2(50,1,.5,500));this.focus=1}updateMatrices(e){let t=this.camera,i=_t*2*e.angle*this.focus,a=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||a!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=a,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}};d0.prototype.isSpotLightShadow=!0;var p0=class extends pt{constructor(e,t,i=0,a=Math.PI/3,r=0,s=1){super(e,t);this.type="SpotLight",this.position.copy(j1.DefaultUp),this.updateMatrix(),this.target=new j1,this.distance=i,this.angle=a,this.penumbra=r,this.decay=s,this.shadow=new d0}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}};p0.prototype.isSpotLight=!0;var m0=class extends T2{constructor(e){super();this.type="ShadowMaterial",this.color=new x1(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}};m0.prototype.isShadowMaterial=!0;var v0=class extends Xt.Component{constructor(e){super();this.plugin=e;this.event=new Xt.Events;this.container=createDiv("renderer-container");this.shadows=!0;this.iterations=0;this.frame_rate=1/60;this.animating=!1;this.factory=new wo(this.WIDTH,this.HEIGHT,this.plugin);this.colors={ambient:16777215,spotlight:16777215};this.display={currentWidth:null,currentHeight:null,containerWidth:null,containerHeight:null,aspect:null,scale:null};this.cameraHeight={max:null,close:null,medium:null,far:null};this.extraFrames=v0.DEFAULT_EXTRA_FRAMES;this.renderer=new Hi({alpha:!0,antialias:!0})}get WIDTH(){return this.container.clientWidth/2}get HEIGHT(){return this.container.clientHeight/2}get ASPECT(){return this.WIDTH/this.HEIGHT}get scale(){return(this.WIDTH*this.WIDTH+this.HEIGHT*this.HEIGHT)/13}get canvasEl(){return this.renderer?this.renderer.domElement:null}setDice(e){this.animating&&(this.unload(),this.load()),this.stack=e,this.current=this.factory.getDice(this.stack,{x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT}),this.scene.add(...[...this.current.values()].flat().map(t=>t.geometry)),this.world.add(...[...this.current.values()].flat())}onload(){this.addChild(this.factory),this.container.empty(),this.container.style.opacity="1",document.body.appendChild(this.container),this.renderer.shadowMap.enabled=this.shadows,this.renderer.shadowMap.type=S6,this.container.appendChild(this.renderer.domElement),this.renderer.setClearColor(0,0),this.scene=new h0,this.initScene(),this.registerDomEvent(window,"resize",()=>{this.initScene()}),this.initWorld()}async start(){return new Promise(async(e,t)=>{this.current.size||t(),this.event.on("throw-finished",i=>{e(i)}),this.event.on("error",i=>{t(i)}),this.animating=!0,this.extraFrames=v0.DEFAULT_EXTRA_FRAMES,this.render()})}enableShadows(){this.shadows=!0,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}disableShadows(){this.shadows=!1,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}get mw(){return Math.max(this.WIDTH,this.HEIGHT)}setDimensions(e){this.display.currentWidth=this.container.clientWidth/2,this.display.currentHeight=this.container.clientHeight/2,e?(this.display.containerWidth=e.w,this.display.containerHeight=e.h):(this.display.containerWidth=this.display.currentWidth,this.display.containerHeight=this.display.currentHeight),this.display.aspect=Math.min(this.display.currentWidth/this.display.containerWidth,this.display.currentHeight/this.display.containerHeight),this.display.scale=Math.sqrt(this.display.containerWidth*this.display.containerWidth+this.display.containerHeight*this.display.containerHeight)/13,this.renderer.setSize(this.display.currentWidth*2,this.display.currentHeight*2),this.cameraHeight.max=this.display.currentHeight/this.display.aspect/Math.tan(10*Math.PI/180),this.factory.width=this.display.currentWidth,this.factory.height=this.display.currentHeight,this.cameraHeight.medium=this.cameraHeight.max/1.5,this.cameraHeight.far=this.cameraHeight.max,this.cameraHeight.close=this.cameraHeight.max/2}initCamera(){this.camera&&this.scene.remove(this.camera),this.camera=new i2(20,this.display.currentWidth/this.display.currentHeight,1,this.cameraHeight.max*1.3),this.camera.position.z=this.cameraHeight.far,this.camera.lookAt(new k(0,0,0))}initLighting(){let e=Math.max(this.display.containerWidth,this.display.containerHeight);this.light&&this.scene.remove(this.light),this.ambientLight&&this.scene.remove(this.ambientLight),this.light=new p0(this.colors.spotlight,.25),this.light.position.set(-e/2,e/2,e*3),this.light.target.position.set(0,0,0),this.light.distance=e*5,this.light.angle=Math.PI/4,this.light.castShadow=this.shadows,this.light.shadow.camera.near=e/10,this.light.shadow.camera.far=e*5,this.light.shadow.camera.fov=50,this.light.shadow.bias=.001,this.light.shadow.mapSize.width=1024,this.light.shadow.mapSize.height=1024,this.scene.add(this.light),this.ambientLight=new f0(16777215,.9),this.scene.add(this.ambientLight)}initDesk(){this.desk&&this.scene.remove(this.desk);let e=new m0;e.opacity=.5,this.desk=new l2(new H4(this.display.containerWidth*6,this.display.containerHeight*6,1,1),e),this.desk.receiveShadow=this.shadows,this.scene.add(this.desk)}initScene(){this.setDimensions(),this.initCamera(),this.initLighting(),this.initDesk(),this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}initWorld(){this.world=new Ao(this.WIDTH,this.HEIGHT),this.iterations=0}getResultsForRoller(e){let t=this.current.get(e),i=t.filter(s=>s instanceof D4&&s.isPercentile),a=[];for(let s=0;s!(s instanceof D4&&s.isPercentile)).map(s=>s.getUpsideValue()).filter(s=>s),...a.map(([s,o])=>{let c=s.getUpsideValue();if(!o)return c;let l=o.getUpsideValue();return c===10&&l==10?100:(l==10&&(l=0),c==10&&(c=0),c*10+l)}).filter(s=>s)]}returnResult(){for(let e of this.stack.dynamic){if(!this.current.has(e))continue;let t=this.getResultsForRoller(e);!t||e.setResults(t)}this.event.trigger("throw-finished",this.stack)}unrender(e=this){e.container.style.opacity="0",e.registerInterval(window.setTimeout(()=>{e.animating=!1,e.unload()},1e3))}render(){if(this.throwFinished())if(this.extraFrames>10)this.extraFrames--;else{try{for(let[e,t]of this.current)if(!(!e.modifiers.size||!this.getResultsForRoller(e))&&e.modifiers.has("r")){let a=t.filter(r=>(e.conditions.length||e.conditions.push({operator:"=",comparer:e.faces.min,value:""}),e.checkCondition(r.result,e.conditions)&&r.rerolled{r.rerolled++;let s={x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT};r.vector=r.generateVector(s),r.create(),r.set(),r.stopped=!1}),this.animation=requestAnimationFrame(()=>this.render());return}}if(this.returnResult(),this.plugin.data.renderTime)this.registerInterval(window.setTimeout(()=>this.unrender(),this.plugin.data.renderTime));else{let t=function(){e.unrender(e),document.body.removeEventListener("click",t)},e=this;this.registerDomEvent(document.body,"click",t)}}catch(e){this.event.trigger("error",e)}return}this.animation=requestAnimationFrame(()=>this.render()),this.world.step(this.frame_rate),this.iterations++,this.current.forEach(e=>{e.map(t=>t.set())}),this.renderer.render(this.scene,this.camera)}dispose(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.dispose(...t.children)})}detach(){}onunload(){cancelAnimationFrame(this.animation),this.container.detach(),this.container.empty(),this.renderer.domElement.detach(),this.renderer.dispose(),this.factory.dispose(),this.ambientLight.dispose(),this.light.dispose(),this.scene.children.forEach(e=>this.dispose(e)),this.scene.remove(this.scene,...this.scene.children,...[...this.current.values()].flat().map(e=>e.geometry)),this.current.forEach(e=>{e.forEach(t=>{[...Array.isArray(t.geometry.material)?t.geometry.material:[t.geometry.material]].forEach(a=>a&&a.dispose()),this.world.world.removeBody(t.body)})}),this.current=new Map}onThrowFinished(){}throwFinished(){let e=!0,t=4;if(this.iterations<10/this.frame_rate)for(let i of this.current.values())for(let a of i){if(a.stopped===!0)continue;let r=a.body.angularVelocity,s=a.body.velocity;if(Math.abs(r.x)3){a.stopped=!0;continue}}else a.stopped=this.iterations;e=!1}else a.stopped=void 0,e=!1}return e}},Zt=v0;Zt.DEFAULT_EXTRA_FRAMES=30;var Ao=class{constructor(e,t){this.WIDTH=e;this.HEIGHT=t;this.world=new J0({gravity:new y(0,0,-9.82*400)});this.ground=this.getPlane();this.diceMaterial=new He;this.deskMaterial=new He;this.barrierMaterial=new He;this.world.broadphase=new p6,this.world.allowSleep=!0,this.ground.position.set(0,0,0),this.world.addBody(this.ground),this.buildWalls()}add(...e){e.forEach(t=>{this.world.addBody(t.body)})}step(e=1/60){let t=performance.now()/1e3;if(!this.lastCallTime)this.world.step(e);else{let i=t-this.lastCallTime;this.world.step(e,i)}this.lastCallTime=t}buildWalls(){this.world.addContactMaterial(new Te(this.deskMaterial,this.diceMaterial,{friction:.01,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Te(this.barrierMaterial,this.diceMaterial,{friction:.01,restitution:1,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Te(this.diceMaterial,this.diceMaterial,{friction:.1,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addBody(new i1({allowSleep:!1,mass:0,shape:new t4,material:this.deskMaterial}));let e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial});e.quaternion.setFromAxisAngle(new y(1,0,0),Math.PI/2),e.position.set(0,this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(1,0,0),-Math.PI/2),e.position.set(0,-this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),-Math.PI/2),e.position.set(this.WIDTH*.93,0,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),Math.PI/2),e.position.set(-this.WIDTH*.93,0,0),this.world.addBody(e)}getPlane(){return new i1({type:i1.STATIC,shape:new t4})}},wo=class extends Xt.Component{constructor(e,t,i){super();this.width=e;this.height=t;this.plugin=i;this.dice={};this.buildDice()}get colors(){return{diceColor:this.plugin.data.diceColor,textColor:this.plugin.data.textColor}}updateColors(){this.dispose(),this.buildDice()}onunload(){this.dispose()}disposeChildren(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.disposeChildren(...t.children)})}dispose(){for(let e of Object.values(this.dice))this.disposeChildren(e.geometry.children)}getDiceForRoller(e,t){let i=[];switch(e.faces.max){case 4:{i.push(...new Array(e.rolls).fill(0).map(a=>new yi(this.width,this.height,this.clone("d4"),t)));break}case 1:case 6:{i.push(...new Array(e.rolls).fill(0).map(a=>new bi(this.width,this.height,e.fudge?this.clone("fudge"):this.clone("d6"),t)));break}case 8:{i.push(...new Array(e.rolls).fill(0).map(a=>new Mi(this.width,this.height,this.clone("d8"),t)));break}case 10:{i.push(...new Array(e.rolls).fill(0).map(a=>new D4(this.width,this.height,this.clone("d10"),t)));break}case 12:{i.push(...new Array(e.rolls).fill(0).map(a=>new xi(this.width,this.height,this.clone("d12"),t)));break}case 20:{i.push(...new Array(e.rolls).fill(0).map(a=>new gi(this.width,this.height,this.clone("d20"),t)));break}case 100:{i.push(...new Array(e.rolls).fill(0).map(a=>[new D4(this.width,this.height,this.clone("d100"),t,!0),new D4(this.width,this.height,this.clone("d10"),t,!0)]).flat());break}}return i}getDice(e,t){let i=new Map;for(let a of e.dynamic){let r=this.getDiceForRoller(a,t);r.length&&i.set(a,r)}return i}clone(e){if(!(e in this.dice))throw new Error("That dice type does not exist!");return this.dice[e].clone()}buildDice(){this.dice.d100=new ai(this.width,this.height,this.colors).create(),this.dice.d20=new ei(this.width,this.height,this.colors).create(),this.dice.d12=new ti(this.width,this.height,this.colors).create(),this.dice.d10=new ii(this.width,this.height,this.colors).create(),this.dice.d8=new ri(this.width,this.height,this.colors).create(),this.dice.d6=new ni(this.width,this.height,this.colors).create(),this.dice.d4=new oi(this.width,this.height,this.colors).create(),this.dice.fudge=new si(this.width,this.height,this.colors).create(),this.dice.boost=new mi(this.width,this.height,this.colors).create(),this.dice.ability=new fi(this.width,this.height,this.colors).create(),this.dice.difficulty=new di(this.width,this.height,this.colors).create(),this.dice.challenge=new ui(this.width,this.height,this.colors).create(),this.dice.proficiency=new li(this.width,this.height,this.colors).create(),this.dice.setback=new vi(this.width,this.height,this.colors).create()}};var Eo=w2(_o());var Ni=class{constructor(e){this.table=e}parse(e){let t=e.length,i=this.table,a=[],r=[],s=0;for(;sf||u===f&&l.associativity==="right")break;a.push(r.shift())}r.unshift(o)}else a.push(o)}}for(;r.length;){let o=r.shift();if(o.value!=="(")a.push(o);else throw new Error("Mismatched parentheses.")}return a}};var ah=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?(?:\|(?:[^+-]+))?/u,rh=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?\|link/u,nh=/(?:.*)?(?:\[.*\]\(|\[\[)(?:.+?)#?\^(?:.+?)(?:\)|\]\])\|?(?:.+)?/u,sh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|?(?:.+)?/u,oh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|line/u,ch=/[\(\^\+\-\*\/\)]/u,lh=/(?:\d+|\b)[Dd](?:\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?|\b)/u,uh=/(?:=|=!|<|>|<=|>=|=<|=>|-=|=-)\d+/u,x0=class{constructor(e){this.plugin=e;this.lexer=Eo.compile({WS:[{match:/[ \t]+/u},{match:/[{}]+/u}],table:nh,line:oh,section:sh,link:rh,tag:ah,condition:uh,kl:{match:/kl\d*/u,value:this.clampInfinite},kh:[{match:/kh\d*/u,value:this.clampInfinite},{match:/k\d*/u,value:this.clampInfinite}],dh:{match:/dh\d*/u,value:this.clampInfinite},dl:[{match:/dl\d*/u,value:this.clampInfinite}],"!!":{match:/!!(?:i|\d+)?/u,value:this.clampInfinite},"!":{match:/!(?:i|\d+)?/u,value:this.clampInfinite},r:{match:/r(?:i|\d+)?/u,value:this.clampInfinite},u:/u/u,stunt:/1[Dd]S/u,"%":/\d+[Dd]\d+%/u,dice:[{match:lh,value:e=>{let{roll:t=this.plugin.data.defaultRoll,faces:i=this.plugin.data.defaultFace}=e.match(/(?\d+)?[Dd](?\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?)?/).groups;return`${t}d${i}`}},{match:/\d+/u},{match:/\b[A-Za-z][A-Za-z0-9_]+\b/u,value:e=>this.plugin.inline.has(e)?`${this.plugin.inline.get(e)}`:e}],sort:[{match:/s(?:a|d)*/u,value:e=>e=="s"||e=="sa"?"sa":"sd"}],math:ch});let t={precedence:3,associativity:"right"},i={precedence:2,associativity:"left"},a={precedence:1,associativity:"left"};this.parser=new Ni({"+":a,"-":a,"*":i,"/":i,"^":t})}clampInfinite(e){return/i$/.test(e)?"100":e.replace(/^\D+/g,"")}parse(e){let t=Array.from(this.lexer.reset(e));return this.lexer.reset(),this.parser.parse(this.transform(t))}transform(e){e=e.filter(i=>i.type!="WS");let t=[];for(let i of e)if(i.type=="condition"&&t.length>0){let a=t[t.length-1];a.conditions||(a.conditions=[]);let[r,s,o]=i.value.match(/(?=|=!|<|>|<=|>=|=<|=>|\-=|=\-)(?\d+)/)??[];a.conditions.push({operator:s,comparer:Number(o),value:i.value})}else t.push(i);return t}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}};var Se=w2(require("@codemirror/view")),Lo=w2(require("@codemirror/language")),mt=w2(require("obsidian"));function hh(n,e,t){for(let i of n.ranges)if(i.from<=t&&i.to>=e)return!0;return!1}function Do(n,e){let t=app.workspace.getActiveFile();if(!t)return;let i=[],a=n.state.selection,r=new RegExp(".*?_?inline-code_?.*");for(let{from:s,to:o}of n.visibleRanges)(0,Lo.syntaxTree)(n.state).iterate({from:s,to:o,enter:({node:c})=>{let l=c.type;if(l.name.includes("formatting")||!r.test(l.name))return;let u=c.from,f=c.to;if(hh(a,u,f+1))return;let h=n.state.doc.sliceString(u,f).trim();if(/^dice-mod:\s*([\s\S]+)\s*?/.test(h)){let[,x]=h.match(/dice-mod:\s*([\s\S]+)\s*?/),m=app.workspace.getActiveFile(),d=e.getRollerSync(x,m.path);d.roll().then(A=>{let b=e.data.displayFormulaForMod?`${d.inlineText} **${d.replacer}**`:`${d.replacer}`,C={from:u-1,to:f+1,insert:b},E=n.state.update({changes:C});n.dispatch(E)});return}if(!/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/.test(h))return;let[,p]=h.match(/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/),v=e.getRollerSync(p,t.path),g=new To(h,v,n,e,t);e.addToFileMap(t,v),i.push(Se.Decoration.replace({widget:g,inclusive:!1,block:!1}).range(u-1,f+1))}});return Se.Decoration.set(i,!0)}var To=class extends Se.WidgetType{constructor(e,t,i,a,r){super();this.rawQuery=e;this.roller=t;this.view=i;this.plugin=a;this.file=r}eq(e){return e.rawQuery===this.rawQuery?!0:(this.plugin.fileMap.get(this.file)?.remove(e.roller),!1)}toDOM(e){return this.roller.roll(),this.roller.containerEl}ignoreEvent(e){if(e.type==="mousedown"){let t=this.view.posAtCoords({x:e.x,y:e.y});if(e.shiftKey){if(t){let{editor:i}=this.view.state.field(mt.editorEditorField).state.field(mt.editorViewField);i.setCursor(i.offsetToPos(t))}return!1}}return!0}};function Ho(n){return Se.ViewPlugin.fromClass(class{constructor(e){this.decorations=Do(e,n)??Se.Decoration.none}update(e){if(!e.state.field(mt.editorLivePreviewField)){this.decorations=Se.Decoration.none;return}(e.docChanged||e.viewportChanged||e.selectionSet)&&(this.decorations=Do(e.view,n)??Se.Decoration.none)}},{decorations:e=>e.decorations})}String.prototype.matchAll=String.prototype.matchAll||function*(e){let t=e.global?e.flags:e.flags+"g",i=new RegExp(e,t),a;for(;a=i.exec(this);)yield a};var f6={returnAllTags:!0,rollLinksForTags:!1,copyContentButton:!0,customFormulas:[],displayFormulaForMod:!0,displayResultsInline:!1,displayFormulaAfter:!1,displayLookupRoll:!0,formulas:{},persistResults:!1,results:{},defaultRoll:1,defaultFace:100,renderer:!1,renderAllDice:!1,renderTime:2e3,diceColor:"#202020",textColor:"#ffffff",showLeafOnStartup:!0,showDice:!0,displayAsEmbed:!0,round:pe.None},Fi=class extends Z1.Plugin{constructor(){super(...arguments);this.fileMap=new Map;this.inline=new Map;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.parser=new x0(this);this.persistingFiles=new Set}async onload(){console.log("DiceRoller plugin loaded"),this.data=Object.assign({},f6,await this.loadData()),this.renderer=new Zt(this),this.addSettingTab(new h6(this.app,this)),this.registerView(M4,i=>new Je(this,i)),this.app.workspace.onLayoutReady(()=>this.addDiceView(!0)),this.registerEvent(this.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()})),this.registerEvent(this.app.workspace.on("dice-roller:render-dice",async i=>{let a=await this.getRoller(i,"external");if(!(a instanceof S2)){new Z1.Notice("The Dice View only supports dice rolls.");return}if(await a.roll(),!a.dice.length){new Z1.Notice("Invalid formula.");return}try{this.renderRoll(a)}catch(r){new Z1.Notice("There was an error rendering the roll."),console.error(r)}this.app.workspace.trigger("dice-roller:rendered-result",a.result)})),this.addCommand({id:"open-view",name:"Open Dice View",callback:()=>{this.view?this.app.workspace.revealLeaf(this.view.leaf):this.addDiceView()}}),this.addCommand({id:"reroll",name:"Re-roll Dice",checkCallback:i=>{let a=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(a&&(a.getMode()==="preview"||a.editor.cm.state.field(Z1.editorLivePreviewField))&&this.fileMap.has(a.file))return i||this.fileMap.get(a.file).forEach(s=>{s instanceof o6&&s.roll()}),!0}});let e=H0(ki).html[0];(0,Z1.addIcon)(Y2,e);let t=H0(Ui).html[0];(0,Z1.addIcon)(Ke,t),this.registerMarkdownPostProcessor(this.postprocessor.bind(this)),this.registerEditorExtension([Ho(this)]),this.app.workspace.onLayoutReady(async()=>{await this.registerDataviewInlineFields()})}addToFileMap(e,t){this.fileMap.has(e)||this.fileMap.set(e,[]),this.fileMap.set(e,[...this.fileMap.get(e),t])}async postprocessor(e,t){let i=e.querySelectorAll("code");if(!i.length)return;let a=t.sourcePath,r=t.getSectionInfo(e),s=t.getSectionInfo(e)?.lineStart,o=this.app.vault.getAbstractFileByPath(t.sourcePath);if((!o||!(o instanceof Z1.TFile))&&a!="STATBLOCK_RENDERER")return;let c={},l,u=!1,f=[];for(let h=0;h{m.on("new-result",async()=>{let b=l.slice(r.lineStart,r.lineEnd+1),C=m.replacer;if(!C){new Z1.Notice("Dice Roller: There was an issue modifying the file.");return}let E=x?`${m.inlineText} ${C}`:`${C}`;b=b.join(` +`;function vo(n,e,t){let i=new Ht,a=new z1,r=new z1,s=new q1,o=new l0({depthPacking:w8}),c=new u0,l={},u=t.maxTextureSize,f={0:P1,1:Ie,2:J2},h=new se({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new z1},radius:{value:4}},vertexShader:po,fragmentShader:mo}),m=h.clone();m.defines.HORIZONTAL_PASS=1;let v=new b2;v.setAttribute("position",new M2(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new l2(v,h),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=S6,this.render=function(b,C,E){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||b.length===0)return;let T=n.getRenderTarget(),_=n.getActiveCubeFace(),P=n.getActiveMipmapLevel(),F=n.state;F.setBlending(U2),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);for(let M=0,D=b.length;Mu||a.y>u)&&(a.x>u&&(r.x=Math.floor(u/V.x),a.x=r.x*V.x,H.mapSize.x=r.x),a.y>u&&(r.y=Math.floor(u/V.y),a.y=r.y*V.y,H.mapSize.y=r.y)),H.map===null&&!H.isPointLightShadow&&this.type===At){let N={minFilter:t2,magFilter:t2,format:W1};H.map=new d2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.mapPass=new d2(a.x,a.y,N),H.camera.updateProjectionMatrix()}if(H.map===null){let N={minFilter:e2,magFilter:e2,format:W1};H.map=new d2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.camera.updateProjectionMatrix()}n.setRenderTarget(H.map),n.clear();let L=H.getViewportCount();for(let N=0;N0){let z=M.uuid,H=E.uuid,V=l[z];V===void 0&&(V={},l[z]=V);let L=V[H];L===void 0&&(L=M.clone(),V[H]=L),M=L}return M.visible=E.visible,M.wireframe=E.wireframe,F===At?M.side=E.shadowSide!==null?E.shadowSide:E.side:M.side=E.shadowSide!==null?E.shadowSide:f[E.side],M.alphaMap=E.alphaMap,M.alphaTest=E.alphaTest,M.clipShadows=E.clipShadows,M.clippingPlanes=E.clippingPlanes,M.clipIntersection=E.clipIntersection,M.displacementMap=E.displacementMap,M.displacementScale=E.displacementScale,M.displacementBias=E.displacementBias,M.wireframeLinewidth=E.wireframeLinewidth,M.linewidth=E.linewidth,T.isPointLight===!0&&M.isMeshDistanceMaterial===!0&&(M.referencePosition.setFromMatrixPosition(T.matrixWorld),M.nearDistance=_,M.farDistance=P),M}function A(b,C,E,T,_){if(b.visible===!1)return;if(b.layers.test(C.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&_===At)&&(!b.frustumCulled||i.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(E.matrixWorldInverse,b.matrixWorld);let M=e.update(b),D=b.material;if(Array.isArray(D)){let z=M.groups;for(let H=0,V=z.length;H=1):L.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),H=V>=2);let N=null,U={},Z=n.getParameter(n.SCISSOR_BOX),O=n.getParameter(n.VIEWPORT),W=new q1().fromArray(Z),X=new q1().fromArray(O);function Q(I,l1,o1){let m1=new Uint8Array(4),$=n.createTexture();n.bindTexture(I,$),n.texParameteri(I,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(I,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let p1=0;p1t1||R.height>t1)&&(h1=t1/Math.max(R.width,R.height)),h1<1||w===!0)if(typeof HTMLImageElement!="undefined"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&R instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap){let Y=w?Dr:Math.floor,d1=Y(h1*R.width),f1=Y(h1*R.height);g===void 0&&(g=p(d1,f1));let s1=J?p(d1,f1):g;return s1.width=d1,s1.height=f1,s1.getContext("2d").drawImage(R,0,0,d1,f1),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+R.width+"x"+R.height+") to ("+d1+"x"+f1+")."),s1}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+R.width+"x"+R.height+")."),R;return R}function A(R){return t3(R.width)&&t3(R.height)}function b(R){return o?!1:R.wrapS!==o2||R.wrapT!==o2||R.minFilter!==e2&&R.minFilter!==t2}function C(R,w){return R.generateMipmaps&&w&&R.minFilter!==e2&&R.minFilter!==t2}function E(R){n.generateMipmap(R)}function T(R,w,J,t1,h1=!1){if(o===!1)return w;if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let Y=w;return w===n.RED&&(J===n.FLOAT&&(Y=n.R32F),J===n.HALF_FLOAT&&(Y=n.R16F),J===n.UNSIGNED_BYTE&&(Y=n.R8)),w===n.RG&&(J===n.FLOAT&&(Y=n.RG32F),J===n.HALF_FLOAT&&(Y=n.RG16F),J===n.UNSIGNED_BYTE&&(Y=n.RG8)),w===n.RGBA&&(J===n.FLOAT&&(Y=n.RGBA32F),J===n.HALF_FLOAT&&(Y=n.RGBA16F),J===n.UNSIGNED_BYTE&&(Y=t1===I1&&h1===!1?n.SRGB8_ALPHA8:n.RGBA8),J===n.UNSIGNED_SHORT_4_4_4_4&&(Y=n.RGBA4),J===n.UNSIGNED_SHORT_5_5_5_1&&(Y=n.RGB5_A1)),(Y===n.R16F||Y===n.R32F||Y===n.RG16F||Y===n.RG32F||Y===n.RGBA16F||Y===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Y}function _(R,w,J){return C(R,J)===!0||R.isFramebufferTexture&&R.minFilter!==e2&&R.minFilter!==t2?Math.log2(Math.max(w.width,w.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?w.mipmaps.length:1}function P(R){return R===e2||R===f3||R===d3?n.NEAREST:n.LINEAR}function F(R){let w=R.target;w.removeEventListener("dispose",F),D(w),w.isVideoTexture&&v.delete(w),s.memory.textures--}function M(R){let w=R.target;w.removeEventListener("dispose",M),z(w)}function D(R){let w=i.get(R);w.__webglInit!==void 0&&(n.deleteTexture(w.__webglTexture),i.remove(R))}function z(R){let w=R.texture,J=i.get(R),t1=i.get(w);if(!!R){if(t1.__webglTexture!==void 0&&(n.deleteTexture(t1.__webglTexture),s.memory.textures--),R.depthTexture&&R.depthTexture.dispose(),R.isWebGLCubeRenderTarget)for(let h1=0;h1<6;h1++)n.deleteFramebuffer(J.__webglFramebuffer[h1]),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer[h1]);else n.deleteFramebuffer(J.__webglFramebuffer),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer),J.__webglMultisampledFramebuffer&&n.deleteFramebuffer(J.__webglMultisampledFramebuffer),J.__webglColorRenderbuffer&&n.deleteRenderbuffer(J.__webglColorRenderbuffer),J.__webglDepthRenderbuffer&&n.deleteRenderbuffer(J.__webglDepthRenderbuffer);if(R.isWebGLMultipleRenderTargets)for(let h1=0,Y=w.length;h1=c&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+c),H+=1,R}function N(R,w){let J=i.get(R);if(R.isVideoTexture&&j2(R),R.version>0&&J.__version!==R.version){let t1=R.image;if(t1===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(t1.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{B(J,R,w);return}}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D,J.__webglTexture)}function U(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D_ARRAY,J.__webglTexture)}function Z(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_3D,J.__webglTexture)}function O(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){M1(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_CUBE_MAP,J.__webglTexture)}let W={[V4]:n.REPEAT,[o2]:n.CLAMP_TO_EDGE,[N4]:n.MIRRORED_REPEAT},X={[e2]:n.NEAREST,[f3]:n.NEAREST_MIPMAP_NEAREST,[d3]:n.NEAREST_MIPMAP_LINEAR,[t2]:n.LINEAR,[l8]:n.LINEAR_MIPMAP_NEAREST,[nt]:n.LINEAR_MIPMAP_LINEAR};function Q(R,w,J){if(J?(n.texParameteri(R,n.TEXTURE_WRAP_S,W[w.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,W[w.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,W[w.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,X[w.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,X[w.minFilter])):(n.texParameteri(R,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(R,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(w.wrapS!==o2||w.wrapT!==o2)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(R,n.TEXTURE_MAG_FILTER,P(w.magFilter)),n.texParameteri(R,n.TEXTURE_MIN_FILTER,P(w.minFilter)),w.minFilter!==e2&&w.minFilter!==t2&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let t1=e.get("EXT_texture_filter_anisotropic");if(w.type===Q2&&e.has("OES_texture_float_linear")===!1||o===!1&&w.type===ye&&e.has("OES_texture_half_float_linear")===!1)return;(w.anisotropy>1||i.get(w).__currentAnisotropy)&&(n.texParameterf(R,t1.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(w.anisotropy,a.getMaxAnisotropy())),i.get(w).__currentAnisotropy=w.anisotropy)}}function a1(R,w){R.__webglInit===void 0&&(R.__webglInit=!0,w.addEventListener("dispose",F),R.__webglTexture=n.createTexture(),s.memory.textures++)}function B(R,w,J){let t1=n.TEXTURE_2D;w.isDataTexture2DArray&&(t1=n.TEXTURE_2D_ARRAY),w.isDataTexture3D&&(t1=n.TEXTURE_3D),a1(R,w),t.activeTexture(n.TEXTURE0+J),t.bindTexture(t1,R.__webglTexture),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,w.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,w.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);let h1=b(w)&&A(w.image)===!1,Y=d(w.image,h1,!1,u);Y=p2(w,Y);let d1=A(Y)||o,f1=r.convert(w.format,w.encoding),s1=r.convert(w.type),r1=T(w.internalFormat,f1,s1,w.encoding,w.isVideoTexture);Q(t1,w,d1);let b1,I=w.mipmaps,l1=o&&w.isVideoTexture!==!0,o1=R.__version===void 0,m1=_(w,Y,d1);if(w.isDepthTexture)r1=n.DEPTH_COMPONENT,o?w.type===Q2?r1=n.DEPTH_COMPONENT32F:w.type===Wt?r1=n.DEPTH_COMPONENT24:w.type===Ce?r1=n.DEPTH24_STENCIL8:r1=n.DEPTH_COMPONENT16:w.type===Q2&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),w.format===ee&&r1===n.DEPTH_COMPONENT&&w.type!==Ue&&w.type!==Wt&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),w.type=Ue,s1=r.convert(w.type)),w.format===ze&&r1===n.DEPTH_COMPONENT&&(r1=n.DEPTH_STENCIL,w.type!==Ce&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),w.type=Ce,s1=r.convert(w.type))),l1&&o1?t.texStorage2D(n.TEXTURE_2D,1,r1,Y.width,Y.height):t.texImage2D(n.TEXTURE_2D,0,r1,Y.width,Y.height,0,f1,s1,null);else if(w.isDataTexture)if(I.length>0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&o1++,t.texStorage2D(n.TEXTURE_CUBE_MAP,o1,b1,Y[0].width,Y[0].height));for(let $=0;$<6;$++)if(h1){I?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,0,0,Y[$].width,Y[$].height,s1,r1,Y[$].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,b1,Y[$].width,Y[$].height,0,s1,r1,Y[$].data);for(let p1=0;p1m+v?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&h<=m-v&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));return o!==null&&(o.visible=a!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=s!==null),this}};var X4=class extends K1{constructor(e,t,i,a,r,s,o,c,l,u){if(u=u!==void 0?u:ee,u!==ee&&u!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===ee&&(i=Ue),i===void 0&&u===ze&&(i=Ce);super(null,a,r,s,o,c,u,i,l);this.image={width:e,height:t},this.magFilter=o!==void 0?o:e2,this.minFilter=c!==void 0?c:e2,this.flipY=!1,this.generateMipmaps=!1}};X4.prototype.isDepthTexture=!0;var Hi=class extends F2{constructor(e,t){super();let i=this,a=null,r=1,s=null,o="local-floor",c=e.extensions.has("WEBGL_multisampled_render_to_texture"),l=null,u=null,f=null,h=null,m=!1,v=null,g=t.getContextAttributes(),x=null,p=null,d=[],A=new Map,b=new i2;b.layers.enable(1),b.viewport=new q1;let C=new i2;C.layers.enable(2),C.viewport=new q1;let E=[b,C],T=new h0;T.layers.enable(1),T.layers.enable(2);let _=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(O){let W=d[O];return W===void 0&&(W=new j4,d[O]=W),W.getTargetRaySpace()},this.getControllerGrip=function(O){let W=d[O];return W===void 0&&(W=new j4,d[O]=W),W.getGripSpace()},this.getHand=function(O){let W=d[O];return W===void 0&&(W=new j4,d[O]=W),W.getHandSpace()};function F(O){let W=A.get(O.inputSource);W&&W.dispatchEvent({type:O.type,data:O.inputSource})}function M(){A.forEach(function(O,W){O.disconnect(W)}),A.clear(),_=null,P=null,e.setRenderTarget(x),h=null,f=null,u=null,a=null,p=null,Z.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(O){r=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(O){o=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){return u},this.getFrame=function(){return v},this.getSession=function(){return a},this.setSession=async function(O){if(a=O,a!==null){if(x=e.getRenderTarget(),a.addEventListener("select",F),a.addEventListener("selectstart",F),a.addEventListener("selectend",F),a.addEventListener("squeeze",F),a.addEventListener("squeezestart",F),a.addEventListener("squeezeend",F),a.addEventListener("end",M),a.addEventListener("inputsourceschange",D),g.xrCompatible!==!0&&await t.makeXRCompatible(),a.renderState.layers===void 0||e.capabilities.isWebGL2===!1){let W={antialias:a.renderState.layers===void 0?g.antialias:!0,alpha:g.alpha,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(a,t,W),a.updateRenderState({baseLayer:h}),p=new d2(h.framebufferWidth,h.framebufferHeight,{format:W1,type:N2,encoding:e.outputEncoding})}else{m=g.antialias;let W=null,X=null,Q=null;g.depth&&(Q=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,W=g.stencil?ze:ee,X=g.stencil?Ce:Ue);let a1={colorFormat:e.outputEncoding===I1?t.SRGB8_ALPHA8:t.RGBA8,depthFormat:Q,scaleFactor:r};u=new XRWebGLBinding(a,t),f=u.createProjectionLayer(a1),a.updateRenderState({layers:[f]}),m?p=new d4(f.textureWidth,f.textureHeight,{format:W1,type:N2,depthTexture:new X4(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,useRenderToTexture:c,encoding:e.outputEncoding}):p=new d2(f.textureWidth,f.textureHeight,{format:W1,type:N2,depthTexture:new X4(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,encoding:e.outputEncoding})}p.isXRRenderTarget=!0,this.setFoveation(1),s=await a.requestReferenceSpace(o),Z.setContext(a),Z.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function D(O){let W=a.inputSources;for(let X=0;X0&&(p.alphaTest.value=d.alphaTest);let A=n.get(d).envMap;A&&(p.envMap.value=A,p.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=d.reflectivity,p.ior.value=d.ior,p.refractionRatio.value=d.refractionRatio),d.lightMap&&(p.lightMap.value=d.lightMap,p.lightMapIntensity.value=d.lightMapIntensity),d.aoMap&&(p.aoMap.value=d.aoMap,p.aoMapIntensity.value=d.aoMapIntensity);let b;d.map?b=d.map:d.specularMap?b=d.specularMap:d.displacementMap?b=d.displacementMap:d.normalMap?b=d.normalMap:d.bumpMap?b=d.bumpMap:d.roughnessMap?b=d.roughnessMap:d.metalnessMap?b=d.metalnessMap:d.alphaMap?b=d.alphaMap:d.emissiveMap?b=d.emissiveMap:d.clearcoatMap?b=d.clearcoatMap:d.clearcoatNormalMap?b=d.clearcoatNormalMap:d.clearcoatRoughnessMap?b=d.clearcoatRoughnessMap:d.specularIntensityMap?b=d.specularIntensityMap:d.specularColorMap?b=d.specularColorMap:d.transmissionMap?b=d.transmissionMap:d.thicknessMap?b=d.thicknessMap:d.sheenColorMap?b=d.sheenColorMap:d.sheenRoughnessMap&&(b=d.sheenRoughnessMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),p.uvTransform.value.copy(b.matrix));let C;d.aoMap?C=d.aoMap:d.lightMap&&(C=d.lightMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),p.uv2Transform.value.copy(C.matrix))}function a(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity}function r(p,d){p.dashSize.value=d.dashSize,p.totalSize.value=d.dashSize+d.gapSize,p.scale.value=d.scale}function s(p,d,A,b){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.size.value=d.size*A,p.scale.value=b*.5,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let C;d.map?C=d.map:d.alphaMap&&(C=d.alphaMap),C!==void 0&&(C.matrixAutoUpdate===!0&&C.updateMatrix(),p.uvTransform.value.copy(C.matrix))}function o(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.rotation.value=d.rotation,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let A;d.map?A=d.map:d.alphaMap&&(A=d.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),p.uvTransform.value.copy(A.matrix))}function c(p,d){d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap)}function l(p,d){p.specular.value.copy(d.specular),p.shininess.value=Math.max(d.shininess,1e-4),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function u(p,d){d.gradientMap&&(p.gradientMap.value=d.gradientMap),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function f(p,d){p.roughness.value=d.roughness,p.metalness.value=d.metalness,d.roughnessMap&&(p.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(p.metalnessMap.value=d.metalnessMap),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),n.get(d).envMap&&(p.envMapIntensity.value=d.envMapIntensity)}function h(p,d,A){f(p,d),p.ior.value=d.ior,d.sheen>0&&(p.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),p.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(p.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(p.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(p.clearcoat.value=d.clearcoat,p.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(p.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),p.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===P1&&p.clearcoatNormalScale.value.negate())),d.transmission>0&&(p.transmission.value=d.transmission,p.transmissionSamplerMap.value=A.texture,p.transmissionSamplerSize.value.set(A.width,A.height),d.transmissionMap&&(p.transmissionMap.value=d.transmissionMap),p.thickness.value=d.thickness,d.thicknessMap&&(p.thicknessMap.value=d.thicknessMap),p.attenuationDistance.value=d.attenuationDistance,p.attenuationColor.value.copy(d.attenuationColor)),p.specularIntensity.value=d.specularIntensity,p.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(p.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(p.specularColorMap.value=d.specularColorMap)}function m(p,d){d.matcap&&(p.matcap.value=d.matcap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function v(p,d){d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function g(p,d){d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),p.referencePosition.value.copy(d.referencePosition),p.nearDistance.value=d.nearDistance,p.farDistance.value=d.farDistance}function x(p,d){d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function ah(){let n=Lt("canvas");return n.style.display="block",n}function Vi(n={}){let e=n.canvas!==void 0?n.canvas:ah(),t=n.context!==void 0?n.context:null,i=n.alpha!==void 0?n.alpha:!1,a=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,c=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1,f=null,h=null,m=[],v=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=R2,this.physicallyCorrectLights=!1,this.toneMapping=O2,this.toneMappingExposure=1;let g=this,x=!1,p=0,d=0,A=null,b=-1,C=null,E=new q1,T=new q1,_=null,P=e.width,F=e.height,M=1,D=null,z=null,H=new q1(0,0,P,F),V=new q1(0,0,P,F),L=!1,N=new Ht,U=!1,Z=!1,O=null,W=new k1,X=new k,Q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function a1(){return A===null?M:1}let B=t;function M1(S,G){for(let j=0;j0?h=v[v.length-1]:h=null,m.pop(),m.length>0?f=m[m.length-1]:f=null};function Y1(S,G,j,q){if(S.visible===!1)return;if(S.layers.test(G.layers)){if(S.isGroup)j=S.renderOrder;else if(S.isLOD)S.autoUpdate===!0&&S.update(G);else if(S.isLight)h.pushLight(S),S.castShadow&&h.pushShadow(S);else if(S.isSprite){if(!S.frustumCulled||N.intersectsSprite(S)){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=p2.update(S),E1=S.material;E1.visible&&f.push(S,y1,E1,j,X.z,null)}}else if((S.isMesh||S.isLine||S.isPoints)&&(S.isSkinnedMesh&&S.skeleton.frame!==T1.render.frame&&(S.skeleton.update(),S.skeleton.frame=T1.render.frame),!S.frustumCulled||N.intersectsObject(S))){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=p2.update(S),E1=S.material;if(Array.isArray(E1)){let w1=y1.groups;for(let B1=0,H1=w1.length;B10&&_e(K,G,j),q&&n1.viewport(E.copy(q)),K.length>0&&$4(K,G,j),g1.length>0&&$4(g1,G,j),y1.length>0&&$4(y1,G,j)}function _e(S,G,j){if(O===null){let y1=s===!0&&v1.isWebGL2===!0?d4:d2;O=new y1(1024,1024,{generateMipmaps:!0,type:d1.convert(ye)!==null?ye:N2,minFilter:nt,magFilter:e2,wrapS:o2,wrapT:o2,useRenderToTexture:u1.has("WEBGL_multisampled_render_to_texture")})}let q=g.getRenderTarget();g.setRenderTarget(O),g.clear();let K=g.toneMapping;g.toneMapping=O2,$4(S,G,j),g.toneMapping=K,C1.updateMultisampleRenderTarget(O),C1.updateRenderTargetMipmap(O),g.setRenderTarget(q)}function $4(S,G,j){let q=G.isScene===!0?G.overrideMaterial:null;for(let K=0,g1=S.length;K=0&&G<=S.width-q&&j>=0&&j<=S.height-K&&B.readPixels(G,j,q,K,d1.convert(B1),d1.convert(H1),g1):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let w1=A!==null?A1.get(A).__webglFramebuffer:null;n1.bindFramebuffer(B.FRAMEBUFFER,w1)}}},this.copyFramebufferToTexture=function(S,G,j=0){if(G.isFramebufferTexture!==!0){console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");return}let q=Math.pow(2,-j),K=Math.floor(G.image.width*q),g1=Math.floor(G.image.height*q);C1.setTexture2D(G,0),B.copyTexSubImage2D(B.TEXTURE_2D,j,0,0,S.x,S.y,K,g1),n1.unbindTexture()},this.copyTextureToTexture=function(S,G,j,q=0){let K=G.image.width,g1=G.image.height,y1=d1.convert(j.format),E1=d1.convert(j.type);C1.setTexture2D(j,0),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,j.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,j.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,j.unpackAlignment),G.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,K,g1,y1,E1,G.image.data):G.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,q,S.x,S.y,G.mipmaps[0].width,G.mipmaps[0].height,y1,G.mipmaps[0].data):B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,y1,E1,G.image),q===0&&j.generateMipmaps&&B.generateMipmap(B.TEXTURE_2D),n1.unbindTexture()},this.copyTextureToTexture3D=function(S,G,j,q,K=0){if(g.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let g1=S.max.x-S.min.x+1,y1=S.max.y-S.min.y+1,E1=S.max.z-S.min.z+1,w1=d1.convert(q.format),B1=d1.convert(q.type),H1;if(q.isDataTexture3D)C1.setTexture3D(q,0),H1=B.TEXTURE_3D;else if(q.isDataTexture2DArray)C1.setTexture2DArray(q,0),H1=B.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,q.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,q.unpackAlignment);let V1=B.getParameter(B.UNPACK_ROW_LENGTH),$1=B.getParameter(B.UNPACK_IMAGE_HEIGHT),mt=B.getParameter(B.UNPACK_SKIP_PIXELS),Ft=B.getParameter(B.UNPACK_SKIP_ROWS),R1=B.getParameter(B.UNPACK_SKIP_IMAGES),ue=j.isCompressedTexture?j.mipmaps[0]:j.image;B.pixelStorei(B.UNPACK_ROW_LENGTH,ue.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,ue.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,S.min.x),B.pixelStorei(B.UNPACK_SKIP_ROWS,S.min.y),B.pixelStorei(B.UNPACK_SKIP_IMAGES,S.min.z),j.isDataTexture||j.isDataTexture3D?B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,B1,ue.data):j.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),B.compressedTexSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,ue.data)):B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,B1,ue),B.pixelStorei(B.UNPACK_ROW_LENGTH,V1),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,$1),B.pixelStorei(B.UNPACK_SKIP_PIXELS,mt),B.pixelStorei(B.UNPACK_SKIP_ROWS,Ft),B.pixelStorei(B.UNPACK_SKIP_IMAGES,R1),K===0&&q.generateMipmaps&&B.generateMipmap(H1),n1.unbindTexture()},this.initTexture=function(S){C1.setTexture2D(S,0),n1.unbindTexture()},this.resetState=function(){p=0,d=0,A=null,n1.reset(),f1.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Vi.prototype.isWebGLRenderer=!0;var f0=class extends j1{constructor(){super();this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};f0.prototype.isScene=!0;var m4=class extends j1{constructor(e,t=1){super();this.type="Light",this.color=new x1(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}};m4.prototype.isLight=!0;var d0=class extends m4{constructor(e,t){super(e,t);this.type="AmbientLight"}};d0.prototype.isAmbientLight=!0;var yo=new k1,Co=new k,zo=new k,Ni=class{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new z1(512,512),this.map=null,this.mapPass=null,this.matrix=new k1,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ht,this._frameExtents=new z1(1,1),this._viewportCount=1,this._viewports=[new q1(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;Co.setFromMatrixPosition(e.matrixWorld),t.position.copy(Co),zo.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(zo),t.updateMatrixWorld(),yo.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(yo),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(t.projectionMatrix),i.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}};var p0=class extends Ni{constructor(){super(new i2(50,1,.5,500));this.focus=1}updateMatrices(e){let t=this.camera,i=E4*2*e.angle*this.focus,a=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||a!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=a,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}};p0.prototype.isSpotLightShadow=!0;var m0=class extends m4{constructor(e,t,i=0,a=Math.PI/3,r=0,s=1){super(e,t);this.type="SpotLight",this.position.copy(j1.DefaultUp),this.updateMatrix(),this.target=new j1,this.distance=i,this.angle=a,this.penumbra=r,this.decay=s,this.shadow=new p0}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}};m0.prototype.isSpotLight=!0;var v0=class extends T2{constructor(e){super();this.type="ShadowMaterial",this.color=new x1(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}};v0.prototype.isShadowMaterial=!0;var g0=class extends Z4.Component{constructor(e){super();this.plugin=e;this.event=new Z4.Events;this.container=createDiv("renderer-container");this.shadows=!0;this.iterations=0;this.frame_rate=1/60;this.animating=!1;this.factory=new wo(this.WIDTH,this.HEIGHT,this.plugin);this.colors={ambient:16777215,spotlight:16777215};this.display={currentWidth:null,currentHeight:null,containerWidth:null,containerHeight:null,aspect:null,scale:null};this.cameraHeight={max:null,close:null,medium:null,far:null};this.extraFrames=g0.DEFAULT_EXTRA_FRAMES;this.renderer=new Vi({alpha:!0,antialias:!0})}get WIDTH(){return this.container.clientWidth/2}get HEIGHT(){return this.container.clientHeight/2}get ASPECT(){return this.WIDTH/this.HEIGHT}get scale(){return(this.WIDTH*this.WIDTH+this.HEIGHT*this.HEIGHT)/13}get canvasEl(){return this.renderer?this.renderer.domElement:null}setDice(e){this.animating&&(this.unload(),this.load()),this.stack=e,this.current=this.factory.getDice(this.stack,{x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT}),this.scene.add(...[...this.current.values()].flat().map(t=>t.geometry)),this.world.add(...[...this.current.values()].flat())}onload(){this.addChild(this.factory),this.container.empty(),this.container.style.opacity="1",document.body.appendChild(this.container),this.renderer.shadowMap.enabled=this.shadows,this.renderer.shadowMap.type=_6,this.container.appendChild(this.renderer.domElement),this.renderer.setClearColor(0,0),this.scene=new f0,this.initScene(),this.registerDomEvent(window,"resize",()=>{this.initScene()}),this.initWorld()}async start(){return new Promise(async(e,t)=>{this.current.size||t(),this.event.on("throw-finished",i=>{e(i)}),this.event.on("error",i=>{t(i)}),this.animating=!0,this.extraFrames=g0.DEFAULT_EXTRA_FRAMES,this.render()})}enableShadows(){this.shadows=!0,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}disableShadows(){this.shadows=!1,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}get mw(){return Math.max(this.WIDTH,this.HEIGHT)}setDimensions(e){this.display.currentWidth=this.container.clientWidth/2,this.display.currentHeight=this.container.clientHeight/2,e?(this.display.containerWidth=e.w,this.display.containerHeight=e.h):(this.display.containerWidth=this.display.currentWidth,this.display.containerHeight=this.display.currentHeight),this.display.aspect=Math.min(this.display.currentWidth/this.display.containerWidth,this.display.currentHeight/this.display.containerHeight),this.display.scale=Math.sqrt(this.display.containerWidth*this.display.containerWidth+this.display.containerHeight*this.display.containerHeight)/13,this.renderer.setSize(this.display.currentWidth*2,this.display.currentHeight*2),this.cameraHeight.max=this.display.currentHeight/this.display.aspect/Math.tan(10*Math.PI/180),this.factory.width=this.display.currentWidth,this.factory.height=this.display.currentHeight,this.cameraHeight.medium=this.cameraHeight.max/1.5,this.cameraHeight.far=this.cameraHeight.max,this.cameraHeight.close=this.cameraHeight.max/2}initCamera(){this.camera&&this.scene.remove(this.camera),this.camera=new i2(20,this.display.currentWidth/this.display.currentHeight,1,this.cameraHeight.max*1.3),this.camera.position.z=this.cameraHeight.far,this.camera.lookAt(new k(0,0,0))}initLighting(){let e=Math.max(this.display.containerWidth,this.display.containerHeight);this.light&&this.scene.remove(this.light),this.ambientLight&&this.scene.remove(this.ambientLight),this.light=new m0(this.colors.spotlight,.25),this.light.position.set(-e/2,e/2,e*3),this.light.target.position.set(0,0,0),this.light.distance=e*5,this.light.angle=Math.PI/4,this.light.castShadow=this.shadows,this.light.shadow.camera.near=e/10,this.light.shadow.camera.far=e*5,this.light.shadow.camera.fov=50,this.light.shadow.bias=.001,this.light.shadow.mapSize.width=1024,this.light.shadow.mapSize.height=1024,this.scene.add(this.light),this.ambientLight=new d0(16777215,.9),this.scene.add(this.ambientLight)}initDesk(){this.desk&&this.scene.remove(this.desk);let e=new v0;e.opacity=.5,this.desk=new l2(new Vt(this.display.containerWidth*6,this.display.containerHeight*6,1,1),e),this.desk.receiveShadow=this.shadows,this.scene.add(this.desk)}initScene(){this.setDimensions(),this.initCamera(),this.initLighting(),this.initDesk(),this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}initWorld(){this.world=new Ao(this.WIDTH,this.HEIGHT),this.iterations=0}getResultsForRoller(e){let t=this.current.get(e),i=t.filter(s=>s instanceof Tt&&s.isPercentile),a=[];for(let s=0;s!(s instanceof Tt&&s.isPercentile)).map(s=>s.getUpsideValue()).filter(s=>s),...a.map(([s,o])=>{let c=s.getUpsideValue();if(!o)return c;let l=o.getUpsideValue();return c===10&&l==10?100:(l==10&&(l=0),c==10&&(c=0),c*10+l)}).filter(s=>s)]}returnResult(){for(let e of this.stack.dynamic){if(!this.current.has(e))continue;let t=this.getResultsForRoller(e);!t||e.setResults(t)}this.event.trigger("throw-finished",this.stack)}unrender(e=this){e.container.style.opacity="0",e.registerInterval(window.setTimeout(()=>{e.animating=!1,e.unload()},1e3))}render(){if(this.throwFinished())if(this.extraFrames>10)this.extraFrames--;else{try{for(let[e,t]of this.current)if(!(!e.modifiers.size||!this.getResultsForRoller(e))&&e.modifiers.has("r")){let a=t.filter(r=>(e.conditions.length||e.conditions.push({operator:"=",comparer:e.faces.min,value:""}),e.checkCondition(r.result,e.conditions)&&r.rerolled{r.rerolled++;let s={x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT};r.vector=r.generateVector(s),r.create(),r.set(),r.stopped=!1}),this.animation=requestAnimationFrame(()=>this.render());return}}if(this.returnResult(),this.plugin.data.renderTime)this.registerInterval(window.setTimeout(()=>this.unrender(),this.plugin.data.renderTime));else{let t=function(){e.unrender(e),document.body.removeEventListener("click",t)},e=this;this.registerDomEvent(document.body,"click",t)}}catch(e){this.event.trigger("error",e)}return}this.animation=requestAnimationFrame(()=>this.render()),this.world.step(this.frame_rate),this.iterations++,this.current.forEach(e=>{e.map(t=>t.set())}),this.renderer.render(this.scene,this.camera)}dispose(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.dispose(...t.children)})}detach(){}onunload(){cancelAnimationFrame(this.animation),this.container.detach(),this.container.empty(),this.renderer.domElement.detach(),this.renderer.dispose(),this.factory.dispose(),this.ambientLight.dispose(),this.light.dispose(),this.scene.children.forEach(e=>this.dispose(e)),this.scene.remove(this.scene,...this.scene.children,...[...this.current.values()].flat().map(e=>e.geometry)),this.current.forEach(e=>{e.forEach(t=>{[...Array.isArray(t.geometry.material)?t.geometry.material:[t.geometry.material]].forEach(a=>a&&a.dispose()),this.world.world.removeBody(t.body)})}),this.current=new Map}onThrowFinished(){}throwFinished(){let e=!0,t=4;if(this.iterations<10/this.frame_rate)for(let i of this.current.values())for(let a of i){if(a.stopped===!0)continue;let r=a.body.angularVelocity,s=a.body.velocity;if(Math.abs(r.x)3){a.stopped=!0;continue}}else a.stopped=this.iterations;e=!1}else a.stopped=void 0,e=!1}return e}},Y4=g0;Y4.DEFAULT_EXTRA_FRAMES=30;var Ao=class{constructor(e,t){this.WIDTH=e;this.HEIGHT=t;this.world=new Q0({gravity:new y(0,0,-9.82*400)});this.ground=this.getPlane();this.diceMaterial=new He;this.deskMaterial=new He;this.barrierMaterial=new He;this.world.broadphase=new m6,this.world.allowSleep=!0,this.ground.position.set(0,0,0),this.world.addBody(this.ground),this.buildWalls()}add(...e){e.forEach(t=>{this.world.addBody(t.body)})}step(e=1/60){let t=performance.now()/1e3;if(!this.lastCallTime)this.world.step(e);else{let i=t-this.lastCallTime;this.world.step(e,i)}this.lastCallTime=t}buildWalls(){this.world.addContactMaterial(new Te(this.deskMaterial,this.diceMaterial,{friction:.01,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Te(this.barrierMaterial,this.diceMaterial,{friction:.01,restitution:1,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Te(this.diceMaterial,this.diceMaterial,{friction:.1,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addBody(new i1({allowSleep:!1,mass:0,shape:new it,material:this.deskMaterial}));let e=new i1({allowSleep:!1,mass:0,shape:new it,material:this.barrierMaterial});e.quaternion.setFromAxisAngle(new y(1,0,0),Math.PI/2),e.position.set(0,this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new it,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(1,0,0),-Math.PI/2),e.position.set(0,-this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new it,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),-Math.PI/2),e.position.set(this.WIDTH*.93,0,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new it,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),Math.PI/2),e.position.set(-this.WIDTH*.93,0,0),this.world.addBody(e)}getPlane(){return new i1({type:i1.STATIC,shape:new it})}},wo=class extends Z4.Component{constructor(e,t,i){super();this.width=e;this.height=t;this.plugin=i;this.dice={};this.buildDice()}get colors(){return{diceColor:this.plugin.data.diceColor,textColor:this.plugin.data.textColor}}updateColors(){this.dispose(),this.buildDice()}onunload(){this.dispose()}disposeChildren(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.disposeChildren(...t.children)})}dispose(){for(let e of Object.values(this.dice))this.disposeChildren(e.geometry.children)}getDiceForRoller(e,t){let i=[];switch(e.faces.max){case 4:{i.push(...new Array(e.rolls).fill(0).map(a=>new Ci(this.width,this.height,this.clone("d4"),t)));break}case 1:case 6:{i.push(...new Array(e.rolls).fill(0).map(a=>new yi(this.width,this.height,e.fudge?this.clone("fudge"):this.clone("d6"),t)));break}case 8:{i.push(...new Array(e.rolls).fill(0).map(a=>new bi(this.width,this.height,this.clone("d8"),t)));break}case 10:{i.push(...new Array(e.rolls).fill(0).map(a=>new Tt(this.width,this.height,this.clone("d10"),t)));break}case 12:{i.push(...new Array(e.rolls).fill(0).map(a=>new Mi(this.width,this.height,this.clone("d12"),t)));break}case 20:{i.push(...new Array(e.rolls).fill(0).map(a=>new xi(this.width,this.height,this.clone("d20"),t)));break}case 100:{i.push(...new Array(e.rolls).fill(0).map(a=>[new Tt(this.width,this.height,this.clone("d100"),t,!0),new Tt(this.width,this.height,this.clone("d10"),t,!0)]).flat());break}}return i}getDice(e,t){let i=new Map;for(let a of e.dynamic){let r=this.getDiceForRoller(a,t);r.length&&i.set(a,r)}return i}clone(e){if(!(e in this.dice))throw new Error("That dice type does not exist!");return this.dice[e].clone()}buildDice(){this.dice.d100=new ri(this.width,this.height,this.colors).create(),this.dice.d20=new ti(this.width,this.height,this.colors).create(),this.dice.d12=new ii(this.width,this.height,this.colors).create(),this.dice.d10=new ai(this.width,this.height,this.colors).create(),this.dice.d8=new ni(this.width,this.height,this.colors).create(),this.dice.d6=new si(this.width,this.height,this.colors).create(),this.dice.d4=new ci(this.width,this.height,this.colors).create(),this.dice.fudge=new oi(this.width,this.height,this.colors).create(),this.dice.boost=new vi(this.width,this.height,this.colors).create(),this.dice.ability=new di(this.width,this.height,this.colors).create(),this.dice.difficulty=new pi(this.width,this.height,this.colors).create(),this.dice.challenge=new hi(this.width,this.height,this.colors).create(),this.dice.proficiency=new ui(this.width,this.height,this.colors).create(),this.dice.setback=new gi(this.width,this.height,this.colors).create()}};var Eo=w2(_o());var Ri=class{constructor(e){this.table=e}parse(e){let t=e.length,i=this.table,a=[],r=[],s=0;for(;sf||u===f&&l.associativity==="right")break;a.push(r.shift())}r.unshift(o)}else a.push(o)}}for(;r.length;){let o=r.shift();if(o.value!=="(")a.push(o);else throw new Error("Mismatched parentheses.")}return a}};var rh=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?(?:\|(?:[^+-]+))?/u,nh=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?\|link/u,sh=/(?:.*)?(?:\[.*\]\(|\[\[)(?:.+?)#?\^(?:.+?)(?:\)|\]\])\|?(?:.+)?/u,oh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|?(?:.+)?/u,ch=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|line/u,lh=/[\(\^\+\-\*\/\)]/u,uh=/(?:\d+|\b)[Dd](?:\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?|\b)/u,hh=/(?:=|=!|<|>|<=|>=|=<|=>|-=|=-)\d+/u,M0=class{constructor(e){this.plugin=e;this.lexer=Eo.compile({WS:[{match:/[ \t]+/u},{match:/[{}]+/u}],table:sh,line:ch,section:oh,link:nh,tag:rh,condition:hh,kl:{match:/kl\d*/u,value:this.clampInfinite},kh:[{match:/kh\d*/u,value:this.clampInfinite},{match:/k\d*/u,value:this.clampInfinite}],dh:{match:/dh\d*/u,value:this.clampInfinite},dl:[{match:/dl\d*/u,value:this.clampInfinite}],"!!":{match:/!!(?:i|\d+)?/u,value:this.clampInfinite},"!":{match:/!(?:i|\d+)?/u,value:this.clampInfinite},r:{match:/r(?:i|\d+)?/u,value:this.clampInfinite},u:/u/u,stunt:/1[Dd]S/u,"%":/\d+[Dd]\d+%/u,dice:[{match:uh,value:e=>{let{roll:t=this.plugin.data.defaultRoll,faces:i=this.plugin.data.defaultFace}=e.match(/(?\d+)?[Dd](?\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?)?/).groups;return`${t}d${i}`}},{match:/\d+/u},{match:/\b[A-Za-z][A-Za-z0-9_]+\b/u,value:e=>this.plugin.inline.has(e)?`${this.plugin.inline.get(e)}`:e}],sort:[{match:/s(?:a|d)*/u,value:e=>e=="s"||e=="sa"?"sa":"sd"}],math:lh});let t={precedence:3,associativity:"right"},i={precedence:2,associativity:"left"},a={precedence:1,associativity:"left"};this.parser=new Ri({"+":a,"-":a,"*":i,"/":i,"^":t})}clampInfinite(e){return/i$/.test(e)?"100":e.replace(/^\D+/g,"")}parse(e){let t=Array.from(this.lexer.reset(e));return this.lexer.reset(),this.parser.parse(this.transform(t))}transform(e){e=e.filter(i=>i.type!="WS");let t=[];for(let i of e)if(i.type=="condition"&&t.length>0){let a=t[t.length-1];a.conditions||(a.conditions=[]);let[r,s,o]=i.value.match(/(?=|=!|<|>|<=|>=|=<|=>|\-=|=\-)(?\d+)/)??[];a.conditions.push({operator:s,comparer:Number(o),value:i.value})}else t.push(i);return t}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}};var Se=w2(require("@codemirror/view")),Lo=w2(require("@codemirror/language")),v4=w2(require("obsidian"));function fh(n,e,t){for(let i of n.ranges)if(i.from<=t&&i.to>=e)return!0;return!1}function Do(n,e){let t=app.workspace.getActiveFile();if(!t)return;let i=[],a=n.state.selection,r=new RegExp(".*?_?inline-code_?.*");for(let{from:s,to:o}of n.visibleRanges)(0,Lo.syntaxTree)(n.state).iterate({from:s,to:o,enter:({node:c})=>{let l=c.type;if(l.name.includes("formatting")||!r.test(l.name))return;let u=c.from,f=c.to;if(fh(a,u,f+1))return;let h=n.state.doc.sliceString(u,f).trim();if(/^dice-mod:\s*([\s\S]+)\s*?/.test(h)){let[,x]=h.match(/dice-mod:\s*([\s\S]+)\s*?/),p=app.workspace.getActiveFile(),d=e.getRollerSync(x,p.path);d.roll().then(A=>{let b=e.data.displayFormulaForMod?`${d.inlineText} **${d.replacer}**`:`${d.replacer}`,C={from:u-1,to:f+1,insert:b},E=n.state.update({changes:C});n.dispatch(E)});return}if(!/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/.test(h))return;let[,m]=h.match(/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/),v=e.getRollerSync(m,t.path),g=new To(h,v,n,e,t);e.addToFileMap(t,v),i.push(Se.Decoration.replace({widget:g,inclusive:!1,block:!1}).range(u-1,f+1))}});return Se.Decoration.set(i,!0)}var To=class extends Se.WidgetType{constructor(e,t,i,a,r){super();this.rawQuery=e;this.roller=t;this.view=i;this.plugin=a;this.file=r}eq(e){return e.rawQuery===this.rawQuery?!0:(this.plugin.fileMap.get(this.file)?.remove(e.roller),!1)}toDOM(e){return this.roller.roll(),this.roller.containerEl}ignoreEvent(e){if(e.type==="mousedown"){let t=this.view.posAtCoords({x:e.x,y:e.y});if(e.shiftKey){if(t){let{editor:i}=this.view.state.field(v4.editorEditorField).state.field(v4.editorViewField);i.setCursor(i.offsetToPos(t))}return!1}}return!0}};function Ho(n){return Se.ViewPlugin.fromClass(class{constructor(e){this.decorations=Do(e,n)??Se.Decoration.none}update(e){if(!e.state.field(v4.editorLivePreviewField)){this.decorations=Se.Decoration.none;return}(e.docChanged||e.viewportChanged||e.selectionSet)&&(this.decorations=Do(e.view,n)??Se.Decoration.none)}},{decorations:e=>e.decorations})}var Ke=class{constructor(e){this.plugin=e;this.sources=new Map}get renderer(){return this.plugin.renderer}registerSource(e,t){this.sources.set(e,t)}getRollerSync(e,t){let i=this.sources.get(t)??Ke.RollerOptions(this.plugin);return this.plugin.getRollerSync(e,t,i)}async getRoller(e,t){let i=this.sources.get(t)??Ke.RollerOptions(this.plugin);return this.plugin.getRoller(e,t,i)}static RollerOptions(e){return{showDice:e.data.showDice,shouldRender:e.data.renderAllDice,showFormula:e.data.displayResultsInline,showParens:e.data.displayFormulaAfter,expectedValue:g2.Roll,text:null}}};String.prototype.matchAll=String.prototype.matchAll||function*(e){let t=e.global?e.flags:e.flags+"g",i=new RegExp(e,t),a;for(;a=i.exec(this);)yield a};var d6={returnAllTags:!0,rollLinksForTags:!1,copyContentButton:!0,customFormulas:[],displayFormulaForMod:!0,displayResultsInline:!1,displayFormulaAfter:!1,displayLookupRoll:!0,formulas:{},persistResults:!1,results:{},defaultRoll:1,defaultFace:100,renderer:!1,renderAllDice:!1,renderTime:2e3,diceColor:"#202020",textColor:"#ffffff",showLeafOnStartup:!0,showDice:!0,displayAsEmbed:!0,round:pe.None},Fi=class extends Z1.Plugin{constructor(){super(...arguments);this.api=new Ke(this);this.fileMap=new Map;this.inline=new Map;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.parser=new M0(this);this.persistingFiles=new Set}async onload(){console.log("DiceRoller plugin loaded"),this.data=Object.assign({},d6,await this.loadData()),this.renderer=new Y4(this),this.addSettingTab(new f6(this.app,this)),this.registerView(bt,i=>new Qe(this,i)),this.app.workspace.onLayoutReady(()=>this.addDiceView(!0)),this.registerEvent(this.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()})),this.registerEvent(this.app.workspace.on("dice-roller:render-dice",async i=>{let a=await this.getRoller(i,"external");if(!(a instanceof S2)){new Z1.Notice("The Dice View only supports dice rolls.");return}if(await a.roll(),!a.dice.length){new Z1.Notice("Invalid formula.");return}try{this.renderRoll(a)}catch(r){new Z1.Notice("There was an error rendering the roll."),console.error(r)}this.app.workspace.trigger("dice-roller:rendered-result",a.result)})),this.addCommand({id:"open-view",name:"Open Dice View",callback:()=>{this.view?this.app.workspace.revealLeaf(this.view.leaf):this.addDiceView()}}),this.addCommand({id:"reroll",name:"Re-roll Dice",checkCallback:i=>{let a=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(a&&(a.getMode()==="preview"||a.editor.cm.state.field(Z1.editorLivePreviewField))&&this.fileMap.has(a.file))return i||this.fileMap.get(a.file).forEach(s=>{s instanceof c6&&s.roll()}),!0}});let e=V0(ki).html[0];(0,Z1.addIcon)(Y2,e);let t=V0(Ui).html[0];(0,Z1.addIcon)(Je,t),this.registerMarkdownPostProcessor(this.postprocessor.bind(this)),this.registerEditorExtension([Ho(this)]),this.app.workspace.onLayoutReady(async()=>{await this.registerDataviewInlineFields()}),this.app.workspace.trigger("dice-roller:loaded")}addToFileMap(e,t){this.fileMap.has(e)||this.fileMap.set(e,[]),this.fileMap.set(e,[...this.fileMap.get(e),t])}async postprocessor(e,t){let i=e.querySelectorAll("code");if(!i.length)return;let a=t.sourcePath,r=t.getSectionInfo(e),s=t.getSectionInfo(e)?.lineStart,o=this.app.vault.getAbstractFileByPath(t.sourcePath);if((!o||!(o instanceof Z1.TFile))&&a!="STATBLOCK_RENDERER")return;let c={},l,u=!1,f=[];for(let h=0;h{p.on("new-result",async()=>{let b=l.slice(r.lineStart,r.lineEnd+1),C=p.replacer;if(!C){new Z1.Notice("Dice Roller: There was an issue modifying the file.");return}let E=x?`${p.inlineText} ${C}`:`${C}`;b=b.join(` `).replace(`\`${v}\``,E.replace(/([\*\[\]])/g,"\\$1")).split(` -`),l.splice(r.lineStart,r.lineEnd-r.lineStart+1,...b),d()})})),await m.roll();continue}catch(v){console.error(v)}if(!!/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/.test(p.innerText))try{let[,v]=p.innerText.match(/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/),g=await this.getRoller(v,t.sourcePath),x=this.data.results?.[a]?.[s]?.[h]??null;(this.data.persistResults&&!/dice\-/.test(p.innerText)||/dice\+/.test(p.innerText))&&(this.persistingFiles.add(t.sourcePath),c[h]=g,g.save=!0);let m=this.data.renderAllDice;v.includes("|render")&&(m=!0),v.includes("|norender")&&(m=!1);let d=async()=>{await g.roll(),g.save&&x&&await g.applyResult(x),g instanceof S2&&(g.shouldRender=m),p.replaceWith(g.containerEl)};if(g.loaded?await d():g.on("loaded",async()=>{await d()}),!o||!(o instanceof Z1.TFile))continue;this.addToFileMap(o,g);let A=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(A&&this.fileMap.has(o)&&this.fileMap.get(o).length===1){let b=this,C=V0(A,{onUnloadFile:function(E){return async function(T){return T==o&&(b.fileMap.delete(o),C()),await E.call(this,T)}}});A.register(C),A.register(()=>this.fileMap.delete(o))}}catch(v){console.error(v),new Z1.Notice(`There was an error parsing the dice string: ${p.innerText}. +`),l.splice(r.lineStart,r.lineEnd-r.lineStart+1,...b),d()})})),await p.roll();continue}catch(v){console.error(v)}if(!!/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/.test(m.innerText))try{let[,v]=m.innerText.match(/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/),g=await this.getRoller(v,t.sourcePath),x=this.data.results?.[a]?.[s]?.[h]??null;(this.data.persistResults&&!/dice\-/.test(m.innerText)||/dice\+/.test(m.innerText))&&(this.persistingFiles.add(t.sourcePath),c[h]=g,g.save=!0);let p=this.data.renderAllDice;v.includes("|render")&&(p=!0),v.includes("|norender")&&(p=!1);let d=async()=>{await g.roll(),g.save&&x&&await g.applyResult(x),g instanceof S2&&(g.shouldRender=p),m.replaceWith(g.containerEl)};if(g.loaded?await d():g.on("loaded",async()=>{await d()}),!o||!(o instanceof Z1.TFile))continue;this.addToFileMap(o,g);let A=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(A&&this.fileMap.has(o)&&this.fileMap.get(o).length===1){let b=this,C=N0(A,{onUnloadFile:function(E){return async function(T){return T==o&&(b.fileMap.delete(o),C()),await E.call(this,T)}}});A.register(C),A.register(()=>this.fileMap.delete(o))}}catch(v){console.error(v),new Z1.Notice(`There was an error parsing the dice string: ${m.innerText}. ${v}`,5e3);continue}}if(!(!o||!(o instanceof Z1.TFile))&&(u&&f.length&&(await Promise.all(f),await this.app.vault.modify(o,l.join(` -`))),a in this.data.results&&(this.data.results[a][s]={}),Object.entries(c).length)){let h=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(h){let p=this,v=V0(h,{onUnloadFile:function(g){return async function(x){if(x=o){p.persistingFiles.has(a)&&(p.persistingFiles.delete(a),p.data.results[a]={});for(let m in c){let d=c[m],A=t.getSectionInfo(e)?.lineStart;if(A==null)continue;let b={[A]:{...p.data.results[a]?.[A]??{},[m]:d.toResult()}};p.data.results[a]={...p.data.results[a]??{},...b},await p.saveSettings()}}return v(),await g.call(this,x)}}});h.register(v),h.register(async()=>{this.persistingFiles.has(a)&&(this.persistingFiles.delete(a),this.data.results[a]={});for(let g in c){let x=c[g],m=t.getSectionInfo(e)?.lineStart;if(m==null)continue;let d={[m]:{...this.data.results[a]?.[m]??{},[g]:x.toResult()}};this.data.results[a]={...this.data.results[a]??{},...d},await this.saveSettings()}})}}}get canUseDataview(){return this.app.plugins.getPlugin("dataview")!=null}get dataview(){return this.app.plugins.getPlugin("dataview")}get dataviewAPI(){return(0,Vo.getAPI)()}async dataviewReady(){return new Promise(e=>{this.canUseDataview||e(!1),this.dataview.api&&e(!0),this.registerEvent(this.app.metadataCache.on("dataview:api-ready",()=>{e(!0)}))})}get view(){let e=this.app.workspace.getLeavesOfType(M4),t=e.length?e[0]:null;if(t&&t.view&&t.view instanceof Je)return t.view}async getArrayRoller(e,t=1){let i=new B0(this,e,t);return await i.roll(),i}async addDiceView(e=!1){e&&!this.data.showLeafOnStartup||this.app.workspace.getLeavesOfType(M4).length||await this.app.workspace.getRightLeaf(!1).setViewState({type:M4})}async registerDataviewInlineFields(){if(!this.canUseDataview)return;await this.dataviewReady(),this.dataview.index.pages.forEach(({fields:t})=>{for(let[i,a]of t)typeof a!="number"||Number.isNaN(a)||a==null||this.inline.set(i,a)}),this.registerEvent(this.app.metadataCache.on("dataview:metadata-change",(t,i)=>{if(t==="update"){let a=this.dataview.api.page(i.path);if(!a)return;for(let r in a){let s=a[r];typeof s!="number"||Number.isNaN(s)||s==null||this.inline.set(r,s)}}}))}async renderRoll(e){if(!(e instanceof S2)||!e?.dice?.length){new Z1.Notice(`This dice roll can't be rendered: ${e.original}`);return}this.addChild(this.renderer),this.renderer.setDice(e),await this.renderer.start(),e.recalculate()}async parseDice(e,t){let i=await this.getRoller(e,t);return{result:await i.roll(),roller:i}}parseDiceSync(e,t){let i=this.getRollerSync(e,t);if(i instanceof S2)return{result:i.result,roller:i}}clearEmpties(e){for(var t in e)!e[t]||typeof e[t]!="object"||(this.clearEmpties(e[t]),Object.keys(e[t]).length===0&&delete e[t])}async saveSettings(){this.clearEmpties(this.data.results),await this.saveData(this.data)}get dataview_regex(){let e=Array.from(this.inline.keys());return e.length?new RegExp(`(${e.join("|")})`,"g"):null}async getRoller(e,t="",i=this.data.showDice){e=e.replace(/\\\|/g,"|");let a=e.includes("|nodice")?!1:i,r=this.data.renderAllDice,s=this.data.displayResultsInline,o=this.data.displayFormulaAfter,c=h2.Roll,l="",u=/\|text\((.*)\)/;if(e.includes("|render")&&(r=!0),e.includes("|norender")&&(r=!1),e.includes("|form")&&(s=!0),e.includes("|noform")&&(s=!1),e.includes("|avg")&&(c=h2.Average),e.includes("|none")&&(c=h2.None),e.includes("|text(")){let[,p]=e.match(u)??[null,""];l=p}e.includes("|paren")&&(o=!0),e.includes("|noparen")&&(o=!1),e=(0,Ri.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|noparen","").replace("|paren","").replace("|avg","").replace("|none","").replace(u,"")),e in this.data.formulas&&(e=this.data.formulas[e]);let f=this.parse(e);switch(this.getTypeFromLexemes(f)){case"dice":{let p=new S2(this,e,f,a,l,c,o);return p.showFormula=s,p.shouldRender=r,p}case"table":{let p=new I4(this,e,f[0],t,a);return await p.init,p}case"section":return new Ct(this,e,f[0],t,a);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new c6(this,e,f[0],t,a)}case"link":return new l6(this,e,f[0],t,a);case"line":return new u6(this,e,f[0],t,a)}}getRollerSync(e,t,i=this.data.showDice,a){e=e.replace(/\\\|/g,"|");let r=e.includes("|nodice")?!1:i,s=this.data.renderAllDice,o=!1,c=h2.Roll,l="",u=/\|text\((.*)\)/;if(e.includes("|render")&&(s=!0),e.includes("|norender")&&(s=!1),e.includes("|form")&&(o=!0),e.includes("|noform")&&(o=!1),e.includes("|avg")&&(c=h2.Average),e.includes("|none")&&(c=h2.None),e.includes("|text(")){let[,p]=e.match(u)??[null,""];l=p}e=(0,Ri.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|avg","").replace("|none","").replace(u,"")),e in this.data.formulas&&(e=this.data.formulas[e]);let f=this.parse(e),h=this.getTypeFromLexemes(f);switch(a==null&&(a=this.data.displayFormulaAfter),h){case"dice":{let p=new S2(this,e,f,r,l,c,a);return p.shouldRender=s,p.showFormula=o,p}case"table":{let p=new I4(this,e,f[0],t,r);return p.init,p}case"section":return new Ct(this,e,f[0],t,r);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new c6(this,e,f[0],t,r)}case"link":return new l6(this,e,f[0],t,r);case"line":return new u6(this,e,f[0],t,r)}}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}onunload(){console.log("DiceRoller unloaded"),this.app.workspace.getLeavesOfType(M4).forEach(e=>e.detach()),"__THREE__"in window&&delete window.__THREE__,this.renderer.unload(),this.app.workspace.trigger("dice-roller:unload")}parse(e){return this.parser.parse(e)}}; +`))),a in this.data.results&&(this.data.results[a][s]={}),Object.entries(c).length)){let h=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(h){let m=this,v=N0(h,{onUnloadFile:function(g){return async function(x){if(x=o){m.persistingFiles.has(a)&&(m.persistingFiles.delete(a),m.data.results[a]={});for(let p in c){let d=c[p],A=t.getSectionInfo(e)?.lineStart;if(A==null)continue;let b={[A]:{...m.data.results[a]?.[A]??{},[p]:d.toResult()}};m.data.results[a]={...m.data.results[a]??{},...b},await m.saveSettings()}}return v(),await g.call(this,x)}}});h.register(v),h.register(async()=>{this.persistingFiles.has(a)&&(this.persistingFiles.delete(a),this.data.results[a]={});for(let g in c){let x=c[g],p=t.getSectionInfo(e)?.lineStart;if(p==null)continue;let d={[p]:{...this.data.results[a]?.[p]??{},[g]:x.toResult()}};this.data.results[a]={...this.data.results[a]??{},...d},await this.saveSettings()}})}}}get canUseDataview(){return this.app.plugins.getPlugin("dataview")!=null}get dataview(){return this.app.plugins.getPlugin("dataview")}get dataviewAPI(){return(0,Vo.getAPI)()}async dataviewReady(){return new Promise(e=>{this.canUseDataview||e(!1),this.dataview.api&&e(!0),this.registerEvent(this.app.metadataCache.on("dataview:api-ready",()=>{e(!0)}))})}get view(){let e=this.app.workspace.getLeavesOfType(bt),t=e.length?e[0]:null;if(t&&t.view&&t.view instanceof Qe)return t.view}async getArrayRoller(e,t=1){let i=new P0(this,e,t);return await i.roll(),i}async addDiceView(e=!1){e&&!this.data.showLeafOnStartup||this.app.workspace.getLeavesOfType(bt).length||await this.app.workspace.getRightLeaf(!1).setViewState({type:bt})}async registerDataviewInlineFields(){if(!this.canUseDataview)return;await this.dataviewReady(),this.dataview.index.pages.forEach(({fields:t})=>{for(let[i,a]of t)typeof a!="number"||Number.isNaN(a)||a==null||this.inline.set(i,a)}),this.registerEvent(this.app.metadataCache.on("dataview:metadata-change",(t,i)=>{if(t==="update"){let a=this.dataview.api.page(i.path);if(!a)return;for(let r in a){let s=a[r];typeof s!="number"||Number.isNaN(s)||s==null||this.inline.set(r,s)}}}))}async renderRoll(e){if(!(e instanceof S2)||!e?.dice?.length){new Z1.Notice(`This dice roll can't be rendered: ${e.original}`);return}this.addChild(this.renderer),this.renderer.setDice(e),await this.renderer.start(),e.recalculate()}async parseDice(e,t){let i=await this.getRoller(e,t);return{result:await i.roll(),roller:i}}parseDiceSync(e,t){let i=this.getRollerSync(e,t);if(i instanceof S2)return{result:i.result,roller:i}}clearEmpties(e){for(var t in e)!e[t]||typeof e[t]!="object"||(this.clearEmpties(e[t]),Object.keys(e[t]).length===0&&delete e[t])}async saveSettings(){this.clearEmpties(this.data.results),await this.saveData(this.data)}get dataview_regex(){let e=Array.from(this.inline.keys());return e.length?new RegExp(`(${e.join("|")})`,"g"):null}getParametersForRoller(e,t){e=e.replace(/\\\|/g,"|");let i=t?.showDice??!0,a=t?.shouldRender??this.data.renderAllDice,r=t?.showFormula??this.data.displayResultsInline,s=t?.showParens??this.data.displayFormulaAfter,o=t?.expectedValue??g2.Roll,c=t?.text??"",l=/\|text\((.*)\)/;if(e.includes("|nodice")&&(i=!1),e.includes("|render")&&(a=!0),e.includes("|norender")&&(a=!1),e.includes("|form")&&(r=!0),e.includes("|noform")&&(r=!1),e.includes("|avg")&&(o=g2.Average),e.includes("|none")&&(o=g2.None),e.includes("|text(")){let[,u]=e.match(l)??[null,""];c=u}return e.includes("|paren")&&(s=!0),e.includes("|noparen")&&(s=!1),e=(0,No.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|noparen","").replace("|paren","").replace("|avg","").replace("|none","").replace(l,"")),e in this.data.formulas&&(e=this.data.formulas[e]),{content:e,showDice:i,showParens:s,showFormula:r,expectedValue:o,shouldRender:a,text:c}}async getRoller(e,t="",i=Ke.RollerOptions(this)){let{content:a,showDice:r,showParens:s,showFormula:o,expectedValue:c,shouldRender:l,text:u}=this.getParametersForRoller(e,i),f=this.parse(a);switch(this.getTypeFromLexemes(f)){case"dice":{let m=new S2(this,a,f,r,u,c,s);return m.showFormula=o,m.shouldRender=l,m}case"table":{let m=new kt(this,a,f[0],t,r);return await m.init,m}case"section":return new z4(this,a,f[0],t,r);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new l6(this,a,f[0],t,r)}case"link":return new u6(this,a,f[0],t,r);case"line":return new h6(this,a,f[0],t,r)}}getRollerSync(e,t,i=Ke.RollerOptions(this)){let{content:a,showDice:r,showParens:s,showFormula:o,expectedValue:c,shouldRender:l,text:u}=this.getParametersForRoller(e,i),f=this.parse(a);switch(this.getTypeFromLexemes(f)){case"dice":{let m=new S2(this,a,f,r,u,c,s);return m.shouldRender=l,m.showFormula=o,m}case"table":{let m=new kt(this,a,f[0],t,r);return m.init,m}case"section":return new z4(this,a,f[0],t,r);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new l6(this,a,f[0],t,r)}case"link":return new u6(this,a,f[0],t,r);case"line":return new h6(this,a,f[0],t,r)}}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}onunload(){console.log("DiceRoller unloaded"),this.app.workspace.getLeavesOfType(bt).forEach(e=>e.detach()),"__THREE__"in window&&delete window.__THREE__,this.renderer.unload(),this.app.workspace.trigger("dice-roller:unload")}parse(e){return this.parser.parse(e)}}; /*! * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) diff --git a/.obsidian/plugins/obsidian-dice-roller/manifest.json b/.obsidian/plugins/obsidian-dice-roller/manifest.json index 15cbdc84..59914f27 100644 --- a/.obsidian/plugins/obsidian-dice-roller/manifest.json +++ b/.obsidian/plugins/obsidian-dice-roller/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-dice-roller", "name": "Dice Roller", - "version": "8.12.3", + "version": "8.13.1", "minAppVersion": "0.12.15", "description": "Inline dice rolling for Obsidian.md", "author": "Jeremy Valentine", diff --git a/.obsidian/plugins/obsidian-reminder-plugin/data.json b/.obsidian/plugins/obsidian-reminder-plugin/data.json index 0dbf7d8f..2e766113 100644 --- a/.obsidian/plugins/obsidian-reminder-plugin/data.json +++ b/.obsidian/plugins/obsidian-reminder-plugin/data.json @@ -60,13 +60,13 @@ "05.02 Networks/Server Alias.md": [ { "title": ":email: [[Selfhosting]], [[Server Alias|Email Alias]]: Upgrader & Health checks %%done_del%%", - "time": "2023-03-31", + "time": "2023-07-31", "rowNumber": 338 }, { "title": ":email: [[Server Alias]]: Backup server %%done_del%%", "time": "2023-09-05", - "rowNumber": 342 + "rowNumber": 343 } ], "05.02 Networks/Server Tools.md": [ @@ -134,19 +134,19 @@ ], "04.01 lebv.org/lebv Research Tasks.md": [ { - "title": ":fleur_de_lis: [[lebv Research Tasks|Research]]: Lieux: que sont devenus Fleurimont & Le Pavillon aujourd'hui?", - "time": "2023-03-31", - "rowNumber": 69 + "title": ":fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: éplucher les mentions du Nobiliaire de Guyenne & Gascogne", + "time": "2023-07-31", + "rowNumber": 71 }, { "title": ":fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: reprendre les citations militaires (promotion/décoration)", - "time": "2023-03-31", + "time": "2023-08-31", "rowNumber": 70 }, { - "title": ":fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: éplucher les mentions du Nobiliaire de Guyenne & Gascogne", - "time": "2023-03-31", - "rowNumber": 71 + "title": ":fleur_de_lis: [[lebv Research Tasks|Research]]: Lieux: que sont devenus Fleurimont & Le Pavillon aujourd'hui?", + "time": "2023-10-31", + "rowNumber": 69 } ], "01.03 Family/Amaury de Villeneuve.md": [ @@ -357,9 +357,9 @@ ], "01.02 Home/Household.md": [ { - "title": "🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%%", - "time": "2023-03-27", - "rowNumber": 95 + "title": ":couch_and_lamp: [[Household]]: Replace the sofa", + "time": "2023-06-30", + "rowNumber": 59 }, { "title": "♻ [[Household]]: *Paper* recycling collection %%done_del%%", @@ -367,39 +367,29 @@ "rowNumber": 75 }, { - "title": ":coffee: [[Household]]: Buy a Cappuccino machine", - "time": "2023-03-31", - "rowNumber": 58 - }, - { - "title": ":bed: [[Household]]: Buy bed-side tables", - "time": "2023-03-31", - "rowNumber": 60 + "title": "♻ [[Household]]: *Cardboard* recycling collection %%done_del%%", + "time": "2023-04-04", + "rowNumber": 80 }, { "title": "🛎️ :house: [[Household]]: Pay rent %%done_del%%", - "time": "2023-03-31", + "time": "2023-04-30", "rowNumber": 90 }, - { - "title": ":bed: [[Household]] Change bedsheets %%done_del%%", - "time": "2023-04-01", - "rowNumber": 103 - }, - { - "title": "♻ [[Household]]: *Cardboard* recycling collection %%done_del%%", - "time": "2023-04-04", - "rowNumber": 80 - }, { "title": "🛎 🛍 REMINDER [[Household]]: Monthly shop in France %%done_del%%", "time": "2023-04-29", - "rowNumber": 92 + "rowNumber": 93 }, { - "title": ":couch_and_lamp: [[Household]]: Replace the sofa", - "time": "2023-06-30", - "rowNumber": 59 + "title": "🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%%", + "time": "2023-04-03", + "rowNumber": 96 + }, + { + "title": ":bed: [[Household]] Change bedsheets %%done_del%%", + "time": "2023-04-01", + "rowNumber": 105 } ], "01.03 Family/Pia Bousquié.md": [ @@ -482,13 +472,13 @@ "05.02 Networks/Configuring UFW.md": [ { "title": "🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%%", - "time": "2023-03-25", + "time": "2023-04-01", "rowNumber": 239 }, { "title": "🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%%", - "time": "2023-03-25", - "rowNumber": 247 + "time": "2023-04-01", + "rowNumber": 248 } ], "01.03 Family/Amélie Solanet.md": [ @@ -634,7 +624,7 @@ }, { "title": "10:35 :chair: [[2023-01-03|Memo]], [[@Life Admin|Admin]], [[@@MRCK|Meggi]]: Find a person to repair Meggi's chair", - "time": "2023-03-31", + "time": "2023-05-31", "rowNumber": 88 }, { @@ -649,13 +639,8 @@ }, { "title": "13:08 🛞 [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Buy summer tires", - "time": "2023-03-31", + "time": "2023-04-10", "rowNumber": 97 - }, - { - "title": "16:26 :hiking_boot: [[2023-01-03|Memo]], [[@Lifestyle|Lifestyle]]: Find a pair of winter boots", - "time": "2023-03-31", - "rowNumber": 98 } ], "01.01 Life Orga/@Life Admin.md": [ @@ -739,13 +724,6 @@ "rowNumber": 105 } ], - "00.01 Admin/Calendars/2023-02-20.md": [ - { - "title": "12:54 :crocodile: :racing_car: [[2023-02-20|Memo]], [[Miami]]: pay for the rental car", - "time": "2023-03-27", - "rowNumber": 103 - } - ], "01.03 Family/Aglaé de Villeneuve.md": [ { "title": ":birthday: **[[Aglaé de Villeneuve|Aglaé]]** %%done_del%%", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index 6c7b2226..64417d96 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -122,21 +122,43 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var _T=Object.create;var vi=Object.defineProperty,TT=Object.defineProperties,bT=Object.getOwnPropertyDescriptor,vT=Object.getOwnPropertyDescriptors,ET=Object.getOwnPropertyNames,Pf=Object.getOwnPropertySymbols,wT=Object.getPrototypeOf,Cf=Object.prototype.hasOwnProperty,OT=Object.prototype.propertyIsEnumerable;var xf=(r,e,t)=>e in r?vi(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Re=(r,e)=>{for(var t in e||(e={}))Cf.call(e,t)&&xf(r,t,e[t]);if(Pf)for(var t of Pf(e))OT.call(e,t)&&xf(r,t,e[t]);return r},wt=(r,e)=>TT(r,vT(e));var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),DT=(r,e)=>{for(var t in e)vi(r,t,{get:e[t],enumerable:!0})},Nf=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ET(e))!Cf.call(r,i)&&i!==t&&vi(r,i,{get:()=>e[i],enumerable:!(n=bT(e,i))||n.enumerable});return r};var Xs=(r,e,t)=>(t=r!=null?_T(wT(r)):{},Nf(e||!r||!r.__esModule?vi(t,"default",{value:r,enumerable:!0}):t,r)),RT=r=>Nf(vi({},"__esModule",{value:!0}),r);var N=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var sp=p((EA,ra)=>{var Lf,qf,Wf,Yf,jf,$f,Bf,Gf,Hf,ea,Uo,zf,Kf,Vf,kn,Xf,Zf,Qf,Jf,ep,tp,rp,np,ip,ta;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof ra=="object"&&typeof ra.exports=="object"?r(t(e,t(ra.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};Lf=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},qf=Object.assign||function(n){for(var i,s=1,a=arguments.length;s=0;c--)(l=n[c])&&(u=(o<3?l(u):o>3?l(i,s,u):l(i,s))||u);return o>3&&u&&Object.defineProperty(i,s,u),u},jf=function(n,i){return function(s,a){i(s,a,n)}},$f=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},Bf=function(n,i,s,a){function o(u){return u instanceof s?u:new s(function(l){l(u)})}return new(s||(s=Promise))(function(u,l){function c(h){try{f(a.next(h))}catch(y){l(y)}}function d(h){try{f(a.throw(h))}catch(y){l(y)}}function f(h){h.done?u(h.value):o(h.value).then(c,d)}f((a=a.apply(n,i||[])).next())})},Gf=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,o,u,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(h){return d([f,h])}}function d(f){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,o&&(u=f[0]&2?o.return:f[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,f[1])).done)return u;switch(o=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return s.label++,{value:f[1],done:!1};case 5:s.label++,o=f[1],f=[0];continue;case 7:f=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){s=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},Uo=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),o,u=[],l;try{for(;(i===void 0||i-- >0)&&!(o=a.next()).done;)u.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return u},zf=function(){for(var n=[],i=0;i1||c(m,g)})})}function c(m,g){try{d(a[m](g))}catch(O){y(u[0][3],O)}}function d(m){m.value instanceof kn?Promise.resolve(m.value.v).then(f,h):y(u[0][2],m)}function f(m){c("next",m)}function h(m){c("throw",m)}function y(m,g){m(g),u.shift(),u.length&&c(u[0][0],u[0][1])}},Zf=function(n){var i,s;return i={},a("next"),a("throw",function(o){throw o}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(o,u){i[o]=n[o]?function(l){return(s=!s)?{value:kn(n[o](l)),done:o==="return"}:u?u(l):l}:u}},Qf=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof ea=="function"?ea(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(l){return new Promise(function(c,d){l=n[u](l),o(c,d,l.done,l.value)})}}function o(u,l,c,d){Promise.resolve(d).then(function(f){u({value:f,done:c})},l)}},Jf=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};ep=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&ta(i,n,s);return t(i,n),i},tp=function(n){return n&&n.__esModule?n:{default:n}},rp=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},np=function(n,i,s,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(n,s):o?o.value=s:i.set(n,s),s},ip=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},r("__extends",Lf),r("__assign",qf),r("__rest",Wf),r("__decorate",Yf),r("__param",jf),r("__metadata",$f),r("__awaiter",Bf),r("__generator",Gf),r("__exportStar",Hf),r("__createBinding",ta),r("__values",ea),r("__read",Uo),r("__spread",zf),r("__spreadArrays",Kf),r("__spreadArray",Vf),r("__await",kn),r("__asyncGenerator",Xf),r("__asyncDelegator",Zf),r("__asyncValues",Qf),r("__makeTemplateObject",Jf),r("__importStar",ep),r("__importDefault",tp),r("__classPrivateFieldGet",rp),r("__classPrivateFieldSet",np),r("__classPrivateFieldIn",ip)})});var oe=p(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.matchAnyPattern=Ir.extractTerms=Ir.repeatedTimeunitPattern=void 0;function wb(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Ir.repeatedTimeunitPattern=wb;function ih(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Ir.extractTerms=ih;function Ob(r){return`(?:${ih(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Ir.matchAnyPattern=Ob});var te=p((Jo,eu)=>{(function(r,e){typeof Jo=="object"&&typeof eu!="undefined"?eu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Jo,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},O=function(A,E,b){var C=String(A);return!C||C.length>=E?A:""+Array(E+1-C.length).join(b)+A},w={s:O,z:function(A){var E=-A.utcOffset(),b=Math.abs(E),C=Math.floor(b/60),v=b%60;return(E<=0?"+":"-")+O(C,2,"0")+":"+O(v,2,"0")},m:function A(E,b){if(E.date(){"use strict";var Db=Fr&&Fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.findYearClosestToRef=Fr.findMostLikelyADYear=void 0;var Rb=Db(te());function Sb(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Fr.findMostLikelyADYear=Sb;function Mb(r,e,t){let n=Rb.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty($,"__esModule",{value:!0});$.parseTimeUnits=$.TIME_UNITS_PATTERN=$.parseYear=$.YEAR_PATTERN=$.parseOrdinalNumberPattern=$.ORDINAL_NUMBER_PATTERN=$.parseNumberPattern=$.NUMBER_PATTERN=$.TIME_UNIT_DICTIONARY=$.ORDINAL_WORD_DICTIONARY=$.INTEGER_WORD_DICTIONARY=$.MONTH_DICTIONARY=$.FULL_MONTH_NAME_DICTIONARY=$.WEEKDAY_DICTIONARY=void 0;var pa=oe(),kb=Ge();$.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};$.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};$.MONTH_DICTIONARY=Object.assign(Object.assign({},$.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});$.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};$.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};$.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};$.NUMBER_PATTERN=`(?:${pa.matchAnyPattern($.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function ah(r){let e=r.toLowerCase();return $.INTEGER_WORD_DICTIONARY[e]!==void 0?$.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}$.parseNumberPattern=ah;$.ORDINAL_NUMBER_PATTERN=`(?:${pa.matchAnyPattern($.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Ab(r){let e=r.toLowerCase();return $.ORDINAL_WORD_DICTIONARY[e]!==void 0?$.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}$.parseOrdinalNumberPattern=Ab;$.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function Pb(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return kb.findMostLikelyADYear(e)}$.parseYear=Pb;var oh=`(${$.NUMBER_PATTERN})\\s{0,3}(${pa.matchAnyPattern($.TIME_UNIT_DICTIONARY)})`,sh=new RegExp(oh,"i");$.TIME_UNITS_PATTERN=pa.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",oh);function xb(r){let e={},t=r,n=sh.exec(t);for(;n;)Cb(e,n),t=t.substring(n[0].length).trim(),n=sh.exec(t);return e}$.parseTimeUnits=xb;function Cb(r,e){let t=ah(e[1]),n=$.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var uh=p((tu,ru)=>{(function(r,e){typeof tu=="object"&&typeof ru!="undefined"?ru.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(tu,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Mt=p(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.implySimilarTime=er.assignSimilarTime=er.assignSimilarDate=er.assignTheNextDay=void 0;var lh=Ne();function Nb(r,e){e=e.add(1,"day"),ch(r,e),dh(r,e)}er.assignTheNextDay=Nb;function ch(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}er.assignSimilarDate=ch;function Ib(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",lh.Meridiem.AM):r.assign("meridiem",lh.Meridiem.PM)}er.assignSimilarTime=Ib;function dh(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}er.implySimilarTime=dh});var fh=p(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.toTimezoneOffset=rn.TIMEZONE_ABBR_MAP=void 0;rn.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function Fb(r){var e;return r==null?null:typeof r=="number"?r:(e=rn.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}rn.toTimezoneOffset=Fb});var Ee=p(tr=>{"use strict";var ph=tr&&tr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tr,"__esModule",{value:!0});tr.ParsingResult=tr.ParsingComponents=tr.ReferenceWithTimezone=void 0;var Ub=ph(uh()),ha=ph(te()),nu=Mt(),Lb=fh();ha.default.extend(Ub.default);var iu=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=Lb.toTimezoneOffset(e.timezone))}};tr.ReferenceWithTimezone=iu;var nn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=ha.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new nn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return ha.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=ha.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new nn(e);return t.hour||t.minute||t.second?(nu.assignSimilarTime(i,n),nu.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(nu.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};tr.ParsingComponents=nn;var Ni=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new nn(e),this.end=s}clone(){let e=new Ni(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};tr.ParsingResult=Ni});var R=p(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.AbstractParserWithWordBoundaryChecking=void 0;var su=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var ou=He(),qb=Ee(),Wb=R(),Yb=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ou.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),jb=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ou.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),au=class extends Wb.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?jb:Yb}innerExtract(e,t){let n=ou.parseTimeUnits(t[1]);return qb.ParsingComponents.createRelativeFromReference(e.reference,n)}};uu.default=au});var bh=p(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});var $b=Ge(),_h=He(),Th=He(),ya=He(),Bb=oe(),Gb=R(),Hb=new RegExp(`(?:on\\s{0,3})?(${ya.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${ya.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Bb.matchAnyPattern(_h.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Th.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),mh=1,yh=2,zb=3,gh=4,lu=class extends Gb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Hb}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=_h.MONTH_DICTIONARY[t[zb].toLowerCase()],s=ya.parseOrdinalNumberPattern(t[mh]);if(s>31)return t.index=t.index+t[mh].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[gh]){let a=Th.parseYear(t[gh]);n.start.assign("year",a)}else{let a=$b.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[yh]){let a=ya.parseOrdinalNumberPattern(t[yh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};cu.default=lu});var Dh=p(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var Kb=Ge(),wh=He(),ga=He(),Oh=He(),Vb=oe(),Xb=R(),Zb=new RegExp(`(${Vb.matchAnyPattern(wh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${ga.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${ga.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Oh.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Qb=1,Jb=2,vh=3,Eh=4,du=class extends Xb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zb}innerExtract(e,t){let n=wh.MONTH_DICTIONARY[t[Qb].toLowerCase()],i=ga.parseOrdinalNumberPattern(t[Jb]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Eh]){let u=Oh.parseYear(t[Eh]);s.assign("year",u)}else{let u=Kb.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[vh])return s;let a=ga.parseOrdinalNumberPattern(t[vh]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};fu.default=du});var Mh=p(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var pu=He(),ev=Ge(),tv=oe(),Sh=He(),rv=R(),nv=new RegExp(`((?:in)\\s*)?(${tv.matchAnyPattern(pu.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Sh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),iv=1,sv=2,Rh=3,hu=class extends rv.AbstractParserWithWordBoundaryChecking{innerPattern(){return nv}innerExtract(e,t){let n=t[sv].toLowerCase();if(t[0].length<=3&&!pu.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[iv]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=pu.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Rh]){let a=Sh.parseYear(t[Rh]);i.start.assign("year",a)}else{let a=ev.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};mu.default=hu});var Ph=p(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var Ah=He(),av=oe(),ov=R(),uv=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${av.matchAnyPattern(Ah.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),lv=1,cv=2,kh=3,dv=4,yu=class extends ov.AbstractParserWithWordBoundaryChecking{innerPattern(){return uv}innerExtract(e,t){let n=t[kh]?parseInt(t[kh]):Ah.MONTH_DICTIONARY[t[cv].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[lv]);return{day:parseInt(t[dv]),month:n,year:i}}};gu.default=yu});var xh=p(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var fv=R(),pv=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),hv=1,mv=2,_u=class extends fv.AbstractParserWithWordBoundaryChecking{innerPattern(){return pv}innerExtract(e,t){let n=parseInt(t[mv]),i=parseInt(t[hv]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Tu.default=_u});var sn=p(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.AbstractTimeExpressionParser=void 0;var et=Ne();function yv(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function gv(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Ch=2,In=3,_a=4,Ta=5,Ii=6,bu=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Ch]);if(o>100){if(this.strictMode||t[In]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[In]!=null){if(t[In].length==1&&!t[Ii])return null;s=parseInt(t[In])}if(s>=60)return null;if(o>12&&(a=et.Meridiem.PM),t[Ii]!=null){if(o>12)return null;let u=t[Ii][0].toLowerCase();u=="a"&&(a=et.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=et.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",et.Meridiem.AM):i.imply("meridiem",et.Meridiem.PM),t[Ta]!=null){let u=parseInt(t[Ta].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[_a]!=null){let u=parseInt(t[_a]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Ta]!=null){let u=parseInt(t[Ta].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[_a]!=null){let u=parseInt(t[_a]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Ch]),a=0,o=-1;if(t[In]!=null?a=parseInt(t[In]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=et.Meridiem.PM),t[Ii]!=null){if(s>12)return null;let u=t[Ii][0].toLowerCase();u=="a"&&(o=et.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=et.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==et.Meridiem.AM?(n.start.imply("meridiem",et.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",et.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",et.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",et.Meridiem.PM)):s>12?i.imply("meridiem",et.Meridiem.PM):s<=12&&i.imply("meridiem",et.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=yv(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=gv(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};ba.AbstractTimeExpressionParser=bu});var Nh=p(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var va=Ne(),_v=sn(),vu=class extends _v.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",va.Meridiem.PM)):i<6&&n.assign("meridiem",va.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",va.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",va.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Eu.default=vu});var kt=p(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.addImpliedTimeUnits=Fn.reverseTimeUnits=void 0;function Tv(r){let e={};for(let t in r)e[t]=-r[t];return e}Fn.reverseTimeUnits=Tv;function bv(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}Fn.addImpliedTimeUnits=bv});var Ih=p(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Ou=He(),vv=Ee(),Ev=R(),wv=kt(),Ov=new RegExp(`(${Ou.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Dv=new RegExp(`(${Ou.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),wu=class extends Ev.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Dv:Ov}innerExtract(e,t){let n=Ou.parseTimeUnits(t[1]),i=wv.reverseTimeUnits(n);return vv.ParsingComponents.createRelativeFromReference(e.reference,i)}};Du.default=wu});var Fh=p(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var Su=He(),Rv=Ee(),Sv=R(),Mv=new RegExp(`(${Su.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),kv=new RegExp("("+Su.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Av=1,Ru=class extends Sv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?kv:Mv}innerExtract(e,t){let n=Su.parseTimeUnits(t[Av]);return Rv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Mu.default=Ru});var Ln=p(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.MergingRefiner=Un.Filter=void 0;var ku=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Un.Filter=ku;var Au=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};Un.MergingRefiner=Au});var rr=p(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Pv=Ln(),Pu=class extends Pv.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var xv=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0});var Cv=xv(rr()),Cu=class extends Cv.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Fi.default=Cu});var Lh=p(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.mergeDateTimeComponent=qn.mergeDateTimeResult=void 0;var Nv=Ne();function Iv(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=Nu(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=Nu(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var Fv=Ln(),qh=Lh(),Iu=class extends Fv.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?qh.mergeDateTimeResult(t,n):qh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Fu.default=Iu});var Wh=p(Ui=>{"use strict";var Uv=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});var Lv=Uv(dr()),Uu=class extends Lv.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Ui.default=Uu});var Yh=p(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var qv=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Wv={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},Lu=class{constructor(e){this.timezone=Object.assign(Object.assign({},Wv),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=qv.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};qu.default=Lu});var Ea=p(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var Yv=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),jv=1,$v=2,Bv=3,Wu=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=Yv.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[$v]),o=parseInt(s[Bv]||"0"),u=a*60+o;u>14*60||(s[jv]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};Yu.default=Wu});var jh=p($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var ju=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};$u.default=ju});var $h=p(Li=>{"use strict";var Gv=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var Hv=Gv(te()),Bu=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=Hv.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Li.default=Bu});var Bh=p(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var zv=Ln(),Gu=class extends zv.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};Hu.default=Gu});var Vu=p(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var Kv=R(),Vv=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),Xv=1,Zv=2,Qv=3,Gh=4,Jv=5,Hh=6,zh=7,Kh=8,Vh=9,zu=class extends Kv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Vv}innerExtract(e,t){let n={};if(n.year=parseInt(t[Xv]),n.month=parseInt(t[Zv]),n.day=parseInt(t[Qv]),t[Gh]!=null)if(n.hour=parseInt(t[Gh]),n.minute=parseInt(t[Jv]),t[Hh]!=null&&(n.second=parseInt(t[Hh])),t[zh]!=null&&(n.millisecond=parseInt(t[zh])),t[Kh]==null)n.timezoneOffset=0;else{let i=parseInt(t[Kh]),s=0;t[Vh]!=null&&(s=parseInt(t[Vh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};Ku.default=zu});var Xh=p(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var eE=Ln(),Xu=class extends eE.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Zu.default=Xu});var fr=p(Wn=>{"use strict";var an=Wn&&Wn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.includeCommonConfiguration=void 0;var tE=an(Yh()),rE=an(Ea()),Zh=an(jh()),nE=an($h()),iE=an(Bh()),sE=an(Vu()),aE=an(Xh());function oE(r,e=!1){return r.parsers.unshift(new sE.default),r.refiners.unshift(new aE.default),r.refiners.unshift(new tE.default),r.refiners.unshift(new rE.default),r.refiners.unshift(new Zh.default),r.refiners.push(new Zh.default),r.refiners.push(new nE.default),r.refiners.push(new iE.default(e)),r}Wn.includeCommonConfiguration=oE});var hr=p(ae=>{"use strict";var uE=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ae,"__esModule",{value:!0});ae.noon=ae.morning=ae.midnight=ae.yesterdayEvening=ae.evening=ae.lastNight=ae.tonight=ae.theDayAfter=ae.tomorrow=ae.theDayBefore=ae.yesterday=ae.today=ae.now=void 0;var nr=Ee(),Yn=uE(te()),pr=Mt(),qi=Ne();function lE(r){let e=Yn.default(r.instant),t=new nr.ParsingComponents(r,{});return pr.assignSimilarDate(t,e),pr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}ae.now=lE;function cE(r){let e=Yn.default(r.instant),t=new nr.ParsingComponents(r,{});return pr.assignSimilarDate(t,e),pr.implySimilarTime(t,e),t}ae.today=cE;function dE(r){return Qh(r,1)}ae.yesterday=dE;function Qh(r,e){return Qu(r,-e)}ae.theDayBefore=Qh;function fE(r){return Qu(r,1)}ae.tomorrow=fE;function Qu(r,e){let t=Yn.default(r.instant),n=new nr.ParsingComponents(r,{});return t=t.add(e,"day"),pr.assignSimilarDate(n,t),pr.implySimilarTime(n,t),n}ae.theDayAfter=Qu;function pE(r,e=22){let t=Yn.default(r.instant),n=new nr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",qi.Meridiem.PM),pr.assignSimilarDate(n,t),n}ae.tonight=pE;function hE(r,e=0){let t=Yn.default(r.instant),n=new nr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),pr.assignSimilarDate(n,t),n.imply("hour",e),n}ae.lastNight=hE;function mE(r,e=20){let t=new nr.ParsingComponents(r,{});return t.imply("meridiem",qi.Meridiem.PM),t.imply("hour",e),t}ae.evening=mE;function yE(r,e=20){let t=Yn.default(r.instant),n=new nr.ParsingComponents(r,{});return t=t.add(-1,"day"),pr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",qi.Meridiem.PM),n}ae.yesterdayEvening=yE;function gE(r){let e=new nr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}ae.midnight=gE;function _E(r,e=6){let t=new nr.ParsingComponents(r,{});return t.imply("meridiem",qi.Meridiem.AM),t.imply("hour",e),t}ae.morning=_E;function TE(r){let e=new nr.ParsingComponents(r,{});return e.imply("meridiem",qi.Meridiem.AM),e.imply("hour",12),e}ae.noon=TE});var Jh=p(jt=>{"use strict";var bE=jt&&jt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),vE=jt&&jt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),EE=jt&&jt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&bE(e,r,t);return vE(e,r),e},wE=jt&&jt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jt,"__esModule",{value:!0});var OE=wE(te()),DE=R(),RE=Mt(),Wi=EE(hr()),SE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Ju=class extends DE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return SE}innerExtract(e,t){let n=OE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return Wi.now(e.reference);case"today":return Wi.today(e.reference);case"yesterday":return Wi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Wi.tomorrow(e.reference);case"tonight":return Wi.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),RE.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};jt.default=Ju});var em=p(Yi=>{"use strict";var ME=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var wa=Ne(),kE=R(),AE=ME(te()),PE=Mt(),xE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,el=class extends kE.AbstractParserWithWordBoundaryChecking{innerPattern(){return xE}innerExtract(e,t){let n=AE.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",wa.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",wa.Meridiem.PM),i.imply("hour",20);break;case"midnight":PE.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",wa.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",wa.Meridiem.AM),i.imply("hour",12);break}return i}};Yi.default=el});var on=p(Ur=>{"use strict";var CE=Ur&&Ur.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.toDayJSClosestWeekday=Ur.toDayJSWeekday=void 0;var tm=CE(te());function NE(r,e,t){if(!t)return rm(r,e);let n=tm.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Ur.toDayJSWeekday=NE;function rm(r,e){let t=tm.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var nm=He(),IE=oe(),FE=R(),UE=on(),LE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${IE.matchAnyPattern(nm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),qE=1,WE=2,YE=3,tl=class extends FE.AbstractParserWithWordBoundaryChecking{innerPattern(){return LE}innerExtract(e,t){let n=t[WE].toLowerCase(),i=nm.WEEKDAY_DICTIONARY[n],s=t[qE],a=t[YE],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=UE.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};rl.default=tl});var om=p(ji=>{"use strict";var jE=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var am=He(),sm=Ee(),$E=jE(te()),BE=R(),GE=oe(),HE=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${GE.matchAnyPattern(am.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),zE=1,KE=2,nl=class extends BE.AbstractParserWithWordBoundaryChecking{innerPattern(){return HE}innerExtract(e,t){let n=t[zE].toLowerCase(),i=t[KE].toLowerCase(),s=am.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,sm.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,sm.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=$E.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ji.default=nl});var $t=p(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ParsingContext=Bn.Chrono=void 0;var jn=Ee(),VE=il(),$n=class{constructor(e){e=e||VE.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new $n({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new Oa(e,t,n),s=[];return this.parsers.forEach(a=>{let o=$n.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof jn.ParsingResult?c=l:l instanceof jn.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};Bn.Chrono=$n;var Oa=class{constructor(e,t,n){this.text=e,this.reference=new jn.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof jn.ParsingComponents?e:new jn.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new jn.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};Bn.ParsingContext=Oa});var un=p(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var um=Ge(),XE=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Da=1,lm=5,cm=2,dm=3,sl=4,al=class{constructor(e){this.groupNumberMonth=e?dm:cm,this.groupNumberDay=e?cm:dm}pattern(){return XE}extract(e,t){if(t[Da]=="/"||t[lm]=="/"){t.index+=t[0].length;return}let n=t.index+t[Da].length,i=t[0].substr(t[Da].length,t[0].length-t[Da].length-t[lm].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[sl]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[sl]){let u=parseInt(t[sl]),l=um.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=um.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};ol.default=al});var pm=p(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var fm=He(),ZE=Ee(),QE=R(),JE=kt(),e1=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${fm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ul=class extends QE.AbstractParserWithWordBoundaryChecking{innerPattern(){return e1}innerExtract(e,t){let n=t[1].toLowerCase(),i=fm.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=JE.reverseTimeUnits(i);break}return ZE.ParsingComponents.createRelativeFromReference(e.reference,i)}};ll.default=ul});var mm=p(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var t1=Ln(),cl=Ee(),r1=He(),n1=kt();function hm(r){return r.text.match(/\s+(before|from)$/i)!=null}function i1(r){return r.text.match(/\s+(after|since)$/i)!=null}var dl=class extends t1.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!hm(t)&&!i1(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=r1.parseTimeUnits(t.text);hm(t)&&(i=n1.reverseTimeUnits(i));let s=cl.ParsingComponents.createRelativeFromReference(new cl.ReferenceWithTimezone(n.start.date()),i);return new cl.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};fl.default=dl});var il=p(Me=>{"use strict";var Ue=Me&&Me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Me,"__esModule",{value:!0});Me.createConfiguration=Me.createCasualConfiguration=Me.parseDate=Me.parse=Me.GB=Me.strict=Me.casual=void 0;var s1=Ue(hh()),a1=Ue(bh()),o1=Ue(Dh()),u1=Ue(Mh()),l1=Ue(Ph()),c1=Ue(xh()),d1=Ue(Nh()),f1=Ue(Ih()),p1=Ue(Fh()),h1=Ue(Uh()),m1=Ue(Wh()),y1=fr(),g1=Ue(Jh()),_1=Ue(em()),T1=Ue(im()),b1=Ue(om()),pl=$t(),v1=Ue(un()),E1=Ue(pm()),w1=Ue(mm());Me.casual=new pl.Chrono(ym(!1));Me.strict=new pl.Chrono(Ra(!0,!1));Me.GB=new pl.Chrono(Ra(!1,!0));function O1(r,e,t){return Me.casual.parse(r,e,t)}Me.parse=O1;function D1(r,e,t){return Me.casual.parseDate(r,e,t)}Me.parseDate=D1;function ym(r=!1){let e=Ra(!1,r);return e.parsers.unshift(new g1.default),e.parsers.unshift(new _1.default),e.parsers.unshift(new u1.default),e.parsers.unshift(new b1.default),e.parsers.unshift(new E1.default),e}Me.createCasualConfiguration=ym;function Ra(r=!0,e=!1){return y1.includeCommonConfiguration({parsers:[new v1.default(e),new s1.default,new a1.default,new o1.default,new T1.default,new l1.default,new c1.default,new d1.default(r),new f1.default(r),new p1.default(r)],refiners:[new w1.default,new m1.default,new h1.default]},r)}Me.createConfiguration=Ra});var gm=p(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var R1=sn(),hl=class extends R1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};ml.default=hl});var $i=p(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.parseTimeUnits=le.TIME_UNITS_PATTERN=le.parseYear=le.YEAR_PATTERN=le.parseNumberPattern=le.NUMBER_PATTERN=le.TIME_UNIT_DICTIONARY=le.INTEGER_WORD_DICTIONARY=le.MONTH_DICTIONARY=le.WEEKDAY_DICTIONARY=void 0;var yl=oe(),S1=Ge();le.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};le.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};le.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};le.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};le.NUMBER_PATTERN=`(?:${yl.matchAnyPattern(le.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Tm(r){let e=r.toLowerCase();return le.INTEGER_WORD_DICTIONARY[e]!==void 0?le.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}le.parseNumberPattern=Tm;le.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function M1(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return S1.findMostLikelyADYear(e)}le.parseYear=M1;var bm=`(${le.NUMBER_PATTERN})\\s{0,5}(${yl.matchAnyPattern(le.TIME_UNIT_DICTIONARY)})\\s{0,5}`,_m=new RegExp(bm,"i");le.TIME_UNITS_PATTERN=yl.repeatedTimeunitPattern("",bm);function k1(r){let e={},t=r,n=_m.exec(t);for(;n;)A1(e,n),t=t.substring(n[0].length),n=_m.exec(t);return e}le.parseTimeUnits=k1;function A1(r,e){let t=Tm(e[1]),n=le.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Em=p(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var vm=$i(),P1=oe(),x1=R(),C1=on(),N1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${P1.matchAnyPattern(vm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),I1=1,F1=3,U1=2,gl=class extends x1.AbstractParserWithWordBoundaryChecking{innerPattern(){return N1}innerExtract(e,t){let n=t[U1].toLowerCase(),i=vm.WEEKDAY_DICTIONARY[n],s=t[I1],a=t[F1],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=C1.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};_l.default=gl});var Rm=p(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var Lr=Ne(),L1=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),q1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),W1=2,wm=3,Om=4,Dm=5,Gn=class{pattern(e){return L1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Gn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=q1.exec(i);return s&&(n.end=Gn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[W1]),t[wm]!=null&&(i=parseInt(t[wm])),i>=60||n>24)return null;if(n>=12&&(s=Lr.Meridiem.PM),t[Dm]!=null){if(n>12)return null;let a=t[Dm].toLowerCase();a.match(/morgen|vormittag/)&&(s=Lr.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Lr.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Lr.Meridiem.AM,n=0):n<6?s=Lr.Meridiem.AM:(s=Lr.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Lr.Meridiem.AM):e.imply("meridiem",Lr.Meridiem.PM),t[Om]!=null){let a=parseInt(t[Om]);if(a>=60)return null;e.assign("second",a)}return e}};Tl.default=Gn});var Sm=p(Bi=>{"use strict";var Y1=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var j1=Y1(rr()),bl=class extends j1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Bi.default=bl});var Mm=p(Gi=>{"use strict";var $1=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var B1=$1(dr()),vl=class extends B1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Gi.default=vl});var El=p(zi=>{"use strict";var G1=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var H1=G1(te()),ln=Ne(),z1=R(),K1=Mt(),V1=kt(),Hi=class extends z1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=H1.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return K1.implySimilarTime(s,n),Hi.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=V1.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ln.Meridiem.AM);break}return e}};zi.default=Hi});var Pm=p(Bt=>{"use strict";var X1=Bt&&Bt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Z1=Bt&&Bt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Q1=Bt&&Bt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&X1(e,r,t);return Z1(e,r),e},Am=Bt&&Bt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bt,"__esModule",{value:!0});var J1=Am(te()),ew=R(),cn=Mt(),tw=Am(El()),km=Q1(hr()),rw=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),nw=1,iw=2,wl=class extends ew.AbstractParserWithWordBoundaryChecking{innerPattern(e){return rw}innerExtract(e,t){let n=J1.default(e.refDate),i=(t[nw]||"").toLowerCase(),s=(t[iw]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=km.now(e.reference);break;case"heute":a=km.today(e.reference);break;case"morgen":cn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),cn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),cn.assignSimilarDate(a,n),cn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),cn.assignSimilarDate(a,n),cn.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),cn.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=tw.default.extractTimeComponents(a,s)),a}};Bt.default=wl});var Um=p(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var sw=Ge(),Im=$i(),Fm=$i(),aw=oe(),ow=R(),uw=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${aw.matchAnyPattern(Im.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Fm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),xm=1,Cm=2,lw=3,Nm=4,Ol=class extends ow.AbstractParserWithWordBoundaryChecking{innerPattern(){return uw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Im.MONTH_DICTIONARY[t[lw].toLowerCase()],s=parseInt(t[xm]);if(s>31)return t.index=t.index+t[xm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Nm]){let a=Fm.parseYear(t[Nm]);n.start.assign("year",a)}else{let a=sw.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Cm]){let a=parseInt(t[Cm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Dl.default=Ol});var Lm=p(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var Sa=$i(),cw=Ee(),dw=R(),fw=kt(),pw=oe(),Rl=class extends dw.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Sa.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${pw.matchAnyPattern(Sa.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Sa.parseNumberPattern(t[2]):1,i=Sa.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=fw.reverseTimeUnits(s)),cw.ParsingComponents.createRelativeFromReference(e.reference,s)}};Sl.default=Rl});var Ym=p(Le=>{"use strict";var Gt=Le&&Le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Le,"__esModule",{value:!0});Le.createConfiguration=Le.createCasualConfiguration=Le.parseDate=Le.parse=Le.strict=Le.casual=void 0;var hw=fr(),qm=$t(),mw=Gt(un()),yw=Gt(Vu()),gw=Gt(gm()),_w=Gt(Em()),Tw=Gt(Rm()),bw=Gt(Sm()),vw=Gt(Mm()),Ew=Gt(Pm()),ww=Gt(El()),Ow=Gt(Um()),Dw=Gt(Lm());Le.casual=new qm.Chrono(Wm());Le.strict=new qm.Chrono(Ml(!0));function Rw(r,e,t){return Le.casual.parse(r,e,t)}Le.parse=Rw;function Sw(r,e,t){return Le.casual.parseDate(r,e,t)}Le.parseDate=Sw;function Wm(r=!0){let e=Ml(!1,r);return e.parsers.unshift(new ww.default),e.parsers.unshift(new Ew.default),e.parsers.unshift(new Dw.default),e}Le.createCasualConfiguration=Wm;function Ml(r=!0,e=!0){return hw.includeCommonConfiguration({parsers:[new yw.default,new mw.default(e),new gw.default,new Tw.default,new Ow.default,new _w.default],refiners:[new bw.default,new vw.default]},r)}Le.createConfiguration=Ml});var $m=p(Ht=>{"use strict";var Mw=Ht&&Ht.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),kw=Ht&&Ht.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Aw=Ht&&Ht.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Mw(e,r,t);return kw(e,r),e},Pw=Ht&&Ht.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ht,"__esModule",{value:!0});var xw=Pw(te()),Cw=Ne(),Nw=R(),jm=Mt(),Ma=Aw(hr()),kl=class extends Nw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=xw.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Ma.now(e.reference);case"aujourd'hui":return Ma.today(e.reference);case"hier":return Ma.yesterday(e.reference);case"demain":return Ma.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(jm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",Cw.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),jm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Ht.default=kl});var Bm=p(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var Ki=Ne(),Iw=R(),Al=class extends Iw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Ki.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Ki.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Ki.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Ki.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Ki.Meridiem.AM);break}return i}};Pl.default=Al});var Gm=p(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var Fw=sn(),xl=class extends Fw.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Cl.default=xl});var Hm=p(Vi=>{"use strict";var Uw=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var Lw=Uw(dr()),Nl=class extends Lw.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Vi.default=Nl});var zm=p(Xi=>{"use strict";var qw=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var Ww=qw(rr()),Il=class extends Ww.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Xi.default=Il});var qr=p(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.parseTimeUnits=re.TIME_UNITS_PATTERN=re.parseYear=re.YEAR_PATTERN=re.parseOrdinalNumberPattern=re.ORDINAL_NUMBER_PATTERN=re.parseNumberPattern=re.NUMBER_PATTERN=re.TIME_UNIT_DICTIONARY=re.INTEGER_WORD_DICTIONARY=re.MONTH_DICTIONARY=re.WEEKDAY_DICTIONARY=void 0;var Fl=oe();re.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};re.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};re.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};re.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};re.NUMBER_PATTERN=`(?:${Fl.matchAnyPattern(re.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Vm(r){let e=r.toLowerCase();return re.INTEGER_WORD_DICTIONARY[e]!==void 0?re.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}re.parseNumberPattern=Vm;re.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function Yw(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}re.parseOrdinalNumberPattern=Yw;re.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function jw(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}re.parseYear=jw;var Xm=`(${re.NUMBER_PATTERN})\\s{0,5}(${Fl.matchAnyPattern(re.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Km=new RegExp(Xm,"i");re.TIME_UNITS_PATTERN=Fl.repeatedTimeunitPattern("",Xm);function $w(r){let e={},t=r,n=Km.exec(t);for(;n;)Bw(e,n),t=t.substring(n[0].length),n=Km.exec(t);return e}re.parseTimeUnits=$w;function Bw(r,e){let t=Vm(e[1]),n=re.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Qm=p(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var Zm=qr(),Gw=oe(),Hw=R(),zw=on(),Kw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${Gw.matchAnyPattern(Zm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),Vw=1,Xw=2,Ul=class extends Hw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Kw}innerExtract(e,t){let n=t[Vw].toLowerCase(),i=Zm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[Xw];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=zw.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Ll.default=Ul});var ry=p(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var Zi=Ne(),Zw=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),Qw=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),Jw=2,Jm=3,ey=4,ty=5,Hn=class{pattern(e){return Zw}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Hn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=Qw.exec(i);return s&&(n.end=Hn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[Jw]),t[Jm]!=null&&(i=parseInt(t[Jm])),i>=60||n>24)return null;if(n>=12&&(s=Zi.Meridiem.PM),t[ty]!=null){if(n>12)return null;let a=t[ty][0].toLowerCase();a=="a"&&(s=Zi.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Zi.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Zi.Meridiem.AM):e.imply("meridiem",Zi.Meridiem.PM),t[ey]!=null){let a=parseInt(t[ey]);if(a>=60)return null;e.assign("second",a)}return e}};ql.default=Hn});var uy=p(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var e0=Ge(),ay=qr(),oy=qr(),ka=qr(),t0=oe(),r0=R(),n0=new RegExp(`(?:on\\s*?)?(${ka.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${ka.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${t0.matchAnyPattern(ay.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${oy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),ny=1,iy=2,i0=3,sy=4,Wl=class extends r0.AbstractParserWithWordBoundaryChecking{innerPattern(){return n0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ay.MONTH_DICTIONARY[t[i0].toLowerCase()],s=ka.parseOrdinalNumberPattern(t[ny]);if(s>31)return t.index=t.index+t[ny].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[sy]){let a=oy.parseYear(t[sy]);n.start.assign("year",a)}else{let a=e0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[iy]){let a=ka.parseOrdinalNumberPattern(t[iy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Yl.default=Wl});var cy=p($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var ly=qr(),s0=Ee(),a0=R(),o0=kt(),jl=class extends a0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${ly.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=ly.parseTimeUnits(t[1]),i=o0.reverseTimeUnits(n);return s0.ParsingComponents.createRelativeFromReference(e.reference,i)}};$l.default=jl});var fy=p(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var dy=qr(),u0=Ee(),l0=R(),Bl=class extends l0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${dy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=dy.parseTimeUnits(t[1]);return u0.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=Bl});var py=p(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Aa=qr(),c0=Ee(),d0=R(),f0=kt(),p0=oe(),Hl=class extends d0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Aa.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${p0.matchAnyPattern(Aa.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?Aa.parseNumberPattern(t[1]):1,i=Aa.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=f0.reverseTimeUnits(s)),c0.ParsingComponents.createRelativeFromReference(e.reference,s)}};zl.default=Hl});var yy=p(qe=>{"use strict";var At=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});qe.createConfiguration=qe.createCasualConfiguration=qe.parseDate=qe.parse=qe.strict=qe.casual=void 0;var h0=fr(),hy=$t(),m0=At($m()),y0=At(Bm()),g0=At(un()),_0=At(Gm()),T0=At(Hm()),b0=At(zm()),v0=At(Qm()),E0=At(ry()),w0=At(uy()),O0=At(cy()),D0=At(fy()),R0=At(py());qe.casual=new hy.Chrono(my());qe.strict=new hy.Chrono(Kl(!0));function S0(r,e,t){return qe.casual.parse(r,e,t)}qe.parse=S0;function M0(r,e,t){return qe.casual.parseDate(r,e,t)}qe.parseDate=M0;function my(r=!0){let e=Kl(!1,r);return e.parsers.unshift(new m0.default),e.parsers.unshift(new y0.default),e.parsers.unshift(new R0.default),e}qe.createCasualConfiguration=my;function Kl(r=!0,e=!0){return h0.includeCommonConfiguration({parsers:[new g0.default(e),new w0.default,new _0.default,new E0.default,new O0.default,new D0.default,new v0.default],refiners:[new T0.default,new b0.default]},r)}qe.createConfiguration=Kl});var gy=p(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.toHankaku=void 0;function k0(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,A0)}Pa.toHankaku=k0;function A0(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Ty=p(Qi=>{"use strict";var P0=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var Vl=gy(),x0=Ge(),C0=P0(te()),N0=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,_y=1,I0=2,Xl=3,F0=4,U0=5,L0=6,Zl=class{pattern(){return N0}extract(e,t){let n=parseInt(Vl.toHankaku(t[U0])),i=parseInt(Vl.toHankaku(t[L0])),s=e.createParsingComponents({day:i,month:n});if(t[_y]&&t[_y].match("\u540C|\u4ECA|\u672C")){let a=C0.default(e.refDate);s.assign("year",a.year())}if(t[I0]){let a=t[F0],o=a=="\u5143"?1:parseInt(Vl.toHankaku(a));t[Xl]=="\u4EE4\u548C"?o+=2018:t[Xl]=="\u5E73\u6210"?o+=1988:t[Xl]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=x0.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Qi.default=Zl});var by=p(Ji=>{"use strict";var q0=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var W0=q0(rr()),Ql=class extends W0.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ji.default=Ql});var Ey=p(zt=>{"use strict";var Y0=zt&&zt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),j0=zt&&zt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),$0=zt&&zt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Y0(e,r,t);return j0(e,r),e},B0=zt&&zt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zt,"__esModule",{value:!0});var G0=B0(te()),vy=Ne(),Jl=$0(hr()),H0=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,ec=class{pattern(){return H0}extract(e,t){let n=t[0],i=G0.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Jl.yesterday(e.reference);case"\u660E\u65E5":return Jl.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Jl.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",vy.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",vy.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};zt.default=ec});var Dy=p(We=>{"use strict";var tc=We&&We.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(We,"__esModule",{value:!0});We.createConfiguration=We.createCasualConfiguration=We.parseDate=We.parse=We.strict=We.casual=void 0;var z0=tc(Ty()),K0=tc(by()),V0=tc(Ey()),wy=$t();We.casual=new wy.Chrono(Oy());We.strict=new wy.Chrono(rc());function X0(r,e,t){return We.casual.parse(r,e,t)}We.parse=X0;function Z0(r,e,t){return We.casual.parseDate(r,e,t)}We.parseDate=Z0;function Oy(){let r=rc();return r.parsers.unshift(new V0.default),r}We.createCasualConfiguration=Oy;function rc(){return{parsers:[new z0.default],refiners:[new K0.default]}}We.createConfiguration=rc});var xa=p(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.parseYear=ir.YEAR_PATTERN=ir.MONTH_DICTIONARY=ir.WEEKDAY_DICTIONARY=void 0;ir.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};ir.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};ir.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function Q0(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}ir.parseYear=Q0});var Sy=p(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Ry=xa(),J0=oe(),eO=R(),tO=on(),rO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${J0.matchAnyPattern(Ry.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),nO=1,iO=2,sO=3,nc=class extends eO.AbstractParserWithWordBoundaryChecking{innerPattern(){return rO}innerExtract(e,t){let n=t[iO].toLowerCase(),i=Ry.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[nO],a=t[sO],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=tO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};ic.default=nc});var My=p(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var aO=sn(),sc=class extends aO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};ac.default=sc});var ky=p(es=>{"use strict";var oO=es&&es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(es,"__esModule",{value:!0});var uO=oO(dr()),oc=class extends uO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};es.default=oc});var Ay=p(ts=>{"use strict";var lO=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var cO=lO(rr()),uc=class extends cO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ts.default=uc});var Fy=p(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var dO=Ge(),Ny=xa(),Iy=xa(),fO=oe(),pO=R(),hO=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${fO.matchAnyPattern(Ny.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Iy.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Py=1,xy=2,mO=3,Cy=4,lc=class extends pO.AbstractParserWithWordBoundaryChecking{innerPattern(){return hO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ny.MONTH_DICTIONARY[t[mO].toLowerCase()],s=parseInt(t[Py]);if(s>31)return t.index=t.index+t[Py].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Cy]){let a=Iy.parseYear(t[Cy]);n.start.assign("year",a)}else{let a=dO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[xy]){let a=parseInt(t[xy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};cc.default=lc});var Uy=p(mr=>{"use strict";var yO=mr&&mr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gO=mr&&mr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),_O=mr&&mr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&yO(e,r,t);return gO(e,r),e};Object.defineProperty(mr,"__esModule",{value:!0});var TO=R(),Ca=_O(hr()),dc=class extends TO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return Ca.now(e.reference);case"hoje":return Ca.today(e.reference);case"amanha":case"amanh\xE3":return Ca.tomorrow(e.reference);case"ontem":return Ca.yesterday(e.reference)}return i}};mr.default=dc});var Ly=p(rs=>{"use strict";var bO=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0});var Na=Ne(),vO=R(),EO=Mt(),wO=bO(te()),fc=class extends vO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=wO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",Na.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",Na.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",Na.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":EO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",Na.Meridiem.AM),i.imply("hour",12);break}return i}};rs.default=fc});var Yy=p(Ye=>{"use strict";var Wr=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=void 0;var OO=fr(),qy=$t(),DO=Wr(un()),RO=Wr(Sy()),SO=Wr(My()),MO=Wr(ky()),kO=Wr(Ay()),AO=Wr(Fy()),PO=Wr(Uy()),xO=Wr(Ly());Ye.casual=new qy.Chrono(Wy());Ye.strict=new qy.Chrono(pc(!0));function CO(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=CO;function NO(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=NO;function Wy(r=!0){let e=pc(!1,r);return e.parsers.push(new PO.default),e.parsers.push(new xO.default),e}Ye.createCasualConfiguration=Wy;function pc(r=!0,e=!0){return OO.includeCommonConfiguration({parsers:[new DO.default(e),new RO.default,new SO.default,new AO.default],refiners:[new MO.default,new kO.default]},r)}Ye.createConfiguration=pc});var jy=p(ns=>{"use strict";var IO=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0});var FO=IO(rr()),hc=class extends FO.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};ns.default=hc});var $y=p(is=>{"use strict";var UO=is&&is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(is,"__esModule",{value:!0});var LO=UO(dr()),mc=class extends LO.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};is.default=mc});var By=p(yr=>{"use strict";var qO=yr&&yr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),WO=yr&&yr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YO=yr&&yr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&qO(e,r,t);return WO(e,r),e};Object.defineProperty(yr,"__esModule",{value:!0});var jO=R(),Ia=YO(hr()),yc=class extends jO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return Ia.now(e.reference);case"vandaag":return Ia.today(e.reference);case"morgen":case"morgend":return Ia.tomorrow(e.reference);case"gisteren":return Ia.yesterday(e.reference)}return i}};yr.default=yc});var Gy=p(ss=>{"use strict";var $O=ss&&ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ss,"__esModule",{value:!0});var Fa=Ne(),BO=R(),GO=$O(te()),HO=Mt(),zO=1,KO=2,gc=class extends BO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=GO.default(e.refDate),i=e.createParsingComponents();switch(t[zO]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[KO].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",Fa.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",Fa.Meridiem.PM),i.imply("hour",20);break;case"middernacht":HO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",Fa.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",Fa.Meridiem.AM),i.imply("hour",12);break}return i}};ss.default=gc});var yt=p(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.parseTimeUnits=z.TIME_UNITS_PATTERN=z.parseYear=z.YEAR_PATTERN=z.parseOrdinalNumberPattern=z.ORDINAL_NUMBER_PATTERN=z.parseNumberPattern=z.NUMBER_PATTERN=z.TIME_UNIT_DICTIONARY=z.ORDINAL_WORD_DICTIONARY=z.INTEGER_WORD_DICTIONARY=z.MONTH_DICTIONARY=z.WEEKDAY_DICTIONARY=void 0;var Ua=oe(),VO=Ge();z.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};z.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};z.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};z.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};z.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};z.NUMBER_PATTERN=`(?:${Ua.matchAnyPattern(z.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function zy(r){let e=r.toLowerCase();return z.INTEGER_WORD_DICTIONARY[e]!==void 0?z.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}z.parseNumberPattern=zy;z.ORDINAL_NUMBER_PATTERN=`(?:${Ua.matchAnyPattern(z.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function XO(r){let e=r.toLowerCase();return z.ORDINAL_WORD_DICTIONARY[e]!==void 0?z.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}z.parseOrdinalNumberPattern=XO;z.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function ZO(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return VO.findMostLikelyADYear(e)}z.parseYear=ZO;var Ky=`(${z.NUMBER_PATTERN})\\s{0,5}(${Ua.matchAnyPattern(z.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Hy=new RegExp(Ky,"i");z.TIME_UNITS_PATTERN=Ua.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Ky);function QO(r){let e={},t=r,n=Hy.exec(t);for(;n;)JO(e,n),t=t.substring(n[0].length),n=Hy.exec(t);return e}z.parseTimeUnits=QO;function JO(r,e){let t=zy(e[1]),n=z.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Xy=p(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var Vy=yt(),eD=Ee(),tD=R(),_c=class extends tD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Vy.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Vy.parseTimeUnits(t[1]);return eD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Tc.default=_c});var Qy=p(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Zy=yt(),rD=oe(),nD=R(),iD=on(),sD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${rD.matchAnyPattern(Zy.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),aD=1,oD=2,uD=3,bc=class extends nD.AbstractParserWithWordBoundaryChecking{innerPattern(){return sD}innerExtract(e,t){let n=t[oD].toLowerCase(),i=Zy.WEEKDAY_DICTIONARY[n],s=t[aD],a=t[uD],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=iD.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};vc.default=bc});var ig=p(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var lD=Ge(),rg=yt(),La=yt(),ng=yt(),cD=oe(),dD=R(),fD=new RegExp(`(?:on\\s*?)?(${La.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${La.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+cD.matchAnyPattern(rg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${ng.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),pD=3,Jy=1,eg=2,tg=4,Ec=class extends dD.AbstractParserWithWordBoundaryChecking{innerPattern(){return fD}innerExtract(e,t){let n=rg.MONTH_DICTIONARY[t[pD].toLowerCase()],i=La.parseOrdinalNumberPattern(t[Jy]);if(i>31)return t.index=t.index+t[Jy].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[tg]){let u=ng.parseYear(t[tg]);s.assign("year",u)}else{let u=lD.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[eg])return s;let a=La.parseOrdinalNumberPattern(t[eg]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};wc.default=Ec});var ug=p(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var ag=yt(),hD=Ge(),mD=oe(),og=yt(),yD=R(),gD=new RegExp(`(${mD.matchAnyPattern(ag.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${og.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),_D=1,sg=2,Oc=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return gD}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[_D],s=ag.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[sg]){let a=og.parseYear(t[sg]);n.assign("year",a)}else{let a=hD.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Dc.default=Oc});var lg=p(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var TD=R(),bD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),vD=1,ED=2,Rc=class extends TD.AbstractParserWithWordBoundaryChecking{innerPattern(){return bD}innerExtract(e,t){let n=parseInt(t[ED]),i=parseInt(t[vD]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Sc.default=Rc});var cg=p(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var wD=sn(),Mc=class extends wD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};kc.default=Mc});var pg=p(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var fg=yt(),OD=oe(),DD=R(),RD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${OD.matchAnyPattern(fg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),SD=1,MD=2,dg=3,kD=4,Ac=class extends DD.AbstractParserWithWordBoundaryChecking{innerPattern(){return RD}innerExtract(e,t){let n=t[dg]?parseInt(t[dg]):fg.MONTH_DICTIONARY[t[MD].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[SD]);return{day:parseInt(t[kD]),month:n,year:i}}};Pc.default=Ac});var hg=p(as=>{"use strict";var AD=as&&as.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(as,"__esModule",{value:!0});var PD=R(),qa=Ne(),xc=Mt(),xD=AD(te()),CD=1,ND=2,Cc=class extends PD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[CD].toLowerCase(),i=t[ND].toLowerCase(),s=e.createParsingComponents(),a=xD.default(e.refDate);switch(n){case"gisteren":xc.assignSimilarDate(s,a.add(-1,"day"));break;case"van":xc.assignSimilarDate(s,a);break;case"morgen":xc.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",qa.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",qa.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",qa.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",qa.Meridiem.PM),s.imply("hour",20);break}return s}};as.default=Cc});var yg=p(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var mg=yt(),ID=Ee(),FD=R(),UD=kt(),LD=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${mg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Nc=class extends FD.AbstractParserWithWordBoundaryChecking{innerPattern(){return LD}innerExtract(e,t){let n=t[1].toLowerCase(),i=mg.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=UD.reverseTimeUnits(i);break}return ID.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ic.default=Nc});var Tg=p(os=>{"use strict";var qD=os&&os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(os,"__esModule",{value:!0});var _g=yt(),gg=Ee(),WD=qD(te()),YD=R(),jD=oe(),$D=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${jD.matchAnyPattern(_g.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),BD=1,GD=2,Fc=class extends YD.AbstractParserWithWordBoundaryChecking{innerPattern(){return $D}innerExtract(e,t){let n=t[BD].toLowerCase(),i=t[GD].toLowerCase(),s=_g.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,gg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,gg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=WD.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};os.default=Fc});var bg=p(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var Lc=yt(),HD=Ee(),zD=R(),KD=kt(),VD=new RegExp("("+Lc.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),XD=new RegExp("("+Lc.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Uc=class extends zD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?XD:VD}innerExtract(e,t){let n=Lc.parseTimeUnits(t[1]),i=KD.reverseTimeUnits(n);return HD.ParsingComponents.createRelativeFromReference(e.reference,i)}};qc.default=Uc});var vg=p(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var Yc=yt(),ZD=Ee(),QD=R(),JD=new RegExp("("+Yc.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),eR=new RegExp("("+Yc.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),tR=1,Wc=class extends QD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?eR:JD}innerExtract(e,t){let n=Yc.parseTimeUnits(t[tR]);return ZD.ParsingComponents.createRelativeFromReference(e.reference,n)}};jc.default=Wc});var Dg=p(je=>{"use strict";var ze=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.createConfiguration=je.createCasualConfiguration=je.parseDate=je.parse=je.strict=je.casual=void 0;var rR=fr(),Eg=$t(),nR=ze(jy()),iR=ze($y()),sR=ze(By()),aR=ze(Gy()),oR=ze(un()),uR=ze(Xy()),lR=ze(Qy()),cR=ze(ig()),wg=ze(ug()),dR=ze(lg()),fR=ze(cg()),pR=ze(pg()),hR=ze(hg()),mR=ze(yg()),yR=ze(Tg()),gR=ze(bg()),_R=ze(vg());je.casual=new Eg.Chrono(Og());je.strict=new Eg.Chrono($c(!0));function TR(r,e,t){return je.casual.parse(r,e,t)}je.parse=TR;function bR(r,e,t){return je.casual.parseDate(r,e,t)}je.parseDate=bR;function Og(r=!0){let e=$c(!1,r);return e.parsers.unshift(new sR.default),e.parsers.unshift(new aR.default),e.parsers.unshift(new hR.default),e.parsers.unshift(new wg.default),e.parsers.unshift(new yR.default),e.parsers.unshift(new mR.default),e}je.createCasualConfiguration=Og;function $c(r=!0,e=!0){return rR.includeCommonConfiguration({parsers:[new oR.default(e),new uR.default,new cR.default,new wg.default,new lR.default,new pR.default,new dR.default,new fR.default(r),new gR.default(r),new _R.default(r)],refiners:[new iR.default,new nR.default]},r)}je.createConfiguration=$c});var kg=p(us=>{"use strict";var vR=us&&us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(us,"__esModule",{value:!0});var ER=vR(te()),wR=R(),OR=1,Rg=2,DR=3,Sg=4,Mg=5,RR=6,Bc=class extends wR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=ER.default(e.refDate),a=s;if(t[OR])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Rg]){let o=t[Rg],u=t[DR];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Sg]){let u=t[Sg][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Mg]){let o=t[Mg];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[RR];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};us.default=Bc});var zn=p(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.zhStringToYear=ot.zhStringToNumber=ot.WEEKDAY_OFFSET=ot.NUMBER=void 0;ot.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};ot.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function SR(r){let e=0;for(let t=0;t{"use strict";var kR=ls&&ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ls,"__esModule",{value:!0});var AR=kR(te()),PR=R(),dn=zn(),Gc=1,Ag=2,Hc=3,zc=class extends PR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(dn.NUMBER).join("")+"]{4}|["+Object.keys(dn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(dn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(dn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=AR.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ag]);if(isNaN(s)&&(s=dn.zhStringToNumber(t[Ag])),i.start.assign("month",s),t[Hc]){let a=parseInt(t[Hc]);isNaN(a)&&(a=dn.zhStringToNumber(t[Hc])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Gc]){let a=parseInt(t[Gc]);isNaN(a)&&(a=dn.zhStringToYear(t[Gc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};ls.default=zc});var Cg=p(cs=>{"use strict";var xR=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var CR=xR(te()),NR=R(),xg=zn(),IR=new RegExp("(\\d+|["+Object.keys(xg.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),Kc=1,FR=2,Vc=class extends NR.AbstractParserWithWordBoundaryChecking{innerPattern(){return IR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Kc]);if(isNaN(i)&&(i=xg.zhStringToNumber(t[Kc])),isNaN(i)){let u=t[Kc];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=CR.default(e.refDate),o=t[FR][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};cs.default=Vc});var Ig=p(ds=>{"use strict";var UR=ds&&ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ds,"__esModule",{value:!0});var LR=UR(te()),qR=R(),Ng=zn(),WR=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Ng.WEEKDAY_OFFSET).join("|")+")"),Xc=class extends qR.AbstractParserWithWordBoundaryChecking{innerPattern(){return WR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ng.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=LR.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var YR=fs&&fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fs,"__esModule",{value:!0});var jR=YR(te()),$R=R(),xt=zn(),BR=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(xt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(xt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(xt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),GR=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(xt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(xt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(xt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Wa=1,Ya=2,ja=3,$a=4,Ba=5,Ga=6,Pt=7,Kn=8,Ha=9,Zc=class extends $R.AbstractParserWithWordBoundaryChecking{innerPattern(){return BR}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=jR.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Wa]){var a=t[Wa];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[$a]){var o=t[$a];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[Kn]){var d=parseInt(t[Kn]);if(isNaN(d)&&(d=xt.zhStringToNumber(t[Kn])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[Ga]),isNaN(u)&&(u=xt.zhStringToNumber(t[Ga])),t[Pt]?t[Pt]=="\u534A"?l=30:t[Pt]=="\u6B63"||t[Pt]=="\u6574"?l=0:(l=parseInt(t[Pt]),isNaN(l)&&(l=xt.zhStringToNumber(t[Pt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Ha]){if(u>12)return null;var f=t[Ha][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(t[Ya]){var h=t[Ya],y=h[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[ja]){var m=t[ja],g=m[0];g=="\u4E0A"||g=="\u671D"||g=="\u65E9"||g=="\u51CC"?(c=0,u==12&&(u=0)):(g=="\u4E0B"||g=="\u664F"||g=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ba]){var O=t[Ba],w=O[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=GR.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let P=s.clone();if(i.end=e.createParsingComponents(),t[Wa]){var a=t[Wa];a=="\u660E"||a=="\u807D"?n.hour()>1&&P.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?P.add(-1,"day"):a=="\u524D"?P.add(-2,"day"):a=="\u5927\u524D"?P.add(-3,"day"):a=="\u5F8C"?P.add(2,"day"):a=="\u5927\u5F8C"&&P.add(3,"day"),i.end.assign("day",P.date()),i.end.assign("month",P.month()+1),i.end.assign("year",P.year())}else if(t[$a]){var o=t[$a];o=="\u660E"||o=="\u807D"?P.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?P.add(-1,"day"):o=="\u524D"?P.add(-2,"day"):o=="\u5927\u524D"?P.add(-3,"day"):o=="\u5F8C"?P.add(2,"day"):o=="\u5927\u5F8C"&&P.add(3,"day"),i.end.assign("day",P.date()),i.end.assign("month",P.month()+1),i.end.assign("year",P.year())}else i.end.imply("day",P.date()),i.end.imply("month",P.month()+1),i.end.imply("year",P.year());if(u=0,l=0,c=-1,t[Kn]){var d=parseInt(t[Kn]);if(isNaN(d)&&(d=xt.zhStringToNumber(t[Kn])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[Ga]),isNaN(u)&&(u=xt.zhStringToNumber(t[Ga])),t[Pt]?t[Pt]=="\u534A"?l=30:t[Pt]=="\u6B63"||t[Pt]=="\u6574"?l=0:(l=parseInt(t[Pt]),isNaN(l)&&(l=xt.zhStringToNumber(t[Pt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Ha]){if(u>12)return null;var f=t[Ha][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Ya]){var h=t[Ya],y=h[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[ja]){var m=t[ja],g=m[0];g=="\u4E0A"||g=="\u671D"||g=="\u65E9"||g=="\u51CC"?(c=0,u==12&&(u=0)):(g=="\u4E0B"||g=="\u664F"||g=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ba]){var O=t[Ba],w=O[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var HR=ps&&ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ps,"__esModule",{value:!0});var zR=HR(te()),KR=R(),Ug=zn(),VR=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Ug.WEEKDAY_OFFSET).join("|")+")"),Qc=class extends KR.AbstractParserWithWordBoundaryChecking{innerPattern(){return VR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ug.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=zR.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var XR=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var ZR=XR(rr()),Jc=class extends ZR.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};hs.default=Jc});var Wg=p(ms=>{"use strict";var QR=ms&&ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ms,"__esModule",{value:!0});var JR=QR(dr()),ed=class extends JR.default{patternBetween(){return/^\s*$/i}};ms.default=ed});var Yg=p(ke=>{"use strict";var gr=ke&&ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ke,"__esModule",{value:!0});ke.createConfiguration=ke.createCasualConfiguration=ke.parseDate=ke.parse=ke.strict=ke.casual=ke.hant=void 0;var td=$t(),eS=gr(Ea()),tS=fr(),rS=gr(kg()),nS=gr(Pg()),iS=gr(Cg()),sS=gr(Ig()),aS=gr(Fg()),oS=gr(Lg()),uS=gr(qg()),lS=gr(Wg());ke.hant=new td.Chrono(rd());ke.casual=new td.Chrono(rd());ke.strict=new td.Chrono(nd());function cS(r,e,t){return ke.casual.parse(r,e,t)}ke.parse=cS;function dS(r,e,t){return ke.casual.parseDate(r,e,t)}ke.parseDate=dS;function rd(){let r=nd();return r.parsers.unshift(new rS.default),r}ke.createCasualConfiguration=rd;function nd(){let r=tS.includeCommonConfiguration({parsers:[new nS.default,new sS.default,new oS.default,new aS.default,new iS.default],refiners:[new uS.default,new lS.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof eS.default)),r}ke.createConfiguration=nd});var Gg=p(ys=>{"use strict";var fS=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var pS=fS(te()),hS=R(),mS=1,jg=2,yS=3,$g=4,Bg=5,gS=6,id=class extends hS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=pS.default(e.refDate),a=s;if(t[mS])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[jg]){let o=t[jg],u=t[yS];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[$g]){let u=t[$g][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Bg]){let o=t[Bg];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[gS];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};ys.default=id});var Vn=p(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.zhStringToYear=ut.zhStringToNumber=ut.WEEKDAY_OFFSET=ut.NUMBER=void 0;ut.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};ut.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function _S(r){let e=0;for(let t=0;t{"use strict";var bS=gs&&gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gs,"__esModule",{value:!0});var vS=bS(te()),ES=R(),fn=Vn(),sd=1,Hg=2,ad=3,od=class extends ES.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(fn.NUMBER).join("")+"]{4}|["+Object.keys(fn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(fn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(fn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=vS.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Hg]);if(isNaN(s)&&(s=fn.zhStringToNumber(t[Hg])),i.start.assign("month",s),t[ad]){let a=parseInt(t[ad]);isNaN(a)&&(a=fn.zhStringToNumber(t[ad])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[sd]){let a=parseInt(t[sd]);isNaN(a)&&(a=fn.zhStringToYear(t[sd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};gs.default=od});var Vg=p(_s=>{"use strict";var wS=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var OS=wS(te()),DS=R(),Kg=Vn(),RS=new RegExp("(\\d+|["+Object.keys(Kg.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),ud=1,SS=2,ld=class extends DS.AbstractParserWithWordBoundaryChecking{innerPattern(){return RS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[ud]);if(isNaN(i)&&(i=Kg.zhStringToNumber(t[ud])),isNaN(i)){let u=t[ud];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=OS.default(e.refDate),o=t[SS][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};_s.default=ld});var Zg=p(Ts=>{"use strict";var MS=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var kS=MS(te()),AS=R(),Xg=Vn(),PS=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Xg.WEEKDAY_OFFSET).join("|")+")"),cd=class extends AS.AbstractParserWithWordBoundaryChecking{innerPattern(){return PS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Xg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=kS.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var xS=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var CS=xS(te()),NS=R(),Nt=Vn(),IS=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Nt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Nt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Nt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),FS=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Nt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Nt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Nt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),za=1,Ka=2,Va=3,Xa=4,Za=5,Qa=6,Ct=7,Xn=8,Ja=9,dd=class extends NS.AbstractParserWithWordBoundaryChecking{innerPattern(){return IS}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=CS.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[za]){let c=t[za];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Xa]){let c=t[Xa];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[Xn]){let c=parseInt(t[Xn]);if(isNaN(c)&&(c=Nt.zhStringToNumber(t[Xn])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[Qa]),isNaN(a)&&(a=Nt.zhStringToNumber(t[Qa])),t[Ct]?t[Ct]=="\u534A"?o=30:t[Ct]=="\u6B63"||t[Ct]=="\u6574"?o=0:(o=parseInt(t[Ct]),isNaN(o)&&(o=Nt.zhStringToNumber(t[Ct]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ja]){if(a>12)return null;let c=t[Ja][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Ka]){let d=t[Ka][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Va]){let d=t[Va][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Za]){let d=t[Za][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=FS.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[za]){let c=t[za];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Xa]){let c=t[Xa];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Xn]){let c=parseInt(t[Xn]);if(isNaN(c)&&(c=Nt.zhStringToNumber(t[Xn])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[Qa]),isNaN(a)&&(a=Nt.zhStringToNumber(t[Qa])),t[Ct]?t[Ct]=="\u534A"?o=30:t[Ct]=="\u6B63"||t[Ct]=="\u6574"?o=0:(o=parseInt(t[Ct]),isNaN(o)&&(o=Nt.zhStringToNumber(t[Ct]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ja]){if(a>12)return null;let c=t[Ja][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Ka]){let d=t[Ka][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Va]){let d=t[Va][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Za]){let d=t[Za][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var US=vs&&vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vs,"__esModule",{value:!0});var LS=US(te()),qS=R(),Jg=Vn(),WS=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Jg.WEEKDAY_OFFSET).join("|")+")"),fd=class extends qS.AbstractParserWithWordBoundaryChecking{innerPattern(){return WS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Jg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=LS.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var YS=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var jS=YS(rr()),pd=class extends jS.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Es.default=pd});var r_=p(ws=>{"use strict";var $S=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var BS=$S(dr()),hd=class extends BS.default{patternBetween(){return/^\s*$/i}};ws.default=hd});var n_=p(Ae=>{"use strict";var _r=Ae&&Ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.createConfiguration=Ae.createCasualConfiguration=Ae.parseDate=Ae.parse=Ae.strict=Ae.casual=Ae.hans=void 0;var md=$t(),GS=_r(Ea()),HS=fr(),zS=_r(Gg()),KS=_r(zg()),VS=_r(Vg()),XS=_r(Zg()),ZS=_r(Qg()),QS=_r(e_()),JS=_r(t_()),eM=_r(r_());Ae.hans=new md.Chrono(yd());Ae.casual=new md.Chrono(yd());Ae.strict=new md.Chrono(gd());function tM(r,e,t){return Ae.casual.parse(r,e,t)}Ae.parse=tM;function rM(r,e,t){return Ae.casual.parseDate(r,e,t)}Ae.parseDate=rM;function yd(){let r=gd();return r.parsers.unshift(new zS.default),r}Ae.createCasualConfiguration=yd;function gd(){let r=HS.includeCommonConfiguration({parsers:[new KS.default,new XS.default,new QS.default,new ZS.default,new VS.default],refiners:[new JS.default,new eM.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof GS.default)),r}Ae.createConfiguration=gd});var s_=p(gt=>{"use strict";var i_=gt&>.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),nM=gt&>.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),iM=gt&>.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&i_(e,r,t)},sM=gt&>.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&i_(e,r,t);return nM(e,r),e};Object.defineProperty(gt,"__esModule",{value:!0});gt.hans=void 0;iM(Yg(),gt);gt.hans=sM(n_())});var lt=p(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.parseTimeUnits=Y.TIME_UNITS_PATTERN=Y.parseYear=Y.YEAR_PATTERN=Y.parseOrdinalNumberPattern=Y.ORDINAL_NUMBER_PATTERN=Y.parseNumberPattern=Y.NUMBER_PATTERN=Y.TIME_UNIT_DICTIONARY=Y.ORDINAL_WORD_DICTIONARY=Y.INTEGER_WORD_DICTIONARY=Y.MONTH_DICTIONARY=Y.FULL_MONTH_NAME_DICTIONARY=Y.WEEKDAY_DICTIONARY=Y.REGEX_PARTS=void 0;var eo=oe(),aM=Ge();Y.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};Y.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};Y.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};Y.MONTH_DICTIONARY=Object.assign(Object.assign({},Y.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});Y.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};Y.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};Y.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};Y.NUMBER_PATTERN=`(?:${eo.matchAnyPattern(Y.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function o_(r){let e=r.toLowerCase();return Y.INTEGER_WORD_DICTIONARY[e]!==void 0?Y.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}Y.parseNumberPattern=o_;Y.ORDINAL_NUMBER_PATTERN=`(?:${eo.matchAnyPattern(Y.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function oM(r){let e=r.toLowerCase();return Y.ORDINAL_WORD_DICTIONARY[e]!==void 0?Y.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}Y.parseOrdinalNumberPattern=oM;var _d="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";Y.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${_d}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${_d}|[5-9][0-9]${_d})`;function uM(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return aM.findMostLikelyADYear(e)}Y.parseYear=uM;var u_=`(${Y.NUMBER_PATTERN})\\s{0,3}(${eo.matchAnyPattern(Y.TIME_UNIT_DICTIONARY)})`,a_=new RegExp(u_,"i");Y.TIME_UNITS_PATTERN=eo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",u_);function lM(r){let e={},t=r,n=a_.exec(t);for(;n;)cM(e,n),t=t.substring(n[0].length).trim(),n=a_.exec(t);return e}Y.parseTimeUnits=lM;function cM(r,e){let t=o_(e[1]),n=Y.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var c_=p(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var Os=lt(),dM=Ee(),fM=R(),l_=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Os.TIME_UNITS_PATTERN})${Os.REGEX_PARTS.rightBoundary}`,pM=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${l_}`,Os.REGEX_PARTS.flags),hM=new RegExp(l_,"i"),Td=class extends fM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Os.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?hM:pM}innerExtract(e,t){let n=Os.parseTimeUnits(t[1]);return dM.ParsingComponents.createRelativeFromReference(e.reference,n)}};bd.default=Td});var m_=p(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var mM=Ge(),Ds=lt(),h_=lt(),to=lt(),yM=oe(),gM=R(),_M=new RegExp(`(?:\u0441)?\\s*(${to.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${to.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${yM.matchAnyPattern(Ds.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${h_.YEAR_PATTERN}(?![^\\s]\\d)))?${Ds.REGEX_PARTS.rightBoundary}`,Ds.REGEX_PARTS.flags),d_=1,f_=2,TM=3,p_=4,vd=class extends gM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ds.REGEX_PARTS.leftBoundary}innerPattern(){return _M}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ds.MONTH_DICTIONARY[t[TM].toLowerCase()],s=to.parseOrdinalNumberPattern(t[d_]);if(s>31)return t.index=t.index+t[d_].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[p_]){let a=h_.parseYear(t[p_]);n.start.assign("year",a)}else{let a=mM.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[f_]){let a=to.parseOrdinalNumberPattern(t[f_]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ed.default=vd});var __=p(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var Rs=lt(),bM=Ge(),vM=oe(),g_=lt(),EM=R(),wM=new RegExp(`((?:\u0432)\\s*)?(${vM.matchAnyPattern(Rs.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${g_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Rs.REGEX_PARTS.flags),OM=2,y_=3,wd=class extends EM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Rs.REGEX_PARTS.leftBoundary}innerPattern(){return wM}innerExtract(e,t){let n=t[OM].toLowerCase();if(t[0].length<=3&&!Rs.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Rs.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[y_]){let a=g_.parseYear(t[y_]);i.start.assign("year",a)}else{let a=bM.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Od.default=wd});var b_=p(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var ro=Ne(),DM=sn(),T_=lt(),Dd=class extends DM.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return T_.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${T_.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",ro.Meridiem.PM)):i<6&&n.assign("meridiem",ro.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",ro.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",ro.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Rd.default=Dd});var v_=p(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var no=lt(),RM=Ee(),SM=R(),MM=kt(),kM=new RegExp(`(${no.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,no.REGEX_PARTS.flags),Sd=class extends SM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return no.REGEX_PARTS.leftBoundary}innerPattern(){return kM}innerExtract(e,t){let n=no.parseTimeUnits(t[1]),i=MM.reverseTimeUnits(n);return RM.ParsingComponents.createRelativeFromReference(e.reference,i)}};Md.default=Sd});var E_=p(Ss=>{"use strict";var AM=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var PM=AM(rr()),kd=class extends PM.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Ss.default=kd});var w_=p(Ms=>{"use strict";var xM=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var CM=xM(dr()),Ad=class extends CM.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Ms.default=Ad});var O_=p(Tr=>{"use strict";var NM=Tr&&Tr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IM=Tr&&Tr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FM=Tr&&Tr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NM(e,r,t);return IM(e,r),e};Object.defineProperty(Tr,"__esModule",{value:!0});var UM=R(),ks=FM(hr()),Pd=lt(),LM=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${Pd.REGEX_PARTS.rightBoundary}`,Pd.REGEX_PARTS.flags),xd=class extends UM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Pd.REGEX_PARTS.leftBoundary}innerPattern(e){return LM}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ks.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ks.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ks.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ks.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ks.theDayBefore(e.reference,2)}return i}};Tr.default=xd});var D_=p(Kt=>{"use strict";var qM=Kt&&Kt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),WM=Kt&&Kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YM=Kt&&Kt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&qM(e,r,t);return WM(e,r),e},jM=Kt&&Kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Kt,"__esModule",{value:!0});var $M=R(),pn=YM(hr()),BM=Mt(),GM=jM(te()),Cd=lt(),HM=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Cd.REGEX_PARTS.rightBoundary}`,Cd.REGEX_PARTS.flags),Nd=class extends $M.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Cd.REGEX_PARTS.leftBoundary}innerPattern(){return HM}innerExtract(e,t){let n=GM.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return pn.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return pn.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return pn.morning(e.reference);if(i.match(/в\s*полдень/))return pn.noon(e.reference);if(i.match(/прошлой\s*ночью/))return pn.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return pn.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),BM.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?pn.midnight(e.reference):s}};Kt.default=Nd});var R_=p(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var As=lt(),zM=oe(),KM=R(),VM=on(),XM=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${zM.matchAnyPattern(As.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${As.REGEX_PARTS.rightBoundary}`,As.REGEX_PARTS.flags),ZM=1,QM=2,JM=3,Id=class extends KM.AbstractParserWithWordBoundaryChecking{innerPattern(){return XM}patternLeftBoundary(){return As.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[QM].toLowerCase(),i=As.WEEKDAY_DICTIONARY[n],s=t[ZM],a=t[JM],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=VM.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Fd.default=Id});var M_=p(xs=>{"use strict";var ek=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var Ps=lt(),S_=Ee(),tk=ek(te()),rk=R(),nk=oe(),ik=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${nk.matchAnyPattern(Ps.TIME_UNIT_DICTIONARY)})(?=\\s*)${Ps.REGEX_PARTS.rightBoundary}`,Ps.REGEX_PARTS.flags),sk=1,ak=2,Ud=class extends rk.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ps.REGEX_PARTS.leftBoundary}innerPattern(){return ik}innerExtract(e,t){let n=t[sk].toLowerCase(),i=t[ak].toLowerCase(),s=Ps.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,S_.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,S_.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=tk.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};xs.default=Ud});var k_=p(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Cs=lt(),ok=Ee(),uk=R(),lk=kt(),ck=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${Cs.TIME_UNITS_PATTERN})${Cs.REGEX_PARTS.rightBoundary}`,Cs.REGEX_PARTS.flags),Ld=class extends uk.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Cs.REGEX_PARTS.leftBoundary}innerPattern(){return ck}innerExtract(e,t){let n=t[1].toLowerCase(),i=Cs.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=lk.reverseTimeUnits(i);break}return ok.ParsingComponents.createRelativeFromReference(e.reference,i)}};qd.default=Ld});var x_=p($e=>{"use strict";var _t=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=void 0;var dk=_t(c_()),fk=_t(m_()),pk=_t(__()),hk=_t(b_()),mk=_t(v_()),yk=_t(E_()),gk=_t(w_()),_k=fr(),Tk=_t(O_()),bk=_t(D_()),vk=_t(R_()),Ek=_t(M_()),A_=$t(),wk=_t(un()),Ok=_t(k_());$e.casual=new A_.Chrono(P_());$e.strict=new A_.Chrono(Wd(!0));function Dk(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=Dk;function Rk(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=Rk;function P_(){let r=Wd(!1);return r.parsers.unshift(new Tk.default),r.parsers.unshift(new bk.default),r.parsers.unshift(new pk.default),r.parsers.unshift(new Ek.default),r.parsers.unshift(new Ok.default),r}$e.createCasualConfiguration=P_;function Wd(r=!0){return _k.includeCommonConfiguration({parsers:[new wk.default(!0),new dk.default,new fk.default,new vk.default,new hk.default(r),new mk.default],refiners:[new gk.default,new yk.default]},r)}$e.createConfiguration=Wd});var Ne=p(B=>{"use strict";var Sk=B&&B.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Mk=B&&B.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yr=B&&B.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Sk(e,r,t);return Mk(e,r),e};Object.defineProperty(B,"__esModule",{value:!0});B.parseDate=B.parse=B.casual=B.strict=B.ru=B.zh=B.nl=B.pt=B.ja=B.fr=B.de=B.Meridiem=B.Chrono=B.en=void 0;var Yd=Yr(il());B.en=Yd;var kk=$t();Object.defineProperty(B,"Chrono",{enumerable:!0,get:function(){return kk.Chrono}});var Ak;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(Ak=B.Meridiem||(B.Meridiem={}));var Pk=Yr(Ym());B.de=Pk;var xk=Yr(yy());B.fr=xk;var Ck=Yr(Dy());B.ja=Ck;var Nk=Yr(Yy());B.pt=Nk;var Ik=Yr(Dg());B.nl=Ik;var Fk=Yr(s_());B.zh=Fk;var Uk=Yr(x_());B.ru=Uk;B.strict=Yd.strict;B.casual=Yd.casual;function Lk(r,e,t){return B.casual.parse(r,e,t)}B.parse=Lk;function qk(r,e,t){return B.casual.parseDate(r,e,t)}B.parseDate=qk});var sr=p(Br=>{"use strict";Br.__esModule=!0;var zk;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(zk=Br.Operators||(Br.Operators={}));var Kk;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(Kk=Br.StructuralCharacters||(Br.StructuralCharacters={}));var Vk;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(Vk=Br.Tokens||(Br.Tokens={}))});var ef=p(po=>{"use strict";po.__esModule=!0;var we=sr();po.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};po.VALID_TOKENS={identifierOnly:[{name:we.Tokens.IDENTIFIER},{name:we.Tokens.STRUCTURAL_CHARACTER,value:we.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:we.Tokens.IDENTIFIER},{name:we.Tokens.STRUCTURAL_CHARACTER,value:we.StructuralCharacters.OPEN_PARENTHESIS},{name:we.Tokens.OPERATOR,value:we.Operators.NOT}],binaryOperator:[{name:we.Tokens.OPERATOR,value:we.Operators.AND},{name:we.Tokens.OPERATOR,value:we.Operators.OR},{name:we.Tokens.OPERATOR,value:we.Operators.XOR}],binaryOperatorOrClose:[{name:we.Tokens.OPERATOR,value:we.Operators.AND},{name:we.Tokens.OPERATOR,value:we.Operators.OR},{name:we.Tokens.OPERATOR,value:we.Operators.XOR},{name:we.Tokens.STRUCTURAL_CHARACTER,value:we.StructuralCharacters.CLOSE_PARENTHESIS}]}});var tf=p(Or=>{"use strict";Or.__esModule=!0;var oi=sr();Or.STRUCTURAL_CHARACTERS={"(":oi.StructuralCharacters.OPEN_PARENTHESIS,")":oi.StructuralCharacters.CLOSE_PARENTHESIS};Or.OPERATORS={AND:oi.Operators.AND,OR:oi.Operators.OR,XOR:oi.Operators.XOR,NOT:oi.Operators.NOT};Or.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Or.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Or.COMMENT_DELIMITER=String.fromCodePoint(35);Or.EOL=String.fromCodePoint(10);Or.ESCAPE_CHARACTER=String.fromCodePoint(92)});var z_=p(Dr=>{"use strict";var rf=Dr&&Dr.__assign||function(){return rf=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";nf.__esModule=!0;var ui=sr(),Tt=tf(),li=z_();nf.lex=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var Xk=Rr&&Rr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";var di=Us&&Us.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";Sr.__esModule=!0;var Q_=sr();Sr.andUtil=function(r,e){return r&&e};Sr.orUtil=function(r,e){return r||e};Sr.xorUtil=function(r,e){return r!==e};Sr.notUtil=function(r){return!r};Sr.isIdentifier=function(r){var e=r.name,t=r.value;return e===Q_.Tokens.IDENTIFIER&&typeof t=="string"};Sr.isOperator=function(r){var e=r.name,t=r.value;return e===Q_.Tokens.OPERATOR&&typeof t=="string"};Sr.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var J_=p(cf=>{"use strict";var Ls;cf.__esModule=!0;var uf=sr(),lf=of();cf.OPERATOR_MAP=(Ls={},Ls[uf.Operators.AND]=lf.andUtil,Ls[uf.Operators.OR]=lf.orUtil,Ls[uf.Operators.XOR]=lf.xorUtil,Ls)});var tT=p(bn=>{"use strict";var df=bn&&bn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";qs.__esModule=!0;var rT=tT();qs.getEvaluator=rT.getEvaluator;qs.evaluate=rT.evaluate;var eA=af();qs.parse=eA.parse});var cA={};DT(cA,{default:()=>xo});module.exports=RT(cA);var gT=require("obsidian");var Cn=require("obsidian");var fA=new Error("timeout while waiting for mutex to become available"),pA=new Error("mutex already locked"),ST=new Error("request for lock canceled"),If=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Io=class{constructor(e,t=ST){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,i)=>this._queue.push({resolve:n,reject:i}));return e||this._dispatch(),t}runExclusive(e){return If(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return If(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},MT=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Zs=class{constructor(e){this._semaphore=new Io(1,e)}acquire(){return MT(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Ei=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},Mn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","startDate","scheduledDate","dueDate","doneDate","blockLink"];e?this.options=e:this.options=new Ei,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(i,s,a)=>s?i.filter(o=>o!=a):i,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),n}};var Qs=["MO","TU","WE","TH","FR","SA","SU"],Se=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(Qs.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=Qs[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var pe=function(r){return r!=null},pt=function(r){return typeof r=="number"},Fo=function(r){return typeof r=="string"&&Qs.includes(r)},Be=Array.isArray,Ot=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=K(t,e/t.length)),t.slice(0,e)+String(n))}var Uf=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Ke=function(r,e){var t=r%e;return t*e<0?t+e:t},Js=function(r,e){return{div:Math.floor(r/e),mod:Ke(r,e)}},ht=function(r){return!pe(r)||r.length===0},Oe=function(r){return!ht(r)},X=function(r,e){return Oe(r)&&r.indexOf(e)!==-1};var Pr;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),or=kT;var ap=Xs(sp(),1),{__extends:An,__assign:Je,__rest:wA,__decorate:OA,__param:DA,__metadata:RA,__awaiter:SA,__generator:MA,__exportStar:kA,__createBinding:AA,__values:PA,__read:xA,__spread:CA,__spreadArrays:NA,__spreadArray:T,__await:IA,__asyncGenerator:FA,__asyncDelegator:UA,__asyncValues:LA,__makeTemplateObject:qA,__importStar:WA,__importDefault:YA,__classPrivateFieldGet:jA,__classPrivateFieldSet:$A,__classPrivateFieldIn:BA}=ap.default;var AT=function(r){An(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(or),Lo=AT;var PT={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Kr=PT;var op=function(r,e){return r.indexOf(e)!==-1},xT=function(r){return r.toString()},CT=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},NT=function(){function r(e,t,n,i){if(t===void 0&&(t=xT),n===void 0&&(n=Kr),i===void 0&&(i=CT),this.text=[],this.language=n||Kr,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,d){return c-d}),a.sort(function(c,d){return d-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(pe(this.origOptions.byweekday)){var o=Be(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(op(["dtstart","wkst","freq"],n))return!0;if(!op(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[k.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=pt(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),Be(e)||(e=[e]);var a=function(u,l,c){for(var d="",f=0;fe[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function wi(r,e){e===void 0&&(e=Kr);var t={},n=new IT(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=k.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=k.WEEKLY,t.byweekday=[k.MO,k.TU,k.WE,k.TH,k.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=k.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=k.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=k.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=k.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=k.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=k.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[k[h]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(k[y]),n.nextSymbol()}c(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=k.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=o();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(m),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),h=n.accept("the");if(!!(f||h))do{var y=l(),m=u(),g=o();if(y)m?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(k[m].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(m)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(k[m]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[k.MO,k.TU,k.WE,k.TH,k.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var O=n.acceptNumber();if(!O)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(O[0],10)];n.accept("comma");){if(O=n.acceptNumber(),!O)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(O[0],10))}}else if(g)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(g);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var h=n.acceptNumber();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];n.accept("comma");){if(h=n.acceptNumber(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function c(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function d(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var G;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(G||(G={}));function Oi(r){return r12){var n=Math.floor(this.month/12),i=Ke(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Js(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),ht(i)||X(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Js(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(ht(i)||X(i,this.hour))&&(ht(s)||X(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Js(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(ht(i)||X(i,this.hour))&&(ht(s)||X(s,this.minute))&&(ht(a)||X(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Pr.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Pr.MAXYEAR))return;t=Pr.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case G.YEARLY:return this.addYears(s);case G.MONTHLY:return this.addMonths(s);case G.WEEKLY:return this.addWeekly(s,a);case G.DAILY:return this.addDaily(s);case G.HOURLY:return this.addHours(s,n,o);case G.MINUTELY:return this.addMinutes(s,n,o,u);case G.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(xn);function qo(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||Oe(e.byweekno)||Oe(e.byyearday)||Boolean(e.bymonthday)||Oe(e.bymonthday)||pe(e.byweekday)||pe(e.byeaster)))switch(e.freq){case k.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case k.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case k.WEEKLY:e.byweekday=[I.getWeekday(e.dtstart)];break}if(pe(e.bymonth)&&!Be(e.bymonth)&&(e.bymonth=[e.bymonth]),pe(e.byyearday)&&!Be(e.byyearday)&&pt(e.byyearday)&&(e.byyearday=[e.byyearday]),!pe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Be(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(pe(e.byweekno)&&!Be(e.byweekno)&&(e.byweekno=[e.byweekno]),!pe(e.byweekday))e.bynweekday=null;else if(pt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Fo(e.byweekday))e.byweekday=[Se.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Se)!e.byweekday.n||e.freq>k.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tk.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=Oe(a)?a:null,e.bynweekday=Oe(o)?o:null}return pe(e.byhour)?pt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+Ke(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=Ke(l,7),h=Math.floor(d+f/4),y=0;y0&&m<=h){var g=void 0;m>1?(g=c+(m-1)*7,c!==u&&(g-=7-u)):g=c;for(var O=0;O<7&&(o.wnomask[g]=1,g++,o.wdaymask[g]!==e.wkst);O++);}}if(X(e.byweekno,1)){var g=c+h*7;if(c!==u&&(g-=7-u),g=4?(H=0,_e=ye+Ke(P-e.wkst,7)):_e=n-c,w=Math.floor(52+Ke(_e,7)/4)}if(X(e.byweekno,w))for(var g=0;gs)return ur(r);if(w>=t){var P=Pp(w,e);if(!r.accept(P)||o&&(--o,!o))return ur(r)}}else for(var O=h;Os)return ur(r);if(w>=t){var P=Pp(w,e);if(!r.accept(P)||o&&(--o,!o))return ur(r)}}}if(e.interval===0||(u.add(e,m),u.year>I.MAXYEAR))return ur(r);Oi(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function zT(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return Oe(n)&&!X(n,r.mmask[e])||Oe(i)&&!r.wnomask[e]||Oe(s)&&!X(s,r.wdaymask[e])||Oe(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!X(r.eastermask,e)||(Oe(o)||Oe(u))&&!X(o,r.mdaymask[e])&&!X(u,r.nmdaymask[e])||Oe(l)&&(e=r.yearlen&&!X(l,e+1-r.yearlen)&&!X(l,-r.nextyearlen+e-r.yearlen))}function Pp(r,e){return new Vr(r,e.tzid).rezonedDate()}function ur(r){return r.getValue()}function KT(r,e,t,n,i){for(var s=!1,a=e;a=k.HOURLY&&Oe(i)&&!X(i,e.hour)||n>=k.MINUTELY&&Oe(s)&&!X(s,e.minute)||n>=k.SECONDLY&&Oe(a)&&!X(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Dt={MO:new Se(0),TU:new Se(1),WE:new Se(2),TH:new Se(3),FR:new Se(4),SA:new Se(5),SU:new Se(6)},Di={freq:G.YEARLY,dtstart:null,interval:1,wkst:Dt.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},hp=Object.keys(Di),k=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new gp,this.origOptions=qo(e);var n=fp(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return wi(e,t)},r.fromText=function(e,t){return up(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return na(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new Lo("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new or("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!I.isValidDate(e)||!I.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new Lo("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new or("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!I.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new or("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!I.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new or("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Mi(this.origOptions)},r.prototype.toText=function(e,t,n){return lp(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return cp(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=G.YEARLY,r.MONTHLY=G.MONTHLY,r.WEEKLY=G.WEEKLY,r.DAILY=G.DAILY,r.HOURLY=G.HOURLY,r.MINUTELY=G.MINUTELY,r.SECONDLY=G.SECONDLY,r.MO=Dt.MO,r.TU=Dt.TU,r.WE=Dt.WE,r.TH=Dt.TH,r.FR=Dt.FR,r.SA=Dt.SA,r.SU=Dt.SU,r.parseString=Si,r.optionsToString=Mi,r}();function xp(r,e,t,n,i,s){var a={},o=r.accept;function u(f,h){t.forEach(function(y){y.between(f,h,!0).forEach(function(m){a[Number(m)]=!0})})}i.forEach(function(f){var h=new Vr(f,s).rezonedDate();a[Number(h)]=!0}),r.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var c=new jo(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new k(Yo(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new k(Yo(f,o,u),l))}),a.forEach(function(f){c.exdate(f)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new k(Yo(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function ia(r,e){return e===void 0&&(e={}),ZT(r,QT(e))}function Yo(r,e,t){return Je(Je({},r),{dtstart:e,tzid:t})}function QT(r){var e=[],t=Object.keys(r),n=Object.keys(Cp);if(t.forEach(function(i){X(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Je(Je({},Cp),r)}function JT(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=Uf(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function eb(r){var e=JT(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function tb(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function rb(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Np(r,e){return rb(e),r.split(",").map(function(t){return I.untilStringToDate(t)})}function Ip(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;ne in r?Li(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Qe=(r,e)=>{for(var t in e||(e={}))zp.call(e,t)&&Hp(r,t,e[t]);if(Gp)for(var t of Gp(e))vE.call(e,t)&&Hp(r,t,e[t]);return r},tr=(r,e)=>yE(r,_E(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),wE=(r,e)=>{for(var t in e)Li(r,t,{get:e[t],enumerable:!0})},Vp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of TE(e))!zp.call(r,s)&&s!==t&&Li(r,s,{get:()=>e[s],enumerable:!(n=gE(e,s))||n.enumerable});return r};var ns=(r,e,t)=>(t=r!=null?mE(bE(r)):{},Vp(e||!r||!r.__esModule?Li(t,"default",{value:r,enumerable:!0}):t,r)),EE=r=>Vp(Li({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(h){s(h)}},o=c=>{try{l(t.throw(c))}catch(h){s(h)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Tm=O((DF,So)=>{var Qp,Jp,em,tm,rm,nm,sm,im,am,ko,Ml,om,um,lm,js,cm,dm,fm,hm,pm,mm,ym,gm,_m,Do;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof So=="object"&&typeof So.exports=="object"?r(t(e,t(So.exports))):r(t(e));function t(n,s){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=s?s(a,o):o}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])};Qp=function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function a(){this.constructor=n}n.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)},Jp=Object.assign||function(n){for(var s,a=1,o=arguments.length;a=0;m--)(h=n[m])&&(c=(l<3?h(c):l>3?h(s,a,c):h(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},rm=function(n,s){return function(a,o){s(a,o,n)}},nm=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},sm=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(h){h(c)})}return new(a||(a=Promise))(function(c,h){function m(D){try{T(o.next(D))}catch(v){h(v)}}function _(D){try{T(o.throw(D))}catch(v){h(v)}}function T(D){D.done?c(D.value):l(D.value).then(m,_)}T((o=o.apply(n,s||[])).next())})},im=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,h;return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(T){return function(D){return _([T,D])}}function _(T){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,l&&(c=T[0]&2?l.return:T[0]?l.throw||((c=l.return)&&c.call(l),0):l.next)&&!(c=c.call(l,T[1])).done)return c;switch(l=0,c&&(T=[T[0]&2,c.value]),T[0]){case 0:case 1:c=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,l=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(c=a.trys,!(c=c.length>0&&c[c.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!c||T[1]>c[0]&&T[1]=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},Ml=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],h;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(m){h={error:m}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(h)throw h.error}}return c},om=function(){for(var n=[],s=0;s1||m(R,I)})})}function m(R,I){try{_(o[R](I))}catch(q){v(c[0][3],q)}}function _(R){R.value instanceof js?Promise.resolve(R.value.v).then(T,D):v(c[0][2],R)}function T(R){m("next",R)}function D(R){m("throw",R)}function v(R,I){R(I),c.shift(),c.length&&m(c[0][0],c[0][1])}},dm=function(n){var s,a;return s={},o("next"),o("throw",function(l){throw l}),o("return"),s[Symbol.iterator]=function(){return this},s;function o(l,c){s[l]=n[l]?function(h){return(a=!a)?{value:js(n[l](h)),done:l==="return"}:c?c(h):h}:c}},fm=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=n[Symbol.asyncIterator],a;return s?s.call(n):(n=typeof ko=="function"?ko(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(c){a[c]=n[c]&&function(h){return new Promise(function(m,_){h=n[c](h),l(m,_,h.done,h.value)})}}function l(c,h,m,_){Promise.resolve(_).then(function(T){c({value:T,done:m})},h)}},hm=function(n,s){return Object.defineProperty?Object.defineProperty(n,"raw",{value:s}):n.raw=s,n};var t=Object.create?function(n,s){Object.defineProperty(n,"default",{enumerable:!0,value:s})}:function(n,s){n.default=s};pm=function(n){if(n&&n.__esModule)return n;var s={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&Do(s,n,a);return t(s,n),s},mm=function(n){return n&&n.__esModule?n:{default:n}},ym=function(n,s,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!o:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:s.get(n)},gm=function(n,s,a,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!l:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(n,a):l?l.value=a:s.set(n,a),a},_m=function(n,s){if(s===null||typeof s!="object"&&typeof s!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?s===n:n.has(s)},r("__extends",Qp),r("__assign",Jp),r("__rest",em),r("__decorate",tm),r("__param",rm),r("__metadata",nm),r("__awaiter",sm),r("__generator",im),r("__exportStar",am),r("__createBinding",Do),r("__values",ko),r("__read",Ml),r("__spread",om),r("__spreadArrays",um),r("__spreadArray",lm),r("__await",js),r("__asyncGenerator",cm),r("__asyncDelegator",dm),r("__asyncValues",fm),r("__makeTemplateObject",hm),r("__importStar",pm),r("__importDefault",mm),r("__classPrivateFieldGet",ym),r("__classPrivateFieldSet",gm),r("__classPrivateFieldIn",_m)})});var Fl=O((Il,Hs)=>{(function(r,e){typeof Il=="object"&&typeof Hs!="undefined"?Hs.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(Il,function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,u){return Object.prototype.hasOwnProperty.call(i,u)}function o(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var u;for(u in i)if(a(i,u))return!1;return!0}function l(i){return i===void 0}function c(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function h(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,u){var d=[],f,p=i.length;for(f=0;f>>0,f;for(f=0;f0)for(d=0;d=0;return(b?d?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var w=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,S={},M={};function k(i,u,d,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(M[i]=p),u&&(M[u[0]]=function(){return g(p.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)})}function C(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function A(i){var u=i.match(w),d,f;for(d=0,f=u.length;d=0&&E.test(i);)i=i.replace(E,f),E.lastIndex=0,d-=1;return i}var ke={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ye(i){var u=this._longDateFormat[i],d=this._longDateFormat[i.toUpperCase()];return u||!d?u:(this._longDateFormat[i]=d.match(w).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var ce="Invalid date";function Ie(){return this._invalidDate}var K="%d",We=/\d{1,2}/;function Je(i){return this._ordinal.replace("%d",i)}var Ke={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Dr(i,u,d,f){var p=this._relativeTime[d];return V(p)?p(i,u,d,f):p.replace(/%d/i,i)}function Mt(i,u){var d=this._relativeTime[i>0?"future":"past"];return V(d)?d(u):d.replace(/%s/i,u)}var Ae={};function st(i,u){var d=i.toLowerCase();Ae[d]=Ae[d+"s"]=Ae[u]=i}function gt(i){return typeof i=="string"?Ae[i]||Ae[i.toLowerCase()]:void 0}function kn(i){var u={},d,f;for(f in i)a(i,f)&&(d=gt(f),d&&(u[d]=i[f]));return u}var Ri={};function qe(i,u){Ri[i]=u}function Ns(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Ri[d]});return u.sort(function(f,p){return f.priority-p.priority}),u}function Kn(i){return i%4===0&&i%100!==0||i%400===0}function ft(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function de(i){var u=+i,d=0;return u!==0&&isFinite(u)&&(d=ft(u)),d}function Vr(i,u){return function(d){return d!=null?(Zn(this,i,d),e.updateOffset(this,u),this):Rt(this,i)}}function Rt(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function Zn(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&Kn(i.year())&&i.month()===1&&i.date()===29?(d=de(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),uo(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function so(i){return i=gt(i),V(this[i])?this[i]():this}function Lr(i,u){if(typeof i=="object"){i=kn(i);var d=Ns(i),f,p=d.length;for(f=0;f68?1900:2e3)};var hp=Vr("FullYear",!0);function Jv(){return Kn(this.year())}function ew(i,u,d,f,p,b,x){var re;return i<100&&i>=0?(re=new Date(i+400,u,d,f,p,b,x),isFinite(re.getFullYear())&&re.setFullYear(i)):re=new Date(i,u,d,f,p,b,x),re}function Ai(i){var u,d;return i<100&&i>=0?(d=Array.prototype.slice.call(arguments),d[0]=i+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(i)):u=new Date(Date.UTC.apply(null,arguments)),u}function lo(i,u,d){var f=7+u-d,p=(7+Ai(i,0,f).getUTCDay()-u)%7;return-p+f-1}function pp(i,u,d,f,p){var b=(7+d-f)%7,x=lo(i,f,p),re=1+7*(u-1)+b+x,ge,Ye;return re<=0?(ge=i-1,Ye=Pi(ge)+re):re>Pi(i)?(ge=i+1,Ye=re-Pi(i)):(ge=i,Ye=re),{year:ge,dayOfYear:Ye}}function Ni(i,u,d){var f=lo(i.year(),u,d),p=Math.floor((i.dayOfYear()-f-1)/7)+1,b,x;return p<1?(x=i.year()-1,b=p+Xr(x,u,d)):p>Xr(i.year(),u,d)?(b=p-Xr(i.year(),u,d),x=i.year()+1):(x=i.year(),b=p),{week:b,year:x}}function Xr(i,u,d){var f=lo(i,u,d),p=lo(i+1,u,d);return(Pi(i)-f+p)/7}k("w",["ww",2],"wo","week"),k("W",["WW",2],"Wo","isoWeek"),st("week","w"),st("isoWeek","W"),qe("week",5),qe("isoWeek",5),H("w",Le),H("ww",Le,_t),H("W",Le),H("WW",Le,_t),pr(["w","ww","W","WW"],function(i,u,d,f){u[f.substr(0,1)]=de(i)});function tw(i){return Ni(i,this._week.dow,this._week.doy).week}var rw={dow:0,doy:6};function nw(){return this._week.dow}function sw(){return this._week.doy}function iw(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function aw(i){var u=Ni(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}k("d",0,"do","day"),k("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),k("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),k("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),k("e",0,0,"weekday"),k("E",0,0,"isoWeekday"),st("day","d"),st("weekday","e"),st("isoWeekday","E"),qe("day",11),qe("weekday",11),qe("isoWeekday",11),H("d",Le),H("e",Le),H("E",Le),H("dd",function(i,u){return u.weekdaysMinRegex(i)}),H("ddd",function(i,u){return u.weekdaysShortRegex(i)}),H("dddd",function(i,u){return u.weekdaysRegex(i)}),pr(["dd","ddd","dddd"],function(i,u,d,f){var p=d._locale.weekdaysParse(i,f,d._strict);p!=null?u.d=p:v(d).invalidWeekday=i}),pr(["d","e","E"],function(i,u,d,f){u[f]=de(i)});function ow(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function uw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function ll(i,u){return i.slice(u,7).concat(i.slice(0,u))}var lw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),cw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dw=fr,fw=fr,hw=fr;function pw(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?ll(d,this._week.dow):i?d[i.day()]:d}function mw(i){return i===!0?ll(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function yw(i){return i===!0?ll(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function gw(i,u,d){var f,p,b,x=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)b=T([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(b,"").toLocaleLowerCase();return d?u==="dddd"?(p=it.call(this._weekdaysParse,x),p!==-1?p:null):u==="ddd"?(p=it.call(this._shortWeekdaysParse,x),p!==-1?p:null):(p=it.call(this._minWeekdaysParse,x),p!==-1?p:null):u==="dddd"?(p=it.call(this._weekdaysParse,x),p!==-1||(p=it.call(this._shortWeekdaysParse,x),p!==-1)?p:(p=it.call(this._minWeekdaysParse,x),p!==-1?p:null)):u==="ddd"?(p=it.call(this._shortWeekdaysParse,x),p!==-1||(p=it.call(this._weekdaysParse,x),p!==-1)?p:(p=it.call(this._minWeekdaysParse,x),p!==-1?p:null)):(p=it.call(this._minWeekdaysParse,x),p!==-1||(p=it.call(this._weekdaysParse,x),p!==-1)?p:(p=it.call(this._shortWeekdaysParse,x),p!==-1?p:null))}function _w(i,u,d){var f,p,b;if(this._weekdaysParseExact)return gw.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=T([2e3,1]).day(f),d&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(b.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(d&&u==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(d&&u==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!d&&this._weekdaysParse[f].test(i))return f}}function Tw(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=ow(i,this.localeData()),this.add(i-u,"d")):u}function bw(i){if(!this.isValid())return i!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return i==null?u:this.add(i-u,"d")}function vw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=uw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function ww(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||cl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=dw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ew(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||cl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function kw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||cl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hw),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function cl(){function i($t,rn){return rn.length-$t.length}var u=[],d=[],f=[],p=[],b,x,re,ge,Ye;for(b=0;b<7;b++)x=T([2e3,1]).day(b),re=ht(this.weekdaysMin(x,"")),ge=ht(this.weekdaysShort(x,"")),Ye=ht(this.weekdays(x,"")),u.push(re),d.push(ge),f.push(Ye),p.push(re),p.push(ge),p.push(Ye);u.sort(i),d.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function dl(){return this.hours()%12||12}function Dw(){return this.hours()||24}k("H",["HH",2],0,"hour"),k("h",["hh",2],0,dl),k("k",["kk",2],0,Dw),k("hmm",0,0,function(){return""+dl.apply(this)+g(this.minutes(),2)}),k("hmmss",0,0,function(){return""+dl.apply(this)+g(this.minutes(),2)+g(this.seconds(),2)}),k("Hmm",0,0,function(){return""+this.hours()+g(this.minutes(),2)}),k("Hmmss",0,0,function(){return""+this.hours()+g(this.minutes(),2)+g(this.seconds(),2)});function yp(i,u){k(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}yp("a",!0),yp("A",!1),st("hour","h"),qe("hour",13);function gp(i,u){return u._meridiemParse}H("a",gp),H("A",gp),H("H",Le),H("h",Le),H("k",Le),H("HH",Le,_t),H("hh",Le,_t),H("kk",Le,_t),H("hmm",Sn),H("hmmss",Cs),H("Hmm",Sn),H("Hmmss",Cs),Ne(["H","HH"],ne),Ne(["k","kk"],function(i,u,d){var f=de(i);u[ne]=f===24?0:f}),Ne(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Ne(["h","hh"],function(i,u,d){u[ne]=de(i),v(d).bigHour=!0}),Ne("hmm",function(i,u,d){var f=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f)),v(d).bigHour=!0}),Ne("hmmss",function(i,u,d){var f=i.length-4,p=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f,2)),u[jt]=de(i.substr(p)),v(d).bigHour=!0}),Ne("Hmm",function(i,u,d){var f=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f))}),Ne("Hmmss",function(i,u,d){var f=i.length-4,p=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f,2)),u[jt]=de(i.substr(p))});function Sw(i){return(i+"").toLowerCase().charAt(0)==="p"}var Ow=/[ap]\.?m?\.?/i,Mw=Vr("Hours",!0);function Rw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var _p={calendar:ue,longDateFormat:ke,invalidDate:ce,ordinal:K,dayOfMonthOrdinalParse:We,relativeTime:Ke,months:$v,monthsShort:up,week:rw,weekdays:lw,weekdaysMin:cw,weekdaysShort:mp,meridiemParse:Ow},Xe={},Ci={},Ii;function xw(i,u){var d,f=Math.min(i.length,u.length);for(d=0;d0;){if(p=co(b.slice(0,d).join("-")),p)return p;if(f&&f.length>=d&&xw(b,f)>=d-1)break;d--}u++}return Ii}function Aw(i){return i.match("^[^/\\\\]*$")!=null}function co(i){var u=null,d;if(Xe[i]===void 0&&typeof Hs!="undefined"&&Hs&&Hs.exports&&Aw(i))try{u=Ii._abbr,d=require,d("./locale/"+i),Rn(u)}catch(f){Xe[i]=null}return Xe[i]}function Rn(i,u){var d;return i&&(l(u)?d=Qr(i):d=fl(i,u),d?Ii=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Ii._abbr}function fl(i,u){if(u!==null){var d,f=_p;if(u.abbr=i,Xe[i]!=null)yt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=Xe[i]._config;else if(u.parentLocale!=null)if(Xe[u.parentLocale]!=null)f=Xe[u.parentLocale]._config;else if(d=co(u.parentLocale),d!=null)f=d._config;else return Ci[u.parentLocale]||(Ci[u.parentLocale]=[]),Ci[u.parentLocale].push({name:i,config:u}),null;return Xe[i]=new Q(P(f,u)),Ci[i]&&Ci[i].forEach(function(p){fl(p.name,p.config)}),Rn(i),Xe[i]}else return delete Xe[i],null}function Nw(i,u){if(u!=null){var d,f,p=_p;Xe[i]!=null&&Xe[i].parentLocale!=null?Xe[i].set(P(Xe[i]._config,u)):(f=co(i),f!=null&&(p=f._config),u=P(p,u),f==null&&(u.abbr=i),d=new Q(u),d.parentLocale=Xe[i],Xe[i]=d),Rn(i)}else Xe[i]!=null&&(Xe[i].parentLocale!=null?(Xe[i]=Xe[i].parentLocale,i===Rn()&&Rn(i)):Xe[i]!=null&&delete Xe[i]);return Xe[i]}function Qr(i){var u;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Ii;if(!n(i)){if(u=co(i),u)return u;i=[i]}return Pw(i)}function Cw(){return Y(Xe)}function hl(i){var u,d=i._a;return d&&v(i).overflow===-2&&(u=d[Ze]<0||d[Ze]>11?Ze:d[G]<1||d[G]>uo(d[et],d[Ze])?G:d[ne]<0||d[ne]>24||d[ne]===24&&(d[le]!==0||d[jt]!==0||d[es]!==0)?ne:d[le]<0||d[le]>59?le:d[jt]<0||d[jt]>59?jt:d[es]<0||d[es]>999?es:-1,v(i)._overflowDayOfYear&&(uG)&&(u=G),v(i)._overflowWeeks&&u===-1&&(u=Wv),v(i)._overflowWeekday&&u===-1&&(u=qv),v(i).overflow=u),i}var Iw=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lw=/Z|[+-]\d\d(?::?\d\d)?/,fo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pl=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Yw=/^\/?Date\((-?\d+)/i,Uw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ww={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function bp(i){var u,d,f=i._i,p=Iw.exec(f)||Fw.exec(f),b,x,re,ge,Ye=fo.length,$t=pl.length;if(p){for(v(i).iso=!0,u=0,d=Ye;uPi(x)||i._dayOfYear===0)&&(v(i)._overflowDayOfYear=!0),d=Ai(x,0,i._dayOfYear),i._a[Ze]=d.getUTCMonth(),i._a[G]=d.getUTCDate()),u=0;u<3&&i._a[u]==null;++u)i._a[u]=f[u]=p[u];for(;u<7;u++)i._a[u]=f[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[ne]===24&&i._a[le]===0&&i._a[jt]===0&&i._a[es]===0&&(i._nextDay=!0,i._a[ne]=0),i._d=(i._useUTC?Ai:ew).apply(null,f),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ne]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==b&&(v(i).weekdayMismatch=!0)}}function Vw(i){var u,d,f,p,b,x,re,ge,Ye;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(b=1,x=4,d=Fs(u.GG,i._a[et],Ni(He(),1,4).year),f=Fs(u.W,1),p=Fs(u.E,1),(p<1||p>7)&&(ge=!0)):(b=i._locale._week.dow,x=i._locale._week.doy,Ye=Ni(He(),b,x),d=Fs(u.gg,i._a[et],Ye.year),f=Fs(u.w,Ye.week),u.d!=null?(p=u.d,(p<0||p>6)&&(ge=!0)):u.e!=null?(p=u.e+b,(u.e<0||u.e>6)&&(ge=!0)):p=b),f<1||f>Xr(d,b,x)?v(i)._overflowWeeks=!0:ge!=null?v(i)._overflowWeekday=!0:(re=pp(d,f,p,b,x),i._a[et]=re.year,i._dayOfYear=re.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function yl(i){if(i._f===e.ISO_8601){bp(i);return}if(i._f===e.RFC_2822){vp(i);return}i._a=[],v(i).empty=!0;var u=""+i._i,d,f,p,b,x,re=u.length,ge=0,Ye,$t;for(p=j(i._f,i._locale).match(w)||[],$t=p.length,d=0;d<$t;d++)b=p[d],f=(u.match(Is(b,i))||[])[0],f&&(x=u.substr(0,u.indexOf(f)),x.length>0&&v(i).unusedInput.push(x),u=u.slice(u.indexOf(f)+f.length),ge+=f.length),M[b]?(f?v(i).empty=!1:v(i).unusedTokens.push(b),Ft(b,f,i)):i._strict&&!f&&v(i).unusedTokens.push(b);v(i).charsLeftOver=re-ge,u.length>0&&v(i).unusedInput.push(u),i._a[ne]<=12&&v(i).bigHour===!0&&i._a[ne]>0&&(v(i).bigHour=void 0),v(i).parsedDateParts=i._a.slice(0),v(i).meridiem=i._meridiem,i._a[ne]=Kw(i._locale,i._a[ne],i._meridiem),Ye=v(i).era,Ye!==null&&(i._a[et]=i._locale.erasConvertYear(Ye,i._a[et])),ml(i),hl(i)}function Kw(i,u,d){var f;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(f=i.isPM(d),f&&u<12&&(u+=12),!f&&u===12&&(u=0)),u)}function Zw(i){var u,d,f,p,b,x,re=!1,ge=i._f.length;if(ge===0){v(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:q()});function kp(i,u){var d,f;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return He();for(d=u[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function g0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return me(i,this),i=wp(i),i._a?(u=i._isUTC?T(i._a):He(i._a),this._isDSTShifted=this.isValid()&&u0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function _0(){return this.isValid()?!this._isUTC:!1}function T0(){return this.isValid()?this._isUTC:!1}function Sp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var b0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,v0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Sr(i,u){var d=i,f=null,p,b,x;return po(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(f=b0.exec(i))?(p=f[1]==="-"?-1:1,d={y:0,d:de(f[G])*p,h:de(f[ne])*p,m:de(f[le])*p,s:de(f[jt])*p,ms:de(gl(f[es]*1e3))*p}):(f=v0.exec(i))?(p=f[1]==="-"?-1:1,d={y:ts(f[2],p),M:ts(f[3],p),w:ts(f[4],p),d:ts(f[5],p),h:ts(f[6],p),m:ts(f[7],p),s:ts(f[8],p)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(x=w0(He(d.from),He(d.to)),d={},d.ms=x.milliseconds,d.M=x.months),b=new ho(d),po(i)&&a(i,"_locale")&&(b._locale=i._locale),po(i)&&a(i,"_isValid")&&(b._isValid=i._isValid),b}Sr.fn=ho.prototype,Sr.invalid=o0;function ts(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Op(i,u){var d={};return d.months=u.month()-i.month()+(u.year()-i.year())*12,i.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+i.clone().add(d.months,"M"),d}function w0(i,u){var d;return i.isValid()&&u.isValid()?(u=Tl(u,i),i.isBefore(u)?d=Op(i,u):(d=Op(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Mp(i,u){return function(d,f){var p,b;return f!==null&&!isNaN(+f)&&(yt(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=d,d=f,f=b),p=Sr(d,f),Rp(this,p,i),this}}function Rp(i,u,d,f){var p=u._milliseconds,b=gl(u._days),x=gl(u._months);!i.isValid()||(f=f==null?!0:f,x&&cp(i,Rt(i,"Month")+x*d),b&&Zn(i,"Date",Rt(i,"Date")+b*d),p&&i._d.setTime(i._d.valueOf()+p*d),f&&e.updateOffset(i,b||x))}var E0=Mp(1,"add"),k0=Mp(-1,"subtract");function xp(i){return typeof i=="string"||i instanceof String}function D0(i){return ve(i)||h(i)||xp(i)||c(i)||O0(i)||S0(i)||i===null||i===void 0}function S0(i){var u=s(i)&&!o(i),d=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,x=f.length;for(p=0;pd.valueOf():d.valueOf()9999?N(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):V(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",N(d,"Z")):N(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function q0(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,f,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=u+'[")]',this.format(d+f+p+b)}function j0(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function $0(i,u){return this.isValid()&&(ve(i)&&i.isValid()||He(i).isValid())?Sr({to:this,from:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function B0(i){return this.from(He(),i)}function G0(i,u){return this.isValid()&&(ve(i)&&i.isValid()||He(i).isValid())?Sr({from:this,to:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function H0(i){return this.to(He(),i)}function Pp(i){var u;return i===void 0?this._locale._abbr:(u=Qr(i),u!=null&&(this._locale=u),this)}var Ap=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Np(){return this._locale}var yo=1e3,Ls=60*yo,go=60*Ls,Cp=(365*400+97)*24*go;function Ys(i,u){return(i%u+u)%u}function Ip(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Cp:new Date(i,u,d).valueOf()}function Fp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Cp:Date.UTC(i,u,d)}function z0(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Fp:Ip,i){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=Ys(u+(this._isUTC?0:this.utcOffset()*Ls),go);break;case"minute":u=this._d.valueOf(),u-=Ys(u,Ls);break;case"second":u=this._d.valueOf(),u-=Ys(u,yo);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function V0(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Fp:Ip,i){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=go-Ys(u+(this._isUTC?0:this.utcOffset()*Ls),go)-1;break;case"minute":u=this._d.valueOf(),u+=Ls-Ys(u,Ls)-1;break;case"second":u=this._d.valueOf(),u+=yo-Ys(u,yo)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function K0(){return this._d.valueOf()-(this._offset||0)*6e4}function Z0(){return Math.floor(this.valueOf()/1e3)}function X0(){return new Date(this.valueOf())}function Q0(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function J0(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function e1(){return this.isValid()?this.toISOString():null}function t1(){return I(this)}function r1(){return _({},v(this))}function n1(){return v(this).overflow}function s1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}k("N",0,0,"eraAbbr"),k("NN",0,0,"eraAbbr"),k("NNN",0,0,"eraAbbr"),k("NNNN",0,0,"eraName"),k("NNNNN",0,0,"eraNarrow"),k("y",["y",1],"yo","eraYear"),k("y",["yy",2],0,"eraYear"),k("y",["yyy",3],0,"eraYear"),k("y",["yyyy",4],0,"eraYear"),H("N",vl),H("NN",vl),H("NNN",vl),H("NNNN",m1),H("NNNNN",y1),Ne(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,f){var p=d._locale.erasParse(i,f,d._strict);p?v(d).era=p:v(d).invalidEra=i}),H("y",dr),H("yy",dr),H("yyy",dr),H("yyyy",dr),H("yo",g1),Ne(["y","yy","yyy","yyyy"],et),Ne(["yo"],function(i,u,d,f){var p;d._locale._eraYearOrdinalRegex&&(p=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[et]=d._locale.eraYearOrdinalParse(i,p):u[et]=parseInt(i,10)});function i1(i,u){var d,f,p,b=this._eras||Qr("en")._eras;for(d=0,f=b.length;d=0)return b[f]}function o1(i,u){var d=i.since<=i.until?1:-1;return u===void 0?e(i.since).year():e(i.since).year()+(u-i.offset)*d}function u1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;ib&&(u=b),k1.call(this,i,u,d,f,p))}function k1(i,u,d,f,p){var b=pp(i,u,d,f,p),x=Ai(b.year,0,b.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}k("Q",0,"Qo","quarter"),st("quarter","Q"),qe("quarter",7),H("Q",Dn),Ne("Q",function(i,u){u[Ze]=(de(i)-1)*3});function D1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}k("D",["DD",2],"Do","date"),st("date","D"),qe("date",9),H("D",Le),H("DD",Le,_t),H("Do",function(i,u){return i?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient}),Ne(["D","DD"],G),Ne("Do",function(i,u){u[G]=de(i.match(Le)[0])});var Yp=Vr("Date",!0);k("DDD",["DDDD",3],"DDDo","dayOfYear"),st("dayOfYear","DDD"),qe("dayOfYear",4),H("DDD",Xn),H("DDDD",xi),Ne(["DDD","DDDD"],function(i,u,d){d._dayOfYear=de(i)});function S1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}k("m",["mm",2],0,"minute"),st("minute","m"),qe("minute",14),H("m",Le),H("mm",Le,_t),Ne(["m","mm"],le);var O1=Vr("Minutes",!1);k("s",["ss",2],0,"second"),st("second","s"),qe("second",15),H("s",Le),H("ss",Le,_t),Ne(["s","ss"],jt);var M1=Vr("Seconds",!1);k("S",0,0,function(){return~~(this.millisecond()/100)}),k(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),k(0,["SSS",3],0,"millisecond"),k(0,["SSSS",4],0,function(){return this.millisecond()*10}),k(0,["SSSSS",5],0,function(){return this.millisecond()*100}),k(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),k(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),k(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),k(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),st("millisecond","ms"),qe("millisecond",16),H("S",Xn,Dn),H("SS",Xn,_t),H("SSS",Xn,xi);var xn,Up;for(xn="SSSS";xn.length<=9;xn+="S")H(xn,dr);function R1(i,u){u[es]=de(("0."+i)*1e3)}for(xn="S";xn.length<=9;xn+="S")Ne(xn,R1);Up=Vr("Milliseconds",!1),k("z",0,0,"zoneAbbr"),k("zz",0,0,"zoneName");function x1(){return this._isUTC?"UTC":""}function P1(){return this._isUTC?"Coordinated Universal Time":""}var F=fe.prototype;F.add=E0,F.calendar=x0,F.clone=P0,F.diff=Y0,F.endOf=V0,F.format=j0,F.from=$0,F.fromNow=B0,F.to=G0,F.toNow=H0,F.get=so,F.invalidAt=n1,F.isAfter=A0,F.isBefore=N0,F.isBetween=C0,F.isSame=I0,F.isSameOrAfter=F0,F.isSameOrBefore=L0,F.isValid=t1,F.lang=Ap,F.locale=Pp,F.localeData=Np,F.max=t0,F.min=e0,F.parsingFlags=r1,F.set=Lr,F.startOf=z0,F.subtract=k0,F.toArray=Q0,F.toObject=J0,F.toDate=X0,F.toISOString=W0,F.inspect=q0,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=e1,F.toString=U0,F.unix=Z0,F.valueOf=K0,F.creationData=s1,F.eraName=u1,F.eraNarrow=l1,F.eraAbbr=c1,F.eraYear=d1,F.year=hp,F.isLeapYear=Jv,F.weekYear=_1,F.isoWeekYear=T1,F.quarter=F.quarters=D1,F.month=dp,F.daysInMonth=Zv,F.week=F.weeks=iw,F.isoWeek=F.isoWeeks=aw,F.weeksInYear=w1,F.weeksInWeekYear=E1,F.isoWeeksInYear=b1,F.isoWeeksInISOWeekYear=v1,F.date=Yp,F.day=F.days=Tw,F.weekday=bw,F.isoWeekday=vw,F.dayOfYear=S1,F.hour=F.hours=Mw,F.minute=F.minutes=O1,F.second=F.seconds=M1,F.millisecond=F.milliseconds=Up,F.utcOffset=c0,F.utc=f0,F.local=h0,F.parseZone=p0,F.hasAlignedHourOffset=m0,F.isDST=y0,F.isLocal=_0,F.isUtcOffset=T0,F.isUtc=Sp,F.isUTC=Sp,F.zoneAbbr=x1,F.zoneName=P1,F.dates=te("dates accessor is deprecated. Use date instead.",Yp),F.months=te("months accessor is deprecated. Use month instead",dp),F.years=te("years accessor is deprecated. Use year instead",hp),F.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",d0),F.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",g0);function A1(i){return He(i*1e3)}function N1(){return He.apply(null,arguments).parseZone()}function Wp(i){return i}var Re=Q.prototype;Re.calendar=y,Re.longDateFormat=ye,Re.invalidDate=Ie,Re.ordinal=Je,Re.preparse=Wp,Re.postformat=Wp,Re.relativeTime=Dr,Re.pastFuture=Mt,Re.set=W,Re.eras=i1,Re.erasParse=a1,Re.erasConvertYear=o1,Re.erasAbbrRegex=h1,Re.erasNameRegex=f1,Re.erasNarrowRegex=p1,Re.months=Hv,Re.monthsShort=zv,Re.monthsParse=Kv,Re.monthsRegex=Qv,Re.monthsShortRegex=Xv,Re.week=tw,Re.firstDayOfYear=sw,Re.firstDayOfWeek=nw,Re.weekdays=pw,Re.weekdaysMin=yw,Re.weekdaysShort=mw,Re.weekdaysParse=_w,Re.weekdaysRegex=ww,Re.weekdaysShortRegex=Ew,Re.weekdaysMinRegex=kw,Re.isPM=Sw,Re.meridiem=Rw;function To(i,u,d,f){var p=Qr(),b=T().set(f,u);return p[d](b,i)}function qp(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return To(i,u,d,"month");var f,p=[];for(f=0;f<12;f++)p[f]=To(i,f,d,"month");return p}function El(i,u,d,f){typeof i=="boolean"?(c(u)&&(d=u,u=void 0),u=u||""):(u=i,d=u,i=!1,c(u)&&(d=u,u=void 0),u=u||"");var p=Qr(),b=i?p._week.dow:0,x,re=[];if(d!=null)return To(u,(d+b)%7,f,"day");for(x=0;x<7;x++)re[x]=To(u,(x+b)%7,f,"day");return re}function C1(i,u){return qp(i,u,"months")}function I1(i,u){return qp(i,u,"monthsShort")}function F1(i,u,d){return El(i,u,d,"weekdays")}function L1(i,u,d){return El(i,u,d,"weekdaysShort")}function Y1(i,u,d){return El(i,u,d,"weekdaysMin")}Rn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var u=i%10,d=de(i%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return i+d}}),e.lang=te("moment.lang is deprecated. Use moment.locale instead.",Rn),e.langData=te("moment.langData is deprecated. Use moment.localeData instead.",Qr);var Jr=Math.abs;function U1(){var i=this._data;return this._milliseconds=Jr(this._milliseconds),this._days=Jr(this._days),this._months=Jr(this._months),i.milliseconds=Jr(i.milliseconds),i.seconds=Jr(i.seconds),i.minutes=Jr(i.minutes),i.hours=Jr(i.hours),i.months=Jr(i.months),i.years=Jr(i.years),this}function jp(i,u,d,f){var p=Sr(u,d);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function W1(i,u){return jp(this,i,u,1)}function q1(i,u){return jp(this,i,u,-1)}function $p(i){return i<0?Math.floor(i):Math.ceil(i)}function j1(){var i=this._milliseconds,u=this._days,d=this._months,f=this._data,p,b,x,re,ge;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=$p(kl(d)+u)*864e5,u=0,d=0),f.milliseconds=i%1e3,p=ft(i/1e3),f.seconds=p%60,b=ft(p/60),f.minutes=b%60,x=ft(b/60),f.hours=x%24,u+=ft(x/24),ge=ft(Bp(u)),d+=ge,u-=$p(kl(ge)),re=ft(d/12),d%=12,f.days=u,f.months=d,f.years=re,this}function Bp(i){return i*4800/146097}function kl(i){return i*146097/4800}function $1(i){if(!this.isValid())return NaN;var u,d,f=this._milliseconds;if(i=gt(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+f/864e5,d=this._months+Bp(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(kl(this._months)),i){case"week":return u/7+f/6048e5;case"day":return u+f/864e5;case"hour":return u*24+f/36e5;case"minute":return u*1440+f/6e4;case"second":return u*86400+f/1e3;case"millisecond":return Math.floor(u*864e5)+f;default:throw new Error("Unknown unit "+i)}}function B1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+de(this._months/12)*31536e6:NaN}function en(i){return function(){return this.as(i)}}var G1=en("ms"),H1=en("s"),z1=en("m"),V1=en("h"),K1=en("d"),Z1=en("w"),X1=en("M"),Q1=en("Q"),J1=en("y");function eE(){return Sr(this)}function tE(i){return i=gt(i),this.isValid()?this[i+"s"]():NaN}function rs(i){return function(){return this.isValid()?this._data[i]:NaN}}var rE=rs("milliseconds"),nE=rs("seconds"),sE=rs("minutes"),iE=rs("hours"),aE=rs("days"),oE=rs("months"),uE=rs("years");function lE(){return ft(this.days()/7)}var tn=Math.round,Us={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cE(i,u,d,f,p){return p.relativeTime(u||1,!!d,i,f)}function dE(i,u,d,f){var p=Sr(i).abs(),b=tn(p.as("s")),x=tn(p.as("m")),re=tn(p.as("h")),ge=tn(p.as("d")),Ye=tn(p.as("M")),$t=tn(p.as("w")),rn=tn(p.as("y")),Pn=b<=d.ss&&["s",b]||b0,Pn[4]=f,cE.apply(null,Pn)}function fE(i){return i===void 0?tn:typeof i=="function"?(tn=i,!0):!1}function hE(i,u){return Us[i]===void 0?!1:u===void 0?Us[i]:(Us[i]=u,i==="s"&&(Us.ss=u-1),!0)}function pE(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,f=Us,p,b;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(f=Object.assign({},Us,u),u.s!=null&&u.ss==null&&(f.ss=u.s-1)),p=this.localeData(),b=dE(this,!d,f,p),d&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Dl=Math.abs;function Ws(i){return(i>0)-(i<0)||+i}function bo(){if(!this.isValid())return this.localeData().invalidDate();var i=Dl(this._milliseconds)/1e3,u=Dl(this._days),d=Dl(this._months),f,p,b,x,re=this.asSeconds(),ge,Ye,$t,rn;return re?(f=ft(i/60),p=ft(f/60),i%=60,f%=60,b=ft(d/12),d%=12,x=i?i.toFixed(3).replace(/\.?0+$/,""):"",ge=re<0?"-":"",Ye=Ws(this._months)!==Ws(re)?"-":"",$t=Ws(this._days)!==Ws(re)?"-":"",rn=Ws(this._milliseconds)!==Ws(re)?"-":"",ge+"P"+(b?Ye+b+"Y":"")+(d?Ye+d+"M":"")+(u?$t+u+"D":"")+(p||f||i?"T":"")+(p?rn+p+"H":"")+(f?rn+f+"M":"")+(i?rn+x+"S":"")):"P0D"}var Oe=ho.prototype;Oe.isValid=a0,Oe.abs=U1,Oe.add=W1,Oe.subtract=q1,Oe.as=$1,Oe.asMilliseconds=G1,Oe.asSeconds=H1,Oe.asMinutes=z1,Oe.asHours=V1,Oe.asDays=K1,Oe.asWeeks=Z1,Oe.asMonths=X1,Oe.asQuarters=Q1,Oe.asYears=J1,Oe.valueOf=B1,Oe._bubble=j1,Oe.clone=eE,Oe.get=tE,Oe.milliseconds=rE,Oe.seconds=nE,Oe.minutes=sE,Oe.hours=iE,Oe.days=aE,Oe.weeks=lE,Oe.months=oE,Oe.years=uE,Oe.humanize=pE,Oe.toISOString=bo,Oe.toString=bo,Oe.toJSON=bo,Oe.locale=Pp,Oe.localeData=Np,Oe.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bo),Oe.lang=Ap,k("X",0,0,"unix"),k("x",0,0,"valueOf"),H("x",Mn),H("X",ao),Ne("X",function(i,u,d){d._d=new Date(parseFloat(i)*1e3)}),Ne("x",function(i,u,d){d._d=new Date(de(i))});return e.version="2.29.4",t(He),e.fn=F,e.min=r0,e.max=n0,e.now=s0,e.utc=T,e.unix=A1,e.months=C1,e.isDate=h,e.locale=Rn,e.invalid=q,e.duration=Sr,e.isMoment=ve,e.weekdays=F1,e.parseZone=N1,e.localeData=Qr,e.isDuration=po,e.monthsShort=I1,e.weekdaysMin=Y1,e.defineLocale=fl,e.updateLocale=Nw,e.locales=Cw,e.weekdaysShort=L1,e.normalizeUnits=gt,e.relativeTimeRounding=fE,e.relativeTimeThreshold=hE,e.calendarFormat=R0,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var sy=O((ry,ny)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(g){return Object.prototype.toString.call(g)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",o=typeof Reflect=="object",l=typeof setImmediate=="function",c=l?setImmediate:setTimeout,h=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var g=Object.getOwnPropertyNames(y);return g.push.apply(g,Object.getOwnPropertySymbols(y)),g}:Object.keys;function m(){this._events={},this._conf&&_.call(this,this._conf)}function _(y){y&&(this._conf=y,y.delimiter&&(this.delimiter=y.delimiter),y.maxListeners!==r&&(this._maxListeners=y.maxListeners),y.wildcard&&(this.wildcard=y.wildcard),y.newListener&&(this._newListener=y.newListener),y.removeListener&&(this._removeListener=y.removeListener),y.verboseMemoryLeak&&(this.verboseMemoryLeak=y.verboseMemoryLeak),y.ignoreErrors&&(this.ignoreErrors=y.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function T(y,g){var w="(node) warning: possible EventEmitter memory leak detected. "+y+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+g+"."),typeof process!="undefined"&&process.emitWarning){var E=new Error(w);E.name="MaxListenersExceededWarning",E.emitter=this,E.count=y,process.emitWarning(E)}else console.error(w),console.trace&&console.trace()}var D=function(y,g,w){var E=arguments.length;switch(E){case 0:return[];case 1:return[y];case 2:return[y,g];case 3:return[y,g,w];default:for(var S=new Array(E);E--;)S[E]=arguments[E];return S}};function v(y,g){for(var w={},E,S=y.length,M=g?g.length:0,k=0;k0;)y=M[A],k.call(C,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function I(y,g,w,E){var S=Object.assign({},g);if(!y)return S;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),k=M.length,C,A,N;function j(ye){throw Error('Invalid "'+C+'" option value'+(ye?". Reason: "+ye:""))}for(var ke=0;ke0;)if(C===y[A])return M;k(g)}}var B=$(["function"]),me=$(["object","function"]);function fe(y,g,w){var E,S,M=0,k,C=new y(function(A,N,j){w=I(w,{timeout:0,overload:!1},{timeout:function(Ie,K){return Ie*=1,(typeof Ie!="number"||Ie<0||!Number.isFinite(Ie))&&K("timeout must be a positive number"),Ie}}),E=!w.overload&&typeof y.prototype.cancel=="function"&&typeof j=="function";function ke(){S&&(S=null),M&&(clearTimeout(M),M=0)}var ye=function(Ie){ke(),A(Ie)},ce=function(Ie){ke(),N(Ie)};E?g(ye,ce,j):(S=[function(Ie){ce(Ie||Error("canceled"))}],g(ye,ce,function(Ie){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ie!="function")throw TypeError("onCancel callback must be a function");S.push(Ie)}),k=!0),w.timeout>0&&(M=setTimeout(function(){var Ie=Error("timeout");Ie.code="ETIMEDOUT",M=0,C.cancel(Ie),N(Ie)},w.timeout))});return E||(C.cancel=function(A){if(!!S){for(var N=S.length,j=1;j0;)ce=Mt[C],ce!=="_listeners"&&(Ae=ee(y,g,w[ce],E+1,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae));return ye}else if(Ke==="**"){for(Je=E+1===S||E+2===S&&Dr==="*",Je&&w._listeners&&(ye=ee(y,g,w,S,S)),Mt=h(w),C=Mt.length;C-- >0;)ce=Mt[C],ce!=="_listeners"&&(ce==="*"||ce==="**"?(w[ce]._listeners&&!Je&&(Ae=ee(y,g,w[ce],S,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae)),Ae=ee(y,g,w[ce],E,S)):ce===Dr?Ae=ee(y,g,w[ce],E+2,S):Ae=ee(y,g,w[ce],E,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae));return ye}else w[Ke]&&(ye=ee(y,g,w[Ke],E+1,S));if(Ie=w["*"],Ie&&ee(y,g,Ie,E+1,S),K=w["**"],K)if(E0;)ce=Mt[C],ce!=="_listeners"&&(ce===Dr?ee(y,g,K[ce],E+2,S):ce===Ke?ee(y,g,K[ce],E+1,S):(We={},We[ce]=K[ce],ee(y,g,{"**":We},E+1,S)));else K._listeners?ee(y,g,K,S,S):K["*"]&&K["*"]._listeners&&ee(y,g,K["*"],S,S);return ye}function te(y,g,w){var E=0,S=0,M,k=this.delimiter,C=k.length,A;if(typeof y=="string")if((M=y.indexOf(k))!==-1){A=new Array(5);do A[E++]=y.slice(S,M),S=M+C;while((M=y.indexOf(k,S))!==-1);A[E++]=y.slice(S)}else A=[y],E=1;else A=y,E=y.length;if(E>1){for(M=0;M+10&&N._listeners.length>this._maxListeners&&(N._listeners.warned=!0,T.call(this,N._listeners.length,j))):N._listeners=g,!0;return!0}function It(y,g,w,E){for(var S=h(y),M=S.length,k,C,A,N=y._listeners,j;M-- >0;)C=S[M],k=y[C],C==="_listeners"?A=w:A=w?w.concat(C):[C],j=E||typeof C=="symbol",N&&g.push(j?A:A.join(this.delimiter)),typeof k=="object"&&It.call(this,k,g,A,j);return g}function yt(y){for(var g=h(y),w=g.length,E,S,M;w-- >0;)S=g[w],E=y[S],E&&(M=!0,S!=="_listeners"&&!yt(E)&&delete y[S]);return M}function V(y,g,w){this.emitter=y,this.event=g,this.listener=w}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function W(y,g,w){if(w===!0)S=!0;else if(w===!1)E=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var E=w.async,S=w.promisify,M=w.nextTick,k=w.objectify}if(E||M||S){var C=g,A=g._origin||g;if(M&&!s)throw Error("process.nextTick is not supported");S===r&&(S=g.constructor.name==="AsyncFunction"),g=function(){var N=arguments,j=this,ke=this.event;return S?M?Promise.resolve():new Promise(function(ye){c(ye)}).then(function(){return j.event=ke,C.apply(j,N)}):(M?process.nextTick:c)(function(){j.event=ke,C.apply(j,N)})},g._async=!0,g._origin=A}return[g,k?new V(this,y,g):this]}function P(y){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,_.call(this,y)}P.EventEmitter2=P,P.prototype.listenTo=function(y,g,w){if(typeof y!="object")throw TypeError("target musts be an object");var E=this;w=I(w,{on:r,off:r,reducers:r},{on:B,off:B,reducers:me});function S(M){if(typeof M!="object")throw TypeError("events must be an object");var k=w.reducers,C=ve.call(E,y),A;C===-1?A=new R(E,y,w):A=E._observers[C];for(var N=h(M),j=N.length,ke,ye=typeof k=="function",ce=0;ce0;)S=w[E],(!y||S._target===y)&&(S.unsubscribe(g),M=!0);return M},P.prototype.delimiter=".",P.prototype.setMaxListeners=function(y){y!==r&&(this._maxListeners=y,this._conf||(this._conf={}),this._conf.maxListeners=y)},P.prototype.getMaxListeners=function(){return this._maxListeners},P.prototype.event="",P.prototype.once=function(y,g,w){return this._once(y,g,!1,w)},P.prototype.prependOnceListener=function(y,g,w){return this._once(y,g,!0,w)},P.prototype._once=function(y,g,w,E){return this._many(y,1,g,w,E)},P.prototype.many=function(y,g,w,E){return this._many(y,g,w,!1,E)},P.prototype.prependMany=function(y,g,w,E){return this._many(y,g,w,!0,E)},P.prototype._many=function(y,g,w,E,S){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function k(){return--g===0&&M.off(y,k),w.apply(this,arguments)}return k._origin=w,this._on(y,k,E,S)},P.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],g,w=this.wildcard,E,S,M,k,C;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(w&&(g=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(S=y.length,a){for(M=0;M3)for(E=new Array(A-1),k=1;k3)for(S=new Array(N-1),C=1;C0&&this._events[y].length>this._maxListeners&&(this._events[y].warned=!0,T.call(this,this._events[y].length,y))):this._events[y]=g,S)},P.prototype.off=function(y,g){if(typeof g!="function")throw new Error("removeListener only takes instances of Function");var w,E=[];if(this.wildcard){var S=typeof y=="string"?y.split(this.delimiter):y.slice();if(E=ee.call(this,null,S,this.listenerTree,0),!E)return this}else{if(!this._events[y])return this;w=this._events[y],E.push({_listeners:w})}for(var M=0;M0){for(E=this._all,g=0,w=E.length;g0;)E=g[w[M]],typeof E=="function"?S.push(E):S.push.apply(S,E);return S}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var C=[],A=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,C,A,k,0),C}return g?(E=g[y],E?typeof E=="function"?[E]:E:[]):[]}},P.prototype.eventNames=function(y){var g=this._events;return this.wildcard?It.call(this,this.listenerTree,[],null,y):g?h(g):[]},P.prototype.listenerCount=function(y){return this.listeners(y).length},P.prototype.hasListeners=function(y){if(this.wildcard){var g=[],w=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,g,w,this.listenerTree,0),g.length>0}var E=this._events,S=this._all;return!!(S&&S.length||E&&(y===r?h(E).length:E[y]))},P.prototype.listenersAny=function(){return this._all?this._all:[]},P.prototype.waitFor=function(y,g){var w=this,E=typeof g;return E==="number"?g={timeout:g}:E==="function"&&(g={filter:g}),g=I(g,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:B,Promise:q}),fe(g.Promise,function(S,M,k){function C(){var A=g.filter;if(!(A&&!A.apply(w,arguments)))if(w.off(y,C),g.handleError){var N=arguments[0];N?M(N):S(D.apply(null,arguments).slice(1))}else S(D.apply(null,arguments))}k(function(){w.off(y,C)}),w._on(y,C,!1)},{timeout:g.timeout,overload:g.overload})};function Q(y,g,w){w=I(w,{Promise,timeout:0,overload:!1},{Promise:q});var E=w.Promise;return fe(E,function(S,M,k){var C;if(typeof y.addEventListener=="function"){C=function(){S(D.apply(null,arguments))},k(function(){y.removeEventListener(g,C)}),y.addEventListener(g,C,{once:!0});return}var A=function(){N&&y.removeListener("error",N),S(D.apply(null,arguments))},N;g!=="error"&&(N=function(j){y.removeListener(g,A),M(j)},y.once("error",N)),k(function(){N&&y.removeListener("error",N),y.removeListener(g,A)}),y.once(g,A)},{timeout:w.timeout,overload:w.overload})}var Y=P.prototype;if(Object.defineProperties(P,{defaultMaxListeners:{get:function(){return Y._maxListeners},set:function(y){if(typeof y!="number"||y<0||Number.isNaN(y))throw TypeError("n must be a non-negative number");Y._maxListeners=y},enumerable:!0},once:{value:Q,writable:!0,configurable:!0}}),Object.defineProperties(Y,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return P});else if(typeof ry=="object")ny.exports=P;else{var ue=new Function("","return this")();ue.EventEmitter2=P}})()});var Fe=O(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.matchAnyPattern=Ln.extractTerms=Ln.repeatedTimeunitPattern=void 0;function Ok(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Ln.repeatedTimeunitPattern=Ok;function Dy(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Ln.extractTerms=Dy;function Mk(r){return`(?:${Dy(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Ln.matchAnyPattern=Mk});var xe=O((Xl,Ql)=>{(function(r,e){typeof Xl=="object"&&typeof Ql!="undefined"?Ql.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Xl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",h="month",m="quarter",_="year",T="date",D="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},q=function(V,W,P){var Q=String(V);return!Q||Q.length>=W?V:""+Array(W+1-Q.length).join(P)+V},$={s:q,z:function(V){var W=-V.utcOffset(),P=Math.abs(W),Q=Math.floor(P/60),Y=P%60;return(W<=0?"+":"-")+q(Q,2,"0")+":"+q(Y,2,"0")},m:function V(W,P){if(W.date(){"use strict";var Rk=Yn&&Yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.findYearClosestToRef=Yn.findMostLikelyADYear=void 0;var xk=Rk(xe());function Pk(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Yn.findMostLikelyADYear=Pk;function Ak(r,e,t){let n=xk.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let a=s.add(1,"y"),o=s.add(-1,"y");return Math.abs(a.diff(n)){"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.parseTimeUnits=_e.TIME_UNITS_PATTERN=_e.parseYear=_e.YEAR_PATTERN=_e.parseOrdinalNumberPattern=_e.ORDINAL_NUMBER_PATTERN=_e.parseNumberPattern=_e.NUMBER_PATTERN=_e.TIME_UNIT_DICTIONARY=_e.ORDINAL_WORD_DICTIONARY=_e.INTEGER_WORD_DICTIONARY=_e.MONTH_DICTIONARY=_e.FULL_MONTH_NAME_DICTIONARY=_e.WEEKDAY_DICTIONARY=void 0;var Yo=Fe(),Nk=At();_e.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};_e.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};_e.MONTH_DICTIONARY=Object.assign(Object.assign({},_e.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});_e.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};_e.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};_e.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};_e.NUMBER_PATTERN=`(?:${Yo.matchAnyPattern(_e.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Oy(r){let e=r.toLowerCase();return _e.INTEGER_WORD_DICTIONARY[e]!==void 0?_e.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}_e.parseNumberPattern=Oy;_e.ORDINAL_NUMBER_PATTERN=`(?:${Yo.matchAnyPattern(_e.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Ck(r){let e=r.toLowerCase();return _e.ORDINAL_WORD_DICTIONARY[e]!==void 0?_e.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}_e.parseOrdinalNumberPattern=Ck;_e.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function Ik(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return Nk.findMostLikelyADYear(e)}_e.parseYear=Ik;var My=`(${_e.NUMBER_PATTERN})\\s{0,3}(${Yo.matchAnyPattern(_e.TIME_UNIT_DICTIONARY)})`,Sy=new RegExp(My,"i");_e.TIME_UNITS_PATTERN=Yo.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",My);function Fk(r){let e={},t=r,n=Sy.exec(t);for(;n;)Lk(e,n),t=t.substring(n[0].length).trim(),n=Sy.exec(t);return e}_e.parseTimeUnits=Fk;function Lk(r,e){let t=Oy(e[1]),n=_e.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ry=O((Jl,ec)=>{(function(r,e){typeof Jl=="object"&&typeof ec!="undefined"?ec.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Jl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(l){return this.$utils().u(l)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(l-1))};var a=s.add;s.add=function(l,c){return l=Number(l),this.$utils().p(c)===e?this.add(3*l,r):a.bind(this)(l,c)};var o=s.startOf;s.startOf=function(l,c){var h=this.$utils(),m=!!h.u(c)||c;if(h.p(l)===e){var _=this.quarter()-1;return m?this.month(3*_).startOf(r).startOf("day"):this.month(3*_+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var _r=O(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.implySimilarTime=qr.assignSimilarTime=qr.assignSimilarDate=qr.assignTheNextDay=void 0;var xy=mt();function Yk(r,e){e=e.add(1,"day"),Py(r,e),Ay(r,e)}qr.assignTheNextDay=Yk;function Py(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}qr.assignSimilarDate=Py;function Uk(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",xy.Meridiem.AM):r.assign("meridiem",xy.Meridiem.PM)}qr.assignSimilarTime=Uk;function Ay(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}qr.implySimilarTime=Ay});var Ny=O(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.toTimezoneOffset=hs.TIMEZONE_ABBR_MAP=void 0;hs.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function Wk(r){var e;return r==null?null:typeof r=="number"?r:(e=hs.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}hs.toTimezoneOffset=Wk});var rt=O(jr=>{"use strict";var Cy=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ParsingResult=jr.ParsingComponents=jr.ReferenceWithTimezone=void 0;var qk=Cy(Ry()),Uo=Cy(xe()),tc=_r(),jk=Ny();Uo.default.extend(qk.default);var rc=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=jk.toTimezoneOffset(e.timezone))}};jr.ReferenceWithTimezone=rc;var ps=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=Uo.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new ps(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Uo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let s=-e.getTimezoneOffset(),a=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-a}static createRelativeFromReference(e,t){let n=Uo.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new ps(e);return t.hour||t.minute||t.second?(tc.assignSimilarTime(s,n),tc.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(tc.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};jr.ParsingComponents=ps;var ea=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new ps(e),this.end=a}clone(){let e=new ea(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};jr.ParsingResult=ea});var Z=O(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.AbstractParserWithWordBoundaryChecking=void 0;var nc=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let a=2;a{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var ic=Nt(),$k=rt(),Bk=Z(),Gk=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Hk=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),sc=class extends Bk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?Hk:Gk}innerExtract(e,t){let n=ic.parseTimeUnits(t[1]);return $k.ParsingComponents.createRelativeFromReference(e.reference,n)}};ac.default=sc});var qy=O(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var zk=At(),Uy=Nt(),Wy=Nt(),qo=Nt(),Vk=Fe(),Kk=Z(),Zk=new RegExp(`(?:on\\s{0,3})?(${qo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${qo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Vk.matchAnyPattern(Uy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Wy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Fy=1,Ly=2,Xk=3,Yy=4,oc=class extends Kk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Uy.MONTH_DICTIONARY[t[Xk].toLowerCase()],a=qo.parseOrdinalNumberPattern(t[Fy]);if(a>31)return t.index=t.index+t[Fy].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Yy]){let o=Wy.parseYear(t[Yy]);n.start.assign("year",o)}else{let o=zk.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Ly]){let o=qo.parseOrdinalNumberPattern(t[Ly]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};uc.default=oc});var Hy=O(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var Qk=At(),By=Nt(),jo=Nt(),Gy=Nt(),Jk=Fe(),eD=Z(),tD=new RegExp(`(${Jk.matchAnyPattern(By.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${jo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${jo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Gy.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),rD=1,nD=2,jy=3,$y=4,lc=class extends eD.AbstractParserWithWordBoundaryChecking{innerPattern(){return tD}innerExtract(e,t){let n=By.MONTH_DICTIONARY[t[rD].toLowerCase()],s=jo.parseOrdinalNumberPattern(t[nD]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[$y]){let c=Gy.parseYear(t[$y]);a.assign("year",c)}else{let c=Qk.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[jy])return a;let o=jo.parseOrdinalNumberPattern(t[jy]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};cc.default=lc});var Ky=O(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var dc=Nt(),sD=At(),iD=Fe(),Vy=Nt(),aD=Z(),oD=new RegExp(`((?:in)\\s*)?(${iD.matchAnyPattern(dc.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Vy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),uD=1,lD=2,zy=3,fc=class extends aD.AbstractParserWithWordBoundaryChecking{innerPattern(){return oD}innerExtract(e,t){let n=t[lD].toLowerCase();if(t[0].length<=3&&!dc.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[uD]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=dc.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[zy]){let o=Vy.parseYear(t[zy]);s.start.assign("year",o)}else{let o=sD.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};hc.default=fc});var Qy=O(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var Xy=Nt(),cD=Fe(),dD=Z(),fD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${cD.matchAnyPattern(Xy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),hD=1,pD=2,Zy=3,mD=4,pc=class extends dD.AbstractParserWithWordBoundaryChecking{innerPattern(){return fD}innerExtract(e,t){let n=t[Zy]?parseInt(t[Zy]):Xy.MONTH_DICTIONARY[t[pD].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[hD]);return{day:parseInt(t[mD]),month:n,year:s}}};mc.default=pc});var Jy=O(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var yD=Z(),gD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),_D=1,TD=2,yc=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return gD}innerExtract(e,t){let n=parseInt(t[TD]),s=parseInt(t[_D]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};gc.default=yc});var ms=O(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.AbstractTimeExpressionParser=void 0;var zt=mt();function bD(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function vD(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var eg=2,Ks=3,$o=4,Bo=5,ta=6,_c=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let s=t.index+t[1].length,a=t[0].substring(t[1].length),o=e.createParsingResult(s,a,n);t.index+=t[0].length;let l=e.text.substring(t.index),h=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&h&&h[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!h||h[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,h,o),o.end&&(o.text+=h[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[eg]);if(l>100){if(this.strictMode||t[Ks]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[Ks]!=null){if(t[Ks].length==1&&!t[ta])return null;a=parseInt(t[Ks])}if(a>=60)return null;if(l>12&&(o=zt.Meridiem.PM),t[ta]!=null){if(l>12)return null;let c=t[ta][0].toLowerCase();c=="a"&&(o=zt.Meridiem.AM,l==12&&(l=0)),c=="p"&&(o=zt.Meridiem.PM,l!=12&&(l+=12))}if(s.assign("hour",l),s.assign("minute",a),o!==null?s.assign("meridiem",o):l<12?s.imply("meridiem",zt.Meridiem.AM):s.imply("meridiem",zt.Meridiem.PM),t[Bo]!=null){let c=parseInt(t[Bo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[$o]!=null){let c=parseInt(t[$o]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Bo]!=null){let c=parseInt(t[Bo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[$o]!=null){let c=parseInt(t[$o]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[eg]),o=0,l=-1;if(t[Ks]!=null?o=parseInt(t[Ks]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=zt.Meridiem.PM),t[ta]!=null){if(a>12)return null;let c=t[ta][0].toLowerCase();c=="a"&&(l=zt.Meridiem.AM,a==12&&(a=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),c=="p"&&(l=zt.Meridiem.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(l==zt.Meridiem.AM?(n.start.imply("meridiem",zt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",zt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",a),s.assign("minute",o),l>=0?s.assign("meridiem",l):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?s.imply("meridiem",zt.Meridiem.AM):a<=12&&(s.assign("hour",a+12),s.assign("meridiem",zt.Meridiem.PM)):a>12?s.imply("meridiem",zt.Meridiem.PM):a<=12&&s.imply("meridiem",zt.Meridiem.AM),s.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let a=parseInt(s),o=parseInt(n);if(a>24||o>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=bD(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=vD(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Go.AbstractTimeExpressionParser=_c});var tg=O(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Ho=mt(),wD=ms(),Tc=class extends wD.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ho.Meridiem.PM)):s<6&&n.assign("meridiem",Ho.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Ho.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Ho.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};bc.default=Tc});var Tr=O(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.addImpliedTimeUnits=Zs.reverseTimeUnits=void 0;function ED(r){let e={};for(let t in r)e[t]=-r[t];return e}Zs.reverseTimeUnits=ED;function kD(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}Zs.addImpliedTimeUnits=kD});var rg=O(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var wc=Nt(),DD=rt(),SD=Z(),OD=Tr(),MD=new RegExp(`(${wc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),RD=new RegExp(`(${wc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),vc=class extends SD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?RD:MD}innerExtract(e,t){let n=wc.parseTimeUnits(t[1]),s=OD.reverseTimeUnits(n);return DD.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ec.default=vc});var ng=O(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var Dc=Nt(),xD=rt(),PD=Z(),AD=new RegExp(`(${Dc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),ND=new RegExp("("+Dc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),CD=1,kc=class extends PD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?ND:AD}innerExtract(e,t){let n=Dc.parseTimeUnits(t[CD]);return xD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Sc.default=kc});var Qs=O(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.MergingRefiner=Xs.Filter=void 0;var Oc=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Xs.Filter=Oc;var Mc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],a=null;for(let o=1;o{console.log(`${this.constructor.name} merged ${c} and ${h} into ${m}`)}),s=m}}return s!=null&&n.push(s),n}};Xs.MergingRefiner=Mc});var $r=O(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var ID=Qs(),Rc=class extends ID.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(a=>{t.start.isCertain(a)||t.start.assign(a,n.start.get(a))}),t.start.getCertainComponents().forEach(a=>{n.start.isCertain(a)||n.start.assign(a,t.start.get(a))})),t.start.date().getTime()>n.start.date().getTime()){let a=t.start.dayjs(),o=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&a.add(-7,"days").isBefore(o)?(a=a.add(-7,"days"),t.start.imply("day",a.date()),t.start.imply("month",a.month()+1),t.start.imply("year",a.year())):n.start.isOnlyWeekdayComponent()&&o.add(7,"days").isAfter(a)?(o=o.add(7,"days"),n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index{"use strict";var FD=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var LD=FD($r()),Pc=class extends LD.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ra.default=Pc});var ig=O(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.mergeDateTimeComponent=Js.mergeDateTimeResult=void 0;var YD=mt();function UD(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=Ac(n,s),r.end!=null||e.end!=null){let a=r.end==null?r.start:r.end,o=e.end==null?e.start:e.end,l=Ac(a,o);r.end==null&&l.date().getTime(){"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var WD=Qs(),ag=ig(),Nc=class extends WD.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let s=t.start.isOnlyDate()?ag.mergeDateTimeResult(t,n):ag.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};Cc.default=Nc});var og=O(na=>{"use strict";var qD=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var jD=qD(un()),Ic=class extends jD.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};na.default=Ic});var ug=O(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var $D=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),BD={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},Fc=class{constructor(e){this.timezone=Object.assign(Object.assign({},BD),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(a=>{var o,l;let c=e.text.substring(a.index+a.text.length),h=$D.exec(c);if(!h)return;let m=h[1].toUpperCase(),_=(l=(o=s[m])!==null&&o!==void 0?o:this.timezone[m])!==null&&l!==void 0?l:null;if(_===null)return;e.debug(()=>{console.log(`Extracting timezone: '${m}' into: ${_} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&_!=T&&(a.start.isCertain("timezoneOffset")||m!=h[1])||a.start.isOnlyDate()&&m!=h[1]||(a.text+=h[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",_),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",_))}),t}};Lc.default=Fc});var zo=O(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var GD=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),HD=1,zD=2,VD=3,Yc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),a=GD.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[zD]),l=parseInt(a[VD]||"0"),c=o*60+l;c>14*60||(a[HD]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};Uc.default=Yc});var lg=O(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var Wc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let a=1;as.text.length&&(s=o):(n.push(s),s=o)}return s!=null&&n.push(s),n}};qc.default=Wc});var cg=O(sa=>{"use strict";var KD=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var ZD=KD(xe()),jc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=ZD.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let a=0;a<3&&s.isAfter(n.start.dayjs());a++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};sa.default=jc});var dg=O(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var XD=Qs(),$c=class extends XD.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};Bc.default=$c});var zc=O(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var QD=Z(),JD=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),eS=1,tS=2,rS=3,fg=4,nS=5,hg=6,pg=7,mg=8,yg=9,Gc=class extends QD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){let n={};if(n.year=parseInt(t[eS]),n.month=parseInt(t[tS]),n.day=parseInt(t[rS]),t[fg]!=null)if(n.hour=parseInt(t[fg]),n.minute=parseInt(t[nS]),t[hg]!=null&&(n.second=parseInt(t[hg])),t[pg]!=null&&(n.millisecond=parseInt(t[pg])),t[mg]==null)n.timezoneOffset=0;else{let s=parseInt(t[mg]),a=0;t[yg]!=null&&(a=parseInt(t[yg]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};Hc.default=Gc});var gg=O(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var sS=Qs(),Vc=class extends sS.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Kc.default=Vc});var ln=O(ei=>{"use strict";var ys=ei&&ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ei,"__esModule",{value:!0});ei.includeCommonConfiguration=void 0;var iS=ys(ug()),aS=ys(zo()),_g=ys(lg()),oS=ys(cg()),uS=ys(dg()),lS=ys(zc()),cS=ys(gg());function dS(r,e=!1){return r.parsers.unshift(new lS.default),r.refiners.unshift(new cS.default),r.refiners.unshift(new iS.default),r.refiners.unshift(new aS.default),r.refiners.unshift(new _g.default),r.refiners.push(new _g.default),r.refiners.push(new oS.default),r.refiners.push(new uS.default(e)),r}ei.includeCommonConfiguration=dS});var dn=O(Ce=>{"use strict";var fS=Ce&&Ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.noon=Ce.morning=Ce.midnight=Ce.yesterdayEvening=Ce.evening=Ce.lastNight=Ce.tonight=Ce.theDayAfter=Ce.tomorrow=Ce.theDayBefore=Ce.yesterday=Ce.today=Ce.now=void 0;var Br=rt(),ti=fS(xe()),cn=_r(),ia=mt();function hS(r){let e=ti.default(r.instant),t=new Br.ParsingComponents(r,{});return cn.assignSimilarDate(t,e),cn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Ce.now=hS;function pS(r){let e=ti.default(r.instant),t=new Br.ParsingComponents(r,{});return cn.assignSimilarDate(t,e),cn.implySimilarTime(t,e),t}Ce.today=pS;function mS(r){return Tg(r,1)}Ce.yesterday=mS;function Tg(r,e){return Zc(r,-e)}Ce.theDayBefore=Tg;function yS(r){return Zc(r,1)}Ce.tomorrow=yS;function Zc(r,e){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return t=t.add(e,"day"),cn.assignSimilarDate(n,t),cn.implySimilarTime(n,t),n}Ce.theDayAfter=Zc;function gS(r,e=22){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",ia.Meridiem.PM),cn.assignSimilarDate(n,t),n}Ce.tonight=gS;function _S(r,e=0){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),cn.assignSimilarDate(n,t),n.imply("hour",e),n}Ce.lastNight=_S;function TS(r,e=20){let t=new Br.ParsingComponents(r,{});return t.imply("meridiem",ia.Meridiem.PM),t.imply("hour",e),t}Ce.evening=TS;function bS(r,e=20){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return t=t.add(-1,"day"),cn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",ia.Meridiem.PM),n}Ce.yesterdayEvening=bS;function vS(r){let e=new Br.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ce.midnight=vS;function wS(r,e=6){let t=new Br.ParsingComponents(r,{});return t.imply("meridiem",ia.Meridiem.AM),t.imply("hour",e),t}Ce.morning=wS;function ES(r){let e=new Br.ParsingComponents(r,{});return e.imply("meridiem",ia.Meridiem.AM),e.imply("hour",12),e}Ce.noon=ES});var bg=O(Rr=>{"use strict";var kS=Rr&&Rr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),DS=Rr&&Rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),SS=Rr&&Rr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&kS(e,r,t);return DS(e,r),e},OS=Rr&&Rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rr,"__esModule",{value:!0});var MS=OS(xe()),RS=Z(),xS=_r(),aa=SS(dn()),PS=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Xc=class extends RS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return PS}innerExtract(e,t){let n=MS.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return aa.now(e.reference);case"today":return aa.today(e.reference);case"yesterday":return aa.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return aa.tomorrow(e.reference);case"tonight":return aa.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),xS.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};Rr.default=Xc});var vg=O(oa=>{"use strict";var AS=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var Vo=mt(),NS=Z(),CS=AS(xe()),IS=_r(),FS=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Qc=class extends NS.AbstractParserWithWordBoundaryChecking{innerPattern(){return FS}innerExtract(e,t){let n=CS.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",Vo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",Vo.Meridiem.PM),s.imply("hour",20);break;case"midnight":IS.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",Vo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",Vo.Meridiem.AM),s.imply("hour",12);break}return s}};oa.default=Qc});var gs=O(Un=>{"use strict";var LS=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.toDayJSClosestWeekday=Un.toDayJSWeekday=void 0;var wg=LS(xe());function YS(r,e,t){if(!t)return Eg(r,e);let n=wg.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Un.toDayJSWeekday=YS;function Eg(r,e){let t=wg.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var kg=Nt(),US=Fe(),WS=Z(),qS=gs(),jS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${US.matchAnyPattern(kg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),$S=1,BS=2,GS=3,Jc=class extends WS.AbstractParserWithWordBoundaryChecking{innerPattern(){return jS}innerExtract(e,t){let n=t[BS].toLowerCase(),s=kg.WEEKDAY_DICTIONARY[n],a=t[$S],o=t[GS],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="last"||l=="past"?c="last":l=="next"?c="next":l=="this"&&(c="this");let h=qS.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};ed.default=Jc});var Mg=O(ua=>{"use strict";var HS=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var Og=Nt(),Sg=rt(),zS=HS(xe()),VS=Z(),KS=Fe(),ZS=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${KS.matchAnyPattern(Og.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),XS=1,QS=2,td=class extends VS.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZS}innerExtract(e,t){let n=t[XS].toLowerCase(),s=t[QS].toLowerCase(),a=Og.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,Sg.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,Sg.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=zS.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};ua.default=td});var xr=O(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.ParsingContext=si.Chrono=void 0;var ri=rt(),JS=rd(),ni=class{constructor(e){e=e||JS.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new ni({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new Ko(e,t,n),a=[];return this.parsers.forEach(o=>{let l=ni.executeParser(s,o);a=a.concat(l)}),a.sort((o,l)=>o.index-l.index),this.refiners.forEach(function(o){a=o.refine(s,a)}),a}static executeParser(e,t){let n=[],s=t.pattern(e),a=e.text,o=e.text,l=s.exec(o);for(;l;){let c=l.index+a.length-o.length;l.index=c;let h=t.extract(e,l);if(!h){o=a.substring(l.index+1),l=s.exec(o);continue}let m=null;h instanceof ri.ParsingResult?m=h:h instanceof ri.ParsingComponents?(m=e.createParsingResult(l.index,l[0]),m.start=h):m=e.createParsingResult(l.index,l[0],h),e.debug(()=>console.log(`${t.constructor.name} extracted result ${m}`)),n.push(m),o=a.substring(c+m.text.length),l=s.exec(o)}return n}};si.Chrono=ni;var Ko=class{constructor(e,t,n){this.text=e,this.reference=new ri.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ri.ParsingComponents?e:new ri.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let a=typeof t=="string"?t:this.text.substring(e,t),o=n?this.createParsingComponents(n):null,l=s?this.createParsingComponents(s):null;return new ri.ParsingResult(this.reference,e,a,o,l)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};si.ParsingContext=Ko});var _s=O(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var Rg=At(),eO=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Zo=1,xg=5,Pg=2,Ag=3,nd=4,sd=class{constructor(e){this.groupNumberMonth=e?Ag:Pg,this.groupNumberDay=e?Pg:Ag}pattern(){return eO}extract(e,t){if(t[Zo]=="/"||t[xg]=="/"){t.index+=t[0].length;return}let n=t.index+t[Zo].length,s=t[0].substr(t[Zo].length,t[0].length-t[Zo].length-t[xg].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[nd]&&t[0].indexOf("/")<0)return;let a=e.createParsingResult(n,s),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(a.start.assign("day",l),a.start.assign("month",o),t[nd]){let c=parseInt(t[nd]),h=Rg.findMostLikelyADYear(c);a.start.assign("year",h)}else{let c=Rg.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};id.default=sd});var Cg=O(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Ng=Nt(),tO=rt(),rO=Z(),nO=Tr(),sO=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Ng.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ad=class extends rO.AbstractParserWithWordBoundaryChecking{innerPattern(){return sO}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ng.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=nO.reverseTimeUnits(s);break}return tO.ParsingComponents.createRelativeFromReference(e.reference,s)}};od.default=ad});var Fg=O(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var iO=Qs(),ud=rt(),aO=Nt(),oO=Tr();function Ig(r){return r.text.match(/\s+(before|from)$/i)!=null}function uO(r){return r.text.match(/\s+(after|since)$/i)!=null}var ld=class extends iO.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Ig(t)&&!uO(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=aO.parseTimeUnits(t.text);Ig(t)&&(s=oO.reverseTimeUnits(s));let a=ud.ParsingComponents.createRelativeFromReference(new ud.ReferenceWithTimezone(n.start.date()),s);return new ud.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};cd.default=ld});var rd=O(lt=>{"use strict";var vt=lt&<.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(lt,"__esModule",{value:!0});lt.createConfiguration=lt.createCasualConfiguration=lt.parseDate=lt.parse=lt.GB=lt.strict=lt.casual=void 0;var lO=vt(Iy()),cO=vt(qy()),dO=vt(Hy()),fO=vt(Ky()),hO=vt(Qy()),pO=vt(Jy()),mO=vt(tg()),yO=vt(rg()),gO=vt(ng()),_O=vt(sg()),TO=vt(og()),bO=ln(),vO=vt(bg()),wO=vt(vg()),EO=vt(Dg()),kO=vt(Mg()),dd=xr(),DO=vt(_s()),SO=vt(Cg()),OO=vt(Fg());lt.casual=new dd.Chrono(Lg(!1));lt.strict=new dd.Chrono(Xo(!0,!1));lt.GB=new dd.Chrono(Xo(!1,!0));function MO(r,e,t){return lt.casual.parse(r,e,t)}lt.parse=MO;function RO(r,e,t){return lt.casual.parseDate(r,e,t)}lt.parseDate=RO;function Lg(r=!1){let e=Xo(!1,r);return e.parsers.unshift(new vO.default),e.parsers.unshift(new wO.default),e.parsers.unshift(new fO.default),e.parsers.unshift(new kO.default),e.parsers.unshift(new SO.default),e}lt.createCasualConfiguration=Lg;function Xo(r=!0,e=!1){return bO.includeCommonConfiguration({parsers:[new DO.default(e),new lO.default,new cO.default,new dO.default,new EO.default,new hO.default,new pO.default,new mO.default(r),new yO.default(r),new gO.default(r)],refiners:[new OO.default,new TO.default,new _O.default]},r)}lt.createConfiguration=Xo});var Yg=O(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var xO=ms(),fd=class extends xO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};hd.default=fd});var la=O(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parseTimeUnits=Ue.TIME_UNITS_PATTERN=Ue.parseYear=Ue.YEAR_PATTERN=Ue.parseNumberPattern=Ue.NUMBER_PATTERN=Ue.TIME_UNIT_DICTIONARY=Ue.INTEGER_WORD_DICTIONARY=Ue.MONTH_DICTIONARY=Ue.WEEKDAY_DICTIONARY=void 0;var pd=Fe(),PO=At();Ue.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Ue.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Ue.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Ue.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Ue.NUMBER_PATTERN=`(?:${pd.matchAnyPattern(Ue.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Wg(r){let e=r.toLowerCase();return Ue.INTEGER_WORD_DICTIONARY[e]!==void 0?Ue.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Ue.parseNumberPattern=Wg;Ue.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function AO(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return PO.findMostLikelyADYear(e)}Ue.parseYear=AO;var qg=`(${Ue.NUMBER_PATTERN})\\s{0,5}(${pd.matchAnyPattern(Ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ug=new RegExp(qg,"i");Ue.TIME_UNITS_PATTERN=pd.repeatedTimeunitPattern("",qg);function NO(r){let e={},t=r,n=Ug.exec(t);for(;n;)CO(e,n),t=t.substring(n[0].length),n=Ug.exec(t);return e}Ue.parseTimeUnits=NO;function CO(r,e){let t=Wg(e[1]),n=Ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var $g=O(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var jg=la(),IO=Fe(),FO=Z(),LO=gs(),YO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${IO.matchAnyPattern(jg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),UO=1,WO=3,qO=2,md=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return YO}innerExtract(e,t){let n=t[qO].toLowerCase(),s=jg.WEEKDAY_DICTIONARY[n],a=t[UO],o=t[WO],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l.match(/letzte/)?c="last":l.match(/chste/)?c="next":l.match(/diese/)&&(c="this");let h=LO.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};yd.default=md});var zg=O(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var Wn=mt(),jO=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),$O=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),BO=2,Bg=3,Gg=4,Hg=5,ii=class{pattern(e){return jO}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ii.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=$O.exec(s);return a&&(n.end=ii.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[BO]),t[Bg]!=null&&(s=parseInt(t[Bg])),s>=60||n>24)return null;if(n>=12&&(a=Wn.Meridiem.PM),t[Hg]!=null){if(n>12)return null;let o=t[Hg].toLowerCase();o.match(/morgen|vormittag/)&&(a=Wn.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=Wn.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=Wn.Meridiem.AM,n=0):n<6?a=Wn.Meridiem.AM:(a=Wn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",Wn.Meridiem.AM):e.imply("meridiem",Wn.Meridiem.PM),t[Gg]!=null){let o=parseInt(t[Gg]);if(o>=60)return null;e.assign("second",o)}return e}};gd.default=ii});var Vg=O(ca=>{"use strict";var GO=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var HO=GO($r()),_d=class extends HO.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ca.default=_d});var Kg=O(da=>{"use strict";var zO=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var VO=zO(un()),Td=class extends VO.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};da.default=Td});var bd=O(ha=>{"use strict";var KO=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var ZO=KO(xe()),Ts=mt(),XO=Z(),QO=_r(),JO=Tr(),fa=class extends XO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=ZO.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return QO.implySimilarTime(a,n),fa.extractTimeComponents(a,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=JO.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break}return e}};ha.default=fa});var Qg=O(Pr=>{"use strict";var eM=Pr&&Pr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),tM=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),rM=Pr&&Pr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&eM(e,r,t);return tM(e,r),e},Xg=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var nM=Xg(xe()),sM=Z(),bs=_r(),iM=Xg(bd()),Zg=rM(dn()),aM=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),oM=1,uM=2,vd=class extends sM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return aM}innerExtract(e,t){let n=nM.default(e.refDate),s=(t[oM]||"").toLowerCase(),a=(t[uM]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=Zg.now(e.reference);break;case"heute":o=Zg.today(e.reference);break;case"morgen":bs.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),bs.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),bs.assignSimilarDate(o,n),bs.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),bs.assignSimilarDate(o,n),bs.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),bs.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=iM.default.extractTimeComponents(o,a)),o}};Pr.default=vd});var s_=O(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var lM=At(),r_=la(),n_=la(),cM=Fe(),dM=Z(),fM=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${cM.matchAnyPattern(r_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${n_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Jg=1,e_=2,hM=3,t_=4,wd=class extends dM.AbstractParserWithWordBoundaryChecking{innerPattern(){return fM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=r_.MONTH_DICTIONARY[t[hM].toLowerCase()],a=parseInt(t[Jg]);if(a>31)return t.index=t.index+t[Jg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[t_]){let o=n_.parseYear(t[t_]);n.start.assign("year",o)}else{let o=lM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[e_]){let o=parseInt(t[e_]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Ed.default=wd});var i_=O(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var Qo=la(),pM=rt(),mM=Z(),yM=Tr(),gM=Fe(),kd=class extends mM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Qo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${gM.matchAnyPattern(Qo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Qo.parseNumberPattern(t[2]):1,s=Qo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],a={};a[s]=n;let o=t[1]||t[3]||"";if(o=o.toLowerCase(),!!o)return(/vor/.test(o)||/letzte/.test(o)||/vergangen/.test(o))&&(a=yM.reverseTimeUnits(a)),pM.ParsingComponents.createRelativeFromReference(e.reference,a)}};Dd.default=kd});var u_=O(wt=>{"use strict";var Ar=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var _M=ln(),a_=xr(),TM=Ar(_s()),bM=Ar(zc()),vM=Ar(Yg()),wM=Ar($g()),EM=Ar(zg()),kM=Ar(Vg()),DM=Ar(Kg()),SM=Ar(Qg()),OM=Ar(bd()),MM=Ar(s_()),RM=Ar(i_());wt.casual=new a_.Chrono(o_());wt.strict=new a_.Chrono(Sd(!0));function xM(r,e,t){return wt.casual.parse(r,e,t)}wt.parse=xM;function PM(r,e,t){return wt.casual.parseDate(r,e,t)}wt.parseDate=PM;function o_(r=!0){let e=Sd(!1,r);return e.parsers.unshift(new OM.default),e.parsers.unshift(new SM.default),e.parsers.unshift(new RM.default),e}wt.createCasualConfiguration=o_;function Sd(r=!0,e=!0){return _M.includeCommonConfiguration({parsers:[new bM.default,new TM.default(e),new vM.default,new EM.default,new MM.default,new wM.default],refiners:[new kM.default,new DM.default]},r)}wt.createConfiguration=Sd});var c_=O(Nr=>{"use strict";var AM=Nr&&Nr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),NM=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CM=Nr&&Nr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&AM(e,r,t);return NM(e,r),e},IM=Nr&&Nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nr,"__esModule",{value:!0});var FM=IM(xe()),LM=mt(),YM=Z(),l_=_r(),Jo=CM(dn()),Od=class extends YM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=FM.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return Jo.now(e.reference);case"aujourd'hui":return Jo.today(e.reference);case"hier":return Jo.yesterday(e.reference);case"demain":return Jo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(l_.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",LM.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),l_.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Nr.default=Od});var d_=O(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var pa=mt(),UM=Z(),Md=class extends UM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",pa.Meridiem.AM);break}return s}};Rd.default=Md});var f_=O(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});var WM=ms(),xd=class extends WM.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Pd.default=xd});var h_=O(ma=>{"use strict";var qM=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var jM=qM(un()),Ad=class extends jM.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ma.default=Ad});var p_=O(ya=>{"use strict";var $M=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var BM=$M($r()),Nd=class extends BM.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ya.default=Nd});var qn=O(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.parseTimeUnits=Pe.TIME_UNITS_PATTERN=Pe.parseYear=Pe.YEAR_PATTERN=Pe.parseOrdinalNumberPattern=Pe.ORDINAL_NUMBER_PATTERN=Pe.parseNumberPattern=Pe.NUMBER_PATTERN=Pe.TIME_UNIT_DICTIONARY=Pe.INTEGER_WORD_DICTIONARY=Pe.MONTH_DICTIONARY=Pe.WEEKDAY_DICTIONARY=void 0;var Cd=Fe();Pe.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Pe.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Pe.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Pe.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Pe.NUMBER_PATTERN=`(?:${Cd.matchAnyPattern(Pe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function y_(r){let e=r.toLowerCase();return Pe.INTEGER_WORD_DICTIONARY[e]!==void 0?Pe.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Pe.parseNumberPattern=y_;Pe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function GM(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Pe.parseOrdinalNumberPattern=GM;Pe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function HM(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Pe.parseYear=HM;var g_=`(${Pe.NUMBER_PATTERN})\\s{0,5}(${Cd.matchAnyPattern(Pe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,m_=new RegExp(g_,"i");Pe.TIME_UNITS_PATTERN=Cd.repeatedTimeunitPattern("",g_);function zM(r){let e={},t=r,n=m_.exec(t);for(;n;)VM(e,n),t=t.substring(n[0].length),n=m_.exec(t);return e}Pe.parseTimeUnits=zM;function VM(r,e){let t=y_(e[1]),n=Pe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var T_=O(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var __=qn(),KM=Fe(),ZM=Z(),XM=gs(),QM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${KM.matchAnyPattern(__.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),JM=1,eR=2,Id=class extends ZM.AbstractParserWithWordBoundaryChecking{innerPattern(){return QM}innerExtract(e,t){let n=t[JM].toLowerCase(),s=__.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[eR];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=XM.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Fd.default=Id});var E_=O(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var ga=mt(),tR=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),rR=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),nR=2,b_=3,v_=4,w_=5,ai=class{pattern(e){return tR}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ai.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=rR.exec(s);return a&&(n.end=ai.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[nR]),t[b_]!=null&&(s=parseInt(t[b_])),s>=60||n>24)return null;if(n>=12&&(a=ga.Meridiem.PM),t[w_]!=null){if(n>12)return null;let o=t[w_][0].toLowerCase();o=="a"&&(a=ga.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=ga.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",ga.Meridiem.AM):e.imply("meridiem",ga.Meridiem.PM),t[v_]!=null){let o=parseInt(t[v_]);if(o>=60)return null;e.assign("second",o)}return e}};Ld.default=ai});var R_=O(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var sR=At(),O_=qn(),M_=qn(),eu=qn(),iR=Fe(),aR=Z(),oR=new RegExp(`(?:on\\s*?)?(${eu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${eu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${iR.matchAnyPattern(O_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${M_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),k_=1,D_=2,uR=3,S_=4,Yd=class extends aR.AbstractParserWithWordBoundaryChecking{innerPattern(){return oR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=O_.MONTH_DICTIONARY[t[uR].toLowerCase()],a=eu.parseOrdinalNumberPattern(t[k_]);if(a>31)return t.index=t.index+t[k_].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[S_]){let o=M_.parseYear(t[S_]);n.start.assign("year",o)}else{let o=sR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[D_]){let o=eu.parseOrdinalNumberPattern(t[D_]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Ud.default=Yd});var P_=O(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var x_=qn(),lR=rt(),cR=Z(),dR=Tr(),Wd=class extends cR.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${x_.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=x_.parseTimeUnits(t[1]),s=dR.reverseTimeUnits(n);return lR.ParsingComponents.createRelativeFromReference(e.reference,s)}};qd.default=Wd});var N_=O($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});var A_=qn(),fR=rt(),hR=Z(),jd=class extends hR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${A_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=A_.parseTimeUnits(t[1]);return fR.ParsingComponents.createRelativeFromReference(e.reference,n)}};$d.default=jd});var C_=O(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var tu=qn(),pR=rt(),mR=Z(),yR=Tr(),gR=Fe(),Bd=class extends mR.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${tu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${gR.matchAnyPattern(tu.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?tu.parseNumberPattern(t[1]):1,s=tu.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],a={};a[s]=n;let o=t[2]||t[4]||"";if(o=o.toLowerCase(),!!o)return(/derni[eè]re?s?/.test(o)||/pass[ée]e?s?/.test(o)||/pr[ée]c[ée]dents?/.test(o))&&(a=yR.reverseTimeUnits(a)),pR.ParsingComponents.createRelativeFromReference(e.reference,a)}};Gd.default=Bd});var L_=O(Et=>{"use strict";var br=Et&&Et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConfiguration=Et.createCasualConfiguration=Et.parseDate=Et.parse=Et.strict=Et.casual=void 0;var _R=ln(),I_=xr(),TR=br(c_()),bR=br(d_()),vR=br(_s()),wR=br(f_()),ER=br(h_()),kR=br(p_()),DR=br(T_()),SR=br(E_()),OR=br(R_()),MR=br(P_()),RR=br(N_()),xR=br(C_());Et.casual=new I_.Chrono(F_());Et.strict=new I_.Chrono(Hd(!0));function PR(r,e,t){return Et.casual.parse(r,e,t)}Et.parse=PR;function AR(r,e,t){return Et.casual.parseDate(r,e,t)}Et.parseDate=AR;function F_(r=!0){let e=Hd(!1,r);return e.parsers.unshift(new TR.default),e.parsers.unshift(new bR.default),e.parsers.unshift(new xR.default),e}Et.createCasualConfiguration=F_;function Hd(r=!0,e=!0){return _R.includeCommonConfiguration({parsers:[new vR.default(e),new OR.default,new wR.default,new SR.default,new MR.default,new RR.default,new DR.default],refiners:[new ER.default,new kR.default]},r)}Et.createConfiguration=Hd});var Y_=O(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.toHankaku=void 0;function NR(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,CR)}ru.toHankaku=NR;function CR(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var W_=O(_a=>{"use strict";var IR=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var zd=Y_(),FR=At(),LR=IR(xe()),YR=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,U_=1,UR=2,Vd=3,WR=4,qR=5,jR=6,Kd=class{pattern(){return YR}extract(e,t){let n=parseInt(zd.toHankaku(t[qR])),s=parseInt(zd.toHankaku(t[jR])),a=e.createParsingComponents({day:s,month:n});if(t[U_]&&t[U_].match("\u540C|\u4ECA|\u672C")){let o=LR.default(e.refDate);a.assign("year",o.year())}if(t[UR]){let o=t[WR],l=o=="\u5143"?1:parseInt(zd.toHankaku(o));t[Vd]=="\u4EE4\u548C"?l+=2018:t[Vd]=="\u5E73\u6210"?l+=1988:t[Vd]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=FR.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};_a.default=Kd});var q_=O(Ta=>{"use strict";var $R=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var BR=$R($r()),Zd=class extends BR.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ta.default=Zd});var $_=O(Cr=>{"use strict";var GR=Cr&&Cr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),HR=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zR=Cr&&Cr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&GR(e,r,t);return HR(e,r),e},VR=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var KR=VR(xe()),j_=mt(),Xd=zR(dn()),ZR=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Qd=class{pattern(){return ZR}extract(e,t){let n=t[0],s=KR.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Xd.yesterday(e.reference);case"\u660E\u65E5":return Xd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Xd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",j_.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",j_.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};Cr.default=Qd});var H_=O(kt=>{"use strict";var Jd=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var XR=Jd(W_()),QR=Jd(q_()),JR=Jd($_()),B_=xr();kt.casual=new B_.Chrono(G_());kt.strict=new B_.Chrono(ef());function ex(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=ex;function tx(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=tx;function G_(){let r=ef();return r.parsers.unshift(new JR.default),r}kt.createCasualConfiguration=G_;function ef(){return{parsers:[new XR.default],refiners:[new QR.default]}}kt.createConfiguration=ef});var nu=O(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.parseYear=Gr.YEAR_PATTERN=Gr.MONTH_DICTIONARY=Gr.WEEKDAY_DICTIONARY=void 0;Gr.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};Gr.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};Gr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function rx(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Gr.parseYear=rx});var V_=O(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var z_=nu(),nx=Fe(),sx=Z(),ix=gs(),ax=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${nx.matchAnyPattern(z_.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),ox=1,ux=2,lx=3,tf=class extends sx.AbstractParserWithWordBoundaryChecking{innerPattern(){return ax}innerExtract(e,t){let n=t[ux].toLowerCase(),s=z_.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[ox],o=t[lx],l=a||o||"";l=l.toLowerCase();let c=null;l=="passado"?c="this":l=="pr\xF3ximo"||l=="proximo"?c="next":l=="este"&&(c="this");let h=ix.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};rf.default=tf});var K_=O(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var cx=ms(),nf=class extends cx.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};sf.default=nf});var Z_=O(ba=>{"use strict";var dx=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var fx=dx(un()),af=class extends fx.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ba.default=af});var X_=O(va=>{"use strict";var hx=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var px=hx($r()),of=class extends px.default{patternBetween(){return/^\s*(?:-)\s*$/i}};va.default=of});var nT=O(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var mx=At(),tT=nu(),rT=nu(),yx=Fe(),gx=Z(),_x=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${yx.matchAnyPattern(tT.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${rT.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Q_=1,J_=2,Tx=3,eT=4,uf=class extends gx.AbstractParserWithWordBoundaryChecking{innerPattern(){return _x}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=tT.MONTH_DICTIONARY[t[Tx].toLowerCase()],a=parseInt(t[Q_]);if(a>31)return t.index=t.index+t[Q_].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[eT]){let o=rT.parseYear(t[eT]);n.start.assign("year",o)}else{let o=mx.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[J_]){let o=parseInt(t[J_]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};lf.default=uf});var sT=O(fn=>{"use strict";var bx=fn&&fn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),vx=fn&&fn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wx=fn&&fn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&bx(e,r,t);return vx(e,r),e};Object.defineProperty(fn,"__esModule",{value:!0});var Ex=Z(),su=wx(dn()),cf=class extends Ex.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return su.now(e.reference);case"hoje":return su.today(e.reference);case"amanha":case"amanh\xE3":return su.tomorrow(e.reference);case"ontem":return su.yesterday(e.reference)}return s}};fn.default=cf});var iT=O(wa=>{"use strict";var kx=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var iu=mt(),Dx=Z(),Sx=_r(),Ox=kx(xe()),df=class extends Dx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=Ox.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",iu.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",iu.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",iu.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":Sx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",iu.Meridiem.AM),s.imply("hour",12);break}return s}};wa.default=df});var uT=O(Dt=>{"use strict";var jn=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.createConfiguration=Dt.createCasualConfiguration=Dt.parseDate=Dt.parse=Dt.strict=Dt.casual=void 0;var Mx=ln(),aT=xr(),Rx=jn(_s()),xx=jn(V_()),Px=jn(K_()),Ax=jn(Z_()),Nx=jn(X_()),Cx=jn(nT()),Ix=jn(sT()),Fx=jn(iT());Dt.casual=new aT.Chrono(oT());Dt.strict=new aT.Chrono(ff(!0));function Lx(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=Lx;function Yx(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=Yx;function oT(r=!0){let e=ff(!1,r);return e.parsers.push(new Ix.default),e.parsers.push(new Fx.default),e}Dt.createCasualConfiguration=oT;function ff(r=!0,e=!0){return Mx.includeCommonConfiguration({parsers:[new Rx.default(e),new xx.default,new Px.default,new Cx.default],refiners:[new Ax.default,new Nx.default]},r)}Dt.createConfiguration=ff});var lT=O(Ea=>{"use strict";var Ux=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var Wx=Ux($r()),hf=class extends Wx.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ea.default=hf});var cT=O(ka=>{"use strict";var qx=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var jx=qx(un()),pf=class extends jx.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ka.default=pf});var dT=O(hn=>{"use strict";var $x=hn&&hn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Bx=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Gx=hn&&hn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$x(e,r,t);return Bx(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var Hx=Z(),au=Gx(dn()),mf=class extends Hx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return au.now(e.reference);case"vandaag":return au.today(e.reference);case"morgen":case"morgend":return au.tomorrow(e.reference);case"gisteren":return au.yesterday(e.reference)}return s}};hn.default=mf});var fT=O(Da=>{"use strict";var zx=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var ou=mt(),Vx=Z(),Kx=zx(xe()),Zx=_r(),Xx=1,Qx=2,yf=class extends Vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Kx.default(e.refDate),s=e.createParsingComponents();switch(t[Xx]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[Qx].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",ou.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",ou.Meridiem.PM),s.imply("hour",20);break;case"middernacht":Zx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",ou.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",ou.Meridiem.AM),s.imply("hour",12);break}return s}};Da.default=yf});var ir=O(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.parseTimeUnits=we.TIME_UNITS_PATTERN=we.parseYear=we.YEAR_PATTERN=we.parseOrdinalNumberPattern=we.ORDINAL_NUMBER_PATTERN=we.parseNumberPattern=we.NUMBER_PATTERN=we.TIME_UNIT_DICTIONARY=we.ORDINAL_WORD_DICTIONARY=we.INTEGER_WORD_DICTIONARY=we.MONTH_DICTIONARY=we.WEEKDAY_DICTIONARY=void 0;var uu=Fe(),Jx=At();we.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};we.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};we.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};we.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};we.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};we.NUMBER_PATTERN=`(?:${uu.matchAnyPattern(we.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function pT(r){let e=r.toLowerCase();return we.INTEGER_WORD_DICTIONARY[e]!==void 0?we.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}we.parseNumberPattern=pT;we.ORDINAL_NUMBER_PATTERN=`(?:${uu.matchAnyPattern(we.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function eP(r){let e=r.toLowerCase();return we.ORDINAL_WORD_DICTIONARY[e]!==void 0?we.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}we.parseOrdinalNumberPattern=eP;we.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function tP(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return Jx.findMostLikelyADYear(e)}we.parseYear=tP;var mT=`(${we.NUMBER_PATTERN})\\s{0,5}(${uu.matchAnyPattern(we.TIME_UNIT_DICTIONARY)})\\s{0,5}`,hT=new RegExp(mT,"i");we.TIME_UNITS_PATTERN=uu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",mT);function rP(r){let e={},t=r,n=hT.exec(t);for(;n;)nP(e,n),t=t.substring(n[0].length),n=hT.exec(t);return e}we.parseTimeUnits=rP;function nP(r,e){let t=pT(e[1]),n=we.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var gT=O(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var yT=ir(),sP=rt(),iP=Z(),gf=class extends iP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+yT.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=yT.parseTimeUnits(t[1]);return sP.ParsingComponents.createRelativeFromReference(e.reference,n)}};_f.default=gf});var TT=O(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var _T=ir(),aP=Fe(),oP=Z(),uP=gs(),lP=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${aP.matchAnyPattern(_T.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),cP=1,dP=2,fP=3,Tf=class extends oP.AbstractParserWithWordBoundaryChecking{innerPattern(){return lP}innerExtract(e,t){let n=t[dP].toLowerCase(),s=_T.WEEKDAY_DICTIONARY[n],a=t[cP],o=t[fP],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let h=uP.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};bf.default=Tf});var DT=O(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var hP=At(),ET=ir(),lu=ir(),kT=ir(),pP=Fe(),mP=Z(),yP=new RegExp(`(?:on\\s*?)?(${lu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${lu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+pP.matchAnyPattern(ET.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${kT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gP=3,bT=1,vT=2,wT=4,vf=class extends mP.AbstractParserWithWordBoundaryChecking{innerPattern(){return yP}innerExtract(e,t){let n=ET.MONTH_DICTIONARY[t[gP].toLowerCase()],s=lu.parseOrdinalNumberPattern(t[bT]);if(s>31)return t.index=t.index+t[bT].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[wT]){let c=kT.parseYear(t[wT]);a.assign("year",c)}else{let c=hP.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[vT])return a;let o=lu.parseOrdinalNumberPattern(t[vT]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};wf.default=vf});var RT=O(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var OT=ir(),_P=At(),TP=Fe(),MT=ir(),bP=Z(),vP=new RegExp(`(${TP.matchAnyPattern(OT.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${MT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),wP=1,ST=2,Ef=class extends bP.AbstractParserWithWordBoundaryChecking{innerPattern(){return vP}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[wP],a=OT.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[ST]){let o=MT.parseYear(t[ST]);n.assign("year",o)}else{let o=_P.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};kf.default=Ef});var xT=O(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var EP=Z(),kP=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),DP=1,SP=2,Df=class extends EP.AbstractParserWithWordBoundaryChecking{innerPattern(){return kP}innerExtract(e,t){let n=parseInt(t[SP]),s=parseInt(t[DP]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Sf.default=Df});var PT=O(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var OP=ms(),Of=class extends OP.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Mf.default=Of});var CT=O(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var NT=ir(),MP=Fe(),RP=Z(),xP=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${MP.matchAnyPattern(NT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),PP=1,AP=2,AT=3,NP=4,Rf=class extends RP.AbstractParserWithWordBoundaryChecking{innerPattern(){return xP}innerExtract(e,t){let n=t[AT]?parseInt(t[AT]):NT.MONTH_DICTIONARY[t[AP].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[PP]);return{day:parseInt(t[NP]),month:n,year:s}}};xf.default=Rf});var IT=O(Sa=>{"use strict";var CP=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var IP=Z(),cu=mt(),Pf=_r(),FP=CP(xe()),LP=1,YP=2,Af=class extends IP.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[LP].toLowerCase(),s=t[YP].toLowerCase(),a=e.createParsingComponents(),o=FP.default(e.refDate);switch(n){case"gisteren":Pf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":Pf.assignSimilarDate(a,o);break;case"morgen":Pf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",cu.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",cu.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",cu.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",cu.Meridiem.PM),a.imply("hour",20);break}return a}};Sa.default=Af});var LT=O(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var FT=ir(),UP=rt(),WP=Z(),qP=Tr(),jP=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${FT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Nf=class extends WP.AbstractParserWithWordBoundaryChecking{innerPattern(){return jP}innerExtract(e,t){let n=t[1].toLowerCase(),s=FT.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=qP.reverseTimeUnits(s);break}return UP.ParsingComponents.createRelativeFromReference(e.reference,s)}};Cf.default=Nf});var WT=O(Oa=>{"use strict";var $P=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var UT=ir(),YT=rt(),BP=$P(xe()),GP=Z(),HP=Fe(),zP=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${HP.matchAnyPattern(UT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),VP=1,KP=2,If=class extends GP.AbstractParserWithWordBoundaryChecking{innerPattern(){return zP}innerExtract(e,t){let n=t[VP].toLowerCase(),s=t[KP].toLowerCase(),a=UT.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,YT.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,YT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=BP.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/maand/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/jaar/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Oa.default=If});var qT=O(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var Lf=ir(),ZP=rt(),XP=Z(),QP=Tr(),JP=new RegExp("("+Lf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),eA=new RegExp("("+Lf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Ff=class extends XP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?eA:JP}innerExtract(e,t){let n=Lf.parseTimeUnits(t[1]),s=QP.reverseTimeUnits(n);return ZP.ParsingComponents.createRelativeFromReference(e.reference,s)}};Yf.default=Ff});var jT=O(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var Wf=ir(),tA=rt(),rA=Z(),nA=new RegExp("("+Wf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),sA=new RegExp("("+Wf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),iA=1,Uf=class extends rA.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?sA:nA}innerExtract(e,t){let n=Wf.parseTimeUnits(t[iA]);return tA.ParsingComponents.createRelativeFromReference(e.reference,n)}};qf.default=Uf});var HT=O(St=>{"use strict";var Ct=St&&St.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(St,"__esModule",{value:!0});St.createConfiguration=St.createCasualConfiguration=St.parseDate=St.parse=St.strict=St.casual=void 0;var aA=ln(),$T=xr(),oA=Ct(lT()),uA=Ct(cT()),lA=Ct(dT()),cA=Ct(fT()),dA=Ct(_s()),fA=Ct(gT()),hA=Ct(TT()),pA=Ct(DT()),BT=Ct(RT()),mA=Ct(xT()),yA=Ct(PT()),gA=Ct(CT()),_A=Ct(IT()),TA=Ct(LT()),bA=Ct(WT()),vA=Ct(qT()),wA=Ct(jT());St.casual=new $T.Chrono(GT());St.strict=new $T.Chrono(jf(!0));function EA(r,e,t){return St.casual.parse(r,e,t)}St.parse=EA;function kA(r,e,t){return St.casual.parseDate(r,e,t)}St.parseDate=kA;function GT(r=!0){let e=jf(!1,r);return e.parsers.unshift(new lA.default),e.parsers.unshift(new cA.default),e.parsers.unshift(new _A.default),e.parsers.unshift(new BT.default),e.parsers.unshift(new bA.default),e.parsers.unshift(new TA.default),e}St.createCasualConfiguration=GT;function jf(r=!0,e=!0){return aA.includeCommonConfiguration({parsers:[new dA.default(e),new fA.default,new pA.default,new BT.default,new hA.default,new gA.default,new mA.default,new yA.default(r),new vA.default(r),new wA.default(r)],refiners:[new uA.default,new oA.default]},r)}St.createConfiguration=jf});var ZT=O(Ma=>{"use strict";var DA=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var SA=DA(xe()),OA=Z(),MA=1,zT=2,RA=3,VT=4,KT=5,xA=6,$f=class extends OA.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),a=SA.default(e.refDate),o=a;if(t[MA])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[zT]){let l=t[zT],c=t[RA];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day")),c=="\u65E9"||c=="\u671D"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[VT]){let c=t[VT][0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[KT]){let l=t[KT];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day"));let c=t[xA];if(c){let h=c[0];h=="\u65E9"||h=="\u671D"||h=="\u4E0A"?s.start.imply("hour",6):h=="\u4E0B"||h=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):h=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):h=="\u591C"||h=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):h=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};Ma.default=$f});var oi=O(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.zhStringToYear=Xt.zhStringToNumber=Xt.WEEKDAY_OFFSET=Xt.NUMBER=void 0;Xt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Xt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function PA(r){let e=0;for(let t=0;t{"use strict";var NA=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var CA=NA(xe()),IA=Z(),vs=oi(),Bf=1,XT=2,Gf=3,Hf=class extends IA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(vs.NUMBER).join("")+"]{4}|["+Object.keys(vs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(vs.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(vs.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=CA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[XT]);if(isNaN(a)&&(a=vs.zhStringToNumber(t[XT])),s.start.assign("month",a),t[Gf]){let o=parseInt(t[Gf]);isNaN(o)&&(o=vs.zhStringToNumber(t[Gf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Bf]){let o=parseInt(t[Bf]);isNaN(o)&&(o=vs.zhStringToYear(t[Bf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};Ra.default=Hf});var eb=O(xa=>{"use strict";var FA=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var LA=FA(xe()),YA=Z(),JT=oi(),UA=new RegExp("(\\d+|["+Object.keys(JT.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),zf=1,WA=2,Vf=class extends YA.AbstractParserWithWordBoundaryChecking{innerPattern(){return UA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[zf]);if(isNaN(s)&&(s=JT.zhStringToNumber(t[zf])),isNaN(s)){let c=t[zf];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=LA.default(e.refDate),l=t[WA][0];return l.match(/[日天星禮月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u79AE"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u9418")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};xa.default=Vf});var rb=O(Pa=>{"use strict";var qA=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var jA=qA(xe()),$A=Z(),tb=oi(),BA=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(tb.WEEKDAY_OFFSET).join("|")+")"),Kf=class extends $A.AbstractParserWithWordBoundaryChecking{innerPattern(){return BA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=tb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":(l=="\u4ECA"||l=="\u9019"||l=="\u5462")&&(o="this");let c=jA.default(e.refDate),h=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),h=!0):o=="next"?(c=c.day(a+7),h=!0):o=="this"?c=c.day(a):Math.abs(a-7-m){"use strict";var GA=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var HA=GA(xe()),zA=Z(),wr=oi(),VA=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),KA=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),du=1,fu=2,hu=3,pu=4,mu=5,yu=6,vr=7,ui=8,gu=9,Zf=class extends zA.AbstractParserWithWordBoundaryChecking{innerPattern(){return VA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=HA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[du]){var o=t[du];o=="\u660E"||o=="\u807D"?n.hour()>1&&a.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a.add(-1,"day"):o=="\u524D"?a.add(-2,"day"):o=="\u5927\u524D"?a.add(-3,"day"):o=="\u5F8C"?a.add(2,"day"):o=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[pu]){var l=t[pu];l=="\u660E"||l=="\u807D"?a.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?a.add(-1,"day"):l=="\u524D"?a.add(-2,"day"):l=="\u5927\u524D"?a.add(-3,"day"):l=="\u5F8C"?a.add(2,"day"):l=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let c=0,h=0,m=-1;if(t[ui]){var _=parseInt(t[ui]);if(isNaN(_)&&(_=wr.zhStringToNumber(t[ui])),_>=60)return null;s.start.assign("second",_)}if(c=parseInt(t[yu]),isNaN(c)&&(c=wr.zhStringToNumber(t[yu])),t[vr]?t[vr]=="\u534A"?h=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?h=0:(h=parseInt(t[vr]),isNaN(h)&&(h=wr.zhStringToNumber(t[vr]))):c>100&&(h=c%100,c=Math.floor(c/100)),h>=60||c>24)return null;if(c>=12&&(m=1),t[gu]){if(c>12)return null;var T=t[gu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12))}else if(t[fu]){var D=t[fu],v=D[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[hu]){var R=t[hu],I=R[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(m=0,c==12&&(c=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[mu]){var q=t[mu],$=q[0];$=="\u4E0A"||$=="\u671D"||$=="\u65E9"||$=="\u51CC"?(m=0,c==12&&(c=0)):($=="\u4E0B"||$=="\u664F"||$=="\u665A")&&(m=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",h),m>=0?s.start.assign("meridiem",m):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=KA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let B=a.clone();if(s.end=e.createParsingComponents(),t[du]){var o=t[du];o=="\u660E"||o=="\u807D"?n.hour()>1&&B.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?B.add(-1,"day"):o=="\u524D"?B.add(-2,"day"):o=="\u5927\u524D"?B.add(-3,"day"):o=="\u5F8C"?B.add(2,"day"):o=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else if(t[pu]){var l=t[pu];l=="\u660E"||l=="\u807D"?B.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?B.add(-1,"day"):l=="\u524D"?B.add(-2,"day"):l=="\u5927\u524D"?B.add(-3,"day"):l=="\u5F8C"?B.add(2,"day"):l=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else s.end.imply("day",B.date()),s.end.imply("month",B.month()+1),s.end.imply("year",B.year());if(c=0,h=0,m=-1,t[ui]){var _=parseInt(t[ui]);if(isNaN(_)&&(_=wr.zhStringToNumber(t[ui])),_>=60)return null;s.end.assign("second",_)}if(c=parseInt(t[yu]),isNaN(c)&&(c=wr.zhStringToNumber(t[yu])),t[vr]?t[vr]=="\u534A"?h=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?h=0:(h=parseInt(t[vr]),isNaN(h)&&(h=wr.zhStringToNumber(t[vr]))):c>100&&(h=c%100,c=Math.floor(c/100)),h>=60||c>24)return null;if(c>=12&&(m=1),t[gu]){if(c>12)return null;var T=t[gu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(m==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[fu]){var D=t[fu],v=D[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[hu]){var R=t[hu],I=R[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(m=0,c==12&&(c=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[mu]){var q=t[mu],$=q[0];$=="\u4E0A"||$=="\u671D"||$=="\u65E9"||$=="\u51CC"?(m=0,c==12&&(c=0)):($=="\u4E0B"||$=="\u664F"||$=="\u665A")&&(m=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",h),m>=0?s.end.assign("meridiem",m):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>c?s.end.imply("meridiem",0):c>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var ZA=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var XA=ZA(xe()),QA=Z(),sb=oi(),JA=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(sb.WEEKDAY_OFFSET).join("|")+")"),Xf=class extends QA.AbstractParserWithWordBoundaryChecking{innerPattern(){return JA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=sb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=XA.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c){"use strict";var eN=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var tN=eN($r()),Qf=class extends tN.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ca.default=Qf});var ob=O(Ia=>{"use strict";var rN=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var nN=rN(un()),Jf=class extends nN.default{patternBetween(){return/^\s*$/i}};Ia.default=Jf});var ub=O(ct=>{"use strict";var pn=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ct,"__esModule",{value:!0});ct.createConfiguration=ct.createCasualConfiguration=ct.parseDate=ct.parse=ct.strict=ct.casual=ct.hant=void 0;var eh=xr(),sN=pn(zo()),iN=ln(),aN=pn(ZT()),oN=pn(QT()),uN=pn(eb()),lN=pn(rb()),cN=pn(nb()),dN=pn(ib()),fN=pn(ab()),hN=pn(ob());ct.hant=new eh.Chrono(th());ct.casual=new eh.Chrono(th());ct.strict=new eh.Chrono(rh());function pN(r,e,t){return ct.casual.parse(r,e,t)}ct.parse=pN;function mN(r,e,t){return ct.casual.parseDate(r,e,t)}ct.parseDate=mN;function th(){let r=rh();return r.parsers.unshift(new aN.default),r}ct.createCasualConfiguration=th;function rh(){let r=iN.includeCommonConfiguration({parsers:[new oN.default,new lN.default,new dN.default,new cN.default,new uN.default],refiners:[new fN.default,new hN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof sN.default)),r}ct.createConfiguration=rh});var fb=O(Fa=>{"use strict";var yN=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var gN=yN(xe()),_N=Z(),TN=1,lb=2,bN=3,cb=4,db=5,vN=6,nh=class extends _N.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),a=gN.default(e.refDate),o=a;if(t[TN])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[lb]){let l=t[lb],c=t[bN];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day")),c=="\u65E9"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[cb]){let c=t[cb][0];c=="\u65E9"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[db]){let l=t[db];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day"));let c=t[vN];if(c){let h=c[0];h=="\u65E9"||h=="\u4E0A"?s.start.imply("hour",6):h=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):h=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):h=="\u591C"||h=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):h=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};Fa.default=nh});var li=O(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.zhStringToYear=Qt.zhStringToNumber=Qt.WEEKDAY_OFFSET=Qt.NUMBER=void 0;Qt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Qt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function wN(r){let e=0;for(let t=0;t{"use strict";var kN=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var DN=kN(xe()),SN=Z(),ws=li(),sh=1,hb=2,ih=3,ah=class extends SN.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ws.NUMBER).join("")+"]{4}|["+Object.keys(ws.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(ws.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(ws.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=DN.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[hb]);if(isNaN(a)&&(a=ws.zhStringToNumber(t[hb])),s.start.assign("month",a),t[ih]){let o=parseInt(t[ih]);isNaN(o)&&(o=ws.zhStringToNumber(t[ih])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[sh]){let o=parseInt(t[sh]);isNaN(o)&&(o=ws.zhStringToYear(t[sh])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};La.default=ah});var yb=O(Ya=>{"use strict";var ON=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var MN=ON(xe()),RN=Z(),mb=li(),xN=new RegExp("(\\d+|["+Object.keys(mb.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),oh=1,PN=2,uh=class extends RN.AbstractParserWithWordBoundaryChecking{innerPattern(){return xN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[oh]);if(isNaN(s)&&(s=mb.zhStringToNumber(t[oh])),isNaN(s)){let c=t[oh];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=MN.default(e.refDate),l=t[PN][0];return l.match(/[日天星礼月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u793C"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u949F")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};Ya.default=uh});var _b=O(Ua=>{"use strict";var AN=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var NN=AN(xe()),CN=Z(),gb=li(),IN=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(gb.WEEKDAY_OFFSET).join("|")+")"),lh=class extends CN.AbstractParserWithWordBoundaryChecking{innerPattern(){return IN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=gb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":l=="\u8FD9"&&(o="this");let c=NN.default(e.refDate),h=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),h=!0):o=="next"?(c=c.day(a+7),h=!0):o=="this"?c=c.day(a):Math.abs(a-7-m){"use strict";var FN=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var LN=FN(xe()),YN=Z(),kr=li(),UN=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),WN=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),_u=1,Tu=2,bu=3,vu=4,wu=5,Eu=6,Er=7,ci=8,ku=9,ch=class extends YN.AbstractParserWithWordBoundaryChecking{innerPattern(){return UN}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=LN.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[_u]){let m=t[_u];m=="\u660E"?n.hour()>1&&a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[vu]){let m=t[vu];m=="\u660E"?a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let o=0,l=0,c=-1;if(t[ci]){let m=parseInt(t[ci]);if(isNaN(m)&&(m=kr.zhStringToNumber(t[ci])),m>=60)return null;s.start.assign("second",m)}if(o=parseInt(t[Eu]),isNaN(o)&&(o=kr.zhStringToNumber(t[Eu])),t[Er]?t[Er]=="\u534A"?l=30:t[Er]=="\u6B63"||t[Er]=="\u6574"?l=0:(l=parseInt(t[Er]),isNaN(l)&&(l=kr.zhStringToNumber(t[Er]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[ku]){if(o>12)return null;let m=t[ku][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12))}else if(t[Tu]){let _=t[Tu][0];_=="\u65E9"?(c=0,o==12&&(o=0)):_=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[bu]){let _=t[bu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[wu]){let _=t[wu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}if(s.start.assign("hour",o),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):o<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=WN.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let h=a.clone();if(s.end=e.createParsingComponents(),t[_u]){let m=t[_u];m=="\u660E"?n.hour()>1&&h.add(1,"day"):m=="\u6628"?h.add(-1,"day"):m=="\u524D"?h.add(-2,"day"):m=="\u5927\u524D"?h.add(-3,"day"):m=="\u540E"?h.add(2,"day"):m=="\u5927\u540E"&&h.add(3,"day"),s.end.assign("day",h.date()),s.end.assign("month",h.month()+1),s.end.assign("year",h.year())}else if(t[vu]){let m=t[vu];m=="\u660E"?h.add(1,"day"):m=="\u6628"?h.add(-1,"day"):m=="\u524D"?h.add(-2,"day"):m=="\u5927\u524D"?h.add(-3,"day"):m=="\u540E"?h.add(2,"day"):m=="\u5927\u540E"&&h.add(3,"day"),s.end.assign("day",h.date()),s.end.assign("month",h.month()+1),s.end.assign("year",h.year())}else s.end.imply("day",h.date()),s.end.imply("month",h.month()+1),s.end.imply("year",h.year());if(o=0,l=0,c=-1,t[ci]){let m=parseInt(t[ci]);if(isNaN(m)&&(m=kr.zhStringToNumber(t[ci])),m>=60)return null;s.end.assign("second",m)}if(o=parseInt(t[Eu]),isNaN(o)&&(o=kr.zhStringToNumber(t[Eu])),t[Er]?t[Er]=="\u534A"?l=30:t[Er]=="\u6B63"||t[Er]=="\u6574"?l=0:(l=parseInt(t[Er]),isNaN(l)&&(l=kr.zhStringToNumber(t[Er]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[ku]){if(o>12)return null;let m=t[ku][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Tu]){let _=t[Tu][0];_=="\u65E9"?(c=0,o==12&&(o=0)):_=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[bu]){let _=t[bu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[wu]){let _=t[wu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}return s.text=s.text+t[0],s.end.assign("hour",o),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>o?s.end.imply("meridiem",0):o>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var qN=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var jN=qN(xe()),$N=Z(),bb=li(),BN=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(bb.WEEKDAY_OFFSET).join("|")+")"),dh=class extends $N.AbstractParserWithWordBoundaryChecking{innerPattern(){return BN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=bb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=jN.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c){"use strict";var GN=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var HN=GN($r()),fh=class extends HN.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};ja.default=fh});var Eb=O($a=>{"use strict";var zN=$a&&$a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($a,"__esModule",{value:!0});var VN=zN(un()),hh=class extends VN.default{patternBetween(){return/^\s*$/i}};$a.default=hh});var kb=O(dt=>{"use strict";var mn=dt&&dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dt,"__esModule",{value:!0});dt.createConfiguration=dt.createCasualConfiguration=dt.parseDate=dt.parse=dt.strict=dt.casual=dt.hans=void 0;var ph=xr(),KN=mn(zo()),ZN=ln(),XN=mn(fb()),QN=mn(pb()),JN=mn(yb()),eC=mn(_b()),tC=mn(Tb()),rC=mn(vb()),nC=mn(wb()),sC=mn(Eb());dt.hans=new ph.Chrono(mh());dt.casual=new ph.Chrono(mh());dt.strict=new ph.Chrono(yh());function iC(r,e,t){return dt.casual.parse(r,e,t)}dt.parse=iC;function aC(r,e,t){return dt.casual.parseDate(r,e,t)}dt.parseDate=aC;function mh(){let r=yh();return r.parsers.unshift(new XN.default),r}dt.createCasualConfiguration=mh;function yh(){let r=ZN.includeCommonConfiguration({parsers:[new QN.default,new eC.default,new rC.default,new tC.default,new JN.default],refiners:[new nC.default,new sC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof KN.default)),r}dt.createConfiguration=yh});var Sb=O(ar=>{"use strict";var Db=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),oC=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),uC=ar&&ar.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Db(e,r,t)},lC=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Db(e,r,t);return oC(e,r),e};Object.defineProperty(ar,"__esModule",{value:!0});ar.hans=void 0;uC(ub(),ar);ar.hans=lC(kb())});var Jt=O(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.parseTimeUnits=pe.TIME_UNITS_PATTERN=pe.parseYear=pe.YEAR_PATTERN=pe.parseOrdinalNumberPattern=pe.ORDINAL_NUMBER_PATTERN=pe.parseNumberPattern=pe.NUMBER_PATTERN=pe.TIME_UNIT_DICTIONARY=pe.ORDINAL_WORD_DICTIONARY=pe.INTEGER_WORD_DICTIONARY=pe.MONTH_DICTIONARY=pe.FULL_MONTH_NAME_DICTIONARY=pe.WEEKDAY_DICTIONARY=pe.REGEX_PARTS=void 0;var Du=Fe(),cC=At();pe.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};pe.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};pe.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};pe.MONTH_DICTIONARY=Object.assign(Object.assign({},pe.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});pe.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};pe.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};pe.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};pe.NUMBER_PATTERN=`(?:${Du.matchAnyPattern(pe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function Mb(r){let e=r.toLowerCase();return pe.INTEGER_WORD_DICTIONARY[e]!==void 0?pe.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}pe.parseNumberPattern=Mb;pe.ORDINAL_NUMBER_PATTERN=`(?:${Du.matchAnyPattern(pe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function dC(r){let e=r.toLowerCase();return pe.ORDINAL_WORD_DICTIONARY[e]!==void 0?pe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}pe.parseOrdinalNumberPattern=dC;var gh="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";pe.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${gh}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${gh}|[5-9][0-9]${gh})`;function fC(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return cC.findMostLikelyADYear(e)}pe.parseYear=fC;var Rb=`(${pe.NUMBER_PATTERN})\\s{0,3}(${Du.matchAnyPattern(pe.TIME_UNIT_DICTIONARY)})`,Ob=new RegExp(Rb,"i");pe.TIME_UNITS_PATTERN=Du.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Rb);function hC(r){let e={},t=r,n=Ob.exec(t);for(;n;)pC(e,n),t=t.substring(n[0].length).trim(),n=Ob.exec(t);return e}pe.parseTimeUnits=hC;function pC(r,e){let t=Mb(e[1]),n=pe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Pb=O(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var Ba=Jt(),mC=rt(),yC=Z(),xb=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ba.TIME_UNITS_PATTERN})${Ba.REGEX_PARTS.rightBoundary}`,gC=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${xb}`,Ba.REGEX_PARTS.flags),_C=new RegExp(xb,"i"),_h=class extends yC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ba.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?_C:gC}innerExtract(e,t){let n=Ba.parseTimeUnits(t[1]);return mC.ParsingComponents.createRelativeFromReference(e.reference,n)}};Th.default=_h});var Fb=O(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var TC=At(),Ga=Jt(),Ib=Jt(),Su=Jt(),bC=Fe(),vC=Z(),wC=new RegExp(`(?:\u0441)?\\s*(${Su.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Su.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${bC.matchAnyPattern(Ga.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Ib.YEAR_PATTERN}(?![^\\s]\\d)))?${Ga.REGEX_PARTS.rightBoundary}`,Ga.REGEX_PARTS.flags),Ab=1,Nb=2,EC=3,Cb=4,bh=class extends vC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ga.REGEX_PARTS.leftBoundary}innerPattern(){return wC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ga.MONTH_DICTIONARY[t[EC].toLowerCase()],a=Su.parseOrdinalNumberPattern(t[Ab]);if(a>31)return t.index=t.index+t[Ab].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Cb]){let o=Ib.parseYear(t[Cb]);n.start.assign("year",o)}else{let o=TC.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Nb]){let o=Su.parseOrdinalNumberPattern(t[Nb]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};vh.default=bh});var Ub=O(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var Ha=Jt(),kC=At(),DC=Fe(),Yb=Jt(),SC=Z(),OC=new RegExp(`((?:\u0432)\\s*)?(${DC.matchAnyPattern(Ha.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Yb.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ha.REGEX_PARTS.flags),MC=2,Lb=3,wh=class extends SC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ha.REGEX_PARTS.leftBoundary}innerPattern(){return OC}innerExtract(e,t){let n=t[MC].toLowerCase();if(t[0].length<=3&&!Ha.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let a=Ha.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[Lb]){let o=Yb.parseYear(t[Lb]);s.start.assign("year",o)}else{let o=kC.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};Eh.default=wh});var qb=O(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var Ou=mt(),RC=ms(),Wb=Jt(),kh=class extends RC.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return Wb.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${Wb.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ou.Meridiem.PM)):s<6&&n.assign("meridiem",Ou.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Ou.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Ou.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Dh.default=kh});var jb=O(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Mu=Jt(),xC=rt(),PC=Z(),AC=Tr(),NC=new RegExp(`(${Mu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Mu.REGEX_PARTS.flags),Sh=class extends PC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Mu.REGEX_PARTS.leftBoundary}innerPattern(){return NC}innerExtract(e,t){let n=Mu.parseTimeUnits(t[1]),s=AC.reverseTimeUnits(n);return xC.ParsingComponents.createRelativeFromReference(e.reference,s)}};Oh.default=Sh});var $b=O(za=>{"use strict";var CC=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0});var IC=CC($r()),Mh=class extends IC.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};za.default=Mh});var Bb=O(Va=>{"use strict";var FC=Va&&Va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Va,"__esModule",{value:!0});var LC=FC(un()),Rh=class extends LC.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Va.default=Rh});var Gb=O(yn=>{"use strict";var YC=yn&&yn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),UC=yn&&yn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),WC=yn&&yn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&YC(e,r,t);return UC(e,r),e};Object.defineProperty(yn,"__esModule",{value:!0});var qC=Z(),Ka=WC(dn()),xh=Jt(),jC=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${xh.REGEX_PARTS.rightBoundary}`,xh.REGEX_PARTS.flags),Ph=class extends qC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return xh.REGEX_PARTS.leftBoundary}innerPattern(e){return jC}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ka.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ka.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ka.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ka.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ka.theDayBefore(e.reference,2)}return s}};yn.default=Ph});var Hb=O(Ir=>{"use strict";var $C=Ir&&Ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),BC=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),GC=Ir&&Ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$C(e,r,t);return BC(e,r),e},HC=Ir&&Ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ir,"__esModule",{value:!0});var zC=Z(),Es=GC(dn()),VC=_r(),KC=HC(xe()),Ah=Jt(),ZC=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Ah.REGEX_PARTS.rightBoundary}`,Ah.REGEX_PARTS.flags),Nh=class extends zC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ah.REGEX_PARTS.leftBoundary}innerPattern(){return ZC}innerExtract(e,t){let n=KC.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return Es.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return Es.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return Es.morning(e.reference);if(s.match(/в\s*полдень/))return Es.noon(e.reference);if(s.match(/прошлой\s*ночью/))return Es.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return Es.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),VC.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?Es.midnight(e.reference):a}};Ir.default=Nh});var zb=O(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var Za=Jt(),XC=Fe(),QC=Z(),JC=gs(),eI=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${XC.matchAnyPattern(Za.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Za.REGEX_PARTS.rightBoundary}`,Za.REGEX_PARTS.flags),tI=1,rI=2,nI=3,Ch=class extends QC.AbstractParserWithWordBoundaryChecking{innerPattern(){return eI}patternLeftBoundary(){return Za.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[rI].toLowerCase(),s=Za.WEEKDAY_DICTIONARY[n],a=t[tI],o=t[nI],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||l=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||l=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?c="last":l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?c="next":(l=="\u044D\u0442\u043E\u0442"||l=="\u044D\u0442\u0443"||l=="\u044D\u0442\u043E\u0439")&&(c="this");let h=JC.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};Ih.default=Ch});var Kb=O(Qa=>{"use strict";var sI=Qa&&Qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qa,"__esModule",{value:!0});var Xa=Jt(),Vb=rt(),iI=sI(xe()),aI=Z(),oI=Fe(),uI=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${oI.matchAnyPattern(Xa.TIME_UNIT_DICTIONARY)})(?=\\s*)${Xa.REGEX_PARTS.rightBoundary}`,Xa.REGEX_PARTS.flags),lI=1,cI=2,Fh=class extends aI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xa.REGEX_PARTS.leftBoundary}innerPattern(){return uI}innerExtract(e,t){let n=t[lI].toLowerCase(),s=t[cI].toLowerCase(),a=Xa.TIME_UNIT_DICTIONARY[s];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let c={};return c[a]=1,Vb.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let c={};return c[a]=-1,Vb.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=iI.default(e.reference.instant);return a.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):a.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):a.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Qa.default=Fh});var Zb=O(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var Ja=Jt(),dI=rt(),fI=Z(),hI=Tr(),pI=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${Ja.TIME_UNITS_PATTERN})${Ja.REGEX_PARTS.rightBoundary}`,Ja.REGEX_PARTS.flags),Lh=class extends fI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ja.REGEX_PARTS.leftBoundary}innerPattern(){return pI}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ja.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=hI.reverseTimeUnits(s);break}return dI.ParsingComponents.createRelativeFromReference(e.reference,s)}};Yh.default=Lh});var Jb=O(Ot=>{"use strict";var or=Ot&&Ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createConfiguration=Ot.createCasualConfiguration=Ot.parseDate=Ot.parse=Ot.strict=Ot.casual=void 0;var mI=or(Pb()),yI=or(Fb()),gI=or(Ub()),_I=or(qb()),TI=or(jb()),bI=or($b()),vI=or(Bb()),wI=ln(),EI=or(Gb()),kI=or(Hb()),DI=or(zb()),SI=or(Kb()),Xb=xr(),OI=or(_s()),MI=or(Zb());Ot.casual=new Xb.Chrono(Qb());Ot.strict=new Xb.Chrono(Uh(!0));function RI(r,e,t){return Ot.casual.parse(r,e,t)}Ot.parse=RI;function xI(r,e,t){return Ot.casual.parseDate(r,e,t)}Ot.parseDate=xI;function Qb(){let r=Uh(!1);return r.parsers.unshift(new EI.default),r.parsers.unshift(new kI.default),r.parsers.unshift(new gI.default),r.parsers.unshift(new SI.default),r.parsers.unshift(new MI.default),r}Ot.createCasualConfiguration=Qb;function Uh(r=!0){return wI.includeCommonConfiguration({parsers:[new OI.default(!0),new mI.default,new yI.default,new DI.default,new _I.default(r),new TI.default],refiners:[new vI.default,new bI.default]},r)}Ot.createConfiguration=Uh});var mt=O(Te=>{"use strict";var PI=Te&&Te.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),AI=Te&&Te.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),$n=Te&&Te.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&PI(e,r,t);return AI(e,r),e};Object.defineProperty(Te,"__esModule",{value:!0});Te.parseDate=Te.parse=Te.casual=Te.strict=Te.ru=Te.zh=Te.nl=Te.pt=Te.ja=Te.fr=Te.de=Te.Meridiem=Te.Chrono=Te.en=void 0;var Wh=$n(rd());Te.en=Wh;var NI=xr();Object.defineProperty(Te,"Chrono",{enumerable:!0,get:function(){return NI.Chrono}});var CI;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(CI=Te.Meridiem||(Te.Meridiem={}));var II=$n(u_());Te.de=II;var FI=$n(L_());Te.fr=FI;var LI=$n(H_());Te.ja=LI;var YI=$n(uT());Te.pt=YI;var UI=$n(HT());Te.nl=UI;var WI=$n(Sb());Te.zh=WI;var qI=$n(Jb());Te.ru=qI;Te.strict=Wh.strict;Te.casual=Wh.casual;function jI(r,e,t){return Te.casual.parse(r,e,t)}Te.parse=jI;function $I(r,e,t){return Te.casual.parseDate(r,e,t)}Te.parseDate=$I});var zr=O(zn=>{"use strict";zn.__esModule=!0;var ZI;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(ZI=zn.Operators||(zn.Operators={}));var XI;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(XI=zn.StructuralCharacters||(zn.StructuralCharacters={}));var QI;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(QI=zn.Tokens||(zn.Tokens={}))});var Vh=O($u=>{"use strict";$u.__esModule=!0;var nt=zr();$u.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};$u.VALID_TOKENS={identifierOnly:[{name:nt.Tokens.IDENTIFIER},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:nt.Tokens.IDENTIFIER},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.OPEN_PARENTHESIS},{name:nt.Tokens.OPERATOR,value:nt.Operators.NOT}],binaryOperator:[{name:nt.Tokens.OPERATOR,value:nt.Operators.AND},{name:nt.Tokens.OPERATOR,value:nt.Operators.OR},{name:nt.Tokens.OPERATOR,value:nt.Operators.XOR}],binaryOperatorOrClose:[{name:nt.Tokens.OPERATOR,value:nt.Operators.AND},{name:nt.Tokens.OPERATOR,value:nt.Operators.OR},{name:nt.Tokens.OPERATOR,value:nt.Operators.XOR},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Kh=O(Tn=>{"use strict";Tn.__esModule=!0;var vi=zr();Tn.STRUCTURAL_CHARACTERS={"(":vi.StructuralCharacters.OPEN_PARENTHESIS,")":vi.StructuralCharacters.CLOSE_PARENTHESIS};Tn.OPERATORS={AND:vi.Operators.AND,OR:vi.Operators.OR,XOR:vi.Operators.XOR,NOT:vi.Operators.NOT};Tn.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tn.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tn.COMMENT_DELIMITER=String.fromCodePoint(35);Tn.EOL=String.fromCodePoint(10);Tn.ESCAPE_CHARACTER=String.fromCodePoint(92)});var fv=O(bn=>{"use strict";var Zh=bn&&bn.__assign||function(){return Zh=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Xh.__esModule=!0;var wi=zr(),ur=Kh(),Ei=fv();Xh.lex=function(r){for(var e=null,t=null,n=null,s=0;s{"use strict";var JI=vn&&vn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";var Di=eo&&eo.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";wn.__esModule=!0;var gv=zr();wn.andUtil=function(r,e){return r&&e};wn.orUtil=function(r,e){return r||e};wn.xorUtil=function(r,e){return r!==e};wn.notUtil=function(r){return!r};wn.isIdentifier=function(r){var e=r.name,t=r.value;return e===gv.Tokens.IDENTIFIER&&typeof t=="string"};wn.isOperator=function(r){var e=r.name,t=r.value;return e===gv.Tokens.OPERATOR&&typeof t=="string"};wn.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var _v=O(np=>{"use strict";var to;np.__esModule=!0;var tp=zr(),rp=ep();np.OPERATOR_MAP=(to={},to[tp.Operators.AND]=rp.andUtil,to[tp.Operators.OR]=rp.orUtil,to[tp.Operators.XOR]=rp.xorUtil,to)});var bv=O(xs=>{"use strict";var sp=xs&&xs.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";ro.__esModule=!0;var vv=bv();ro.getEvaluator=vv.getEvaluator;ro.evaluate=vv.evaluate;var nF=Jh();ro.parse=nF.parse});var hF={};wE(hF,{default:()=>ul});module.exports=EE(hF);var Uv=require("obsidian");var zs=require("obsidian");var mF=new Error("timeout while waiting for mutex to become available"),yF=new Error("mutex already locked"),kE=new Error("request for lock canceled"),Kp=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{h(n.next(m))}catch(_){o(_)}}function c(m){try{h(n.throw(m))}catch(_){o(_)}}function h(m){m.done?a(m.value):s(m.value).then(l,c)}h((n=n.apply(r,e||[])).next())})},Sl=class{constructor(e,t=kE){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,s)=>this._queue.push({resolve:n,reject:s}));return e||this._dispatch(),t}runExclusive(e){return Kp(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return Kp(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},DE=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{h(n.next(m))}catch(_){o(_)}}function c(m){try{h(n.throw(m))}catch(_){o(_)}}function h(m){m.done?a(m.value):s(m.value).then(l,c)}h((n=n.apply(r,e||[])).next())})},vo=class{constructor(e){this._semaphore=new Sl(1,e)}acquire(){return DE(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Yi=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},qs=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];e?this.options=e:this.options=new Yi,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(s,a,o)=>a?s.filter(l=>l!=o):s,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideCreatedDate,"createdDate"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),n}};var wo=["MO","TU","WE","TH","FR","SA","SU"],ut=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(wo.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=wo[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Ge=function(r){return r!=null},rr=function(r){return typeof r=="number"},Ol=function(r){return typeof r=="string"&&wo.includes(r)},xt=Array.isArray,mr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=Ee(t,e/t.length)),t.slice(0,e)+String(n))}var Xp=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Lt=function(r,e){var t=r%e;return t*e<0?t+e:t},Eo=function(r,e){return{div:Math.floor(r/e),mod:Lt(r,e)}},nr=function(r){return!Ge(r)||r.length===0},at=function(r){return!nr(r)},De=function(r,e){return at(r)&&r.indexOf(e)!==-1};var An;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),s=t.getTime()-r.tzOffset(t),a=n-s;return Math.round(a/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),nn=SE;var bm=ns(Tm(),1),{__extends:$s,__assign:Bt,__rest:SF,__decorate:OF,__param:MF,__metadata:RF,__awaiter:xF,__generator:PF,__exportStar:AF,__createBinding:NF,__values:CF,__read:IF,__spread:FF,__spreadArrays:LF,__spreadArray:U,__await:YF,__asyncGenerator:UF,__asyncDelegator:WF,__asyncValues:qF,__makeTemplateObject:jF,__importStar:$F,__importDefault:BF,__classPrivateFieldGet:GF,__classPrivateFieldSet:HF,__classPrivateFieldIn:zF}=bm.default;var OE=function(r){$s(e,r);function e(t,n,s){var a=r.call(this,t,n)||this;return a.iterator=s,a}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(nn),Rl=OE;var ME={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},is=ME;var vm=function(r,e){return r.indexOf(e)!==-1},RE=function(r){return r.toString()},xE=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},PE=function(){function r(e,t,n,s){if(t===void 0&&(t=RE),n===void 0&&(n=is),s===void 0&&(s=xE),this.text=[],this.language=n||is,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(m,_){return m-_}),o.sort(function(m,_){return _-m}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(Ge(this.origOptions.byweekday)){var l=xt(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(m){return!m.n}),someWeeks:l.filter(function(m){return Boolean(m.n)}),isWeekdays:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")===-1&&c.indexOf("SU")===-1,isEveryDay:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")!==-1&&c.indexOf("SU")!==-1};var h=function(m,_){return m.weekday-_.weekday};this.byweekday.allWeeks.sort(h),this.byweekday.someWeeks.sort(h),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(vm(["dtstart","wkst","freq"],n))return!0;if(!vm(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[X.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+n("st");break;case 2:case 22:t=s+n("nd");break;case 3:case 23:t=s+n("rd");break;default:t=s+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=rr(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,s){var a=this;s===void 0&&(s=","),xt(e)||(e=[e]);var o=function(c,h,m){for(var _="",T=0;Te[0].length)&&(e=a,t=s)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Ui(r,e){e===void 0&&(e=is);var t={},n=new AE(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var T=n.acceptNumber();if(T&&(t.interval=parseInt(T[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=X.DAILY,n.nextSymbol()&&(o(),_());break;case"weekday(s)":t.freq=X.WEEKLY,t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR],n.nextSymbol(),_();break;case"week(s)":t.freq=X.WEEKLY,n.nextSymbol()&&(a(),_());break;case"hour(s)":t.freq=X.HOURLY,n.nextSymbol()&&(a(),_());break;case"minute(s)":t.freq=X.MINUTELY,n.nextSymbol()&&(a(),_());break;case"month(s)":t.freq=X.MONTHLY,n.nextSymbol()&&(a(),_());break;case"year(s)":t.freq=X.YEARLY,n.nextSymbol()&&(a(),_());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=X.WEEKLY;var D=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[D]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var v=c();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(X[v]),n.nextSymbol()}m(),_();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=X.YEARLY,t.bymonth=[l()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var R=l();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(R),n.nextSymbol()}a(),_();break;default:throw new Error("Unknown symbol")}}function a(){var T=n.accept("on"),D=n.accept("the");if(!!(T||D))do{var v=h(),R=c(),I=l();if(v)R?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R].nth(v))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(v),n.accept("day(s)"));else if(R)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var q=n.acceptNumber();if(!q)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(q[0],10)];n.accept("comma");){if(q=n.acceptNumber(),!q)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(q[0],10))}}else if(I)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(I);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var T=n.accept("at");if(!!T)do{var D=n.acceptNumber();if(!D)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(D[0],10)];n.accept("comma");){if(D=n.acceptNumber(),!D)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(D[0],10))}}while(n.accept("comma")||n.accept("at"))}function l(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function c(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function h(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var T=parseInt(n.value[1],10);if(T<-366||T>366)throw new Error("Nth out of range: "+T);return n.nextSymbol(),n.accept("last")?-T:T;default:return!1}}function m(){n.accept("on"),n.accept("the");var T=h();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=h(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(T),n.nextSymbol()}}function _(){if(n.symbol==="until"){var T=Date.parse(n.text);if(!T)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(T)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var be;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(be||(be={}));function Wi(r){return r12){var n=Math.floor(this.month/12),s=Lt(this.month,12);this.month=s,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Eo(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),nr(s)||De(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var o=Eo(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(nr(s)||De(s,this.hour))&&(nr(a)||De(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var l=Eo(this.second,60),c=l.div,h=l.mod;if(c&&(this.second=h,this.addMinutes(c,!1,s,a)),(nr(s)||De(s,this.hour))&&(nr(a)||De(a,this.minute))&&(nr(o)||De(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=An.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>An.MAXYEAR))return;t=An.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,a=t.interval,o=t.wkst,l=t.byhour,c=t.byminute,h=t.bysecond;switch(s){case be.YEARLY:return this.addYears(a);case be.MONTHLY:return this.addMonths(a);case be.WEEKLY:return this.addWeekly(a,o);case be.DAILY:return this.addDaily(a);case be.HOURLY:return this.addHours(a,n,l);case be.MINUTELY:return this.addMinutes(a,n,l,c);case be.SECONDLY:return this.addSeconds(a,n,l,c,h)}},e}(Gs);function xl(r){for(var e=[],t=Object.keys(r),n=0,s=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||at(e.byweekno)||at(e.byyearday)||Boolean(e.bymonthday)||at(e.bymonthday)||Ge(e.byweekday)||Ge(e.byeaster)))switch(e.freq){case X.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case X.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case X.WEEKLY:e.byweekday=[ie.getWeekday(e.dtstart)];break}if(Ge(e.bymonth)&&!xt(e.bymonth)&&(e.bymonth=[e.bymonth]),Ge(e.byyearday)&&!xt(e.byyearday)&&rr(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ge(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(xt(e.bymonthday)){for(var s=[],a=[],t=0;t0?s.push(n):n<0&&a.push(n)}e.bymonthday=s,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ge(e.byweekno)&&!xt(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ge(e.byweekday))e.bynweekday=null;else if(rr(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Ol(e.byweekday))e.byweekday=[ut.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof ut)!e.byweekday.n||e.freq>X.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var o=[],l=[],t=0;tX.MONTHLY?o.push(c.weekday):l.push([c.weekday,c.n])}e.byweekday=at(o)?o:null,e.bynweekday=at(l)?l:null}return Ge(e.byhour)?rr(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(m=0,h=l.yearlen+Lt(o-e.wkst,7)):h=n-m;for(var _=Math.floor(h/7),T=Lt(h,7),D=Math.floor(_+T/4),v=0;v0&&R<=D){var I=void 0;R>1?(I=m+(R-1)*7,m!==c&&(I-=7-c)):I=m;for(var q=0;q<7&&(l.wnomask[I]=1,I++,l.wdaymask[I]!==e.wkst);q++);}}if(De(e.byweekno,1)){var I=m+D*7;if(m!==c&&(I-=7-c),I=4?(me=0,ve=fe+Lt(B-e.wkst,7)):ve=n-m,$=Math.floor(52+Lt(ve,7)/4)}if(De(e.byweekno,$))for(var I=0;Ia)return sn(r);if($>=t){var B=Gm($,e);if(!r.accept(B)||l&&(--l,!l))return sn(r)}}else for(var q=D;qa)return sn(r);if($>=t){var B=Gm($,e);if(!r.accept(B)||l&&(--l,!l))return sn(r)}}}if(e.interval===0||(c.add(e,R),c.year>ie.MAXYEAR))return sn(r);Wi(n)||(m=h.gettimeset(n)(c.hour,c.minute,c.second,0)),h.rebuild(c.year,c.month)}}function BE(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,h=t.byyearday;return at(n)&&!De(n,r.mmask[e])||at(s)&&!r.wnomask[e]||at(a)&&!De(a,r.wdaymask[e])||at(r.nwdaymask)&&!r.nwdaymask[e]||o!==null&&!De(r.eastermask,e)||(at(l)||at(c))&&!De(l,r.mdaymask[e])&&!De(c,r.nmdaymask[e])||at(h)&&(e=r.yearlen&&!De(h,e+1-r.yearlen)&&!De(h,-r.nextyearlen+e-r.yearlen))}function Gm(r,e){return new as(r,e.tzid).rezonedDate()}function sn(r){return r.getValue()}function GE(r,e,t,n,s){for(var a=!1,o=e;o=X.HOURLY&&at(s)&&!De(s,e.hour)||n>=X.MINUTELY&&at(a)&&!De(a,e.minute)||n>=X.SECONDLY&&at(o)&&!De(o,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var yr={MO:new ut(0),TU:new ut(1),WE:new ut(2),TH:new ut(3),FR:new ut(4),SA:new ut(5),SU:new ut(6)},qi={freq:be.YEARLY,dtstart:null,interval:1,wkst:yr.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Mm=Object.keys(qi),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Pm,this.origOptions=xl(e);var n=Sm(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ui(e,t)},r.fromText=function(e,t){return wm(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Oo(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new Rl("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new nn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!ie.isValidDate(e)||!ie.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(s)return this._iter(new Rl("between",a,s));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new nn("between",a)),this._cacheAdd("between",o,a)),o},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!ie.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new nn("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!ie.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new nn("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Bi(this.origOptions)},r.prototype.toText=function(e,t,n){return Em(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return km(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=be.YEARLY,r.MONTHLY=be.MONTHLY,r.WEEKLY=be.WEEKLY,r.DAILY=be.DAILY,r.HOURLY=be.HOURLY,r.MINUTELY=be.MINUTELY,r.SECONDLY=be.SECONDLY,r.MO=yr.MO,r.TU=yr.TU,r.WE=yr.WE,r.TH=yr.TH,r.FR=yr.FR,r.SA=yr.SA,r.SU=yr.SU,r.parseString=$i,r.optionsToString=Bi,r}();function Hm(r,e,t,n,s,a){var o={},l=r.accept;function c(T,D){t.forEach(function(v){v.between(T,D,!0).forEach(function(R){o[Number(R)]=!0})})}s.forEach(function(T){var D=new as(T,a).rezonedDate();o[Number(D)]=!0}),r.accept=function(T){var D=Number(T);return isNaN(D)?l.call(this,T):!o[D]&&(c(new Date(D-1),new Date(D+1)),!o[D])?(o[D]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var D=Number(T);return o[D]?!0:(o[D]=!0,l.call(this,T))});for(var h=0;h1||s.length||a.length||o.length){var m=new Nl(h);return m.dtstart(l),m.tzid(c||void 0),n.forEach(function(T){m.rrule(new X(Al(T,l,c),h))}),s.forEach(function(T){m.rdate(T)}),a.forEach(function(T){m.exrule(new X(Al(T,l,c),h))}),o.forEach(function(T){m.exdate(T)}),e.compatible&&e.dtstart&&m.rdate(l),m}var _=n[0]||{};return new X(Al(_,_.dtstart||e.dtstart||l,_.tzid||e.tzid||c),h)}function Mo(r,e){return e===void 0&&(e={}),VE(r,KE(e))}function Al(r,e,t){return Bt(Bt({},r),{dtstart:e,tzid:t})}function KE(r){var e=[],t=Object.keys(r),n=Object.keys(zm);if(t.forEach(function(s){De(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Bt(Bt({},zm),r)}function ZE(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=Xp(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function XE(r){var e=ZE(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function QE(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` +`),n=0;n0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function JE(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Vm(r,e){return JE(e),r.split(",").map(function(t){return ie.untilStringToDate(t)})}function Km(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Ie.isSkippingTooManyYears(e,t,s);)t=Ie.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new k(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var Rt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Rt||{}),Fe=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var nt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new nt(new Fe("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new nt(new Fe("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new nt(new Fe(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new nt(new Fe("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new nt(new Fe("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Rt[e]||"TODO"}static createUnknownStatus(e){return new nt(new Fe(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=nt.getTypeFromStatusTypeString(e[3]);return new nt(new Fe(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return nt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},W=nt;W.DONE=nt.makeDone(),W.EMPTY=nt.makeEmpty(),W.TODO=nt.makeTodo();var xe=class{constructor(){this.coreStatuses=[W.makeTodo().configuration,W.makeDone().configuration],this.customStatuses=[W.makeInProgress().configuration,W.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new W(e);return t.findIndex(i=>new W(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){xe.deleteAllCustomStatuses(e),new xe().customStatuses.forEach(n=>{xe.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):xe.addStatus(e.customStatuses,W.createFromImportedValue(i))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var qp=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Jt=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return qp.forEach(t=>{e=[...e,new Jt(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Jt.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Jt.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var ib={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],statusSettings:new xe,features:Jt.settingsFlags,generalSettings:{},headingOpened:{}},Nr=Re({},ib),U=()=>{for(let r in Jt.settingsFlags)Nr.features[r]===void 0&&(Nr.features[r]=Jt.settingsFlags[r]);return Nr.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=W.getTypeFromStatusTypeString(r.type);t[e]=new Fe((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),Re({},Nr)},it=r=>(Nr=Re(Re({},Nr),r),U());var Xr=(r,e)=>(Nr.generalSettings[r]=e,U()),Wp=r=>{var e;return(e=Nr.features[r])!=null?e:!1};var de=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==W.EMPTY.symbol)}static getInstance(){return de.instance||(de.instance=new de),de.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof W?this._registeredStatuses.push(e):this._registeredStatuses.push(new W(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):W.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):W.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:W.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return W.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:W.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new de,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=de.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i}static copyStatusWithNewName(e,t){let n=new Fe(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new W(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[W.makeTodo(),W.makeInProgress(),W.makeDone(),W.makeCancelled()].forEach(t=>{this.add(t)})}};var cr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/cr.milliSecondsPerDay),i;n>=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*cr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*cr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*cr.startedCoefficient),e.priority){case"1":t+=1*cr.priorityCoefficient;break;case"2":t+=.65*cr.priorityCoefficient;break;case"3":t+=.325*cr.priorityCoefficient;break}return t}},lr=cr;lr.dueCoefficient=12,lr.scheduledCoefficient=5,lr.startedCoefficient=-3,lr.priorityCoefficient=6,lr.milliSecondsPerDay=1e3*60*60*24;var Bp=require("obsidian");var Yp=require("obsidian");var $o,Bo,jp=({metadataCache:r,vault:e})=>{$o=r,Bo=e},sa=t=>N(void 0,[t],function*({originalTask:r,newTasks:e}){if(Bo===void 0||$o===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),$p({originalTask:r,newTasks:e,vault:Bo,metadataCache:$o,previousTries:0})}),$p=s=>N(void 0,[s],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let g=Math.min(Math.pow(10,i),100);setTimeout(()=>{$p({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i+1})},g)},o=t.getAbstractFileByPath(r.path);if(!(o instanceof Yp.TFile))return console.warn(`Tasks: No file found for task ${r.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=n.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let d=(yield t.read(o)).split(` -`),{globalFilter:f}=U(),h,y=0;for(let g of l){if(g.position.start.lineg.toFileLineString()),...d.slice(h.position.start.line+1)];yield t.modify(o,m.join(` -`))});function sb(r,e,t){return N(this,null,function*(){yield Bp.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function Gp(r,e,t=null){return N(this,null,function*(){var a;t||(t=sb);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let i=document.createElement("span");n.appendChild(i),i.classList.add("tasks-list-text"),yield ab(r,e,i,t);let s=document.createElement("input");return n.appendChild(s),s.classList.add("task-list-item-checkbox"),s.type="checkbox",r.status.symbol!==" "&&(s.checked=!0,n.classList.add("is-checked")),s.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),s.disabled=!0;let u=r.toggle();sa({originalTask:r,newTasks:u})}),n.prepend(s),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),s.setAttribute("data-line",e.listIndex.toString()),(a=e.layoutOptions)!=null&&a.shortMode&&ub({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function ab(r,e,t,n){return N(this,null,function*(){let i="",s=new Mn(e.layoutOptions);for(let a of s.layoutComponents){let o=r.componentToString(s,a);o&&(a==="description"&&(o=lb(o)),i+=o)}yield ob(t,i,"description",r,n)})}function ob(r,e,t,n,i){return N(this,null,function*(){if(t==="description"){yield i(e,r,n.path);let s=r.querySelector("blockquote"),a=s!=null?s:r,o=a.querySelector("p");if(o!==null){for(;o.firstChild;)a.insertBefore(o.firstChild,o);o.remove()}r.querySelectorAll("p").forEach(u=>{u.hasChildNodes()||u.remove()}),r.querySelectorAll(".footnotes").forEach(u=>{u.remove()})}else r.innerHTML=e})}function ub({task:r,element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let n=e.createDiv();n.addClasses(["tooltip","mod-right"]),r.recurrence&&n.createDiv().setText(`${Ft} ${r.recurrence.toText()}`),r.startDate&&n.createDiv().setText(aa({signifier:Ut,date:r.startDate})),r.scheduledDate&&n.createDiv().setText(aa({signifier:Lt,date:r.scheduledDate})),r.dueDate&&n.createDiv().setText(aa({signifier:qt,date:r.dueDate})),r.doneDate&&n.createDiv().setText(aa({signifier:oa,date:r.doneDate}));let i=r.getLinkText({isFilenameUnique:t});i&&n.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{n.remove()})})}function aa({signifier:r,date:e}){return`${r} ${e.format(S.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function lb(r){let{globalFilter:e,removeGlobalFilter:t}=U();return t?r.replace(e,"").trim():r}var st=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=U();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new me(wt(Re({},e),{path:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new me(wt(Re({},i),{scheduledDateIsInferred:!1}))),i))}};function ua(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Ce={High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",None:""},Ft="\u{1F501}",Ut="\u{1F6EB}",Lt="\u23F3",qt="\u{1F4C5}",oa="\u2705",mt=class{},S=mt;S.dateFormat="YYYY-MM-DD",S.indentationRegex=/^([\s\t>]*)/,S.listMarkerRegex=/([-*]|[0-9]+\.)/,S.checkboxRegex=/\[(.)\]/u,S.afterCheckboxRegex=/ *(.*)/u,S.taskRegex=new RegExp(mt.indentationRegex.source+mt.listMarkerRegex.source+" +"+mt.checkboxRegex.source+mt.afterCheckboxRegex.source,"u"),S.nonTaskRegex=new RegExp(mt.indentationRegex.source+mt.listMarkerRegex.source+"? *("+mt.checkboxRegex.source+")?"+mt.afterCheckboxRegex.source,"u"),S.listItemRegex=new RegExp(mt.indentationRegex.source+mt.listMarkerRegex.source),S.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,S.priorityRegex=/([⏫🔼🔽])$/u,S.startDateRegex=/🛫 *(\d{4}-\d{2}-\d{2})$/u,S.scheduledDateRegex=/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,S.dueDateRegex=/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,S.doneDateRegex=/✅ *(\d{4}-\d{2}-\d{2})$/u,S.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,S.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,S.hashTagsFromEnd=new RegExp(mt.hashTags.source+"$");var me=class{constructor({status:e,description:t,path:n,indentation:i,listMarker:s,sectionStart:a,sectionIndex:o,precedingHeader:u,priority:l,startDate:c,scheduledDate:d,dueDate:f,doneDate:h,recurrence:y,blockLink:m,tags:g,originalMarkdown:O,scheduledDateIsInferred:w}){this._urgency=null;this.status=e,this.description=t,this.path=n,this.indentation=i,this.listMarker=s,this.sectionStart=a,this.sectionIndex=o,this.precedingHeader=u,this.tags=g,this.priority=l,this.startDate=c,this.scheduledDate=d,this.dueDate=f,this.doneDate=h,this.recurrence=y,this.blockLink=m,this.originalMarkdown=O,this.scheduledDateIsInferred=w}static fromLine({line:e,path:t,sectionStart:n,sectionIndex:i,precedingHeader:s,fallbackDate:a}){let o=e.match(S.taskRegex);if(o===null)return null;let u=o[4].trim(),{globalFilter:l}=U();if(!u.includes(l))return null;let c=u,d=o[1],f=o[2],h=o[3],y=de.getInstance().bySymbolOrCreate(h),m=c.match(S.blockLinkRegex),g=m!==null?m[0]:"";g!==""&&(c=c.replace(S.blockLinkRegex,"").trim());let O,w="3",P=null,H=null,ye=!1,_e=null,se=null,j="",vt=null,dt=[],A="",E=20,b=0;do{O=!1;let v=c.match(S.priorityRegex);if(v!==null){switch(v[1]){case Ce.Low:w="4";break;case Ce.Medium:w="2";break;case Ce.High:w="1";break}c=c.replace(S.priorityRegex,"").trim(),O=!0}let q=c.match(S.doneDateRegex);q!==null&&(se=window.moment(q[1],S.dateFormat),c=c.replace(S.doneDateRegex,"").trim(),O=!0);let F=c.match(S.dueDateRegex);F!==null&&(_e=window.moment(F[1],S.dateFormat),c=c.replace(S.dueDateRegex,"").trim(),O=!0);let V=c.match(S.scheduledDateRegex);V!==null&&(H=window.moment(V[1],S.dateFormat),c=c.replace(S.scheduledDateRegex,"").trim(),O=!0);let ue=c.match(S.startDateRegex);ue!==null&&(P=window.moment(ue[1],S.dateFormat),c=c.replace(S.startDateRegex,"").trim(),O=!0);let Z=c.match(S.recurrenceRegex);Z!==null&&(j=Z[1].trim(),c=c.replace(S.recurrenceRegex,"").trim(),O=!0);let ge=c.match(S.hashTagsFromEnd);if(ge!=null){c=c.replace(S.hashTagsFromEnd,"").trim(),O=!0;let x=ge[0].trim();A=A.length>0?[x,A].join(" "):x}b++}while(O&&b<=E);j.length>0&&(vt=Ie.fromText({recurrenceRuleText:j,startDate:P,scheduledDate:H,dueDate:_e})),st.canApplyFallback({startDate:P,scheduledDate:H,dueDate:_e})&&a!==null&&(H=a,ye=!0),A.length>0&&(c+=" "+A);let C=c.match(S.hashTags);return C!==null&&(dt=C.filter(v=>v!==l).map(v=>v.trim())),new me({status:y,description:c,path:t,indentation:d,listMarker:f,sectionStart:n,sectionIndex:i,precedingHeader:s,priority:w,startDate:P,scheduledDate:H,dueDate:_e,doneDate:se,recurrence:vt,blockLink:g,tags:dt,originalMarkdown:e,scheduledDateIsInferred:ye})}toLi(e){return N(this,null,function*(){return Gp(this,e)})}toString(e){let t=new Mn(e),n="";for(let i of t.layoutComponents)n+=this.componentToString(t,i);return n}componentToString(e,t){var n;switch(t){case"description":return this.description;case"priority":{let i="";return this.priority==="1"?i=" "+Ce.High:this.priority==="2"?i=" "+Ce.Medium:this.priority==="4"&&(i=" "+Ce.Low),i}case"startDate":return this.startDate?e.options.shortMode?" "+Ut:` ${Ut} ${this.startDate.format(S.dateFormat)}`:"";case"scheduledDate":return!this.scheduledDate||this.scheduledDateIsInferred?"":e.options.shortMode?" "+Lt:` ${Lt} ${this.scheduledDate.format(S.dateFormat)}`;case"doneDate":return this.doneDate?e.options.shortMode?" "+oa:` ${oa} ${this.doneDate.format(S.dateFormat)}`:"";case"dueDate":return this.dueDate?e.options.shortMode?" "+qt:` ${qt} ${this.dueDate.format(S.dateFormat)}`:"";case"recurrenceRule":return this.recurrence?e.options.shortMode?" "+Ft:` ${Ft} ${this.recurrence.toText()}`:"";case"blockLink":return(n=this.blockLink)!=null?n:"";default:throw new Error(`Don't know how to render task component of type '${t}'`)}}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=de.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:a}=U();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new me(wt(Re({},this),{status:e,doneDate:t})),s=[];if(n!==null){let a=de.getInstance().getNextStatusOrCreate(e),o=new me(wt(Re(Re({},this),n),{status:a,blockLink:""}));s.push(o)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=lr.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(It(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=U(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+ua(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var ki=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Zr=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Zs,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>N(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=U(),t=this.vault.on("create",s=>{s instanceof Cn.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Cn.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof Cn.TFile&&this.tasksMutex.runExclusive(()=>{let o=new ki(()=>st.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?st.updateTaskPath(u,s.path,o.value):new me(wt(Re({},u),{path:s.path})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>N(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return N(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}me.tasksListsIdentical(n,s)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` -`),o=a.length,u=new ki(()=>st.fromPath(i.path)),l=null,c=0;for(let d of t)if(d.task!==void 0){let f=d.position.start.line;if(f>=o)return console.log(`${i.path} Obsidian gave us a line number ${f} past the end of the file. ${o}.`),s;if((l===null||l.position.end.linen}static nextAfterYears(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Tt.isSkippingTooManyYears(e,t,a);)t=Tt.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new X(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var Jm={prioritySymbols:{High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([⏫🔼🔽])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Gi=class{constructor(e){this.symbols=e}serialize(e){let t=new qs,n="";for(let s of t.layoutComponents)n+=this.componentToString(e,t,s);return n}componentToString(e,t,n){var _;let{prioritySymbols:s,startDateSymbol:a,createdDateSymbol:o,scheduledDateSymbol:l,doneDateSymbol:c,recurrenceSymbol:h,dueDateSymbol:m}=this.symbols;switch(n){case"description":return e.description;case"priority":{let T="";return e.priority==="1"?T=" "+s.High:e.priority==="2"?T=" "+s.Medium:e.priority==="4"&&(T=" "+s.Low),T}case"startDate":return e.startDate?t.options.shortMode?" "+a:` ${a} ${e.startDate.format(ae.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+o:` ${o} ${e.createdDate.format(ae.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+l:` ${l} ${e.scheduledDate.format(ae.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+c:` ${c} ${e.doneDate.format(ae.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+m:` ${m} ${e.dueDate.format(ae.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+h:` ${h} ${e.recurrence.toText()}`:"";case"blockLink":return(_=e.blockLink)!=null?_:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}deserialize(e){let{prioritySymbols:t,TaskFormatRegularExpressions:n}=this.symbols,s,a="3",o=null,l=null,c=null,h=null,m=null,_="",T=null,D="",v=20,R=0;do{s=!1;let I=e.match(n.priorityRegex);if(I!==null){switch(I[1]){case t.Low:a="4";break;case t.Medium:a="2";break;case t.High:a="1";break}e=e.replace(n.priorityRegex,"").trim(),s=!0}let q=e.match(n.doneDateRegex);q!==null&&(h=window.moment(q[1],ae.dateFormat),e=e.replace(n.doneDateRegex,"").trim(),s=!0);let $=e.match(n.dueDateRegex);$!==null&&(c=window.moment($[1],ae.dateFormat),e=e.replace(n.dueDateRegex,"").trim(),s=!0);let B=e.match(n.scheduledDateRegex);B!==null&&(l=window.moment(B[1],ae.dateFormat),e=e.replace(n.scheduledDateRegex,"").trim(),s=!0);let me=e.match(n.startDateRegex);me!==null&&(o=window.moment(me[1],ae.dateFormat),e=e.replace(n.startDateRegex,"").trim(),s=!0);let fe=e.match(n.createdDateRegex);fe!==null&&(m=window.moment(fe[1],ae.dateFormat),e=e.replace(n.createdDateRegex,"").trim(),s=!0);let ve=e.match(n.recurrenceRegex);ve!==null&&(_=ve[1].trim(),e=e.replace(n.recurrenceRegex,"").trim(),s=!0);let ee=e.match(ae.hashTagsFromEnd);if(ee!=null){e=e.replace(ae.hashTagsFromEnd,"").trim(),s=!0;let te=ee[0].trim();D=D.length>0?[te,D].join(" "):te}R++}while(s&&R<=v);return _.length>0&&(T=Tt.fromText({recurrenceRuleText:_,startDate:o,scheduledDate:l,dueDate:c})),D.length>0&&(e+=" "+D),{description:e,priority:a,startDate:o,createdDate:m,scheduledDate:l,dueDate:c,doneDate:h,recurrence:T,tags:je.extractHashtags(e)}}};var gr=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(gr||{}),bt=class{constructor(e,t,n,s,a="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=a}};var Vt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Vt(new bt("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Vt(new bt("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Vt(new bt(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Vt(new bt("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Vt(new bt("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return gr[e]||"TODO"}static createUnknownStatus(e){return new Vt(new bt(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Vt.getTypeFromStatusTypeString(e[3]);return new Vt(new bt(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return Vt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},he=Vt;he.DONE=Vt.makeDone(),he.EMPTY=Vt.makeEmpty(),he.TODO=Vt.makeTodo();var xo=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var pt=class{constructor(){this.coreStatuses=[he.makeTodo().configuration,he.makeDone().configuration],this.customStatuses=[he.makeInProgress().configuration,he.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new he(e);return t.findIndex(s=>new he(s).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){pt.deleteAllCustomStatuses(e),new pt().customStatuses.forEach(n=>{pt.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(o=>o.symbol==s[0]&&o.name==s[1]&&o.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):pt.addStatus(e.customStatuses,he.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var ey=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Wr=class{constructor(e,t,n,s,a,o){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=a;this.stable=o}static get values(){let e=[];return ey.forEach(t=>{e=[...e,new Wr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Wr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Wr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Fn={tasksPluginEmoji:{displayName:"Default",taskSerializer:new Gi(Jm)}},tk={globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],statusSettings:new pt,features:Wr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new xo},In=Qe({},tk),se=()=>{for(let r in Wr.settingsFlags)In.features[r]===void 0&&(In.features[r]=Wr.settingsFlags[r]);return In.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=he.getTypeFromStatusTypeString(r.type);t[e]=new bt((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Qe({},In)},Gt=r=>(In=Qe(Qe({},In),r),se());var os=(r,e)=>(In.generalSettings[r]=e,se()),ty=r=>{var e;return(e=In.features[r])!=null?e:!1};function Cl(){return Fn[se().taskFormat]}var $e=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==he.EMPTY.symbol)}static getInstance(){return $e.instance||($e.instance=new $e),$e.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof he?this._registeredStatuses.push(e):this._registeredStatuses.push(new he(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):he.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):he.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:he.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return he.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:he.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new $e,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=$e.copyStatusWithNewName(a,`Unknown (${a.symbol})`);s.push(o),n.add(o)}),s}static copyStatusWithNewName(e,t){let n=new bt(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new he(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[he.makeTodo(),he.makeInProgress(),he.makeDone(),he.makeCancelled()].forEach(t=>{this.add(t)})}};var on=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/on.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+14)*.8/21+.2:s=.2,t+=s*on.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*on.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*on.startedCoefficient),e.priority){case"1":t+=1*on.priorityCoefficient;break;case"2":t+=.65*on.priorityCoefficient;break;case"3":t+=.325*on.priorityCoefficient;break}return t}},an=on;an.dueCoefficient=12,an.scheduledCoefficient=5,an.startedCoefficient=-3,an.priorityCoefficient=6,an.milliSecondsPerDay=1e3*60*60*24;var cy=require("obsidian");var zi=require("obsidian");var iy=ns(Fl()),rk=require("obsidian"),ay=ns(sy());var Ll=class extends ay.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let a in this.options.minLevels)t.startsWith(a)&&a.length>=s.length&&(n=this.options.minLevels[a],s=a);return new Yl(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,iy.default)().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Po=new Ll,Yl=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){Wl=r,ql=e,jl=t},Ao=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(ql===void 0||Wl===void 0||jl===void 0){$l("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Hi.debug(`replaceTaskWithTasks entered. ${r.path}`),uy({originalTask:r,newTasks:e,vault:ql,metadataCache:Wl,workspace:jl,previousTries:0})});function $l(r){console.error(r),new zi.Notice(r,15e3)}function Ul(r){console.warn(r),new zi.Notice(r,1e4)}function sk(r){Hi.debug(r)}var uy=o=>J(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){Hi.debug(`tryRepetitive after ${a} previous tries`);let l=()=>{if(a>10){let I=`Tasks: Could not find the correct task line to update. + +The task line not updated is: +${r.originalMarkdown} + +In this markdown file: +"${r.taskLocation.path}" + +Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). + +Recommendations: + +1. Close all panes that have the above file open, and then re-open the file. + +2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. +`;$l(I);return}let R=Math.min(Math.pow(10,a),100);Hi.debug(`timeout = ${R}`),setTimeout(()=>{uy({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},R)},c=t.getAbstractFileByPath(r.path);if(!(c instanceof zi.TFile))return Ul(`Tasks: No file found for task ${r.description}. Retrying ...`),l();if(!nk.includes(c.extension)){$l(`Tasks: Does not support files with the ${c.extension} file extension.`);return}let h=n.getFileCache(c);if(h==null||h===null)return Ul(`Tasks: No file cache found for file ${c.path}. Retrying ...`),l();let m=h.listItems;if(m===void 0||m.length===0)return Ul(`Tasks: No list items found in file cache of ${c.path}. Retrying ...`),l();let T=(yield t.read(c)).split(` +`),D=ik(r,T,m,sk);if(D===void 0)return l();let v=[...T.slice(0,D),...e.map(R=>R.toFileLineString()),...T.slice(D+1)];yield t.modify(c,v.join(` +`))});function ly(r,e){return r{l.preventDefault(),l.stopPropagation(),a.disabled=!0;let c=r.toggle();Ao({originalTask:r,newTasks:c})}),n.prepend(a),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),a.setAttribute("data-line",e.listIndex.toString()),(o=e.layoutOptions)!=null&&o.shortMode&&fk({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function ck(r,e,t,n){return J(this,null,function*(){let s="",a=new qs(e.layoutOptions),o=Fn.tasksPluginEmoji.taskSerializer;for(let c of a.layoutComponents){let h=o.componentToString(r,a,c);h&&(c==="description"&&(h=hk(h)),s+=h)}let{debugSettings:l}=se();l.showTaskHiddenData&&(s+=`
\u{1F41B} ${r.lineNumber} . ${r.sectionStart} . ${r.sectionIndex} . '${r.originalMarkdown}'
'${r.path}' > '${r.precedingHeader}'
`),yield dk(t,s,"description",r,n)})}function dk(r,e,t,n,s){return J(this,null,function*(){if(t==="description"){yield s(e,r,n.path);let a=r.querySelector("blockquote"),o=a!=null?a:r,l=o.querySelector("p");if(l!==null){for(;l.firstChild;)o.insertBefore(l.firstChild,l);l.remove()}r.querySelectorAll("p").forEach(c=>{c.hasChildNodes()||c.remove()}),r.querySelectorAll(".footnotes").forEach(c=>{c.remove()})}else r.innerHTML=e})}function fk({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=Fn.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let h=e.createDiv();h.addClasses(["tooltip","pop-up"]),r.recurrence&&h.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&h.createDiv().setText(Vi({signifier:a,date:r.createdDate})),r.startDate&&h.createDiv().setText(Vi({signifier:s,date:r.startDate})),r.scheduledDate&&h.createDiv().setText(Vi({signifier:o,date:r.scheduledDate})),r.dueDate&&h.createDiv().setText(Vi({signifier:l,date:r.dueDate})),r.doneDate&&h.createDiv().setText(Vi({signifier:c,date:r.doneDate}));let m=r.getLinkText({isFilenameUnique:t});m&&h.createDiv().setText(`\u{1F517} ${m}`),e.addEventListener("mouseleave",()=>{h.remove()})})}function Vi({signifier:r,date:e}){return`${r} ${e.format(ae.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function hk(r){let{globalFilter:e,removeGlobalFilter:t}=se();return t?r.replace(e,"").trim():r}var Kt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=se();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),s=e.substring(t,n),a=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(s)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,a=e.scheduledDateIsInferred;return n===null?a&&(a=!1,s=null):a?s=n:this.canApplyFallback(e)&&(s=n,a=!0),new je(tr(Qe({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:a}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new je(tr(Qe({},s),{scheduledDateIsInferred:!1}))),s))}};function No(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var sr=class{},ae=sr;ae.dateFormat="YYYY-MM-DD",ae.indentationRegex=/^([\s\t>]*)/,ae.listMarkerRegex=/([-*]|[0-9]+\.)/,ae.checkboxRegex=/\[(.)\]/u,ae.afterCheckboxRegex=/ *(.*)/u,ae.taskRegex=new RegExp(sr.indentationRegex.source+sr.listMarkerRegex.source+" +"+sr.checkboxRegex.source+sr.afterCheckboxRegex.source,"u"),ae.nonTaskRegex=new RegExp(sr.indentationRegex.source+sr.listMarkerRegex.source+"? *("+sr.checkboxRegex.source+")?"+sr.afterCheckboxRegex.source,"u"),ae.listItemRegex=new RegExp(sr.indentationRegex.source+sr.listMarkerRegex.source),ae.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ae.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ae.hashTagsFromEnd=new RegExp(sr.hashTags.source+"$");var je=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:h,dueDate:m,doneDate:_,recurrence:T,blockLink:D,tags:v,originalMarkdown:R,scheduledDateIsInferred:I}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=a,this.taskLocation=n,this.tags=v,this.priority=o,this.createdDate=l,this.startDate=c,this.scheduledDate=h,this.dueDate=m,this.doneDate=_,this.recurrence=T,this.blockLink=D,this.originalMarkdown=R,this.scheduledDateIsInferred=I}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=e.match(ae.taskRegex);if(s===null)return null;let a=s[4].trim(),{globalFilter:o}=se();if(!a.includes(o))return null;let l=a,c=s[1],h=s[2],m=s[3],_=$e.getInstance().bySymbolOrCreate(m),T=l.match(ae.blockLinkRegex),D=T!==null?T[0]:"";D!==""&&(l=l.replace(ae.blockLinkRegex,"").trim());let{taskSerializer:v}=Cl(),R=v.deserialize(l),I=!1;return Kt.canApplyFallback(R)&&n!==null&&(R.scheduledDate=n,I=!0),R.tags=R.tags.map(q=>q.trim()),o&&(R.tags=R.tags.filter(q=>q!==o)),new je(tr(Qe({},R),{status:_,indentation:c,listMarker:h,taskLocation:t,blockLink:D,originalMarkdown:e,scheduledDateIsInferred:I}))}toLi(e){return J(this,null,function*(){return dy(this,e)})}toString(){return Cl().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=$e.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=se();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new je(tr(Qe({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=se(),l=null;o&&(l=window.moment());let c=$e.getInstance().getNextStatusOrCreate(e),h=new je(tr(Qe(Qe({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(h)}return a.push(s),a}get urgency(){return this._urgency===null&&(this._urgency=an.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let a of t)if(this[a]!==e[a])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let a of t){let o=this[a],l=e[a];if(Ur(o,l)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static extractHashtags(e){var t,n;return(n=(t=e.match(ae.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=se(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+No(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var Ki=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Pt=class{constructor(e,t,n,s,a){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=a}static fromUnknownPosition(e){return new Pt(e,0,0,0,null)}fromRenamedFile(e){return new Pt(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var us=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new vo,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>J(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=se(),t=this.vault.on("create",a=>{a instanceof zs.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof zs.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(o=>o.path!==a.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(a,o)=>{a instanceof zs.TFile&&this.tasksMutex.runExclusive(()=>{let l=new Ki(()=>Kt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Kt.updateTaskPath(c,a.path,l.value):new je(tr(Qe({},c),{taskLocation:c.taskLocation.fromRenamedFile(a.path)})):c),this.notifySubscribers()})});this.vaultEventReferences.push(s)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(o=>o.path===e.path),s=t.listItems,a=[];if(s!==void 0){let o=yield this.vault.cachedRead(e);a=this.getTasksFromFileContent(o,s,t,e)}je.tasksListsIdentical(n,a)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(o=>o.path!==e.path),this.tasks.push(...a),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let a=[],o=e.split(` +`),l=o.length,c=new Ki(()=>Kt.fromPath(s.path)),h=null,m=0;for(let _ of t)if(_.task!==void 0){let T=_.position.start.line;if(T>=l)return console.log(`${s.path} Obsidian gave us a line number ${T} past the end of the file. ${l}.`),a;if((h===null||h.position.end.line=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var Hd=require("obsidian");var L_=require("obsidian");function Jr(){}function Ko(r){return r()}function zp(){return Object.create(null)}function en(r){r.forEach(Ko)}function Vp(r){return typeof r=="function"}function Xp(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Zp(r){return Object.keys(r).length===0}var Qp=!1;function cb(){Qp=!0}function db(){Qp=!1}function _(r,e){r.appendChild(e)}function Nn(r,e,t){r.insertBefore(e,t||null)}function tn(r){r.parentNode.removeChild(r)}function Vo(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function Jp(r){return function(e){return e.preventDefault(),r.call(this,e)}}function D(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function pb(r){return Array.from(r.childNodes)}function Xo(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Wt(r,e){r.value=e==null?"":e}function Zo(r,e){for(let t=0;t{let u=s.map(Ko).filter(Vp);a?a.push(...u):en(u),r.$$.on_mount=[]}),o.forEach(Ci)}function rh(r,e){let t=r.$$;t.fragment!==null&&(en(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function vb(r,e){r.$$.dirty[0]===-1&&(Ai.push(r),yb(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=h.length?h[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=y)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](y),c&&vb(r,d)),f}):[],l.update(),c=!0,en(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){cb();let d=pb(e.target);l.fragment&&l.fragment.l(d),d.forEach(tn)}else l.fragment&&l.fragment.c();e.intro&&Tb(r.$$.fragment),bb(r,e.target,e.anchor,e.customElement),db(),th()}Pi(u)}var Eb;typeof HTMLElement=="function"&&(Eb=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Ko).filter(Vp);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){en(this.$$.on_disconnect)}$destroy(){rh(this,1),this.$destroy=Jr}$on(r,e){let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!Zp(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var fa=class{$destroy(){rh(this,1),this.$destroy=Jr}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Zp(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var $d=Xs(Ne());var Wk={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Zn(r){for(let[e,t]of Object.entries(Wk))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function C_(r,e,t){let n=r.slice();return n[35]=e[t],n}function N_(r,e,t){let n=r.slice();return n[38]=e[t].value,n[39]=e[t].label,n[40]=e[t].symbol,n}function Yk(r){let e,t=r[40]+"",n;return{c(){e=L("span"),n=at(t)},m(i,s){Nn(i,e,s),_(e,n)},p:Jr,d(i){i&&tn(e)}}}function I_(r){let e,t,n,i,s,a,o,u,l=r[39]+"",c,d,f=r[40]&&r[40].charCodeAt(0)>=256,h,y,m,g,O=f&&Yk(r);return{c(){e=L("span"),t=L("input"),a=J(),o=L("label"),u=L("span"),c=at(l),d=J(),O&&O.c(),y=J(),D(t,"type","radio"),D(t,"id",n="priority-"+r[38]),t.__value=i=r[38],t.value=t.__value,D(t,"accesskey",s=r[13](r[39].charAt(0).toLowerCase())),r[24][0].push(t),D(u,"class","accesskey-first"),D(o,"for",h="priority-"+r[38])},m(w,P){Nn(w,e,P),_(e,t),t.checked=t.__value===r[1].priority,_(e,a),_(e,o),_(o,u),_(u,c),_(o,d),O&&O.m(o,null),_(e,y),m||(g=St(t,"change",r[23]),m=!0)},p(w,P){P[0]&8192&&s!==(s=w[13](w[39].charAt(0).toLowerCase()))&&D(t,"accesskey",s),P[0]&3&&(t.checked=t.__value===w[1].priority),f&&O.p(w,P)},d(w){w&&tn(e),r[24][0].splice(r[24][0].indexOf(t),1),O&&O.d(),m=!1,g()}}}function F_(r){let e,t=r[35].name+"",n,i,s=r[35].symbol+"",a,o,u;return{c(){e=L("option"),n=at(t),i=at(" ["),a=at(s),o=at("]"),e.__value=u=r[35],e.value=e.__value},m(l,c){Nn(l,e,c),_(e,n),_(e,i),_(e,a),_(e,o)},p(l,c){c[0]&1&&t!==(t=l[35].name+"")&&Xo(n,t),c[0]&1&&s!==(s=l[35].symbol+"")&&Xo(a,s),c[0]&1&&u!==(u=l[35])&&(e.__value=u,e.value=e.__value)},d(l){l&&tn(e)}}}function jk(r){let e,t,n,i,s,a,o,u,l,c,d,f,h,y,m,g,O,w,P,H,ye,_e,se,j,vt,dt,A,E,b,C,v,q,F,V,ue,Z,ge,x,ie,Te,ve,Et,De,Pe,kr,ar,mf,ft,Ys,yf,mi,gf,_f,js,Tf,yi,$s,bf,Xt,Bs,vf,wn,Gs,Ef,Zt,wf,On,gi,Hs,Of,Ar,zs,Df,_i,Co,Rf,Ks,Sf,Dn,Hr,Mf,Vs,kf,Ti,No,Af,Rn=r[14],tt=[];for(let M=0;Mtion',s=J(),a=L("input"),u=J(),l=L("div"),c=L("label"),d=at("Priority"),h=J();for(let M=0;Mart',mf=J(),ft=L("input"),yf=J(),mi=L("code"),gf=at(Ut),_f=J(),js=new Qr(!1),Tf=J(),yi=L("div"),$s=L("label"),$s.innerHTML=`Only - future dates:`,bf=J(),Xt=L("input"),vf=J(),wn=L("div"),Gs=L("label"),Gs.textContent="Status",Ef=J(),Zt=L("select");for(let M=0;Mr[30].call(Zt)),D(wn,"class","tasks-modal-section"),D(Hs,"for","status"),D(Ar,"id","status"),D(Ar,"type","checkbox"),D(Ar,"class","task-list-item-checkbox tasks-modal-checkbox"),Ar.checked=zs=r[1].status.isCompleted(),Ar.disabled=!0,D(On,"class","tasks-modal-section tasks-modal-status"),Hr.disabled=Vs=!(r[9]&&r[11]&&r[8]&&r[7]),D(Hr,"type","submit"),D(Hr,"class","mod-cta"),D(Ti,"type","button"),D(Dn,"class","tasks-modal-section tasks-modal-buttons"),Yt(t,"with-accesskeys",r[5]),D(e,"class","tasks-modal")},m(M,ee){Nn(M,e,ee),_(e,t),_(t,n),_(n,i),_(n,s),_(n,a),Wt(a,r[1].description),r[22](a),_(t,u),_(t,l),_(l,c),_(c,d),_(l,h);for(let Q=0;Qno ${x} date`;let ve=$d.parseDate(ie,Te,{forwardDate:Te!=null});return ve!==null?window.moment(ve).format("YYYY-MM-DD"):`invalid ${x} date`}function se(x,ie){return _e(x,ie,l.forwardOnly?new Date:void 0)}function j(x){let ie=null,Te=$d.parseDate(x,new Date,{forwardDate:l.forwardOnly});return Te!==null&&(ie=window.moment(Te)),ie}Qo(()=>{let{globalFilter:x,provideAccessKeys:ie}=U();t(5,H=ie);let Te=s.getDescriptionWithoutGlobalFilter();(Te!=s.description||Te.indexOf(x)==-1)&&(P=!0);let ve="none";s.priority==="4"?ve="low":s.priority==="2"?ve="medium":s.priority==="1"&&(ve="high"),t(1,l={description:Te,status:s.status,priority:ve,recurrenceRule:s.recurrence?s.recurrence.toText():"",startDate:s.startDate?s.startDate.format("YYYY-MM-DD"):"",scheduledDate:s.scheduledDate?s.scheduledDate.format("YYYY-MM-DD"):"",dueDate:s.dueDate?s.dueDate.format("YYYY-MM-DD"):"",doneDate:s.doneDate?s.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{u.focus()},10)});let vt=x=>{if(x.key&&!x.altKey&&!x.ctrlKey){let ie=ye.find(Te=>Te.label.charAt(0).toLowerCase()==x.key);ie&&t(1,l.priority=ie.value,l)}},dt=()=>{a([])},A=()=>{let{globalFilter:x}=U(),ie=l.description.trim();P&&(ie=x+" "+ie);let Te=j(l.startDate),ve=j(l.scheduledDate),Et=j(l.dueDate),De=null;l.recurrenceRule&&(De=Ie.fromText({recurrenceRuleText:l.recurrenceRule,startDate:Te,scheduledDate:ve,dueDate:Et}));let Pe;switch(l.priority){case"low":Pe="4";break;case"medium":Pe="2";break;case"high":Pe="1";break;default:Pe="3"}let kr=new me(Object.assign(Object.assign({},s),{description:ie,status:l.status,priority:Pe,recurrence:De,startDate:Te,scheduledDate:ve,dueDate:Et,doneDate:window.moment(l.doneDate,"YYYY-MM-DD").isValid()?window.moment(l.doneDate,"YYYY-MM-DD"):null}));a([kr])},E=[[]];function b(){l.description=this.value,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function C(x){da[x?"unshift":"push"](()=>{u=x,t(6,u)})}function v(){l.priority=this.__value,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function q(){l.recurrenceRule=this.value,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function F(){l.dueDate=this.value,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function V(){l.scheduledDate=this.value,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function ue(){l.startDate=this.value,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function Z(){l.forwardOnly=this.checked,t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}function ge(){l.status=eh(this),t(1,l),t(2,c),t(3,f),t(4,y),t(0,o)}return r.$$set=x=>{"task"in x&&t(18,s=x.task),"onSubmit"in x&&t(19,a=x.onSubmit),"statusOptions"in x&&t(0,o=x.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&32){e:t(13,n=x=>H?x:null)}if(r.$$.dirty[0]&6){e:t(1,l.startDate=Zn(l.startDate),l),t(2,c=se("start",l.startDate)),t(7,d=!c.includes("invalid"))}if(r.$$.dirty[0]&10){e:t(1,l.scheduledDate=Zn(l.scheduledDate),l),t(3,f=se("scheduled",l.scheduledDate)),t(8,h=!f.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,l.dueDate=Zn(l.dueDate),l),t(4,y=se("due",l.dueDate)),t(9,m=!y.includes("invalid"))}if(r.$$.dirty[0]&1048578){e:if(t(11,O=!0),!l.recurrenceRule)t(10,g="not recurring");else{let x=t(20,i=Ie.fromText({recurrenceRuleText:l.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();x?t(10,g=x):(t(10,g="invalid recurrence rule"),t(11,O=!1))}}if(r.$$.dirty[0]&2){e:t(12,w=_e("done",l.doneDate))}},[o,l,c,f,y,H,u,d,h,m,g,O,w,n,ye,vt,dt,A,s,a,i,b,C,v,E,q,F,V,ue,Z,ge]}var Bd=class extends fa{constructor(e){super(),nh(this,e,$k,jk,Xp,{task:18,onSubmit:19,statusOptions:0},null,[-1,-1])}},U_=Bd;var Qn=class extends L_.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new U_({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=de.getInstance().registeredStatuses;return de.getInstance().bySymbol(this.task.status.symbol)===W.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var q_=({line:r,path:e})=>{var f,h;let t=st.fromPath(e),n=me.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:t});if(n!==null)return n;let i=r.match(S.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new me({status:W.TODO,description:"",path:e,indentation:"",listMarker:"-",priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(h=i[4])!=null?h:" ",u=de.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(S.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(S.blockLinkRegex,"")),new me({status:u,description:l,path:e,indentation:s,listMarker:a,blockLink:d,priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var W_=(r,e,t,n)=>{var d;if(r)return t instanceof Hd.MarkdownView;if(!(t instanceof Hd.MarkdownView))return;let i=(d=t.file)==null?void 0:d.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=q_({line:o,path:i}),l=f=>{let h=st.removeInferredStatusIfNeeded(u,f).map(y=>y.toFileLineString()).join(` -`);e.setLine(a,h)};new Qn({app:n,task:u,onSubmit:l}).open()};var zd=require("obsidian");var Y_=(r,e,t)=>{var u;if(r)return t instanceof zd.MarkdownView;if(!(t instanceof zd.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=Bk(a,n);e.setLine(s,o),e.setCursor({line:i.line,ch:Hk(i.ch,a,o)})},Bk=(r,e)=>{let t=r,n=me.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(n!==null)t=Gk(n);else{let i=r.match(S.taskRegex);if(i!==null){let s=i[3],o=de.getInstance().bySymbol(s).nextStatusSymbol;t=r.replace(S.taskRegex,`$1- [${o}] $4`)}else S.listItemRegex.test(r)?t=r.replace(S.listItemRegex,"$1$2 [ ]"):t=r.replace(S.indentationRegex,"$1- ")}return t},Gk=r=>r.toggle().map(t=>t.toFileLineString()).join(` -`),Hk=(r,e,t)=>{let n=t.length;if(n<=e.length)return r>=t.length?n:r;let i=13;if(t.match(S.doneDateRegex)&&n-e.length>=i&&(n-=i),n>=2*e.length&&t.search(`.+ -.+`)!==-1)return r+n-e.length;let s=t.search(/[-*]/);return rW_(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Y_})}};var so=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var ao=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return N(this,null,function*(){var c;let{globalFilter:n}=U(),i=e.findAll(".task-list-item").filter(d=>{var y;let f=(y=d.textContent)==null?void 0:y.split(` -`);if(f===void 0)return!1;let h=null;for(let m=0;mj_.ViewPlugin.fromClass(Kd),Kd=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let f=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. -If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(f),new $_.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=me.fromLine({line:a.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${s} Line: ${a.text}`),o===null)return!1;e.preventDefault();let l=o.toggle().map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var Ao=require("obsidian");var br=class{constructor(e,t,n){this.property=e,this.comparator=br.maybeReverse(n,t)}static maybeReverse(e,t){return e?br.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var Jn=class{constructor(e,t){this.property=e,this.grouper=t}};var ce=class{canCreateFilterForLine(e){return ce.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return ua(this.fieldNameSingular())}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?ce.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ce.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new br(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(){return new Jn(this.fieldNameSingular(),this.grouper())}};var be=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new be("None of",e,"NOT")}static booleanXor(e){return new be("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let i=0;i=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var Bh=require("obsidian");var iv=require("obsidian");function cs(){}function Hl(r){return r()}function py(){return Object.create(null)}function ds(r){r.forEach(Hl)}function yy(r){return typeof r=="function"}function gy(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function _y(r){return Object.keys(r).length===0}var Ty=!1;function pk(){Ty=!0}function mk(){Ty=!1}function L(r,e){r.appendChild(e)}function Vs(r,e,t){r.insertBefore(e,t||null)}function fs(r){r.parentNode.removeChild(r)}function zl(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function by(r){return function(e){return e.preventDefault(),r.call(this,e)}}function z(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function gk(r){return Array.from(r.childNodes)}function Vl(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Or(r,e){r.value=e==null?"":e}function Kl(r,e){for(let t=0;t{let c=a.map(Hl).filter(yy);o?o.push(...c):ds(c),r.$$.on_mount=[]}),l.forEach(Ji)}function Ey(r,e){let t=r.$$;t.fragment!==null&&(ds(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Dk(r,e){r.$$.dirty[0]===-1&&(Zi.push(r),bk(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let v=D.length?D[0]:T;return h.ctx&&s(h.ctx[_],h.ctx[_]=v)&&(!h.skip_bound&&h.bound[_]&&h.bound[_](v),m&&Dk(r,_)),T}):[],h.update(),m=!0,ds(h.before_update),h.fragment=n?n(h.ctx):!1,e.target){if(e.hydrate){pk();let _=gk(e.target);h.fragment&&h.fragment.l(_),_.forEach(fs)}else h.fragment&&h.fragment.c();e.intro&&Ek(r.$$.fragment),kk(r,e.target,e.anchor,e.customElement),mk(),wy()}Xi(c)}var Sk;typeof HTMLElement=="function"&&(Sk=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Hl).filter(yy);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){ds(this.$$.on_disconnect)}$destroy(){Ey(this,1),this.$destroy=cs}$on(r,e){let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!_y(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Lo=class{$destroy(){Ey(this,1),this.$destroy=cs}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!_y(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var jh=ns(mt());var BI={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function di(r){for(let[e,t]of Object.entries(BI))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function ev(r,e,t){let n=r.slice();return n[45]=e[t],n}function tv(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n}function GI(r){let e,t=r[50]+"",n;return{c(){e=oe("span"),n=Zt(t)},m(s,a){Vs(s,e,a),L(e,n)},p:cs,d(s){s&&fs(e)}}}function rv(r){let e,t,n,s,a,o,l,c,h=r[49]+"",m,_,T=r[50]&&r[50].charCodeAt(0)>=256,D,v,R,I,q=T&&GI(r);return{c(){e=oe("span"),t=oe("input"),o=Se(),l=oe("label"),c=oe("span"),m=Zt(h),_=Se(),q&&q.c(),v=Se(),z(t,"type","radio"),z(t,"id",n="priority-"+r[48]),t.__value=s=r[48],t.value=t.__value,z(t,"accesskey",a=r[15](r[49].charAt(0).toLowerCase())),r[33][0].push(t),z(c,"class","accesskey-first"),z(l,"for",D="priority-"+r[48])},m($,B){Vs($,e,B),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,m),L(l,_),q&&q.m(l,null),L(e,v),R||(I=Ht(t,"change",r[32]),R=!0)},p($,B){B[0]&32768&&a!==(a=$[15]($[49].charAt(0).toLowerCase()))&&z(t,"accesskey",a),B[0]&3&&(t.checked=t.__value===$[1].priority),T&&q.p($,B)},d($){$&&fs(e),r[33][0].splice(r[33][0].indexOf(t),1),q&&q.d(),R=!1,I()}}}function nv(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=oe("option"),n=Zt(t),s=Zt(" ["),o=Zt(a),l=Zt("]"),e.__value=c=r[45],e.value=e.__value},m(h,m){Vs(h,e,m),L(e,n),L(e,s),L(e,o),L(e,l)},p(h,m){m[0]&1&&t!==(t=h[45].name+"")&&Vl(n,t),m[0]&1&&a!==(a=h[45].symbol+"")&&Vl(o,a),m[0]&1&&c!==(c=h[45])&&(e.__value=c,e.value=e.__value)},d(h){h&&fs(e)}}}function HI(r){let e,t,n,s,a,o,l,c,h,m,_,T,D,v,R,I,q,$,B,me,fe,ve,ee,te,It,yt,V,W,P,Q,Y,ue,y,g,w,E,S,M,k,C,A,N,j,ke,ye,ce,Ie,K,We,Je,Ke,Dr,Mt,Ae,st,gt,kn,Ri,qe,Ns,Kn,ft,de,Vr,Rt,Zn,so,Lr,Dn,_t,xi,cr,Kr,Le,Sn,Cs,Xn,On,Qn,dr,Mn,io,Zr,ao,fr,hr,H,Is,oo,ht,Jn,Ne,pr=r[20],Ft=[];for(let G=0;Gtion',a=Se(),o=oe("textarea"),c=Se(),h=oe("div"),m=oe("label"),_=Zt("Priority"),D=Se();for(let G=0;Gart',Ie=Se(),K=oe("input"),Je=Se(),Ke=oe("code"),Dr=Zt(r[17]),Mt=Se(),Ae=new ls(!1),st=Se(),gt=oe("div"),kn=oe("label"),kn.innerHTML=`Only + future dates:`,Ri=Se(),qe=oe("input"),Kn=Se(),ft=oe("div"),de=oe("label"),de.innerHTML='Status',Vr=Se(),Rt=oe("select");for(let G=0;Gr[39].call(Rt)),z(ft,"class","tasks-modal-section"),z(_t,"for","status"),z(cr,"id","status"),z(cr,"type","checkbox"),z(cr,"class","task-list-item-checkbox tasks-modal-checkbox"),cr.checked=Kr=r[1].status.isCompleted(),cr.disabled=!0,z(Lr,"class","tasks-modal-section tasks-modal-status"),hr.disabled=Is=!r[14],z(hr,"type","submit"),z(hr,"class","mod-cta"),z(ht,"type","button"),z(fr,"class","tasks-modal-section tasks-modal-buttons"),Mr(t,"with-accesskeys",r[9]),z(e,"class","tasks-modal")},m(G,ne){Vs(G,e,ne),L(e,t),L(t,n),L(n,s),L(n,a),L(n,o),Or(o,r[1].description),r[31](o),L(t,c),L(t,h),L(h,m),L(m,_),L(h,D);for(let le=0;leno ${K} date`;let Ke=jh.parseDate(We,Je,{forwardDate:Je!=null});return Ke!==null?window.moment(Ke).format("YYYY-MM-DD"):`invalid ${K} date`}function Y(K,We){return Q(K,We,v.forwardOnly?new Date:void 0)}function ue(K){let We=null,Je=jh.parseDate(K,new Date,{forwardDate:v.forwardOnly});return Je!==null&&(We=window.moment(Je)),We}Zl(()=>{let{globalFilter:K,provideAccessKeys:We}=se();t(9,V=We);let Je=a.getDescriptionWithoutGlobalFilter();(Je!=a.description||Je.indexOf(K)==-1)&&(yt=!0);let Ke="none";a.priority==="4"?Ke="low":a.priority==="2"?Ke="medium":a.priority==="1"&&(Ke="high"),t(1,v={description:Je,status:a.status,priority:Ke,recurrenceRule:a.recurrence?a.recurrence.toText():"",createdDate:a.createdDate?a.createdDate.format("YYYY-MM-DD"):"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{D.focus()},10)});let y=K=>{if(K.key&&!K.altKey&&!K.ctrlKey){let We=P.find(Je=>Je.label.charAt(0).toLowerCase()==K.key);We&&t(1,v.priority=We.value,v)}},g=()=>{o([])},w=K=>{K.key==="Enter"&&(K.preventDefault(),W&&S())},E=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},S=()=>{let{globalFilter:K}=se(),We=v.description.trim();yt&&(We=K+" "+We);let Je=ue(v.startDate),Ke=ue(v.scheduledDate),Dr=ue(v.dueDate),Mt=null;v.recurrenceRule&&(Mt=Tt.fromText({recurrenceRuleText:v.recurrenceRule,startDate:Je,scheduledDate:Ke,dueDate:Dr}));let Ae;switch(v.priority){case"low":Ae="4";break;case"medium":Ae="2";break;case"high":Ae="1";break;default:Ae="3"}let st=new je(Object.assign(Object.assign({},a),{description:We,status:v.status,priority:Ae,recurrence:Mt,startDate:Je,scheduledDate:Ke,dueDate:Dr,doneDate:window.moment(v.doneDate,"YYYY-MM-DD").isValid()?window.moment(v.doneDate,"YYYY-MM-DD"):null}));o([st])},M=[[]];function k(){v.description=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function C(K){Fo[K?"unshift":"push"](()=>{D=K,t(10,D)})}function A(){v.priority=this.__value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function N(){v.recurrenceRule=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function j(){v.dueDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ke(){v.scheduledDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ye(){v.startDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ce(){v.forwardOnly=this.checked,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function Ie(){v.status=vy(this),t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}return r.$$set=K=>{"task"in K&&t(26,a=K.task),"onSubmit"in K&&t(27,o=K.onSubmit),"statusOptions"in K&&t(0,l=K.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=K=>V?K:null)}if(r.$$.dirty[0]&66){e:t(1,v.dueDate=di(v.dueDate),v),t(6,fe=Y("due",v.dueDate)),t(7,ve=!fe.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.startDate=di(v.startDate),v),t(2,q=Y("start",v.startDate)),t(3,$=!q.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.scheduledDate=di(v.scheduledDate),v),t(4,B=Y("scheduled",v.scheduledDate)),t(5,me=!B.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,te=!0),!v.recurrenceRule)t(12,ee="not recurring");else{let K=t(28,s=Tt.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();K?t(12,ee=K):(t(12,ee="invalid recurrence rule"),t(8,te=!1))}}if(r.$$.dirty[0]&2){e:t(29,R=v.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,W=ve&&te&&me&&$&&R)}if(r.$$.dirty[0]&2){e:t(11,I=Q("created",v.createdDate)),t(13,It=Q("done",v.doneDate))}},[l,v,q,$,B,me,fe,ve,te,V,D,I,ee,It,W,n,h,m,_,T,P,y,g,w,E,S,a,o,s,R,k,C,A,M,N,j,ke,ye,ce,Ie]}var $h=class extends Lo{constructor(e){super(),ky(this,e,zI,HI,gy,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},sv=$h;var Bn=class extends iv.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=a=>{a.length&&s(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new sv({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=$e.getInstance().registeredStatuses;return $e.getInstance().bySymbol(this.task.status.symbol)===he.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Ru=({line:r,path:e})=>{var v,R;let t=Kt.fromPath(e),n=je.fromLine({line:r,taskLocation:Pt.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=se(),a=null;s&&(a=window.moment());let o=r.match(ae.nonTaskRegex);if(o===null)return console.error("Tasks: Cannot create task on line:",r),new je({status:he.TODO,description:"",taskLocation:Pt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let l=o[1],c=(v=o[2])!=null?v:"-",h=(R=o[4])!=null?R:" ",m=$e.getInstance().bySymbolOrCreate(h),_=o[5],T=r.match(ae.blockLinkRegex),D=T!==null?T[0]:"";return D!==""&&(_=_.replace(ae.blockLinkRegex,"")),new je({status:m,description:_,taskLocation:Pt.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:D,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var av=(r,e,t,n)=>{var _;if(r)return t instanceof Bh.MarkdownView;if(!(t instanceof Bh.MarkdownView))return;let s=(_=t.file)==null?void 0:_.path;if(s===void 0)return;let o=e.getCursor().line,l=e.getLine(o),c=Ru({line:l,path:s}),h=T=>{let D=Kt.removeInferredStatusIfNeeded(c,T).map(v=>v.toFileLineString()).join(` +`);e.setLine(o,D)};new Bn({app:n,task:c,onSubmit:h}).open()};var Gh=require("obsidian");var ov=(r,e,t)=>{var c;if(r)return t instanceof Gh.MarkdownView;if(!(t instanceof Gh.MarkdownView))return;let n=(c=t.file)==null?void 0:c.path;if(n===void 0)return;let s=e.getCursor(),a=s.line,o=e.getLine(a),l=VI(o,n);e.setLine(a,l.text),e.setCursor(KI(s,l))},VI=(r,e)=>{let t=je.fromLine({line:r,taskLocation:Pt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggle().map(s=>s.toFileLineString());return{text:n.join(` +`),moveTo:{line:n.length-1}}}else{let n=r.match(ae.taskRegex);if(n!==null){let s=n[3],o=$e.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(ae.taskRegex,`$1- [${o}] $4`)}}else if(ae.listItemRegex.test(r)){let s=r.replace(ae.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(ae.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},KI=(r,e)=>{var a;let t={line:0,ch:r.ch},n=Qe(Qe({},t),(a=e.moveTo)!=null?a:{}),s=e.text.split(` +`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var xu=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,s)=>av(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:ov})}};var Pu=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Au=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var m;let{globalFilter:n}=se(),s=e.findAll(".task-list-item").filter(_=>{var v;let T=(v=_.textContent)==null?void 0:v.split(` +`);if(T===void 0)return!1;let D=null;for(let R=0;Ruv.ViewPlugin.fromClass(Hh),Hh=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let T=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. +If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(T),new lv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=je.fromLine({line:o.text,taskLocation:Pt.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${a} Line: ${o.text}`),l===null)return!1;e.preventDefault();let h=l.toggle().map(T=>T.toFileLineString()).join(s.lineBreak),m=s.update({changes:{from:o.from,to:o.to,insert:h}});this.view.dispatch(m);let _=t.checked;return setTimeout(()=>{t.checked=_},1),!0}};var al=require("obsidian");var gn=class{constructor(e,t,n){this.property=e,this.comparator=gn.maybeReverse(n,t)}static maybeReverse(e,t){return e?gn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var fi=class{constructor(e,t){this.property=e,this.grouper=t}};var ze=class{canCreateFilterForLine(e){return ze.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return No(this.fieldNameSingular())}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?ze.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ze.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new gn(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(){return new fi(this.fieldNameSingular(),this.grouper())}};var ot=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new ot("None of",e,"NOT")}static booleanXor(e){return new ot("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let s=0;s ${t.asString(" ")} -`}},fe=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new fe(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new fe(e);return n.error=t,n}};var oo=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new fe(e);return e===this._instruction?(t.filter=new Ze(e,this._filter,new be(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var jr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new oo(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let i=n.createFilterOrErrorMessage(e);if(i.error===void 0)return i}let t=new fe(e);return t.error=`do not understand filter: ${e}`,t}};var $r=class extends ce{constructor(){super(...arguments);this._filters=new jr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var vr=class extends $r{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=vr.oldStatusName(e),i=vr.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}};var G_=Xs(Ne()),Er=class{static parseDate(e,t=!1){return window.moment(G_.parseDate(e,void 0,{forwardDate:t})).startOf("day")}};var ct=class extends ce{constructor(){super();this.filterInstructions=new jr,this.filterInstructions.add(`has ${this.fieldName()} date`,t=>this.date(t)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,t=>this.date(t)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,t=>{let n=this.date(t);return n!==null&&!n.isValid()})}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new fe(t),s=ce.getMatch(this.filterRegExp(),t),a;if(s!==null){let o=Er.parseDate(s[2]);if(!o.isValid())i.error="do not understand "+this.fieldName()+" date";else{let u;s[1]==="before"?(a=c=>{let d=this.date(c);return d?d.isBefore(o):this.filterResultIfFieldMissing()},u=" "+s[1]):s[1]==="after"?(a=c=>{let d=this.date(c);return d?d.isAfter(o):this.filterResultIfFieldMissing()},u=" "+s[1]):(a=c=>{let d=this.date(c);return d?d.isSame(o):this.filterResultIfFieldMissing()},u=" on");let l=ct.getExplanationString(this.fieldName(),u,this.filterResultIfFieldMissing(),o);i.filter=new Ze(t,a,new be(l))}}else i.error="do not understand query filter ("+this.fieldName()+" date)";return i}static getExplanationString(t,n,i,s){let a=s.format("YYYY-MM-DD (dddd Do MMMM YYYY)"),o=`${t} date is${n} ${a}`;return i&&(o+=` OR no ${t} date`),o}supportsSorting(){return!0}comparator(){return(t,n)=>It(this.date(t),this.date(n))}};var Vd=class extends ct{filterRegExp(){return Vd.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},hn=Vd;hn.dueRegexp=/^due (before|after|on)? ?(.*)/;var Xd=class extends ce{createFilterOrErrorMessage(e){let t=new fe(e),n=ce.getMatch(this.filterRegExp(),e);if(n!==null){let i=n[5],s=null;switch(i){case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break}if(s===null)return t.error="do not understand priority",t;let a=e,o;switch(n[3]){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}t.filter=new Ze(e,o,new be(a))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Xd.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}},mn=Xd;mn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var ei=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var ti=class extends ei{constructor(t){super();this.stringToFind=t}matches(t){return ti.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var ri=class extends ei{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new ri(s)}else return null}matches(t){return t.match(this.regex)!==null}};var Qe=class extends ce{createFilterOrErrorMessage(e){let t=ce.getMatch(this.filterRegExp(),e);if(t===null)return fe.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new ti(s);else if(i.includes("regex")&&(a=ri.validateAndConstruct(s),a===null))return fe.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(a===null)return fe.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new Ze(e,this.getFilter(a,o),new be(e));return fe.fromFilter(u)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}};var ni=class extends Qe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}};var ii=class extends ce{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return fe.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}};var si=class{static by(e,t){let n=[new ii().comparator(),new vr().comparator(),new hn().comparator(),new mn().comparator(),new ni().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(si.makeCompositeComparator([...i,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}};var yn=class extends Qe{fieldName(){return"description"}value(e){let t=U().globalFilter;return e.description.replace(t,"").trim()}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=yn.cleanDescription(e.description),i=yn.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){let t=U().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)]]?/,i=e.match(n);if(i!==null){let s=i[1];e=s.substring(s.indexOf("|")+1)+e.replace(n,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Zd=class extends ct{filterRegExp(){return Zd.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},Ns=Zd;Ns.doneRegexp=/^done (before|after|on)? ?(.*)/;var uo=class extends $r{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var lo=class extends Qe{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}};var Qd=class extends ct{filterRegExp(){return Qd.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},Is=Qd;Is.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var Jd=class extends ct{filterRegExp(){return Jd.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},Fs=Jd;Fs.startRegexp=/^starts (before|after|on)? ?(.*)/;var ai=class extends ce{constructor(){super();this.filterInstructions=new jr,this.filterInstructions.add(ai.instructionForFieldPresence,t=>this.dates(t).some(n=>n!==null)),this.filterInstructions.add(ai.instructionForFieldAbsence,t=>!this.dates(t).some(n=>n!==null))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new fe(t),s=ce.getMatch(this.filterRegExp(),t);if(s!==null){let a=Er.parseDate(s[2]);if(!a.isValid())i.error="do not understand happens date";else{let o,u;s[1]==="before"?(o=c=>this.dates(c).some(d=>d&&d.isBefore(a)),u=" "+s[1]):s[1]==="after"?(o=c=>this.dates(c).some(d=>d&&d.isAfter(a)),u=" "+s[1]):(o=c=>this.dates(c).some(d=>d&&d.isSame(a)),u=" on");let l=ct.getExplanationString("due, start or scheduled",u,!1,a);i.filter=new Ze(t,o,new be(l))}}else i.error="do not understand query filter (happens date)";return i}earliestDate(t){return new ai().dates(t).sort(It)[0]}filterRegExp(){return ai.happensRegexp}dates(t){return Array.of(t.startDate,t.scheduledDate,t.dueDate)}fieldName(){return"happens"}supportsSorting(){return!0}comparator(){return(t,n)=>It(this.earliestDate(t),this.earliestDate(n))}},wr=ai;wr.happensRegexp=/^happens (before|after|on)? ?(.*)/,wr.instructionForFieldPresence="has happens date",wr.instructionForFieldAbsence="no happens date";var co=class extends $r{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var fo=class extends Qe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}};var gn=class extends fo{fieldNameSingular(){return"tag"}values(e){return e.tags}supportsSorting(){return!0}createSorterFromLine(e){let t=e.match(this.sorterRegExp());if(t===null)return null;let n=!!t[1],i=isNaN(+t[2])?1:+t[2],s=gn.makeCompareByTagComparator(i);return new br(this.fieldNameSingular(),s,n)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return gn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(e){return(t,n)=>{if(t.tags.length===0&&n.tags.length===0)return 0;if(t.tags.length===0)return 1;if(n.tags.length===0)return-1;let i=e-1;if(t.tags.length=e)return 1;if(n.tags.length=e)return-1;if(t.tags.lengththis.filterTaskWithParsedQuery(u,s),o=this.constructExplanation(s);return n.filter=new Ze(t,a,o),n}catch(s){let a=s instanceof Error?s.message:"unknown error type";return n.error=`malformed boolean query -- ${a} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(be.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(be.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(be.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(be.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i);return n[0]}};var _o=class extends Qe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}};var To=class extends Qe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Gr=class extends ce{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return ce.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ce.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,i,s]=t,a=Rt[s.toUpperCase()];if(!a)return this.helpMessage(e);let o;switch(i){case"is":o=u=>u.status.type===a;break;case"is not":o=u=>u.status.type!==a;break;default:return this.helpMessage(e)}return fe.fromFilter(new Ze(e,o,new be(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Rt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. +`}},Ve=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new Ve(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new Ve(e);return n.error=t,n}};var Nu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Ve(e);return e===this._instruction?(t.filter=new er(e,this._filter,new ot(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Hr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Nu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let s=n.createFilterOrErrorMessage(e);if(s.error===void 0)return s}let t=new Ve(e);return t.error=`do not understand filter: ${e}`,t}};var Gn=class extends ze{constructor(){super(...arguments);this._filters=new Hr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var _n=class extends Gn{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=_n.oldStatusName(e),s=_n.oldStatusName(t);return ns?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}};var Cu=ns(mt()),hi=ns(Fl()),ks=class{static parseDate(e,t=!1){return window.moment(Cu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e){let t=Cu.parse(e,void 0,{forwardDate:!0});if(t.length===0)return[hi.default.invalid(),hi.default.invalid()];let n=t[0].start,s=t[1]&&t[1].start?t[1].start:n,a=window.moment(n.date()),o=window.moment(s.date()),l=[a,o];o.isBefore(a)&&(l=[o,a]);let c=/(last|this|next) (week|month|quarter|year)/,h=e.match(c);if(h&&h.length===3){let m=h[1],_=hi.default.duration(),T=h[2];switch(T){case"month":case"quarter":case"year":case"week":_.add(1,T)}switch(l=[(0,hi.default)(),(0,hi.default)()],m){case"last":l.forEach(D=>D.subtract(_));break;case"next":l.forEach(D=>D.add(_));break}switch(T){case"month":case"quarter":case"year":l=[l[0].startOf(T),l[1].endOf(T)];break;case"week":l=[l[0].startOf("isoWeek"),l[1].endOf("isoWeek")];break}}return l.forEach(m=>m.startOf("day")),l}};var Wt=class extends ze{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Hr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let s=new Ve(t),a=ze.getMatch(this.filterRegExp(),t);if(a!==null){let o=a[1],l=a[2],c=ks.parseDateRange(l);if(!c[0].isValid()||!c[1].isValid())s.error="do not understand "+this.fieldName()+" date";else{let h=this.buildFilterFunction(o,c),m=Wt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),c);s.filter=new er(t,h,new ot(m))}}else s.error="do not understand query filter ("+this.fieldName()+" date)";return s}buildFilterFunction(t,n){let s;return t==="before"?s=a=>a?a.isBefore(n[0]):this.filterResultIfFieldMissing():t==="after"?s=a=>a?a.isAfter(n[1]):this.filterResultIfFieldMissing():s=a=>a?a.isSameOrAfter(n[0])&&a.isSameOrBefore(n[1]):this.filterResultIfFieldMissing(),this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (before|after|on|in)? ?(.*)`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,a){let o,l="YYYY-MM-DD (dddd Do MMMM YYYY)",c;switch(n){case"before":o=n,c=a[0].format(l);break;case"after":o=n,c=a[1].format(l);break;default:a[0].isSame(a[1])?(o="on",c=a[0].format(l)):(o="between",c=`${a[0].format(l)} and ${a[1].format(l)} inclusive`);break}let h=`${t} date is ${o} ${c}`;return s&&(h+=` OR no ${t} date`),h}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Ur(this.date(t),this.date(n))}};var pi=class extends Wt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var zh=class extends ze{createFilterOrErrorMessage(e){let t=new Ve(e),n=ze.getMatch(this.filterRegExp(),e);if(n!==null){let s=n[5],a=null;switch(s){case"low":a="4";break;case"none":a="3";break;case"medium":a="2";break;case"high":a="1";break}if(a===null)return t.error="do not understand priority",t;let o=e,l;switch(n[3]){case"above":l=c=>c.priority.localeCompare(a)<0;break;case"below":l=c=>c.priority.localeCompare(a)>0;break;case"not":l=c=>c.priority!==a;break;default:l=c=>c.priority===a,o=`${this.fieldName()} is ${s}`}t.filter=new er(e,l,new ot(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return zh.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}},Ds=zh;Ds.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var mi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var yi=class extends mi{constructor(t){super();this.stringToFind=t}matches(t){return yi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var gi=class extends mi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,s=t.match(n);if(s!==null){let a=new RegExp(s[1],s[2]);return new gi(a)}else return null}matches(t){return t.match(this.regex)!==null}};var qt=class extends ze{createFilterOrErrorMessage(e){let t=ze.getMatch(this.filterRegExp(),e);if(t===null)return Ve.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,s,a]=t,o=null;if(s.includes("include"))o=new yi(a);else if(s.includes("regex")&&(o=gi.validateAndConstruct(a),o===null))return Ve.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(o===null)return Ve.fromError(e,`do not understand query filter (${this.fieldName()})`);let l=s.match(/not/)!==null,c=new er(e,this.getFilter(o,l),new ot(e));return Ve.fromFilter(c)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}};var _i=class extends qt{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}};var Ti=class extends ze{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return Ve.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}};var bi=class{static by(e,t){let n=[new Ti().comparator(),new _n().comparator(),new pi().comparator(),new Ds().comparator(),new _i().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(bi.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let a=s(t,n);if(a!==0)return a}return 0}}};var Ss=class extends qt{fieldName(){return"description"}value(e){let t=se().globalFilter;return e.description.replace(t,"").trim()}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ss.cleanDescription(e.description),s=Ss.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){let t=se().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)]]?/,s=e.match(n);if(s!==null){let a=s[1];e=a.substring(a.indexOf("|")+1)+e.replace(n,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Iu=class extends Wt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Fu=class extends Wt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Lu=class extends Gn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var Yu=class extends qt{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}};var Uu=class extends Wt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Wu=class extends Wt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Hn=class extends Wt{constructor(){let e=new Hr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}earliestDate(e){return new Hn().dates(e).sort(Ur)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var qu=class extends Gn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var ju=class extends qt{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let s=e.matchesAnyOf(this.values(n));return t?!s:s}}};var Os=class extends ju{constructor(){super();this.filterInstructions=new Hr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let s=!!n[1],a=isNaN(+n[2])?1:+n[2],o=Os.makeCompareByTagComparator(a);return new gn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Os.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let a=t-1;if(n.tags.length=t)return 1;if(s.tags.length=t)return-1;if(n.tags.lengththis.filterTaskWithParsedQuery(c,a),l=this.constructExplanation(a);return n.filter=new er(t,o,l),n}catch(a){let o=a instanceof Error?a.message:"unknown error type";return n.error=`malformed boolean query -- ${o} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of n)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let h=this.subFields[l.value.trim()].filterFunction(t);o.push(a(h))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let c=s(o.pop());o.push(a(!c))}else if(l.value==="OR"){let c=s(o.pop()),h=s(o.pop());o.push(a(c||h))}else if(l.value==="AND"){let c=s(o.pop()),h=s(o.pop());o.push(a(c&&h))}else if(l.value==="XOR"){let c=s(o.pop()),h=s(o.pop());o.push(a(c&&!h||!c&&h))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let a=this.subFields[s.value.trim()];n.push(a.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let a=n.pop();n.push(ot.booleanNot([a]))}else if(s.value==="OR"){let a=n.pop(),o=n.pop();n.push(ot.booleanOr([o,a]))}else if(s.value==="AND"){let a=n.pop(),o=n.pop();n.push(ot.booleanAnd([o,a]))}else if(s.value==="XOR"){let a=n.pop(),o=n.pop();n.push(ot.booleanXor([o,a]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s);return n[0]}};var Vu=class extends qt{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}};var Ku=class extends qt{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Vn=class extends ze{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return ze.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ze.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,s,a]=t,o=gr[a.toUpperCase()];if(!o)return this.helpMessage(e);let l;switch(s){case"is":l=c=>c.status.type===o;break;case"is not":l=c=>c.status.type!==o;break;default:return this.helpMessage(e)}return Ve.fromFilter(new er(e,l,new ot(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(gr).filter(s=>s!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. Allowed options: 'is' and 'is not' (without quotes). Allowed values: ${t} Note: values are case-insensitive, so 'in_progress' works too, for example. - Example: ${this.fieldNameSingular()} is not NON_TASK`;return fe.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Gr.groupName(e),i=Gr.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Gr.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return t+" "+e.status.type}};var bo=class extends Qe{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}};var ff=[()=>new To,()=>new Gr,()=>new vr,()=>new co,()=>new mn,()=>new wr,()=>new Fs,()=>new Is,()=>new hn,()=>new Ns,()=>new ni,()=>new yn,()=>new gn,()=>new lo,()=>new uo,()=>new yo,()=>new _o,()=>new ii,()=>new bo];function go(r){for(let e of ff){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function sT(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of ff){let i=t().parseSortLine(r);if(i)return i}return null}function aT(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of ff){let n=t(),i=n.fieldNameSingular();if(r===`group by ${i}`&&n.supportsGrouping())return n.createGrouper()}return null}var vo=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Eo=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let i=0;it.set(o,a)),e.pop();return t}};var Oo=class extends Map{},Do=class extends wo{},Ro=class{constructor(e,t){this.groups=new Oo;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new Do(t),i=[n];for(let s of e){let a=[];for(let o of i)for(let u of o.values){let l=Mr.getGroupNamesForTask(s,u);for(let c of l){let d=o.children.get(c);d===void 0&&(d=new Do([]),o.children.set(c,d),a.push(d)),d.values.push(u)}}i=a}return n}getSortedGroups(){return new Oo([...this.groups.entries()].sort())}};var So=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` + Example: ${this.fieldNameSingular()} is not NON_TASK`;return Ve.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Vn.groupName(e),s=Vn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Vn.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return t+" "+e.status.type}};var Zu=class extends qt{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}};var ip=[()=>new Ku,()=>new Vn,()=>new _n,()=>new qu,()=>new Ds,()=>new Hn,()=>new Iu,()=>new Wu,()=>new Uu,()=>new pi,()=>new Fu,()=>new _i,()=>new Ss,()=>new Os,()=>new Yu,()=>new Lu,()=>new Hu,()=>new Vu,()=>new Ti,()=>new Zu];function zu(r){for(let e of ip){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function kv(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of ip){let s=t().parseSortLine(r);if(s)return s}return null}function Dv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of ip){let n=t(),s=n.fieldNameSingular();if(r===`group by ${s}`&&n.supportsGrouping())return n.createGrouper()}return null}var Xu=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Qu=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let s=0;st.set(l,o)),e.pop();return t}};var el=class extends Map{},tl=class extends Ju{},rl=class{constructor(e,t){this.groups=new el;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new tl(t),s=[n];for(let a of e){let o=[];for(let l of s)for(let c of l.values){let h=En.getGroupNamesForTask(a,c);for(let m of h){let _=l.children.get(m);_===void 0&&(_=new tl([]),l.children.set(m,_),o.push(_)),_.values.push(c)}}s=o}return n}getSortedGroups(){return new el([...this.groups.entries()].sort())}};var nl=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` `;return e}toString(){let e=` `;e+=`Group names: [${this.groups}] `;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} ${t.name} -`;return e+=this.tasksAsStringOfLines(),e}};var Mo=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new Ro(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=` +`;return e+=this.tasksAsStringOfLines(),e}};var sl=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new rl(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=` --- `;return e+=` ${this.totalTasksCount()} tasks -`,e}addTasks(e){let t=new Eo(e.groups);for(let[n,i]of e.groups){let s=t.getHeadingsForTaskGroup(n),a=new So(n,s,i);this.add(a)}}add(e){this._groups.push(e)}};var ne=class{static fromGroupingProperty(e){return new Jn(e,ne.grouperForProperty(e))}static by(e,t){return new Mo(e,t)}static getGroupNamesForTask(e,t){return e.grouper(t)}static grouperForProperty(e){return ne.groupers[e]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByStartDate(e){return[ne.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[ne.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[ne.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[ne.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new wr().earliestDate(e);return[ne.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(ne.groupDateFormat)}static groupByPath(e){return[ne.escapeMarkdownCharacters(e.path.replace(".md",""))]}static groupByFolder(e){let t=e.path,n=e.filename+".md",i=t.substring(0,t.lastIndexOf(n));return i===""?["/"]:[ne.escapeMarkdownCharacters(i)]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:["[["+ne.escapeMarkdownCharacters(t)+"]]"]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[ne.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=ne.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let i=ne.groupByHeading(e)[0];return n===i?[n]:[`${n} > ${i}`]}static groupByStatus(e){return e.status.symbol===" "?["Todo"]:["Done"]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},Mr=ne;Mr.groupDateFormat="YYYY-MM-DD dddd",Mr.groupers={backlink:ne.groupByBacklink,done:ne.groupByDoneDate,due:ne.groupByDueDate,filename:ne.groupByFileName,folder:ne.groupByFolder,happens:ne.groupByHappensDate,heading:ne.groupByHeading,path:ne.groupByPath,priority:ne.groupByPriority,recurrence:ne.groupByRecurrence,recurring:ne.groupByRecurring,root:ne.groupByRoot,scheduled:ne.groupByScheduledDate,start:ne.groupByStartDate,status:ne.groupByStatus,tags:ne.groupByTags};var fi=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Ei;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|done|due|filename|folder|happens|heading|path|priority|recurrence|recurring|root|scheduled|start|status|tags)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(` +`,e}addTasks(e){let t=new Qu(e.groups);for(let[n,s]of e.groups){let a=t.getHeadingsForTaskGroup(n),o=new nl(n,a,s);this.add(o)}}add(e){this._groups.push(e)}};var Me=class{static fromGroupingProperty(e){return new fi(e,Me.grouperForProperty(e))}static by(e,t){return new sl(e,t)}static getGroupNamesForTask(e,t){return e.grouper(t)}static grouperForProperty(e){return Me.groupers[e]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByCreatedDate(e){return[Me.stringFromDate(e.createdDate,"created")]}static groupByStartDate(e){return[Me.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[Me.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[Me.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[Me.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new Hn().earliestDate(e);return[Me.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(Me.groupDateFormat)}static groupByPath(e){return[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}static groupByFolder(e){let t=e.path,n=e.filename+".md",s=t.substring(0,t.lastIndexOf(n));return s===""?["/"]:[Me.escapeMarkdownCharacters(s)]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:["[["+Me.escapeMarkdownCharacters(t)+"]]"]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[Me.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=Me.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let s=Me.groupByHeading(e)[0];return n===s?[n]:[`${n} > ${s}`]}static groupByStatus(e){return e.status.symbol===" "?["Todo"]:["Done"]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},En=Me;En.groupDateFormat="YYYY-MM-DD dddd",En.groupers={backlink:Me.groupByBacklink,created:Me.groupByCreatedDate,done:Me.groupByDoneDate,due:Me.groupByDueDate,filename:Me.groupByFileName,folder:Me.groupByFolder,happens:Me.groupByHappensDate,heading:Me.groupByHeading,path:Me.groupByPath,priority:Me.groupByPriority,recurrence:Me.groupByRecurrence,recurring:Me.groupByRecurring,root:Me.groupByRoot,scheduled:Me.groupByScheduledDate,start:Me.groupByStartDate,status:Me.groupByStatus,tags:Me.groupByTags};var Si=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Yi;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|created|done|due|filename|folder|happens|heading|path|priority|recurrence|recurring|root|scheduled|start|status|tags)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(` `).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy2({line:t}):break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}explainQuery(){return`Explanation of this Tasks code block query: -`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="",{globalFilter:t}=U();t.length!==0&&(e+=`Only tasks containing the global filter '${t}'. +`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="",{globalFilter:t}=se();t.length!==0&&(e+=`Only tasks containing the global filter '${t}'. -`);let n=this.filters.length;if(n===0)e+="No filters supplied. All tasks will match the query.";else for(let i=0;i0&&(e+=` -`),e+=this.filters[i].explainFilterIndented("");return this._limit!==void 0&&(e+=` +`);let n=this.filters.length;if(n===0)e+="No filters supplied. All tasks will match the query.";else for(let a=0;a0&&(e+=` +`),e+=this.filters[a].explainFilterIndented("");this._limit!==void 0&&(e+=` At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`. -`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(n=>{e=e.filter(n.filterFunction)});let t=si.by(this.sorting,e).slice(0,this.limit);return Mr.by(this.grouping,t)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=go(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=sT(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push(Mr.fromGroupingProperty(t[1])):this._error="do not understand query grouping"}parseGroupBy2({line:e}){let t=aT(e);return t?(this._grouping.push(t),!0):!1}};var ko=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return N(this,null,function*(){n.addChild(new pf({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},pf=class extends Ao.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=new fi({source:s}),this.queryType="tasks";break;default:this.query=new fi({source:s}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new fi({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return N(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(s);let o=this.query.applyQueryToTasks(t);for(let l of o.groups){this.addGroupHeadings(s,l.groupHeadings);let{taskList:c}=yield this.createTasksList({tasks:l.tasks,content:s});s.appendChild(c)}let u=o.totalTasksCount();console.debug(`${u} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(s,u)}else this.query.error!==void 0?s.createDiv().innerHTML=`
Tasks query: ${this.query.error.replace(/\n/g,"
")}
`:s.setText("Loading Tasks ...");(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}createExplanation(t){let n=this.query.explainQuery(),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTasksList(i){return N(this,arguments,function*({tasks:t,content:n}){let s=t.length,a=n.createEl("ul");a.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let o=0;oh.remove());let f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideUrgency||this.addUrgency(c,u),this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,u,f,l),this.query.layoutOptions.hideEditButton||this.addEditButton(c,u),a.appendChild(c)}return{taskList:a,tasksCount:s}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{sa({originalTask:n,newTasks:st.removeInferredStatusIfNeeded(n,u)})};new Qn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return N(this,null,function*(){let i;n.nestingLevel===0?i=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?i=t.createEl("h5",{cls:"tasks-group-heading"}):i=t.createEl("h6",{cls:"tasks-group-heading"}),yield Ao.MarkdownRenderer.renderMarkdown(n.name,i,this.filePath,this)})}addBacklinks(t,n,i,s){var l;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");if(o.href=n.path,o.setAttribute("data-href",n.path),o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode"),n.precedingHeader!==null){let c=n.precedingHeader.replace(/#/g,"");o.href=o.href+"#"+c,o.setAttribute("data-href",o.getAttribute("data-href")+"#"+c)}let u;i?u=" \u{1F517}":u=(l=n.getLinkText({isFilenameUnique:s}))!=null?l:"",o.setText(u),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}};var he=require("obsidian");function oT(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function uT(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function lT(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function cT(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function dT(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function fT(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var pT=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Vt=require("obsidian");var vn=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=W.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return vn.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return vn.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Rt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new de,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var En=new vn,bt=class extends Vt.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new Fe(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return N(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new Vt.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,bt.setValid(l,En.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{bt.setValid(i,En.validateSymbol(this.statusConfiguration()))});let s;new Vt.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,bt.setValid(l,En.validateName(this.statusConfiguration()))})}).then(l=>{bt.setValid(s,En.validateName(this.statusConfiguration()))});let a;new Vt.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,bt.setValid(l,En.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{bt.setValid(a,En.validateNextSymbol(this.statusConfiguration()))}),new Vt.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{l.addOption(d,d)}),l.setValue(this.type).onChange(d=>{this.type=W.getTypeFromStatusTypeString(d)})}),W.tasksPluginCanCreateCommandsForStatuses()&&new Vt.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>N(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new Vt.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>N(this,null,function*(){let c=En.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` +`);let{debugSettings:s}=se();return s.ignoreSortInstructions&&(e+=` + +NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=se(),s=(t.ignoreSortInstructions?e:bi.by(this.sorting,e)).slice(0,this.limit);return En.by(this.grouping,s)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=zu(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=kv(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push(En.fromGroupingProperty(t[1])):this._error="do not understand query grouping"}parseGroupBy2({line:e}){let t=Dv(e);return t?(this._grouping.push(t),!0):!1}};var il=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return J(this,null,function*(){let s=new ap({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath});n.addChild(s),s.load(),s.onload()})}},ap=class extends al.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.events=n,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=new Si({source:a}),this.queryType="tasks";break;default:this.query=new Si({source:a}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Si({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return J(this,arguments,function*({tasks:t,state:n}){var o;let a=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(a);let l=this.query.applyQueryToTasks(t);for(let h of l.groups){this.addGroupHeadings(a,h.groupHeadings);let{taskList:m}=yield this.createTasksList({tasks:h.tasks,content:a});a.appendChild(m)}let c=l.totalTasksCount();console.debug(`${c} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(a,c)}else this.query.error!==void 0?a.createDiv().innerHTML=`
Tasks query: ${this.query.error.replace(/\n/g,"
")}
`:a.setText("Loading Tasks ...");(o=this.containerEl.firstChild)==null||o.replaceWith(a)})}createExplanation(t){let n=this.query.explainQuery(),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTasksList(s){return J(this,arguments,function*({tasks:t,content:n}){let a=t.length,o=n.createEl("ul");o.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let l=0;lD.remove());let T=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideUrgency||this.addUrgency(m,c),this.query.layoutOptions.hideBacklinks||this.addBacklinks(m,c,T,h),this.query.layoutOptions.hideEditButton||this.addEditButton(m,c),o.appendChild(m)}return{taskList:o,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Ao({originalTask:n,newTasks:Kt.removeInferredStatusIfNeeded(n,c)})};new Bn({app:this.app,task:n,onSubmit:o}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let s of n)this.addGroupHeading(t,s)}addGroupHeading(t,n){return J(this,null,function*(){let s;n.nestingLevel===0?s=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?s=t.createEl("h5",{cls:"tasks-group-heading"}):s=t.createEl("h6",{cls:"tasks-group-heading"}),yield al.MarkdownRenderer.renderMarkdown(n.name,s,this.filePath,this)})}addBacklinks(t,n,s,a){var h;let o=t.createSpan({cls:"tasks-backlink"});s||o.append(" (");let l=o.createEl("a");if(l.href=n.path,l.setAttribute("data-href",n.path),l.rel="noopener",l.target="_blank",l.addClass("internal-link"),s&&l.addClass("internal-link-short-mode"),n.precedingHeader!==null){let m=n.precedingHeader.replace(/#/g,"");l.href=l.href+"#"+m,l.setAttribute("data-href",l.getAttribute("data-href")+"#"+m)}let c;s?c=" \u{1F517}":c=(h=n.getLinkText({isFilenameUnique:a}))!=null?h:"",l.setText(c),s||o.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(o=>{if(o.basename===s)return!0}).length<2}};var Be=require("obsidian");function Sv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Ov(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Mv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Rv(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function xv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Pv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var Av=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Fr=require("obsidian");var Ps=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,s,a]=e,o=[];if(o.push(...this.validateType(a)),t===s&&a!=="NON_TASK"&&o.push(`Status symbol '${t}' toggles to itself`),o.length>0)return o;let l=he.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return Ps.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Ps.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=gr[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,s=new $e,a=n==="X"?"x":n,o=s.bySymbol(a);return o.type!=="EMPTY"&&(e.nextStatusSymbol!==o.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${o.nextStatusSymbol}'`),e.type!==o.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${o.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var As=new Ps,lr=class extends Fr.Modal{constructor(t,n,s){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=s}statusConfiguration(){return new bt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return J(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new Fr.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(h=>{s=h,h.setValue(this.statusSymbol).onChange(m=>{this.statusSymbol=m,lr.setValid(h,As.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(h=>{lr.setValid(s,As.validateSymbol(this.statusConfiguration()))});let a;new Fr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(h=>{a=h,h.setValue(this.statusName).onChange(m=>{this.statusName=m,lr.setValid(h,As.validateName(this.statusConfiguration()))})}).then(h=>{lr.setValid(a,As.validateName(this.statusConfiguration()))});let o;new Fr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(h=>{o=h,h.setValue(this.statusNextSymbol).onChange(m=>{this.statusNextSymbol=m,lr.setValid(h,As.validateNextSymbol(this.statusConfiguration()))})}).then(h=>{lr.setValid(o,As.validateNextSymbol(this.statusConfiguration()))}),new Fr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(h=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(_=>{h.addOption(_,_)}),h.setValue(this.type).onChange(_=>{this.type=he.getTypeFromStatusTypeString(_)})}),he.tasksPluginCanCreateCommandsForStatuses()&&new Fr.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(h=>{h.setValue(this.statusAvailableAsCommand).onChange(m=>J(this,null,function*(){this.statusAvailableAsCommand=m}))});let l=t.createDiv(),c=new Fr.Setting(l);c.addButton(h=>(h.setTooltip("Save").setIcon("checkmark").onClick(()=>J(this,null,function*(){let m=As.validate(this.statusConfiguration());if(m.length>0){let _=m.join(` `)+` -Fix errors before saving.`;new Vt.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?bt.removeValidationError(t):bt.setValidationError(t)}};var pi=class extends he.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return N(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Global filter Settings"}),new he.Setting(t).setName("Global task filter").setDesc(pi.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(i=>{let s=U();i.setPlaceholder("e.g. #task or TODO").setValue(s.globalFilter).onChange(a=>N(this,null,function*(){it({globalFilter:a}),yield this.plugin.saveSettings()}))}),new he.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=U();i.setValue(s.removeGlobalFilter).onChange(a=>N(this,null,function*(){it({removeGlobalFilter:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=U();pT.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new he.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done").addToggle(i=>{let s=U();i.setValue(s.setDoneDate).onChange(a=>N(this,null,function*(){it({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new he.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(pi.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(i=>{let s=U();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>N(this,null,function*(){it({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new he.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>N(this,null,function*(){let s=U();yield this.plugin.saveSettings(),i.setValue(pi.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>N(this,null,function*(){let o=pi.parseCommaSeparatedFolders(a);it({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new he.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(i=>{let s=U();i.setValue(s.autoSuggestInEditor).onChange(a=>N(this,null,function*(){it({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new he.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=U();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>N(this,null,function*(){it({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new he.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=U();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>N(this,null,function*(){it({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new he.Setting(t).setName("Provide access keys in dialogs").setDesc("If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.").addToggle(i=>{let s=U();i.setValue(s.provideAccessKeys).onChange(a=>N(this,null,function*(){it({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:Re({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,it({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new he.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Wp(o.featureFlag))&&(o.type==="checkbox"?new he.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=U();l.generalSettings[o.settingName]||Xr(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>N(this,null,function*(){Xr(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new he.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=U();l.generalSettings[o.settingName]||Xr(o.settingName,o.initialValue);let c=d=>N(this,null,function*(){Xr(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,he.debounce)(c,500,!0))}):o.type==="textarea"?new he.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=U();l.generalSettings[o.settingName]||Xr(o.settingName,o.initialValue);let c=d=>N(this,null,function*(){Xr(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,he.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=U();i.coreStatuses.forEach(s=>{hT(t,s,i.coreStatuses,i,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=U();i.customStatuses.forEach(l=>{hT(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new he.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>N(this,null,function*(){xe.addStatus(i.customStatuses,new Fe("","","",!1,"TODO")),yield hi(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",oT()],["Ebullientworks Theme",lT()],["ITS Theme & SlRvb Checkboxes",cT()],["Minimal Theme",dT()],["Things Theme",fT()],["Aura Theme (Dark mode only)",uT()]];for(let[l,c]of a)new he.Setting(t).addButton(f=>{let h=`${l}: Add ${c.length} supported Statuses`;f.setButtonText(h).onClick(()=>N(this,null,function*(){yield iA(c,i,n)}))}).infoEl.remove();new he.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>N(this,null,function*(){let d=this.plugin.getTasks().map(h=>h.status),f=de.getInstance().findUnknownStatuses(d);f.length!==0&&(f.forEach(h=>{xe.addStatus(i.customStatuses,h)}),yield hi(i,n))}))}).infoEl.remove(),new he.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>N(this,null,function*(){xe.resetAllCustomStatuses(i),yield hi(i,n)}))}).infoEl.remove()}},Ws=pi;Ws.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function hT(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new W(e).previewText();let u=new he.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>N(this,null,function*(){xe.deleteStatus(t,e)&&(yield hi(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>N(this,null,function*(){let c=new bt(s,e,a);c.onClose=()=>N(this,null,function*(){c.saved&&xe.replaceStatus(t,e,c.statusConfiguration())&&(yield hi(n,i))}),c.open()}))}),u.infoEl.remove()}function iA(r,e,t){return N(this,null,function*(){xe.bulkAddStatusCollection(e,r).forEach(i=>{new he.Notice(i)}),yield hi(e,t)})}function hi(r,e){return N(this,null,function*(){it({statusSettings:r}),xe.applyToStatusRegistry(r,de.getInstance()),yield e.saveSettings(!0)})}var yT=require("obsidian");var sA=`${Ut}${Lt}${qt}`;function mT(r,e,t){let n=[];n=n.concat(uA(r,e,t)),n=n.concat(lA(r,e,t));let i=oA(r,t),s=hf(r,/([a-zA-Z'_-]*)/g,e),a=!1;if(s&&s.length>0){let o=s[0];if(o.length>=Math.max(1,t.autoSuggestMinMatch)){let u=i.filter(l=>l.displayText.toLowerCase().includes(o.toLowerCase()));for(let l of u)n.push({suggestionType:"match",displayText:l.displayText,appendText:l.appendText,insertAt:s.index,insertSkip:o.length}),a=!0}}return!a&&t.autoSuggestMinMatch===0&&(n=n.concat(i)),n.length>0&&!n.some(o=>o.suggestionType==="match")&&n.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`}),n=n.slice(0,t.autoSuggestMaxItems),n}function aA(r){if(Object.values(Ce).some(e=>e.length>0&&r.includes(e)))return!0}function oA(r,e){let t=[];return r.includes(qt)||t.push({displayText:`${qt} due date`,appendText:`${qt} `}),r.includes(Ut)||t.push({displayText:`${Ut} start date`,appendText:`${Ut} `}),r.includes(Lt)||t.push({displayText:`${Lt} scheduled date`,appendText:`${Lt} `}),aA(r)||(t.push({displayText:`${Ce.High} high priority`,appendText:`${Ce.High} `}),t.push({displayText:`${Ce.Medium} medium priority`,appendText:`${Ce.Medium} `}),t.push({displayText:`${Ce.Low} low priority`,appendText:`${Ce.Low} `})),r.includes(Ft)||t.push({displayText:`${Ft} recurring (repeat)`,appendText:`${Ft} `}),t}function uA(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`([${sA}])\\s*([0-9a-zA-Z ]*)`,"ug"),a=hf(r,s,e);if(a&&a.length>=2){let o=a[1],u=a[2];if(u.length1?Er.parseDate(Zn(u),!0):null;l&&l.isValid()&&i.push({displayText:`${l.format(S.dateFormat)}`,appendText:`${o} ${l.format(S.dateFormat)} `,insertAt:a.index,insertSkip:a[0].length});let c=1,d=5,f=n.filter(h=>u&&u.length>=c&&h.toLowerCase().includes(u.toLowerCase())).slice(0,d);f.length===0&&(f=n.slice(0,d));for(let h of f){let m=`${Er.parseDate(h,!0).format(S.dateFormat)}`;i.push({suggestionType:"match",displayText:`${h} (${m})`,appendText:`${o} ${m} `,insertAt:a.index,insertSkip:a[0].length})}}return i}function lA(r,e,t){var o;let n=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],s=new RegExp(`(${Ft})\\s*([0-9a-zA-Z ]*)`,"ug"),a=hf(r,s,e);if(a&&a.length>=2){let u=a[1],l=a[2];if(l.length0){let h=(o=Ie.fromText({recurrenceRuleText:l,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:o.toText();if(h){let y=`${u} ${h} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${h}`,appendText:y,insertAt:a.index,insertSkip:a[0].length}),a[0]==y)return[]}}let c=1,d=t.autoSuggestMaxItems/2,f=n.filter(h=>l&&l.length>=c&&h.toLowerCase().includes(l.toLowerCase())).slice(0,d);f.length===0&&l.trim().length===0&&(f=n.slice(0,d));for(let h of f)i.push({suggestionType:"match",displayText:`${h}`,appendText:`${u} ${h} `,insertAt:a.index,insertSkip:a[0].length})}return i}function hf(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i;return[]}var Po=class extends yT.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return s.contains(this.settings.globalFilter)&&s.match(S.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){let n=t.query,i=t.editor.getCursor(),s=mT(n,i.ch,this.settings),a=[];for(let o of s)a.push(wt(Re({},o),{context:t}));return a}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(d);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var xo=class extends gT.Plugin{onload(){return N(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new Ws({plugin:this})),jp({metadataCache:this.app.metadataCache,vault:this.app.vault}),yield this.loadTaskStatuses();let t=new so({obsidianEvents:this.app.workspace});this.cache=new Zr({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new ao({plugin:this}),this.queryRenderer=new ko({plugin:this,events:t}),this.registerEditorExtension(B_()),this.registerEditorSuggest(new Po(this.app,U())),new io({plugin:this})})}loadTaskStatuses(){return N(this,null,function*(){let{statusSettings:t}=U();xe.applyToStatusRegistry(t,de.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return N(this,null,function*(){let t=yield this.loadData();it(t),yield this.loadTaskStatuses()})}saveSettings(){return N(this,null,function*(){yield this.saveData(U())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; +Fix errors before saving.`;new Fr.Notice(_);return}this.saved=!0,this.close()})),h)),c.addExtraButton(h=>(h.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),h))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?lr.removeValidationError(t):lr.setValidationError(t)}};var Oi=class extends Be.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return J(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Global filter Settings"}),new Be.Setting(t).setName("Global task filter").setDesc(Oi.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(s=>{let a=se();s.setPlaceholder("e.g. #task or TODO").setValue(a.globalFilter).onChange(o=>J(this,null,function*(){Gt({globalFilter:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(s=>{let a=se();s.setValue(a.removeGlobalFilter).onChange(o=>J(this,null,function*(){Gt({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=se();Av.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new Be.Setting(t).setName("Set created date on every added task").setDesc("Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.").addToggle(s=>{let a=se();s.setValue(a.setCreatedDate).onChange(o=>J(this,null,function*(){Gt({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.").addToggle(s=>{let a=se();s.setValue(a.setDoneDate).onChange(o=>J(this,null,function*(){Gt({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Oi.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(s=>{let a=se();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>J(this,null,function*(){Gt({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(s=>J(this,null,function*(){let a=se();yield this.plugin.saveSettings(),s.setValue(Oi.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>J(this,null,function*(){let l=Oi.parseCommaSeparatedFolders(o);Gt({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Be.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(s=>{let a=se();s.setValue(a.autoSuggestInEditor).onChange(o=>J(this,null,function*(){Gt({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(s=>{let a=se();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>J(this,null,function*(){Gt({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(s=>{let a=se();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>J(this,null,function*(){Gt({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Be.Setting(t).setName("Provide access keys in dialogs").setDesc("If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.").addToggle(s=>{let a=se();s.setValue(a.provideAccessKeys).onChange(o=>J(this,null,function*(){Gt({provideAccessKeys:o}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let a=t.createEl("details",{cls:"tasks-nested-settings",attr:Qe({},n.open||s[n.text]?{open:!0}:{})});a.empty(),a.ontoggle=()=>{s[n.text]=a.open,Gt({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new Be.Setting(o).setHeading().setName(n.text),o.createDiv("collapser").createDiv("handle"),n.notice!==null){let l=a.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&l.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(l=>{if(!(l.featureFlag!==""&&!ty(l.featureFlag))&&(l.type==="checkbox"?new Be.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let h=se();h.generalSettings[l.settingName]||os(l.settingName,l.initialValue),c.setValue(h.generalSettings[l.settingName]).onChange(m=>J(this,null,function*(){os(l.settingName,m),yield this.plugin.saveSettings()}))}):l.type==="text"?new Be.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let h=se();h.generalSettings[l.settingName]||os(l.settingName,l.initialValue);let m=_=>J(this,null,function*(){os(l.settingName,_),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(h.generalSettings[l.settingName].toString()).onChange((0,Be.debounce)(m,500,!0))}):l.type==="textarea"?new Be.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let h=se();h.generalSettings[l.settingName]||os(l.settingName,l.initialValue);let m=_=>J(this,null,function*(){os(l.settingName,_),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(h.generalSettings[l.settingName].toString()).onChange((0,Be.debounce)(m,500,!0)),c.inputEl.rows=8,c.inputEl.cols=40}):l.type==="function"&&this.customFunctions[l.settingName](a,this),l.notice!==null)){let c=a.createEl("p",{cls:l.notice.class,text:l.notice.text});l.notice.html!==null&&c.insertAdjacentHTML("beforeend",l.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:s}=se();s.coreStatuses.forEach(a=>{Nv(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=se();s.customStatuses.forEach(h=>{Nv(t,h,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new Be.Setting(t).addButton(h=>{h.setButtonText("Add New Task Status").setCta().onClick(()=>J(this,null,function*(){pt.addStatus(s.customStatuses,new bt("","","",!1,"TODO")),yield Mi(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Sv()],["Ebullientworks Theme",Mv()],["ITS Theme & SlRvb Checkboxes",Rv()],["Minimal Theme",xv()],["Things Theme",Pv()],["Aura Theme (Dark mode only)",Ov()]];for(let[h,m]of o)new Be.Setting(t).addButton(T=>{let D=`${h}: Add ${m.length} supported Statuses`;T.setButtonText(D).onClick(()=>J(this,null,function*(){yield oF(m,s,n)}))}).infoEl.remove();new Be.Setting(t).addButton(h=>{h.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>J(this,null,function*(){let _=this.plugin.getTasks().map(D=>D.status),T=$e.getInstance().findUnknownStatuses(_);T.length!==0&&(T.forEach(D=>{pt.addStatus(s.customStatuses,D)}),yield Mi(s,n))}))}).infoEl.remove(),new Be.Setting(t).addButton(h=>{h.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>J(this,null,function*(){pt.resetAllCustomStatuses(s),yield Mi(s,n)}))}).infoEl.remove()}},no=Oi;no.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Nv(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new he(e).previewText();let c=new Be.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(h=>{h.setIcon("cross").setTooltip("Delete").onClick(()=>J(this,null,function*(){pt.deleteStatus(t,e)&&(yield Mi(n,s))}))}),c.addExtraButton(h=>{h.setIcon("pencil").setTooltip("Edit").onClick(()=>J(this,null,function*(){let m=new lr(a,e,o);m.onClose=()=>J(this,null,function*(){m.saved&&pt.replaceStatus(t,e,m.statusConfiguration())&&(yield Mi(n,s))}),m.open()}))}),c.infoEl.remove()}function oF(r,e,t){return J(this,null,function*(){pt.bulkAddStatusCollection(e,r).forEach(s=>{new Be.Notice(s)}),yield Mi(e,t)})}function Mi(r,e){return J(this,null,function*(){Gt({statusSettings:r}),pt.applyToStatusRegistry(r,$e.getInstance()),yield e.saveSettings(!0)})}var Iv=require("obsidian");var{symbols:tt}=Fn.tasksPluginEmoji.taskSerializer,uF=`${tt.startDateSymbol}${tt.scheduledDateSymbol}${tt.dueDateSymbol}`;function Cv(r,e,t){let n=[];n=n.concat(dF(r,e,t)),n=n.concat(fF(r,e,t));let s=cF(r,t),a=op(r,/([a-zA-Z'_-]*)/g,e),o=!1;if(a&&a.length>0){let l=a[0];if(l.length>=Math.max(1,t.autoSuggestMinMatch)){let c=s.filter(h=>h.displayText.toLowerCase().includes(l.toLowerCase()));for(let h of c)n.push({suggestionType:"match",displayText:h.displayText,appendText:h.appendText,insertAt:a.index,insertSkip:l.length}),o=!0}}return!o&&t.autoSuggestMinMatch===0&&(n=n.concat(s)),n.length>0&&!n.some(l=>l.suggestionType==="match")&&n.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`}),n=n.slice(0,t.autoSuggestMaxItems),n}function lF(r){if(Object.values(tt.prioritySymbols).some(e=>e.length>0&&r.includes(e)))return!0}function cF(r,e){let t=[];return r.includes(tt.dueDateSymbol)||t.push({displayText:`${tt.dueDateSymbol} due date`,appendText:`${tt.dueDateSymbol} `}),r.includes(tt.startDateSymbol)||t.push({displayText:`${tt.startDateSymbol} start date`,appendText:`${tt.startDateSymbol} `}),r.includes(tt.scheduledDateSymbol)||t.push({displayText:`${tt.scheduledDateSymbol} scheduled date`,appendText:`${tt.scheduledDateSymbol} `}),lF(r)||(t.push({displayText:`${tt.prioritySymbols.High} high priority`,appendText:`${tt.prioritySymbols.High} `}),t.push({displayText:`${tt.prioritySymbols.Medium} medium priority`,appendText:`${tt.prioritySymbols.Medium} `}),t.push({displayText:`${tt.prioritySymbols.Low} low priority`,appendText:`${tt.prioritySymbols.Low} `})),r.includes(tt.recurrenceSymbol)||t.push({displayText:`${tt.recurrenceSymbol} recurring (repeat)`,appendText:`${tt.recurrenceSymbol} `}),t}function dF(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],s=[],a=new RegExp(`([${uF}])\\s*([0-9a-zA-Z ]*)`,"ug"),o=op(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length1?ks.parseDate(di(c),!0):null;h&&h.isValid()&&s.push({displayText:`${h.format(ae.dateFormat)}`,appendText:`${l} ${h.format(ae.dateFormat)} `,insertAt:o.index,insertSkip:o[0].length});let m=1,_=5,T=n.filter(D=>c&&c.length>=m&&D.toLowerCase().includes(c.toLowerCase())).slice(0,_);T.length===0&&(T=n.slice(0,_));for(let D of T){let R=`${ks.parseDate(D,!0).format(ae.dateFormat)}`;s.push({suggestionType:"match",displayText:`${D} (${R})`,appendText:`${l} ${R} `,insertAt:o.index,insertSkip:o[0].length})}}return s}function fF(r,e,t){var l;let n=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],s=[],a=new RegExp(`(${tt.recurrenceSymbol})\\s*([0-9a-zA-Z ]*)`,"ug"),o=op(r,a,e);if(o&&o.length>=2){let c=o[1],h=o[2];if(h.length0){let D=(l=Tt.fromText({recurrenceRuleText:h,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:l.toText();if(D){let v=`${c} ${D} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${D}`,appendText:v,insertAt:o.index,insertSkip:o[0].length}),o[0]==v)return[]}}let m=1,_=t.autoSuggestMaxItems/2,T=n.filter(D=>h&&h.length>=m&&D.toLowerCase().includes(h.toLowerCase())).slice(0,_);T.length===0&&h.trim().length===0&&(T=n.slice(0,_));for(let D of T)s.push({suggestionType:"match",displayText:`${D}`,appendText:`${c} ${D} `,insertAt:o.index,insertSkip:o[0].length})}return s}function op(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s;return[]}var ol=class extends Iv.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let a=n.getLine(t.line);return a.contains(this.settings.globalFilter)&&a.match(ae.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:a.length},query:a}:null}getSuggestions(t){let n=t.query,s=t.editor.getCursor(),a=Cv(n,s.ch,this.settings),o=[];for(let l of a)o.push(tr(Qe({},l),{context:t}));return o}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,h,m;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let _=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(h=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||h.dispatchEvent(_);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(m=t.insertAt)!=null?m:a.ch},l=t.insertSkip?{line:a.line,ch:o.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,o,l),t.context.editor.setCursor({line:a.line,ch:o.ch+t.appendText.length})}};var Fv=(r,e)=>{let t,n=new Promise((o,l)=>{t=o});return e(r,o=>{let l=o.map(c=>c.toFileLineString()).join(` +`);t(l)}).open(),n};var Lv=(r,e)=>{let t=Ru({line:"",path:""});return new Bn({app:r,task:t,onSubmit:e})};var Yv=r=>({createTaskLineModal:()=>Fv(r,Lv)});var ul=class extends Uv.Plugin{get apiV1(){return Yv(app)}onload(){return J(this,null,function*(){Po.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new no({plugin:this})),oy({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Pu({obsidianEvents:this.app.workspace});this.cache=new us({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Au({plugin:this}),this.queryRenderer=new il({plugin:this,events:t}),this.registerEditorExtension(cv()),this.registerEditorSuggest(new ol(this.app,se())),new xu({plugin:this})})}loadTaskStatuses(){return J(this,null,function*(){let{statusSettings:t}=se();pt.applyToStatusRegistry(t,$e.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();Gt(t),yield this.loadTaskStatuses()})}saveSettings(){return J(this,null,function*(){yield this.saveData(se())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; +/*! + * EventEmitter2 + * https://github.com/hij1nx/EventEmitter2 + * + * Copyright (c) 2013 hij1nx + * Licensed under the MIT license. + */ +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! moment.js +//! momentjs.com +//! version : 2.29.4 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 459d00a2..d3859d3f 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "1.25.0", + "version": "2.0.0", "minAppVersion": "0.14.6", "description": "Task management for Obsidian", "author": "Martin Schenck and Clare Macrae", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/styles.css b/.obsidian/plugins/obsidian-tasks-plugin/styles.css index 4aea775e..bbd07c66 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/styles.css +++ b/.obsidian/plugins/obsidian-tasks-plugin/styles.css @@ -18,6 +18,29 @@ padding-left: 20px; } +/* Tooltip pop up above the description in short mode */ +.tooltip.pop-up { + animation: pop-up-animation 200ms forwards ease-in-out; +} +@keyframes pop-up-animation { + 0% { + opacity: 0; + transform: translateY(-100%) scale(1); + } + 20% { + opacity: 0.7; + transform: translateY(-100%) scale(1.02); + } + 40% { + opacity: 1; + transform: translateY(-100%) scale(1.05); + } + 100% { + opacity: 1; + transform: translateY(-100%) scale(1); + } +} + /* Pencil icon. */ .tasks-edit { background-color: var(--text-faint); @@ -103,6 +126,12 @@ width: 100%; } +.tasks-modal textarea { + width: 100%; + min-height: calc(var(--input-height) * 2); + resize: vertical; +} + .tasks-modal-priorities { display: grid; grid-template-columns: 4em 5em 5em 7em 5em; diff --git a/.obsidian/plugins/quickadd/data.json b/.obsidian/plugins/quickadd/data.json index 9f4c2981..ba546ca2 100644 --- a/.obsidian/plugins/quickadd/data.json +++ b/.obsidian/plugins/quickadd/data.json @@ -48,7 +48,7 @@ "devMode": false, "templateFolderPath": "00.01 Admin/Templates", "announceUpdates": true, - "version": "0.15.0", + "version": "0.16.0", "migrations": { "migrateToMacroIDFromEmbeddedMacro": true, "useQuickAddTemplateFolder": true, diff --git a/.obsidian/plugins/quickadd/main.js b/.obsidian/plugins/quickadd/main.js index f8c1e1f1..877bfe4a 100644 --- a/.obsidian/plugins/quickadd/main.js +++ b/.obsidian/plugins/quickadd/main.js @@ -11423,7 +11423,7 @@ var InputPrompt = class { // src/gui/InputSuggester/inputSuggester.ts var import_obsidian19 = require("obsidian"); var InputSuggester = class extends import_obsidian19.FuzzySuggestModal { - constructor(app2, displayItems, items) { + constructor(app2, displayItems, items, options = {}) { super(app2); this.displayItems = displayItems; this.items = items; @@ -11439,10 +11439,21 @@ var InputSuggester = class extends import_obsidian19.FuzzySuggestModal { const { value } = this.inputEl; this.inputEl.value = values[selectedItem].item ?? value; }); + if (options.placeholder) + this.setPlaceholder(options.placeholder); + if (options.limit) + this.limit = options.limit; + if (options.emptyStateText) + this.emptyStateText = options.emptyStateText; this.open(); } - static Suggest(app2, displayItems, items) { - const newSuggester = new InputSuggester(app2, displayItems, items); + static Suggest(app2, displayItems, items, options = {}) { + const newSuggester = new InputSuggester( + app2, + displayItems, + items, + options + ); return newSuggester.promise; } getItemText(item) { @@ -11559,7 +11570,10 @@ var CompleteFormatter = class extends Formatter { return await InputSuggester.Suggest( this.app, suggestedValuesArr, - suggestedValuesArr + suggestedValuesArr, + { + placeholder: `Enter value for ${variableName}` + } ); } async getMacroValue(macroName) { diff --git a/.obsidian/plugins/quickadd/manifest.json b/.obsidian/plugins/quickadd/manifest.json index ae24ff51..a31ec9bb 100644 --- a/.obsidian/plugins/quickadd/manifest.json +++ b/.obsidian/plugins/quickadd/manifest.json @@ -1,7 +1,7 @@ { "id": "quickadd", "name": "QuickAdd", - "version": "0.15.0", + "version": "0.16.0", "minAppVersion": "0.13.19", "description": "Quickly add new pages or content to your vault.", "author": "Christian B. B. Houmann", diff --git a/.obsidian/plugins/recent-files-obsidian/data.json b/.obsidian/plugins/recent-files-obsidian/data.json index d0ff671f..d30307c7 100644 --- a/.obsidian/plugins/recent-files-obsidian/data.json +++ b/.obsidian/plugins/recent-files-obsidian/data.json @@ -5,13 +5,93 @@ "path": "01.02 Home/@Main Dashboard.md" }, { - "basename": "Brown Butter Farro with Mushrooms & Burrata", - "path": "03.03 Food & Wine/Brown Butter Farro with Mushrooms & Burrata.md" + "basename": "2023-03-25", + "path": "00.01 Admin/Calendars/2023-03-25.md" + }, + { + "basename": "2023-03-26", + "path": "00.01 Admin/Calendars/2023-03-26.md" + }, + { + "basename": "@@Travels", + "path": "03.02 Travels/@@Travels.md" + }, + { + "basename": "Arles", + "path": "03.02 Travels/Arles.md" + }, + { + "basename": "Avignon", + "path": "03.02 Travels/Avignon.md" + }, + { + "basename": "Geneva", + "path": "03.02 Travels/Geneva.md" + }, + { + "basename": "Florence", + "path": "03.02 Travels/Florence.md" + }, + { + "basename": "Milan", + "path": "03.02 Travels/Milan.md" + }, + { + "basename": "Palermo", + "path": "03.02 Travels/Palermo.md" + }, + { + "basename": "2023-02-03", + "path": "00.01 Admin/Calendars/2023-02-03.md" + }, + { + "basename": "2023-02-03 Paris", + "path": "00.01 Admin/Calendars/Events/2023-02-03 Paris.md" + }, + { + "basename": "2023-03-26 Mallorca", + "path": "00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md" + }, + { + "basename": "Narro", + "path": "02.02 Paris/Narro.md" + }, + { + "basename": "Mel Brooks Isn’t Done Punching Up the History of the World", + "path": "00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md" + }, + { + "basename": "2023-03-24", + "path": "00.01 Admin/Calendars/2023-03-24.md" }, { "basename": "2023-03-23", "path": "00.01 Admin/Calendars/2023-03-23.md" }, + { + "basename": "An Icelandic Town Goes All Out to Save Baby Puffins", + "path": "00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md" + }, + { + "basename": "How an FBI agent stained an NCAA basketball corruption probe", + "path": "00.03 News/How an FBI agent stained an NCAA basketball corruption probe.md" + }, + { + "basename": "Last Stand of the Hot Dog King", + "path": "00.03 News/Last Stand of the Hot Dog King.md" + }, + { + "basename": "The Limits and Wonders of John Wick’s Last Fight", + "path": "00.03 News/The Limits and Wonders of John Wick’s Last Fight.md" + }, + { + "basename": "2023-12-27 Miami", + "path": "00.01 Admin/Calendars/Events/2023-12-27 Miami.md" + }, + { + "basename": "Brown Butter Farro with Mushrooms & Burrata", + "path": "03.03 Food & Wine/Brown Butter Farro with Mushrooms & Burrata.md" + }, { "basename": "The Silicon Valley Bank Contagion Is Just Beginning", "path": "00.03 News/The Silicon Valley Bank Contagion Is Just Beginning.md" @@ -119,86 +199,6 @@ { "basename": "The Brilliant Inventor Who Made Two of History’s Biggest Mistakes", "path": "00.03 News/The Brilliant Inventor Who Made Two of History’s Biggest Mistakes.md" - }, - { - "basename": "@News", - "path": "00.03 News/@News.md" - }, - { - "basename": "How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times", - "path": "00.03 News/How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times.md" - }, - { - "basename": "Server VPN", - "path": "05.02 Networks/Server VPN.md" - }, - { - "basename": "Revue Chapitre Papa", - "path": "01.05 Done/Revue Chapitre Papa.md" - }, - { - "basename": "2023-03-19", - "path": "00.01 Admin/Calendars/2023-03-19.md" - }, - { - "basename": "Korean Barbecue-Style Meatballs", - "path": "03.03 Food & Wine/Korean Barbecue-Style Meatballs.md" - }, - { - "basename": "2023-03-18", - "path": "00.01 Admin/Calendars/2023-03-18.md" - }, - { - "basename": "League Tables", - "path": "01.02 Home/League Tables.md" - }, - { - "basename": "Adlisberg", - "path": "02.03 Zürich/Adlisberg.md" - }, - { - "basename": "Is Fox News Really Doomed", - "path": "00.03 News/Is Fox News Really Doomed.md" - }, - { - "basename": "2023-03-18 France - Wales", - "path": "00.01 Admin/Calendars/Events/2023-03-18 France - Wales.md" - }, - { - "basename": "@Commerces Paris", - "path": "02.02 Paris/@Commerces Paris.md" - }, - { - "basename": "Épicerie Rap", - "path": "02.02 Paris/Épicerie Rap.md" - }, - { - "basename": "Boulangerie Sain", - "path": "02.02 Paris/Boulangerie Sain.md" - }, - { - "basename": "2023-03-11 England - France", - "path": "00.01 Admin/Calendars/Events/2023-03-11 England - France.md" - }, - { - "basename": "Striking French workers dispute that they want a right to ‘laziness’", - "path": "00.03 News/Striking French workers dispute that they want a right to ‘laziness’.md" - }, - { - "basename": "2023-03-14", - "path": "00.01 Admin/Calendars/2023-03-14.md" - }, - { - "basename": "2023-03-15", - "path": "00.01 Admin/Calendars/2023-03-15.md" - }, - { - "basename": "2023-03-16", - "path": "00.01 Admin/Calendars/2023-03-16.md" - }, - { - "basename": "2023-03-17", - "path": "00.01 Admin/Calendars/2023-03-17.md" } ], "omittedPaths": [], diff --git a/.obsidian/workspace-mobile.json b/.obsidian/workspace-mobile.json index 7bcb4446..a230a164 100644 --- a/.obsidian/workspace-mobile.json +++ b/.obsidian/workspace-mobile.json @@ -21,8 +21,8 @@ "state": { "type": "markdown", "state": { - "file": "00.01 Admin/Calendars/Events/2023-12-27 Miami.md", - "mode": "source", + "file": "01.02 Home/@Main Dashboard.md", + "mode": "preview", "source": false } } @@ -101,7 +101,7 @@ "state": { "type": "search", "state": { - "query": "tag:#⚜️", + "query": "", "matchingCase": false, "explainSearch": false, "collapseAll": true, @@ -206,7 +206,7 @@ } }, { - "id": "c502838a6ad63fc3", + "id": "7aa9ef8ff0b7406e", "type": "leaf", "state": { "type": "DICE_ROLLER_VIEW", @@ -245,32 +245,32 @@ }, "active": "77c7d6201fbd4f8f", "lastOpenFiles": [ - "03.03 Food & Wine/Brown Butter Farro with Mushrooms & Burrata.md", + "00.01 Admin/Calendars/2023-03-25.md", + "00.01 Admin/Calendars/2023-03-26.md", "01.02 Home/@Main Dashboard.md", + "03.02 Travels/@@Travels.md", + "03.02 Travels/Arles.md", + "03.02 Travels/Avignon.md", + "03.02 Travels/Geneva.md", + "03.02 Travels/Florence.md", + "03.02 Travels/Milan.md", + "03.02 Travels/Palermo.md", + "00.01 Admin/Calendars/2023-02-03.md", + "00.01 Admin/Calendars/Events/2023-02-03 Paris.md", + "00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md", + "02.02 Paris/Narro.md", + "00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md", + "00.01 Admin/Calendars/2023-03-24.md", "00.01 Admin/Calendars/2023-03-23.md", + "00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md", + "00.03 News/How an FBI agent stained an NCAA basketball corruption probe.md", + "00.03 News/Last Stand of the Hot Dog King.md", + "00.03 News/The Limits and Wonders of John Wick’s Last Fight.md", + "00.01 Admin/Calendars/Events/2023-12-27 Miami.md", + "03.03 Food & Wine/Brown Butter Farro with Mushrooms & Burrata.md", "00.03 News/The Silicon Valley Bank Contagion Is Just Beginning.md", "03.03 Food & Wine/Zaalouk.md", "03.03 Food & Wine/@Side dishes.md", - "03.03 Food & Wine/Taktouka.md", - "03.03 Food & Wine/Beet n Goat Cheese Salad.md", - "03.04 Cinematheque/Indiana Jones and the Temple of Doom (1984).md", - "01.03 Family/Laurence Bédier.md", - "00.01 Admin/Calendars/2023-03-22.md", - "03.04 Cinematheque/Esterno notte (2022).md", - "00.03 News/Law Roach on Why He Retired From Celebrity Fashion Styling.md", - "00.03 News/Why Joe Biden’s Honeymoon With Progressives Is Coming to an End.md", - "00.03 News/The Purposeful Presence of Lance Reddick.md", - "00.01 Admin/Calendars/2023-03-20.md", - "00.01 Admin/Calendars/2023-03-21.md", - "03.04 Cinematheque/The Dark Knight Rises (2012).md", - "03.04 Cinematheque/The Dark Knight (2008).md", - "03.04 Cinematheque/Batman Begins (2005).md", - "03.04 Cinematheque/Batman Robin (1997).md", - "03.04 Cinematheque/Batman Forever (1995).md", - "03.04 Cinematheque/Batman Returns (1992).md", - "03.04 Cinematheque/Batman (1989).md", - "03.04 Cinematheque/@Cinematheque.md", - "00.02 Inbox/Au Revoir Là-Haut.md", "Pasted image 20230317114612.png", "Pasted image 20230317114609.png", "Pasted image 20230309141356.png", diff --git a/00.01 Admin/Calendars/2023-01-03.md b/00.01 Admin/Calendars/2023-01-03.md index 8240e7e4..e0314094 100644 --- a/00.01 Admin/Calendars/2023-01-03.md +++ b/00.01 Admin/Calendars/2023-01-03.md @@ -86,7 +86,7 @@ This section does serve for quick memos. - [ ] 10:31 :tooth: [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Find a dentist 📅2023-03-31 ^889jmj - [x] 10:33 👰‍♀️ [[2023-01-03|Memo]], [[@Family|Admin]]: Organise for [[2023-02-11 Mariage Eloi & Zélie|Eloi's wedding]] 📅 2023-01-31 ✅ 2023-01-07 ^16fcmt - [x] 10:34 👰‍♀️ [[2023-01-03|Memo]], [[@Family|Admin]]: Organise for [[2023-04-29 Mariage Marguerite & Arnold|Marguerite's wedding]] 📅 2023-03-31 ✅ 2023-01-09 ^9pbu3g -- [ ] 10:35 :chair: [[2023-01-03|Memo]], [[@Life Admin|Admin]], [[@@MRCK|Meggi]]: Find a person to repair Meggi's chair 📅2023-03-31 ^fqrywu +- [ ] 10:35 :chair: [[2023-01-03|Memo]], [[@Life Admin|Admin]], [[@@MRCK|Meggi]]: Find a person to repair Meggi's chair 📅 2023-05-31 ^fqrywu - [x] 10:42 :desktop_computer: [[2023-01-03|Memo]], [[@IT & Computer|IT]]: Re-deploy my Tools server 📅 2023-03-31 ✅ 2023-03-07 ^qydynl - [x] 10:43 :tornado: [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Sort out 🌬 📅 2023-03-31 ✅ 2023-03-07 ^8c4usc - [ ] 11:03 🍽 [[2023-01-03|Memo]], [[@Life Admin|Admin]], [[@@MRCK|Meggi]]: Find a dining table 📅2023-06-30 ^e1e9l9 @@ -95,8 +95,8 @@ This section does serve for quick memos. - [x] 11:53 :wine_glass: [[2023-01-03|Memo]], [[@Lifestyle|Lifestyle]], [[!!Wine|Wine]]: Order a couple of boxes of [[Nadine Saxer - Blanc de Noir]] 📅 2023-01-31 ✅ 2023-01-04 - [x] 11:57 🐛 [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Eradicate flies & such in the kitchen 📅 2023-01-15 ✅ 2023-01-04 - [x] 12:24 :hospital: [[2023-01-03|Memo]], [[@Lifestyle|Lifestyle]]: Find a charity shop in [[@@Zürich|ZH]] to give away clothes 📅 2023-01-10 ✅ 2023-01-04 -- [ ] 13:08 🛞 [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Buy summer tires 📅2023-03-31 -- [ ] 16:26 :hiking_boot: [[2023-01-03|Memo]], [[@Lifestyle|Lifestyle]]: Find a pair of winter boots 📅2023-03-31 +- [ ] 13:08 🛞 [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Buy summer tires 📅 2023-04-10 +- [x] 16:26 :hiking_boot: [[2023-01-03|Memo]], [[@Lifestyle|Lifestyle]]: Find a pair of winter boots 📅 2023-03-31 ✅ 2023-03-25 - [x] 18:15 :thread: [[2023-01-03|Memo]], [[@Life Admin|Admin]]: Find a seamstress for my jumpers 📅 2023-01-08 ✅ 2023-01-04 %% --- %% diff --git a/00.01 Admin/Calendars/2023-02-20.md b/00.01 Admin/Calendars/2023-02-20.md index 11e54494..1d153ade 100644 --- a/00.01 Admin/Calendars/2023-02-20.md +++ b/00.01 Admin/Calendars/2023-02-20.md @@ -101,7 +101,7 @@ hide task count This section does serve for quick memos.   -- [ ] 12:54 :crocodile: :racing_car: [[2023-02-20|Memo]], [[Miami]]: pay for the rental car 📅 2023-03-27 +- [x] 12:54 :crocodile: :racing_car: [[2023-02-20|Memo]], [[Miami]]: pay for the rental car 📅 2023-03-27 ✅ 2023-03-25 %% --- %% diff --git a/00.01 Admin/Calendars/2023-03-23.md b/00.01 Admin/Calendars/2023-03-23.md index 88132cf3..8e59f26b 100644 --- a/00.01 Admin/Calendars/2023-03-23.md +++ b/00.01 Admin/Calendars/2023-03-23.md @@ -16,9 +16,9 @@ Stress: 27.5 FrontHeadBar: 5 EarHeadBar: 35 BackHeadBar: 20 -Water: 2.25 +Water: 4 Coffee: 0 -Steps: +Steps: 12003 Weight: Ski: IceSkating: diff --git a/00.01 Admin/Calendars/2023-03-24.md b/00.01 Admin/Calendars/2023-03-24.md new file mode 100644 index 00000000..7f8f9981 --- /dev/null +++ b/00.01 Admin/Calendars/2023-03-24.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-03-24 +Date: 2023-03-24 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8 +Happiness: 80 +Gratefulness: 80 +Stress: 27.5 +FrontHeadBar: 5 +EarHeadBar: 35 +BackHeadBar: 20 +Water: 3.05 +Coffee: 0 +Steps: 10595 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-03-23|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-03-25|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-03-24Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-03-24NSave + +  + +# 2023-03-24 + +  + +> [!summary]+ +> Daily note for 2023-03-24 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-03-24 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-03-24]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-03-25.md b/00.01 Admin/Calendars/2023-03-25.md new file mode 100644 index 00000000..e68d28a9 --- /dev/null +++ b/00.01 Admin/Calendars/2023-03-25.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-03-25 +Date: 2023-03-25 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8 +Happiness: 80 +Gratefulness: 80 +Stress: 27.5 +FrontHeadBar: 5 +EarHeadBar: 35 +BackHeadBar: 20 +Water: 4.35 +Coffee: 0 +Steps: 16912 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-03-24|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-03-26|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-03-25Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-03-25NSave + +  + +# 2023-03-25 + +  + +> [!summary]+ +> Daily note for 2023-03-25 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-03-25 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-03-25]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-03-26.md b/00.01 Admin/Calendars/2023-03-26.md new file mode 100644 index 00000000..3052c46b --- /dev/null +++ b/00.01 Admin/Calendars/2023-03-26.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-03-26 +Date: 2023-03-26 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 4 +Happiness: 80 +Gratefulness: 80 +Stress: 27.5 +FrontHeadBar: 5 +EarHeadBar: 35 +BackHeadBar: 20 +Water: 0.45 +Coffee: 1 +Steps: +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-03-25|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-03-27|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-03-26Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-03-26NSave + +  + +# 2023-03-26 + +  + +> [!summary]+ +> Daily note for 2023-03-26 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-03-26 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-03-26]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md b/00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md index 460d7998..d76216cb 100644 --- a/00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md +++ b/00.01 Admin/Calendars/Events/2023-03-26 Mallorca.md @@ -10,3 +10,6 @@ CollapseMetaTable: true --- Polo week from [[2023-03-26|26th March]] to [[2023-04-02|2nd April]] in [[Mallorca]] with [[@@MRCK|Meggi-mo]] at [[Francisco Podesta|Fran]]‘s + +Address: +Camí d'Es Clot de Sa Mata, s/n, Campos, 07630, España \ No newline at end of file diff --git a/00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md b/00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md index b00ec3b1..c62f6318 100644 --- a/00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md +++ b/00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-03-24]] --- diff --git a/00.03 News/How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times.md b/00.03 News/How an FBI agent stained an NCAA basketball corruption probe.md similarity index 98% rename from 00.03 News/How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times.md rename to 00.03 News/How an FBI agent stained an NCAA basketball corruption probe.md index 64d8b713..03c7d8bd 100644 --- a/00.03 News/How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times.md +++ b/00.03 News/How an FBI agent stained an NCAA basketball corruption probe.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-03-24]] --- @@ -68,10 +68,6 @@ But almost six years later, the operation that was supposed to expose college ba Instead, the meandering government effort seemed at times like an investigation searching for a crime, marshaling vast resources to ultimately round up an assortment of low-level figures for alleged wrongdoing — particularly the coach bribery scheme — that people involved in the sport said wasn’t a common practice until the FBI started handing out envelopes of cash. - ![Subscriber Only Content](https://ca-times.brightspotcdn.com/dims4/default/8d9226b/2147483647/strip/true/crop/611x193+94+0/resize/510x161!/quality/80/?url=https%3A%2F%2Fcalifornia-times-brightspot.s3.amazonaws.com%2Fff%2Fda%2Fd9fedb674b1a9c19a9f357f9b1d5%2Fla22-fso-logo-800pxw-alpha-1.gif) - -Subscribers get exclusive access to this story - “This was a massive waste of time on everybody’s part,” said Jonathan Bradley Augustine, a former Florida youth basketball coach who was among those charged, though the charges were later dismissed. “It was a sexy case. This was big news. It was everywhere. … A lot of money wasted. A lot of people’s lives turned upside down.” ![Sketch of a man in a suit drinking from a glass](https://ca-times.brightspotcdn.com/dims4/default/968092d/2147483647/strip/true/crop/2400x1600+0+0/resize/2000x1333!/quality/80/?url=https%3A%2F%2Fcalifornia-times-brightspot.s3.amazonaws.com%2Fcd%2F57%2Fee0b5e494f6a8b784cecdc34d82f%2Finline-carpenterportrait.jpg) @@ -348,10 +344,6 @@ Code wrote a book about college basketball’s underbelly called “Black Market “If anyone thinks that there is such a thing as a clean big-time program, they need to wake up and smell the donkey s—,” he wrote in the book. -Suicide prevention and crisis counseling resources - -If you or someone you know is struggling with suicidal thoughts, seek help from a professional and call 9-8-8. The United States’ first nationwide three-digit mental health crisis hotline 988 will connect callers with trained mental health counselors. Text “HOME” to 741741 in the U.S. and Canada to reach the [Crisis Text Line](https://www.crisistextline.org/). - [Book Richardson](https://www.latimes.com/sports/sportsnow/la-sp-book-richardson-arizona-plea-20190107-story.html), a former University of Arizona assistant coach, was sentenced to three months in prison in the case. He now makes $3,000 a month working with youth basketball players in New York. He has kidney disease and sometimes struggles with the person he sees in the mirror. He said he contemplated suicide on two occasions in the years following his arrest — once when he put a pistol in his mouth but was interrupted by a phone call from a friend. “Your mind starts messing with you, man,” Richardson said. “‘Maybe I am the scum of the earth. Maybe I am the worst coach ever. I threw my life away for $20,000. I should be dead.’” diff --git a/00.03 News/Last Stand of the Hot Dog King.md b/00.03 News/Last Stand of the Hot Dog King.md new file mode 100644 index 00000000..0c7ebfaa --- /dev/null +++ b/00.03 News/Last Stand of the Hot Dog King.md @@ -0,0 +1,65 @@ +--- + +Tag: ["🤵🏻", "🇺🇸", "🗽", "🌭"] +Date: 2023-03-24 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-03-24 +Link: https://www.grubstreet.com/article/last-stand-of-the-hot-dog-king.html +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: [[2023-03-24]] + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-LastStandoftheHotDogKingNSave + +  + +# Last Stand of the Hot Dog King + +## “This is like the Alamo.” + +[![Portrait of Chris Crowley](https://pyxis.nymag.com/v1/imgs/6b2/8c8/ae07db3f99f3672c066a78c17da2ea9570-ChrisCrowleyFINAL.2x.rsquare.w168.jpg)](https://www.grubstreet.com/author/chris-crowley/) + +By , senior writer at Grub Street who covers the people who work and eat in New York City’s restaurants + +![](https://pyxis.nymag.com/v1/imgs/fbd/45c/5e09a50ab7e122089b56068b71f4a0994e-ny-hot-dog-king.rsquare.w700.jpg) + +Dan Rossi, in the van where he sleeps each night. Photo: Alexei Hay + +Since he showed up with a cart outside the Metropolitan Museum of Art nearly 16 years ago, Dan Rossi has been fighting with local officials over his right to sell hot dogs along what is arguably the most lucrative stretch of sidewalk in Manhattan. At the time, in 2007, a vending company was paying the city more than half a million dollars per year for the exclusive right to conduct business outside the museum. Citing a policy that dated back to the Civil War, Rossi [argued that](https://www.nytimes.com/2007/12/19/nyregion/19vendor.html), as a disabled veteran, he was exempt from those fees and any necessary permits, and he refused to leave. (Because he wasn’t paying to be there, he kept prices low and undercut the competing stands.) It worked, and by 2009, the patch of land had become so overrun with copycat vendors that the police [were forced to clear out the crowds](https://archive.nytimes.com/cityroom.blogs.nytimes.com/2009/08/26/police-crack-down-on-food-vendors-outside-the-met/index.html). Rossi spent a night in jail, but he returned to his post and again refused to leave. At some point during the middle of the Obama administration, Rossi [began sleeping there](https://www.nytimes.com/2014/07/26/nyregion/at-the-met-8-food-carts-stake-sidewalk-claims.html), setting up a folding chair behind the griddle. Increased competition and renovations that limited the space where vendors were allowed to park meant he was in danger of losing his spot. He eventually started to spend nights in a nearby van (an upgrade of sorts), but even that, he says, hasn’t been enough — and the city is again trying to squeeze out the man the *Daily News* [once called](https://www.nydailynews.com/new-york/vets-win-rivals-city-lose-hot-dog-duel-metropolitan-museum-article-1.329033) the “Hot Dog King” of New York. Of course he is not going to simply roll away. “This is like the Alamo,” Rossi declares. “I’m the only one protecting the vets. And I’m probably the only one protecting the legitimate vendors.” + +This most recent chapter of Rossi’s quixotic fracas began the night of January 26. An inspector from the Health Department, ostensibly following up on a complaint about four abandoned carts, stripped the letter-grade decals off Rossi’s cart. (The decals are similar to restaurant health grades and are required for all vendors.) Rossi, who points out that a sign on his cart explained he was asleep nearby, assumes he was targeted. He nevertheless waited for new decals to arrive and resumed selling his $4 hot dogs ($7 for jumbos) on February 6. Soon after, Rossi was told that one of his two carts — the license for which is owned by his daughter Elizabeth, who works with him — was too close to a crosswalk and needed to be moved elsewhere. “It more or less showed us what was happening as far as trying to get us away from here,” he contends. + +On the morning I stop by, Mr. Met is posing for photos with fans on the museum’s steps. Rossi — who before COVID could average $1,500 in sales on a nice day — points to a small, beat-up cart that’s chained to a signpost nearby and says it’s nothing more than a placeholder. When that vendor shows up an hour later, he rolls in a bigger cart and begins to conduct business as usual. For Rossi, the double standard has become obvious: “When this guy gets here, he’s in the crosswalk. I said, ‘Why do I have to be ten feet from the crosswalk but nobody else?’” + +This was the final straw. In February, Rossi’s other daughter, Danielle Machado, filed a [petition](https://www.change.org/p/help-the-new-york-hot-dog-king-dan-rossi-enforce-the-nyc-health-department-health-code) on Change.org demanding that Mayor Eric Adams and Health Commissioner Dr. Ashwin Vasan “enforce their health codes fairly across the board,” accusing the Health Department of failing “to enforce their own laws regarding illegal vending.” They’re asking that the city afford Rossi the same rights granted to other vendors who leave carts overnight so that he can get “a good night’s sleep in his bed, at home!” Although the petition has garnered more than 50,000 signatures, the Health Department appears unswayed by Machado’s argument. When I inquire about the situation, a department spokesperson writes back, “There is competition for prized vending spots and the City does not ‘reserve’ vending spots.” + +Rossi has been through this before. In 1994, the New York *Times* [reported](https://www.nytimes.com/1994/10/02/nyregion/new-yorkers-co-the-king-of-pushcarts.html) that he owned 499 street-vending permits, accounting for 16 percent of the total market, which was capped at 3,100 citywide. At the time, he was known as the King of Pushcarts, leasing the carts and collecting more than a million dollars a year in rent. Critics argued that Rossi and others involved in a similar business were harming competition by creating a monopoly. The next year, a law backed by then-Mayor Rudy Giuliani made it illegal for anyone to own more than a single permit. Vendors’ groups pushed back, and Rossi sued the city, arguing that politicians were guilty of “selectively enforcing a permit scheme for the primary purpose of ruining Rossi and his business.” The legal challenges were dismissed, and the law stood. + +Now, as then, Rossi believes the government is enforcing policies for someone else’s benefit. Whose, exactly? “Who knows?” he says. “The city has done everything to insulate themselves.” Even still, he believes he is the victim of a larger plan. “People are looking to get a piece of the action for themselves,” he posits. “It’s too obvious now. When they shut me down a few weeks ago, everything was exposed — everything.” And what happens if someone else moves into his spot? “They’re never going to leave.” + +I wonder if it’s all really worth the trouble and ask why Rossi, who is now 73, doesn’t just move his cart somewhere else. Elizabeth, a veteran of the Iraq War, admits that the fight is, to some degree, about righting the perceived wrongs of the past. “He’s adamant about holding this spot because they screwed us so badly,” she says. “This is the only angle we have to get back even a portion of what we lost.” + +For Rossi, a move just wouldn’t be worth it, and he’d have to contend with similar problems, though he’s willing to concede that, if the city doesn’t respond to the latest petition, there isn’t much else he can do. “Bottom line is this is probably the last battle. I’ve challenged the city to enforce the law. If they don’t, then I’m gone,” he says. “You can just last so long.” + +Last Stand of the Hot Dog King + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md b/00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md index cdd5e276..23c717a2 100644 --- a/00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md +++ b/00.03 News/Mel Brooks Isn’t Done Punching Up the History of the World.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-03-25]] --- diff --git a/00.03 News/The Limits and Wonders of John Wick’s Last Fight.md b/00.03 News/The Limits and Wonders of John Wick’s Last Fight.md new file mode 100644 index 00000000..c9b2df4d --- /dev/null +++ b/00.03 News/The Limits and Wonders of John Wick’s Last Fight.md @@ -0,0 +1,67 @@ +--- + +Tag: ["🎭", "🎥", "🇺🇸"] +Date: 2023-03-24 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-03-24 +Link: https://www.vulture.com/article/john-wick-chapter-four-movie-review.html +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-TheLimitsandWondersofJohnWicksLastFightNSave + +  + +# The Limits and Wonders of John Wick’s Last Fight + +![](https://pyxis.nymag.com/v1/imgs/aee/ffe/aabca079eb0527a8083cfbee980b4276a5-john-wick-4.rhorizontal.w700.jpg) + +In *John Wick: Chapter 4*, bodies are cut, shot, broken, and strangely beautiful when meeting their ends. If only every end were earned. Photo: Murray Close/Lionsgate + +*John Wick: Chapter 4*, like entries in the franchise before it, treats the body with the elasticity and deranged joy of a *Looney Tunes* cartoon. Consider *Homeless Hare,* a 1950 Chuck Jones short in which Bugs Bunny resorts to gleeful violence against a construction worker, Hercules, who uproots the trickster’s home. Bugs begins by dropping a brick from the height of the building on the head of his foe. Attached is a single slip of paper warning Hercules that Bugs is coming for that ass. What follows in this delightful short is defined by wild, violent revenge. So is the *John Wick* franchise’s approach, and it reflects a similarly potent understanding of the body’s seductive vulnerabilities. + +In *Chapter 4,* Keanu Reeves endures so many violent falls that would kill anyone else, but he always gets up and continues to fight another day — the humor of this inevitability hitting at the same moment as the fear of what could actually end him. This action is crucial to character building and styled specifically for each — though almost everyone in the world is balletic, smooth, and endlessly cool in the face of guns, knives, swords, and all other weaponry on the table. Even the lighting understands this specific fiction, punctuating darkness with cartoonish pops of neon. This approach to action has been broadly adopted in Hollywood, but those that seek to replicate its charms often fail with a lack of clarity, a use of darkness through which the audience can’t see a damn thing. They forget how badly we want to watch — and really *see —* a star with the heft of Reeves commit these acts of glorious violence. + +*Chapter 4* is blissfully entertaining, full of pratfalls and acting turns that lead to the audience swelling with oohs, aahs*,* and yelps. It’s far more narratively focused than its previous sequels, still managing to globe-trot a behemoth cast à la *Chapter 2* and *Chapter* *3* while returning to a simpler conflict reminiscent of the original *John Wick.* Here, John Wick seeks to finally buy his freedom by dueling the Marquis (Bill Skarsgård), a crime-world fixture of inherited power who has been emboldened to bend and break the rules by the High Table in an effort to maintain its supremacy in the face of Wick’s flagrant disruption. Why make the Marquis the target of Wick’s vengeance and freedom instead of letting him take that heat directly to the High Table? The franchise needs to keep the status quo intact for the plentiful spinoffs that filmmakers have in mind — including *Ballerina*, starring Ana de Armas. I have some reservations about these narrative choices, but the cinematic violence of *Chapter 4* brought me the joy and erotic rush that has long powered the series. It synthesizes the zaniness of *Looney Tunes* and gags of Buster Keaton with martial-arts master classes that call back to the career of Jackie Chan and learn from more recent films like 2017’s South Korean action flick *The Villainess*. It’s a history lesson on what the body can do onscreen — its limits and its wonders. + +Director Chad Stahelski and cinematographer Dan Laustsen create arguably the best-looking of the *John Wick* films. The quiet moments are evocative — like when Laurence Fishburne’s Bowery King blows out a match before the camera cuts to a cresting sunset (a cheeky homage to *Lawrence of Arabia* and one of [the most famous cuts in film history](https://www.youtube.com/watch?v=0ccB1KTzr9o)) — and the unleashing of violence is clear and easy to follow. There’s no confusion when it comes to how and where characters are inhabiting space. The stellar production design deserves credit as well, particularly in the way the Osaka Continental (run by Hiroyuki Sanada’s Shimazu Koji and his concierge and daughter, Akira, played by Rina Sawayama) is dressed and designed. Its clean lines, glossy surfaces, glass-encased weapons and artifacts, and all-around cool tones diligently build out this world defined by the intertwining of beauty and blood. I was struck by the use of so many shades of red against this backdrop — magenta, crimson, cherry. One of the most tantalizing shots positions Reeves in the left corner, the field of vision otherwise dominated by cherry blossoms in full bloom and a circular building sliced with lights of arterial red. Stahelski and Laustsen make profound use of horizontal space even when one of its best blunders, played out by Reeves on the 222 steps of Paris’s Sacré Coeur basilica, is obviously vertically defined. + +And it’s not just Reeves but the many actors in his orbit who shine with a blend of vengeful grace and humorous beats. Bodies everywhere are cut, shot through, flipped, broken, and strangely beautiful when meeting their ends. Although not every end feels quite earned. The late Lance Reddick becomes a sacrificial lamb early on in this chapter, and his story line is shuffled away too quickly. Fishburne’s Shakespearean Bowery King and Clancy Brown’s Harbinger are not used to the full degree that they should be either, but anytime their booming voices are used, the film shines brighter. Until Scott Adkins walks in wearing a grotesque fat suit as Killa. Hollywood’s doubling down on anti-fatness with Colin Farrell’s turn in *The Batman* and Brendan Fraser’s Oscar-winning performance in Darren Aronofsky’s *The Whale* will not age well, and it’s frustrating that *John Wick*’s final installment has something as loathsome as this. But *Chapter 4* offers greater turns by beloved actors and martial artists new and seasoned alike. Donnie Yen plays Caine, a close friend of Wick’s who is pulled back into the life of an assassin to kill his comrade. He has already given up his eyesight in order to protect his daughter and get out, but here, he is forced to endure. He’s delightfully cheeky in his fight scenes, moving with quick-witted, silken force, making Wick’s brutality all the more blatant. + +Yen is the film’s MVP — whether he’s slurping down food and ignoring the violence blooming around him or shit-talking the Marquis to his face. Then there’s Sanada’s beautifully rendered Shimazu, dear and determined, who puts his life on the line out of love for Wick and a belief in honor. The friendship between these three men is crucial to the emotional world of the film and gives it layers I wasn’t expecting but wanted more of. When Wick speaks Japanese to Shimazu or shares a long gaze with Caine, these relationships are given an intimacy that relies on Reeves’s own three-decade-long history as a star undergirded by considerations of race, identity, and history. But I was especially surprised by just how damn good pop star Sawayama is in her role. She’s giving looks, poses, the right angles, charisma, grit. She’s so eye-catching that I got lost in the beauty of her performance whenever she was onscreen. + +So what about Skarsgård? In many ways, the Marquis and Wick are a study in opposites. Where Wick is stoic and terse, the Marquis is the kind of man who says lines like “Second chances are the refuge of men who fail.” He likes his espresso sweet, his waistcoats fabulous, and his violence flowing endlessly. While Wick earned his reputation, the Marquis was bequeathed his. Wick believes in formality, and the Marquis flouts the rules. Costuming is a strength of the series, which is apparent in this chapter’s fine suits, particularly the Marquis’s — of crimson, of navy, of twilight. Skarsgård leans into the camp and archness roiling under the surface of this franchise. His accent is mellifluous. It dips, flutters, and stretches in ways that feel both studied and hilarious. His face scrunches and has a flexibility that borders on comical while never losing sight of the necessary tone. + +Yet by the end, I held a nagging belief that Stahelski and the *Chapter 4* script didn’t quite capitalize on all of Reeves’s strengths. This Wick is exceedingly, almost frustratingly, terse and stoic, muttering one-liners and *yeah*s that could easily trip into the parodic. Reeves is good and game. But the story doesn’t capitulate with earnestness or heartfelt dialogue, choosing to highlight his physical grace and determination above all else. Reeves has always been a performer defined not just by the delicate beauty of his body but an emotional clarity and sweetness that is almost nowhere to be found in this film. Moments with Yen, including a candlelit church scene, are where *Chapter 4* comes closest to Reeves’s complexity as an actor who lies at the nexus of virility and vulnerability. Wick’s interactions with a tracker who likes to call himself Mr. Nobody (Shamier Anderson) allows Reeves to, at least, add notes of befuddlement and curiosity. Mr. Nobody is an obsessive fan of Wick’s — following him and drawing him in a firmly kept notebook while hunting him as the price over Wick’s head accelerates. Mr. Nobody even has a beloved dog he uses in his action sequences. It’s a meta nod to the obsession around Reeves himself and those who seek to duplicate his elegance while not understanding its roots. + +What ends up most intriguing about his performance is the subtext of the movie’s denouement: the idea that Reeves is, for however long, ceding the *John Wick* spotlight — unlike his aging-star cohort (think Brad Pitt in *Bullet Train* and Tom Cruise in *Top Gun: Maverick*), who welcome neophytes into their fold but insist on outlasting them. Reeves is a star who doesn’t suck up all of the oxygen. He’s able to mold himself to the work and pull back when necessary — but maybe too far back this time, as his performance tips into laconic and guarded by the close. (Reeves missed his calling as a silent-film actor, but his best characters aren’t muted.) The *Chapter 4* ending, an echo of a crucial one in the beloved ’90s anime *Cowboy Bebop,* feels like it’s fighting the gravitational force of Reeves rather than submitting to it. Shouldn’t Wick be coming at the High Table, not a proxy? Shouldn’t Wick’s last fight reflect the grandness and dynamism of its focal point? *Chapter 4* is a deliriously entertaining entry into the franchise, but its final moments can’t help but put into harsh relief the fact that this ridiculous world of glory and gut punches is evolving to exist without its namesake, yet it still needs him to feel alive. + +- [Trapping Willem Dafoe in a Penthouse Prison Shouldn’t Be Boring](https://www.vulture.com/article/review-inside-wastes-a-great-premise.html) +- [Let’s Just Pretend *Shazam! Fury of the Gods* Never Happened](https://www.vulture.com/article/movie-review-dcs-shazam-fury-of-the-gods.html) +- [I Give Up](https://www.vulture.com/article/movie-review-scream-6-yet-another-scream-movie.html) + +[See All](https://www.vulture.com/tags/movie-review) + +The Limits and Wonders of John Wick’s Last Fight + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/01.02 Home/Household.md b/01.02 Home/Household.md index b031cb9b..fdb776de 100644 --- a/01.02 Home/Household.md +++ b/01.02 Home/Household.md @@ -56,9 +56,9 @@ style: number   -- [k] :coffee: [[Household]]: Buy a Cappuccino machine 📅 2023-03-31 +- [x] :coffee: [[Household]]: Buy a Cappuccino machine 📅 2023-03-31 ✅ 2023-03-25 - [k] :couch_and_lamp: [[Household]]: Replace the sofa 📅 2023-06-30 -- [k] :bed: [[Household]]: Buy bed-side tables 📅 2023-03-31 +- [x] :bed: [[Household]]: Buy bed-side tables 📅 2023-03-31 ✅ 2023-03-25 - [x] 🛌 [[Household]]: Buy new bed clothes 📅 2022-10-08 ✅ 2022-10-10   @@ -88,12 +88,14 @@ style: number #### 🏠 House chores -- [ ] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-03-31 +- [ ] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-04-30 +- [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-03-31 ✅ 2023-03-25 - [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-02-28 ✅ 2023-02-24 - [ ] 🛎 🛍 REMINDER [[Household]]: Monthly shop in France %%done_del%% 🔁 every month on the last Saturday 🛫 2023-04-03 📅 2023-04-29 - [x] 🛎 🛍 REMINDER [[Household]]: Monthly shop in France %%done_del%% 🔁 every month on the last Saturday 🛫 2023-02-27 📅 2023-03-25 ✅ 2023-03-21 - [x] 🛎 🛍 REMINDER [[Household]]: Monthly shop in France %%done_del%% 🔁 every month on the last Saturday 🛫 2023-01-30 📅 2023-02-25 ✅ 2023-02-20 -- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-03-27 +- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-04-03 +- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-03-27 ✅ 2023-03-25 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-03-20 ✅ 2023-03-20 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-03-13 ✅ 2023-03-10 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-03-06 ✅ 2023-03-03 diff --git a/00.01 Admin/Calendars/Events/2023-09-08 Trip to NYC.md b/01.05 Done/2023-09-08 Trip to NYC.md similarity index 100% rename from 00.01 Admin/Calendars/Events/2023-09-08 Trip to NYC.md rename to 01.05 Done/2023-09-08 Trip to NYC.md diff --git a/02.02 Paris/Narro.md b/02.02 Paris/Narro.md new file mode 100644 index 00000000..6072881d --- /dev/null +++ b/02.02 Paris/Narro.md @@ -0,0 +1,116 @@ +--- + +Alias: [""] +Tag: ["🍴", "🇯🇵"] +Date: 2023-03-25 +DocType: "Place" +Hierarchy: "NonRoot" +TimeStamp: +location: [48.8449381,2.3496655] +Place: + Type: Restaurant + SubType: Bistronomie + Style: Japanese + Location: "Quartier Latin" + Country: France + Status: Recommended +CollapseMetaTable: true +Phone: "+33 9 73 24 07 95" +Email: "" +Website: "[narro / Bistronomique / PARIS](https://www.restaurantnarro.fr/)" +Instagram: narro_restaurant + +--- + +Parent:: [[@@Paris|Paris]], [[@Restaurants Paris|Restaurants in Paris]] + +  + +```dataviewjs +let tempPhone = dv.current().Phone ? dv.current().Phone.replaceAll(" ", "") : '+000' +let tempMail = dv.current().Email ? dv.current().Email : "" +let tempCoorSet = dv.current().location ? dv.current().location : [0,0] +dv.el('center', '[📲](tel:' + tempPhone + ')     [📧](mailto:' + tempMail + ')     [🗺️](' + "https://waze.com/ul?ll=" + tempCoorSet[0] + "%2C" + tempCoorSet[1] + "&navigate=yes" + ')') +``` + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-NarroSave + +  + +# Narro + +  + +> [!summary]+ +> Note Description + +  + +```toc +style: number +``` + +  + +--- + +  + +### 📇 Contact + +  + +> [!address] 🗺 +> 72, rue du Cardinal Lemoine +> 75005 PARIS +> France + + +  + +☎️ `= this.Phone` + +📧 `= this.Email` + +🌐 `= this.Website` + +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### 🔗 Other activity + +  + +```dataview +Table DocType as "Doc type" from [[Narro]] +where !contains(file.name, "@@Travel") +sort DocType asc +``` + +  +  \ No newline at end of file diff --git a/03.02 Travels/@@Travels.md b/03.02 Travels/@@Travels.md index 0f8e3674..c916119b 100644 --- a/03.02 Travels/@@Travels.md +++ b/03.02 Travels/@@Travels.md @@ -91,6 +91,20 @@ style: number   +### Admin + +  + +> [!credentials]- Priority Pass +> Number: 067100000555294 +> Expiry: 11/23 + +  + +--- + +  + ### Travels [[#^Top|TOP]]   diff --git a/03.02 Travels/Arles.md b/03.02 Travels/Arles.md index 68922ee7..734eb553 100644 --- a/03.02 Travels/Arles.md +++ b/03.02 Travels/Arles.md @@ -1,6 +1,6 @@ --- -Tag: ["🦗", "Camargue", "🐂", "🎨", "🏢"] +Tag: ["🦗", "🌊", "🐂", "🐎", "🎨", "🏢"] Date: 2022-06-20 DocType: "Place" Hierarchy: "NonRoot" diff --git a/03.02 Travels/Avignon.md b/03.02 Travels/Avignon.md index 41f400d6..02d7c112 100644 --- a/03.02 Travels/Avignon.md +++ b/03.02 Travels/Avignon.md @@ -81,7 +81,7 @@ style: number - L'Épicerie de Ginette (Avignon) ⭐⭐:star::star: [L'Épicerie de Ginette - Avignon | French cuisine near me | Book now](https://lepicerie-de-ginette-restaurant-avignon.metro.rest/?lang=en) - Les Jarres (Castillon du Gard) ⭐⭐⭐⭐ [Les Jarres - RESTAURANT L’AMPHITRYON SITE OFFICIEL](https://restaurant-lamphitryon.ovh/les-jarres/) - La Famille (Uzès) ⭐:star::star::star::star: -- le Bec à Vin (Uzès) :star::star::star: [Restaurant traditionnel Gard - GREG AND CLO](https://www.lebecavin.com/) #cadre +- le Bec à Vin (Uzès) :star::star::star: [Restaurant traditionnel Gard - GREG AND CLO](https://www.lebecavin.com/) #📸   diff --git a/03.02 Travels/Florence.md b/03.02 Travels/Florence.md index af74de49..12a18c1a 100644 --- a/03.02 Travels/Florence.md +++ b/03.02 Travels/Florence.md @@ -1,7 +1,7 @@ --- Alias: ["Firenze"] -Tag: ["🇮🇹", "🎭", "Renaissance", "🏢"] +Tag: ["🇮🇹", "🎭", "🧑🏼‍🎨", "🏢"] Date: 2022-09-27 DocType: "Place" Hierarchy: "NonRoot" diff --git a/03.02 Travels/Geneva.md b/03.02 Travels/Geneva.md index 1ad66071..c6f7119f 100644 --- a/03.02 Travels/Geneva.md +++ b/03.02 Travels/Geneva.md @@ -1,7 +1,7 @@ --- Alias: ["Genève"] -Tag: ["🏢", "Leman", "🌆"] +Tag: ["🏢", "🌊", "🌆"] Date: 2022-08-24 DocType: "Place" Hierarchy: "NonRoot" diff --git a/03.02 Travels/Milan.md b/03.02 Travels/Milan.md index c8c41fb9..8437d7ac 100644 --- a/03.02 Travels/Milan.md +++ b/03.02 Travels/Milan.md @@ -1,7 +1,7 @@ --- Alias: ["Milano"] -Tag: ["🇮🇹", "🎭", "Renaissance", "🧔🏻", "🏢"] +Tag: ["🇮🇹", "🎭", "🧑🏼‍🎨", "🧔🏻", "🏢"] Date: 2022-09-27 DocType: "Place" Hierarchy: "NonRoot" diff --git a/03.02 Travels/Palermo.md b/03.02 Travels/Palermo.md index 2301dd41..e769bb4c 100644 --- a/03.02 Travels/Palermo.md +++ b/03.02 Travels/Palermo.md @@ -1,6 +1,6 @@ --- -Tag: ["🇮🇹", "Sicily", "Renaissance"] +Tag: ["🇮🇹", "🏝️", "🧑🏼‍🎨"] Date: 2022-09-27 DocType: "Place" Hierarchy: "NonRoot" diff --git a/04.01 lebv.org/lebv Research Tasks.md b/04.01 lebv.org/lebv Research Tasks.md index 6198928f..b69c7077 100644 --- a/04.01 lebv.org/lebv Research Tasks.md +++ b/04.01 lebv.org/lebv Research Tasks.md @@ -67,9 +67,9 @@ Overview of tasks & todos for lebv.org   -- [ ] :fleur_de_lis: [[lebv Research Tasks|Research]]: Lieux: que sont devenus Fleurimont & Le Pavillon aujourd'hui? 📅 2023-03-31 -- [ ] :fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: reprendre les citations militaires (promotion/décoration) 📅 2023-03-31 -- [ ] :fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: éplucher les mentions du Nobiliaire de Guyenne & Gascogne 📅 2023-03-31 +- [ ] :fleur_de_lis: [[lebv Research Tasks|Research]]: Lieux: que sont devenus Fleurimont & Le Pavillon aujourd'hui? 📅 2023-10-31 +- [ ] :fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: reprendre les citations militaires (promotion/décoration) 📅 2023-08-31 +- [ ] :fleur_de_lis: [[lebv Research Tasks|Research]]: membres de la famille: éplucher les mentions du Nobiliaire de Guyenne & Gascogne 📅 2023-07-31 - [x] [[lebv Research Tasks|Research]]: Archivage: compléter les fichiers de Source   diff --git a/05.02 Networks/Configuring UFW.md b/05.02 Networks/Configuring UFW.md index cab2d9f0..dd2228a6 100644 --- a/05.02 Networks/Configuring UFW.md +++ b/05.02 Networks/Configuring UFW.md @@ -237,7 +237,8 @@ sudo bash /etc/addip4ban/addip4ban.sh #### Ban List Tasks -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-03-25 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-04-01 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-03-25 ✅ 2023-03-25 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-03-18 ✅ 2023-03-18 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-03-11 ✅ 2023-03-10 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-03-04 ✅ 2023-03-03 @@ -245,7 +246,8 @@ sudo bash /etc/addip4ban/addip4ban.sh - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-02-18 ✅ 2023-02-17 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-02-11 ✅ 2023-02-11 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-02-04 ✅ 2023-02-04 -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-03-25 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-04-01 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-03-25 ✅ 2023-03-25 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-03-18 ✅ 2023-03-18 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-03-11 ✅ 2023-03-10 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-03-04 ✅ 2023-03-03 diff --git a/05.02 Networks/Server Alias.md b/05.02 Networks/Server Alias.md index 62d54c09..3971fb8b 100644 --- a/05.02 Networks/Server Alias.md +++ b/05.02 Networks/Server Alias.md @@ -336,7 +336,8 @@ And `\q` to exit the db.   -- [ ] :email: [[Selfhosting]], [[Server Alias|Email Alias]]: Upgrader & Health checks %%done_del%% 🔁 every 4 months 📅 2023-03-31 +- [ ] :email: [[Selfhosting]], [[Server Alias|Email Alias]]: Upgrader & Health checks %%done_del%% 🔁 every 4 months 📅 2023-07-31 +- [x] :email: [[Selfhosting]], [[Server Alias|Email Alias]]: Upgrader & Health checks %%done_del%% 🔁 every 4 months 📅 2023-03-31 ✅ 2023-03-25 - [x] [[Selfhosting]], [[Server Alias|Email Alias]]: Upgrader & Health checks 🔁 every 4 months 📅 2022-07-31 ✅ 2022-08-02 - [x] [[Selfhosting]], [[Server Alias|Email Alias]]: Upgrader & Health checks 🔁 every 4 months 📅 2022-03-31 ✅ 2022-03-31 diff --git a/06.01 Finances/2023.ledger b/06.01 Finances/2023.ledger index 0750de85..dfe2a1e0 100644 --- a/06.01 Finances/2023.ledger +++ b/06.01 Finances/2023.ledger @@ -664,4 +664,36 @@ alias f=expenses:Food 2023/03/23 Coop expenses:Food:CHF CHF21.15 + assets:Cash:CHF + +2023/03/24 SBB + expenses:Travels:CHF CHF5.40 + assets:Cash:CHF + +2023/03/25 Monocle + expenses:Food:CHF CHF6.00 + assets:Cash:CHF + +2023/03/25 Car rental + expenses:Travels:EUR €96.83 + liability:CreditCard:CHF + +2023/03/24 Coop + expenses:Food:CHF CHF7.50 + assets:Cash:CHF + +2023/03/24 Lunch Maurizio + expenses:Social:CHF CHF70.50 + assets:Cash:CHF + +2023/03/24 Widder bar: Maurizio + expenses:Social:CHF CHF42.00 + assets:Cash:CHF + +2023/03/24 Beer: Maurizio + expenses:Social:CHF CHF16.00 + assets:Cash:CHF + +2023/03/25 Migros + expenses:Food:CHF CHF6.30 assets:Cash:CHF \ No newline at end of file