gemi 0.19.0 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/app/index.js.map +2 -2
  3. package/dist/{chunk-e6nxs9xa.js → chunk-2j91yc5g.js} +1 -1
  4. package/dist/{chunk-mtbjk5px.js → chunk-5yz4jjwj.js} +2 -2
  5. package/dist/{chunk-mtbjk5px.js.map → chunk-5yz4jjwj.js.map} +1 -1
  6. package/dist/chunk-7pb9p4tj.js +4 -0
  7. package/dist/{chunk-fgafrjxy.js.map → chunk-7pb9p4tj.js.map} +5 -4
  8. package/dist/{chunk-bn4smbkm.js → chunk-hq6bnmbe.js} +2 -2
  9. package/dist/{chunk-bn4smbkm.js.map → chunk-hq6bnmbe.js.map} +1 -1
  10. package/dist/{chunk-vx4y92r0.js → chunk-jwcetzcw.js} +2 -2
  11. package/dist/{chunk-vx4y92r0.js.map → chunk-jwcetzcw.js.map} +1 -1
  12. package/dist/{chunk-f3ft8w3z.js → chunk-kejrbrr5.js} +2 -2
  13. package/dist/{chunk-f3ft8w3z.js.map → chunk-kejrbrr5.js.map} +1 -1
  14. package/dist/{chunk-grzfxg62.js → chunk-m88m39d2.js} +1 -1
  15. package/dist/{chunk-m69enj51.js → chunk-njj6q7xt.js} +2 -2
  16. package/dist/{chunk-m69enj51.js.map → chunk-njj6q7xt.js.map} +1 -1
  17. package/dist/{chunk-wa1dcgad.js → chunk-q04g7v20.js} +1 -1
  18. package/dist/chunk-shx43qev.js +3 -0
  19. package/dist/{chunk-an6sbmg2.js.map → chunk-shx43qev.js.map} +4 -7
  20. package/dist/{chunk-x77c0xjm.js → chunk-xg82xtdy.js} +2 -2
  21. package/dist/{chunk-x77c0xjm.js.map → chunk-xg82xtdy.js.map} +1 -1
  22. package/dist/{chunk-gdv7756c.js → chunk-zeyq4p6y.js} +2 -2
  23. package/dist/{chunk-gdv7756c.js.map → chunk-zeyq4p6y.js.map} +5 -5
  24. package/dist/client/auth/useUser.d.ts +27 -2
  25. package/dist/client/auth/useUser.d.ts.map +1 -1
  26. package/dist/client/index.js +29 -25
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/client/isPlainObject.d.ts +2 -0
  29. package/dist/client/isPlainObject.d.ts.map +1 -0
  30. package/dist/client/useQuery.d.ts +6 -12
  31. package/dist/client/useQuery.d.ts.map +1 -1
  32. package/dist/email/index.js +2 -2
  33. package/dist/email/index.js.map +1 -1
  34. package/dist/facades/index.js +3 -3
  35. package/dist/facades/index.js.map +2 -2
  36. package/dist/http/HttpRequest.d.ts.map +1 -1
  37. package/dist/http/index.js +2 -2
  38. package/dist/http/index.js.map +3 -3
  39. package/dist/i18n/Dictionary.d.ts +6 -2
  40. package/dist/i18n/Dictionary.d.ts.map +1 -1
  41. package/dist/i18n/index.js +2 -2
  42. package/dist/i18n/index.js.map +3 -3
  43. package/dist/kernel/index.js +2 -2
  44. package/dist/kernel/index.js.map +2 -2
  45. package/dist/server/index.js +2 -2
  46. package/dist/server/index.js.map +1 -1
  47. package/dist/services/index.js +48 -48
  48. package/dist/services/index.js.map +4 -4
  49. package/dist/utils/type.d.ts +3 -0
  50. package/dist/utils/type.d.ts.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/chunk-an6sbmg2.js +0 -4
  53. package/dist/chunk-fgafrjxy.js +0 -4
  54. package/dist/chunk-ny36ys64.js +0 -4
  55. package/dist/chunk-ny36ys64.js.map +0 -10
  56. /package/dist/{chunk-e6nxs9xa.js.map → chunk-2j91yc5g.js.map} +0 -0
  57. /package/dist/{chunk-grzfxg62.js.map → chunk-m88m39d2.js.map} +0 -0
  58. /package/dist/{chunk-wa1dcgad.js.map → chunk-q04g7v20.js.map} +0 -0
@@ -1,45 +1,45 @@
1
1
  // @bun
2
- import{ea as t4,fa as fU,ga as RU}from"../chunk-x77c0xjm.js";import{ha as IN,ia as MN,ja as zU,ka as X6,la as QU,ma as z6}from"../chunk-vx4y92r0.js";import{Aa as vU,Ba as yU,Ca as jU,Da as fF,Ea as RF,Fa as m3,Ga as HR,Ha as NR,Ia as hF,Ja as OU,Ka as EU,La as $F,Ma as VU,Na as AF,Oa as TU,Pa as gU,Qa as n1,Ra as CU,Sa as mU,Ta as dU,Ua as aU,na as iU,oa as pU,pa as oU,qa as nU,ra as vR,sa as yR,ta as uU,ua as V3,va as T3,wa as g3,xa as C3,ya as tU,za as KU}from"../chunk-an6sbmg2.js";import{Va as jf,Wa as wU}from"../chunk-rcz6xqsr.js";import{Xa as u4}from"../chunk-q4m9fgvw.js";import{Ab as b1,Bb as h0,Cb as o0,Eb as t0,Fb as b0,Gb as _3,Hb as Qf,Ib as U4,Jb as qU,Kb as BU,Lb as lU,Mb as _U,Nb as c1,Ob as zf,Pb as eh,Qb as k,Sb as F4,Tb as W4,db as kU,eb as sU,fb as Ff,gb as uh,hb as sh,kb as MU,lb as _0,mb as If,nb as JU,ob as XU,pb as oR,qb as IU,rb as PU,sb as eU,tb as N4,ub as GR,vb as Jf,wb as ER,xb as of,yb as z8,zb as i}from"../chunk-kwn176pr.js";import{Wb as $0,Yb as r1,_b as e4}from"../chunk-xn8m1vjf.js";import{$b as nh,bc as LA,ec as BR}from"../chunk-r9vkr7kz.js";import{nc as KR}from"../chunk-cr3jz0qz.js";import"../chunk-79ag9kvz.js";import{qc as nY}from"../chunk-j42e2g1d.js";import{rc as dS}from"../chunk-2cfneq8g.js";import{vc as c$}from"../chunk-fgafrjxy.js";import{wc as p}from"../chunk-ny36ys64.js";import"../chunk-8xspwewa.js";import{zc as VY}from"../chunk-zja5jcxt.js";import{Ac as O,Bc as l,Cc as gR}from"../chunk-y8ggk3r3.js";var UW=l((Uy,NW)=>{var S5=function f(R){return Y5(R)&&!D5(R)};function Y5(f){return!!f&&typeof f==="object"}function D5(f){var R=Object.prototype.toString.call(f);return R==="[object RegExp]"||R==="[object Date]"||J5(f)}var Z5=typeof Symbol==="function"&&Symbol.for,M5=Z5?Symbol.for("react.element"):60103;function J5(f){return f.$$typeof===M5}function X5(f){return Array.isArray(f)?[]:{}}function Zh(f,R){return R.clone!==!1&&R.isMergeableObject(f)?D0(X5(f),f,R):f}function z5(f,R,h){return f.concat(R).map(function($){return Zh($,h)})}function Q5(f,R){if(!R.customMerge)return D0;var h=R.customMerge(f);return typeof h==="function"?h:D0}function w5(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(R){return Object.propertyIsEnumerable.call(f,R)}):[]}function GW(f){return Object.keys(f).concat(w5(f))}function HW(f,R){try{return R in f}catch(h){return!1}}function L5(f,R){return HW(f,R)&&!(Object.hasOwnProperty.call(f,R)&&Object.propertyIsEnumerable.call(f,R))}function I5(f,R,h){var $={};if(h.isMergeableObject(f))GW(f).forEach(function(A){$[A]=Zh(f[A],h)});return GW(R).forEach(function(A){if(L5(f,A))return;if(HW(f,A)&&h.isMergeableObject(R[A]))$[A]=Q5(A,h)(f[A],R[A],h);else $[A]=Zh(R[A],h)}),$}function D0(f,R,h){h=h||{},h.arrayMerge=h.arrayMerge||z5,h.isMergeableObject=h.isMergeableObject||S5,h.cloneUnlessOtherwiseSpecified=Zh;var $=Array.isArray(R),A=Array.isArray(f),G=$===A;if(!G)return Zh(R,h);else if($)return h.arrayMerge(f,R,h);else return I5(f,R,h)}D0.all=function f(R,h){if(!Array.isArray(R))throw new Error("first argument should be an array");return R.reduce(function($,A){return D0($,A,h)},{})};var P5=D0;NW.exports=P5});var I$=l((JJ,BW)=>{function Af(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}Af.prototype.clone_empty=function(){var f=new Af(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f};Af.prototype.item=function(f){if(f<0)return this.__items[this.__items.length+f];else return this.__items[f]};Af.prototype.has_match=function(f){for(var R=this.__items.length-1;R>=0;R--)if(this.__items[R].match(f))return!0;return!1};Af.prototype.set_indent=function(f,R){if(this.is_empty())this.__indent_count=f||0,this.__alignment_count=R||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count)};Af.prototype._set_wrap_point=function(){if(this.__parent.wrap_line_length)this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count};Af.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};Af.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;if(f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" ")f.__items.splice(0,1),f.__character_count-=1;return!0}return!1};Af.prototype.is_empty=function(){return this.__items.length===0};Af.prototype.last=function(){if(!this.is_empty())return this.__items[this.__items.length-1];else return null};Af.prototype.push=function(f){this.__items.push(f);var R=f.lastIndexOf(`
3
- `);if(R!==-1)this.__character_count=f.length-R;else this.__character_count+=f.length};Af.prototype.pop=function(){var f=null;if(!this.is_empty())f=this.__items.pop(),this.__character_count-=f.length;return f};Af.prototype._remove_indent=function(){if(this.__indent_count>0)this.__indent_count-=1,this.__character_count-=this.__parent.indent_size};Af.prototype._remove_wrap_indent=function(){if(this.__wrap_point_indent_count>0)this.__wrap_point_indent_count-=1};Af.prototype.trim=function(){while(this.last()===" ")this.__items.pop(),this.__character_count-=1};Af.prototype.toString=function(){var f="";if(this.is_empty()){if(this.__parent.indent_empty_lines)f=this.__parent.get_indent_string(this.__indent_count)}else f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("");return f};function Mh(f,R){if(this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,!f.indent_with_tabs)this.__indent_string=new Array(f.indent_size+1).join(f.indent_char);if(R=R||"",f.indent_level>0)R=new Array(f.indent_level+1).join(this.__indent_string);this.__base_string=R,this.__base_string_length=R.length}Mh.prototype.get_indent_size=function(f,R){var h=this.__base_string_length;if(R=R||0,f<0)h=0;return h+=f*this.__indent_size,h+=R,h};Mh.prototype.get_indent_string=function(f,R){var h=this.__base_string;if(R=R||0,f<0)f=0,h="";return R+=f*this.__indent_size,this.__ensure_cache(R),h+=this.__cache[R],h};Mh.prototype.__ensure_cache=function(f){while(f>=this.__cache.length)this.__add_column()};Mh.prototype.__add_column=function(){var f=this.__cache.length,R=0,h="";if(this.__indent_size&&f>=this.__indent_size)R=Math.floor(f/this.__indent_size),f-=R*this.__indent_size,h=new Array(R+1).join(this.__indent_string);if(f)h+=new Array(f+1).join(" ");this.__cache.push(h)};function Gf(f,R){this.__indent_cache=new Mh(f,R),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new Af(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}Gf.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};Gf.prototype.get_line_number=function(){return this.__lines.length};Gf.prototype.get_indent_string=function(f,R){return this.__indent_cache.get_indent_string(f,R)};Gf.prototype.get_indent_size=function(f,R){return this.__indent_cache.get_indent_size(f,R)};Gf.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};Gf.prototype.add_new_line=function(f){if(this.is_empty()||!f&&this.just_added_newline())return!1;if(!this.raw)this.__add_outputline();return!0};Gf.prototype.get_code=function(f){this.trim(!0);var R=this.current_line.pop();if(R){if(R[R.length-1]===`
2
+ import{fa as fU,ga as RU,ha as hU}from"../chunk-xg82xtdy.js";import{ia as IN,ja as MN,ka as QU,la as X6,ma as wU,na as z6}from"../chunk-jwcetzcw.js";import{Aa as vU,Ba as yU,Ca as jU,Da as OU,Ea as RF,Fa as hF,Ga as m3,Ha as HR,Ia as $F,Ja as EU,Ka as VU,La as AF,Ma as TU,Na as GF,Oa as gU,Pa as CU,Qa as n1,Ra as mU,Sa as cU,Ta as aU,Ua as rU,oa as pU,pa as oU,qa as nU,ra as eU,sa as KR,ta as vR,ua as tU,va as V3,wa as T3,xa as g3,ya as C3,za as fF}from"../chunk-shx43qev.js";import{Va as jf,Wa as LU}from"../chunk-rcz6xqsr.js";import{Xa as t4}from"../chunk-q4m9fgvw.js";import{Ab as c1,Bb as R0,Cb as p0,Eb as u0,Fb as c0,Gb as _3,Hb as Qf,Ib as U4,Jb as BU,Kb as KU,Lb as _U,Mb as dU,Nb as m1,Ob as zf,Pb as nh,Qb as k,Sb as F4,Tb as W4,db as sU,eb as lU,fb as Ff,gb as eh,hb as kh,kb as JU,lb as l0,mb as If,nb as XU,ob as zU,pb as pR,qb as PU,rb as qU,sb as uU,tb as N4,ub as GR,vb as Jf,wb as OR,xb as of,yb as z8,zb as i}from"../chunk-kwn176pr.js";import{Wb as h0,Yb as r1,_b as u4}from"../chunk-xn8m1vjf.js";import{$b as oh,ac as a1,bc as LA,ec as qR}from"../chunk-r9vkr7kz.js";import{nc as BR}from"../chunk-cr3jz0qz.js";import"../chunk-79ag9kvz.js";import{qc as fD}from"../chunk-j42e2g1d.js";import{rc as pS}from"../chunk-2cfneq8g.js";import{vc as c$,wc as p}from"../chunk-7pb9p4tj.js";import"../chunk-8xspwewa.js";import{zc as mY}from"../chunk-zja5jcxt.js";import{Ac as v,Bc as l,Cc as TR}from"../chunk-y8ggk3r3.js";var YW=l((Uy,SW)=>{var M5=function f(R){return J5(R)&&!X5(R)};function J5(f){return!!f&&typeof f==="object"}function X5(f){var R=Object.prototype.toString.call(f);return R==="[object RegExp]"||R==="[object Date]"||w5(f)}var z5=typeof Symbol==="function"&&Symbol.for,Q5=z5?Symbol.for("react.element"):60103;function w5(f){return f.$$typeof===Q5}function L5(f){return Array.isArray(f)?[]:{}}function Dh(f,R){return R.clone!==!1&&R.isMergeableObject(f)?Y0(L5(f),f,R):f}function I5(f,R,h){return f.concat(R).map(function($){return Dh($,h)})}function P5(f,R){if(!R.customMerge)return Y0;var h=R.customMerge(f);return typeof h==="function"?h:Y0}function q5(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(R){return Object.propertyIsEnumerable.call(f,R)}):[]}function FW(f){return Object.keys(f).concat(q5(f))}function WW(f,R){try{return R in f}catch(h){return!1}}function B5(f,R){return WW(f,R)&&!(Object.hasOwnProperty.call(f,R)&&Object.propertyIsEnumerable.call(f,R))}function K5(f,R,h){var $={};if(h.isMergeableObject(f))FW(f).forEach(function(A){$[A]=Dh(f[A],h)});return FW(R).forEach(function(A){if(B5(f,A))return;if(WW(f,A)&&h.isMergeableObject(R[A]))$[A]=P5(A,h)(f[A],R[A],h);else $[A]=Dh(R[A],h)}),$}function Y0(f,R,h){h=h||{},h.arrayMerge=h.arrayMerge||I5,h.isMergeableObject=h.isMergeableObject||M5,h.cloneUnlessOtherwiseSpecified=Dh;var $=Array.isArray(R),A=Array.isArray(f),G=$===A;if(!G)return Dh(R,h);else if($)return h.arrayMerge(f,R,h);else return K5(f,R,h)}Y0.all=function f(R,h){if(!Array.isArray(R))throw new Error("first argument should be an array");return R.reduce(function($,A){return Y0($,A,h)},{})};var v5=Y0;SW.exports=v5});var I$=l((wJ,jW)=>{function Af(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}Af.prototype.clone_empty=function(){var f=new Af(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f};Af.prototype.item=function(f){if(f<0)return this.__items[this.__items.length+f];else return this.__items[f]};Af.prototype.has_match=function(f){for(var R=this.__items.length-1;R>=0;R--)if(this.__items[R].match(f))return!0;return!1};Af.prototype.set_indent=function(f,R){if(this.is_empty())this.__indent_count=f||0,this.__alignment_count=R||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count)};Af.prototype._set_wrap_point=function(){if(this.__parent.wrap_line_length)this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count};Af.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};Af.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;if(f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" ")f.__items.splice(0,1),f.__character_count-=1;return!0}return!1};Af.prototype.is_empty=function(){return this.__items.length===0};Af.prototype.last=function(){if(!this.is_empty())return this.__items[this.__items.length-1];else return null};Af.prototype.push=function(f){this.__items.push(f);var R=f.lastIndexOf(`
3
+ `);if(R!==-1)this.__character_count=f.length-R;else this.__character_count+=f.length};Af.prototype.pop=function(){var f=null;if(!this.is_empty())f=this.__items.pop(),this.__character_count-=f.length;return f};Af.prototype._remove_indent=function(){if(this.__indent_count>0)this.__indent_count-=1,this.__character_count-=this.__parent.indent_size};Af.prototype._remove_wrap_indent=function(){if(this.__wrap_point_indent_count>0)this.__wrap_point_indent_count-=1};Af.prototype.trim=function(){while(this.last()===" ")this.__items.pop(),this.__character_count-=1};Af.prototype.toString=function(){var f="";if(this.is_empty()){if(this.__parent.indent_empty_lines)f=this.__parent.get_indent_string(this.__indent_count)}else f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("");return f};function Zh(f,R){if(this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,!f.indent_with_tabs)this.__indent_string=new Array(f.indent_size+1).join(f.indent_char);if(R=R||"",f.indent_level>0)R=new Array(f.indent_level+1).join(this.__indent_string);this.__base_string=R,this.__base_string_length=R.length}Zh.prototype.get_indent_size=function(f,R){var h=this.__base_string_length;if(R=R||0,f<0)h=0;return h+=f*this.__indent_size,h+=R,h};Zh.prototype.get_indent_string=function(f,R){var h=this.__base_string;if(R=R||0,f<0)f=0,h="";return R+=f*this.__indent_size,this.__ensure_cache(R),h+=this.__cache[R],h};Zh.prototype.__ensure_cache=function(f){while(f>=this.__cache.length)this.__add_column()};Zh.prototype.__add_column=function(){var f=this.__cache.length,R=0,h="";if(this.__indent_size&&f>=this.__indent_size)R=Math.floor(f/this.__indent_size),f-=R*this.__indent_size,h=new Array(R+1).join(this.__indent_string);if(f)h+=new Array(f+1).join(" ");this.__cache.push(h)};function Gf(f,R){this.__indent_cache=new Zh(f,R),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new Af(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}Gf.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};Gf.prototype.get_line_number=function(){return this.__lines.length};Gf.prototype.get_indent_string=function(f,R){return this.__indent_cache.get_indent_string(f,R)};Gf.prototype.get_indent_size=function(f,R){return this.__indent_cache.get_indent_size(f,R)};Gf.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};Gf.prototype.add_new_line=function(f){if(this.is_empty()||!f&&this.just_added_newline())return!1;if(!this.raw)this.__add_outputline();return!0};Gf.prototype.get_code=function(f){this.trim(!0);var R=this.current_line.pop();if(R){if(R[R.length-1]===`
4
4
  `)R=R.replace(/\n+$/g,"");this.current_line.push(R)}if(this._end_with_newline)this.__add_outputline();var h=this.__lines.join(`
5
5
  `);if(f!==`
6
- `)h=h.replace(/[\n]/g,f);return h};Gf.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};Gf.prototype.set_indent=function(f,R){if(f=f||0,R=R||0,this.next_line.set_indent(f,R),this.__lines.length>1)return this.current_line.set_indent(f,R),!0;return this.current_line.set_indent(),!1};Gf.prototype.add_raw_token=function(f){for(var R=0;R<f.newlines;R++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1};Gf.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()};Gf.prototype.__add_space_before_token=function(){if(this.space_before_token&&!this.just_added_newline()){if(!this.non_breaking_space)this.set_wrap_point();this.current_line.push(" ")}};Gf.prototype.remove_indent=function(f){var R=this.__lines.length;while(f<R)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()};Gf.prototype.trim=function(f){f=f===void 0?!1:f,this.current_line.trim();while(f&&this.__lines.length>1&&this.current_line.is_empty())this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};Gf.prototype.just_added_newline=function(){return this.current_line.is_empty()};Gf.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};Gf.prototype.ensure_empty_line_above=function(f,R){var h=this.__lines.length-2;while(h>=0){var $=this.__lines[h];if($.is_empty())break;else if($.item(0).indexOf(f)!==0&&$.item(-1)!==R){this.__lines.splice(h+1,0,new Af(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}};JJ.Output=Gf});var jG=l((QJ,KW)=>{function zJ(f,R,h,$){this.type=f,this.text=R,this.comments_before=null,this.newlines=h||0,this.whitespace_before=$||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}QJ.Token=zJ});var VG=l((PJ)=>{var LJ="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",vW="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",OG="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",yW="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",EG="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",jW="(?:"+EG+"|["+LJ+OG+"])",IJ="(?:"+EG+"|["+vW+OG+yW+"])*";PJ.identifier=new RegExp(jW+IJ,"g");PJ.identifierStart=new RegExp(jW);PJ.identifierMatch=new RegExp("(?:"+EG+"|["+vW+OG+yW+"])+");PJ.newline=/[\n\r\u2028\u2029]/;PJ.lineBreak=new RegExp(`\r
7
- |`+PJ.newline.source);PJ.allLineBreaks=new RegExp(PJ.lineBreak.source,"g")});var q$=l((yJ,P$)=>{function DR(f,R){if(this.raw_options=VW(f,R),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),!this.preserve_newlines)this.max_preserve_newlines=0;if(this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char==="\t"),this.indent_with_tabs){if(this.indent_char="\t",this.indent_size===1)this.indent_size=4}this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}DR.prototype._get_array=function(f,R){var h=this.raw_options[f],$=R||[];if(typeof h==="object"){if(h!==null&&typeof h.concat==="function")$=h.concat()}else if(typeof h==="string")$=h.split(/[^a-zA-Z0-9_\/\-]+/);return $};DR.prototype._get_boolean=function(f,R){var h=this.raw_options[f],$=h===void 0?!!R:!!h;return $};DR.prototype._get_characters=function(f,R){var h=this.raw_options[f],$=R||"";if(typeof h==="string")$=h.replace(/\\r/,"\r").replace(/\\n/,`
8
- `).replace(/\\t/,"\t");return $};DR.prototype._get_number=function(f,R){var h=this.raw_options[f];if(R=parseInt(R,10),isNaN(R))R=0;var $=parseInt(h,10);if(isNaN($))$=R;return $};DR.prototype._get_selection=function(f,R,h){var $=this._get_selection_list(f,R,h);if($.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
6
+ `)h=h.replace(/[\n]/g,f);return h};Gf.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};Gf.prototype.set_indent=function(f,R){if(f=f||0,R=R||0,this.next_line.set_indent(f,R),this.__lines.length>1)return this.current_line.set_indent(f,R),!0;return this.current_line.set_indent(),!1};Gf.prototype.add_raw_token=function(f){for(var R=0;R<f.newlines;R++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1};Gf.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()};Gf.prototype.__add_space_before_token=function(){if(this.space_before_token&&!this.just_added_newline()){if(!this.non_breaking_space)this.set_wrap_point();this.current_line.push(" ")}};Gf.prototype.remove_indent=function(f){var R=this.__lines.length;while(f<R)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()};Gf.prototype.trim=function(f){f=f===void 0?!1:f,this.current_line.trim();while(f&&this.__lines.length>1&&this.current_line.is_empty())this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};Gf.prototype.just_added_newline=function(){return this.current_line.is_empty()};Gf.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};Gf.prototype.ensure_empty_line_above=function(f,R){var h=this.__lines.length-2;while(h>=0){var $=this.__lines[h];if($.is_empty())break;else if($.item(0).indexOf(f)!==0&&$.item(-1)!==R){this.__lines.splice(h+1,0,new Af(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}};wJ.Output=Gf});var jG=l((PJ,OW)=>{function IJ(f,R,h,$){this.type=f,this.text=R,this.comments_before=null,this.newlines=h||0,this.whitespace_before=$||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}PJ.Token=IJ});var VG=l((vJ)=>{var BJ="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",EW="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",OG="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",VW="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",EG="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",TW="(?:"+EG+"|["+BJ+OG+"])",KJ="(?:"+EG+"|["+EW+OG+VW+"])*";vJ.identifier=new RegExp(TW+KJ,"g");vJ.identifierStart=new RegExp(TW);vJ.identifierMatch=new RegExp("(?:"+EG+"|["+EW+OG+VW+"])+");vJ.newline=/[\n\r\u2028\u2029]/;vJ.lineBreak=new RegExp(`\r
7
+ |`+vJ.newline.source);vJ.allLineBreaks=new RegExp(vJ.lineBreak.source,"g")});var q$=l((VJ,P$)=>{function YR(f,R){if(this.raw_options=mW(f,R),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),!this.preserve_newlines)this.max_preserve_newlines=0;if(this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char==="\t"),this.indent_with_tabs){if(this.indent_char="\t",this.indent_size===1)this.indent_size=4}this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}YR.prototype._get_array=function(f,R){var h=this.raw_options[f],$=R||[];if(typeof h==="object"){if(h!==null&&typeof h.concat==="function")$=h.concat()}else if(typeof h==="string")$=h.split(/[^a-zA-Z0-9_\/\-]+/);return $};YR.prototype._get_boolean=function(f,R){var h=this.raw_options[f],$=h===void 0?!!R:!!h;return $};YR.prototype._get_characters=function(f,R){var h=this.raw_options[f],$=R||"";if(typeof h==="string")$=h.replace(/\\r/,"\r").replace(/\\n/,`
8
+ `).replace(/\\t/,"\t");return $};YR.prototype._get_number=function(f,R){var h=this.raw_options[f];if(R=parseInt(R,10),isNaN(R))R=0;var $=parseInt(h,10);if(isNaN($))$=R;return $};YR.prototype._get_selection=function(f,R,h){var $=this._get_selection_list(f,R,h);if($.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
9
9
  `+R+`
10
- You passed in: '`+this.raw_options[f]+"'");return $[0]};DR.prototype._get_selection_list=function(f,R,h){if(!R||R.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[R[0]],!this._is_valid_selection(h,R))throw new Error("Invalid Default Value!");var $=this._get_array(f,h);if(!this._is_valid_selection($,R))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
10
+ You passed in: '`+this.raw_options[f]+"'");return $[0]};YR.prototype._get_selection_list=function(f,R,h){if(!R||R.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[R[0]],!this._is_valid_selection(h,R))throw new Error("Invalid Default Value!");var $=this._get_array(f,h);if(!this._is_valid_selection($,R))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
11
11
  `+R+`
12
- You passed in: '`+this.raw_options[f]+"'");return $};DR.prototype._is_valid_selection=function(f,R){return f.length&&R.length&&!f.some(function(h){return R.indexOf(h)===-1})};function VW(f,R){var h={};f=TW(f);var $;for($ in f)if($!==R)h[$]=f[$];if(R&&f[R])for($ in f[R])h[$]=f[R][$];return h}function TW(f){var R={},h;for(h in f){var $=h.replace(/-/g,"_");R[$]=f[h]}return R}yJ.Options=DR;yJ.normalizeOpts=TW;yJ.mergeOpts=VW});var TG=l((TJ,mW)=>{var gW=q$().Options,VJ=["before-newline","after-newline","preserve-newline"];function CW(f){gW.call(this,f,"js");var R=this.raw_options.brace_style||null;if(R==="expand-strict")this.raw_options.brace_style="expand";else if(R==="collapse-preserve-inline")this.raw_options.brace_style="collapse,preserve-inline";else if(this.raw_options.braces_on_own_line!==void 0)this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse";var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var $=0;$<h.length;$++)if(h[$]==="preserve-inline")this.brace_preserve_inline=!0;else this.brace_style=h[$];if(this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",VJ),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy)this.space_after_anon_function=!0}CW.prototype=new gW;TJ.Options=CW});var B$=l((CJ,bW)=>{var cW=RegExp.prototype.hasOwnProperty("sticky");function Yf(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}Yf.prototype.restart=function(){this.__position=0};Yf.prototype.back=function(){if(this.__position>0)this.__position-=1};Yf.prototype.hasNext=function(){return this.__position<this.__input_length};Yf.prototype.next=function(){var f=null;if(this.hasNext())f=this.__input.charAt(this.__position),this.__position+=1;return f};Yf.prototype.peek=function(f){var R=null;if(f=f||0,f+=this.__position,f>=0&&f<this.__input_length)R=this.__input.charAt(f);return R};Yf.prototype.__match=function(f,R){f.lastIndex=R;var h=f.exec(this.__input);if(h&&!(cW&&f.sticky)){if(h.index!==R)h=null}return h};Yf.prototype.test=function(f,R){if(R=R||0,R+=this.__position,R>=0&&R<this.__input_length)return!!this.__match(f,R);else return!1};Yf.prototype.testChar=function(f,R){var h=this.peek(R);return f.lastIndex=0,h!==null&&f.test(h)};Yf.prototype.match=function(f){var R=this.__match(f,this.__position);if(R)this.__position+=R[0].length;else R=null;return R};Yf.prototype.read=function(f,R,h){var $="",A;if(f){if(A=this.match(f),A)$+=A[0]}if(R&&(A||!f))$+=this.readUntil(R,h);return $};Yf.prototype.readUntil=function(f,R){var h="",$=this.__position;f.lastIndex=this.__position;var A=f.exec(this.__input);if(A){if($=A.index,R)$+=A[0].length}else $=this.__input_length;return h=this.__input.substring(this.__position,$),this.__position=$,h};Yf.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)};Yf.prototype.get_regexp=function(f,R){var h=null,$="g";if(R&&cW)$="y";if(typeof f==="string"&&f!=="")h=new RegExp(f,$);else if(f)h=new RegExp(f.source,$);return h};Yf.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))};Yf.prototype.peekUntilAfter=function(f){var R=this.__position,h=this.readUntilAfter(f);return this.__position=R,h};Yf.prototype.lookBack=function(f){var R=this.__position-1;return R>=f.length&&this.__input.substring(R-f.length,R).toLowerCase()===f};CJ.InputScanner=Yf});var kW=l((cJ,xW)=>{function bR(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}bR.prototype.restart=function(){this.__position=0};bR.prototype.isEmpty=function(){return this.__tokens_length===0};bR.prototype.hasNext=function(){return this.__position<this.__tokens_length};bR.prototype.next=function(){var f=null;if(this.hasNext())f=this.__tokens[this.__position],this.__position+=1;return f};bR.prototype.peek=function(f){var R=null;if(f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length)R=this.__tokens[f];return R};bR.prototype.add=function(f){if(this.__parent_token)f.parent=this.__parent_token;this.__tokens.push(f),this.__tokens_length+=1};cJ.TokenStream=bR});var Jh=l((xJ,sW)=>{function af(f,R){if(this._input=f,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,R)this._starting_pattern=this._input.get_regexp(R._starting_pattern,!0),this._match_pattern=this._input.get_regexp(R._match_pattern,!0),this._until_pattern=this._input.get_regexp(R._until_pattern),this._until_after=R._until_after}af.prototype.read=function(){var f=this._input.read(this._starting_pattern);if(!this._starting_pattern||f)f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after);return f};af.prototype.read_match=function(){return this._input.match(this._match_pattern)};af.prototype.until_after=function(f){var R=this._create();return R._until_after=!0,R._until_pattern=this._input.get_regexp(f),R._update(),R};af.prototype.until=function(f){var R=this._create();return R._until_after=!1,R._until_pattern=this._input.get_regexp(f),R._update(),R};af.prototype.starting_with=function(f){var R=this._create();return R._starting_pattern=this._input.get_regexp(f,!0),R._update(),R};af.prototype.matching=function(f){var R=this._create();return R._match_pattern=this._input.get_regexp(f,!0),R._update(),R};af.prototype._create=function(){return new af(this._input,this)};af.prototype._update=function(){};xJ.Pattern=af});var dW=l((sJ,_W)=>{var lW=Jh().Pattern;function ZR(f,R){if(lW.call(this,f,R),R)this._line_regexp=this._input.get_regexp(R._line_regexp);else this.__set_whitespace_patterns("","");this.newline_count=0,this.whitespace_before_token=""}ZR.prototype=new lW;ZR.prototype.__set_whitespace_patterns=function(f,R){f+="\\t ",R+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+R+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+R+"]")};ZR.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var R=this.__split(this._newline_regexp,f);this.newline_count=R.length-1,this.whitespace_before_token=R[this.newline_count]}return f};ZR.prototype.matching=function(f,R){var h=this._create();return h.__set_whitespace_patterns(f,R),h._update(),h};ZR.prototype._create=function(){return new ZR(this._input,this)};ZR.prototype.__split=function(f,R){f.lastIndex=0;var h=0,$=[],A=f.exec(R);while(A)$.push(R.substring(h,A.index)),h=A.index+A[0].length,A=f.exec(R);if(h<R.length)$.push(R.substring(h,R.length));else $.push("");return $};sJ.WhitespacePattern=ZR});var zh=l((aJ,CG)=>{var _J=B$().InputScanner,aW=jG().Token,gG=kW().TokenStream,dJ=dW().WhitespacePattern,Xh={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},rf=function(f,R){this._input=new _J(f),this._options=R||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new dJ(this._input)};rf.prototype.tokenize=function(){this._input.restart(),this.__tokens=new gG,this._reset();var f,R=new aW(Xh.START,""),h=null,$=[],A=new gG;while(R.type!==Xh.EOF){f=this._get_next_token(R,h);while(this._is_comment(f))A.add(f),f=this._get_next_token(R,h);if(!A.isEmpty())f.comments_before=A,A=new gG;if(f.parent=h,this._is_opening(f))$.push(h),h=f;else if(h&&this._is_closing(f,h))f.opened=h,h.closed=f,h=$.pop(),f.parent=h;f.previous=R,R.next=f,this.__tokens.add(f),R=f}return this.__tokens};rf.prototype._is_first_token=function(){return this.__tokens.isEmpty()};rf.prototype._reset=function(){};rf.prototype._get_next_token=function(f,R){this._readWhitespace();var h=this._input.read(/.+/g);if(h)return this._create_token(Xh.RAW,h);else return this._create_token(Xh.EOF,"")};rf.prototype._is_comment=function(f){return!1};rf.prototype._is_opening=function(f){return!1};rf.prototype._is_closing=function(f,R){return!1};rf.prototype._create_token=function(f,R){var h=new aW(f,R,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return h};rf.prototype._readWhitespace=function(){return this._patterns.whitespace.read()};aJ.Tokenizer=rf;aJ.TOKEN=Xh});var K$=l((pJ,rW)=>{function mG(f,R){f=typeof f==="string"?f:f.source,R=typeof R==="string"?R:R.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+R,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+R,"g")}mG.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var R={};this.__directive_pattern.lastIndex=0;var h=this.__directive_pattern.exec(f);while(h)R[h[1]]=h[2],h=this.__directive_pattern.exec(f);return R};mG.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)};pJ.Directives=mG});var xG=l((nJ,iW)=>{var cG=Jh().Pattern,bG={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function xf(f,R){if(cG.call(this,f,R),this.__template_pattern=null,this._disabled=Object.assign({},bG),this._excluded=Object.assign({},bG),R)this.__template_pattern=this._input.get_regexp(R.__template_pattern),this._excluded=Object.assign(this._excluded,R._excluded),this._disabled=Object.assign(this._disabled,R._disabled);var h=new cG(f);this.__patterns={handlebars_comment:h.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:h.starting_with(/{{{/).until_after(/}}}/),handlebars:h.starting_with(/{{/).until_after(/}}/),php:h.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:h.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:h.starting_with(/{%/).until_after(/%}/),django_value:h.starting_with(/{{/).until_after(/}}/),django_comment:h.starting_with(/{#/).until_after(/#}/),smarty:h.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:h.starting_with(/{\*/).until_after(/\*}/),smarty_literal:h.starting_with(/{literal}/).until_after(/{\/literal}/)}}xf.prototype=new cG;xf.prototype._create=function(){return new xf(this._input,this)};xf.prototype._update=function(){this.__set_templated_pattern()};xf.prototype.disable=function(f){var R=this._create();return R._disabled[f]=!0,R._update(),R};xf.prototype.read_options=function(f){var R=this._create();for(var h in bG)R._disabled[h]=f.templating.indexOf(h)===-1;return R._update(),R};xf.prototype.exclude=function(f){var R=this._create();return R._excluded[f]=!0,R._update(),R};xf.prototype.read=function(){var f="";if(this._match_pattern)f=this._input.read(this._starting_pattern);else f=this._input.read(this._starting_pattern,this.__template_pattern);var R=this._read_template();while(R){if(this._match_pattern)R+=this._input.read(this._match_pattern);else R+=this._input.readUntil(this.__template_pattern);f+=R,R=this._read_template()}if(this._until_after)f+=this._input.readUntilAfter(this._until_pattern);return f};xf.prototype.__set_templated_pattern=function(){var f=[];if(!this._disabled.php)f.push(this.__patterns.php._starting_pattern.source);if(!this._disabled.handlebars)f.push(this.__patterns.handlebars._starting_pattern.source);if(!this._disabled.angular)f.push(this.__patterns.handlebars._starting_pattern.source);if(!this._disabled.erb)f.push(this.__patterns.erb._starting_pattern.source);if(!this._disabled.django)f.push(this.__patterns.django._starting_pattern.source),f.push(this.__patterns.django_value._starting_pattern.source),f.push(this.__patterns.django_comment._starting_pattern.source);if(!this._disabled.smarty)f.push(this.__patterns.smarty._starting_pattern.source);if(this._until_pattern)f.push(this._until_pattern.source);this.__template_pattern=this._input.get_regexp("(?:"+f.join("|")+")")};xf.prototype._read_template=function(){var f="",R=this._input.peek();if(R==="<"){var h=this._input.peek(1);if(!this._disabled.php&&!this._excluded.php&&h==="?")f=f||this.__patterns.php.read();if(!this._disabled.erb&&!this._excluded.erb&&h==="%")f=f||this.__patterns.erb.read()}else if(R==="{"){if(!this._disabled.handlebars&&!this._excluded.handlebars)f=f||this.__patterns.handlebars_comment.read(),f=f||this.__patterns.handlebars_unescaped.read(),f=f||this.__patterns.handlebars.read();if(!this._disabled.django){if(!this._excluded.django&&!this._excluded.handlebars)f=f||this.__patterns.django_value.read();if(!this._excluded.django)f=f||this.__patterns.django_comment.read(),f=f||this.__patterns.django.read()}if(!this._disabled.smarty){if(this._disabled.django&&this._disabled.handlebars)f=f||this.__patterns.smarty_comment.read(),f=f||this.__patterns.smarty_literal.read(),f=f||this.__patterns.smarty.read()}}return f};nJ.TemplatablePattern=xf});var wh=l((WX,Qh)=>{var uJ=B$().InputScanner,oW=zh().Tokenizer,kG=zh().TOKEN,tJ=K$().Directives,Of=VG(),fX=Jh().Pattern,RX=xG().TemplatablePattern;function sG(f,R){return R.indexOf(f)!==-1}var X={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:kG.START,RAW:kG.RAW,EOF:kG.EOF},pW=new tJ(/\/\*/,/\*\//),hX=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,$X=/[0-9]/,AX=/[^\d\.]/,GX=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),xR=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";xR=xR.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");xR="\\?\\.(?!\\d) "+xR;xR=xR.replace(/ /g,"|");var HX=new RegExp(xR),nW="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),NX=nW.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),UX=new RegExp("^(?:"+NX.join("|")+")$"),v$,Hf=function(f,R){oW.call(this,f,R),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var h=new fX(this._input),$=new RX(this._input).read_options(this._options);this.__patterns={template:$,identifier:$.starting_with(Of.identifier).matching(Of.identifierMatch),number:h.matching(hX),punct:h.matching(HX),comment:h.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:h.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:h.matching(/<!--/),html_comment_end:h.matching(/-->/),include:h.starting_with(/#include/).until_after(Of.lineBreak),shebang:h.starting_with(/#!/).until_after(Of.lineBreak),xml:h.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:$.until(/['\\\n\r\u2028\u2029]/),double_quote:$.until(/["\\\n\r\u2028\u2029]/),template_text:$.until(/[`\\$]/),template_expression:$.until(/[`}\\]/)}};Hf.prototype=new oW;Hf.prototype._is_comment=function(f){return f.type===X.COMMENT||f.type===X.BLOCK_COMMENT||f.type===X.UNKNOWN};Hf.prototype._is_opening=function(f){return f.type===X.START_BLOCK||f.type===X.START_EXPR};Hf.prototype._is_closing=function(f,R){return(f.type===X.END_BLOCK||f.type===X.END_EXPR)&&(R&&(f.text==="]"&&R.text==="["||f.text===")"&&R.text==="("||f.text==="}"&&R.text==="{"))};Hf.prototype._reset=function(){v$=!1};Hf.prototype._get_next_token=function(f,R){var h=null;this._readWhitespace();var $=this._input.peek();if($===null)return this._create_token(X.EOF,"");return h=h||this._read_non_javascript($),h=h||this._read_string($),h=h||this._read_pair($,this._input.peek(1)),h=h||this._read_word(f),h=h||this._read_singles($),h=h||this._read_comment($),h=h||this._read_regexp($,f),h=h||this._read_xml($,f),h=h||this._read_punctuation(),h=h||this._create_token(X.UNKNOWN,this._input.next()),h};Hf.prototype._read_word=function(f){var R=this.__patterns.identifier.read();if(R!==""){if(R=R.replace(Of.allLineBreaks,`
13
- `),!(f.type===X.DOT||f.type===X.RESERVED&&(f.text==="set"||f.text==="get"))&&UX.test(R)){if((R==="in"||R==="of")&&(f.type===X.WORD||f.type===X.STRING))return this._create_token(X.OPERATOR,R);return this._create_token(X.RESERVED,R)}return this._create_token(X.WORD,R)}if(R=this.__patterns.number.read(),R!=="")return this._create_token(X.WORD,R)};Hf.prototype._read_singles=function(f){var R=null;if(f==="("||f==="[")R=this._create_token(X.START_EXPR,f);else if(f===")"||f==="]")R=this._create_token(X.END_EXPR,f);else if(f==="{")R=this._create_token(X.START_BLOCK,f);else if(f==="}")R=this._create_token(X.END_BLOCK,f);else if(f===";")R=this._create_token(X.SEMICOLON,f);else if(f==="."&&AX.test(this._input.peek(1)))R=this._create_token(X.DOT,f);else if(f===",")R=this._create_token(X.COMMA,f);if(R)this._input.next();return R};Hf.prototype._read_pair=function(f,R){var h=null;if(f==="#"&&R==="{")h=this._create_token(X.START_BLOCK,f+R);if(h)this._input.next(),this._input.next();return h};Hf.prototype._read_punctuation=function(){var f=this.__patterns.punct.read();if(f!=="")if(f==="=")return this._create_token(X.EQUALS,f);else if(f==="?.")return this._create_token(X.DOT,f);else return this._create_token(X.OPERATOR,f)};Hf.prototype._read_non_javascript=function(f){var R="";if(f==="#"){if(this._is_first_token()){if(R=this.__patterns.shebang.read(),R)return this._create_token(X.UNKNOWN,R.trim()+`
12
+ You passed in: '`+this.raw_options[f]+"'");return $};YR.prototype._is_valid_selection=function(f,R){return f.length&&R.length&&!f.some(function(h){return R.indexOf(h)===-1})};function mW(f,R){var h={};f=cW(f);var $;for($ in f)if($!==R)h[$]=f[$];if(R&&f[R])for($ in f[R])h[$]=f[R][$];return h}function cW(f){var R={},h;for(h in f){var $=h.replace(/-/g,"_");R[$]=f[h]}return R}VJ.Options=YR;VJ.normalizeOpts=cW;VJ.mergeOpts=mW});var TG=l((cJ,kW)=>{var bW=q$().Options,mJ=["before-newline","after-newline","preserve-newline"];function xW(f){bW.call(this,f,"js");var R=this.raw_options.brace_style||null;if(R==="expand-strict")this.raw_options.brace_style="expand";else if(R==="collapse-preserve-inline")this.raw_options.brace_style="collapse,preserve-inline";else if(this.raw_options.braces_on_own_line!==void 0)this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse";var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var $=0;$<h.length;$++)if(h[$]==="preserve-inline")this.brace_preserve_inline=!0;else this.brace_style=h[$];if(this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",mJ),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy)this.space_after_anon_function=!0}xW.prototype=new bW;cJ.Options=xW});var B$=l((xJ,lW)=>{var sW=RegExp.prototype.hasOwnProperty("sticky");function Yf(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}Yf.prototype.restart=function(){this.__position=0};Yf.prototype.back=function(){if(this.__position>0)this.__position-=1};Yf.prototype.hasNext=function(){return this.__position<this.__input_length};Yf.prototype.next=function(){var f=null;if(this.hasNext())f=this.__input.charAt(this.__position),this.__position+=1;return f};Yf.prototype.peek=function(f){var R=null;if(f=f||0,f+=this.__position,f>=0&&f<this.__input_length)R=this.__input.charAt(f);return R};Yf.prototype.__match=function(f,R){f.lastIndex=R;var h=f.exec(this.__input);if(h&&!(sW&&f.sticky)){if(h.index!==R)h=null}return h};Yf.prototype.test=function(f,R){if(R=R||0,R+=this.__position,R>=0&&R<this.__input_length)return!!this.__match(f,R);else return!1};Yf.prototype.testChar=function(f,R){var h=this.peek(R);return f.lastIndex=0,h!==null&&f.test(h)};Yf.prototype.match=function(f){var R=this.__match(f,this.__position);if(R)this.__position+=R[0].length;else R=null;return R};Yf.prototype.read=function(f,R,h){var $="",A;if(f){if(A=this.match(f),A)$+=A[0]}if(R&&(A||!f))$+=this.readUntil(R,h);return $};Yf.prototype.readUntil=function(f,R){var h="",$=this.__position;f.lastIndex=this.__position;var A=f.exec(this.__input);if(A){if($=A.index,R)$+=A[0].length}else $=this.__input_length;return h=this.__input.substring(this.__position,$),this.__position=$,h};Yf.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)};Yf.prototype.get_regexp=function(f,R){var h=null,$="g";if(R&&sW)$="y";if(typeof f==="string"&&f!=="")h=new RegExp(f,$);else if(f)h=new RegExp(f.source,$);return h};Yf.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))};Yf.prototype.peekUntilAfter=function(f){var R=this.__position,h=this.readUntilAfter(f);return this.__position=R,h};Yf.prototype.lookBack=function(f){var R=this.__position-1;return R>=f.length&&this.__input.substring(R-f.length,R).toLowerCase()===f};xJ.InputScanner=Yf});var dW=l((sJ,_W)=>{function cR(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}cR.prototype.restart=function(){this.__position=0};cR.prototype.isEmpty=function(){return this.__tokens_length===0};cR.prototype.hasNext=function(){return this.__position<this.__tokens_length};cR.prototype.next=function(){var f=null;if(this.hasNext())f=this.__tokens[this.__position],this.__position+=1;return f};cR.prototype.peek=function(f){var R=null;if(f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length)R=this.__tokens[f];return R};cR.prototype.add=function(f){if(this.__parent_token)f.parent=this.__parent_token;this.__tokens.push(f),this.__tokens_length+=1};sJ.TokenStream=cR});var Mh=l((_J,aW)=>{function af(f,R){if(this._input=f,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,R)this._starting_pattern=this._input.get_regexp(R._starting_pattern,!0),this._match_pattern=this._input.get_regexp(R._match_pattern,!0),this._until_pattern=this._input.get_regexp(R._until_pattern),this._until_after=R._until_after}af.prototype.read=function(){var f=this._input.read(this._starting_pattern);if(!this._starting_pattern||f)f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after);return f};af.prototype.read_match=function(){return this._input.match(this._match_pattern)};af.prototype.until_after=function(f){var R=this._create();return R._until_after=!0,R._until_pattern=this._input.get_regexp(f),R._update(),R};af.prototype.until=function(f){var R=this._create();return R._until_after=!1,R._until_pattern=this._input.get_regexp(f),R._update(),R};af.prototype.starting_with=function(f){var R=this._create();return R._starting_pattern=this._input.get_regexp(f,!0),R._update(),R};af.prototype.matching=function(f){var R=this._create();return R._match_pattern=this._input.get_regexp(f,!0),R._update(),R};af.prototype._create=function(){return new af(this._input,this)};af.prototype._update=function(){};_J.Pattern=af});var pW=l((aJ,iW)=>{var rW=Mh().Pattern;function DR(f,R){if(rW.call(this,f,R),R)this._line_regexp=this._input.get_regexp(R._line_regexp);else this.__set_whitespace_patterns("","");this.newline_count=0,this.whitespace_before_token=""}DR.prototype=new rW;DR.prototype.__set_whitespace_patterns=function(f,R){f+="\\t ",R+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+R+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+R+"]")};DR.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var R=this.__split(this._newline_regexp,f);this.newline_count=R.length-1,this.whitespace_before_token=R[this.newline_count]}return f};DR.prototype.matching=function(f,R){var h=this._create();return h.__set_whitespace_patterns(f,R),h._update(),h};DR.prototype._create=function(){return new DR(this._input,this)};DR.prototype.__split=function(f,R){f.lastIndex=0;var h=0,$=[],A=f.exec(R);while(A)$.push(R.substring(h,A.index)),h=A.index+A[0].length,A=f.exec(R);if(h<R.length)$.push(R.substring(h,R.length));else $.push("");return $};aJ.WhitespacePattern=DR});var Xh=l((oJ,CG)=>{var iJ=B$().InputScanner,oW=jG().Token,gG=dW().TokenStream,pJ=pW().WhitespacePattern,Jh={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},rf=function(f,R){this._input=new iJ(f),this._options=R||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new pJ(this._input)};rf.prototype.tokenize=function(){this._input.restart(),this.__tokens=new gG,this._reset();var f,R=new oW(Jh.START,""),h=null,$=[],A=new gG;while(R.type!==Jh.EOF){f=this._get_next_token(R,h);while(this._is_comment(f))A.add(f),f=this._get_next_token(R,h);if(!A.isEmpty())f.comments_before=A,A=new gG;if(f.parent=h,this._is_opening(f))$.push(h),h=f;else if(h&&this._is_closing(f,h))f.opened=h,h.closed=f,h=$.pop(),f.parent=h;f.previous=R,R.next=f,this.__tokens.add(f),R=f}return this.__tokens};rf.prototype._is_first_token=function(){return this.__tokens.isEmpty()};rf.prototype._reset=function(){};rf.prototype._get_next_token=function(f,R){this._readWhitespace();var h=this._input.read(/.+/g);if(h)return this._create_token(Jh.RAW,h);else return this._create_token(Jh.EOF,"")};rf.prototype._is_comment=function(f){return!1};rf.prototype._is_opening=function(f){return!1};rf.prototype._is_closing=function(f,R){return!1};rf.prototype._create_token=function(f,R){var h=new oW(f,R,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return h};rf.prototype._readWhitespace=function(){return this._patterns.whitespace.read()};oJ.Tokenizer=rf;oJ.TOKEN=Jh});var K$=l((uJ,nW)=>{function mG(f,R){f=typeof f==="string"?f:f.source,R=typeof R==="string"?R:R.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+R,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+R,"g")}mG.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var R={};this.__directive_pattern.lastIndex=0;var h=this.__directive_pattern.exec(f);while(h)R[h[1]]=h[2],h=this.__directive_pattern.exec(f);return R};mG.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)};uJ.Directives=mG});var xG=l((fX,eW)=>{var cG=Mh().Pattern,bG={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function xf(f,R){if(cG.call(this,f,R),this.__template_pattern=null,this._disabled=Object.assign({},bG),this._excluded=Object.assign({},bG),R)this.__template_pattern=this._input.get_regexp(R.__template_pattern),this._excluded=Object.assign(this._excluded,R._excluded),this._disabled=Object.assign(this._disabled,R._disabled);var h=new cG(f);this.__patterns={handlebars_comment:h.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:h.starting_with(/{{{/).until_after(/}}}/),handlebars:h.starting_with(/{{/).until_after(/}}/),php:h.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:h.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:h.starting_with(/{%/).until_after(/%}/),django_value:h.starting_with(/{{/).until_after(/}}/),django_comment:h.starting_with(/{#/).until_after(/#}/),smarty:h.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:h.starting_with(/{\*/).until_after(/\*}/),smarty_literal:h.starting_with(/{literal}/).until_after(/{\/literal}/)}}xf.prototype=new cG;xf.prototype._create=function(){return new xf(this._input,this)};xf.prototype._update=function(){this.__set_templated_pattern()};xf.prototype.disable=function(f){var R=this._create();return R._disabled[f]=!0,R._update(),R};xf.prototype.read_options=function(f){var R=this._create();for(var h in bG)R._disabled[h]=f.templating.indexOf(h)===-1;return R._update(),R};xf.prototype.exclude=function(f){var R=this._create();return R._excluded[f]=!0,R._update(),R};xf.prototype.read=function(){var f="";if(this._match_pattern)f=this._input.read(this._starting_pattern);else f=this._input.read(this._starting_pattern,this.__template_pattern);var R=this._read_template();while(R){if(this._match_pattern)R+=this._input.read(this._match_pattern);else R+=this._input.readUntil(this.__template_pattern);f+=R,R=this._read_template()}if(this._until_after)f+=this._input.readUntilAfter(this._until_pattern);return f};xf.prototype.__set_templated_pattern=function(){var f=[];if(!this._disabled.php)f.push(this.__patterns.php._starting_pattern.source);if(!this._disabled.handlebars)f.push(this.__patterns.handlebars._starting_pattern.source);if(!this._disabled.angular)f.push(this.__patterns.handlebars._starting_pattern.source);if(!this._disabled.erb)f.push(this.__patterns.erb._starting_pattern.source);if(!this._disabled.django)f.push(this.__patterns.django._starting_pattern.source),f.push(this.__patterns.django_value._starting_pattern.source),f.push(this.__patterns.django_comment._starting_pattern.source);if(!this._disabled.smarty)f.push(this.__patterns.smarty._starting_pattern.source);if(this._until_pattern)f.push(this._until_pattern.source);this.__template_pattern=this._input.get_regexp("(?:"+f.join("|")+")")};xf.prototype._read_template=function(){var f="",R=this._input.peek();if(R==="<"){var h=this._input.peek(1);if(!this._disabled.php&&!this._excluded.php&&h==="?")f=f||this.__patterns.php.read();if(!this._disabled.erb&&!this._excluded.erb&&h==="%")f=f||this.__patterns.erb.read()}else if(R==="{"){if(!this._disabled.handlebars&&!this._excluded.handlebars)f=f||this.__patterns.handlebars_comment.read(),f=f||this.__patterns.handlebars_unescaped.read(),f=f||this.__patterns.handlebars.read();if(!this._disabled.django){if(!this._excluded.django&&!this._excluded.handlebars)f=f||this.__patterns.django_value.read();if(!this._excluded.django)f=f||this.__patterns.django_comment.read(),f=f||this.__patterns.django.read()}if(!this._disabled.smarty){if(this._disabled.django&&this._disabled.handlebars)f=f||this.__patterns.smarty_comment.read(),f=f||this.__patterns.smarty_literal.read(),f=f||this.__patterns.smarty.read()}}return f};fX.TemplatablePattern=xf});var Qh=l((ZX,zh)=>{var hX=B$().InputScanner,tW=Xh().Tokenizer,kG=Xh().TOKEN,$X=K$().Directives,Of=VG(),AX=Mh().Pattern,GX=xG().TemplatablePattern;function sG(f,R){return R.indexOf(f)!==-1}var X={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:kG.START,RAW:kG.RAW,EOF:kG.EOF},uW=new $X(/\/\*/,/\*\//),HX=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,NX=/[0-9]/,UX=/[^\d\.]/,FX=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),bR=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";bR=bR.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");bR="\\?\\.(?!\\d) "+bR;bR=bR.replace(/ /g,"|");var WX=new RegExp(bR),fS="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),SX=fS.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),YX=new RegExp("^(?:"+SX.join("|")+")$"),v$,Hf=function(f,R){tW.call(this,f,R),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var h=new AX(this._input),$=new GX(this._input).read_options(this._options);this.__patterns={template:$,identifier:$.starting_with(Of.identifier).matching(Of.identifierMatch),number:h.matching(HX),punct:h.matching(WX),comment:h.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:h.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:h.matching(/<!--/),html_comment_end:h.matching(/-->/),include:h.starting_with(/#include/).until_after(Of.lineBreak),shebang:h.starting_with(/#!/).until_after(Of.lineBreak),xml:h.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:$.until(/['\\\n\r\u2028\u2029]/),double_quote:$.until(/["\\\n\r\u2028\u2029]/),template_text:$.until(/[`\\$]/),template_expression:$.until(/[`}\\]/)}};Hf.prototype=new tW;Hf.prototype._is_comment=function(f){return f.type===X.COMMENT||f.type===X.BLOCK_COMMENT||f.type===X.UNKNOWN};Hf.prototype._is_opening=function(f){return f.type===X.START_BLOCK||f.type===X.START_EXPR};Hf.prototype._is_closing=function(f,R){return(f.type===X.END_BLOCK||f.type===X.END_EXPR)&&(R&&(f.text==="]"&&R.text==="["||f.text===")"&&R.text==="("||f.text==="}"&&R.text==="{"))};Hf.prototype._reset=function(){v$=!1};Hf.prototype._get_next_token=function(f,R){var h=null;this._readWhitespace();var $=this._input.peek();if($===null)return this._create_token(X.EOF,"");return h=h||this._read_non_javascript($),h=h||this._read_string($),h=h||this._read_pair($,this._input.peek(1)),h=h||this._read_word(f),h=h||this._read_singles($),h=h||this._read_comment($),h=h||this._read_regexp($,f),h=h||this._read_xml($,f),h=h||this._read_punctuation(),h=h||this._create_token(X.UNKNOWN,this._input.next()),h};Hf.prototype._read_word=function(f){var R=this.__patterns.identifier.read();if(R!==""){if(R=R.replace(Of.allLineBreaks,`
13
+ `),!(f.type===X.DOT||f.type===X.RESERVED&&(f.text==="set"||f.text==="get"))&&YX.test(R)){if((R==="in"||R==="of")&&(f.type===X.WORD||f.type===X.STRING))return this._create_token(X.OPERATOR,R);return this._create_token(X.RESERVED,R)}return this._create_token(X.WORD,R)}if(R=this.__patterns.number.read(),R!=="")return this._create_token(X.WORD,R)};Hf.prototype._read_singles=function(f){var R=null;if(f==="("||f==="[")R=this._create_token(X.START_EXPR,f);else if(f===")"||f==="]")R=this._create_token(X.END_EXPR,f);else if(f==="{")R=this._create_token(X.START_BLOCK,f);else if(f==="}")R=this._create_token(X.END_BLOCK,f);else if(f===";")R=this._create_token(X.SEMICOLON,f);else if(f==="."&&UX.test(this._input.peek(1)))R=this._create_token(X.DOT,f);else if(f===",")R=this._create_token(X.COMMA,f);if(R)this._input.next();return R};Hf.prototype._read_pair=function(f,R){var h=null;if(f==="#"&&R==="{")h=this._create_token(X.START_BLOCK,f+R);if(h)this._input.next(),this._input.next();return h};Hf.prototype._read_punctuation=function(){var f=this.__patterns.punct.read();if(f!=="")if(f==="=")return this._create_token(X.EQUALS,f);else if(f==="?.")return this._create_token(X.DOT,f);else return this._create_token(X.OPERATOR,f)};Hf.prototype._read_non_javascript=function(f){var R="";if(f==="#"){if(this._is_first_token()){if(R=this.__patterns.shebang.read(),R)return this._create_token(X.UNKNOWN,R.trim()+`
14
14
  `)}if(R=this.__patterns.include.read(),R)return this._create_token(X.UNKNOWN,R.trim()+`
15
- `);f=this._input.next();var h="#";if(this._input.hasNext()&&this._input.testChar($X)){do f=this._input.next(),h+=f;while(this._input.hasNext()&&f!=="#"&&f!=="=");if(f==="#");else if(this._input.peek()==="["&&this._input.peek(1)==="]")h+="[]",this._input.next(),this._input.next();else if(this._input.peek()==="{"&&this._input.peek(1)==="}")h+="{}",this._input.next(),this._input.next();return this._create_token(X.WORD,h)}this._input.back()}else if(f==="<"&&this._is_first_token()){if(R=this.__patterns.html_comment_start.read(),R){while(this._input.hasNext()&&!this._input.testChar(Of.newline))R+=this._input.next();return v$=!0,this._create_token(X.COMMENT,R)}}else if(v$&&f==="-"){if(R=this.__patterns.html_comment_end.read(),R)return v$=!1,this._create_token(X.COMMENT,R)}return null};Hf.prototype._read_comment=function(f){var R=null;if(f==="/"){var h="";if(this._input.peek(1)==="*"){h=this.__patterns.block_comment.read();var $=pW.get_directives(h);if($&&$.ignore==="start")h+=pW.readIgnored(this._input);h=h.replace(Of.allLineBreaks,`
16
- `),R=this._create_token(X.BLOCK_COMMENT,h),R.directives=$}else if(this._input.peek(1)==="/")h=this.__patterns.comment.read(),R=this._create_token(X.COMMENT,h)}return R};Hf.prototype._read_string=function(f){if(f==="`"||f==="'"||f==='"'){var R=this._input.next();if(this.has_char_escapes=!1,f==="`")R+=this._read_string_recursive("`",!0,"${");else R+=this._read_string_recursive(f);if(this.has_char_escapes&&this._options.unescape_strings)R=FX(R);if(this._input.peek()===f)R+=this._input.next();return R=R.replace(Of.allLineBreaks,`
15
+ `);f=this._input.next();var h="#";if(this._input.hasNext()&&this._input.testChar(NX)){do f=this._input.next(),h+=f;while(this._input.hasNext()&&f!=="#"&&f!=="=");if(f==="#");else if(this._input.peek()==="["&&this._input.peek(1)==="]")h+="[]",this._input.next(),this._input.next();else if(this._input.peek()==="{"&&this._input.peek(1)==="}")h+="{}",this._input.next(),this._input.next();return this._create_token(X.WORD,h)}this._input.back()}else if(f==="<"&&this._is_first_token()){if(R=this.__patterns.html_comment_start.read(),R){while(this._input.hasNext()&&!this._input.testChar(Of.newline))R+=this._input.next();return v$=!0,this._create_token(X.COMMENT,R)}}else if(v$&&f==="-"){if(R=this.__patterns.html_comment_end.read(),R)return v$=!1,this._create_token(X.COMMENT,R)}return null};Hf.prototype._read_comment=function(f){var R=null;if(f==="/"){var h="";if(this._input.peek(1)==="*"){h=this.__patterns.block_comment.read();var $=uW.get_directives(h);if($&&$.ignore==="start")h+=uW.readIgnored(this._input);h=h.replace(Of.allLineBreaks,`
16
+ `),R=this._create_token(X.BLOCK_COMMENT,h),R.directives=$}else if(this._input.peek(1)==="/")h=this.__patterns.comment.read(),R=this._create_token(X.COMMENT,h)}return R};Hf.prototype._read_string=function(f){if(f==="`"||f==="'"||f==='"'){var R=this._input.next();if(this.has_char_escapes=!1,f==="`")R+=this._read_string_recursive("`",!0,"${");else R+=this._read_string_recursive(f);if(this.has_char_escapes&&this._options.unescape_strings)R=DX(R);if(this._input.peek()===f)R+=this._input.next();return R=R.replace(Of.allLineBreaks,`
17
17
  `),this._create_token(X.STRING,R)}return null};Hf.prototype._allow_regexp_or_xml=function(f){return f.type===X.RESERVED&&sG(f.text,["return","case","throw","else","do","typeof","yield"])||f.type===X.END_EXPR&&f.text===")"&&f.opened.previous.type===X.RESERVED&&sG(f.opened.previous.text,["if","while","for"])||sG(f.type,[X.COMMENT,X.START_EXPR,X.START_BLOCK,X.START,X.END_BLOCK,X.OPERATOR,X.EQUALS,X.EOF,X.SEMICOLON,X.COMMA])};Hf.prototype._read_regexp=function(f,R){if(f==="/"&&this._allow_regexp_or_xml(R)){var h=this._input.next(),$=!1,A=!1;while(this._input.hasNext()&&(($||A||this._input.peek()!==f)&&!this._input.testChar(Of.newline))){if(h+=this._input.peek(),!$){if($=this._input.peek()==="\\",this._input.peek()==="[")A=!0;else if(this._input.peek()==="]")A=!1}else $=!1;this._input.next()}if(this._input.peek()===f)h+=this._input.next(),h+=this._input.read(Of.identifier);return this._create_token(X.STRING,h)}return null};Hf.prototype._read_xml=function(f,R){if(this._options.e4x&&f==="<"&&this._allow_regexp_or_xml(R)){var h="",$=this.__patterns.xml.read_match();if($){var A=$[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=A.indexOf("{")===0,H=0;while($){var N=!!$[1],U=$[2],F=!!$[$.length-1]||U.slice(0,8)==="![CDATA[";if(!F&&(U===A||G&&U.replace(/^{\s+/,"{").replace(/\s+}$/,"}")))if(N)--H;else++H;if(h+=$[0],H<=0)break;$=this.__patterns.xml.read_match()}if(!$)h+=this._input.match(/[\s\S]*/g)[0];return h=h.replace(Of.allLineBreaks,`
18
- `),this._create_token(X.STRING,h)}}return null};function FX(f){var R="",h=0,$=new uJ(f),A=null;while($.hasNext()){if(A=$.match(/([\s]|[^\\]|\\\\)+/g),A)R+=A[0];if($.peek()==="\\"){if($.next(),$.peek()==="x")A=$.match(/x([0-9A-Fa-f]{2})/g);else if($.peek()==="u"){if(A=$.match(/u([0-9A-Fa-f]{4})/g),!A)A=$.match(/u\{([0-9A-Fa-f]+)\}/g)}else{if(R+="\\",$.hasNext())R+=$.next();continue}if(!A)return f;if(h=parseInt(A[1],16),h>126&&h<=255&&A[0].indexOf("x")===0)return f;else if(h>=0&&h<32)R+="\\"+A[0];else if(h>1114111)R+="\\"+A[0];else if(h===34||h===39||h===92)R+="\\"+String.fromCharCode(h);else R+=String.fromCharCode(h)}}return R}Hf.prototype._read_string_recursive=function(f,R,h){var $,A;if(f==="'")A=this.__patterns.single_quote;else if(f==='"')A=this.__patterns.double_quote;else if(f==="`")A=this.__patterns.template_text;else if(f==="}")A=this.__patterns.template_expression;var G=A.read(),H="";while(this._input.hasNext()){if(H=this._input.next(),H===f||!R&&Of.newline.test(H)){this._input.back();break}else if(H==="\\"&&this._input.hasNext()){if($=this._input.peek(),$==="x"||$==="u")this.has_char_escapes=!0;else if($==="\r"&&this._input.peek(1)===`
19
- `)this._input.next();H+=this._input.next()}else if(h){if(h==="${"&&H==="$"&&this._input.peek()==="{")H+=this._input.next();if(h===H){if(f==="`")H+=this._read_string_recursive("}",R,"`");else H+=this._read_string_recursive("`",R,"${");if(this._input.hasNext())H+=this._input.next()}}H+=A.read(),G+=H}return G};WX.Tokenizer=Hf;WX.TOKEN=X;WX.positionable_operators=GX.slice();WX.line_starters=nW.slice()});var fS=l((BX,tW)=>{var MX=I$().Output,JX=jG().Token,y$=VG(),XX=TG().Options,zX=wh().Tokenizer,qh=wh().line_starters,Lh=wh().positionable_operators,W=wh().TOKEN;function I(f,R){return R.indexOf(f)!==-1}function QX(f){return f.replace(/^\s+/g,"")}function wX(f){var R={};for(var h=0;h<f.length;h++)R[f[h].replace(/-/g,"_")]=f[h];return R}function Ef(f,R){return f&&f.type===W.RESERVED&&f.text===R}function b(f,R){return f&&f.type===W.RESERVED&&I(f.text,R)}var j$=["case","return","do","if","throw","else","await","break","continue","async"],LX=["before-newline","after-newline","preserve-newline"],Ih=wX(LX),eW=[Ih.before_newline,Ih.preserve_newline],z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function uW(f,R){if(R.multiline_frame||R.mode===z.ForInitializer||R.mode===z.Conditional)return;f.remove_indent(R.start_line_index)}function IX(f){f=f.replace(y$.allLineBreaks,`
18
+ `),this._create_token(X.STRING,h)}}return null};function DX(f){var R="",h=0,$=new hX(f),A=null;while($.hasNext()){if(A=$.match(/([\s]|[^\\]|\\\\)+/g),A)R+=A[0];if($.peek()==="\\"){if($.next(),$.peek()==="x")A=$.match(/x([0-9A-Fa-f]{2})/g);else if($.peek()==="u"){if(A=$.match(/u([0-9A-Fa-f]{4})/g),!A)A=$.match(/u\{([0-9A-Fa-f]+)\}/g)}else{if(R+="\\",$.hasNext())R+=$.next();continue}if(!A)return f;if(h=parseInt(A[1],16),h>126&&h<=255&&A[0].indexOf("x")===0)return f;else if(h>=0&&h<32)R+="\\"+A[0];else if(h>1114111)R+="\\"+A[0];else if(h===34||h===39||h===92)R+="\\"+String.fromCharCode(h);else R+=String.fromCharCode(h)}}return R}Hf.prototype._read_string_recursive=function(f,R,h){var $,A;if(f==="'")A=this.__patterns.single_quote;else if(f==='"')A=this.__patterns.double_quote;else if(f==="`")A=this.__patterns.template_text;else if(f==="}")A=this.__patterns.template_expression;var G=A.read(),H="";while(this._input.hasNext()){if(H=this._input.next(),H===f||!R&&Of.newline.test(H)){this._input.back();break}else if(H==="\\"&&this._input.hasNext()){if($=this._input.peek(),$==="x"||$==="u")this.has_char_escapes=!0;else if($==="\r"&&this._input.peek(1)===`
19
+ `)this._input.next();H+=this._input.next()}else if(h){if(h==="${"&&H==="$"&&this._input.peek()==="{")H+=this._input.next();if(h===H){if(f==="`")H+=this._read_string_recursive("}",R,"`");else H+=this._read_string_recursive("`",R,"${");if(this._input.hasNext())H+=this._input.next()}}H+=A.read(),G+=H}return G};ZX.Tokenizer=Hf;ZX.TOKEN=X;ZX.positionable_operators=FX.slice();ZX.line_starters=fS.slice()});var AS=l((jX,$S)=>{var QX=I$().Output,wX=jG().Token,y$=VG(),LX=TG().Options,IX=Qh().Tokenizer,Ph=Qh().line_starters,wh=Qh().positionable_operators,W=Qh().TOKEN;function I(f,R){return R.indexOf(f)!==-1}function PX(f){return f.replace(/^\s+/g,"")}function qX(f){var R={};for(var h=0;h<f.length;h++)R[f[h].replace(/-/g,"_")]=f[h];return R}function Ef(f,R){return f&&f.type===W.RESERVED&&f.text===R}function b(f,R){return f&&f.type===W.RESERVED&&I(f.text,R)}var j$=["case","return","do","if","throw","else","await","break","continue","async"],BX=["before-newline","after-newline","preserve-newline"],Lh=qX(BX),RS=[Lh.before_newline,Lh.preserve_newline],z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function hS(f,R){if(R.multiline_frame||R.mode===z.ForInitializer||R.mode===z.Conditional)return;f.remove_indent(R.start_line_index)}function KX(f){f=f.replace(y$.allLineBreaks,`
20
20
  `);var R=[],h=f.indexOf(`
21
21
  `);while(h!==-1)R.push(f.substring(0,h)),f=f.substring(h+1),h=f.indexOf(`
22
- `);if(f.length)R.push(f);return R}function MR(f){return f===z.ArrayLiteral}function Ph(f){return I(f,[z.Expression,z.ForInitializer,z.Conditional])}function PX(f,R){for(var h=0;h<f.length;h++){var $=f[h].trim();if($.charAt(0)!==R)return!1}return!0}function qX(f,R){var h=0,$=f.length,A;for(;h<$;h++)if(A=f[h],A&&A.indexOf(R)!==0)return!1;return!0}function V(f,R){R=R||{},this._source_text=f||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new XX(R)}V.prototype.create_flags=function(f,R){var h=0;if(f){if(h=f.indentation_level,!this._output.just_added_newline()&&f.line_indent_level>h)h=f.line_indent_level}var $={mode:R,parent:f,last_token:f?f.last_token:new JX(W.START_BLOCK,""),last_word:f?f.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:h,alignment:0,line_indent_level:f?f.line_indent_level:h,start_line_index:this._output.get_line_number(),ternary_depth:0};return $};V.prototype._reset=function(f){var R=f.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new MX(this._options,R),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(z.BlockStatement);var h=new zX(f,this._options);return this._tokens=h.tokenize(),f};V.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f,R=this._reset(this._source_text),h=this._options.eol;if(this._options.eol==="auto"){if(h=`
23
- `,R&&y$.lineBreak.test(R||""))h=R.match(y$.lineBreak)[0]}var $=this._tokens.next();while($)this.handle_token($),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$,$=this._tokens.next();return f=this._output.get_code(h),f};V.prototype.handle_token=function(f,R){if(f.type===W.START_EXPR)this.handle_start_expr(f);else if(f.type===W.END_EXPR)this.handle_end_expr(f);else if(f.type===W.START_BLOCK)this.handle_start_block(f);else if(f.type===W.END_BLOCK)this.handle_end_block(f);else if(f.type===W.WORD)this.handle_word(f);else if(f.type===W.RESERVED)this.handle_word(f);else if(f.type===W.SEMICOLON)this.handle_semicolon(f);else if(f.type===W.STRING)this.handle_string(f);else if(f.type===W.EQUALS)this.handle_equals(f);else if(f.type===W.OPERATOR)this.handle_operator(f);else if(f.type===W.COMMA)this.handle_comma(f);else if(f.type===W.BLOCK_COMMENT)this.handle_block_comment(f,R);else if(f.type===W.COMMENT)this.handle_comment(f,R);else if(f.type===W.DOT)this.handle_dot(f);else if(f.type===W.EOF)this.handle_eof(f);else if(f.type===W.UNKNOWN)this.handle_unknown(f,R);else this.handle_unknown(f,R)};V.prototype.handle_whitespace_and_comments=function(f,R){var h=f.newlines,$=this._options.keep_array_indentation&&MR(this._flags.mode);if(f.comments_before){var A=f.comments_before.next();while(A)this.handle_whitespace_and_comments(A,R),this.handle_token(A,R),A=f.comments_before.next()}if($)for(var G=0;G<h;G+=1)this.print_newline(G>0,R);else{if(this._options.max_preserve_newlines&&h>this._options.max_preserve_newlines)h=this._options.max_preserve_newlines;if(this._options.preserve_newlines){if(h>1){this.print_newline(!1,R);for(var H=1;H<h;H+=1)this.print_newline(!0,R)}}}};var lG=["async","break","continue","return","throw","yield"];V.prototype.allow_wrap_or_preserved_newline=function(f,R){if(R=R===void 0?!1:R,this._output.just_added_newline())return;var h=this._options.preserve_newlines&&f.newlines||R,$=I(this._flags.last_token.text,Lh)||I(f.text,Lh);if($){var A=I(this._flags.last_token.text,Lh)&&I(this._options.operator_position,eW)||I(f.text,Lh);h=h&&A}if(h)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(b(this._flags.last_token,lG))return;this._output.set_wrap_point()}};V.prototype.print_newline=function(f,R){if(!R){if(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==W.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")){var h=this._tokens.peek();while(this._flags.mode===z.Statement&&!(this._flags.if_block&&Ef(h,"else"))&&!this._flags.do_block)this.restore_mode()}}if(this._output.add_new_line(f))this._flags.multiline_frame=!0};V.prototype.print_token_line_indentation=function(f){if(this._output.just_added_newline()){if(this._options.keep_array_indentation&&f.newlines&&(f.text==="["||MR(this._flags.mode)))this._output.current_line.set_indent(-1),this._output.current_line.push(f.whitespace_before),this._output.space_before_token=!1;else if(this._output.set_indent(this._flags.indentation_level,this._flags.alignment))this._flags.line_indent_level=this._flags.indentation_level}};V.prototype.print_token=function(f){if(this._output.raw){this._output.add_raw_token(f);return}if(this._options.comma_first&&f.previous&&f.previous.type===W.COMMA&&this._output.just_added_newline()){if(this._output.previous_line.last()===","){var R=this._output.previous_line.pop();if(this._output.previous_line.is_empty())this._output.previous_line.push(R),this._output.trim(!0),this._output.current_line.pop(),this._output.trim();this.print_token_line_indentation(f),this._output.add_token(","),this._output.space_before_token=!0}}if(this.print_token_line_indentation(f),this._output.non_breaking_space=!0,this._output.add_token(f.text),this._output.previous_token_wrapped)this._flags.multiline_frame=!0};V.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};V.prototype.deindent=function(){if(this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level))this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};V.prototype.set_mode=function(f){if(this._flags)this._flag_store.push(this._flags),this._previous_flags=this._flags;else this._previous_flags=this.create_flags(null,f);this._flags=this.create_flags(this._previous_flags,f),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};V.prototype.restore_mode=function(){if(this._flag_store.length>0){if(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===z.Statement)uW(this._output,this._previous_flags);this._output.set_indent(this._flags.indentation_level,this._flags.alignment)}};V.prototype.start_of_object_property=function(){return this._flags.parent.mode===z.ObjectLiteral&&this._flags.mode===z.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||b(this._flags.last_token,["get","set"]))};V.prototype.start_of_statement=function(f){var R=!1;if(R=R||b(this._flags.last_token,["var","let","const"])&&f.type===W.WORD,R=R||Ef(this._flags.last_token,"do"),R=R||!(this._flags.parent.mode===z.ObjectLiteral&&this._flags.mode===z.Statement)&&b(this._flags.last_token,lG)&&!f.newlines,R=R||Ef(this._flags.last_token,"else")&&!(Ef(f,"if")&&!f.comments_before),R=R||this._flags.last_token.type===W.END_EXPR&&(this._previous_flags.mode===z.ForInitializer||this._previous_flags.mode===z.Conditional),R=R||this._flags.last_token.type===W.WORD&&this._flags.mode===z.BlockStatement&&!this._flags.in_case&&!(f.text==="--"||f.text==="++")&&this._last_last_text!=="function"&&f.type!==W.WORD&&f.type!==W.RESERVED,R=R||this._flags.mode===z.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||b(this._flags.last_token,["get","set"])),R){if(this.set_mode(z.Statement),this.indent(),this.handle_whitespace_and_comments(f,!0),!this.start_of_object_property())this.allow_wrap_or_preserved_newline(f,b(f,["do","for","if","while"]));return!0}return!1};V.prototype.handle_start_expr=function(f){if(!this.start_of_statement(f))this.handle_whitespace_and_comments(f);var R=z.Expression;if(f.text==="["){if(this._flags.last_token.type===W.WORD||this._flags.last_token.text===")"){if(b(this._flags.last_token,qh))this._output.space_before_token=!0;if(this.print_token(f),this.set_mode(R),this.indent(),this._options.space_in_paren)this._output.space_before_token=!0;return}if(R=z.ArrayLiteral,MR(this._flags.mode)){if(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}")){if(!this._options.keep_array_indentation)this.print_newline()}}if(!I(this._flags.last_token.type,[W.START_EXPR,W.END_EXPR,W.WORD,W.OPERATOR,W.DOT]))this._output.space_before_token=!0}else{if(this._flags.last_token.type===W.RESERVED){if(this._flags.last_token.text==="for")this._output.space_before_token=this._options.space_before_conditional,R=z.ForInitializer;else if(I(this._flags.last_token.text,["if","while","switch"]))this._output.space_before_token=this._options.space_before_conditional,R=z.Conditional;else if(I(this._flags.last_word,["await","async"]))this._output.space_before_token=!0;else if(this._flags.last_token.text==="import"&&f.whitespace_before==="")this._output.space_before_token=!1;else if(I(this._flags.last_token.text,qh)||this._flags.last_token.text==="catch")this._output.space_before_token=!0}else if(this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR){if(!this.start_of_object_property())this.allow_wrap_or_preserved_newline(f)}else if(this._flags.last_token.type===W.WORD){this._output.space_before_token=!1;var h=this._tokens.peek(-3);if(this._options.space_after_named_function&&h){var $=this._tokens.peek(-4);if(b(h,["async","function"])||h.text==="*"&&b($,["async","function"]))this._output.space_before_token=!0;else if(this._flags.mode===z.ObjectLiteral){if(h.text==="{"||h.text===","||h.text==="*"&&($.text==="{"||$.text===","))this._output.space_before_token=!0}else if(this._flags.parent&&this._flags.parent.class_start_block)this._output.space_before_token=!0}}else this.allow_wrap_or_preserved_newline(f);if(this._flags.last_token.type===W.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(I(this._last_last_text,["function","yield"])||this._flags.mode===z.ObjectLiteral&&I(this._last_last_text,["{",","])))this._output.space_before_token=this._options.space_after_anon_function}if(this._flags.last_token.text===";"||this._flags.last_token.type===W.START_BLOCK)this.print_newline();else if(this._flags.last_token.type===W.END_EXPR||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===W.COMMA)this.allow_wrap_or_preserved_newline(f,f.newlines);if(this.print_token(f),this.set_mode(R),this._options.space_in_paren)this._output.space_before_token=!0;this.indent()};V.prototype.handle_end_expr=function(f){while(this._flags.mode===z.Statement)this.restore_mode();if(this.handle_whitespace_and_comments(f),this._flags.multiline_frame)this.allow_wrap_or_preserved_newline(f,f.text==="]"&&MR(this._flags.mode)&&!this._options.keep_array_indentation);if(this._options.space_in_paren)if(this._flags.last_token.type===W.START_EXPR&&!this._options.space_in_empty_paren)this._output.trim(),this._output.space_before_token=!1;else this._output.space_before_token=!0;if(this.deindent(),this.print_token(f),this.restore_mode(),uW(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===z.Conditional)this._previous_flags.mode=z.Expression,this._flags.do_block=!1,this._flags.do_while=!1};V.prototype.handle_start_block=function(f){this.handle_whitespace_and_comments(f);var R=this._tokens.peek(),h=this._tokens.peek(1);if(this._flags.last_word==="switch"&&this._flags.last_token.type===W.END_EXPR)this.set_mode(z.BlockStatement),this._flags.in_case_statement=!0;else if(this._flags.case_body)this.set_mode(z.BlockStatement);else if(h&&(I(h.text,[":",","])&&I(R.type,[W.STRING,W.WORD,W.RESERVED])||I(R.text,["get","set","..."])&&I(h.type,[W.WORD,W.RESERVED])))if(I(this._last_last_text,["class","interface"])&&!I(h.text,[":",","]))this.set_mode(z.BlockStatement);else this.set_mode(z.ObjectLiteral);else if(this._flags.last_token.type===W.OPERATOR&&this._flags.last_token.text==="=>")this.set_mode(z.BlockStatement);else if(I(this._flags.last_token.type,[W.EQUALS,W.START_EXPR,W.COMMA,W.OPERATOR])||b(this._flags.last_token,["return","throw","import","default"]))this.set_mode(z.ObjectLiteral);else this.set_mode(z.BlockStatement);if(this._flags.last_token){if(b(this._flags.last_token.previous,["class","extends"]))this._flags.class_start_block=!0}var $=!R.comments_before&&R.text==="}",A=$&&this._flags.last_word==="function"&&this._flags.last_token.type===W.END_EXPR;if(this._options.brace_preserve_inline){var G=0,H=null;this._flags.inline_frame=!0;do if(G+=1,H=this._tokens.peek(G-1),H.newlines){this._flags.inline_frame=!1;break}while(H.type!==W.EOF&&!(H.type===W.END_BLOCK&&H.opened===f))}if((this._options.brace_style==="expand"||this._options.brace_style==="none"&&f.newlines)&&!this._flags.inline_frame)if(this._flags.last_token.type!==W.OPERATOR&&(A||this._flags.last_token.type===W.EQUALS||b(this._flags.last_token,j$)&&this._flags.last_token.text!=="else"))this._output.space_before_token=!0;else this.print_newline(!1,!0);else{if(MR(this._previous_flags.mode)&&(this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.COMMA)){if(this._flags.last_token.type===W.COMMA||this._options.space_in_paren)this._output.space_before_token=!0;if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR&&this._flags.inline_frame)this.allow_wrap_or_preserved_newline(f),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1}if(this._flags.last_token.type!==W.OPERATOR&&this._flags.last_token.type!==W.START_EXPR)if(I(this._flags.last_token.type,[W.START_BLOCK,W.SEMICOLON])&&!this._flags.inline_frame)this.print_newline();else this._output.space_before_token=!0}if(this.print_token(f),this.indent(),!$&&!(this._options.brace_preserve_inline&&this._flags.inline_frame))this.print_newline()};V.prototype.handle_end_block=function(f){this.handle_whitespace_and_comments(f);while(this._flags.mode===z.Statement)this.restore_mode();var R=this._flags.last_token.type===W.START_BLOCK;if(this._flags.inline_frame&&!R)this._output.space_before_token=!0;else if(this._options.brace_style==="expand"){if(!R)this.print_newline()}else if(!R)if(MR(this._flags.mode)&&this._options.keep_array_indentation)this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0;else this.print_newline();this.restore_mode(),this.print_token(f)};V.prototype.handle_word=function(f){if(f.type===W.RESERVED){if(I(f.text,["set","get"])&&this._flags.mode!==z.ObjectLiteral)f.type=W.WORD;else if(f.text==="import"&&I(this._tokens.peek().text,["(","."]))f.type=W.WORD;else if(I(f.text,["as","from"])&&!this._flags.import_block)f.type=W.WORD;else if(this._flags.mode===z.ObjectLiteral){var R=this._tokens.peek();if(R.text===":")f.type=W.WORD}}if(this.start_of_statement(f)){if(b(this._flags.last_token,["var","let","const"])&&f.type===W.WORD)this._flags.declaration_statement=!0}else if(f.newlines&&!Ph(this._flags.mode)&&(this._flags.last_token.type!==W.OPERATOR||(this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))&&this._flags.last_token.type!==W.EQUALS&&(this._options.preserve_newlines||!b(this._flags.last_token,["var","let","const","set","get"])))this.handle_whitespace_and_comments(f),this.print_newline();else this.handle_whitespace_and_comments(f);if(this._flags.do_block&&!this._flags.do_while)if(Ef(f,"while")){this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&Ef(f,"else"))this._flags.else_block=!0;else{while(this._flags.mode===z.Statement)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&b(f,["case","default"])){if(this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy))this.deindent();this._flags.case_body=!1,this.print_token(f),this._flags.in_case=!0;return}if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR){if(!this.start_of_object_property()&&!(I(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===z.ObjectLiteral))this.allow_wrap_or_preserved_newline(f)}if(Ef(f,"function")){if(I(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(I(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===W.OPERATOR)){if(!this._output.just_added_blankline()&&!f.comments_before)this.print_newline(),this.print_newline(!0)}if(this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD)if(b(this._flags.last_token,["get","set","new","export"])||b(this._flags.last_token,lG))this._output.space_before_token=!0;else if(Ef(this._flags.last_token,"default")&&this._last_last_text==="export")this._output.space_before_token=!0;else if(this._flags.last_token.text==="declare")this._output.space_before_token=!0;else this.print_newline();else if(this._flags.last_token.type===W.OPERATOR||this._flags.last_token.text==="=")this._output.space_before_token=!0;else if(!this._flags.multiline_frame&&(Ph(this._flags.mode)||MR(this._flags.mode)));else this.print_newline();this.print_token(f),this._flags.last_word=f.text;return}var h="NONE";if(this._flags.last_token.type===W.END_BLOCK)if(this._previous_flags.inline_frame)h="SPACE";else if(!b(f,["else","catch","finally","from"]))h="NEWLINE";else if(this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&f.newlines)h="NEWLINE";else h="SPACE",this._output.space_before_token=!0;else if(this._flags.last_token.type===W.SEMICOLON&&this._flags.mode===z.BlockStatement)h="NEWLINE";else if(this._flags.last_token.type===W.SEMICOLON&&Ph(this._flags.mode))h="SPACE";else if(this._flags.last_token.type===W.STRING)h="NEWLINE";else if(this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD||this._flags.last_token.text==="*"&&(I(this._last_last_text,["function","yield"])||this._flags.mode===z.ObjectLiteral&&I(this._last_last_text,["{",","])))h="SPACE";else if(this._flags.last_token.type===W.START_BLOCK)if(this._flags.inline_frame)h="SPACE";else h="NEWLINE";else if(this._flags.last_token.type===W.END_EXPR)this._output.space_before_token=!0,h="NEWLINE";if(b(f,qh)&&this._flags.last_token.text!==")")if(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export")h="SPACE";else h="NEWLINE";if(b(f,["else","catch","finally"]))if((!(this._flags.last_token.type===W.END_BLOCK&&this._previous_flags.mode===z.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&f.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var $=this._output.current_line;if($.last()!=="}")this.print_newline();this._output.space_before_token=!0}else if(h==="NEWLINE"){if(b(this._flags.last_token,j$))this._output.space_before_token=!0;else if(this._flags.last_token.text==="declare"&&b(f,["var","let","const"]))this._output.space_before_token=!0;else if(this._flags.last_token.type!==W.END_EXPR){if((this._flags.last_token.type!==W.START_EXPR||!b(f,["var","let","const"]))&&this._flags.last_token.text!==":")if(Ef(f,"if")&&Ef(f.previous,"else"))this._output.space_before_token=!0;else this.print_newline()}else if(b(f,qh)&&this._flags.last_token.text!==")")this.print_newline()}else if(this._flags.multiline_frame&&MR(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}")this.print_newline();else if(h==="SPACE")this._output.space_before_token=!0;if(f.previous&&(f.previous.type===W.WORD||f.previous.type===W.RESERVED))this._output.space_before_token=!0;if(this.print_token(f),this._flags.last_word=f.text,f.type===W.RESERVED){if(f.text==="do")this._flags.do_block=!0;else if(f.text==="if")this._flags.if_block=!0;else if(f.text==="import")this._flags.import_block=!0;else if(this._flags.import_block&&Ef(f,"from"))this._flags.import_block=!1}};V.prototype.handle_semicolon=function(f){if(this.start_of_statement(f))this._output.space_before_token=!1;else this.handle_whitespace_and_comments(f);var R=this._tokens.peek();while(this._flags.mode===z.Statement&&!(this._flags.if_block&&Ef(R,"else"))&&!this._flags.do_block)this.restore_mode();if(this._flags.import_block)this._flags.import_block=!1;this.print_token(f)};V.prototype.handle_string=function(f){if(f.text.startsWith("`")&&f.newlines===0&&f.whitespace_before===""&&(f.previous.text===")"||this._flags.last_token.type===W.WORD));else if(this.start_of_statement(f))this._output.space_before_token=!0;else if(this.handle_whitespace_and_comments(f),this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD||this._flags.inline_frame)this._output.space_before_token=!0;else if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR){if(!this.start_of_object_property())this.allow_wrap_or_preserved_newline(f)}else if(f.text.startsWith("`")&&this._flags.last_token.type===W.END_EXPR&&(f.previous.text==="]"||f.previous.text===")")&&f.newlines===0)this._output.space_before_token=!0;else this.print_newline();this.print_token(f)};V.prototype.handle_equals=function(f){if(this.start_of_statement(f));else this.handle_whitespace_and_comments(f);if(this._flags.declaration_statement)this._flags.declaration_assignment=!0;this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0};V.prototype.handle_comma=function(f){if(this.handle_whitespace_and_comments(f,!0),this.print_token(f),this._output.space_before_token=!0,this._flags.declaration_statement){if(Ph(this._flags.parent.mode))this._flags.declaration_assignment=!1;if(this._flags.declaration_assignment)this._flags.declaration_assignment=!1,this.print_newline(!1,!0);else if(this._options.comma_first)this.allow_wrap_or_preserved_newline(f)}else if(this._flags.mode===z.ObjectLiteral||this._flags.mode===z.Statement&&this._flags.parent.mode===z.ObjectLiteral){if(this._flags.mode===z.Statement)this.restore_mode();if(!this._flags.inline_frame)this.print_newline()}else if(this._options.comma_first)this.allow_wrap_or_preserved_newline(f)};V.prototype.handle_operator=function(f){var R=f.text==="*"&&(b(this._flags.last_token,["function","yield"])||I(this._flags.last_token.type,[W.START_BLOCK,W.COMMA,W.END_BLOCK,W.SEMICOLON])),h=I(f.text,["-","+"])&&(I(this._flags.last_token.type,[W.START_BLOCK,W.START_EXPR,W.EQUALS,W.OPERATOR])||I(this._flags.last_token.text,qh)||this._flags.last_token.text===",");if(this.start_of_statement(f));else{var $=!R;this.handle_whitespace_and_comments(f,$)}if(f.text==="*"&&this._flags.last_token.type===W.DOT){this.print_token(f);return}if(f.text==="::"){this.print_token(f);return}if(I(f.text,["-","+"])&&this.start_of_object_property()){this.print_token(f);return}if(this._flags.last_token.type===W.OPERATOR&&I(this._options.operator_position,eW))this.allow_wrap_or_preserved_newline(f);if(f.text===":"&&this._flags.in_case){if(this.print_token(f),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==W.START_BLOCK)this.indent(),this.print_newline(),this._flags.case_block=!1;else this._flags.case_block=!0,this._output.space_before_token=!0;return}var A=!0,G=!0,H=!1;if(f.text===":")if(this._flags.ternary_depth===0)A=!1;else this._flags.ternary_depth-=1,H=!0;else if(f.text==="?")this._flags.ternary_depth+=1;if(!h&&!R&&this._options.preserve_newlines&&I(f.text,Lh)){var N=f.text===":",U=N&&H,F=N&&!H;switch(this._options.operator_position){case Ih.before_newline:if(this._output.space_before_token=!F,this.print_token(f),!N||U)this.allow_wrap_or_preserved_newline(f);this._output.space_before_token=!0;return;case Ih.after_newline:if(this._output.space_before_token=!0,!N||U)if(this._tokens.peek().newlines)this.print_newline(!1,!0);else this.allow_wrap_or_preserved_newline(f);else this._output.space_before_token=!1;this.print_token(f),this._output.space_before_token=!0;return;case Ih.preserve_newline:if(!F)this.allow_wrap_or_preserved_newline(f);A=!(this._output.just_added_newline()||F),this._output.space_before_token=A,this.print_token(f),this._output.space_before_token=!0;return}}if(R){this.allow_wrap_or_preserved_newline(f),A=!1;var S=this._tokens.peek();G=S&&I(S.type,[W.WORD,W.RESERVED])}else if(f.text==="...")this.allow_wrap_or_preserved_newline(f),A=this._flags.last_token.type===W.START_BLOCK,G=!1;else if(I(f.text,["--","++","!","~"])||h){if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR)this.allow_wrap_or_preserved_newline(f);if(A=!1,G=!1,f.newlines&&(f.text==="--"||f.text==="++"||f.text==="~")){var D=b(this._flags.last_token,j$)&&f.newlines;if(D&&(this._previous_flags.if_block||this._previous_flags.else_block))this.restore_mode();this.print_newline(D,!0)}if(this._flags.last_token.text===";"&&Ph(this._flags.mode))A=!0;if(this._flags.last_token.type===W.RESERVED)A=!0;else if(this._flags.last_token.type===W.END_EXPR)A=!(this._flags.last_token.text==="]"&&(f.text==="--"||f.text==="++"));else if(this._flags.last_token.type===W.OPERATOR){if(A=I(f.text,["--","-","++","+"])&&I(this._flags.last_token.text,["--","-","++","+"]),I(f.text,["+","-"])&&I(this._flags.last_token.text,["--","++"]))G=!0}if((this._flags.mode===z.BlockStatement&&!this._flags.inline_frame||this._flags.mode===z.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";"))this.print_newline()}this._output.space_before_token=this._output.space_before_token||A,this.print_token(f),this._output.space_before_token=G};V.prototype.handle_block_comment=function(f,R){if(this._output.raw){if(this._output.add_raw_token(f),f.directives&&f.directives.preserve==="end")this._output.raw=this._options.test_output_raw;return}if(f.directives){if(this.print_newline(!1,R),this.print_token(f),f.directives.preserve==="start")this._output.raw=!0;this.print_newline(!1,!0);return}if(!y$.newline.test(f.text)&&!f.newlines){this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0;return}else this.print_block_commment(f,R)};V.prototype.print_block_commment=function(f,R){var h=IX(f.text),$,A=!1,G=!1,H=f.whitespace_before,N=H.length;if(this.print_newline(!1,R),this.print_token_line_indentation(f),this._output.add_token(h[0]),this.print_newline(!1,R),h.length>1){if(h=h.slice(1),A=PX(h,"*"),G=qX(h,H),A)this._flags.alignment=1;for($=0;$<h.length;$++){if(A)this.print_token_line_indentation(f),this._output.add_token(QX(h[$]));else if(G&&h[$])this.print_token_line_indentation(f),this._output.add_token(h[$].substring(N));else this._output.current_line.set_indent(-1),this._output.add_token(h[$]);this.print_newline(!1,R)}this._flags.alignment=0}};V.prototype.handle_comment=function(f,R){if(f.newlines)this.print_newline(!1,R);else this._output.trim(!0);this._output.space_before_token=!0,this.print_token(f),this.print_newline(!1,R)};V.prototype.handle_dot=function(f){if(this.start_of_statement(f));else this.handle_whitespace_and_comments(f,!0);if(this._flags.last_token.text.match("^[0-9]+$"))this._output.space_before_token=!0;if(b(this._flags.last_token,j$))this._output.space_before_token=!1;else this.allow_wrap_or_preserved_newline(f,this._flags.last_token.text===")"&&this._options.break_chained_methods);if(this._options.unindent_chained_methods&&this._output.just_added_newline())this.deindent();this.print_token(f)};V.prototype.handle_unknown=function(f,R){if(this.print_token(f),f.text[f.text.length-1]===`
24
- `)this.print_newline(!1,R)};V.prototype.handle_eof=function(f){while(this._flags.mode===z.Statement)this.restore_mode();this.handle_whitespace_and_comments(f)};BX.Beautifier=V});var RS=l((My,_G)=>{var vX=fS().Beautifier,yX=TG().Options;function jX(f,R){var h=new vX(f,R);return h.beautify()}_G.exports=jX;_G.exports.defaultOptions=function(){return new yX}});var dG=l((OX,AS)=>{var hS=q$().Options;function $S(f){hS.call(this,f,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var R=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||R;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var $=0;$<h.length;$++)if(h[$]!=="expand")this.brace_style="collapse";else this.brace_style=h[$]}$S.prototype=new hS;OX.Options=$S});var US=l((kX,NS)=>{var VX=dG().Options,TX=I$().Output,gX=B$().InputScanner,CX=K$().Directives,GS=new CX(/\/\*/,/\*\//),HS=/\r\n|[\r\n]/,mX=/\r\n|[\r\n]/g,O$=/\s/,cX=/(?:\s|\n)+/g,bX=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,xX=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function ef(f,R){this._source_text=f||"",this._options=new VX(R),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}ef.prototype.eatString=function(f){var R="";this._ch=this._input.next();while(this._ch){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(f.indexOf(this._ch)!==-1||this._ch===`
22
+ `);if(f.length)R.push(f);return R}function ZR(f){return f===z.ArrayLiteral}function Ih(f){return I(f,[z.Expression,z.ForInitializer,z.Conditional])}function vX(f,R){for(var h=0;h<f.length;h++){var $=f[h].trim();if($.charAt(0)!==R)return!1}return!0}function yX(f,R){var h=0,$=f.length,A;for(;h<$;h++)if(A=f[h],A&&A.indexOf(R)!==0)return!1;return!0}function V(f,R){R=R||{},this._source_text=f||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new LX(R)}V.prototype.create_flags=function(f,R){var h=0;if(f){if(h=f.indentation_level,!this._output.just_added_newline()&&f.line_indent_level>h)h=f.line_indent_level}var $={mode:R,parent:f,last_token:f?f.last_token:new wX(W.START_BLOCK,""),last_word:f?f.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:h,alignment:0,line_indent_level:f?f.line_indent_level:h,start_line_index:this._output.get_line_number(),ternary_depth:0};return $};V.prototype._reset=function(f){var R=f.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new QX(this._options,R),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(z.BlockStatement);var h=new IX(f,this._options);return this._tokens=h.tokenize(),f};V.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f,R=this._reset(this._source_text),h=this._options.eol;if(this._options.eol==="auto"){if(h=`
23
+ `,R&&y$.lineBreak.test(R||""))h=R.match(y$.lineBreak)[0]}var $=this._tokens.next();while($)this.handle_token($),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$,$=this._tokens.next();return f=this._output.get_code(h),f};V.prototype.handle_token=function(f,R){if(f.type===W.START_EXPR)this.handle_start_expr(f);else if(f.type===W.END_EXPR)this.handle_end_expr(f);else if(f.type===W.START_BLOCK)this.handle_start_block(f);else if(f.type===W.END_BLOCK)this.handle_end_block(f);else if(f.type===W.WORD)this.handle_word(f);else if(f.type===W.RESERVED)this.handle_word(f);else if(f.type===W.SEMICOLON)this.handle_semicolon(f);else if(f.type===W.STRING)this.handle_string(f);else if(f.type===W.EQUALS)this.handle_equals(f);else if(f.type===W.OPERATOR)this.handle_operator(f);else if(f.type===W.COMMA)this.handle_comma(f);else if(f.type===W.BLOCK_COMMENT)this.handle_block_comment(f,R);else if(f.type===W.COMMENT)this.handle_comment(f,R);else if(f.type===W.DOT)this.handle_dot(f);else if(f.type===W.EOF)this.handle_eof(f);else if(f.type===W.UNKNOWN)this.handle_unknown(f,R);else this.handle_unknown(f,R)};V.prototype.handle_whitespace_and_comments=function(f,R){var h=f.newlines,$=this._options.keep_array_indentation&&ZR(this._flags.mode);if(f.comments_before){var A=f.comments_before.next();while(A)this.handle_whitespace_and_comments(A,R),this.handle_token(A,R),A=f.comments_before.next()}if($)for(var G=0;G<h;G+=1)this.print_newline(G>0,R);else{if(this._options.max_preserve_newlines&&h>this._options.max_preserve_newlines)h=this._options.max_preserve_newlines;if(this._options.preserve_newlines){if(h>1){this.print_newline(!1,R);for(var H=1;H<h;H+=1)this.print_newline(!0,R)}}}};var lG=["async","break","continue","return","throw","yield"];V.prototype.allow_wrap_or_preserved_newline=function(f,R){if(R=R===void 0?!1:R,this._output.just_added_newline())return;var h=this._options.preserve_newlines&&f.newlines||R,$=I(this._flags.last_token.text,wh)||I(f.text,wh);if($){var A=I(this._flags.last_token.text,wh)&&I(this._options.operator_position,RS)||I(f.text,wh);h=h&&A}if(h)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(b(this._flags.last_token,lG))return;this._output.set_wrap_point()}};V.prototype.print_newline=function(f,R){if(!R){if(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==W.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")){var h=this._tokens.peek();while(this._flags.mode===z.Statement&&!(this._flags.if_block&&Ef(h,"else"))&&!this._flags.do_block)this.restore_mode()}}if(this._output.add_new_line(f))this._flags.multiline_frame=!0};V.prototype.print_token_line_indentation=function(f){if(this._output.just_added_newline()){if(this._options.keep_array_indentation&&f.newlines&&(f.text==="["||ZR(this._flags.mode)))this._output.current_line.set_indent(-1),this._output.current_line.push(f.whitespace_before),this._output.space_before_token=!1;else if(this._output.set_indent(this._flags.indentation_level,this._flags.alignment))this._flags.line_indent_level=this._flags.indentation_level}};V.prototype.print_token=function(f){if(this._output.raw){this._output.add_raw_token(f);return}if(this._options.comma_first&&f.previous&&f.previous.type===W.COMMA&&this._output.just_added_newline()){if(this._output.previous_line.last()===","){var R=this._output.previous_line.pop();if(this._output.previous_line.is_empty())this._output.previous_line.push(R),this._output.trim(!0),this._output.current_line.pop(),this._output.trim();this.print_token_line_indentation(f),this._output.add_token(","),this._output.space_before_token=!0}}if(this.print_token_line_indentation(f),this._output.non_breaking_space=!0,this._output.add_token(f.text),this._output.previous_token_wrapped)this._flags.multiline_frame=!0};V.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};V.prototype.deindent=function(){if(this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level))this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};V.prototype.set_mode=function(f){if(this._flags)this._flag_store.push(this._flags),this._previous_flags=this._flags;else this._previous_flags=this.create_flags(null,f);this._flags=this.create_flags(this._previous_flags,f),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};V.prototype.restore_mode=function(){if(this._flag_store.length>0){if(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===z.Statement)hS(this._output,this._previous_flags);this._output.set_indent(this._flags.indentation_level,this._flags.alignment)}};V.prototype.start_of_object_property=function(){return this._flags.parent.mode===z.ObjectLiteral&&this._flags.mode===z.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||b(this._flags.last_token,["get","set"]))};V.prototype.start_of_statement=function(f){var R=!1;if(R=R||b(this._flags.last_token,["var","let","const"])&&f.type===W.WORD,R=R||Ef(this._flags.last_token,"do"),R=R||!(this._flags.parent.mode===z.ObjectLiteral&&this._flags.mode===z.Statement)&&b(this._flags.last_token,lG)&&!f.newlines,R=R||Ef(this._flags.last_token,"else")&&!(Ef(f,"if")&&!f.comments_before),R=R||this._flags.last_token.type===W.END_EXPR&&(this._previous_flags.mode===z.ForInitializer||this._previous_flags.mode===z.Conditional),R=R||this._flags.last_token.type===W.WORD&&this._flags.mode===z.BlockStatement&&!this._flags.in_case&&!(f.text==="--"||f.text==="++")&&this._last_last_text!=="function"&&f.type!==W.WORD&&f.type!==W.RESERVED,R=R||this._flags.mode===z.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||b(this._flags.last_token,["get","set"])),R){if(this.set_mode(z.Statement),this.indent(),this.handle_whitespace_and_comments(f,!0),!this.start_of_object_property())this.allow_wrap_or_preserved_newline(f,b(f,["do","for","if","while"]));return!0}return!1};V.prototype.handle_start_expr=function(f){if(!this.start_of_statement(f))this.handle_whitespace_and_comments(f);var R=z.Expression;if(f.text==="["){if(this._flags.last_token.type===W.WORD||this._flags.last_token.text===")"){if(b(this._flags.last_token,Ph))this._output.space_before_token=!0;if(this.print_token(f),this.set_mode(R),this.indent(),this._options.space_in_paren)this._output.space_before_token=!0;return}if(R=z.ArrayLiteral,ZR(this._flags.mode)){if(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}")){if(!this._options.keep_array_indentation)this.print_newline()}}if(!I(this._flags.last_token.type,[W.START_EXPR,W.END_EXPR,W.WORD,W.OPERATOR,W.DOT]))this._output.space_before_token=!0}else{if(this._flags.last_token.type===W.RESERVED){if(this._flags.last_token.text==="for")this._output.space_before_token=this._options.space_before_conditional,R=z.ForInitializer;else if(I(this._flags.last_token.text,["if","while","switch"]))this._output.space_before_token=this._options.space_before_conditional,R=z.Conditional;else if(I(this._flags.last_word,["await","async"]))this._output.space_before_token=!0;else if(this._flags.last_token.text==="import"&&f.whitespace_before==="")this._output.space_before_token=!1;else if(I(this._flags.last_token.text,Ph)||this._flags.last_token.text==="catch")this._output.space_before_token=!0}else if(this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR){if(!this.start_of_object_property())this.allow_wrap_or_preserved_newline(f)}else if(this._flags.last_token.type===W.WORD){this._output.space_before_token=!1;var h=this._tokens.peek(-3);if(this._options.space_after_named_function&&h){var $=this._tokens.peek(-4);if(b(h,["async","function"])||h.text==="*"&&b($,["async","function"]))this._output.space_before_token=!0;else if(this._flags.mode===z.ObjectLiteral){if(h.text==="{"||h.text===","||h.text==="*"&&($.text==="{"||$.text===","))this._output.space_before_token=!0}else if(this._flags.parent&&this._flags.parent.class_start_block)this._output.space_before_token=!0}}else this.allow_wrap_or_preserved_newline(f);if(this._flags.last_token.type===W.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(I(this._last_last_text,["function","yield"])||this._flags.mode===z.ObjectLiteral&&I(this._last_last_text,["{",","])))this._output.space_before_token=this._options.space_after_anon_function}if(this._flags.last_token.text===";"||this._flags.last_token.type===W.START_BLOCK)this.print_newline();else if(this._flags.last_token.type===W.END_EXPR||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===W.COMMA)this.allow_wrap_or_preserved_newline(f,f.newlines);if(this.print_token(f),this.set_mode(R),this._options.space_in_paren)this._output.space_before_token=!0;this.indent()};V.prototype.handle_end_expr=function(f){while(this._flags.mode===z.Statement)this.restore_mode();if(this.handle_whitespace_and_comments(f),this._flags.multiline_frame)this.allow_wrap_or_preserved_newline(f,f.text==="]"&&ZR(this._flags.mode)&&!this._options.keep_array_indentation);if(this._options.space_in_paren)if(this._flags.last_token.type===W.START_EXPR&&!this._options.space_in_empty_paren)this._output.trim(),this._output.space_before_token=!1;else this._output.space_before_token=!0;if(this.deindent(),this.print_token(f),this.restore_mode(),hS(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===z.Conditional)this._previous_flags.mode=z.Expression,this._flags.do_block=!1,this._flags.do_while=!1};V.prototype.handle_start_block=function(f){this.handle_whitespace_and_comments(f);var R=this._tokens.peek(),h=this._tokens.peek(1);if(this._flags.last_word==="switch"&&this._flags.last_token.type===W.END_EXPR)this.set_mode(z.BlockStatement),this._flags.in_case_statement=!0;else if(this._flags.case_body)this.set_mode(z.BlockStatement);else if(h&&(I(h.text,[":",","])&&I(R.type,[W.STRING,W.WORD,W.RESERVED])||I(R.text,["get","set","..."])&&I(h.type,[W.WORD,W.RESERVED])))if(I(this._last_last_text,["class","interface"])&&!I(h.text,[":",","]))this.set_mode(z.BlockStatement);else this.set_mode(z.ObjectLiteral);else if(this._flags.last_token.type===W.OPERATOR&&this._flags.last_token.text==="=>")this.set_mode(z.BlockStatement);else if(I(this._flags.last_token.type,[W.EQUALS,W.START_EXPR,W.COMMA,W.OPERATOR])||b(this._flags.last_token,["return","throw","import","default"]))this.set_mode(z.ObjectLiteral);else this.set_mode(z.BlockStatement);if(this._flags.last_token){if(b(this._flags.last_token.previous,["class","extends"]))this._flags.class_start_block=!0}var $=!R.comments_before&&R.text==="}",A=$&&this._flags.last_word==="function"&&this._flags.last_token.type===W.END_EXPR;if(this._options.brace_preserve_inline){var G=0,H=null;this._flags.inline_frame=!0;do if(G+=1,H=this._tokens.peek(G-1),H.newlines){this._flags.inline_frame=!1;break}while(H.type!==W.EOF&&!(H.type===W.END_BLOCK&&H.opened===f))}if((this._options.brace_style==="expand"||this._options.brace_style==="none"&&f.newlines)&&!this._flags.inline_frame)if(this._flags.last_token.type!==W.OPERATOR&&(A||this._flags.last_token.type===W.EQUALS||b(this._flags.last_token,j$)&&this._flags.last_token.text!=="else"))this._output.space_before_token=!0;else this.print_newline(!1,!0);else{if(ZR(this._previous_flags.mode)&&(this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.COMMA)){if(this._flags.last_token.type===W.COMMA||this._options.space_in_paren)this._output.space_before_token=!0;if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR&&this._flags.inline_frame)this.allow_wrap_or_preserved_newline(f),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1}if(this._flags.last_token.type!==W.OPERATOR&&this._flags.last_token.type!==W.START_EXPR)if(I(this._flags.last_token.type,[W.START_BLOCK,W.SEMICOLON])&&!this._flags.inline_frame)this.print_newline();else this._output.space_before_token=!0}if(this.print_token(f),this.indent(),!$&&!(this._options.brace_preserve_inline&&this._flags.inline_frame))this.print_newline()};V.prototype.handle_end_block=function(f){this.handle_whitespace_and_comments(f);while(this._flags.mode===z.Statement)this.restore_mode();var R=this._flags.last_token.type===W.START_BLOCK;if(this._flags.inline_frame&&!R)this._output.space_before_token=!0;else if(this._options.brace_style==="expand"){if(!R)this.print_newline()}else if(!R)if(ZR(this._flags.mode)&&this._options.keep_array_indentation)this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0;else this.print_newline();this.restore_mode(),this.print_token(f)};V.prototype.handle_word=function(f){if(f.type===W.RESERVED){if(I(f.text,["set","get"])&&this._flags.mode!==z.ObjectLiteral)f.type=W.WORD;else if(f.text==="import"&&I(this._tokens.peek().text,["(","."]))f.type=W.WORD;else if(I(f.text,["as","from"])&&!this._flags.import_block)f.type=W.WORD;else if(this._flags.mode===z.ObjectLiteral){var R=this._tokens.peek();if(R.text===":")f.type=W.WORD}}if(this.start_of_statement(f)){if(b(this._flags.last_token,["var","let","const"])&&f.type===W.WORD)this._flags.declaration_statement=!0}else if(f.newlines&&!Ih(this._flags.mode)&&(this._flags.last_token.type!==W.OPERATOR||(this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))&&this._flags.last_token.type!==W.EQUALS&&(this._options.preserve_newlines||!b(this._flags.last_token,["var","let","const","set","get"])))this.handle_whitespace_and_comments(f),this.print_newline();else this.handle_whitespace_and_comments(f);if(this._flags.do_block&&!this._flags.do_while)if(Ef(f,"while")){this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&Ef(f,"else"))this._flags.else_block=!0;else{while(this._flags.mode===z.Statement)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&b(f,["case","default"])){if(this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy))this.deindent();this._flags.case_body=!1,this.print_token(f),this._flags.in_case=!0;return}if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR){if(!this.start_of_object_property()&&!(I(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===z.ObjectLiteral))this.allow_wrap_or_preserved_newline(f)}if(Ef(f,"function")){if(I(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(I(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===W.OPERATOR)){if(!this._output.just_added_blankline()&&!f.comments_before)this.print_newline(),this.print_newline(!0)}if(this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD)if(b(this._flags.last_token,["get","set","new","export"])||b(this._flags.last_token,lG))this._output.space_before_token=!0;else if(Ef(this._flags.last_token,"default")&&this._last_last_text==="export")this._output.space_before_token=!0;else if(this._flags.last_token.text==="declare")this._output.space_before_token=!0;else this.print_newline();else if(this._flags.last_token.type===W.OPERATOR||this._flags.last_token.text==="=")this._output.space_before_token=!0;else if(!this._flags.multiline_frame&&(Ih(this._flags.mode)||ZR(this._flags.mode)));else this.print_newline();this.print_token(f),this._flags.last_word=f.text;return}var h="NONE";if(this._flags.last_token.type===W.END_BLOCK)if(this._previous_flags.inline_frame)h="SPACE";else if(!b(f,["else","catch","finally","from"]))h="NEWLINE";else if(this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&f.newlines)h="NEWLINE";else h="SPACE",this._output.space_before_token=!0;else if(this._flags.last_token.type===W.SEMICOLON&&this._flags.mode===z.BlockStatement)h="NEWLINE";else if(this._flags.last_token.type===W.SEMICOLON&&Ih(this._flags.mode))h="SPACE";else if(this._flags.last_token.type===W.STRING)h="NEWLINE";else if(this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD||this._flags.last_token.text==="*"&&(I(this._last_last_text,["function","yield"])||this._flags.mode===z.ObjectLiteral&&I(this._last_last_text,["{",","])))h="SPACE";else if(this._flags.last_token.type===W.START_BLOCK)if(this._flags.inline_frame)h="SPACE";else h="NEWLINE";else if(this._flags.last_token.type===W.END_EXPR)this._output.space_before_token=!0,h="NEWLINE";if(b(f,Ph)&&this._flags.last_token.text!==")")if(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export")h="SPACE";else h="NEWLINE";if(b(f,["else","catch","finally"]))if((!(this._flags.last_token.type===W.END_BLOCK&&this._previous_flags.mode===z.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&f.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var $=this._output.current_line;if($.last()!=="}")this.print_newline();this._output.space_before_token=!0}else if(h==="NEWLINE"){if(b(this._flags.last_token,j$))this._output.space_before_token=!0;else if(this._flags.last_token.text==="declare"&&b(f,["var","let","const"]))this._output.space_before_token=!0;else if(this._flags.last_token.type!==W.END_EXPR){if((this._flags.last_token.type!==W.START_EXPR||!b(f,["var","let","const"]))&&this._flags.last_token.text!==":")if(Ef(f,"if")&&Ef(f.previous,"else"))this._output.space_before_token=!0;else this.print_newline()}else if(b(f,Ph)&&this._flags.last_token.text!==")")this.print_newline()}else if(this._flags.multiline_frame&&ZR(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}")this.print_newline();else if(h==="SPACE")this._output.space_before_token=!0;if(f.previous&&(f.previous.type===W.WORD||f.previous.type===W.RESERVED))this._output.space_before_token=!0;if(this.print_token(f),this._flags.last_word=f.text,f.type===W.RESERVED){if(f.text==="do")this._flags.do_block=!0;else if(f.text==="if")this._flags.if_block=!0;else if(f.text==="import")this._flags.import_block=!0;else if(this._flags.import_block&&Ef(f,"from"))this._flags.import_block=!1}};V.prototype.handle_semicolon=function(f){if(this.start_of_statement(f))this._output.space_before_token=!1;else this.handle_whitespace_and_comments(f);var R=this._tokens.peek();while(this._flags.mode===z.Statement&&!(this._flags.if_block&&Ef(R,"else"))&&!this._flags.do_block)this.restore_mode();if(this._flags.import_block)this._flags.import_block=!1;this.print_token(f)};V.prototype.handle_string=function(f){if(f.text.startsWith("`")&&f.newlines===0&&f.whitespace_before===""&&(f.previous.text===")"||this._flags.last_token.type===W.WORD));else if(this.start_of_statement(f))this._output.space_before_token=!0;else if(this.handle_whitespace_and_comments(f),this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD||this._flags.inline_frame)this._output.space_before_token=!0;else if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR){if(!this.start_of_object_property())this.allow_wrap_or_preserved_newline(f)}else if(f.text.startsWith("`")&&this._flags.last_token.type===W.END_EXPR&&(f.previous.text==="]"||f.previous.text===")")&&f.newlines===0)this._output.space_before_token=!0;else this.print_newline();this.print_token(f)};V.prototype.handle_equals=function(f){if(this.start_of_statement(f));else this.handle_whitespace_and_comments(f);if(this._flags.declaration_statement)this._flags.declaration_assignment=!0;this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0};V.prototype.handle_comma=function(f){if(this.handle_whitespace_and_comments(f,!0),this.print_token(f),this._output.space_before_token=!0,this._flags.declaration_statement){if(Ih(this._flags.parent.mode))this._flags.declaration_assignment=!1;if(this._flags.declaration_assignment)this._flags.declaration_assignment=!1,this.print_newline(!1,!0);else if(this._options.comma_first)this.allow_wrap_or_preserved_newline(f)}else if(this._flags.mode===z.ObjectLiteral||this._flags.mode===z.Statement&&this._flags.parent.mode===z.ObjectLiteral){if(this._flags.mode===z.Statement)this.restore_mode();if(!this._flags.inline_frame)this.print_newline()}else if(this._options.comma_first)this.allow_wrap_or_preserved_newline(f)};V.prototype.handle_operator=function(f){var R=f.text==="*"&&(b(this._flags.last_token,["function","yield"])||I(this._flags.last_token.type,[W.START_BLOCK,W.COMMA,W.END_BLOCK,W.SEMICOLON])),h=I(f.text,["-","+"])&&(I(this._flags.last_token.type,[W.START_BLOCK,W.START_EXPR,W.EQUALS,W.OPERATOR])||I(this._flags.last_token.text,Ph)||this._flags.last_token.text===",");if(this.start_of_statement(f));else{var $=!R;this.handle_whitespace_and_comments(f,$)}if(f.text==="*"&&this._flags.last_token.type===W.DOT){this.print_token(f);return}if(f.text==="::"){this.print_token(f);return}if(I(f.text,["-","+"])&&this.start_of_object_property()){this.print_token(f);return}if(this._flags.last_token.type===W.OPERATOR&&I(this._options.operator_position,RS))this.allow_wrap_or_preserved_newline(f);if(f.text===":"&&this._flags.in_case){if(this.print_token(f),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==W.START_BLOCK)this.indent(),this.print_newline(),this._flags.case_block=!1;else this._flags.case_block=!0,this._output.space_before_token=!0;return}var A=!0,G=!0,H=!1;if(f.text===":")if(this._flags.ternary_depth===0)A=!1;else this._flags.ternary_depth-=1,H=!0;else if(f.text==="?")this._flags.ternary_depth+=1;if(!h&&!R&&this._options.preserve_newlines&&I(f.text,wh)){var N=f.text===":",U=N&&H,F=N&&!H;switch(this._options.operator_position){case Lh.before_newline:if(this._output.space_before_token=!F,this.print_token(f),!N||U)this.allow_wrap_or_preserved_newline(f);this._output.space_before_token=!0;return;case Lh.after_newline:if(this._output.space_before_token=!0,!N||U)if(this._tokens.peek().newlines)this.print_newline(!1,!0);else this.allow_wrap_or_preserved_newline(f);else this._output.space_before_token=!1;this.print_token(f),this._output.space_before_token=!0;return;case Lh.preserve_newline:if(!F)this.allow_wrap_or_preserved_newline(f);A=!(this._output.just_added_newline()||F),this._output.space_before_token=A,this.print_token(f),this._output.space_before_token=!0;return}}if(R){this.allow_wrap_or_preserved_newline(f),A=!1;var S=this._tokens.peek();G=S&&I(S.type,[W.WORD,W.RESERVED])}else if(f.text==="...")this.allow_wrap_or_preserved_newline(f),A=this._flags.last_token.type===W.START_BLOCK,G=!1;else if(I(f.text,["--","++","!","~"])||h){if(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR)this.allow_wrap_or_preserved_newline(f);if(A=!1,G=!1,f.newlines&&(f.text==="--"||f.text==="++"||f.text==="~")){var D=b(this._flags.last_token,j$)&&f.newlines;if(D&&(this._previous_flags.if_block||this._previous_flags.else_block))this.restore_mode();this.print_newline(D,!0)}if(this._flags.last_token.text===";"&&Ih(this._flags.mode))A=!0;if(this._flags.last_token.type===W.RESERVED)A=!0;else if(this._flags.last_token.type===W.END_EXPR)A=!(this._flags.last_token.text==="]"&&(f.text==="--"||f.text==="++"));else if(this._flags.last_token.type===W.OPERATOR){if(A=I(f.text,["--","-","++","+"])&&I(this._flags.last_token.text,["--","-","++","+"]),I(f.text,["+","-"])&&I(this._flags.last_token.text,["--","++"]))G=!0}if((this._flags.mode===z.BlockStatement&&!this._flags.inline_frame||this._flags.mode===z.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";"))this.print_newline()}this._output.space_before_token=this._output.space_before_token||A,this.print_token(f),this._output.space_before_token=G};V.prototype.handle_block_comment=function(f,R){if(this._output.raw){if(this._output.add_raw_token(f),f.directives&&f.directives.preserve==="end")this._output.raw=this._options.test_output_raw;return}if(f.directives){if(this.print_newline(!1,R),this.print_token(f),f.directives.preserve==="start")this._output.raw=!0;this.print_newline(!1,!0);return}if(!y$.newline.test(f.text)&&!f.newlines){this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0;return}else this.print_block_commment(f,R)};V.prototype.print_block_commment=function(f,R){var h=KX(f.text),$,A=!1,G=!1,H=f.whitespace_before,N=H.length;if(this.print_newline(!1,R),this.print_token_line_indentation(f),this._output.add_token(h[0]),this.print_newline(!1,R),h.length>1){if(h=h.slice(1),A=vX(h,"*"),G=yX(h,H),A)this._flags.alignment=1;for($=0;$<h.length;$++){if(A)this.print_token_line_indentation(f),this._output.add_token(PX(h[$]));else if(G&&h[$])this.print_token_line_indentation(f),this._output.add_token(h[$].substring(N));else this._output.current_line.set_indent(-1),this._output.add_token(h[$]);this.print_newline(!1,R)}this._flags.alignment=0}};V.prototype.handle_comment=function(f,R){if(f.newlines)this.print_newline(!1,R);else this._output.trim(!0);this._output.space_before_token=!0,this.print_token(f),this.print_newline(!1,R)};V.prototype.handle_dot=function(f){if(this.start_of_statement(f));else this.handle_whitespace_and_comments(f,!0);if(this._flags.last_token.text.match("^[0-9]+$"))this._output.space_before_token=!0;if(b(this._flags.last_token,j$))this._output.space_before_token=!1;else this.allow_wrap_or_preserved_newline(f,this._flags.last_token.text===")"&&this._options.break_chained_methods);if(this._options.unindent_chained_methods&&this._output.just_added_newline())this.deindent();this.print_token(f)};V.prototype.handle_unknown=function(f,R){if(this.print_token(f),f.text[f.text.length-1]===`
24
+ `)this.print_newline(!1,R)};V.prototype.handle_eof=function(f){while(this._flags.mode===z.Statement)this.restore_mode();this.handle_whitespace_and_comments(f)};jX.Beautifier=V});var GS=l((My,_G)=>{var EX=AS().Beautifier,VX=TG().Options;function TX(f,R){var h=new EX(f,R);return h.beautify()}_G.exports=TX;_G.exports.defaultOptions=function(){return new VX}});var dG=l((gX,US)=>{var HS=q$().Options;function NS(f){HS.call(this,f,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var R=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||R;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var $=0;$<h.length;$++)if(h[$]!=="expand")this.brace_style="collapse";else this.brace_style=h[$]}NS.prototype=new HS;gX.Options=NS});var YS=l((dX,SS)=>{var mX=dG().Options,cX=I$().Output,bX=B$().InputScanner,xX=K$().Directives,FS=new xX(/\/\*/,/\*\//),WS=/\r\n|[\r\n]/,kX=/\r\n|[\r\n]/g,O$=/\s/,sX=/(?:\s|\n)+/g,lX=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_X=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function ef(f,R){this._source_text=f||"",this._options=new mX(R),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}ef.prototype.eatString=function(f){var R="";this._ch=this._input.next();while(this._ch){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(f.indexOf(this._ch)!==-1||this._ch===`
25
25
  `)break;this._ch=this._input.next()}return R};ef.prototype.eatWhitespace=function(f){var R=O$.test(this._input.peek()),h=0;while(O$.test(this._input.peek()))if(this._ch=this._input.next(),f&&this._ch===`
26
26
  `){if(h===0||h<this._options.max_preserve_newlines)h++,this._output.add_new_line(!0)}return R};ef.prototype.foundNestedPseudoClass=function(){var f=0,R=1,h=this._input.peek(R);while(h){if(h==="{")return!0;else if(h==="(")f+=1;else if(h===")"){if(f===0)return!1;f-=1}else if(h===";"||h==="}")return!1;R++,h=this._input.peek(R)}return!1};ef.prototype.print_string=function(f){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(f)};ef.prototype.preserveSingleSpace=function(f){if(f)this._output.space_before_token=!0};ef.prototype.indent=function(){this._indentLevel++};ef.prototype.outdent=function(){if(this._indentLevel>0)this._indentLevel--};ef.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f=this._source_text,R=this._options.eol;if(R==="auto"){if(R=`
27
- `,f&&HS.test(f||""))R=f.match(HS)[0]}f=f.replace(mX,`
28
- `);var h=f.match(/^[\t ]*/)[0];this._output=new TX(this._options,h),this._input=new gX(f),this._indentLevel=0,this._nestedLevel=0,this._ch=null;var $=0,A=!1,G=!1,H=!1,N=!1,U=!1,F=this._ch,S=!1,D,J,Z;while(!0){if(D=this._input.read(cX),J=D!=="",Z=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext())this._ch+=this._input.next();if(F=this._ch,!this._ch)break;else if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var L=this._input.read(bX),P=GS.get_directives(L);if(P&&P.ignore==="start")L+=GS.readIgnored(this._input);this.print_string(L),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(xX)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(J),this.print_string(this._ch);var a=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);if(a.match(/[ :]$/))a=this.eatString(": ").replace(/\s+$/,""),this.print_string(a),this._output.space_before_token=!0;if($===0&&a.indexOf(":")!==-1)G=!0,this.indent()}else if(this._ch==="@")if(this.preserveSingleSpace(J),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var gf=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);if(gf.match(/[ :]$/))gf=this.eatString(": ").replace(/\s+$/,""),this.print_string(gf),this._output.space_before_token=!0;if($===0&&gf.indexOf(":")!==-1)G=!0,this.indent();else if(gf in this.NESTED_AT_RULE){if(this._nestedLevel+=1,gf in this.CONDITIONAL_GROUP_RULE)H=!0}else if($===0&&!G)N=!0}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(J),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{"){if(G)G=!1,this.outdent();if(N=!1,H)H=!1,A=this._indentLevel>=this._nestedLevel;else A=this._indentLevel>=this._nestedLevel-1;if(this._options.newline_between_rules&&A){if(this._output.previous_line&&this._output.previous_line.item(-1)!=="{")this._output.ensure_empty_line_above("/",",")}if(this._output.space_before_token=!0,this._options.brace_style==="expand")this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel);else{if(Z==="(")this._output.space_before_token=!1;else if(Z!==",")this.indent();this.print_string(this._ch)}this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="}"){if(this.outdent(),this._output.add_new_line(),Z==="{")this._output.trim(!0);if(G)this.outdent(),G=!1;if(this.print_string(this._ch),A=!1,this._nestedLevel)this._nestedLevel--;if(this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()){if(this._input.peek()!=="}")this._output.add_new_line(!0)}if(this._input.peek()===")"){if(this._output.trim(!0),this._options.brace_style==="expand")this._output.add_new_line(!0)}}else if(this._ch===":"){for(var Cf=0;Cf<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Cf++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Cf])){S=!0;break}if((A||H)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&$===0){if(this.print_string(":"),!G)G=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()}else{if(this._input.lookBack(" "))this._output.space_before_token=!0;if(this._input.peek()===":")this._ch=this._input.next(),this.print_string("::");else this.print_string(":")}}else if(this._ch==='"'||this._ch==="'"){var fN=Z==='"'||Z==="'";this.preserveSingleSpace(fN||J),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")if(S=!1,$===0){if(G)this.outdent(),G=!1;if(N=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/")this._output.add_new_line()}else this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0;else if(this._ch==="(")if(this._input.lookBack("url")){if(this.print_string(this._ch),this.eatWhitespace(),$++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'")this._input.back();else if(this._ch){if(this.print_string(this._ch+this.eatString(")")),$)$--,this.outdent()}}else{var LR=!1;if(this._input.lookBack("with"))LR=!0;if(this.preserveSingleSpace(J||LR),this.print_string(this._ch),G&&Z==="$"&&this._options.selector_separator_newline)this._output.add_new_line(),U=!0;else this.eatWhitespace(),$++,this.indent()}else if(this._ch===")"){if($)$--,this.outdent();if(U&&this._input.peek()===";"&&this._options.selector_separator_newline)U=!1,this.outdent(),this._output.add_new_line();this.print_string(this._ch)}else if(this._ch===",")if(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!G||U)&&$===0&&!N)this._output.add_new_line();else this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!G&&$===0){if(this._options.space_around_combinator)this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0;else if(this.print_string(this._ch),this.eatWhitespace(),this._ch&&O$.test(this._ch))this._ch=""}else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(J),this.print_string(this._ch);else if(this._ch==="="){if(this.eatWhitespace(),this.print_string("="),O$.test(this._ch))this._ch=""}else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ch=Z==='"'||Z==="'";if(this.preserveSingleSpace(ch||J),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
29
- `&&S)this._output.add_new_line()}}var E0=this._output.get_code(R);return E0};kX.Beautifier=ef});var FS=l((Jy,aG)=>{var lX=US().Beautifier,_X=dG().Options;function dX(f,R){var h=new lX(f,R);return h.beautify()}aG.exports=dX;aG.exports.defaultOptions=function(){return new _X}});var rG=l((aX,YS)=>{var WS=q$().Options;function SS(f){if(WS.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto")this.templating=["django","erb","handlebars","php"];this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}SS.prototype=new WS;aX.Options=SS});var oG=l((nX,pG)=>{var ZS=zh().Tokenizer,iG=zh().TOKEN,iX=K$().Directives,pX=xG().TemplatablePattern,oX=Jh().Pattern,T={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:iG.START,RAW:iG.RAW,EOF:iG.EOF},DS=new iX(/<\!--/,/-->/),Nf=function(f,R){ZS.call(this,f,R),this._current_tag_name="";var h=new pX(this._input).read_options(this._options),$=new oX(this._input);if(this.__patterns={word:h.until(/[\n\r\t <]/),word_control_flow_close_excluded:h.until(/[\n\r\t <}]/),single_quote:h.until_after(/'/),double_quote:h.until_after(/"/),attribute:h.until(/[\n\r\t =>]|\/>/),element_name:h.until(/[\n\r\t >\/]/),angular_control_flow_start:$.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:$.starting_with(/{{!--/).until_after(/--}}/),handlebars:$.starting_with(/{{/).until_after(/}}/),handlebars_open:$.until(/[\n\r\t }]/),handlebars_raw_close:$.until(/}}/),comment:$.starting_with(/<!--/).until_after(/-->/),cdata:$.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:$.starting_with(/<!\[/).until_after(/]>/),processing:$.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars)this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars");if(this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var A=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=$.matching(A).until_after(A)}};Nf.prototype=new ZS;Nf.prototype._is_comment=function(f){return!1};Nf.prototype._is_opening=function(f){return f.type===T.TAG_OPEN||f.type===T.CONTROL_FLOW_OPEN};Nf.prototype._is_closing=function(f,R){return f.type===T.TAG_CLOSE&&(R&&((f.text===">"||f.text==="/>")&&R.text[0]==="<"||f.text==="}}"&&R.text[0]==="{"&&R.text[1]==="{"))||f.type===T.CONTROL_FLOW_CLOSE&&(f.text==="}"&&R.text.endsWith("{"))};Nf.prototype._reset=function(){this._current_tag_name=""};Nf.prototype._get_next_token=function(f,R){var h=null;this._readWhitespace();var $=this._input.peek();if($===null)return this._create_token(T.EOF,"");return h=h||this._read_open_handlebars($,R),h=h||this._read_attribute($,f,R),h=h||this._read_close($,R),h=h||this._read_script_and_style($,f),h=h||this._read_control_flows($,R),h=h||this._read_raw_content($,f,R),h=h||this._read_content_word($,R),h=h||this._read_comment_or_cdata($),h=h||this._read_processing($),h=h||this._read_open($,R),h=h||this._create_token(T.UNKNOWN,this._input.next()),h};Nf.prototype._read_comment_or_cdata=function(f){var R=null,h=null,$=null;if(f==="<"){var A=this._input.peek(1);if(A==="!")if(h=this.__patterns.comment.read(),h){if($=DS.get_directives(h),$&&$.ignore==="start")h+=DS.readIgnored(this._input)}else h=this.__patterns.cdata.read();if(h)R=this._create_token(T.COMMENT,h),R.directives=$}return R};Nf.prototype._read_processing=function(f){var R=null,h=null,$=null;if(f==="<"){var A=this._input.peek(1);if(A==="!"||A==="?")h=this.__patterns.conditional_comment.read(),h=h||this.__patterns.processing.read();if(h)R=this._create_token(T.COMMENT,h),R.directives=$}return R};Nf.prototype._read_open=function(f,R){var h=null,$=null;if(!R||R.type===T.CONTROL_FLOW_OPEN){if(f==="<"){if(h=this._input.next(),this._input.peek()==="/")h+=this._input.next();h+=this.__patterns.element_name.read(),$=this._create_token(T.TAG_OPEN,h)}}return $};Nf.prototype._read_open_handlebars=function(f,R){var h=null,$=null;if(!R||R.type===T.CONTROL_FLOW_OPEN){if((this._options.templating.includes("angular")||this._options.indent_handlebars)&&f==="{"&&this._input.peek(1)==="{")if(this._options.indent_handlebars&&this._input.peek(2)==="!")h=this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars.read(),$=this._create_token(T.COMMENT,h);else h=this.__patterns.handlebars_open.read(),$=this._create_token(T.TAG_OPEN,h)}return $};Nf.prototype._read_control_flows=function(f,R){var h="",$=null;if(!this._options.templating.includes("angular"))return $;if(f==="@"){if(h=this.__patterns.angular_control_flow_start.read(),h==="")return $;var A=h.endsWith("(")?1:0,G=0;while(!(h.endsWith("{")&&A===G)){var H=this._input.next();if(H===null)break;else if(H==="(")A++;else if(H===")")G++;h+=H}$=this._create_token(T.CONTROL_FLOW_OPEN,h)}else if(f==="}"&&R&&R.type===T.CONTROL_FLOW_OPEN)h=this._input.next(),$=this._create_token(T.CONTROL_FLOW_CLOSE,h);return $};Nf.prototype._read_close=function(f,R){var h=null,$=null;if(R&&R.type===T.TAG_OPEN){if(R.text[0]==="<"&&(f===">"||f==="/"&&this._input.peek(1)===">")){if(h=this._input.next(),f==="/")h+=this._input.next();$=this._create_token(T.TAG_CLOSE,h)}else if(R.text[0]==="{"&&f==="}"&&this._input.peek(1)==="}")this._input.next(),this._input.next(),$=this._create_token(T.TAG_CLOSE,"}}")}return $};Nf.prototype._read_attribute=function(f,R,h){var $=null,A="";if(h&&h.text[0]==="<"){if(f==="=")$=this._create_token(T.EQUALS,this._input.next());else if(f==='"'||f==="'"){var G=this._input.next();if(f==='"')G+=this.__patterns.double_quote.read();else G+=this.__patterns.single_quote.read();$=this._create_token(T.VALUE,G)}else if(A=this.__patterns.attribute.read(),A)if(R.type===T.EQUALS)$=this._create_token(T.VALUE,A);else $=this._create_token(T.ATTRIBUTE,A)}return $};Nf.prototype._is_content_unformatted=function(f){return this._options.void_elements.indexOf(f)===-1&&(this._options.content_unformatted.indexOf(f)!==-1||this._options.unformatted.indexOf(f)!==-1)};Nf.prototype._read_raw_content=function(f,R,h){var $="";if(h&&h.text[0]==="{")$=this.__patterns.handlebars_raw_close.read();else if(R.type===T.TAG_CLOSE&&R.opened.text[0]==="<"&&R.text[0]!=="/"){var A=R.opened.text.substr(1).toLowerCase();if(this._is_content_unformatted(A))$=this._input.readUntil(new RegExp("</"+A+"[\\n\\r\\t ]*?>","ig"))}if($)return this._create_token(T.TEXT,$);return null};Nf.prototype._read_script_and_style=function(f,R){if(R.type===T.TAG_CLOSE&&R.opened.text[0]==="<"&&R.text[0]!=="/"){var h=R.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var $=this._read_comment_or_cdata(f);if($)return $.type=T.TEXT,$;var A=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"));if(A)return this._create_token(T.TEXT,A)}}return null};Nf.prototype._read_content_word=function(f,R){var h="";if(this._options.unformatted_content_delimiter){if(f===this._options.unformatted_content_delimiter[0])h=this.__patterns.unformatted_content_delimiter.read()}if(!h)h=R&&R.type===T.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read();if(h)return this._create_token(T.TEXT,h);return null};nX.Tokenizer=Nf;nX.TOKEN=T});var zS=l((Uz,XS)=>{var tX=rG().Options,fz=I$().Output,Rz=oG().Tokenizer,g=oG().TOKEN,MS=/\r\n|[\r\n]/,hz=/\r\n|[\r\n]/g,qf=function(f,R){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=f.max_preserve_newlines,this.preserve_newlines=f.preserve_newlines,this._output=new fz(f,R)};qf.prototype.current_line_has_match=function(f){return this._output.current_line.has_match(f)};qf.prototype.set_space_before_token=function(f,R){this._output.space_before_token=f,this._output.non_breaking_space=R};qf.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()};qf.prototype.add_raw_token=function(f){this._output.add_raw_token(f)};qf.prototype.print_preserved_newlines=function(f){var R=0;if(f.type!==g.TEXT&&f.previous.type!==g.TEXT)R=f.newlines?1:0;if(this.preserve_newlines)R=f.newlines<this.max_preserve_newlines+1?f.newlines:this.max_preserve_newlines+1;for(var h=0;h<R;h++)this.print_newline(h>0);return R!==0};qf.prototype.traverse_whitespace=function(f){if(f.whitespace_before||f.newlines){if(!this.print_preserved_newlines(f))this._output.space_before_token=!0;return!0}return!1};qf.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped};qf.prototype.print_newline=function(f){this._output.add_new_line(f)};qf.prototype.print_token=function(f){if(f.text)this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(f.text)};qf.prototype.indent=function(){this.indent_level++};qf.prototype.deindent=function(){if(this.indent_level>0)this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size)};qf.prototype.get_full_indent=function(f){if(f=this.indent_level+(f||0),f<1)return"";return this._output.get_indent_string(f)};var $z=function(f){var R=null,h=f.next;while(h.type!==g.EOF&&f.closed!==h){if(h.type===g.ATTRIBUTE&&h.text==="type"){if(h.next&&h.next.type===g.EQUALS&&h.next.next&&h.next.next.type===g.VALUE)R=h.next.next.text;break}h=h.next}return R},Az=function(f,R){var h=null,$=null;if(!R.closed)return null;if(f==="script")h="text/javascript";else if(f==="style")h="text/css";if(h=$z(R)||h,h.search("text/css")>-1)$="css";else if(h.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1)$="javascript";else if(h.search(/(text|application|dojo)\/(x-)?(html)/)>-1)$="html";else if(h.search(/test\/null/)>-1)$="null";return $};function Bh(f,R){return R.indexOf(f)!==-1}function Gz(f,R,h){this.parent=f||null,this.tag=R?R.tag_name:"",this.indent_level=h||0,this.parser_token=R||null}function kR(f){this._printer=f,this._current_frame=null}kR.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null};kR.prototype.record_tag=function(f){var R=new Gz(this._current_frame,f,this._printer.indent_level);this._current_frame=R};kR.prototype._try_pop_frame=function(f){var R=null;if(f)R=f.parser_token,this._printer.indent_level=f.indent_level,this._current_frame=f.parent;return R};kR.prototype._get_frame=function(f,R){var h=this._current_frame;while(h){if(f.indexOf(h.tag)!==-1)break;else if(R&&R.indexOf(h.tag)!==-1){h=null;break}h=h.parent}return h};kR.prototype.try_pop=function(f,R){var h=this._get_frame([f],R);return this._try_pop_frame(h)};kR.prototype.indent_to_tag=function(f){var R=this._get_frame(f);if(R)this._printer.indent_level=R.indent_level};function Lf(f,R,h,$){this._source_text=f||"",R=R||{},this._js_beautify=h,this._css_beautify=$,this._tag_stack=null;var A=new tX(R,"html");this._options=A,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}Lf.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f=this._source_text,R=this._options.eol;if(this._options.eol==="auto"){if(R=`
30
- `,f&&MS.test(f))R=f.match(MS)[0]}f=f.replace(hz,`
31
- `);var h=f.match(/^[\t ]*/)[0],$={text:"",type:""},A=new JS(this._options),G=new qf(this._options,h),H=new Rz(f,this._options).tokenize();this._tag_stack=new kR(G);var N=null,U=H.next();while(U.type!==g.EOF){if(U.type===g.TAG_OPEN||U.type===g.COMMENT)N=this._handle_tag_open(G,U,A,$,H),A=N;else if(U.type===g.ATTRIBUTE||U.type===g.EQUALS||U.type===g.VALUE||U.type===g.TEXT&&!A.tag_complete)N=this._handle_inside_tag(G,U,A,$);else if(U.type===g.TAG_CLOSE)N=this._handle_tag_close(G,U,A);else if(U.type===g.TEXT)N=this._handle_text(G,U,A);else if(U.type===g.CONTROL_FLOW_OPEN)N=this._handle_control_flow_open(G,U);else if(U.type===g.CONTROL_FLOW_CLOSE)N=this._handle_control_flow_close(G,U);else G.add_raw_token(U);$=N,U=H.next()}var F=G._output.get_code(R);return F};Lf.prototype._handle_control_flow_open=function(f,R){var h={text:R.text,type:R.type};if(f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0),R.newlines)f.print_preserved_newlines(R);else f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0);return f.print_token(R),f.indent(),h};Lf.prototype._handle_control_flow_close=function(f,R){var h={text:R.text,type:R.type};if(f.deindent(),R.newlines)f.print_preserved_newlines(R);else f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0);return f.print_token(R),h};Lf.prototype._handle_tag_close=function(f,R,h){var $={text:R.text,type:R.type};if(f.alignment_size=0,h.tag_complete=!0,f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0),h.is_unformatted)f.add_raw_token(R);else{if(h.tag_start_char==="<"){if(f.set_space_before_token(R.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&h.has_wrapped_attrs)f.print_newline(!1)}f.print_token(R)}if(h.indent_content&&!(h.is_unformatted||h.is_content_unformatted))f.indent(),h.indent_content=!1;if(!h.is_inline_element&&!(h.is_unformatted||h.is_content_unformatted))f.set_wrap_point();return $};Lf.prototype._handle_inside_tag=function(f,R,h,$){var A=h.has_wrapped_attrs,G={text:R.text,type:R.type};if(f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0),h.is_unformatted)f.add_raw_token(R);else if(h.tag_start_char==="{"&&R.type===g.TEXT)if(f.print_preserved_newlines(R))R.newlines=0,f.add_raw_token(R);else f.print_token(R);else{if(R.type===g.ATTRIBUTE)f.set_space_before_token(!0);else if(R.type===g.EQUALS)f.set_space_before_token(!1);else if(R.type===g.VALUE&&R.previous.type===g.EQUALS)f.set_space_before_token(!1);if(R.type===g.ATTRIBUTE&&h.tag_start_char==="<"){if(this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)f.traverse_whitespace(R),A=A||R.newlines!==0;if(this._is_wrap_attributes_force&&h.attr_count>=this._options.wrap_attributes_min_attrs&&($.type!==g.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline))f.print_newline(!1),A=!0}f.print_token(R),A=A||f.previous_token_wrapped(),h.has_wrapped_attrs=A}return G};Lf.prototype._handle_text=function(f,R,h){var $={text:R.text,type:"TK_CONTENT"};if(h.custom_beautifier_name)this._print_custom_beatifier_text(f,R,h);else if(h.is_unformatted||h.is_content_unformatted)f.add_raw_token(R);else f.traverse_whitespace(R),f.print_token(R);return $};Lf.prototype._print_custom_beatifier_text=function(f,R,h){var $=this;if(R.text!==""){var A=R.text,G,H=1,N="",U="";if(h.custom_beautifier_name==="javascript"&&typeof this._js_beautify==="function")G=this._js_beautify;else if(h.custom_beautifier_name==="css"&&typeof this._css_beautify==="function")G=this._css_beautify;else if(h.custom_beautifier_name==="html")G=function(L,P){var a=new Lf(L,P,$._js_beautify,$._css_beautify);return a.beautify()};if(this._options.indent_scripts==="keep")H=0;else if(this._options.indent_scripts==="separate")H=-f.indent_level;var F=f.get_full_indent(H);if(A=A.replace(/\n[ \t]*$/,""),h.custom_beautifier_name!=="html"&&A[0]==="<"&&A.match(/^(<!--|<!\[CDATA\[)/)){var S=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(A);if(!S){f.add_raw_token(R);return}if(N=F+S[1]+`
27
+ `,f&&WS.test(f||""))R=f.match(WS)[0]}f=f.replace(kX,`
28
+ `);var h=f.match(/^[\t ]*/)[0];this._output=new cX(this._options,h),this._input=new bX(f),this._indentLevel=0,this._nestedLevel=0,this._ch=null;var $=0,A=!1,G=!1,H=!1,N=!1,U=!1,F=this._ch,S=!1,D,J,Z;while(!0){if(D=this._input.read(sX),J=D!=="",Z=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext())this._ch+=this._input.next();if(F=this._ch,!this._ch)break;else if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var L=this._input.read(lX),P=FS.get_directives(L);if(P&&P.ignore==="start")L+=FS.readIgnored(this._input);this.print_string(L),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_X)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(J),this.print_string(this._ch);var a=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);if(a.match(/[ :]$/))a=this.eatString(": ").replace(/\s+$/,""),this.print_string(a),this._output.space_before_token=!0;if($===0&&a.indexOf(":")!==-1)G=!0,this.indent()}else if(this._ch==="@")if(this.preserveSingleSpace(J),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var gf=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);if(gf.match(/[ :]$/))gf=this.eatString(": ").replace(/\s+$/,""),this.print_string(gf),this._output.space_before_token=!0;if($===0&&gf.indexOf(":")!==-1)G=!0,this.indent();else if(gf in this.NESTED_AT_RULE){if(this._nestedLevel+=1,gf in this.CONDITIONAL_GROUP_RULE)H=!0}else if($===0&&!G)N=!0}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(J),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{"){if(G)G=!1,this.outdent();if(N=!1,H)H=!1,A=this._indentLevel>=this._nestedLevel;else A=this._indentLevel>=this._nestedLevel-1;if(this._options.newline_between_rules&&A){if(this._output.previous_line&&this._output.previous_line.item(-1)!=="{")this._output.ensure_empty_line_above("/",",")}if(this._output.space_before_token=!0,this._options.brace_style==="expand")this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel);else{if(Z==="(")this._output.space_before_token=!1;else if(Z!==",")this.indent();this.print_string(this._ch)}this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="}"){if(this.outdent(),this._output.add_new_line(),Z==="{")this._output.trim(!0);if(G)this.outdent(),G=!1;if(this.print_string(this._ch),A=!1,this._nestedLevel)this._nestedLevel--;if(this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()){if(this._input.peek()!=="}")this._output.add_new_line(!0)}if(this._input.peek()===")"){if(this._output.trim(!0),this._options.brace_style==="expand")this._output.add_new_line(!0)}}else if(this._ch===":"){for(var Cf=0;Cf<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Cf++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Cf])){S=!0;break}if((A||H)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&$===0){if(this.print_string(":"),!G)G=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()}else{if(this._input.lookBack(" "))this._output.space_before_token=!0;if(this._input.peek()===":")this._ch=this._input.next(),this.print_string("::");else this.print_string(":")}}else if(this._ch==='"'||this._ch==="'"){var fN=Z==='"'||Z==="'";this.preserveSingleSpace(fN||J),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")if(S=!1,$===0){if(G)this.outdent(),G=!1;if(N=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/")this._output.add_new_line()}else this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0;else if(this._ch==="(")if(this._input.lookBack("url")){if(this.print_string(this._ch),this.eatWhitespace(),$++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'")this._input.back();else if(this._ch){if(this.print_string(this._ch+this.eatString(")")),$)$--,this.outdent()}}else{var wR=!1;if(this._input.lookBack("with"))wR=!0;if(this.preserveSingleSpace(J||wR),this.print_string(this._ch),G&&Z==="$"&&this._options.selector_separator_newline)this._output.add_new_line(),U=!0;else this.eatWhitespace(),$++,this.indent()}else if(this._ch===")"){if($)$--,this.outdent();if(U&&this._input.peek()===";"&&this._options.selector_separator_newline)U=!1,this.outdent(),this._output.add_new_line();this.print_string(this._ch)}else if(this._ch===",")if(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!G||U)&&$===0&&!N)this._output.add_new_line();else this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!G&&$===0){if(this._options.space_around_combinator)this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0;else if(this.print_string(this._ch),this.eatWhitespace(),this._ch&&O$.test(this._ch))this._ch=""}else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(J),this.print_string(this._ch);else if(this._ch==="="){if(this.eatWhitespace(),this.print_string("="),O$.test(this._ch))this._ch=""}else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var mh=Z==='"'||Z==="'";if(this.preserveSingleSpace(mh||J),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
29
+ `&&S)this._output.add_new_line()}}var O0=this._output.get_code(R);return O0};dX.Beautifier=ef});var DS=l((Jy,aG)=>{var rX=YS().Beautifier,iX=dG().Options;function pX(f,R){var h=new rX(f,R);return h.beautify()}aG.exports=pX;aG.exports.defaultOptions=function(){return new iX}});var rG=l((oX,JS)=>{var ZS=q$().Options;function MS(f){if(ZS.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto")this.templating=["django","erb","handlebars","php"];this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}MS.prototype=new ZS;oX.Options=MS});var oG=l((fz,pG)=>{var zS=Xh().Tokenizer,iG=Xh().TOKEN,eX=K$().Directives,uX=xG().TemplatablePattern,tX=Mh().Pattern,T={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:iG.START,RAW:iG.RAW,EOF:iG.EOF},XS=new eX(/<\!--/,/-->/),Nf=function(f,R){zS.call(this,f,R),this._current_tag_name="";var h=new uX(this._input).read_options(this._options),$=new tX(this._input);if(this.__patterns={word:h.until(/[\n\r\t <]/),word_control_flow_close_excluded:h.until(/[\n\r\t <}]/),single_quote:h.until_after(/'/),double_quote:h.until_after(/"/),attribute:h.until(/[\n\r\t =>]|\/>/),element_name:h.until(/[\n\r\t >\/]/),angular_control_flow_start:$.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:$.starting_with(/{{!--/).until_after(/--}}/),handlebars:$.starting_with(/{{/).until_after(/}}/),handlebars_open:$.until(/[\n\r\t }]/),handlebars_raw_close:$.until(/}}/),comment:$.starting_with(/<!--/).until_after(/-->/),cdata:$.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:$.starting_with(/<!\[/).until_after(/]>/),processing:$.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars)this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars");if(this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var A=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=$.matching(A).until_after(A)}};Nf.prototype=new zS;Nf.prototype._is_comment=function(f){return!1};Nf.prototype._is_opening=function(f){return f.type===T.TAG_OPEN||f.type===T.CONTROL_FLOW_OPEN};Nf.prototype._is_closing=function(f,R){return f.type===T.TAG_CLOSE&&(R&&((f.text===">"||f.text==="/>")&&R.text[0]==="<"||f.text==="}}"&&R.text[0]==="{"&&R.text[1]==="{"))||f.type===T.CONTROL_FLOW_CLOSE&&(f.text==="}"&&R.text.endsWith("{"))};Nf.prototype._reset=function(){this._current_tag_name=""};Nf.prototype._get_next_token=function(f,R){var h=null;this._readWhitespace();var $=this._input.peek();if($===null)return this._create_token(T.EOF,"");return h=h||this._read_open_handlebars($,R),h=h||this._read_attribute($,f,R),h=h||this._read_close($,R),h=h||this._read_script_and_style($,f),h=h||this._read_control_flows($,R),h=h||this._read_raw_content($,f,R),h=h||this._read_content_word($,R),h=h||this._read_comment_or_cdata($),h=h||this._read_processing($),h=h||this._read_open($,R),h=h||this._create_token(T.UNKNOWN,this._input.next()),h};Nf.prototype._read_comment_or_cdata=function(f){var R=null,h=null,$=null;if(f==="<"){var A=this._input.peek(1);if(A==="!")if(h=this.__patterns.comment.read(),h){if($=XS.get_directives(h),$&&$.ignore==="start")h+=XS.readIgnored(this._input)}else h=this.__patterns.cdata.read();if(h)R=this._create_token(T.COMMENT,h),R.directives=$}return R};Nf.prototype._read_processing=function(f){var R=null,h=null,$=null;if(f==="<"){var A=this._input.peek(1);if(A==="!"||A==="?")h=this.__patterns.conditional_comment.read(),h=h||this.__patterns.processing.read();if(h)R=this._create_token(T.COMMENT,h),R.directives=$}return R};Nf.prototype._read_open=function(f,R){var h=null,$=null;if(!R||R.type===T.CONTROL_FLOW_OPEN){if(f==="<"){if(h=this._input.next(),this._input.peek()==="/")h+=this._input.next();h+=this.__patterns.element_name.read(),$=this._create_token(T.TAG_OPEN,h)}}return $};Nf.prototype._read_open_handlebars=function(f,R){var h=null,$=null;if(!R||R.type===T.CONTROL_FLOW_OPEN){if((this._options.templating.includes("angular")||this._options.indent_handlebars)&&f==="{"&&this._input.peek(1)==="{")if(this._options.indent_handlebars&&this._input.peek(2)==="!")h=this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars.read(),$=this._create_token(T.COMMENT,h);else h=this.__patterns.handlebars_open.read(),$=this._create_token(T.TAG_OPEN,h)}return $};Nf.prototype._read_control_flows=function(f,R){var h="",$=null;if(!this._options.templating.includes("angular"))return $;if(f==="@"){if(h=this.__patterns.angular_control_flow_start.read(),h==="")return $;var A=h.endsWith("(")?1:0,G=0;while(!(h.endsWith("{")&&A===G)){var H=this._input.next();if(H===null)break;else if(H==="(")A++;else if(H===")")G++;h+=H}$=this._create_token(T.CONTROL_FLOW_OPEN,h)}else if(f==="}"&&R&&R.type===T.CONTROL_FLOW_OPEN)h=this._input.next(),$=this._create_token(T.CONTROL_FLOW_CLOSE,h);return $};Nf.prototype._read_close=function(f,R){var h=null,$=null;if(R&&R.type===T.TAG_OPEN){if(R.text[0]==="<"&&(f===">"||f==="/"&&this._input.peek(1)===">")){if(h=this._input.next(),f==="/")h+=this._input.next();$=this._create_token(T.TAG_CLOSE,h)}else if(R.text[0]==="{"&&f==="}"&&this._input.peek(1)==="}")this._input.next(),this._input.next(),$=this._create_token(T.TAG_CLOSE,"}}")}return $};Nf.prototype._read_attribute=function(f,R,h){var $=null,A="";if(h&&h.text[0]==="<"){if(f==="=")$=this._create_token(T.EQUALS,this._input.next());else if(f==='"'||f==="'"){var G=this._input.next();if(f==='"')G+=this.__patterns.double_quote.read();else G+=this.__patterns.single_quote.read();$=this._create_token(T.VALUE,G)}else if(A=this.__patterns.attribute.read(),A)if(R.type===T.EQUALS)$=this._create_token(T.VALUE,A);else $=this._create_token(T.ATTRIBUTE,A)}return $};Nf.prototype._is_content_unformatted=function(f){return this._options.void_elements.indexOf(f)===-1&&(this._options.content_unformatted.indexOf(f)!==-1||this._options.unformatted.indexOf(f)!==-1)};Nf.prototype._read_raw_content=function(f,R,h){var $="";if(h&&h.text[0]==="{")$=this.__patterns.handlebars_raw_close.read();else if(R.type===T.TAG_CLOSE&&R.opened.text[0]==="<"&&R.text[0]!=="/"){var A=R.opened.text.substr(1).toLowerCase();if(this._is_content_unformatted(A))$=this._input.readUntil(new RegExp("</"+A+"[\\n\\r\\t ]*?>","ig"))}if($)return this._create_token(T.TEXT,$);return null};Nf.prototype._read_script_and_style=function(f,R){if(R.type===T.TAG_CLOSE&&R.opened.text[0]==="<"&&R.text[0]!=="/"){var h=R.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var $=this._read_comment_or_cdata(f);if($)return $.type=T.TEXT,$;var A=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"));if(A)return this._create_token(T.TEXT,A)}}return null};Nf.prototype._read_content_word=function(f,R){var h="";if(this._options.unformatted_content_delimiter){if(f===this._options.unformatted_content_delimiter[0])h=this.__patterns.unformatted_content_delimiter.read()}if(!h)h=R&&R.type===T.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read();if(h)return this._create_token(T.TEXT,h);return null};fz.Tokenizer=Nf;fz.TOKEN=T});var IS=l((Yz,LS)=>{var $z=rG().Options,Az=I$().Output,Gz=oG().Tokenizer,g=oG().TOKEN,QS=/\r\n|[\r\n]/,Hz=/\r\n|[\r\n]/g,qf=function(f,R){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=f.max_preserve_newlines,this.preserve_newlines=f.preserve_newlines,this._output=new Az(f,R)};qf.prototype.current_line_has_match=function(f){return this._output.current_line.has_match(f)};qf.prototype.set_space_before_token=function(f,R){this._output.space_before_token=f,this._output.non_breaking_space=R};qf.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()};qf.prototype.add_raw_token=function(f){this._output.add_raw_token(f)};qf.prototype.print_preserved_newlines=function(f){var R=0;if(f.type!==g.TEXT&&f.previous.type!==g.TEXT)R=f.newlines?1:0;if(this.preserve_newlines)R=f.newlines<this.max_preserve_newlines+1?f.newlines:this.max_preserve_newlines+1;for(var h=0;h<R;h++)this.print_newline(h>0);return R!==0};qf.prototype.traverse_whitespace=function(f){if(f.whitespace_before||f.newlines){if(!this.print_preserved_newlines(f))this._output.space_before_token=!0;return!0}return!1};qf.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped};qf.prototype.print_newline=function(f){this._output.add_new_line(f)};qf.prototype.print_token=function(f){if(f.text)this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(f.text)};qf.prototype.indent=function(){this.indent_level++};qf.prototype.deindent=function(){if(this.indent_level>0)this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size)};qf.prototype.get_full_indent=function(f){if(f=this.indent_level+(f||0),f<1)return"";return this._output.get_indent_string(f)};var Nz=function(f){var R=null,h=f.next;while(h.type!==g.EOF&&f.closed!==h){if(h.type===g.ATTRIBUTE&&h.text==="type"){if(h.next&&h.next.type===g.EQUALS&&h.next.next&&h.next.next.type===g.VALUE)R=h.next.next.text;break}h=h.next}return R},Uz=function(f,R){var h=null,$=null;if(!R.closed)return null;if(f==="script")h="text/javascript";else if(f==="style")h="text/css";if(h=Nz(R)||h,h.search("text/css")>-1)$="css";else if(h.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1)$="javascript";else if(h.search(/(text|application|dojo)\/(x-)?(html)/)>-1)$="html";else if(h.search(/test\/null/)>-1)$="null";return $};function qh(f,R){return R.indexOf(f)!==-1}function Fz(f,R,h){this.parent=f||null,this.tag=R?R.tag_name:"",this.indent_level=h||0,this.parser_token=R||null}function xR(f){this._printer=f,this._current_frame=null}xR.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null};xR.prototype.record_tag=function(f){var R=new Fz(this._current_frame,f,this._printer.indent_level);this._current_frame=R};xR.prototype._try_pop_frame=function(f){var R=null;if(f)R=f.parser_token,this._printer.indent_level=f.indent_level,this._current_frame=f.parent;return R};xR.prototype._get_frame=function(f,R){var h=this._current_frame;while(h){if(f.indexOf(h.tag)!==-1)break;else if(R&&R.indexOf(h.tag)!==-1){h=null;break}h=h.parent}return h};xR.prototype.try_pop=function(f,R){var h=this._get_frame([f],R);return this._try_pop_frame(h)};xR.prototype.indent_to_tag=function(f){var R=this._get_frame(f);if(R)this._printer.indent_level=R.indent_level};function Lf(f,R,h,$){this._source_text=f||"",R=R||{},this._js_beautify=h,this._css_beautify=$,this._tag_stack=null;var A=new $z(R,"html");this._options=A,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}Lf.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f=this._source_text,R=this._options.eol;if(this._options.eol==="auto"){if(R=`
30
+ `,f&&QS.test(f))R=f.match(QS)[0]}f=f.replace(Hz,`
31
+ `);var h=f.match(/^[\t ]*/)[0],$={text:"",type:""},A=new wS(this._options),G=new qf(this._options,h),H=new Gz(f,this._options).tokenize();this._tag_stack=new xR(G);var N=null,U=H.next();while(U.type!==g.EOF){if(U.type===g.TAG_OPEN||U.type===g.COMMENT)N=this._handle_tag_open(G,U,A,$,H),A=N;else if(U.type===g.ATTRIBUTE||U.type===g.EQUALS||U.type===g.VALUE||U.type===g.TEXT&&!A.tag_complete)N=this._handle_inside_tag(G,U,A,$);else if(U.type===g.TAG_CLOSE)N=this._handle_tag_close(G,U,A);else if(U.type===g.TEXT)N=this._handle_text(G,U,A);else if(U.type===g.CONTROL_FLOW_OPEN)N=this._handle_control_flow_open(G,U);else if(U.type===g.CONTROL_FLOW_CLOSE)N=this._handle_control_flow_close(G,U);else G.add_raw_token(U);$=N,U=H.next()}var F=G._output.get_code(R);return F};Lf.prototype._handle_control_flow_open=function(f,R){var h={text:R.text,type:R.type};if(f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0),R.newlines)f.print_preserved_newlines(R);else f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0);return f.print_token(R),f.indent(),h};Lf.prototype._handle_control_flow_close=function(f,R){var h={text:R.text,type:R.type};if(f.deindent(),R.newlines)f.print_preserved_newlines(R);else f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0);return f.print_token(R),h};Lf.prototype._handle_tag_close=function(f,R,h){var $={text:R.text,type:R.type};if(f.alignment_size=0,h.tag_complete=!0,f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0),h.is_unformatted)f.add_raw_token(R);else{if(h.tag_start_char==="<"){if(f.set_space_before_token(R.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&h.has_wrapped_attrs)f.print_newline(!1)}f.print_token(R)}if(h.indent_content&&!(h.is_unformatted||h.is_content_unformatted))f.indent(),h.indent_content=!1;if(!h.is_inline_element&&!(h.is_unformatted||h.is_content_unformatted))f.set_wrap_point();return $};Lf.prototype._handle_inside_tag=function(f,R,h,$){var A=h.has_wrapped_attrs,G={text:R.text,type:R.type};if(f.set_space_before_token(R.newlines||R.whitespace_before!=="",!0),h.is_unformatted)f.add_raw_token(R);else if(h.tag_start_char==="{"&&R.type===g.TEXT)if(f.print_preserved_newlines(R))R.newlines=0,f.add_raw_token(R);else f.print_token(R);else{if(R.type===g.ATTRIBUTE)f.set_space_before_token(!0);else if(R.type===g.EQUALS)f.set_space_before_token(!1);else if(R.type===g.VALUE&&R.previous.type===g.EQUALS)f.set_space_before_token(!1);if(R.type===g.ATTRIBUTE&&h.tag_start_char==="<"){if(this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)f.traverse_whitespace(R),A=A||R.newlines!==0;if(this._is_wrap_attributes_force&&h.attr_count>=this._options.wrap_attributes_min_attrs&&($.type!==g.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline))f.print_newline(!1),A=!0}f.print_token(R),A=A||f.previous_token_wrapped(),h.has_wrapped_attrs=A}return G};Lf.prototype._handle_text=function(f,R,h){var $={text:R.text,type:"TK_CONTENT"};if(h.custom_beautifier_name)this._print_custom_beatifier_text(f,R,h);else if(h.is_unformatted||h.is_content_unformatted)f.add_raw_token(R);else f.traverse_whitespace(R),f.print_token(R);return $};Lf.prototype._print_custom_beatifier_text=function(f,R,h){var $=this;if(R.text!==""){var A=R.text,G,H=1,N="",U="";if(h.custom_beautifier_name==="javascript"&&typeof this._js_beautify==="function")G=this._js_beautify;else if(h.custom_beautifier_name==="css"&&typeof this._css_beautify==="function")G=this._css_beautify;else if(h.custom_beautifier_name==="html")G=function(L,P){var a=new Lf(L,P,$._js_beautify,$._css_beautify);return a.beautify()};if(this._options.indent_scripts==="keep")H=0;else if(this._options.indent_scripts==="separate")H=-f.indent_level;var F=f.get_full_indent(H);if(A=A.replace(/\n[ \t]*$/,""),h.custom_beautifier_name!=="html"&&A[0]==="<"&&A.match(/^(<!--|<!\[CDATA\[)/)){var S=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(A);if(!S){f.add_raw_token(R);return}if(N=F+S[1]+`
32
32
  `,A=S[4],S[5])U=F+S[5];if(A=A.replace(/\n[ \t]*$/,""),S[2]||S[3].indexOf(`
33
33
  `)!==-1){if(S=S[3].match(/[ \t]+$/),S)R.whitespace_before=S[0]}}if(A)if(G){var D=function(){this.eol=`
34
34
  `};D.prototype=this._options.raw_options;var J=new D;A=G(F+A,J)}else{var Z=R.whitespace_before;if(Z)A=A.replace(new RegExp(`
35
35
  (`+Z+")?","g"),`
36
36
  `);A=F+A.replace(/\n/g,`
37
37
  `+F)}if(N)if(!A)A=N+U;else A=N+A+`
38
- `+U;if(f.print_newline(!1),A)R.text=A,R.whitespace_before="",R.newlines=0,f.add_raw_token(R),f.print_newline(!0)}};Lf.prototype._handle_tag_open=function(f,R,h,$,A){var G=this._get_tag_open_token(R);if((h.is_unformatted||h.is_content_unformatted)&&!h.is_empty_element&&R.type===g.TAG_OPEN&&!G.is_start_tag)f.add_raw_token(R),G.start_tag_token=this._tag_stack.try_pop(G.tag_name);else{if(f.traverse_whitespace(R),this._set_tag_position(f,R,G,h,$),!G.is_inline_element)f.set_wrap_point();f.print_token(R)}if(G.is_start_tag&&this._is_wrap_attributes_force){var H=0,N;do{if(N=A.peek(H),N.type===g.ATTRIBUTE)G.attr_count+=1;H+=1}while(N.type!==g.EOF&&N.type!==g.TAG_CLOSE)}if(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)G.alignment_size=R.text.length+1;if(!G.tag_complete&&!G.is_unformatted)f.alignment_size=G.alignment_size;return G};var JS=function(f,R,h){if(this.parent=R||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!h)this.tag_complete=!0;else{var $;if(this.tag_start_char=h.text[0],this.text=h.text,this.tag_start_char==="<")$=h.text.match(/^<([^\s>]*)/),this.tag_check=$?$[1]:"";else if($=h.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=$?$[1]:"",(h.text.startsWith("{{#>")||h.text.startsWith("{{~#>"))&&this.tag_check[0]===">")if(this.tag_check===">"&&h.next!==null)this.tag_check=h.next.text.split(" ")[0];else this.tag_check=h.text.split(">")[1];if(this.tag_check=this.tag_check.toLowerCase(),h.type===g.COMMENT)this.tag_complete=!0;this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=!this.is_start_tag?this.tag_check.substr(1):this.tag_check,this.is_end_tag=!this.is_start_tag||h.closed&&h.closed.text==="/>";var A=2;if(this.tag_start_char==="{"&&this.text.length>=3){if(this.text.charAt(2)==="~")A=3}this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!f.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(A)))}};Lf.prototype._get_tag_open_token=function(f){var R=new JS(this._options,this._tag_stack.get_parser_token(),f);return R.alignment_size=this._options.wrap_attributes_indent_size,R.is_end_tag=R.is_end_tag||Bh(R.tag_check,this._options.void_elements),R.is_empty_element=R.tag_complete||R.is_start_tag&&R.is_end_tag,R.is_unformatted=!R.tag_complete&&Bh(R.tag_check,this._options.unformatted),R.is_content_unformatted=!R.is_empty_element&&Bh(R.tag_check,this._options.content_unformatted),R.is_inline_element=Bh(R.tag_name,this._options.inline)||this._options.inline_custom_elements&&R.tag_name.includes("-")||R.tag_start_char==="{",R};Lf.prototype._set_tag_position=function(f,R,h,$,A){if(!h.is_empty_element)if(h.is_end_tag)h.start_tag_token=this._tag_stack.try_pop(h.tag_name);else{if(this._do_optional_end_element(h)){if(!h.is_inline_element)f.print_newline(!1)}if(this._tag_stack.record_tag(h),(h.tag_name==="script"||h.tag_name==="style")&&!(h.is_unformatted||h.is_content_unformatted))h.custom_beautifier_name=Az(h.tag_check,R)}if(Bh(h.tag_check,this._options.extra_liners)){if(f.print_newline(!1),!f._output.just_added_blankline())f.print_newline(!0)}if(h.is_empty_element){if(h.tag_start_char==="{"&&h.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),h.indent_content=!0;var G=f.current_line_has_match(/{{#if/);if(!G)f.print_newline(!1)}if(h.tag_name==="!--"&&A.type===g.TAG_CLOSE&&$.is_end_tag&&h.text.indexOf(`
39
- `)===-1);else{if(!(h.is_inline_element||h.is_unformatted))f.print_newline(!1);this._calcluate_parent_multiline(f,h)}}else if(h.is_end_tag){var H=!1;if(H=h.start_tag_token&&h.start_tag_token.multiline_content,H=H||!h.is_inline_element&&!($.is_inline_element||$.is_unformatted)&&!(A.type===g.TAG_CLOSE&&h.start_tag_token===$)&&A.type!=="TK_CONTENT",h.is_content_unformatted||h.is_unformatted)H=!1;if(H)f.print_newline(!1)}else{if(h.indent_content=!h.custom_beautifier_name,h.tag_start_char==="<"){if(h.tag_name==="html")h.indent_content=this._options.indent_inner_html;else if(h.tag_name==="head")h.indent_content=this._options.indent_head_inner_html;else if(h.tag_name==="body")h.indent_content=this._options.indent_body_inner_html}if(!(h.is_inline_element||h.is_unformatted)&&(A.type!=="TK_CONTENT"||h.is_content_unformatted))f.print_newline(!1);this._calcluate_parent_multiline(f,h)}};Lf.prototype._calcluate_parent_multiline=function(f,R){if(R.parent&&f._output.just_added_newline()&&!((R.is_inline_element||R.is_unformatted)&&R.parent.is_inline_element))R.parent.multiline_content=!0};var Hz=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Nz=["a","audio","del","ins","map","noscript","video"];Lf.prototype._do_optional_end_element=function(f){var R=null;if(f.is_empty_element||!f.is_start_tag||!f.parent)return;if(f.tag_name==="body")R=R||this._tag_stack.try_pop("head");else if(f.tag_name==="li")R=R||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(f.tag_name==="dd"||f.tag_name==="dt")R=R||this._tag_stack.try_pop("dt",["dl"]),R=R||this._tag_stack.try_pop("dd",["dl"]);else if(f.parent.tag_name==="p"&&Hz.indexOf(f.tag_name)!==-1){var h=f.parent.parent;if(!h||Nz.indexOf(h.tag_name)===-1)R=R||this._tag_stack.try_pop("p")}else if(f.tag_name==="rp"||f.tag_name==="rt")R=R||this._tag_stack.try_pop("rt",["ruby","rtc"]),R=R||this._tag_stack.try_pop("rp",["ruby","rtc"]);else if(f.tag_name==="optgroup")R=R||this._tag_stack.try_pop("optgroup",["select"]);else if(f.tag_name==="option")R=R||this._tag_stack.try_pop("option",["select","datalist","optgroup"]);else if(f.tag_name==="colgroup")R=R||this._tag_stack.try_pop("caption",["table"]);else if(f.tag_name==="thead")R=R||this._tag_stack.try_pop("caption",["table"]),R=R||this._tag_stack.try_pop("colgroup",["table"]);else if(f.tag_name==="tbody"||f.tag_name==="tfoot")R=R||this._tag_stack.try_pop("caption",["table"]),R=R||this._tag_stack.try_pop("colgroup",["table"]),R=R||this._tag_stack.try_pop("thead",["table"]),R=R||this._tag_stack.try_pop("tbody",["table"]);else if(f.tag_name==="tr")R=R||this._tag_stack.try_pop("caption",["table"]),R=R||this._tag_stack.try_pop("colgroup",["table"]),R=R||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]);else if(f.tag_name==="th"||f.tag_name==="td")R=R||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),R=R||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]);return f.parent=this._tag_stack.get_parser_token(),R};Uz.Beautifier=Lf});var QS=l((Xy,nG)=>{var Wz=zS().Beautifier,Sz=rG().Options;function Yz(f,R,h,$){var A=new Wz(f,R,h,$);return A.beautify()}nG.exports=Yz;nG.exports.defaultOptions=function(){return new Sz}});var qS=l((Dz,E$)=>{var wS=RS(),LS=FS(),IS=QS();function PS(f,R,h,$){return h=h||wS,$=$||LS,IS(f,R,h,$)}PS.defaultOptions=IS.defaultOptions;Dz.js=wS;Dz.css=LS;Dz.html=PS});var vS=l((zy,KS)=>{function BS(f,R,h){var $=function(A,G){return f.js_beautify(A,G)};return $.js=f.js_beautify,$.css=R.css_beautify,$.html=h.html_beautify,$.js_beautify=f.js_beautify,$.css_beautify=R.css_beautify,$.html_beautify=h.html_beautify,$}if(typeof define==="function"&&define.amd)define(["./lib/beautify","./lib/beautify-css","./lib/beautify-html"],function(f,R,h){return BS(f,R,h)});else(function(f){var R=qS();R.js_beautify=R.js,R.css_beautify=R.css,R.html_beautify=R.html,f.exports=BS(R,R,R)})(KS)});class dR{}import{readdir as BY}from"fs/promises";class bh extends dR{folderPath;constructor(f=`${process.env.ROOT_DIR}/storage`){super();this.folderPath=f}async put(f){let R,h;if(f instanceof Blob)R=f,h=`${Bun.randomUUIDv7()}.${f.type.split("/")[1].split(";")[0]}`;else R=f.body,h=f.name;let $=R instanceof Buffer?R:R instanceof Blob||R instanceof File?Buffer.from(await R.arrayBuffer()):"",A=`${this.folderPath}/${h}`;return await Bun.write(A,$),h}async fetch(f){let R=process.env.BUCKET_NAME,h;if(typeof f==="string")h=f;else R=f.bucket??R,h=f.name;if(!h)throw new Error("Object name has to be specified");let $=`${this.folderPath}/${h}`,A=Bun.file($),G=Bun.file($).stream(),H=new Date(A.lastModified).toUTCString();return new Response(G,{headers:{"Content-Type":A.type,"Content-Length":String(A.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":H}})}async list(){return await BY(this.folderPath)}}class RN extends p{driver=new bh;boot(){}}function KY(f){return(R)=>async(h)=>{let{request:$}=h;if(Ff.isInstance($)&&$.body&&f.runtime==="node"){if(f.requestHandler?.constructor?.name!=="FetchHttpHandler")$.headers={...$.headers,Expect:"100-continue"}}return R({...h,request:$})}}var vY={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},hN=(f)=>({applyToStack:(R)=>{R.add(KY(f),vY)}});var Kf={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},xh=Kf.WHEN_SUPPORTED,IR={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},kh=Kf.WHEN_SUPPORTED,j;(function(f){f.MD5="MD5",f.CRC32="CRC32",f.CRC32C="CRC32C",f.CRC64NVME="CRC64NVME",f.SHA1="SHA1",f.SHA256="SHA256"})(j||(j={}));var $N;(function(f){f.HEADER="header",f.TRAILER="trailer"})($N||($N={}));var V0=j.CRC32;var fR;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(fR||(fR={}));var aR=(f,R,h,$)=>{if(!(R in f))return;let A=f[R].toUpperCase();if(!Object.values(h).includes(A))throw new TypeError(`Cannot load ${$} '${R}'. Expected one of ${Object.values(h)}, got '${f[R]}'.`);return A};var yY="AWS_REQUEST_CHECKSUM_CALCULATION",jY="request_checksum_calculation",AN={environmentVariableSelector:(f)=>aR(f,yY,Kf,fR.ENV),configFileSelector:(f)=>aR(f,jY,Kf,fR.CONFIG),default:xh};var OY="AWS_RESPONSE_CHECKSUM_VALIDATION",EY="response_checksum_validation",GN={environmentVariableSelector:(f)=>aR(f,OY,IR,fR.ENV),configFileSelector:(f)=>aR(f,EY,IR,fR.CONFIG),default:kh};var hA={CrtCrc64Nvme:null};var iR=O(BR(),1);var T0=[j.CRC32,j.CRC32C,j.CRC64NVME,j.SHA1,j.SHA256],HN=[j.SHA256,j.SHA1,j.CRC32,j.CRC32C,j.CRC64NVME];var NN=(f,{requestChecksumRequired:R,requestAlgorithmMember:h,requestChecksumCalculation:$})=>{if(!h)return $===Kf.WHEN_SUPPORTED||R?V0:void 0;if(!f[h])return;let A=f[h];if(!T0.includes(A))throw new Error(`The checksum algorithm "${A}" is not supported by the client. Select one of ${T0}.`);return A};var rR=(f)=>f===j.MD5?"content-md5":`x-amz-checksum-${f.toLowerCase()}`;var UN=(f,R)=>{let h=f.toLowerCase();for(let $ of Object.keys(R))if(h===$.toLowerCase())return!0;return!1};var FN=(f,R)=>{let h=f.toLowerCase();for(let $ of Object.keys(R))if($.toLowerCase().startsWith(h))return!0;return!1};var lh=(f)=>f!==void 0&&typeof f!=="string"&&!ArrayBuffer.isView(f)&&!sh(f);var WN=O(VY(),1),{__extends:j9,__assign:O9,__rest:E9,__decorate:V9,__param:T9,__esDecorate:g9,__runInitializers:C9,__propKey:m9,__setFunctionName:c9,__metadata:b9,__awaiter:_h,__generator:dh,__exportStar:x9,__createBinding:k9,__values:ah,__read:s9,__spread:l9,__spreadArrays:_9,__spreadArray:d9,__await:a9,__asyncGenerator:r9,__asyncDelegator:i9,__asyncValues:p9,__makeTemplateObject:o9,__importStar:n9,__importDefault:e9,__classPrivateFieldGet:u9,__classPrivateFieldSet:t9,__classPrivateFieldIn:fQ,__addDisposableResource:RQ,__disposeResources:hQ,__rewriteRelativeImportExtension:$Q}=WN.default;import{Buffer as SN}from"buffer";var YN=(f,R)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return R?SN.from(f,R):SN.from(f)};var $A=(f)=>{let R=YN(f,"utf8");return new Uint8Array(R.buffer,R.byteOffset,R.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var TY=typeof Buffer!=="undefined"&&Buffer.from?function(f){return Buffer.from(f,"utf8")}:$A;function g0(f){if(f instanceof Uint8Array)return f;if(typeof f==="string")return TY(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)}function C0(f){if(typeof f==="string")return f.length===0;return f.byteLength===0}function PR(f){return new Uint8Array([(f&4278190080)>>24,(f&16711680)>>16,(f&65280)>>8,f&255])}function m0(f){if(!Uint32Array.from){var R=new Uint32Array(f.length),h=0;while(h<f.length)R[h]=f[h],h+=1;return R}return Uint32Array.from(f)}var GA=function(){function f(){this.crc32c=new AA}return f.prototype.update=function(R){if(C0(R))return;this.crc32c.update(g0(R))},f.prototype.digest=function(){return _h(this,void 0,void 0,function(){return dh(this,function(R){return[2,PR(this.crc32c.digest())]})})},f.prototype.reset=function(){this.crc32c=new AA},f}();var AA=function(){function f(){this.checksum=4294967295}return f.prototype.update=function(R){var h,$;try{for(var A=ah(R),G=A.next();!G.done;G=A.next()){var H=G.value;this.checksum=this.checksum>>>8^CY[(this.checksum^H)&255]}}catch(N){h={error:N}}finally{try{if(G&&!G.done&&($=A.return))$.call(A)}finally{if(h)throw h.error}}return this},f.prototype.digest=function(){return(this.checksum^4294967295)>>>0},f}();var gY=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],CY=m0(gY);var HA=function(){function f(){this.crc32=new qR}return f.prototype.update=function(R){if(C0(R))return;this.crc32.update(g0(R))},f.prototype.digest=function(){return _h(this,void 0,void 0,function(){return dh(this,function(R){return[2,PR(this.crc32.digest())]})})},f.prototype.reset=function(){this.crc32=new qR},f}();var qR=function(){function f(){this.checksum=4294967295}return f.prototype.update=function(R){var h,$;try{for(var A=ah(R),G=A.next();!G.done;G=A.next()){var H=G.value;this.checksum=this.checksum>>>8^cY[(this.checksum^H)&255]}}catch(N){h={error:N}}finally{try{if(G&&!G.done&&($=A.return))$.call(A)}finally{if(h)throw h.error}}return this},f.prototype.digest=function(){return(this.checksum^4294967295)>>>0},f}();var mY=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],cY=m0(mY);import*as NA from"zlib";class DN{checksum=0;update(f){this.checksum=NA.crc32(f,this.checksum)}async digest(){return PR(this.checksum)}reset(){this.checksum=0}}var ZN=()=>{if(typeof NA.crc32==="undefined")return HA;return DN};var rh=(f,R)=>{switch(f){case j.MD5:return R.md5;case j.CRC32:return ZN();case j.CRC32C:return GA;case j.CRC64NVME:if(typeof hA.CrtCrc64Nvme!=="function")throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly.
38
+ `+U;if(f.print_newline(!1),A)R.text=A,R.whitespace_before="",R.newlines=0,f.add_raw_token(R),f.print_newline(!0)}};Lf.prototype._handle_tag_open=function(f,R,h,$,A){var G=this._get_tag_open_token(R);if((h.is_unformatted||h.is_content_unformatted)&&!h.is_empty_element&&R.type===g.TAG_OPEN&&!G.is_start_tag)f.add_raw_token(R),G.start_tag_token=this._tag_stack.try_pop(G.tag_name);else{if(f.traverse_whitespace(R),this._set_tag_position(f,R,G,h,$),!G.is_inline_element)f.set_wrap_point();f.print_token(R)}if(G.is_start_tag&&this._is_wrap_attributes_force){var H=0,N;do{if(N=A.peek(H),N.type===g.ATTRIBUTE)G.attr_count+=1;H+=1}while(N.type!==g.EOF&&N.type!==g.TAG_CLOSE)}if(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)G.alignment_size=R.text.length+1;if(!G.tag_complete&&!G.is_unformatted)f.alignment_size=G.alignment_size;return G};var wS=function(f,R,h){if(this.parent=R||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!h)this.tag_complete=!0;else{var $;if(this.tag_start_char=h.text[0],this.text=h.text,this.tag_start_char==="<")$=h.text.match(/^<([^\s>]*)/),this.tag_check=$?$[1]:"";else if($=h.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=$?$[1]:"",(h.text.startsWith("{{#>")||h.text.startsWith("{{~#>"))&&this.tag_check[0]===">")if(this.tag_check===">"&&h.next!==null)this.tag_check=h.next.text.split(" ")[0];else this.tag_check=h.text.split(">")[1];if(this.tag_check=this.tag_check.toLowerCase(),h.type===g.COMMENT)this.tag_complete=!0;this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=!this.is_start_tag?this.tag_check.substr(1):this.tag_check,this.is_end_tag=!this.is_start_tag||h.closed&&h.closed.text==="/>";var A=2;if(this.tag_start_char==="{"&&this.text.length>=3){if(this.text.charAt(2)==="~")A=3}this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!f.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(A)))}};Lf.prototype._get_tag_open_token=function(f){var R=new wS(this._options,this._tag_stack.get_parser_token(),f);return R.alignment_size=this._options.wrap_attributes_indent_size,R.is_end_tag=R.is_end_tag||qh(R.tag_check,this._options.void_elements),R.is_empty_element=R.tag_complete||R.is_start_tag&&R.is_end_tag,R.is_unformatted=!R.tag_complete&&qh(R.tag_check,this._options.unformatted),R.is_content_unformatted=!R.is_empty_element&&qh(R.tag_check,this._options.content_unformatted),R.is_inline_element=qh(R.tag_name,this._options.inline)||this._options.inline_custom_elements&&R.tag_name.includes("-")||R.tag_start_char==="{",R};Lf.prototype._set_tag_position=function(f,R,h,$,A){if(!h.is_empty_element)if(h.is_end_tag)h.start_tag_token=this._tag_stack.try_pop(h.tag_name);else{if(this._do_optional_end_element(h)){if(!h.is_inline_element)f.print_newline(!1)}if(this._tag_stack.record_tag(h),(h.tag_name==="script"||h.tag_name==="style")&&!(h.is_unformatted||h.is_content_unformatted))h.custom_beautifier_name=Uz(h.tag_check,R)}if(qh(h.tag_check,this._options.extra_liners)){if(f.print_newline(!1),!f._output.just_added_blankline())f.print_newline(!0)}if(h.is_empty_element){if(h.tag_start_char==="{"&&h.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),h.indent_content=!0;var G=f.current_line_has_match(/{{#if/);if(!G)f.print_newline(!1)}if(h.tag_name==="!--"&&A.type===g.TAG_CLOSE&&$.is_end_tag&&h.text.indexOf(`
39
+ `)===-1);else{if(!(h.is_inline_element||h.is_unformatted))f.print_newline(!1);this._calcluate_parent_multiline(f,h)}}else if(h.is_end_tag){var H=!1;if(H=h.start_tag_token&&h.start_tag_token.multiline_content,H=H||!h.is_inline_element&&!($.is_inline_element||$.is_unformatted)&&!(A.type===g.TAG_CLOSE&&h.start_tag_token===$)&&A.type!=="TK_CONTENT",h.is_content_unformatted||h.is_unformatted)H=!1;if(H)f.print_newline(!1)}else{if(h.indent_content=!h.custom_beautifier_name,h.tag_start_char==="<"){if(h.tag_name==="html")h.indent_content=this._options.indent_inner_html;else if(h.tag_name==="head")h.indent_content=this._options.indent_head_inner_html;else if(h.tag_name==="body")h.indent_content=this._options.indent_body_inner_html}if(!(h.is_inline_element||h.is_unformatted)&&(A.type!=="TK_CONTENT"||h.is_content_unformatted))f.print_newline(!1);this._calcluate_parent_multiline(f,h)}};Lf.prototype._calcluate_parent_multiline=function(f,R){if(R.parent&&f._output.just_added_newline()&&!((R.is_inline_element||R.is_unformatted)&&R.parent.is_inline_element))R.parent.multiline_content=!0};var Wz=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Sz=["a","audio","del","ins","map","noscript","video"];Lf.prototype._do_optional_end_element=function(f){var R=null;if(f.is_empty_element||!f.is_start_tag||!f.parent)return;if(f.tag_name==="body")R=R||this._tag_stack.try_pop("head");else if(f.tag_name==="li")R=R||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(f.tag_name==="dd"||f.tag_name==="dt")R=R||this._tag_stack.try_pop("dt",["dl"]),R=R||this._tag_stack.try_pop("dd",["dl"]);else if(f.parent.tag_name==="p"&&Wz.indexOf(f.tag_name)!==-1){var h=f.parent.parent;if(!h||Sz.indexOf(h.tag_name)===-1)R=R||this._tag_stack.try_pop("p")}else if(f.tag_name==="rp"||f.tag_name==="rt")R=R||this._tag_stack.try_pop("rt",["ruby","rtc"]),R=R||this._tag_stack.try_pop("rp",["ruby","rtc"]);else if(f.tag_name==="optgroup")R=R||this._tag_stack.try_pop("optgroup",["select"]);else if(f.tag_name==="option")R=R||this._tag_stack.try_pop("option",["select","datalist","optgroup"]);else if(f.tag_name==="colgroup")R=R||this._tag_stack.try_pop("caption",["table"]);else if(f.tag_name==="thead")R=R||this._tag_stack.try_pop("caption",["table"]),R=R||this._tag_stack.try_pop("colgroup",["table"]);else if(f.tag_name==="tbody"||f.tag_name==="tfoot")R=R||this._tag_stack.try_pop("caption",["table"]),R=R||this._tag_stack.try_pop("colgroup",["table"]),R=R||this._tag_stack.try_pop("thead",["table"]),R=R||this._tag_stack.try_pop("tbody",["table"]);else if(f.tag_name==="tr")R=R||this._tag_stack.try_pop("caption",["table"]),R=R||this._tag_stack.try_pop("colgroup",["table"]),R=R||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]);else if(f.tag_name==="th"||f.tag_name==="td")R=R||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),R=R||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]);return f.parent=this._tag_stack.get_parser_token(),R};Yz.Beautifier=Lf});var PS=l((Xy,nG)=>{var Zz=IS().Beautifier,Mz=rG().Options;function Jz(f,R,h,$){var A=new Zz(f,R,h,$);return A.beautify()}nG.exports=Jz;nG.exports.defaultOptions=function(){return new Mz}});var yS=l((Xz,E$)=>{var qS=GS(),BS=DS(),KS=PS();function vS(f,R,h,$){return h=h||qS,$=$||BS,KS(f,R,h,$)}vS.defaultOptions=KS.defaultOptions;Xz.js=qS;Xz.css=BS;Xz.html=vS});var ES=l((zy,OS)=>{function jS(f,R,h){var $=function(A,G){return f.js_beautify(A,G)};return $.js=f.js_beautify,$.css=R.css_beautify,$.html=h.html_beautify,$.js_beautify=f.js_beautify,$.css_beautify=R.css_beautify,$.html_beautify=h.html_beautify,$}if(typeof define==="function"&&define.amd)define(["./lib/beautify","./lib/beautify-css","./lib/beautify-html"],function(f,R,h){return jS(f,R,h)});else(function(f){var R=yS();R.js_beautify=R.js,R.css_beautify=R.css,R.html_beautify=R.html,f.exports=jS(R,R,R)})(OS)});class _R{}import{readdir as jY}from"fs/promises";class ch extends _R{folderPath;constructor(f=`${process.env.ROOT_DIR}/storage`){super();this.folderPath=f}async put(f){let R,h;if(f instanceof Blob)R=f,h=`${Bun.randomUUIDv7()}.${f.type.split("/")[1].split(";")[0]}`;else R=f.body,h=f.name;let $=R instanceof Buffer?R:R instanceof Blob||R instanceof File?Buffer.from(await R.arrayBuffer()):"",A=`${this.folderPath}/${h}`;return await Bun.write(A,$),h}async fetch(f){let R=process.env.BUCKET_NAME,h;if(typeof f==="string")h=f;else R=f.bucket??R,h=f.name;if(!h)throw new Error("Object name has to be specified");let $=`${this.folderPath}/${h}`,A=Bun.file($),G=Bun.file($).stream(),H=new Date(A.lastModified).toUTCString();return new Response(G,{headers:{"Content-Type":A.type,"Content-Length":String(A.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":H}})}async list(){return await jY(this.folderPath)}}class RN extends p{driver=new ch;boot(){}}function OY(f){return(R)=>async(h)=>{let{request:$}=h;if(Ff.isInstance($)&&$.body&&f.runtime==="node"){if(f.requestHandler?.constructor?.name!=="FetchHttpHandler")$.headers={...$.headers,Expect:"100-continue"}}return R({...h,request:$})}}var EY={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},hN=(f)=>({applyToStack:(R)=>{R.add(OY(f),EY)}});var Kf={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},bh=Kf.WHEN_SUPPORTED,LR={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},xh=Kf.WHEN_SUPPORTED,O;(function(f){f.MD5="MD5",f.CRC32="CRC32",f.CRC32C="CRC32C",f.CRC64NVME="CRC64NVME",f.SHA1="SHA1",f.SHA256="SHA256"})(O||(O={}));var $N;(function(f){f.HEADER="header",f.TRAILER="trailer"})($N||($N={}));var E0=O.CRC32;var fR;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(fR||(fR={}));var dR=(f,R,h,$)=>{if(!(R in f))return;let A=f[R].toUpperCase();if(!Object.values(h).includes(A))throw new TypeError(`Cannot load ${$} '${R}'. Expected one of ${Object.values(h)}, got '${f[R]}'.`);return A};var VY="AWS_REQUEST_CHECKSUM_CALCULATION",TY="request_checksum_calculation",AN={environmentVariableSelector:(f)=>dR(f,VY,Kf,fR.ENV),configFileSelector:(f)=>dR(f,TY,Kf,fR.CONFIG),default:bh};var gY="AWS_RESPONSE_CHECKSUM_VALIDATION",CY="response_checksum_validation",GN={environmentVariableSelector:(f)=>dR(f,gY,LR,fR.ENV),configFileSelector:(f)=>dR(f,CY,LR,fR.CONFIG),default:xh};var hA={CrtCrc64Nvme:null};var rR=v(qR(),1);var V0=[O.CRC32,O.CRC32C,O.CRC64NVME,O.SHA1,O.SHA256],HN=[O.SHA256,O.SHA1,O.CRC32,O.CRC32C,O.CRC64NVME];var NN=(f,{requestChecksumRequired:R,requestAlgorithmMember:h,requestChecksumCalculation:$})=>{if(!h)return $===Kf.WHEN_SUPPORTED||R?E0:void 0;if(!f[h])return;let A=f[h];if(!V0.includes(A))throw new Error(`The checksum algorithm "${A}" is not supported by the client. Select one of ${V0}.`);return A};var aR=(f)=>f===O.MD5?"content-md5":`x-amz-checksum-${f.toLowerCase()}`;var UN=(f,R)=>{let h=f.toLowerCase();for(let $ of Object.keys(R))if(h===$.toLowerCase())return!0;return!1};var FN=(f,R)=>{let h=f.toLowerCase();for(let $ of Object.keys(R))if($.toLowerCase().startsWith(h))return!0;return!1};var sh=(f)=>f!==void 0&&typeof f!=="string"&&!ArrayBuffer.isView(f)&&!kh(f);var WN=v(mY(),1),{__extends:T9,__assign:g9,__rest:C9,__decorate:m9,__param:c9,__esDecorate:b9,__runInitializers:x9,__propKey:k9,__setFunctionName:s9,__metadata:l9,__awaiter:lh,__generator:_h,__exportStar:_9,__createBinding:d9,__values:dh,__read:a9,__spread:r9,__spreadArrays:i9,__spreadArray:p9,__await:o9,__asyncGenerator:n9,__asyncDelegator:e9,__asyncValues:u9,__makeTemplateObject:t9,__importStar:fQ,__importDefault:RQ,__classPrivateFieldGet:hQ,__classPrivateFieldSet:$Q,__classPrivateFieldIn:AQ,__addDisposableResource:GQ,__disposeResources:HQ,__rewriteRelativeImportExtension:NQ}=WN.default;import{Buffer as SN}from"buffer";var YN=(f,R)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return R?SN.from(f,R):SN.from(f)};var $A=(f)=>{let R=YN(f,"utf8");return new Uint8Array(R.buffer,R.byteOffset,R.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var cY=typeof Buffer!=="undefined"&&Buffer.from?function(f){return Buffer.from(f,"utf8")}:$A;function T0(f){if(f instanceof Uint8Array)return f;if(typeof f==="string")return cY(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)}function g0(f){if(typeof f==="string")return f.length===0;return f.byteLength===0}function IR(f){return new Uint8Array([(f&4278190080)>>24,(f&16711680)>>16,(f&65280)>>8,f&255])}function C0(f){if(!Uint32Array.from){var R=new Uint32Array(f.length),h=0;while(h<f.length)R[h]=f[h],h+=1;return R}return Uint32Array.from(f)}var GA=function(){function f(){this.crc32c=new AA}return f.prototype.update=function(R){if(g0(R))return;this.crc32c.update(T0(R))},f.prototype.digest=function(){return lh(this,void 0,void 0,function(){return _h(this,function(R){return[2,IR(this.crc32c.digest())]})})},f.prototype.reset=function(){this.crc32c=new AA},f}();var AA=function(){function f(){this.checksum=4294967295}return f.prototype.update=function(R){var h,$;try{for(var A=dh(R),G=A.next();!G.done;G=A.next()){var H=G.value;this.checksum=this.checksum>>>8^xY[(this.checksum^H)&255]}}catch(N){h={error:N}}finally{try{if(G&&!G.done&&($=A.return))$.call(A)}finally{if(h)throw h.error}}return this},f.prototype.digest=function(){return(this.checksum^4294967295)>>>0},f}();var bY=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],xY=C0(bY);var HA=function(){function f(){this.crc32=new PR}return f.prototype.update=function(R){if(g0(R))return;this.crc32.update(T0(R))},f.prototype.digest=function(){return lh(this,void 0,void 0,function(){return _h(this,function(R){return[2,IR(this.crc32.digest())]})})},f.prototype.reset=function(){this.crc32=new PR},f}();var PR=function(){function f(){this.checksum=4294967295}return f.prototype.update=function(R){var h,$;try{for(var A=dh(R),G=A.next();!G.done;G=A.next()){var H=G.value;this.checksum=this.checksum>>>8^sY[(this.checksum^H)&255]}}catch(N){h={error:N}}finally{try{if(G&&!G.done&&($=A.return))$.call(A)}finally{if(h)throw h.error}}return this},f.prototype.digest=function(){return(this.checksum^4294967295)>>>0},f}();var kY=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],sY=C0(kY);import*as NA from"zlib";class DN{checksum=0;update(f){this.checksum=NA.crc32(f,this.checksum)}async digest(){return IR(this.checksum)}reset(){this.checksum=0}}var ZN=()=>{if(typeof NA.crc32==="undefined")return HA;return DN};var ah=(f,R)=>{switch(f){case O.MD5:return R.md5;case O.CRC32:return ZN();case O.CRC32C:return GA;case O.CRC64NVME:if(typeof hA.CrtCrc64Nvme!=="function")throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly.
40
40
  You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";].
41
- For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return hA.CrtCrc64Nvme;case j.SHA1:return R.sha1;case j.SHA256:return R.sha256;default:throw new Error(`Unsupported checksum algorithm: ${f}`)}};var ih=(f,R)=>{let h=new f;return h.update(If(R||"")),h.digest()};var JN={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},XN=(f,R)=>(h,$)=>async(A)=>{if(!Ff.isInstance(A.request))return h(A);if(FN("x-amz-checksum-",A.request.headers))return h(A);let{request:G,input:H}=A,{body:N,headers:U}=G,{base64Encoder:F,streamHasher:S}=f,{requestChecksumRequired:D,requestAlgorithmMember:J}=R,Z=await f.requestChecksumCalculation(),L=J?.name,P=J?.httpHeader;if(L&&!H[L]){if(Z===Kf.WHEN_SUPPORTED||D){if(H[L]=V0,P)U[P]=V0}}let a=NN(H,{requestChecksumRequired:D,requestAlgorithmMember:J?.name,requestChecksumCalculation:Z}),gf=N,Cf=U;if(a){switch(a){case j.CRC32:iR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case j.CRC32C:iR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case j.CRC64NVME:iR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case j.SHA1:iR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case j.SHA256:iR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}let LR=rR(a),ch=rh(a,f);if(lh(N)){let{getAwsChunkedEncodingStream:E0,bodyLengthChecker:qY}=f;gf=E0(typeof f.requestStreamBufferSize==="number"&&f.requestStreamBufferSize>=8192?MN(N,f.requestStreamBufferSize,$.logger):N,{base64Encoder:F,bodyLengthChecker:qY,checksumLocationName:LR,checksumAlgorithmFn:ch,streamHasher:S}),Cf={...U,"content-encoding":U["content-encoding"]?`${U["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":U["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":LR},delete Cf["content-length"]}else if(!UN(LR,U)){let E0=await ih(ch,N);Cf={...U,[LR]:F(E0)}}}return await h({...A,request:{...G,headers:Cf,body:gf}})};var c0=O(BR(),1);var zN={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},QN=(f,R)=>(h,$)=>async(A)=>{let G=A.input,{requestValidationModeMember:H}=R,N=await f.requestChecksumCalculation(),U=await f.responseChecksumValidation();switch(N){case Kf.WHEN_REQUIRED:c0.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Kf.WHEN_SUPPORTED:c0.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(U){case IR.WHEN_REQUIRED:c0.setFeature($,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case IR.WHEN_SUPPORTED:c0.setFeature($,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}if(H&&!G[H]){if(U===IR.WHEN_SUPPORTED)G[H]="ENABLED"}return h(A)};var ph=(f=[])=>{let R=[];for(let h of HN){if(!f.includes(h)||!T0.includes(h))continue;R.push(h)}return R};var wN=(f)=>{let R=f.lastIndexOf("-");if(R!==-1){let h=f.slice(R+1);if(!h.startsWith("0")){let $=parseInt(h,10);if(!isNaN($)&&$>=1&&$<=1e4)return!0}}return!1};var LN=async(f,{checksumAlgorithmFn:R,base64Encoder:h})=>h(await ih(R,f));var PN=async(f,{config:R,responseAlgorithms:h,logger:$})=>{let A=ph(h),{body:G,headers:H}=f;for(let N of A){let U=rR(N),F=H[U];if(F){let S;try{S=rh(N,R)}catch(Z){if(N===j.CRC64NVME){$?.warn(`Skipping ${j.CRC64NVME} checksum validation: ${Z.message}`);continue}throw Z}let{base64Encoder:D}=R;if(lh(G)){f.body=IN({expectedChecksum:F,checksumSourceLocation:U,checksum:new S,source:G,base64Encoder:D});return}let J=await LN(G,{checksumAlgorithmFn:S,base64Encoder:D});if(J===F)break;throw new Error(`Checksum mismatch: expected "${J}" but received "${F}" in response header "${U}".`)}}};var qN={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},BN=(f,R)=>(h,$)=>async(A)=>{if(!Ff.isInstance(A.request))return h(A);let G=A.input,H=await h(A),N=H.response,{requestValidationModeMember:U,responseAlgorithms:F}=R;if(U&&G[U]==="ENABLED"){let{clientName:S,commandName:D}=$;if(S==="S3Client"&&D==="GetObjectCommand"&&ph(F).every((Z)=>{let L=rR(Z),P=N.headers[L];return!P||wN(P)}))return H;await PN(N,{config:f,responseAlgorithms:F,logger:$.logger})}return H};var oh=(f,R)=>({applyToStack:(h)=>{h.add(XN(f,R),JN),h.addRelativeTo(QN(f,R),zN),h.addRelativeTo(BN(f,R),qN)}});var UA=O(nh(),1);var KN=(f)=>{let{requestChecksumCalculation:R,responseChecksumValidation:h,requestStreamBufferSize:$}=f;return Object.assign(f,{requestChecksumCalculation:UA.normalizeProvider(R??xh),responseChecksumValidation:UA.normalizeProvider(h??kh),requestStreamBufferSize:Number($??0)})};var bY="content-length",xY="x-amz-decoded-content-length";function kY(){return(f,R)=>async(h)=>{let{request:$}=h;if(Ff.isInstance($)){if(!(bY in $.headers)&&!(xY in $.headers))if(typeof R?.logger?.warn==="function"&&!(R.logger instanceof eh))R.logger.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.");else console.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.")}return f({...h})}}var sY={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},vN=(f)=>({applyToStack:(R)=>{R.add(kY(),sY)}});var yN=(f)=>{return(R,h)=>async($)=>{let A=await f.region(),G=f.region,H=()=>{};if(h.__s3RegionRedirect)Object.defineProperty(f,"region",{writable:!1,value:async()=>{return h.__s3RegionRedirect}}),H=()=>Object.defineProperty(f,"region",{writable:!0,value:G});try{let N=await R($);if(h.__s3RegionRedirect){H();let U=await f.region();if(A!==U)throw new Error("Region was not restored following S3 region redirect.")}return N}catch(N){throw H(),N}}},jN={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function lY(f){return(R,h)=>async($)=>{try{return await R($)}catch(A){if(f.followRegionRedirects){if(A?.$metadata?.httpStatusCode===301||A?.$metadata?.httpStatusCode===400&&A?.name==="IllegalLocationConstraintException"){try{let G=A.$response.headers["x-amz-bucket-region"];h.logger?.debug(`Redirecting from ${await f.region()} to ${G}`),h.__s3RegionRedirect=G}catch(G){throw new Error("Region redirect failed: "+G)}return R($)}}throw A}}}var _Y={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},ON=(f)=>({applyToStack:(R)=>{R.add(lY(f),_Y),R.addRelativeTo(yN(f),jN)}});var dY=(f)=>{return(R,h)=>async($)=>{let A=await R($),{response:G}=A;if(uh.isInstance(G)){if(G.headers.expires){G.headers.expiresstring=G.headers.expires;try{b0(G.headers.expires)}catch(H){h.logger?.warn(`AWS SDK Warning for ${h.clientName}::${h.commandName} response parsing (${G.headers.expires}): ${H}`),delete G.headers.expires}}}return A}},aY={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},EN=(f)=>({applyToStack:(R)=>{R.addRelativeTo(dY(f),aY)}});class x0{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=30000;constructor(f={}){this.data=f}get(f){let R=this.data[f];if(!R)return;return R}set(f,R){return this.data[f]=R,R}delete(f){delete this.data[f]}async purgeExpired(){let f=Date.now();if(this.lastPurgeTime+x0.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>f)return;for(let R in this.data){let h=this.data[R];if(!h.isRefreshing){let $=await h.identity;if($.expiration){if($.expiration.getTime()<f)delete this.data[R]}}}}}class pR{_identity;isRefreshing;accessed;constructor(f,R=!1,h=Date.now()){this._identity=f,this.isRefreshing=R,this.accessed=h}get identity(){return this.accessed=Date.now(),this._identity}}class k0{createSessionFn;cache;static REFRESH_WINDOW_MS=60000;constructor(f,R=new x0){this.createSessionFn=f,this.cache=R}async getS3ExpressIdentity(f,R){let h=R.Bucket,{cache:$}=this,A=$.get(h);if(A)return A.identity.then((G)=>{if((G.expiration?.getTime()??0)<Date.now())return $.set(h,new pR(this.getIdentity(h))).identity;if((G.expiration?.getTime()??0)<Date.now()+k0.REFRESH_WINDOW_MS&&!A.isRefreshing)A.isRefreshing=!0,this.getIdentity(h).then((U)=>{$.set(h,new pR(Promise.resolve(U)))});return G});return $.set(h,new pR(this.getIdentity(h))).identity}async getIdentity(f){await this.cache.purgeExpired().catch(($)=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
42
- `+$)});let R=await this.createSessionFn(f);if(!R.Credentials?.AccessKeyId||!R.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:R.Credentials.AccessKeyId,secretAccessKey:R.Credentials.SecretAccessKey,sessionToken:R.Credentials.SessionToken,expiration:R.Credentials.Expiration?new Date(R.Credentials.Expiration):void 0}}}var H1=O(KR(),1);var VN="X-Amz-Algorithm",TN="X-Amz-Credential",gN="X-Amz-Date",CN="X-Amz-SignedHeaders",mN="X-Amz-Expires",cN="X-Amz-Signature",bN="X-Amz-Security-Token";var xN="authorization",FA="X-Amz-Date".toLowerCase();var kN=["authorization",FA,"date"],sN="X-Amz-Signature".toLowerCase(),s0="x-amz-content-sha256",lN="X-Amz-Security-Token".toLowerCase();var _N={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},dN=/^proxy-/,aN=/^sec-/;var th="AWS4-HMAC-SHA256";var rN="AWS4-HMAC-SHA256-PAYLOAD",iN="UNSIGNED-PAYLOAD",pN=50,WA="aws4_request",oN=604800;var eN=O(KR(),1);var f1={},SA=[],R1=(f,R,h)=>`${f}/${R}/${h}/${WA}`,uN=async(f,R,h,$,A)=>{let G=await nN(f,R.secretAccessKey,R.accessKeyId),H=`${h}:${$}:${A}:${eN.toHex(G)}:${R.sessionToken}`;if(H in f1)return f1[H];SA.push(H);while(SA.length>pN)delete f1[SA.shift()];let N=`AWS4${R.secretAccessKey}`;for(let U of[h,$,A,WA])N=await nN(f,N,U);return f1[H]=N};var nN=(f,R,h)=>{let $=new f(R);return $.update(If(h)),$.digest()};var h1=({headers:f},R,h)=>{let $={};for(let A of Object.keys(f).sort()){if(f[A]==null)continue;let G=A.toLowerCase();if(G in _N||R?.has(G)||dN.test(G)||aN.test(G)){if(!h||h&&!h.has(G))continue}$[G]=f[A].trim().replace(/\s+/g," ")}return $};var tN=O(KR(),1);var l0=async({headers:f,body:R},h)=>{for(let $ of Object.keys(f))if($.toLowerCase()===s0)return f[$];if(R==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof R==="string"||ArrayBuffer.isView(R)||sh(R)){let $=new h;return $.update(If(R)),tN.toHex(await $.digest())}return iN};var $1=O(KR(),1);class YA{format(f){let R=[];for(let A of Object.keys(f)){let G=_0(A);R.push(Uint8Array.from([G.byteLength]),G,this.formatHeaderValue(f[A]))}let h=new Uint8Array(R.reduce((A,G)=>A+G.byteLength,0)),$=0;for(let A of R)h.set(A,$),$+=A.byteLength;return h}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,f.value,!1),new Uint8Array(R.buffer);case"integer":let h=new DataView(new ArrayBuffer(5));return h.setUint8(0,4),h.setInt32(1,f.value,!1),new Uint8Array(h.buffer);case"long":let $=new Uint8Array(9);return $[0]=5,$.set(f.value.bytes,1),$;case"binary":let A=new DataView(new ArrayBuffer(3+f.value.byteLength));A.setUint8(0,6),A.setUint16(1,f.value.byteLength,!1);let G=new Uint8Array(A.buffer);return G.set(f.value,3),G;case"string":let H=_0(f.value),N=new DataView(new ArrayBuffer(3+H.byteLength));N.setUint8(0,7),N.setUint16(1,H.byteLength,!1);let U=new Uint8Array(N.buffer);return U.set(H,3),U;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(DA.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!rY.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let S=new Uint8Array(17);return S[0]=9,S.set($1.fromHex(f.value.replace(/\-/g,"")),1),S}}}var f6;(function(f){f[f.boolTrue=0]="boolTrue",f[f.boolFalse=1]="boolFalse",f[f.byte=2]="byte",f[f.short=3]="short",f[f.integer=4]="integer",f[f.long=5]="long",f[f.byteArray=6]="byteArray",f[f.string=7]="string",f[f.timestamp=8]="timestamp",f[f.uuid=9]="uuid"})(f6||(f6={}));var rY=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class DA{constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let h=7,$=Math.abs(Math.round(f));h>-1&&$>0;h--,$/=256)R[h]=$;if(f<0)R6(R);return new DA(R)}valueOf(){let f=this.bytes.slice(0),R=f[0]&128;if(R)R6(f);return parseInt($1.toHex(f),16)*(R?-1:1)}toString(){return String(this.valueOf())}}function R6(f){for(let R=0;R<8;R++)f[R]^=255;for(let R=7;R>-1;R--)if(f[R]++,f[R]!==0)break}var ZA=(f,R)=>{f=f.toLowerCase();for(let h of Object.keys(R))if(f===h.toLowerCase())return!0;return!1};var MA=(f,R={})=>{let{headers:h,query:$={}}=Ff.clone(f);for(let A of Object.keys(h)){let G=A.toLowerCase();if(G.slice(0,6)==="x-amz-"&&!R.unhoistableHeaders?.has(G)||R.hoistableHeaders?.has(G))$[A]=h[A],delete h[A]}return{...f,headers:h,query:$}};var A1=(f)=>{f=Ff.clone(f);for(let R of Object.keys(f.headers))if(kN.indexOf(R.toLowerCase())>-1)delete f.headers[R];return f};var $6=O(KR(),1),XA=O(nh(),1);var JA=({query:f={}})=>{let R=[],h={};for(let $ of Object.keys(f)){if($.toLowerCase()===sN)continue;let A=oR($);R.push(A);let G=f[$];if(typeof G==="string")h[A]=`${A}=${oR(G)}`;else if(Array.isArray(G))h[A]=G.slice(0).reduce((H,N)=>H.concat([`${A}=${oR(N)}`]),[]).sort().join("&")}return R.sort().map(($)=>h[$]).filter(($)=>$).join("&")};var h6=(f)=>iY(f).toISOString().replace(/\.\d{3}Z$/,"Z"),iY=(f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f};class G1{constructor({applyChecksum:f,credentials:R,region:h,service:$,sha256:A,uriEscapePath:G=!0}){this.service=$,this.sha256=A,this.uriEscapePath=G,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=XA.normalizeProvider(h),this.credentialProvider=XA.normalizeProvider(R)}createCanonicalRequest(f,R,h){let $=Object.keys(R).sort();return`${f.method}
41
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return hA.CrtCrc64Nvme;case O.SHA1:return R.sha1;case O.SHA256:return R.sha256;default:throw new Error(`Unsupported checksum algorithm: ${f}`)}};var rh=(f,R)=>{let h=new f;return h.update(If(R||"")),h.digest()};var JN={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},XN=(f,R)=>(h,$)=>async(A)=>{if(!Ff.isInstance(A.request))return h(A);if(FN("x-amz-checksum-",A.request.headers))return h(A);let{request:G,input:H}=A,{body:N,headers:U}=G,{base64Encoder:F,streamHasher:S}=f,{requestChecksumRequired:D,requestAlgorithmMember:J}=R,Z=await f.requestChecksumCalculation(),L=J?.name,P=J?.httpHeader;if(L&&!H[L]){if(Z===Kf.WHEN_SUPPORTED||D){if(H[L]=E0,P)U[P]=E0}}let a=NN(H,{requestChecksumRequired:D,requestAlgorithmMember:J?.name,requestChecksumCalculation:Z}),gf=N,Cf=U;if(a){switch(a){case O.CRC32:rR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case O.CRC32C:rR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case O.CRC64NVME:rR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case O.SHA1:rR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case O.SHA256:rR.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}let wR=aR(a),mh=ah(a,f);if(sh(N)){let{getAwsChunkedEncodingStream:O0,bodyLengthChecker:yY}=f;gf=O0(typeof f.requestStreamBufferSize==="number"&&f.requestStreamBufferSize>=8192?MN(N,f.requestStreamBufferSize,$.logger):N,{base64Encoder:F,bodyLengthChecker:yY,checksumLocationName:wR,checksumAlgorithmFn:mh,streamHasher:S}),Cf={...U,"content-encoding":U["content-encoding"]?`${U["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":U["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":wR},delete Cf["content-length"]}else if(!UN(wR,U)){let O0=await rh(mh,N);Cf={...U,[wR]:F(O0)}}}return await h({...A,request:{...G,headers:Cf,body:gf}})};var m0=v(qR(),1);var zN={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},QN=(f,R)=>(h,$)=>async(A)=>{let G=A.input,{requestValidationModeMember:H}=R,N=await f.requestChecksumCalculation(),U=await f.responseChecksumValidation();switch(N){case Kf.WHEN_REQUIRED:m0.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Kf.WHEN_SUPPORTED:m0.setFeature($,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(U){case LR.WHEN_REQUIRED:m0.setFeature($,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case LR.WHEN_SUPPORTED:m0.setFeature($,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}if(H&&!G[H]){if(U===LR.WHEN_SUPPORTED)G[H]="ENABLED"}return h(A)};var ih=(f=[])=>{let R=[];for(let h of HN){if(!f.includes(h)||!V0.includes(h))continue;R.push(h)}return R};var wN=(f)=>{let R=f.lastIndexOf("-");if(R!==-1){let h=f.slice(R+1);if(!h.startsWith("0")){let $=parseInt(h,10);if(!isNaN($)&&$>=1&&$<=1e4)return!0}}return!1};var LN=async(f,{checksumAlgorithmFn:R,base64Encoder:h})=>h(await rh(R,f));var PN=async(f,{config:R,responseAlgorithms:h,logger:$})=>{let A=ih(h),{body:G,headers:H}=f;for(let N of A){let U=aR(N),F=H[U];if(F){let S;try{S=ah(N,R)}catch(Z){if(N===O.CRC64NVME){$?.warn(`Skipping ${O.CRC64NVME} checksum validation: ${Z.message}`);continue}throw Z}let{base64Encoder:D}=R;if(sh(G)){f.body=IN({expectedChecksum:F,checksumSourceLocation:U,checksum:new S,source:G,base64Encoder:D});return}let J=await LN(G,{checksumAlgorithmFn:S,base64Encoder:D});if(J===F)break;throw new Error(`Checksum mismatch: expected "${J}" but received "${F}" in response header "${U}".`)}}};var qN={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},BN=(f,R)=>(h,$)=>async(A)=>{if(!Ff.isInstance(A.request))return h(A);let G=A.input,H=await h(A),N=H.response,{requestValidationModeMember:U,responseAlgorithms:F}=R;if(U&&G[U]==="ENABLED"){let{clientName:S,commandName:D}=$;if(S==="S3Client"&&D==="GetObjectCommand"&&ih(F).every((Z)=>{let L=aR(Z),P=N.headers[L];return!P||wN(P)}))return H;await PN(N,{config:f,responseAlgorithms:F,logger:$.logger})}return H};var ph=(f,R)=>({applyToStack:(h)=>{h.add(XN(f,R),JN),h.addRelativeTo(QN(f,R),zN),h.addRelativeTo(BN(f,R),qN)}});var UA=v(oh(),1);var KN=(f)=>{let{requestChecksumCalculation:R,responseChecksumValidation:h,requestStreamBufferSize:$}=f;return Object.assign(f,{requestChecksumCalculation:UA.normalizeProvider(R??bh),responseChecksumValidation:UA.normalizeProvider(h??xh),requestStreamBufferSize:Number($??0)})};var lY="content-length",_Y="x-amz-decoded-content-length";function dY(){return(f,R)=>async(h)=>{let{request:$}=h;if(Ff.isInstance($)){if(!(lY in $.headers)&&!(_Y in $.headers))if(typeof R?.logger?.warn==="function"&&!(R.logger instanceof nh))R.logger.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.");else console.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.")}return f({...h})}}var aY={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},vN=(f)=>({applyToStack:(R)=>{R.add(dY(),aY)}});var yN=(f)=>{return(R,h)=>async($)=>{let A=await f.region(),G=f.region,H=()=>{};if(h.__s3RegionRedirect)Object.defineProperty(f,"region",{writable:!1,value:async()=>{return h.__s3RegionRedirect}}),H=()=>Object.defineProperty(f,"region",{writable:!0,value:G});try{let N=await R($);if(h.__s3RegionRedirect){H();let U=await f.region();if(A!==U)throw new Error("Region was not restored following S3 region redirect.")}return N}catch(N){throw H(),N}}},jN={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function rY(f){return(R,h)=>async($)=>{try{return await R($)}catch(A){if(f.followRegionRedirects){if(A?.$metadata?.httpStatusCode===301||A?.$metadata?.httpStatusCode===400&&A?.name==="IllegalLocationConstraintException"){try{let G=A.$response.headers["x-amz-bucket-region"];h.logger?.debug(`Redirecting from ${await f.region()} to ${G}`),h.__s3RegionRedirect=G}catch(G){throw new Error("Region redirect failed: "+G)}return R($)}}throw A}}}var iY={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},ON=(f)=>({applyToStack:(R)=>{R.add(rY(f),iY),R.addRelativeTo(yN(f),jN)}});var pY=(f)=>{return(R,h)=>async($)=>{let A=await R($),{response:G}=A;if(eh.isInstance(G)){if(G.headers.expires){G.headers.expiresstring=G.headers.expires;try{c0(G.headers.expires)}catch(H){h.logger?.warn(`AWS SDK Warning for ${h.clientName}::${h.commandName} response parsing (${G.headers.expires}): ${H}`),delete G.headers.expires}}}return A}},oY={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},EN=(f)=>({applyToStack:(R)=>{R.addRelativeTo(pY(f),oY)}});class b0{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=30000;constructor(f={}){this.data=f}get(f){let R=this.data[f];if(!R)return;return R}set(f,R){return this.data[f]=R,R}delete(f){delete this.data[f]}async purgeExpired(){let f=Date.now();if(this.lastPurgeTime+b0.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>f)return;for(let R in this.data){let h=this.data[R];if(!h.isRefreshing){let $=await h.identity;if($.expiration){if($.expiration.getTime()<f)delete this.data[R]}}}}}class iR{_identity;isRefreshing;accessed;constructor(f,R=!1,h=Date.now()){this._identity=f,this.isRefreshing=R,this.accessed=h}get identity(){return this.accessed=Date.now(),this._identity}}class x0{createSessionFn;cache;static REFRESH_WINDOW_MS=60000;constructor(f,R=new b0){this.createSessionFn=f,this.cache=R}async getS3ExpressIdentity(f,R){let h=R.Bucket,{cache:$}=this,A=$.get(h);if(A)return A.identity.then((G)=>{if((G.expiration?.getTime()??0)<Date.now())return $.set(h,new iR(this.getIdentity(h))).identity;if((G.expiration?.getTime()??0)<Date.now()+x0.REFRESH_WINDOW_MS&&!A.isRefreshing)A.isRefreshing=!0,this.getIdentity(h).then((U)=>{$.set(h,new iR(Promise.resolve(U)))});return G});return $.set(h,new iR(this.getIdentity(h))).identity}async getIdentity(f){await this.cache.purgeExpired().catch(($)=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
42
+ `+$)});let R=await this.createSessionFn(f);if(!R.Credentials?.AccessKeyId||!R.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:R.Credentials.AccessKeyId,secretAccessKey:R.Credentials.SecretAccessKey,sessionToken:R.Credentials.SessionToken,expiration:R.Credentials.Expiration?new Date(R.Credentials.Expiration):void 0}}}var G1=v(BR(),1);var VN="X-Amz-Algorithm",TN="X-Amz-Credential",gN="X-Amz-Date",CN="X-Amz-SignedHeaders",mN="X-Amz-Expires",cN="X-Amz-Signature",bN="X-Amz-Security-Token";var xN="authorization",FA="X-Amz-Date".toLowerCase();var kN=["authorization",FA,"date"],sN="X-Amz-Signature".toLowerCase(),k0="x-amz-content-sha256",lN="X-Amz-Security-Token".toLowerCase();var _N={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},dN=/^proxy-/,aN=/^sec-/;var uh="AWS4-HMAC-SHA256";var rN="AWS4-HMAC-SHA256-PAYLOAD",iN="UNSIGNED-PAYLOAD",pN=50,WA="aws4_request",oN=604800;var eN=v(BR(),1);var th={},SA=[],f1=(f,R,h)=>`${f}/${R}/${h}/${WA}`,uN=async(f,R,h,$,A)=>{let G=await nN(f,R.secretAccessKey,R.accessKeyId),H=`${h}:${$}:${A}:${eN.toHex(G)}:${R.sessionToken}`;if(H in th)return th[H];SA.push(H);while(SA.length>pN)delete th[SA.shift()];let N=`AWS4${R.secretAccessKey}`;for(let U of[h,$,A,WA])N=await nN(f,N,U);return th[H]=N};var nN=(f,R,h)=>{let $=new f(R);return $.update(If(h)),$.digest()};var R1=({headers:f},R,h)=>{let $={};for(let A of Object.keys(f).sort()){if(f[A]==null)continue;let G=A.toLowerCase();if(G in _N||R?.has(G)||dN.test(G)||aN.test(G)){if(!h||h&&!h.has(G))continue}$[G]=f[A].trim().replace(/\s+/g," ")}return $};var tN=v(BR(),1);var s0=async({headers:f,body:R},h)=>{for(let $ of Object.keys(f))if($.toLowerCase()===k0)return f[$];if(R==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof R==="string"||ArrayBuffer.isView(R)||kh(R)){let $=new h;return $.update(If(R)),tN.toHex(await $.digest())}return iN};var h1=v(BR(),1);class YA{format(f){let R=[];for(let A of Object.keys(f)){let G=l0(A);R.push(Uint8Array.from([G.byteLength]),G,this.formatHeaderValue(f[A]))}let h=new Uint8Array(R.reduce((A,G)=>A+G.byteLength,0)),$=0;for(let A of R)h.set(A,$),$+=A.byteLength;return h}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,f.value,!1),new Uint8Array(R.buffer);case"integer":let h=new DataView(new ArrayBuffer(5));return h.setUint8(0,4),h.setInt32(1,f.value,!1),new Uint8Array(h.buffer);case"long":let $=new Uint8Array(9);return $[0]=5,$.set(f.value.bytes,1),$;case"binary":let A=new DataView(new ArrayBuffer(3+f.value.byteLength));A.setUint8(0,6),A.setUint16(1,f.value.byteLength,!1);let G=new Uint8Array(A.buffer);return G.set(f.value,3),G;case"string":let H=l0(f.value),N=new DataView(new ArrayBuffer(3+H.byteLength));N.setUint8(0,7),N.setUint16(1,H.byteLength,!1);let U=new Uint8Array(N.buffer);return U.set(H,3),U;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(DA.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!nY.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let S=new Uint8Array(17);return S[0]=9,S.set(h1.fromHex(f.value.replace(/\-/g,"")),1),S}}}var f6;(function(f){f[f.boolTrue=0]="boolTrue",f[f.boolFalse=1]="boolFalse",f[f.byte=2]="byte",f[f.short=3]="short",f[f.integer=4]="integer",f[f.long=5]="long",f[f.byteArray=6]="byteArray",f[f.string=7]="string",f[f.timestamp=8]="timestamp",f[f.uuid=9]="uuid"})(f6||(f6={}));var nY=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class DA{constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let h=7,$=Math.abs(Math.round(f));h>-1&&$>0;h--,$/=256)R[h]=$;if(f<0)R6(R);return new DA(R)}valueOf(){let f=this.bytes.slice(0),R=f[0]&128;if(R)R6(f);return parseInt(h1.toHex(f),16)*(R?-1:1)}toString(){return String(this.valueOf())}}function R6(f){for(let R=0;R<8;R++)f[R]^=255;for(let R=7;R>-1;R--)if(f[R]++,f[R]!==0)break}var ZA=(f,R)=>{f=f.toLowerCase();for(let h of Object.keys(R))if(f===h.toLowerCase())return!0;return!1};var MA=(f,R={})=>{let{headers:h,query:$={}}=Ff.clone(f);for(let A of Object.keys(h)){let G=A.toLowerCase();if(G.slice(0,6)==="x-amz-"&&!R.unhoistableHeaders?.has(G)||R.hoistableHeaders?.has(G))$[A]=h[A],delete h[A]}return{...f,headers:h,query:$}};var $1=(f)=>{f=Ff.clone(f);for(let R of Object.keys(f.headers))if(kN.indexOf(R.toLowerCase())>-1)delete f.headers[R];return f};var $6=v(BR(),1),XA=v(oh(),1);var JA=({query:f={}})=>{let R=[],h={};for(let $ of Object.keys(f)){if($.toLowerCase()===sN)continue;let A=pR($);R.push(A);let G=f[$];if(typeof G==="string")h[A]=`${A}=${pR(G)}`;else if(Array.isArray(G))h[A]=G.slice(0).reduce((H,N)=>H.concat([`${A}=${pR(N)}`]),[]).sort().join("&")}return R.sort().map(($)=>h[$]).filter(($)=>$).join("&")};var h6=(f)=>eY(f).toISOString().replace(/\.\d{3}Z$/,"Z"),eY=(f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f};class A1{constructor({applyChecksum:f,credentials:R,region:h,service:$,sha256:A,uriEscapePath:G=!0}){this.service=$,this.sha256=A,this.uriEscapePath=G,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=XA.normalizeProvider(h),this.credentialProvider=XA.normalizeProvider(R)}createCanonicalRequest(f,R,h){let $=Object.keys(R).sort();return`${f.method}
43
43
  ${this.getCanonicalPath(f)}
44
44
  ${JA(f)}
45
45
  ${$.map((A)=>`${A}:${R[A]}`).join(`
@@ -49,11 +49,11 @@ ${$.join(";")}
49
49
  ${h}`}async createStringToSign(f,R,h,$){let A=new this.sha256;A.update(If(h));let G=await A.digest();return`${$}
50
50
  ${f}
51
51
  ${R}
52
- ${$6.toHex(G)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let R=[];for(let A of f.split("/")){if(A?.length===0)continue;if(A===".")continue;if(A==="..")R.pop();else R.push(A)}let h=`${f?.startsWith("/")?"/":""}${R.join("/")}${R.length>0&&f?.endsWith("/")?"/":""}`;return oR(h).replace(/%2F/g,"/")}return f}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}formatDate(f){let R=h6(f).replace(/[\-:]/g,"");return{longDate:R,shortDate:R.slice(0,8)}}getCanonicalHeaderList(f){return Object.keys(f).sort().join(";")}}class zA extends G1{constructor({applyChecksum:f,credentials:R,region:h,service:$,sha256:A,uriEscapePath:G=!0}){super({applyChecksum:f,credentials:R,region:h,service:$,sha256:A,uriEscapePath:G});this.headerFormatter=new YA}async presign(f,R={}){let{signingDate:h=new Date,expiresIn:$=3600,unsignableHeaders:A,unhoistableHeaders:G,signableHeaders:H,hoistableHeaders:N,signingRegion:U,signingService:F}=R,S=await this.credentialProvider();this.validateResolvedCredentials(S);let D=U??await this.regionProvider(),{longDate:J,shortDate:Z}=this.formatDate(h);if($>oN)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let L=R1(Z,D,F??this.service),P=MA(A1(f),{unhoistableHeaders:G,hoistableHeaders:N});if(S.sessionToken)P.query[bN]=S.sessionToken;P.query[VN]=th,P.query[TN]=`${S.accessKeyId}/${L}`,P.query[gN]=J,P.query[mN]=$.toString(10);let a=h1(P,A,H);return P.query[CN]=this.getCanonicalHeaderList(a),P.query[cN]=await this.getSignature(J,L,this.getSigningKey(S,D,Z,F),this.createCanonicalRequest(P,a,await l0(f,this.sha256))),P}async sign(f,R){if(typeof f==="string")return this.signString(f,R);else if(f.headers&&f.payload)return this.signEvent(f,R);else if(f.message)return this.signMessage(f,R);else return this.signRequest(f,R)}async signEvent({headers:f,payload:R},{signingDate:h=new Date,priorSignature:$,signingRegion:A,signingService:G}){let H=A??await this.regionProvider(),{shortDate:N,longDate:U}=this.formatDate(h),F=R1(N,H,G??this.service),S=await l0({headers:{},body:R},this.sha256),D=new this.sha256;D.update(f);let J=H1.toHex(await D.digest()),Z=[rN,U,F,$,J,S].join(`
53
- `);return this.signString(Z,{signingDate:h,signingRegion:H,signingService:G})}async signMessage(f,{signingDate:R=new Date,signingRegion:h,signingService:$}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:R,signingRegion:h,signingService:$,priorSignature:f.priorSignature}).then((G)=>{return{message:f.message,signature:G}})}async signString(f,{signingDate:R=new Date,signingRegion:h,signingService:$}={}){let A=await this.credentialProvider();this.validateResolvedCredentials(A);let G=h??await this.regionProvider(),{shortDate:H}=this.formatDate(R),N=new this.sha256(await this.getSigningKey(A,G,H,$));return N.update(If(f)),H1.toHex(await N.digest())}async signRequest(f,{signingDate:R=new Date,signableHeaders:h,unsignableHeaders:$,signingRegion:A,signingService:G}={}){let H=await this.credentialProvider();this.validateResolvedCredentials(H);let N=A??await this.regionProvider(),U=A1(f),{longDate:F,shortDate:S}=this.formatDate(R),D=R1(S,N,G??this.service);if(U.headers[FA]=F,H.sessionToken)U.headers[lN]=H.sessionToken;let J=await l0(U,this.sha256);if(!ZA(s0,U.headers)&&this.applyChecksum)U.headers[s0]=J;let Z=h1(U,$,h),L=await this.getSignature(F,D,this.getSigningKey(H,N,S,G),this.createCanonicalRequest(U,Z,J));return U.headers[xN]=`${th} Credential=${H.accessKeyId}/${D}, SignedHeaders=${this.getCanonicalHeaderList(Z)}, Signature=${L}`,U}async getSignature(f,R,h,$){let A=await this.createStringToSign(f,R,$,th),G=new this.sha256(await h);return G.update(If(A)),H1.toHex(await G.digest())}getSigningKey(f,R,h,$){return uN(this.sha256,f,h,R,$||this.service)}}var A6="Directory",G6="S3Express",H6="sigv4-s3express",N1="X-Amz-S3session-Token",d0=N1.toLowerCase(),pY="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",oY="s3_disable_express_session_auth",QA={environmentVariableSelector:(f)=>vR(f,pY,yR.ENV),configFileSelector:(f)=>vR(f,oY,yR.CONFIG),default:!1};class U1 extends zA{async signWithCredentials(f,R,h){let $=N6(R);f.headers[d0]=R.sessionToken;let A=this;return U6(A,$),A.signRequest(f,h??{})}async presignWithCredentials(f,R,h){let $=N6(R);return delete f.headers[d0],f.headers[N1]=R.sessionToken,f.query=f.query??{},f.query[N1]=R.sessionToken,U6(this,$),this.presign(f,h)}}function N6(f){return{accessKeyId:f.accessKeyId,secretAccessKey:f.secretAccessKey,expiration:f.expiration}}function U6(f,R){let h=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),$=f.credentialProvider,A=()=>{return clearTimeout(h),f.credentialProvider=$,Promise.resolve(R)};f.credentialProvider=A}var F6=O(BR(),1);var W6=(f)=>{return(R,h)=>async($)=>{if(h.endpointV2){let A=h.endpointV2,G=A.properties?.authSchemes?.[0]?.name===H6;if(A.properties?.backend===G6||A.properties?.bucketType===A6)F6.setFeature(h,"S3_EXPRESS_BUCKET","J"),h.isS3ExpressBucket=!0;if(G){let N=$.input.Bucket;if(N){let U=await f.s3ExpressIdentityProvider.getS3ExpressIdentity(await f.credentials(),{Bucket:N});if(h.s3ExpressIdentity=U,Ff.isInstance($.request)&&U.sessionToken)$.request.headers[d0]=U.sessionToken}}}return R($)}},S6={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},wA=(f)=>({applyToStack:(R)=>{R.add(W6(f),S6)}});var D6=O(LA(),1);var eY=O(nY(),1),Z6=O(nh(),1);var Y6=async(f,R,h,$)=>{let A=await $.signWithCredentials(h,f,{});if(A.headers["X-Amz-Security-Token"]||A.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return A};var uY=(f)=>(R)=>{throw R},tY=(f,R)=>{};var M6=(f)=>(R,h)=>async($)=>{if(!Ff.isInstance($.request))return R($);let G=Z6.getSmithyContext(h).selectedHttpAuthScheme;if(!G)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:H={}},identity:N,signer:U}=G,F;if(h.s3ExpressIdentity)F=await Y6(h.s3ExpressIdentity,H,$.request,await f.signer());else F=await U.sign($.request,N,H);let S=await R({...$,request:F}).catch((U.errorHandler||uY)(H));return(U.successHandler||tY)(S.response,H),S},IA=(f)=>({applyToStack:(R)=>{R.addRelativeTo(M6(f),D6.httpSigningMiddlewareOptions)}});var J6=(f,{session:R})=>{let[h,$]=R,{forcePathStyle:A,useAccelerateEndpoint:G,disableMultiregionAccessPoints:H,followRegionRedirects:N,s3ExpressIdentityProvider:U,bucketEndpoint:F}=f;return Object.assign(f,{forcePathStyle:A??!1,useAccelerateEndpoint:G??!1,disableMultiregionAccessPoints:H??!1,followRegionRedirects:N??!1,s3ExpressIdentityProvider:U??new k0(async(S)=>h().send(new $({Bucket:S}))),bucketEndpoint:F??!1})};var fD={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},RD=3000,hD=(f)=>(R,h)=>async($)=>{let A=await R($),{response:G}=A;if(!uh.isInstance(G))return A;let{statusCode:H,body:N}=G;if(H<200||H>=300)return A;if(!(typeof N?.stream==="function"||typeof N?.pipe==="function"||typeof N?.tee==="function"))return A;let F=N,S=N;if(N&&typeof N==="object"&&!(N instanceof Uint8Array))[F,S]=await z6(N);G.body=S;let D=await $D(F,{streamCollector:async(Z)=>{return X6(Z,RD)}});if(typeof F?.destroy==="function")F.destroy();let J=f.utf8Encoder(D.subarray(D.length-16));if(D.length===0&&fD[h.commandName]){let Z=new Error("S3 aborted request");throw Z.name="InternalError",Z}if(J&&J.endsWith("</Error>"))G.statusCode=400;return A},$D=(f=new Uint8Array,R)=>{if(f instanceof Uint8Array)return Promise.resolve(f);return R.streamCollector(f)||Promise.resolve(new Uint8Array)},AD={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},nR=(f)=>({applyToStack:(R)=>{R.addRelativeTo(hD(f),AD)}});var PA=(f)=>typeof f==="string"&&f.indexOf("arn:")===0&&f.split(":").length>=6;function Q6(f){return(R,h)=>async($)=>{if(f.bucketEndpoint){let A=h.endpointV2;if(A){let G=$.input.Bucket;if(typeof G==="string")try{let H=new URL(G);h.endpointV2={...A,url:H}}catch(H){let N=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${G} could not be parsed as URL.`;if(h.logger?.constructor?.name==="NoOpLogger")console.warn(N);else h.logger?.warn?.(N);throw H}}}return R($)}}var w6={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function GD({bucketEndpoint:f}){return(R)=>async(h)=>{let{input:{Bucket:$}}=h;if(!f&&typeof $==="string"&&!PA($)&&$.indexOf("/")>=0){let A=new Error(`Bucket name shouldn't contain '/', received '${$}'`);throw A.name="InvalidBucketName",A}return R({...h})}}var HD={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},L6=(f)=>({applyToStack:(R)=>{R.add(GD(f),HD),R.addRelativeTo(Q6(f),w6)}});var G0=O(LA(),1);var I6=(f)=>Object.assign(f,{eventStreamMarshaller:f.eventStreamSerdeProvider(f)});var Z1=O(BR(),1);var F1={CrtSignerV4:null};class qA{sigv4aSigner;sigv4Signer;signerOptions;constructor(f){this.sigv4Signer=new U1(f),this.signerOptions=f}async sign(f,R={}){if(R.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(f,R)}return this.sigv4Signer.sign(f,R)}async signWithCredentials(f,R,h={}){if(h.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(f,R,h)}return this.sigv4Signer.signWithCredentials(f,R,h)}async presign(f,R={}){if(R.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(f,R)}return this.sigv4Signer.presign(f,R)}async presignWithCredentials(f,R,h={}){if(h.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(f,R,h)}getSigv4aSigner(){if(!this.sigv4aSigner){let f=null;try{if(f=F1.CrtSignerV4,typeof f!=="function")throw new Error}catch(R){throw R.message=`${R.message}
52
+ ${$6.toHex(G)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let R=[];for(let A of f.split("/")){if(A?.length===0)continue;if(A===".")continue;if(A==="..")R.pop();else R.push(A)}let h=`${f?.startsWith("/")?"/":""}${R.join("/")}${R.length>0&&f?.endsWith("/")?"/":""}`;return pR(h).replace(/%2F/g,"/")}return f}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}formatDate(f){let R=h6(f).replace(/[\-:]/g,"");return{longDate:R,shortDate:R.slice(0,8)}}getCanonicalHeaderList(f){return Object.keys(f).sort().join(";")}}class zA extends A1{constructor({applyChecksum:f,credentials:R,region:h,service:$,sha256:A,uriEscapePath:G=!0}){super({applyChecksum:f,credentials:R,region:h,service:$,sha256:A,uriEscapePath:G});this.headerFormatter=new YA}async presign(f,R={}){let{signingDate:h=new Date,expiresIn:$=3600,unsignableHeaders:A,unhoistableHeaders:G,signableHeaders:H,hoistableHeaders:N,signingRegion:U,signingService:F}=R,S=await this.credentialProvider();this.validateResolvedCredentials(S);let D=U??await this.regionProvider(),{longDate:J,shortDate:Z}=this.formatDate(h);if($>oN)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let L=f1(Z,D,F??this.service),P=MA($1(f),{unhoistableHeaders:G,hoistableHeaders:N});if(S.sessionToken)P.query[bN]=S.sessionToken;P.query[VN]=uh,P.query[TN]=`${S.accessKeyId}/${L}`,P.query[gN]=J,P.query[mN]=$.toString(10);let a=R1(P,A,H);return P.query[CN]=this.getCanonicalHeaderList(a),P.query[cN]=await this.getSignature(J,L,this.getSigningKey(S,D,Z,F),this.createCanonicalRequest(P,a,await s0(f,this.sha256))),P}async sign(f,R){if(typeof f==="string")return this.signString(f,R);else if(f.headers&&f.payload)return this.signEvent(f,R);else if(f.message)return this.signMessage(f,R);else return this.signRequest(f,R)}async signEvent({headers:f,payload:R},{signingDate:h=new Date,priorSignature:$,signingRegion:A,signingService:G}){let H=A??await this.regionProvider(),{shortDate:N,longDate:U}=this.formatDate(h),F=f1(N,H,G??this.service),S=await s0({headers:{},body:R},this.sha256),D=new this.sha256;D.update(f);let J=G1.toHex(await D.digest()),Z=[rN,U,F,$,J,S].join(`
53
+ `);return this.signString(Z,{signingDate:h,signingRegion:H,signingService:G})}async signMessage(f,{signingDate:R=new Date,signingRegion:h,signingService:$}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:R,signingRegion:h,signingService:$,priorSignature:f.priorSignature}).then((G)=>{return{message:f.message,signature:G}})}async signString(f,{signingDate:R=new Date,signingRegion:h,signingService:$}={}){let A=await this.credentialProvider();this.validateResolvedCredentials(A);let G=h??await this.regionProvider(),{shortDate:H}=this.formatDate(R),N=new this.sha256(await this.getSigningKey(A,G,H,$));return N.update(If(f)),G1.toHex(await N.digest())}async signRequest(f,{signingDate:R=new Date,signableHeaders:h,unsignableHeaders:$,signingRegion:A,signingService:G}={}){let H=await this.credentialProvider();this.validateResolvedCredentials(H);let N=A??await this.regionProvider(),U=$1(f),{longDate:F,shortDate:S}=this.formatDate(R),D=f1(S,N,G??this.service);if(U.headers[FA]=F,H.sessionToken)U.headers[lN]=H.sessionToken;let J=await s0(U,this.sha256);if(!ZA(k0,U.headers)&&this.applyChecksum)U.headers[k0]=J;let Z=R1(U,$,h),L=await this.getSignature(F,D,this.getSigningKey(H,N,S,G),this.createCanonicalRequest(U,Z,J));return U.headers[xN]=`${uh} Credential=${H.accessKeyId}/${D}, SignedHeaders=${this.getCanonicalHeaderList(Z)}, Signature=${L}`,U}async getSignature(f,R,h,$){let A=await this.createStringToSign(f,R,$,uh),G=new this.sha256(await h);return G.update(If(A)),G1.toHex(await G.digest())}getSigningKey(f,R,h,$){return uN(this.sha256,f,h,R,$||this.service)}}var A6="Directory",G6="S3Express",H6="sigv4-s3express",H1="X-Amz-S3session-Token",_0=H1.toLowerCase(),uY="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",tY="s3_disable_express_session_auth",QA={environmentVariableSelector:(f)=>KR(f,uY,vR.ENV),configFileSelector:(f)=>KR(f,tY,vR.CONFIG),default:!1};class N1 extends zA{async signWithCredentials(f,R,h){let $=N6(R);f.headers[_0]=R.sessionToken;let A=this;return U6(A,$),A.signRequest(f,h??{})}async presignWithCredentials(f,R,h){let $=N6(R);return delete f.headers[_0],f.headers[H1]=R.sessionToken,f.query=f.query??{},f.query[H1]=R.sessionToken,U6(this,$),this.presign(f,h)}}function N6(f){return{accessKeyId:f.accessKeyId,secretAccessKey:f.secretAccessKey,expiration:f.expiration}}function U6(f,R){let h=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),$=f.credentialProvider,A=()=>{return clearTimeout(h),f.credentialProvider=$,Promise.resolve(R)};f.credentialProvider=A}var F6=v(qR(),1);var W6=(f)=>{return(R,h)=>async($)=>{if(h.endpointV2){let A=h.endpointV2,G=A.properties?.authSchemes?.[0]?.name===H6;if(A.properties?.backend===G6||A.properties?.bucketType===A6)F6.setFeature(h,"S3_EXPRESS_BUCKET","J"),h.isS3ExpressBucket=!0;if(G){let N=$.input.Bucket;if(N){let U=await f.s3ExpressIdentityProvider.getS3ExpressIdentity(await f.credentials(),{Bucket:N});if(h.s3ExpressIdentity=U,Ff.isInstance($.request)&&U.sessionToken)$.request.headers[_0]=U.sessionToken}}}return R($)}},S6={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},wA=(f)=>({applyToStack:(R)=>{R.add(W6(f),S6)}});var D6=v(LA(),1);var RD=v(fD(),1),Z6=v(oh(),1);var Y6=async(f,R,h,$)=>{let A=await $.signWithCredentials(h,f,{});if(A.headers["X-Amz-Security-Token"]||A.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return A};var hD=(f)=>(R)=>{throw R},$D=(f,R)=>{};var M6=(f)=>(R,h)=>async($)=>{if(!Ff.isInstance($.request))return R($);let G=Z6.getSmithyContext(h).selectedHttpAuthScheme;if(!G)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:H={}},identity:N,signer:U}=G,F;if(h.s3ExpressIdentity)F=await Y6(h.s3ExpressIdentity,H,$.request,await f.signer());else F=await U.sign($.request,N,H);let S=await R({...$,request:F}).catch((U.errorHandler||hD)(H));return(U.successHandler||$D)(S.response,H),S},IA=(f)=>({applyToStack:(R)=>{R.addRelativeTo(M6(f),D6.httpSigningMiddlewareOptions)}});var J6=(f,{session:R})=>{let[h,$]=R,{forcePathStyle:A,useAccelerateEndpoint:G,disableMultiregionAccessPoints:H,followRegionRedirects:N,s3ExpressIdentityProvider:U,bucketEndpoint:F}=f;return Object.assign(f,{forcePathStyle:A??!1,useAccelerateEndpoint:G??!1,disableMultiregionAccessPoints:H??!1,followRegionRedirects:N??!1,s3ExpressIdentityProvider:U??new x0(async(S)=>h().send(new $({Bucket:S}))),bucketEndpoint:F??!1})};var AD={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},GD=3000,HD=(f)=>(R,h)=>async($)=>{let A=await R($),{response:G}=A;if(!eh.isInstance(G))return A;let{statusCode:H,body:N}=G;if(H<200||H>=300)return A;if(!(typeof N?.stream==="function"||typeof N?.pipe==="function"||typeof N?.tee==="function"))return A;let F=N,S=N;if(N&&typeof N==="object"&&!(N instanceof Uint8Array))[F,S]=await z6(N);G.body=S;let D=await ND(F,{streamCollector:async(Z)=>{return X6(Z,GD)}});if(typeof F?.destroy==="function")F.destroy();let J=f.utf8Encoder(D.subarray(D.length-16));if(D.length===0&&AD[h.commandName]){let Z=new Error("S3 aborted request");throw Z.name="InternalError",Z}if(J&&J.endsWith("</Error>"))G.statusCode=400;return A},ND=(f=new Uint8Array,R)=>{if(f instanceof Uint8Array)return Promise.resolve(f);return R.streamCollector(f)||Promise.resolve(new Uint8Array)},UD={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},oR=(f)=>({applyToStack:(R)=>{R.addRelativeTo(HD(f),UD)}});var PA=(f)=>typeof f==="string"&&f.indexOf("arn:")===0&&f.split(":").length>=6;function Q6(f){return(R,h)=>async($)=>{if(f.bucketEndpoint){let A=h.endpointV2;if(A){let G=$.input.Bucket;if(typeof G==="string")try{let H=new URL(G);h.endpointV2={...A,url:H}}catch(H){let N=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${G} could not be parsed as URL.`;if(h.logger?.constructor?.name==="NoOpLogger")console.warn(N);else h.logger?.warn?.(N);throw H}}}return R($)}}var w6={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function FD({bucketEndpoint:f}){return(R)=>async(h)=>{let{input:{Bucket:$}}=h;if(!f&&typeof $==="string"&&!PA($)&&$.indexOf("/")>=0){let A=new Error(`Bucket name shouldn't contain '/', received '${$}'`);throw A.name="InvalidBucketName",A}return R({...h})}}var WD={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},L6=(f)=>({applyToStack:(R)=>{R.add(FD(f),WD),R.addRelativeTo(Q6(f),w6)}});var A0=v(LA(),1);var I6=(f)=>Object.assign(f,{eventStreamMarshaller:f.eventStreamSerdeProvider(f)});var D1=v(qR(),1);var U1={CrtSignerV4:null};class qA{sigv4aSigner;sigv4Signer;signerOptions;constructor(f){this.sigv4Signer=new N1(f),this.signerOptions=f}async sign(f,R={}){if(R.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(f,R)}return this.sigv4Signer.sign(f,R)}async signWithCredentials(f,R,h={}){if(h.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(f,R,h)}return this.sigv4Signer.signWithCredentials(f,R,h)}async presign(f,R={}){if(R.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(f,R)}return this.sigv4Signer.presign(f,R)}async presignWithCredentials(f,R,h={}){if(h.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(f,R,h)}getSigv4aSigner(){if(!this.sigv4aSigner){let f=null;try{if(f=U1.CrtSignerV4,typeof f!=="function")throw new Error}catch(R){throw R.message=`${R.message}
54
54
  Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly.
55
55
  You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";].
56
- For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,R}this.sigv4aSigner=new f({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}var R0=O(nh(),1);var eR={["required"]:!1,["type"]:"String"},uR={["required"]:!0,default:!1,["type"]:"Boolean"},a0={["required"]:!1,["type"]:"Boolean"},yf={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},x={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},c={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},r={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},q3={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},P6={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},i0={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},y={["ref"]:"Bucket"},q6={["conditions"]:[c],["error"]:"S3Express does not support Dual-stack.",["type"]:"error"},B6={["conditions"]:[yf],["error"]:"S3Express does not support S3 Accelerate.",["type"]:"error"},K6={["conditions"]:[r,{["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"}],["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},Mf={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},BA={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},B3={["ref"]:"url"},K3={["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"},jR={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},Q={},v3={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]},v6={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},y6={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},j6={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},w={["fn"]:"not",["argv"]:[r]},W1={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},O6={["fn"]:"not",["argv"]:[i0]},E6={["ref"]:"hardwareType"},V6={["conditions"]:[w],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},S1={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},KA={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},ND={["ref"]:"ForcePathStyle"},o={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},e={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},t={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},v={["fn"]:"not",["argv"]:[e]},ff={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},T6={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},n={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},Rf={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},B={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},g6={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},q={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},C6={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},m6={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},vA={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[B3,"isIp"]},!1]},yA={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:n,["headers"]:{}},rA={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:n,["headers"]:{}},c6={["endpoint"]:rA,["type"]:"endpoint"},jA={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},b6={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},Y1={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},Xf={["ref"]:"bucketArn"},y3={["ref"]:"arnType"},OA={["fn"]:"getAttr",["argv"]:[Xf,"service"]},iA={["ref"]:"accessPointName"},x6={["conditions"]:[c],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},k6={["conditions"]:[yf],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},s6={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},EA={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},j3={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},O3={["fn"]:"getAttr",["argv"]:[Xf,"accountId"]},VA={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},l6={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},TA={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},gA={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},CA={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},_6={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},d6={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},r0={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},a6={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},r6={["fn"]:"aws.parseArn",["argv"]:[y]},i6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},p6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},o6={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},mA={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},n6={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},e6={["ref"]:"UseObjectLambdaEndpoint"},cA={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},u6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},t6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},f3={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},bA={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:n,["headers"]:{}},R3={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},xA=[{["ref"]:"Region"}],UD=[{["ref"]:"Endpoint"}],FD=[y],h3=[c],kA=[yf],tR=[r,Mf],$3=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],WD=[K3],A3=[v3],vf=[q3],f0=[x],G3=[{["fn"]:"substring",["argv"]:[y,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],lf=[{["conditions"]:[x],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:jR,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:jR,["headers"]:{}},["type"]:"endpoint"}],H3=[{["fn"]:"substring",["argv"]:[y,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],N3=[{["fn"]:"substring",["argv"]:[y,6,19,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,19,21,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],U3=[{["fn"]:"substring",["argv"]:[y,6,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],F3=[{["fn"]:"substring",["argv"]:[y,6,26,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,26,28,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],_f=[{["conditions"]:[x],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],W3=[y,0,7,!0],S3=[{["fn"]:"substring",["argv"]:[y,7,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Y3=[{["fn"]:"substring",["argv"]:[y,7,16,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,16,18,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],D3=[{["fn"]:"substring",["argv"]:[y,7,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Z3=[{["fn"]:"substring",["argv"]:[y,7,21,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,21,23,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],M3=[{["fn"]:"substring",["argv"]:[y,7,27,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,27,29,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],SD=[i0],J3=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],X3=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],YD=["*"],z3=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],RR=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],sA=[{["fn"]:"stringEquals",["argv"]:[y3,"accesspoint"]}],Q3=[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[iA,""]}]}],DD=[Xf,"resourceId[1]"],lA=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},""]}]}],w3=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[2]"]}]}]}],ZD=[Xf,"resourceId[2]"],_A=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]}],["assign"]:"bucketPartition"}],L3=[{["fn"]:"stringEquals",["argv"]:[j3,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],dA=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},!0]}],aA=[{["fn"]:"isValidHostLabel",["argv"]:[O3,!1]}],I3=[{["fn"]:"isValidHostLabel",["argv"]:[iA,!1]}],P3=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],MD={version:"1.0",parameters:{Bucket:eR,Region:eR,UseFIPS:uR,UseDualStack:uR,Endpoint:eR,ForcePathStyle:uR,Accelerate:uR,UseGlobalEndpoint:uR,UseObjectLambdaEndpoint:a0,Key:eR,Prefix:eR,CopySource:eR,DisableAccessPoints:a0,DisableMultiRegionAccessPoints:uR,UseArnRegion:a0,UseS3ExpressControlEndpoint:a0,DisableS3ExpressSessionAuth:a0},["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:xA}],["rules"]:[{["conditions"]:[yf,x],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[c,r],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[r,x],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[r,yf],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[x,q3,P6],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[i0,{["fn"]:"substring",["argv"]:[y,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],["rules"]:[q6,B6,K6,{["conditions"]:[y6,j6],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:[K3,w],["rules"]:[{["conditions"]:f0,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:jR,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:jR,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:A3,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:$3,["rules"]:[{["conditions"]:G3,["rules"]:lf,["type"]:"tree"},{["conditions"]:H3,["rules"]:lf,["type"]:"tree"},{["conditions"]:N3,["rules"]:lf,["type"]:"tree"},{["conditions"]:U3,["rules"]:lf,["type"]:"tree"},{["conditions"]:F3,["rules"]:lf,["type"]:"tree"},W1],["type"]:"tree"},{["conditions"]:G3,["rules"]:_f,["type"]:"tree"},{["conditions"]:H3,["rules"]:_f,["type"]:"tree"},{["conditions"]:N3,["rules"]:_f,["type"]:"tree"},{["conditions"]:U3,["rules"]:_f,["type"]:"tree"},{["conditions"]:F3,["rules"]:_f,["type"]:"tree"},W1],["type"]:"tree"}],["type"]:"tree"},v6],["type"]:"tree"},{["conditions"]:[i0,{["fn"]:"substring",["argv"]:W3,["assign"]:"accessPointSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"accessPointSuffix"},"--xa-s3"]}],["rules"]:[q6,B6,K6,{["conditions"]:A3,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:$3,["rules"]:[{["conditions"]:S3,["rules"]:lf,["type"]:"tree"},{["conditions"]:Y3,["rules"]:lf,["type"]:"tree"},{["conditions"]:D3,["rules"]:lf,["type"]:"tree"},{["conditions"]:Z3,["rules"]:lf,["type"]:"tree"},{["conditions"]:M3,["rules"]:lf,["type"]:"tree"},W1],["type"]:"tree"},{["conditions"]:S3,["rules"]:_f,["type"]:"tree"},{["conditions"]:Y3,["rules"]:_f,["type"]:"tree"},{["conditions"]:D3,["rules"]:_f,["type"]:"tree"},{["conditions"]:Z3,["rules"]:_f,["type"]:"tree"},{["conditions"]:M3,["rules"]:_f,["type"]:"tree"},W1],["type"]:"tree"}],["type"]:"tree"},v6],["type"]:"tree"},{["conditions"]:[O6,y6,j6],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:tR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:jR,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:f0,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:jR,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",["properties"]:jR,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[i0,{["fn"]:"substring",["argv"]:[y,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[y,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:W3,["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[y,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:xA,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],["rules"]:[{["conditions"]:J3,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[E6,"e"]}],["rules"]:[{["conditions"]:X3,["rules"]:[V6,{["conditions"]:tR,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:S1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:S1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[E6,"o"]}],["rules"]:[{["conditions"]:X3,["rules"]:[V6,{["conditions"]:tR,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:S1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:S1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:SD,["rules"]:[{["conditions"]:[r,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:UD}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[KA,v3],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:z3,["rules"]:[{["conditions"]:[yf,P6],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[c,x,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,x,o,w,v,ff],["rules"]:[{endpoint:T6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,x,o,w,v,Rf],endpoint:T6,["type"]:"endpoint"},{["conditions"]:[B,x,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,x,o,w,v,ff],["rules"]:[{endpoint:g6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,x,o,w,v,Rf],endpoint:g6,["type"]:"endpoint"},{["conditions"]:[c,q,yf,w,e],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,q,yf,w,v,ff],["rules"]:[{endpoint:C6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,q,yf,w,v,Rf],endpoint:C6,["type"]:"endpoint"},{["conditions"]:[c,q,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,q,o,w,v,ff],["rules"]:[{endpoint:m6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,q,o,w,v,Rf],endpoint:m6,["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,BA,e],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,vA,e],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,BA,v,ff],["rules"]:[{["conditions"]:RR,endpoint:yA,["type"]:"endpoint"},{endpoint:yA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,q,o,r,Mf,vA,v,ff],["rules"]:[{["conditions"]:RR,endpoint:rA,["type"]:"endpoint"},c6],["type"]:"tree"},{["conditions"]:[B,q,o,r,Mf,BA,v,Rf],endpoint:yA,["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,vA,v,Rf],endpoint:rA,["type"]:"endpoint"},{["conditions"]:[B,q,yf,w,e],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,yf,w,v,ff],["rules"]:[{["conditions"]:RR,endpoint:jA,["type"]:"endpoint"},{endpoint:jA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,q,yf,w,v,Rf],endpoint:jA,["type"]:"endpoint"},{["conditions"]:[B,q,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,o,w,v,ff],["rules"]:[{["conditions"]:RR,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:Q},["type"]:"endpoint"},{endpoint:b6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,q,o,w,v,Rf],endpoint:b6,["type"]:"endpoint"}],["type"]:"tree"},Y1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[r,Mf,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[B3,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!0]},KA,q,B,o],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:z3,["rules"]:[c6],["type"]:"tree"},Y1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[KA,{["fn"]:"aws.parseArn",["argv"]:FD,["assign"]:"bucketArn"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[y3,""]}]}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[OA,"s3-object-lambda"]}],["rules"]:[{["conditions"]:sA,["rules"]:[{["conditions"]:Q3,["rules"]:[x6,k6,{["conditions"]:lA,["rules"]:[s6,{["conditions"]:w3,["rules"]:[EA,{["conditions"]:_A,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:L3,["rules"]:[{["conditions"]:dA,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[O3,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:aA,["rules"]:[{["conditions"]:I3,["rules"]:[{["conditions"]:tR,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:VA,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:f0,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:VA,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:VA,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},l6],["type"]:"tree"},TA],["type"]:"tree"},gA],["type"]:"tree"},CA],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},_6],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},d6],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:sA,["rules"]:[{["conditions"]:Q3,["rules"]:[{["conditions"]:lA,["rules"]:[{["conditions"]:sA,["rules"]:[{["conditions"]:lA,["rules"]:[s6,{["conditions"]:w3,["rules"]:[EA,{["conditions"]:_A,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[j3,"{partitionResult#name}"]}],["rules"]:[{["conditions"]:dA,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[OA,"s3"]}],["rules"]:[{["conditions"]:aA,["rules"]:[{["conditions"]:I3,["rules"]:[{["conditions"]:kA,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[x,c],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:r0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[x,B],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:r0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,c],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:r0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B,r,Mf],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:r0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:r0,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},l6],["type"]:"tree"},TA],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},gA],["type"]:"tree"},CA],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},_6],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[iA,!0]}],["rules"]:[{["conditions"]:h3,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:f0,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:kA,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:xA,["assign"]:"mrapPartition"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[Xf,"partition"]}]}],["rules"]:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:YD}]},["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},d6],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[OA,"s3-outposts"]}],["rules"]:[{["conditions"]:h3,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:f0,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:kA,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:DD,["assign"]:"outpostId"}],["rules"]:[{["conditions"]:J3,["rules"]:[EA,{["conditions"]:_A,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:L3,["rules"]:[{["conditions"]:dA,["rules"]:[{["conditions"]:aA,["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:ZD,["assign"]:"outpostType"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[3]"],["assign"]:"accessPointName"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],["rules"]:[{["conditions"]:tR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:a6,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:a6,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},TA],["type"]:"tree"},gA],["type"]:"tree"},CA],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[y,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[r6]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[ND,!0]},r6],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:WD,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:[o],["rules"]:[{["conditions"]:[c,w,x,e],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,w,x,v,ff],["rules"]:[{endpoint:i6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,w,x,v,Rf],endpoint:i6,["type"]:"endpoint"},{["conditions"]:[B,w,x,e],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,w,x,v,ff],["rules"]:[{endpoint:p6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,w,x,v,Rf],endpoint:p6,["type"]:"endpoint"},{["conditions"]:[c,w,q,e],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,w,q,v,ff],["rules"]:[{endpoint:o6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,w,q,v,Rf],endpoint:o6,["type"]:"endpoint"},{["conditions"]:[B,r,Mf,q,e],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,r,Mf,q,v,ff],["rules"]:[{["conditions"]:RR,endpoint:mA,["type"]:"endpoint"},{endpoint:mA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,r,Mf,q,v,Rf],endpoint:mA,["type"]:"endpoint"},{["conditions"]:[B,w,q,e],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,w,q,v,ff],["rules"]:[{["conditions"]:RR,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:Q},["type"]:"endpoint"},{endpoint:n6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,w,q,v,Rf],endpoint:n6,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[e6]},{["fn"]:"booleanEquals",["argv"]:[e6,!0]}],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:P3,["rules"]:[x6,k6,{["conditions"]:tR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:cA,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:f0,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:cA,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:cA,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},Y1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[O6],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:P3,["rules"]:[{["conditions"]:[x,c,w,e],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[x,c,w,v,ff],["rules"]:[{endpoint:u6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[x,c,w,v,Rf],endpoint:u6,["type"]:"endpoint"},{["conditions"]:[x,B,w,e],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[x,B,w,v,ff],["rules"]:[{endpoint:t6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[x,B,w,v,Rf],endpoint:t6,["type"]:"endpoint"},{["conditions"]:[q,c,w,e],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,c,w,v,ff],["rules"]:[{endpoint:f3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[q,c,w,v,Rf],endpoint:f3,["type"]:"endpoint"},{["conditions"]:[q,B,r,Mf,e],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B,r,Mf,v,ff],["rules"]:[{["conditions"]:RR,endpoint:bA,["type"]:"endpoint"},{endpoint:bA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[q,B,r,Mf,v,Rf],endpoint:bA,["type"]:"endpoint"},{["conditions"]:[q,B,w,e],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B,w,v,ff],["rules"]:[{["conditions"]:RR,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:Q},["type"]:"endpoint"},{endpoint:R3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[q,B,w,v,Rf],endpoint:R3,["type"]:"endpoint"}],["type"]:"tree"},Y1],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},E3=MD;var JD=new V3({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),D1=(f,R={})=>{return JD.get(f,()=>g3(E3,{endpointParams:f,logger:R.logger}))};T3.aws=C3;var XD=(f)=>async(R,h,$)=>{if(!$)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let A=await f(R,h,$),G=R0.getSmithyContext(h)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!G)throw new Error(`getEndpointParameterInstructions() is not defined on \`${h.commandName}\``);let H=await m3($,{getEndpointParameterInstructions:G},R);return Object.assign(A,H)},zD=async(f,R,h)=>{return{operation:R0.getSmithyContext(R).operation,region:await R0.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},c3=XD(zD);function b3(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}function x3(f){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}var QD=(f,R,h)=>{return(A)=>{let H=f(A).properties?.authSchemes;if(!H)return R(A);let N=[];for(let U of H){let{name:F,properties:S={},...D}=U,J=F.toLowerCase();if(F!==J)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${F}\` to \`${J}\``);let Z;if(J==="sigv4a"){Z="aws.auth#sigv4a";let a=H.find((gf)=>{let Cf=gf.name.toLowerCase();return Cf!=="sigv4a"&&Cf.startsWith("sigv4")});if(!F1.CrtSignerV4&&a)continue}else if(J.startsWith("sigv4"))Z="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${J}\``);let L=h[Z];if(!L)throw new Error(`Could not find HttpAuthOption create function for \`${Z}\``);let P=L(A);P.schemeId=Z,P.signingProperties={...P.signingProperties||{},...D,...S},N.push(P)}return N}},wD=(f)=>{let R=[];switch(f.operation){default:R.push(b3(f)),R.push(x3(f))}return R},k3=QD(D1,wD,{"aws.auth#sigv4":b3,"aws.auth#sigv4a":x3}),s3=(f)=>{let R=Z1.resolveAwsSdkSigV4Config(f),h=Z1.resolveAwsSdkSigV4AConfig(R);return Object.assign(h,{authSchemePreference:R0.normalizeProvider(f.authSchemePreference??[])})};var l3=(f)=>{return Object.assign(f,{useFipsEndpoint:f.useFipsEndpoint??!1,useDualstackEndpoint:f.useDualstackEndpoint??!1,forcePathStyle:f.forcePathStyle??!1,useAccelerateEndpoint:f.useAccelerateEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,disableMultiregionAccessPoints:f.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"})},hR={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class u extends _3{constructor(f){super(f);Object.setPrototypeOf(this,u.prototype)}}class M1 extends u{name="NoSuchUpload";$fault="client";constructor(f){super({name:"NoSuchUpload",$fault:"client",...f});Object.setPrototypeOf(this,M1.prototype)}}class J1 extends u{name="ObjectNotInActiveTierError";$fault="client";constructor(f){super({name:"ObjectNotInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,J1.prototype)}}class X1 extends u{name="BucketAlreadyExists";$fault="client";constructor(f){super({name:"BucketAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,X1.prototype)}}class z1 extends u{name="BucketAlreadyOwnedByYou";$fault="client";constructor(f){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...f});Object.setPrototypeOf(this,z1.prototype)}}class Q1 extends u{name="NoSuchBucket";$fault="client";constructor(f){super({name:"NoSuchBucket",$fault:"client",...f});Object.setPrototypeOf(this,Q1.prototype)}}var pA;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(pA||(pA={}));var oA;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.AccessPointArn!==void 0)return h.AccessPointArn(R.AccessPointArn);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(oA||(oA={}));class w1 extends u{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(f){super({name:"InvalidObjectState",$fault:"client",...f});Object.setPrototypeOf(this,w1.prototype),this.StorageClass=f.StorageClass,this.AccessTier=f.AccessTier}}class L1 extends u{name="NoSuchKey";$fault="client";constructor(f){super({name:"NoSuchKey",$fault:"client",...f});Object.setPrototypeOf(this,L1.prototype)}}class I1 extends u{name="NotFound";$fault="client";constructor(f){super({name:"NotFound",$fault:"client",...f});Object.setPrototypeOf(this,I1.prototype)}}var LD=(f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:Jf},...f.SessionToken&&{SessionToken:Jf}}),d3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf},...f.Credentials&&{Credentials:LD(f.Credentials)}}),a3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf}});var r3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf}}),i3=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:Jf}});var TR=O(BR(),1);var fh=O(LA(),1);class P1 extends u{name="EncryptionTypeMismatch";$fault="client";constructor(f){super({name:"EncryptionTypeMismatch",$fault:"client",...f});Object.setPrototypeOf(this,P1.prototype)}}class q1 extends u{name="InvalidRequest";$fault="client";constructor(f){super({name:"InvalidRequest",$fault:"client",...f});Object.setPrototypeOf(this,q1.prototype)}}class B1 extends u{name="InvalidWriteOffset";$fault="client";constructor(f){super({name:"InvalidWriteOffset",$fault:"client",...f});Object.setPrototypeOf(this,B1.prototype)}}class K1 extends u{name="TooManyParts";$fault="client";constructor(f){super({name:"TooManyParts",$fault:"client",...f});Object.setPrototypeOf(this,K1.prototype)}}class v1 extends u{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(f){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,v1.prototype)}}var p3;(function(f){f.visit=(R,h)=>{if(R.Records!==void 0)return h.Records(R.Records);if(R.Stats!==void 0)return h.Stats(R.Stats);if(R.Progress!==void 0)return h.Progress(R.Progress);if(R.Cont!==void 0)return h.Cont(R.Cont);if(R.End!==void 0)return h.End(R.End);return h._(R.$unknown[0],R.$unknown[1])}})(p3||(p3={}));var o3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf}}),n3=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:Jf},...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf}});var S4=async(f,R)=>{let h=fh.requestBuilder(f,R),$=k({},zf,{[d7]:f[M7],[$h]:f[Rh],[Ah]:f[hh],[_1]:f[l1],[AR]:[()=>zf(f[VR]),()=>f[VR].toString()]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let A=k({[x7]:[,""]}),G;return h.m("GET").h($).q(A).b(G),h.build()};var Y4=async(f,R)=>{let h=fh.requestBuilder(f,R),$=k({},zf,{[m4]:f[q4],[K7]:[()=>zf(f[e3]),()=>o0(f[e3]).toString()],[c4]:f[B4],[v7]:[()=>zf(f[u3]),()=>o0(f[u3]).toString()],[V7]:f[H7],[d1]:f[k1],[_4]:f[y4],[a1]:f[s1],[C8]:f[K8],[T8]:f[q8],[_7]:f[iD]});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let A=k({[r4]:[,"GetObject"],[T7]:[,f[N7]],[g7]:[,f[U7]],[C7]:[,f[F7]],[m7]:[,f[W7]],[c7]:[,f[S7]],[b7]:[()=>f.ResponseExpires!==void 0,()=>o0(f[Y7]).toString()],[s7]:[,f[v8]],[O7]:[()=>f.PartNumber!==void 0,()=>f[G7].toString()]}),G;return h.m("GET").h($).q(A).b(G),h.build()};var D4=async(f,R)=>{let h=fh.requestBuilder(f,R),$=k({},zf,{[C8]:f[K8],[T8]:f[q8],[o7]:[()=>zf(f[t3]),()=>(f[t3]||[]).map(F4).join(", ")]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let A=k({[y7]:[,"2"],[I7]:[,f[E1]],[P7]:[,f[V1]],[j7]:[()=>f.MaxKeys!==void 0,()=>f[g1].toString()],[E7]:[,f[OR]],[L7]:[,f[O1]],[B7]:[()=>f.FetchOwner!==void 0,()=>f[uD].toString()],[k7]:[,f[C1]]}),G;return h.m("GET").h($).q(A).b(G),h.build()};var Z4=async(f,R)=>{let h=fh.requestBuilder(f,R),$=k({},zf,{[g4]:f[P4]||"application/octet-stream",[l7]:f[aD],[O4]:f[Q4],[E4]:f[w4],[V4]:f[L4],[T4]:f[I4],[M8]:[()=>zf(f[Y8]),()=>f[Y8].toString()],[Q7]:f[pD],[u7]:f[p0],[y8]:f[Q8],[j8]:f[w8],[O8]:f[L8],[E8]:f[I8],[V8]:f[P8],[J8]:[()=>zf(f[D8]),()=>o0(f[D8]).toString()],[m4]:f[q4],[c4]:f[B4],[a7]:f[tD],[r7]:f[f7],[i7]:f[R7],[p7]:f[h7],[fZ]:[()=>zf(f[f4]),()=>f[f4].toString()],[$h]:f[Rh],[l4]:f[$R],[a4]:f[j4],[d1]:f[k1],[_4]:f[y4],[a1]:f[s1],[Ah]:f[hh],[_1]:f[l1],[AR]:[()=>zf(f[VR]),()=>f[VR].toString()],[C8]:f[K8],[t7]:f[J7],[s4]:f[v4],[X8]:[()=>zf(f[Z8]),()=>W4(f[Z8]).toString()],[k4]:f[K4],[T8]:f[q8],...f.Metadata!==void 0&&Object.keys(f.Metadata).reduce((N,U)=>{return N[`x-amz-meta-${U.toLowerCase()}`]=f.Metadata[U],N},{})});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let A=k({[r4]:[,"PutObject"]}),G,H;if(f.Body!==void 0)H=f.Body,G=H;return h.m("PUT").h($).q(A).b(G),h.build()};var M4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return x1(f,R);let h=k({$metadata:Wf(f),[Rh]:[,f.headers[$h]],[hh]:[,f.headers[Ah]],[l1]:[,f.headers[_1]],[VR]:[()=>f.headers[AR]!==void 0,()=>ER(f.headers[AR])]}),$=of(z8(await TR.parseXmlBody(f.body,R)),"body");if($[uA]!=null)h[uA]=dD($[uA],R);return h};var J4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return x1(f,R);let h=k({$metadata:Wf(f),[nD]:[()=>f.headers[h4]!==void 0,()=>ER(f.headers[h4])],[rD]:[,f.headers[z7]],[u0]:[,f.headers[x4]],[Z7]:[,f.headers[n7]],[T1]:[()=>f.headers[R4]!==void 0,()=>of(b0(f.headers[R4]))],[Y8]:[()=>f.headers[M8]!==void 0,()=>b1(f.headers[M8])],[e0]:[,f.headers[C4]],[Q8]:[,f.headers[y8]],[w8]:[,f.headers[j8]],[L8]:[,f.headers[O8]],[I8]:[,f.headers[E8]],[P8]:[,f.headers[V8]],[n0]:[,f.headers[b4]],[$7]:[()=>f.headers[$4]!==void 0,()=>h0(f.headers[$4])],[v8]:[,f.headers[d4]],[Q4]:[,f.headers[O4]],[w4]:[,f.headers[E4]],[L4]:[,f.headers[V4]],[I4]:[,f.headers[T4]],[oD]:[,f.headers[w7]],[P4]:[,f.headers[g4]],[D8]:[()=>f.headers[J8]!==void 0,()=>of(b0(f.headers[J8]))],[eD]:[,f.headers[q7]],[j4]:[,f.headers[a4]],[Rh]:[,f.headers[$h]],[k1]:[,f.headers[d1]],[s1]:[,f.headers[a1]],[hh]:[,f.headers[Ah]],[VR]:[()=>f.headers[AR]!==void 0,()=>ER(f.headers[AR])],[$R]:[,f.headers[l4]],[B8]:[,f.headers[g8]],[D7]:[,f.headers[e7]],[A7]:[()=>f.headers[A4]!==void 0,()=>h0(f.headers[A4])],[X7]:[()=>f.headers[H4]!==void 0,()=>h0(f.headers[H4])],[v4]:[,f.headers[s4]],[Z8]:[()=>f.headers[X8]!==void 0,()=>of(t0(f.headers[X8]))],[K4]:[,f.headers[k4]],Metadata:[,Object.keys(f.headers).filter((A)=>A.startsWith("x-amz-meta-")).reduce((A,G)=>{return A[G.substring(11)]=f.headers[G],A},{})]}),$=f.body;return R.sdkStreamMixin($),h.Body=$,h};var X4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return x1(f,R);let h=k({$metadata:Wf(f),[B8]:[,f.headers[g8]]}),$=of(z8(await TR.parseXmlBody(f.body,R)),"body");if($.CommonPrefixes==="")h[y1]=[];else if($[y1]!=null)h[y1]=xD(c1($[y1]),R);if($.Contents==="")h[j1]=[];else if($[j1]!=null)h[j1]=sD(c1($[j1]),R);if($[O1]!=null)h[O1]=i($[O1]);if($[E1]!=null)h[E1]=i($[E1]);if($[V1]!=null)h[V1]=i($[V1]);if($[h8]!=null)h[h8]=ER($[h8]);if($[A8]!=null)h[A8]=h0($[A8]);if($[g1]!=null)h[g1]=h0($[g1]);if($[G8]!=null)h[G8]=i($[G8]);if($[H8]!=null)h[H8]=i($[H8]);if($[OR]!=null)h[OR]=i($[OR]);if($[C1]!=null)h[C1]=i($[C1]);return h};var z4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return x1(f,R);let h=k({$metadata:Wf(f),[u0]:[,f.headers[x4]],[e0]:[,f.headers[C4]],[Q8]:[,f.headers[y8]],[w8]:[,f.headers[j8]],[L8]:[,f.headers[O8]],[I8]:[,f.headers[E8]],[P8]:[,f.headers[V8]],[n0]:[,f.headers[b4]],[Rh]:[,f.headers[$h]],[v8]:[,f.headers[d4]],[k1]:[,f.headers[d1]],[s1]:[,f.headers[a1]],[hh]:[,f.headers[Ah]],[l1]:[,f.headers[_1]],[VR]:[()=>f.headers[AR]!==void 0,()=>ER(f.headers[AR])],[m1]:[()=>f.headers[G4]!==void 0,()=>b1(f.headers[G4])],[B8]:[,f.headers[g8]]});return await N4.collectBody(f.body,R),h};var x1=async(f,R)=>{let h={...f,body:await TR.parseXmlErrorBody(f.body,R)},$=TR.loadRestXmlErrorCode(f,h.body);switch($){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await VD(h,R);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await CD(h,R);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await qD(h,R);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await BD(h,R);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await OD(h,R);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await vD(h,R);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await ED(h,R);case"NotFound":case"com.amazonaws.s3#NotFound":throw await TD(h,R);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await KD(h,R);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await yD(h,R);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await jD(h,R);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await mD(h,R);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await gD(h,R);default:let A=h.body;return PD({output:f,parsedBody:A,errorCode:$})}},PD=U4(u),qD=async(f,R)=>{let h=k({}),$=f.body,A=new X1({$metadata:Wf(f),...h});return Qf(A,f.body)},BD=async(f,R)=>{let h=k({}),$=f.body,A=new z1({$metadata:Wf(f),...h});return Qf(A,f.body)},KD=async(f,R)=>{let h=k({}),$=f.body,A=new P1({$metadata:Wf(f),...h});return Qf(A,f.body)},vD=async(f,R)=>{let h=k({}),$=f.body;if($[eA]!=null)h[eA]=i($[eA]);if($[$R]!=null)h[$R]=i($[$R]);let A=new w1({$metadata:Wf(f),...h});return Qf(A,f.body)},yD=async(f,R)=>{let h=k({}),$=f.body,A=new q1({$metadata:Wf(f),...h});return Qf(A,f.body)},jD=async(f,R)=>{let h=k({}),$=f.body,A=new B1({$metadata:Wf(f),...h});return Qf(A,f.body)},OD=async(f,R)=>{let h=k({}),$=f.body,A=new Q1({$metadata:Wf(f),...h});return Qf(A,f.body)},ED=async(f,R)=>{let h=k({}),$=f.body,A=new L1({$metadata:Wf(f),...h});return Qf(A,f.body)},VD=async(f,R)=>{let h=k({}),$=f.body,A=new M1({$metadata:Wf(f),...h});return Qf(A,f.body)},TD=async(f,R)=>{let h=k({}),$=f.body,A=new I1({$metadata:Wf(f),...h});return Qf(A,f.body)},gD=async(f,R)=>{let h=k({}),$=f.body,A=new v1({$metadata:Wf(f),...h});return Qf(A,f.body)},CD=async(f,R)=>{let h=k({}),$=f.body,A=new J1({$metadata:Wf(f),...h});return Qf(A,f.body)},mD=async(f,R)=>{let h=k({}),$=f.body,A=new K1({$metadata:Wf(f),...h});return Qf(A,f.body)};var cD=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return i(h)})},bD=(f,R)=>{let h={};if(f[OR]!=null)h[OR]=i(f[OR]);return h},xD=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return bD(h,R)})};var kD=(f,R)=>{let h={};if(f[$8]!=null)h[$8]=i(f[$8]);if(f[T1]!=null)h[T1]=of(t0(f[T1]));if(f[e0]!=null)h[e0]=i(f[e0]);if(f.ChecksumAlgorithm==="")h[p0]=[];else if(f[p0]!=null)h[p0]=cD(c1(f[p0]),R);if(f[n0]!=null)h[n0]=i(f[n0]);if(f[m1]!=null)h[m1]=b1(f[m1]);if(f[$R]!=null)h[$R]=i(f[$R]);if(f[N8]!=null)h[N8]=lD(f[N8],R);if(f[F8]!=null)h[F8]=_D(f[F8],R);return h},sD=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return kD(h,R)})};var lD=(f,R)=>{let h={};if(f[tA]!=null)h[tA]=i(f[tA]);if(f[f8]!=null)h[f8]=i(f[f8]);return h};var _D=(f,R)=>{let h={};if(f[R8]!=null)h[R8]=ER(f[R8]);if(f[U8]!=null)h[U8]=of(t0(f[U8]));return h};var dD=(f,R)=>{let h={};if(f[nA]!=null)h[nA]=i(f[nA]);if(f[W8]!=null)h[W8]=i(f[W8]);if(f[S8]!=null)h[S8]=i(f[S8]);if(f[u0]!=null)h[u0]=of(t0(f[u0]));return h};var Wf=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var aD="ACL";var nA="AccessKeyId";var rD="AcceptRanges";var eA="AccessTier";var VR="BucketKeyEnabled";var uA="Credentials",p0="ChecksumAlgorithm";var Q4="CacheControl",Q8="ChecksumCRC32",w8="ChecksumCRC32C",L8="ChecksumCRC64NVME",w4="ContentDisposition";var L4="ContentEncoding";var I4="ContentLanguage",Y8="ContentLength",iD="ChecksumMode",pD="ContentMD5";var y1="CommonPrefixes";var oD="ContentRange";var I8="ChecksumSHA1",P8="ChecksumSHA256";var n0="ChecksumType",P4="ContentType";var O1="ContinuationToken";var j1="Contents";var E1="Delimiter";var nD="DeleteMarker";var tA="DisplayName";var D8="Expires";var q8="ExpectedBucketOwner";var eD="ExpiresString";var V1="EncodingType",e0="ETag";var u0="Expiration";var uD="FetchOwner";var tD="GrantFullControl";var f7="GrantRead",R7="GrantReadACP";var h7="GrantWriteACP";var f8="ID";var q4="IfMatch";var e3="IfModifiedSince",B4="IfNoneMatch";var R8="IsRestoreInProgress";var h8="IsTruncated";var u3="IfUnmodifiedSince";var $8="Key",A8="KeyCount";var T1="LastModified";var g1="MaxKeys";var $7="MissingMeta";var G8="Name";var H8="NextContinuationToken";var N8="Owner";var K4="ObjectLockLegalHoldStatus",v4="ObjectLockMode";var Z8="ObjectLockRetainUntilDate";var t3="OptionalObjectAttributes";var OR="Prefix";var A7="PartsCount";var G7="PartNumber";var H7="Range";var B8="RequestCharged",N7="ResponseCacheControl",U7="ResponseContentDisposition",F7="ResponseContentEncoding",W7="ResponseContentLanguage",S7="ResponseContentType";var Y7="ResponseExpires",U8="RestoreExpiryDate";var K8="RequestPayer";var D7="ReplicationStatus",F8="RestoreStatus";var Z7="Restore";var C1="StartAfter",W8="SecretAccessKey";var $R="StorageClass";var M7="SessionMode";var Rh="ServerSideEncryption";var k1="SSECustomerAlgorithm",y4="SSECustomerKey",s1="SSECustomerKeyMD5";var l1="SSEKMSEncryptionContext",hh="SSEKMSKeyId";var S8="SessionToken";var m1="Size";var J7="Tagging";var X7="TagCount";var v8="VersionId";var f4="WriteOffsetBytes",j4="WebsiteRedirectLocation";var z7="accept-ranges";var O4="cache-control",E4="content-disposition",V4="content-encoding",T4="content-language",M8="content-length",Q7="content-md5",w7="content-range",g4="content-type",L7="continuation-token";var I7="delimiter",J8="expires";var P7="encoding-type",C4="etag",q7="expiresstring",B7="fetch-owner";var m4="if-match",K7="if-modified-since";var c4="if-none-match";var v7="if-unmodified-since";var R4="last-modified";var y7="list-type";var j7="max-keys";var O7="partNumber";var E7="prefix";var V7="range",T7="response-cache-control",g7="response-content-disposition",C7="response-content-encoding",m7="response-content-language",c7="response-content-type",b7="response-expires";var x7="session",k7="start-after";var s7="versionId";var l7="x-amz-acl";var y8="x-amz-checksum-crc32",j8="x-amz-checksum-crc32c",O8="x-amz-checksum-crc64nvme",_7="x-amz-checksum-mode";var E8="x-amz-checksum-sha1",V8="x-amz-checksum-sha256";var d7="x-amz-create-session-mode";var b4="x-amz-checksum-type",h4="x-amz-delete-marker",x4="x-amz-expiration",T8="x-amz-expected-bucket-owner";var a7="x-amz-grant-full-control",r7="x-amz-grant-read",i7="x-amz-grant-read-acp";var p7="x-amz-grant-write-acp";var $4="x-amz-missing-meta";var A4="x-amz-mp-parts-count";var k4="x-amz-object-lock-legal-hold",s4="x-amz-object-lock-mode",X8="x-amz-object-lock-retain-until-date";var o7="x-amz-optional-object-attributes",G4="x-amz-object-size";var n7="x-amz-restore",g8="x-amz-request-charged";var C8="x-amz-request-payer";var e7="x-amz-replication-status";var l4="x-amz-storage-class",u7="x-amz-sdk-checksum-algorithm";var $h="x-amz-server-side-encryption",Ah="x-amz-server-side-encryption-aws-kms-key-id",AR="x-amz-server-side-encryption-bucket-key-enabled",_1="x-amz-server-side-encryption-context",d1="x-amz-server-side-encryption-customer-algorithm",_4="x-amz-server-side-encryption-customer-key",a1="x-amz-server-side-encryption-customer-key-md5",t7="x-amz-tagging",H4="x-amz-tagging-count";var d4="x-amz-version-id",fZ="x-amz-write-offset-bytes",a4="x-amz-website-redirect-location",r4="x-id";class m8 extends GR.classBuilder().ep({...hR,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(f,R,h,$){return[HR(h,this.serialize,this.deserialize),NR(h,f.getEndpointParameterInstructions()),nR(h)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(a3,d3).ser(S4).de(M4).build(){}var i4={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.797.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.796.0","@aws-sdk/credential-provider-node":"3.797.0","@aws-sdk/middleware-bucket-endpoint":"3.775.0","@aws-sdk/middleware-expect-continue":"3.775.0","@aws-sdk/middleware-flexible-checksums":"3.796.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-location-constraint":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-s3":"3.796.0","@aws-sdk/middleware-ssec":"3.775.0","@aws-sdk/middleware-user-agent":"3.796.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/signature-v4-multi-region":"3.796.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.787.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.796.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/eventstream-serde-browser":"^4.0.2","@smithy/eventstream-serde-config-resolver":"^4.1.0","@smithy/eventstream-serde-node":"^4.0.2","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-blob-browser":"^4.0.2","@smithy/hash-node":"^4.0.2","@smithy/hash-stream-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/md5-js":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-stream":"^4.2.0","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.796.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var e1=O(BR(),1);var p4="AWS_EC2_METADATA_DISABLED",o4=async(f)=>{let{ENV_CMDS_FULL_URI:R,ENV_CMDS_RELATIVE_URI:h,fromContainerMetadata:$,fromInstanceMetadata:A}=await import("../chunk-gvtcy7a2.js");if(process.env[h]||process.env[R]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:G}=await import("../chunk-f3ft8w3z.js");return r1(G(f),$(f))}if(process.env[p4]&&process.env[p4]!=="false")return async()=>{throw new $0("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),A(f)};var n4=!1,hU=(f={})=>e4(r1(async()=>{if(f.profile??process.env[u4]){if(process.env[t4]&&process.env[fU]){if(!n4)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
56
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,R}this.sigv4aSigner=new f({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}var f0=v(oh(),1);var nR={["required"]:!1,["type"]:"String"},eR={["required"]:!0,default:!1,["type"]:"Boolean"},d0={["required"]:!1,["type"]:"Boolean"},yf={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},x={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},c={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},r={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},q3={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},P6={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},r0={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},j={["ref"]:"Bucket"},q6={["conditions"]:[c],["error"]:"S3Express does not support Dual-stack.",["type"]:"error"},B6={["conditions"]:[yf],["error"]:"S3Express does not support S3 Accelerate.",["type"]:"error"},K6={["conditions"]:[r,{["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"}],["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[j],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[j,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[j],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[j,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},Mf={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},BA={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},B3={["ref"]:"url"},K3={["fn"]:"uriEncode",["argv"]:[j],["assign"]:"uri_encoded_bucket"},yR={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},Q={},v3={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[j,!1]},v6={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},y6={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},j6={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},w={["fn"]:"not",["argv"]:[r]},F1={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},O6={["fn"]:"not",["argv"]:[r0]},E6={["ref"]:"hardwareType"},V6={["conditions"]:[w],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},W1={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},KA={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},SD={["ref"]:"ForcePathStyle"},o={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},e={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},t={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},y={["fn"]:"not",["argv"]:[e]},ff={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},T6={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},n={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},Rf={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},B={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},g6={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},q={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},C6={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},m6={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},vA={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[B3,"isIp"]},!1]},yA={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:n,["headers"]:{}},rA={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:n,["headers"]:{}},c6={["endpoint"]:rA,["type"]:"endpoint"},jA={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},b6={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},S1={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},Xf={["ref"]:"bucketArn"},y3={["ref"]:"arnType"},OA={["fn"]:"getAttr",["argv"]:[Xf,"service"]},iA={["ref"]:"accessPointName"},x6={["conditions"]:[c],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},k6={["conditions"]:[yf],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},s6={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},EA={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},j3={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},O3={["fn"]:"getAttr",["argv"]:[Xf,"accountId"]},VA={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},l6={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},TA={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},gA={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},CA={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},_6={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},d6={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},a0={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},a6={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},r6={["fn"]:"aws.parseArn",["argv"]:[j]},i6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},p6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},o6={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},mA={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},n6={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:{}},e6={["ref"]:"UseObjectLambdaEndpoint"},cA={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},u6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},t6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},f3={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},bA={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:n,["headers"]:{}},R3={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:{}},xA=[{["ref"]:"Region"}],YD=[{["ref"]:"Endpoint"}],DD=[j],h3=[c],kA=[yf],uR=[r,Mf],$3=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],ZD=[K3],A3=[v3],vf=[q3],tR=[x],G3=[{["fn"]:"substring",["argv"]:[j,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],lf=[{["conditions"]:[x],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:yR,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:yR,["headers"]:{}},["type"]:"endpoint"}],H3=[{["fn"]:"substring",["argv"]:[j,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],N3=[{["fn"]:"substring",["argv"]:[j,6,19,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,19,21,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],U3=[{["fn"]:"substring",["argv"]:[j,6,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],F3=[{["fn"]:"substring",["argv"]:[j,6,26,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,26,28,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],_f=[{["conditions"]:[x],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],W3=[j,0,7,!0],S3=[{["fn"]:"substring",["argv"]:[j,7,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Y3=[{["fn"]:"substring",["argv"]:[j,7,16,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,16,18,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],D3=[{["fn"]:"substring",["argv"]:[j,7,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Z3=[{["fn"]:"substring",["argv"]:[j,7,21,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,21,23,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],M3=[{["fn"]:"substring",["argv"]:[j,7,27,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[j,27,29,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],MD=[r0],J3=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],X3=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],JD=["*"],z3=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],RR=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],sA=[{["fn"]:"stringEquals",["argv"]:[y3,"accesspoint"]}],Q3=[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[iA,""]}]}],XD=[Xf,"resourceId[1]"],lA=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},""]}]}],w3=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[2]"]}]}]}],zD=[Xf,"resourceId[2]"],_A=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]}],["assign"]:"bucketPartition"}],L3=[{["fn"]:"stringEquals",["argv"]:[j3,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],dA=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},!0]}],aA=[{["fn"]:"isValidHostLabel",["argv"]:[O3,!1]}],I3=[{["fn"]:"isValidHostLabel",["argv"]:[iA,!1]}],P3=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],QD={version:"1.0",parameters:{Bucket:nR,Region:nR,UseFIPS:eR,UseDualStack:eR,Endpoint:nR,ForcePathStyle:eR,Accelerate:eR,UseGlobalEndpoint:eR,UseObjectLambdaEndpoint:d0,Key:nR,Prefix:nR,CopySource:nR,DisableAccessPoints:d0,DisableMultiRegionAccessPoints:eR,UseArnRegion:d0,UseS3ExpressControlEndpoint:d0,DisableS3ExpressSessionAuth:d0},["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:xA}],["rules"]:[{["conditions"]:[yf,x],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[c,r],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[r,x],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[r,yf],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[x,q3,P6],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[r0,{["fn"]:"substring",["argv"]:[j,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],["rules"]:[q6,B6,K6,{["conditions"]:[y6,j6],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:[K3,w],["rules"]:[{["conditions"]:tR,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:yR,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:yR,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:A3,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:$3,["rules"]:[{["conditions"]:G3,["rules"]:lf,["type"]:"tree"},{["conditions"]:H3,["rules"]:lf,["type"]:"tree"},{["conditions"]:N3,["rules"]:lf,["type"]:"tree"},{["conditions"]:U3,["rules"]:lf,["type"]:"tree"},{["conditions"]:F3,["rules"]:lf,["type"]:"tree"},F1],["type"]:"tree"},{["conditions"]:G3,["rules"]:_f,["type"]:"tree"},{["conditions"]:H3,["rules"]:_f,["type"]:"tree"},{["conditions"]:N3,["rules"]:_f,["type"]:"tree"},{["conditions"]:U3,["rules"]:_f,["type"]:"tree"},{["conditions"]:F3,["rules"]:_f,["type"]:"tree"},F1],["type"]:"tree"}],["type"]:"tree"},v6],["type"]:"tree"},{["conditions"]:[r0,{["fn"]:"substring",["argv"]:W3,["assign"]:"accessPointSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"accessPointSuffix"},"--xa-s3"]}],["rules"]:[q6,B6,K6,{["conditions"]:A3,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:$3,["rules"]:[{["conditions"]:S3,["rules"]:lf,["type"]:"tree"},{["conditions"]:Y3,["rules"]:lf,["type"]:"tree"},{["conditions"]:D3,["rules"]:lf,["type"]:"tree"},{["conditions"]:Z3,["rules"]:lf,["type"]:"tree"},{["conditions"]:M3,["rules"]:lf,["type"]:"tree"},F1],["type"]:"tree"},{["conditions"]:S3,["rules"]:_f,["type"]:"tree"},{["conditions"]:Y3,["rules"]:_f,["type"]:"tree"},{["conditions"]:D3,["rules"]:_f,["type"]:"tree"},{["conditions"]:Z3,["rules"]:_f,["type"]:"tree"},{["conditions"]:M3,["rules"]:_f,["type"]:"tree"},F1],["type"]:"tree"}],["type"]:"tree"},v6],["type"]:"tree"},{["conditions"]:[O6,y6,j6],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:uR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:yR,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:tR,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:yR,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",["properties"]:yR,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[r0,{["fn"]:"substring",["argv"]:[j,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[j,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:W3,["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[j,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:xA,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],["rules"]:[{["conditions"]:J3,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[E6,"e"]}],["rules"]:[{["conditions"]:X3,["rules"]:[V6,{["conditions"]:uR,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:W1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:W1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[E6,"o"]}],["rules"]:[{["conditions"]:X3,["rules"]:[V6,{["conditions"]:uR,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:W1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:W1,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:MD,["rules"]:[{["conditions"]:[r,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:YD}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[KA,v3],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:z3,["rules"]:[{["conditions"]:[yf,P6],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[c,x,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,x,o,w,y,ff],["rules"]:[{endpoint:T6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,x,o,w,y,Rf],endpoint:T6,["type"]:"endpoint"},{["conditions"]:[B,x,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,x,o,w,y,ff],["rules"]:[{endpoint:g6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,x,o,w,y,Rf],endpoint:g6,["type"]:"endpoint"},{["conditions"]:[c,q,yf,w,e],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,q,yf,w,y,ff],["rules"]:[{endpoint:C6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,q,yf,w,y,Rf],endpoint:C6,["type"]:"endpoint"},{["conditions"]:[c,q,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,q,o,w,y,ff],["rules"]:[{endpoint:m6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,q,o,w,y,Rf],endpoint:m6,["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,BA,e],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,vA,e],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,BA,y,ff],["rules"]:[{["conditions"]:RR,endpoint:yA,["type"]:"endpoint"},{endpoint:yA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,q,o,r,Mf,vA,y,ff],["rules"]:[{["conditions"]:RR,endpoint:rA,["type"]:"endpoint"},c6],["type"]:"tree"},{["conditions"]:[B,q,o,r,Mf,BA,y,Rf],endpoint:yA,["type"]:"endpoint"},{["conditions"]:[B,q,o,r,Mf,vA,y,Rf],endpoint:rA,["type"]:"endpoint"},{["conditions"]:[B,q,yf,w,e],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,yf,w,y,ff],["rules"]:[{["conditions"]:RR,endpoint:jA,["type"]:"endpoint"},{endpoint:jA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,q,yf,w,y,Rf],endpoint:jA,["type"]:"endpoint"},{["conditions"]:[B,q,o,w,e],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,q,o,w,y,ff],["rules"]:[{["conditions"]:RR,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:Q},["type"]:"endpoint"},{endpoint:b6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,q,o,w,y,Rf],endpoint:b6,["type"]:"endpoint"}],["type"]:"tree"},S1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[r,Mf,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[B3,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[j,!0]},KA,q,B,o],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:z3,["rules"]:[c6],["type"]:"tree"},S1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[KA,{["fn"]:"aws.parseArn",["argv"]:DD,["assign"]:"bucketArn"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[y3,""]}]}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[OA,"s3-object-lambda"]}],["rules"]:[{["conditions"]:sA,["rules"]:[{["conditions"]:Q3,["rules"]:[x6,k6,{["conditions"]:lA,["rules"]:[s6,{["conditions"]:w3,["rules"]:[EA,{["conditions"]:_A,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:L3,["rules"]:[{["conditions"]:dA,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[O3,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:aA,["rules"]:[{["conditions"]:I3,["rules"]:[{["conditions"]:uR,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:VA,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:tR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:VA,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:VA,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},l6],["type"]:"tree"},TA],["type"]:"tree"},gA],["type"]:"tree"},CA],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},_6],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},d6],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:sA,["rules"]:[{["conditions"]:Q3,["rules"]:[{["conditions"]:lA,["rules"]:[{["conditions"]:sA,["rules"]:[{["conditions"]:lA,["rules"]:[s6,{["conditions"]:w3,["rules"]:[EA,{["conditions"]:_A,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[j3,"{partitionResult#name}"]}],["rules"]:[{["conditions"]:dA,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[OA,"s3"]}],["rules"]:[{["conditions"]:aA,["rules"]:[{["conditions"]:I3,["rules"]:[{["conditions"]:kA,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[x,c],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:a0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[x,B],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:a0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,c],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:a0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B,r,Mf],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:a0,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:a0,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},l6],["type"]:"tree"},TA],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},gA],["type"]:"tree"},CA],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},_6],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[iA,!0]}],["rules"]:[{["conditions"]:h3,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:tR,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:kA,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:xA,["assign"]:"mrapPartition"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[Xf,"partition"]}]}],["rules"]:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:JD}]},["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},d6],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[OA,"s3-outposts"]}],["rules"]:[{["conditions"]:h3,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:tR,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:kA,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:XD,["assign"]:"outpostId"}],["rules"]:[{["conditions"]:J3,["rules"]:[EA,{["conditions"]:_A,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:L3,["rules"]:[{["conditions"]:dA,["rules"]:[{["conditions"]:aA,["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:zD,["assign"]:"outpostType"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[3]"],["assign"]:"accessPointName"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],["rules"]:[{["conditions"]:uR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:a6,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:a6,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},TA],["type"]:"tree"},gA],["type"]:"tree"},CA],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[j,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[r6]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[SD,!0]},r6],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:ZD,["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:[o],["rules"]:[{["conditions"]:[c,w,x,e],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,w,x,y,ff],["rules"]:[{endpoint:i6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,w,x,y,Rf],endpoint:i6,["type"]:"endpoint"},{["conditions"]:[B,w,x,e],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,w,x,y,ff],["rules"]:[{endpoint:p6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,w,x,y,Rf],endpoint:p6,["type"]:"endpoint"},{["conditions"]:[c,w,q,e],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[c,w,q,y,ff],["rules"]:[{endpoint:o6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,w,q,y,Rf],endpoint:o6,["type"]:"endpoint"},{["conditions"]:[B,r,Mf,q,e],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,r,Mf,q,y,ff],["rules"]:[{["conditions"]:RR,endpoint:mA,["type"]:"endpoint"},{endpoint:mA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,r,Mf,q,y,Rf],endpoint:mA,["type"]:"endpoint"},{["conditions"]:[B,w,q,e],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[B,w,q,y,ff],["rules"]:[{["conditions"]:RR,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:n,["headers"]:Q},["type"]:"endpoint"},{endpoint:n6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[B,w,q,y,Rf],endpoint:n6,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[e6]},{["fn"]:"booleanEquals",["argv"]:[e6,!0]}],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:P3,["rules"]:[x6,k6,{["conditions"]:uR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:cA,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:tR,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:cA,["headers"]:Q},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:cA,["headers"]:Q},["type"]:"endpoint"}],["type"]:"tree"},S1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[O6],["rules"]:[{["conditions"]:vf,["rules"]:[{["conditions"]:P3,["rules"]:[{["conditions"]:[x,c,w,e],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[x,c,w,y,ff],["rules"]:[{endpoint:u6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[x,c,w,y,Rf],endpoint:u6,["type"]:"endpoint"},{["conditions"]:[x,B,w,e],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[x,B,w,y,ff],["rules"]:[{endpoint:t6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[x,B,w,y,Rf],endpoint:t6,["type"]:"endpoint"},{["conditions"]:[q,c,w,e],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,c,w,y,ff],["rules"]:[{endpoint:f3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[q,c,w,y,Rf],endpoint:f3,["type"]:"endpoint"},{["conditions"]:[q,B,r,Mf,e],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B,r,Mf,y,ff],["rules"]:[{["conditions"]:RR,endpoint:bA,["type"]:"endpoint"},{endpoint:bA,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[q,B,r,Mf,y,Rf],endpoint:bA,["type"]:"endpoint"},{["conditions"]:[q,B,w,e],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:Q},["type"]:"endpoint"},{["conditions"]:[q,B,w,y,ff],["rules"]:[{["conditions"]:RR,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:n,["headers"]:Q},["type"]:"endpoint"},{endpoint:R3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[q,B,w,y,Rf],endpoint:R3,["type"]:"endpoint"}],["type"]:"tree"},S1],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},E3=QD;var wD=new V3({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),Y1=(f,R={})=>{return wD.get(f,()=>g3(E3,{endpointParams:f,logger:R.logger}))};T3.aws=C3;var LD=(f)=>async(R,h,$)=>{if(!$)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let A=await f(R,h,$),G=f0.getSmithyContext(h)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!G)throw new Error(`getEndpointParameterInstructions() is not defined on \`${h.commandName}\``);let H=await m3($,{getEndpointParameterInstructions:G},R);return Object.assign(A,H)},ID=async(f,R,h)=>{return{operation:f0.getSmithyContext(R).operation,region:await f0.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},c3=LD(ID);function b3(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}function x3(f){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}var PD=(f,R,h)=>{return(A)=>{let H=f(A).properties?.authSchemes;if(!H)return R(A);let N=[];for(let U of H){let{name:F,properties:S={},...D}=U,J=F.toLowerCase();if(F!==J)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${F}\` to \`${J}\``);let Z;if(J==="sigv4a"){Z="aws.auth#sigv4a";let a=H.find((gf)=>{let Cf=gf.name.toLowerCase();return Cf!=="sigv4a"&&Cf.startsWith("sigv4")});if(!U1.CrtSignerV4&&a)continue}else if(J.startsWith("sigv4"))Z="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${J}\``);let L=h[Z];if(!L)throw new Error(`Could not find HttpAuthOption create function for \`${Z}\``);let P=L(A);P.schemeId=Z,P.signingProperties={...P.signingProperties||{},...D,...S},N.push(P)}return N}},qD=(f)=>{let R=[];switch(f.operation){default:R.push(b3(f)),R.push(x3(f))}return R},k3=PD(Y1,qD,{"aws.auth#sigv4":b3,"aws.auth#sigv4a":x3}),s3=(f)=>{let R=D1.resolveAwsSdkSigV4Config(f),h=D1.resolveAwsSdkSigV4AConfig(R);return Object.assign(h,{authSchemePreference:f0.normalizeProvider(f.authSchemePreference??[])})};var i4=v(a1(),1);var l3=(f)=>{return Object.assign(f,{useFipsEndpoint:f.useFipsEndpoint??!1,useDualstackEndpoint:f.useDualstackEndpoint??!1,forcePathStyle:f.forcePathStyle??!1,useAccelerateEndpoint:f.useAccelerateEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,disableMultiregionAccessPoints:f.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"})},hR={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class u extends _3{constructor(f){super(f);Object.setPrototypeOf(this,u.prototype)}}class Z1 extends u{name="NoSuchUpload";$fault="client";constructor(f){super({name:"NoSuchUpload",$fault:"client",...f});Object.setPrototypeOf(this,Z1.prototype)}}class M1 extends u{name="ObjectNotInActiveTierError";$fault="client";constructor(f){super({name:"ObjectNotInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,M1.prototype)}}class J1 extends u{name="BucketAlreadyExists";$fault="client";constructor(f){super({name:"BucketAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,J1.prototype)}}class X1 extends u{name="BucketAlreadyOwnedByYou";$fault="client";constructor(f){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...f});Object.setPrototypeOf(this,X1.prototype)}}class z1 extends u{name="NoSuchBucket";$fault="client";constructor(f){super({name:"NoSuchBucket",$fault:"client",...f});Object.setPrototypeOf(this,z1.prototype)}}var pA;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(pA||(pA={}));var oA;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.AccessPointArn!==void 0)return h.AccessPointArn(R.AccessPointArn);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(oA||(oA={}));class Q1 extends u{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(f){super({name:"InvalidObjectState",$fault:"client",...f});Object.setPrototypeOf(this,Q1.prototype),this.StorageClass=f.StorageClass,this.AccessTier=f.AccessTier}}class w1 extends u{name="NoSuchKey";$fault="client";constructor(f){super({name:"NoSuchKey",$fault:"client",...f});Object.setPrototypeOf(this,w1.prototype)}}class L1 extends u{name="NotFound";$fault="client";constructor(f){super({name:"NotFound",$fault:"client",...f});Object.setPrototypeOf(this,L1.prototype)}}var BD=(f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:Jf},...f.SessionToken&&{SessionToken:Jf}}),d3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf},...f.Credentials&&{Credentials:BD(f.Credentials)}}),a3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf}});var r3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf}}),i3=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:Jf}});var VR=v(qR(),1);var t0=v(LA(),1);class I1 extends u{name="EncryptionTypeMismatch";$fault="client";constructor(f){super({name:"EncryptionTypeMismatch",$fault:"client",...f});Object.setPrototypeOf(this,I1.prototype)}}class P1 extends u{name="InvalidRequest";$fault="client";constructor(f){super({name:"InvalidRequest",$fault:"client",...f});Object.setPrototypeOf(this,P1.prototype)}}class q1 extends u{name="InvalidWriteOffset";$fault="client";constructor(f){super({name:"InvalidWriteOffset",$fault:"client",...f});Object.setPrototypeOf(this,q1.prototype)}}class B1 extends u{name="TooManyParts";$fault="client";constructor(f){super({name:"TooManyParts",$fault:"client",...f});Object.setPrototypeOf(this,B1.prototype)}}class K1 extends u{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(f){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,K1.prototype)}}var p3;(function(f){f.visit=(R,h)=>{if(R.Records!==void 0)return h.Records(R.Records);if(R.Stats!==void 0)return h.Stats(R.Stats);if(R.Progress!==void 0)return h.Progress(R.Progress);if(R.Cont!==void 0)return h.Cont(R.Cont);if(R.End!==void 0)return h.End(R.End);return h._(R.$unknown[0],R.$unknown[1])}})(p3||(p3={}));var o3=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf}}),n3=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:Jf},...f.SSEKMSKeyId&&{SSEKMSKeyId:Jf},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jf}});var S4=async(f,R)=>{let h=t0.requestBuilder(f,R),$=k({},zf,{[p7]:f[Q7],[hh]:f[fh],[$h]:f[Rh],[l1]:f[s1],[AR]:[()=>zf(f[ER]),()=>f[ER].toString()]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let A=k({[_7]:[,""]}),G;return h.m("GET").h($).q(A).b(G),h.build()};var Y4=async(f,R)=>{let h=t0.requestBuilder(f,R),$=k({},zf,{[m4]:f[q4],[O7]:[()=>zf(f[e3]),()=>p0(f[e3]).toString()],[c4]:f[B4],[E7]:[()=>zf(f[u3]),()=>p0(f[u3]).toString()],[m7]:f[W7],[_1]:f[x1],[_4]:f[y4],[d1]:f[k1],[C8]:f[K8],[T8]:f[q8],[i7]:f[eD]});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let A=k({[r4]:[,"GetObject"],[c7]:[,f[S7]],[b7]:[,f[Y7]],[x7]:[,f[D7]],[k7]:[,f[Z7]],[s7]:[,f[M7]],[l7]:[()=>f.ResponseExpires!==void 0,()=>p0(f[J7]).toString()],[a7]:[,f[v8]],[g7]:[()=>f.PartNumber!==void 0,()=>f[F7].toString()]}),G;return h.m("GET").h($).q(A).b(G),h.build()};var D4=async(f,R)=>{let h=t0.requestBuilder(f,R),$=k({},zf,{[C8]:f[K8],[T8]:f[q8],[t7]:[()=>zf(f[t3]),()=>(f[t3]||[]).map(F4).join(", ")]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let A=k({[V7]:[,"2"],[K7]:[,f[O1]],[v7]:[,f[E1]],[T7]:[()=>f.MaxKeys!==void 0,()=>f[T1].toString()],[C7]:[,f[jR]],[B7]:[,f[j1]],[j7]:[()=>f.FetchOwner!==void 0,()=>f[h7].toString()],[d7]:[,f[g1]]}),G;return h.m("GET").h($).q(A).b(G),h.build()};var Z4=async(f,R)=>{let h=t0.requestBuilder(f,R),$=k({},zf,{[g4]:f[P4]||"application/octet-stream",[r7]:f[oD],[O4]:f[Q4],[E4]:f[w4],[V4]:f[L4],[T4]:f[I4],[M8]:[()=>zf(f[Y8]),()=>f[Y8].toString()],[P7]:f[uD],[hZ]:f[i0],[y8]:f[Q8],[j8]:f[w8],[O8]:f[L8],[E8]:f[I8],[V8]:f[P8],[J8]:[()=>zf(f[D8]),()=>p0(f[D8]).toString()],[m4]:f[q4],[c4]:f[B4],[o7]:f[$7],[n7]:f[A7],[e7]:f[G7],[u7]:f[H7],[AZ]:[()=>zf(f[f4]),()=>f[f4].toString()],[hh]:f[fh],[l4]:f[$R],[a4]:f[j4],[_1]:f[x1],[_4]:f[y4],[d1]:f[k1],[$h]:f[Rh],[l1]:f[s1],[AR]:[()=>zf(f[ER]),()=>f[ER].toString()],[C8]:f[K8],[$Z]:f[w7],[s4]:f[v4],[X8]:[()=>zf(f[Z8]),()=>W4(f[Z8]).toString()],[k4]:f[K4],[T8]:f[q8],...f.Metadata!==void 0&&Object.keys(f.Metadata).reduce((N,U)=>{return N[`x-amz-meta-${U.toLowerCase()}`]=f.Metadata[U],N},{})});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let A=k({[r4]:[,"PutObject"]}),G,H;if(f.Body!==void 0)H=f.Body,G=H;return h.m("PUT").h($).q(A).b(G),h.build()};var M4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return b1(f,R);let h=k({$metadata:Wf(f),[fh]:[,f.headers[hh]],[Rh]:[,f.headers[$h]],[s1]:[,f.headers[l1]],[ER]:[()=>f.headers[AR]!==void 0,()=>OR(f.headers[AR])]}),$=of(z8(await VR.parseXmlBody(f.body,R)),"body");if($[uA]!=null)h[uA]=pD($[uA],R);return h};var J4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return b1(f,R);let h=k({$metadata:Wf(f),[f7]:[()=>f.headers[h4]!==void 0,()=>OR(f.headers[h4])],[nD]:[,f.headers[I7]],[e0]:[,f.headers[x4]],[z7]:[,f.headers[fZ]],[V1]:[()=>f.headers[R4]!==void 0,()=>of(c0(f.headers[R4]))],[Y8]:[()=>f.headers[M8]!==void 0,()=>c1(f.headers[M8])],[n0]:[,f.headers[C4]],[Q8]:[,f.headers[y8]],[w8]:[,f.headers[j8]],[L8]:[,f.headers[O8]],[I8]:[,f.headers[E8]],[P8]:[,f.headers[V8]],[o0]:[,f.headers[b4]],[N7]:[()=>f.headers[$4]!==void 0,()=>R0(f.headers[$4])],[v8]:[,f.headers[d4]],[Q4]:[,f.headers[O4]],[w4]:[,f.headers[E4]],[L4]:[,f.headers[V4]],[I4]:[,f.headers[T4]],[tD]:[,f.headers[q7]],[P4]:[,f.headers[g4]],[D8]:[()=>f.headers[J8]!==void 0,()=>of(c0(f.headers[J8]))],[R7]:[,f.headers[y7]],[j4]:[,f.headers[a4]],[fh]:[,f.headers[hh]],[x1]:[,f.headers[_1]],[k1]:[,f.headers[d1]],[Rh]:[,f.headers[$h]],[ER]:[()=>f.headers[AR]!==void 0,()=>OR(f.headers[AR])],[$R]:[,f.headers[l4]],[B8]:[,f.headers[g8]],[X7]:[,f.headers[RZ]],[U7]:[()=>f.headers[A4]!==void 0,()=>R0(f.headers[A4])],[L7]:[()=>f.headers[H4]!==void 0,()=>R0(f.headers[H4])],[v4]:[,f.headers[s4]],[Z8]:[()=>f.headers[X8]!==void 0,()=>of(u0(f.headers[X8]))],[K4]:[,f.headers[k4]],Metadata:[,Object.keys(f.headers).filter((A)=>A.startsWith("x-amz-meta-")).reduce((A,G)=>{return A[G.substring(11)]=f.headers[G],A},{})]}),$=f.body;return R.sdkStreamMixin($),h.Body=$,h};var X4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return b1(f,R);let h=k({$metadata:Wf(f),[B8]:[,f.headers[g8]]}),$=of(z8(await VR.parseXmlBody(f.body,R)),"body");if($.CommonPrefixes==="")h[v1]=[];else if($[v1]!=null)h[v1]=_D(m1($[v1]),R);if($.Contents==="")h[y1]=[];else if($[y1]!=null)h[y1]=aD(m1($[y1]),R);if($[j1]!=null)h[j1]=i($[j1]);if($[O1]!=null)h[O1]=i($[O1]);if($[E1]!=null)h[E1]=i($[E1]);if($[h8]!=null)h[h8]=OR($[h8]);if($[A8]!=null)h[A8]=R0($[A8]);if($[T1]!=null)h[T1]=R0($[T1]);if($[G8]!=null)h[G8]=i($[G8]);if($[H8]!=null)h[H8]=i($[H8]);if($[jR]!=null)h[jR]=i($[jR]);if($[g1]!=null)h[g1]=i($[g1]);return h};var z4=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return b1(f,R);let h=k({$metadata:Wf(f),[e0]:[,f.headers[x4]],[n0]:[,f.headers[C4]],[Q8]:[,f.headers[y8]],[w8]:[,f.headers[j8]],[L8]:[,f.headers[O8]],[I8]:[,f.headers[E8]],[P8]:[,f.headers[V8]],[o0]:[,f.headers[b4]],[fh]:[,f.headers[hh]],[v8]:[,f.headers[d4]],[x1]:[,f.headers[_1]],[k1]:[,f.headers[d1]],[Rh]:[,f.headers[$h]],[s1]:[,f.headers[l1]],[ER]:[()=>f.headers[AR]!==void 0,()=>OR(f.headers[AR])],[C1]:[()=>f.headers[G4]!==void 0,()=>c1(f.headers[G4])],[B8]:[,f.headers[g8]]});return await N4.collectBody(f.body,R),h};var b1=async(f,R)=>{let h={...f,body:await VR.parseXmlErrorBody(f.body,R)},$=VR.loadRestXmlErrorCode(f,h.body);switch($){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await mD(h,R);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await xD(h,R);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await yD(h,R);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await jD(h,R);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await gD(h,R);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await ED(h,R);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await CD(h,R);case"NotFound":case"com.amazonaws.s3#NotFound":throw await cD(h,R);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await OD(h,R);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await VD(h,R);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await TD(h,R);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await kD(h,R);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await bD(h,R);default:let A=h.body;return vD({output:f,parsedBody:A,errorCode:$})}},vD=U4(u),yD=async(f,R)=>{let h=k({}),$=f.body,A=new J1({$metadata:Wf(f),...h});return Qf(A,f.body)},jD=async(f,R)=>{let h=k({}),$=f.body,A=new X1({$metadata:Wf(f),...h});return Qf(A,f.body)},OD=async(f,R)=>{let h=k({}),$=f.body,A=new I1({$metadata:Wf(f),...h});return Qf(A,f.body)},ED=async(f,R)=>{let h=k({}),$=f.body;if($[eA]!=null)h[eA]=i($[eA]);if($[$R]!=null)h[$R]=i($[$R]);let A=new Q1({$metadata:Wf(f),...h});return Qf(A,f.body)},VD=async(f,R)=>{let h=k({}),$=f.body,A=new P1({$metadata:Wf(f),...h});return Qf(A,f.body)},TD=async(f,R)=>{let h=k({}),$=f.body,A=new q1({$metadata:Wf(f),...h});return Qf(A,f.body)},gD=async(f,R)=>{let h=k({}),$=f.body,A=new z1({$metadata:Wf(f),...h});return Qf(A,f.body)},CD=async(f,R)=>{let h=k({}),$=f.body,A=new w1({$metadata:Wf(f),...h});return Qf(A,f.body)},mD=async(f,R)=>{let h=k({}),$=f.body,A=new Z1({$metadata:Wf(f),...h});return Qf(A,f.body)},cD=async(f,R)=>{let h=k({}),$=f.body,A=new L1({$metadata:Wf(f),...h});return Qf(A,f.body)},bD=async(f,R)=>{let h=k({}),$=f.body,A=new K1({$metadata:Wf(f),...h});return Qf(A,f.body)},xD=async(f,R)=>{let h=k({}),$=f.body,A=new M1({$metadata:Wf(f),...h});return Qf(A,f.body)},kD=async(f,R)=>{let h=k({}),$=f.body,A=new B1({$metadata:Wf(f),...h});return Qf(A,f.body)};var sD=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return i(h)})},lD=(f,R)=>{let h={};if(f[jR]!=null)h[jR]=i(f[jR]);return h},_D=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return lD(h,R)})};var dD=(f,R)=>{let h={};if(f[$8]!=null)h[$8]=i(f[$8]);if(f[V1]!=null)h[V1]=of(u0(f[V1]));if(f[n0]!=null)h[n0]=i(f[n0]);if(f.ChecksumAlgorithm==="")h[i0]=[];else if(f[i0]!=null)h[i0]=sD(m1(f[i0]),R);if(f[o0]!=null)h[o0]=i(f[o0]);if(f[C1]!=null)h[C1]=c1(f[C1]);if(f[$R]!=null)h[$R]=i(f[$R]);if(f[N8]!=null)h[N8]=rD(f[N8],R);if(f[F8]!=null)h[F8]=iD(f[F8],R);return h},aD=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return dD(h,R)})};var rD=(f,R)=>{let h={};if(f[tA]!=null)h[tA]=i(f[tA]);if(f[f8]!=null)h[f8]=i(f[f8]);return h};var iD=(f,R)=>{let h={};if(f[R8]!=null)h[R8]=OR(f[R8]);if(f[U8]!=null)h[U8]=of(u0(f[U8]));return h};var pD=(f,R)=>{let h={};if(f[nA]!=null)h[nA]=i(f[nA]);if(f[W8]!=null)h[W8]=i(f[W8]);if(f[S8]!=null)h[S8]=i(f[S8]);if(f[e0]!=null)h[e0]=of(u0(f[e0]));return h};var Wf=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var oD="ACL";var nA="AccessKeyId";var nD="AcceptRanges";var eA="AccessTier";var ER="BucketKeyEnabled";var uA="Credentials",i0="ChecksumAlgorithm";var Q4="CacheControl",Q8="ChecksumCRC32",w8="ChecksumCRC32C",L8="ChecksumCRC64NVME",w4="ContentDisposition";var L4="ContentEncoding";var I4="ContentLanguage",Y8="ContentLength",eD="ChecksumMode",uD="ContentMD5";var v1="CommonPrefixes";var tD="ContentRange";var I8="ChecksumSHA1",P8="ChecksumSHA256";var o0="ChecksumType",P4="ContentType";var j1="ContinuationToken";var y1="Contents";var O1="Delimiter";var f7="DeleteMarker";var tA="DisplayName";var D8="Expires";var q8="ExpectedBucketOwner";var R7="ExpiresString";var E1="EncodingType",n0="ETag";var e0="Expiration";var h7="FetchOwner";var $7="GrantFullControl";var A7="GrantRead",G7="GrantReadACP";var H7="GrantWriteACP";var f8="ID";var q4="IfMatch";var e3="IfModifiedSince",B4="IfNoneMatch";var R8="IsRestoreInProgress";var h8="IsTruncated";var u3="IfUnmodifiedSince";var $8="Key",A8="KeyCount";var V1="LastModified";var T1="MaxKeys";var N7="MissingMeta";var G8="Name";var H8="NextContinuationToken";var N8="Owner";var K4="ObjectLockLegalHoldStatus",v4="ObjectLockMode";var Z8="ObjectLockRetainUntilDate";var t3="OptionalObjectAttributes";var jR="Prefix";var U7="PartsCount";var F7="PartNumber";var W7="Range";var B8="RequestCharged",S7="ResponseCacheControl",Y7="ResponseContentDisposition",D7="ResponseContentEncoding",Z7="ResponseContentLanguage",M7="ResponseContentType";var J7="ResponseExpires",U8="RestoreExpiryDate";var K8="RequestPayer";var X7="ReplicationStatus",F8="RestoreStatus";var z7="Restore";var g1="StartAfter",W8="SecretAccessKey";var $R="StorageClass";var Q7="SessionMode";var fh="ServerSideEncryption";var x1="SSECustomerAlgorithm",y4="SSECustomerKey",k1="SSECustomerKeyMD5";var s1="SSEKMSEncryptionContext",Rh="SSEKMSKeyId";var S8="SessionToken";var C1="Size";var w7="Tagging";var L7="TagCount";var v8="VersionId";var f4="WriteOffsetBytes",j4="WebsiteRedirectLocation";var I7="accept-ranges";var O4="cache-control",E4="content-disposition",V4="content-encoding",T4="content-language",M8="content-length",P7="content-md5",q7="content-range",g4="content-type",B7="continuation-token";var K7="delimiter",J8="expires";var v7="encoding-type",C4="etag",y7="expiresstring",j7="fetch-owner";var m4="if-match",O7="if-modified-since";var c4="if-none-match";var E7="if-unmodified-since";var R4="last-modified";var V7="list-type";var T7="max-keys";var g7="partNumber";var C7="prefix";var m7="range",c7="response-cache-control",b7="response-content-disposition",x7="response-content-encoding",k7="response-content-language",s7="response-content-type",l7="response-expires";var _7="session",d7="start-after";var a7="versionId";var r7="x-amz-acl";var y8="x-amz-checksum-crc32",j8="x-amz-checksum-crc32c",O8="x-amz-checksum-crc64nvme",i7="x-amz-checksum-mode";var E8="x-amz-checksum-sha1",V8="x-amz-checksum-sha256";var p7="x-amz-create-session-mode";var b4="x-amz-checksum-type",h4="x-amz-delete-marker",x4="x-amz-expiration",T8="x-amz-expected-bucket-owner";var o7="x-amz-grant-full-control",n7="x-amz-grant-read",e7="x-amz-grant-read-acp";var u7="x-amz-grant-write-acp";var $4="x-amz-missing-meta";var A4="x-amz-mp-parts-count";var k4="x-amz-object-lock-legal-hold",s4="x-amz-object-lock-mode",X8="x-amz-object-lock-retain-until-date";var t7="x-amz-optional-object-attributes",G4="x-amz-object-size";var fZ="x-amz-restore",g8="x-amz-request-charged";var C8="x-amz-request-payer";var RZ="x-amz-replication-status";var l4="x-amz-storage-class",hZ="x-amz-sdk-checksum-algorithm";var hh="x-amz-server-side-encryption",$h="x-amz-server-side-encryption-aws-kms-key-id",AR="x-amz-server-side-encryption-bucket-key-enabled",l1="x-amz-server-side-encryption-context",_1="x-amz-server-side-encryption-customer-algorithm",_4="x-amz-server-side-encryption-customer-key",d1="x-amz-server-side-encryption-customer-key-md5",$Z="x-amz-tagging",H4="x-amz-tagging-count";var d4="x-amz-version-id",AZ="x-amz-write-offset-bytes",a4="x-amz-website-redirect-location",r4="x-id";class m8 extends GR.classBuilder().ep({...hR,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(f,R,h,$){return[i4.getSerdePlugin(h,this.serialize,this.deserialize),HR(h,f.getEndpointParameterInstructions()),oR(h)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(a3,d3).ser(S4).de(M4).build(){}var p4={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.797.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.796.0","@aws-sdk/credential-provider-node":"3.797.0","@aws-sdk/middleware-bucket-endpoint":"3.775.0","@aws-sdk/middleware-expect-continue":"3.775.0","@aws-sdk/middleware-flexible-checksums":"3.796.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-location-constraint":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-s3":"3.796.0","@aws-sdk/middleware-ssec":"3.775.0","@aws-sdk/middleware-user-agent":"3.796.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/signature-v4-multi-region":"3.796.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.787.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.796.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/eventstream-serde-browser":"^4.0.2","@smithy/eventstream-serde-config-resolver":"^4.1.0","@smithy/eventstream-serde-node":"^4.0.2","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-blob-browser":"^4.0.2","@smithy/hash-node":"^4.0.2","@smithy/hash-stream-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/md5-js":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-stream":"^4.2.0","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.796.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var e1=v(qR(),1);var o4="AWS_EC2_METADATA_DISABLED",n4=async(f)=>{let{ENV_CMDS_FULL_URI:R,ENV_CMDS_RELATIVE_URI:h,fromContainerMetadata:$,fromInstanceMetadata:A}=await import("../chunk-gvtcy7a2.js");if(process.env[h]||process.env[R]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:G}=await import("../chunk-kejrbrr5.js");return r1(G(f),$(f))}if(process.env[o4]&&process.env[o4]!=="false")return async()=>{throw new h0("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),A(f)};var e4=!1,$U=(f={})=>u4(r1(async()=>{if(f.profile??process.env[t4]){if(process.env[fU]&&process.env[RU]){if(!e4)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
57
57
  Multiple credential sources detected:
58
58
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
59
59
  This SDK will proceed with the AWS_PROFILE value.
@@ -61,32 +61,32 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
61
61
  However, a future version may change this behavior to prefer the ENV static credentials.
62
62
  Please ensure that your environment only sets either the AWS_PROFILE or the
63
63
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
64
- `),n4=!0}throw new $0("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),RU(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:R,ssoAccountId:h,ssoRegion:$,ssoRoleName:A,ssoSession:G}=f;if(!R&&!h&&!$&&!A&&!G)throw new $0("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:H}=await import("../chunk-wa1dcgad.js");return H(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:R}=await import("../chunk-e6nxs9xa.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:R}=await import("../chunk-ezyz3gaq.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:R}=await import("../chunk-szs1nkf4.js");return R(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await o4(f))()},async()=>{throw new $0("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),$Z,hZ),hZ=(f)=>f?.expiration!==void 0,$Z=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;var AZ="AWS_S3_USE_ARN_REGION",GZ="s3_use_arn_region",$U={environmentVariableSelector:(f)=>vR(f,AZ,yR.ENV),configFileSelector:(f)=>vR(f,GZ,yR.CONFIG),default:!1};var UR=O(KR(),1);var GU=O(KR(),1);class A0{constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let h=7,$=Math.abs(Math.round(f));h>-1&&$>0;h--,$/=256)R[h]=$;if(f<0)AU(R);return new A0(R)}valueOf(){let f=this.bytes.slice(0),R=f[0]&128;if(R)AU(f);return parseInt(GU.toHex(f),16)*(R?-1:1)}toString(){return String(this.valueOf())}}function AU(f){for(let R=0;R<8;R++)f[R]^=255;for(let R=7;R>-1;R--)if(f[R]++,f[R]!==0)break}class c8{constructor(f,R){this.toUtf8=f,this.fromUtf8=R}format(f){let R=[];for(let A of Object.keys(f)){let G=this.fromUtf8(A);R.push(Uint8Array.from([G.byteLength]),G,this.formatHeaderValue(f[A]))}let h=new Uint8Array(R.reduce((A,G)=>A+G.byteLength,0)),$=0;for(let A of R)h.set(A,$),$+=A.byteLength;return h}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,f.value,!1),new Uint8Array(R.buffer);case"integer":let h=new DataView(new ArrayBuffer(5));return h.setUint8(0,4),h.setInt32(1,f.value,!1),new Uint8Array(h.buffer);case"long":let $=new Uint8Array(9);return $[0]=5,$.set(f.value.bytes,1),$;case"binary":let A=new DataView(new ArrayBuffer(3+f.value.byteLength));A.setUint8(0,6),A.setUint16(1,f.value.byteLength,!1);let G=new Uint8Array(A.buffer);return G.set(f.value,3),G;case"string":let H=this.fromUtf8(f.value),N=new DataView(new ArrayBuffer(3+H.byteLength));N.setUint8(0,7),N.setUint16(1,H.byteLength,!1);let U=new Uint8Array(N.buffer);return U.set(H,3),U;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(A0.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!PZ.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let S=new Uint8Array(17);return S[0]=9,S.set(UR.fromHex(f.value.replace(/\-/g,"")),1),S}}parse(f){let R={},h=0;while(h<f.byteLength){let $=f.getUint8(h++),A=this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,$));switch(h+=$,f.getUint8(h++)){case 0:R[A]={type:NU,value:!0};break;case 1:R[A]={type:NU,value:!1};break;case 2:R[A]={type:MZ,value:f.getInt8(h++)};break;case 3:R[A]={type:JZ,value:f.getInt16(h,!1)},h+=2;break;case 4:R[A]={type:XZ,value:f.getInt32(h,!1)},h+=4;break;case 5:R[A]={type:zZ,value:new A0(new Uint8Array(f.buffer,f.byteOffset+h,8))},h+=8;break;case 6:let G=f.getUint16(h,!1);h+=2,R[A]={type:QZ,value:new Uint8Array(f.buffer,f.byteOffset+h,G)},h+=G;break;case 7:let H=f.getUint16(h,!1);h+=2,R[A]={type:wZ,value:this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,H))},h+=H;break;case 8:R[A]={type:LZ,value:new Date(new A0(new Uint8Array(f.buffer,f.byteOffset+h,8)).valueOf())},h+=8;break;case 9:let N=new Uint8Array(f.buffer,f.byteOffset+h,16);h+=16,R[A]={type:IZ,value:`${UR.toHex(N.subarray(0,4))}-${UR.toHex(N.subarray(4,6))}-${UR.toHex(N.subarray(6,8))}-${UR.toHex(N.subarray(8,10))}-${UR.toHex(N.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return R}}var HU;(function(f){f[f.boolTrue=0]="boolTrue",f[f.boolFalse=1]="boolFalse",f[f.byte=2]="byte",f[f.short=3]="short",f[f.integer=4]="integer",f[f.long=5]="long",f[f.byteArray=6]="byteArray",f[f.string=7]="string",f[f.timestamp=8]="timestamp",f[f.uuid=9]="uuid"})(HU||(HU={}));var NU="boolean",MZ="byte",JZ="short",XZ="integer",zZ="long",QZ="binary",wZ="string",LZ="timestamp",IZ="uuid",PZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var UU=4,FR=UU*2,CR=4,qZ=FR+CR*2;function FU({byteLength:f,byteOffset:R,buffer:h}){if(f<qZ)throw new Error("Provided message too short to accommodate event stream message overhead");let $=new DataView(h,R,f),A=$.getUint32(0,!1);if(f!==A)throw new Error("Reported message length does not match received message length");let G=$.getUint32(UU,!1),H=$.getUint32(FR,!1),N=$.getUint32(f-CR,!1),U=new qR().update(new Uint8Array(h,R,FR));if(H!==U.digest())throw new Error(`The prelude checksum specified in the message (${H}) does not match the calculated CRC32 checksum (${U.digest()})`);if(U.update(new Uint8Array(h,R+FR,f-(FR+CR))),N!==U.digest())throw new Error(`The message checksum (${U.digest()}) did not match the expected value of ${N}`);return{headers:new DataView(h,R+FR+CR,G),body:new Uint8Array(h,R+FR+CR+G,A-G-(FR+CR+CR))}}class b8{constructor(f,R){this.headerMarshaller=new c8(f,R),this.messageBuffer=[],this.isEndOfStream=!1}feed(f){this.messageBuffer.push(this.decode(f))}endOfStream(){this.isEndOfStream=!0}getMessage(){let f=this.messageBuffer.pop(),R=this.isEndOfStream;return{getMessage(){return f},isEndOfStream(){return R}}}getAvailableMessages(){let f=this.messageBuffer;this.messageBuffer=[];let R=this.isEndOfStream;return{getMessages(){return f},isEndOfStream(){return R}}}encode({headers:f,body:R}){let h=this.headerMarshaller.format(f),$=h.byteLength+R.byteLength+16,A=new Uint8Array($),G=new DataView(A.buffer,A.byteOffset,A.byteLength),H=new qR;return G.setUint32(0,$,!1),G.setUint32(4,h.byteLength,!1),G.setUint32(8,H.update(A.subarray(0,8)).digest(),!1),A.set(h,12),A.set(R,h.byteLength+12),G.setUint32($-4,H.update(A.subarray(8,$-4)).digest(),!1),A}decode(f){let{headers:R,body:h}=FU(f);return{headers:this.headerMarshaller.parse(R),body:h}}formatHeaders(f){return this.headerMarshaller.format(f)}}class x8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.decoder.decode(f)}}class k8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream)yield this.options.encoder.encode(f);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class s8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream){let R=await this.options.deserializer(f);if(R===void 0)continue;yield R}}}class l8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.serializer(f)}}function WU(f){let R=0,h=0,$=null,A=null,G=(N)=>{if(typeof N!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+N);R=N,h=4,$=new Uint8Array(N),new DataView($.buffer).setUint32(0,N,!1)},H=async function*(){let N=f[Symbol.asyncIterator]();while(!0){let{value:U,done:F}=await N.next();if(F){if(!R)return;else if(R===h)yield $;else throw new Error("Truncated event message received.");return}let S=U.length,D=0;while(D<S){if(!$){let Z=S-D;if(!A)A=new Uint8Array(4);let L=Math.min(4-h,Z);if(A.set(U.slice(D,D+L),h),h+=L,D+=L,h<4)break;G(new DataView(A.buffer).getUint32(0,!1)),A=null}let J=Math.min(R-h,S-D);if($.set(U.slice(D,D+J),h),h+=J,D+=J,R&&R===h)yield $,$=null,R=0,h=0}}};return{[Symbol.asyncIterator]:H}}function SU(f,R){return async function(h){let{value:$}=h.headers[":message-type"];if($==="error"){let A=new Error(h.headers[":error-message"].value||"UnknownError");throw A.name=h.headers[":error-code"].value,A}else if($==="exception"){let A=h.headers[":exception-type"].value,G={[A]:h},H=await f(G);if(H.$unknown){let N=new Error(R(h.body));throw N.name=A,N}throw H[A]}else if($==="event"){let A={[h.headers[":event-type"].value]:h},G=await f(A);if(G.$unknown)return;return G}else throw Error(`Unrecognizable event type: ${h.headers[":event-type"].value}`)}}class i1{constructor({utf8Encoder:f,utf8Decoder:R}){this.eventStreamCodec=new b8(f,R),this.utfEncoder=f}deserialize(f,R){let h=WU(f);return new s8({messageStream:new x8({inputStream:h,decoder:this.eventStreamCodec}),deserializer:SU(R,this.utfEncoder)})}serialize(f,R){return new k8({messageStream:new l8({inputStream:f,serializer:R}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as BZ}from"stream";async function*YU(f){let R=!1,h=!1,$=new Array;f.on("error",(A)=>{if(!R)R=!0;if(A)throw A}),f.on("data",(A)=>{$.push(A)}),f.on("end",()=>{R=!0});while(!h){let A=await new Promise((G)=>setTimeout(()=>G($.shift()),0));if(A)yield A;h=R&&$.length===0}}class _8{constructor({utf8Encoder:f,utf8Decoder:R}){this.universalMarshaller=new i1({utf8Decoder:R,utf8Encoder:f})}deserialize(f,R){let h=typeof f[Symbol.asyncIterator]==="function"?f:YU(f);return this.universalMarshaller.deserialize(h,R)}serialize(f,R){return BZ.from(this.universalMarshaller.serialize(f,R))}}var DU=(f)=>new _8(f);import{Writable as KZ}from"stream";class p1 extends KZ{constructor(f,R){super(R);this.hash=f}_write(f,R,h){try{this.hash.update(If(f))}catch($){return h($)}h()}}var ZU=(f,R)=>{if(R.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");let h=new f,$=new p1(h);return R.pipe($),new Promise((A,G)=>{R.on("error",(H)=>{$.end(),G(H)}),$.on("error",G),$.on("finish",()=>{h.digest().then(A).catch(G)})})};var o1=O(BR(),1);var LU=(f)=>{return{apiVersion:"2006-03-01",base64Decoder:f?.base64Decoder??MU,base64Encoder:f?.base64Encoder??XU,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??D1,extensions:f?.extensions??[],getAwsChunkedEncodingStream:f?.getAwsChunkedEncodingStream??zU,httpAuthSchemeProvider:f?.httpAuthSchemeProvider??k3,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4"),signer:new o1.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4a"),signer:new o1.AwsSdkSigV4ASigner}],logger:f?.logger??new eh,sdkStreamMixin:f?.sdkStreamMixin??QU,serviceId:f?.serviceId??"S3",signerConstructor:f?.signerConstructor??qA,signingEscapePath:f?.signingEscapePath??!1,urlParser:f?.urlParser??wU,useArnRegion:f?.useArnRegion??!1,utf8Decoder:f?.utf8Decoder??_0,utf8Encoder:f?.utf8Encoder??JU}};var cU=(f)=>{BU(process.version);let R=mU(f),h=()=>R().then(qU),$=LU(f);e1.emitWarningIfUnsupportedVersion(process.version);let A={profile:f?.profile};return{...$,...f,runtime:"node",defaultsMode:R,bodyLengthChecker:f?.bodyLengthChecker??CU,credentialDefaultProvider:f?.credentialDefaultProvider??hU,defaultUserAgentProvider:f?.defaultUserAgentProvider??TU({serviceId:$.serviceId,clientVersion:i4.version}),disableS3ExpressSessionAuth:f?.disableS3ExpressSessionAuth??jf(QA,A),eventStreamSerdeProvider:f?.eventStreamSerdeProvider??DU,maxAttempts:f?.maxAttempts??jf(EU,f),md5:f?.md5??n1.bind(null,"md5"),region:f?.region??jf(yU,{...jU,...A}),requestChecksumCalculation:f?.requestChecksumCalculation??jf(AN,A),requestHandler:IU.create(f?.requestHandler??h),responseChecksumValidation:f?.responseChecksumValidation??jf(GN,A),retryMode:f?.retryMode??jf({...VU,default:async()=>(await h()).retryMode||OU},f),sha1:f?.sha1??n1.bind(null,"sha1"),sha256:f?.sha256??n1.bind(null,"sha256"),sigv4aSigningRegionSet:f?.sigv4aSigningRegionSet??jf(e1.NODE_SIGV4A_CONFIG_OPTIONS,A),streamCollector:f?.streamCollector??PU,streamHasher:f?.streamHasher??ZU,useArnRegion:f?.useArnRegion??jf($U,A),useDualstackEndpoint:f?.useDualstackEndpoint??jf(KU,A),useFipsEndpoint:f?.useFipsEndpoint??jf(vU,A),userAgentAppId:f?.userAgentAppId??jf(gU,A)}};var bU=(f)=>{let{httpAuthSchemes:R,httpAuthSchemeProvider:h,credentials:$}=f;return{setHttpAuthScheme(A){let G=R.findIndex((H)=>H.schemeId===A.schemeId);if(G===-1)R.push(A);else R.splice(G,1,A)},httpAuthSchemes(){return R},setHttpAuthSchemeProvider(A){h=A},httpAuthSchemeProvider(){return h},setCredentials(A){$=A},credentials(){return $}}},xU=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var rU=(f,R)=>{let h=Object.assign(dU(f),lU(f),kU(f),bU(f));return R.forEach(($)=>$.configure(h)),Object.assign(f,aU(h),_U(h),sU(h),xU(h))};class d8 extends eU{config;constructor(...[f]){let R=cU(f||{});super(R);this.initConfig=R;let h=l3(R),$=uU(h),A=KN($),G=$F(A),H=fF(G),N=iU(H),U=hF(N),F=I6(U),S=s3(F),D=J6(S,{session:[()=>this,m8]}),J=rU(D,f?.extensions||[]);this.config=J,this.middlewareStack.use(tU(this.config)),this.middlewareStack.use(AF(this.config)),this.middlewareStack.use(RF(this.config)),this.middlewareStack.use(pU(this.config)),this.middlewareStack.use(oU(this.config)),this.middlewareStack.use(nU(this.config)),this.middlewareStack.use(G0.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:c3,identityProviderConfigProvider:async(Z)=>new G0.DefaultIdentityProviderConfig({"aws.auth#sigv4":Z.credentials,"aws.auth#sigv4a":Z.credentials})})),this.middlewareStack.use(G0.getHttpSigningPlugin(this.config)),this.middlewareStack.use(L6(this.config)),this.middlewareStack.use(hN(this.config)),this.middlewareStack.use(ON(this.config)),this.middlewareStack.use(wA(this.config)),this.middlewareStack.use(IA(this.config))}destroy(){super.destroy()}}function vZ(f){return(R)=>async(h)=>{let $={...h.input},A=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let G of A){let H=$[G.target];if(H){let N;if(typeof H==="string")if(jZ(H,f))N=f.base64Decoder(H);else N=f.utf8Decoder(H),$[G.target]=f.base64Encoder(N);else N=ArrayBuffer.isView(H)?new Uint8Array(H.buffer,H.byteOffset,H.byteLength):new Uint8Array(H),$[G.target]=f.base64Encoder(N);let U=new f.md5;U.update(N),$[G.hash]=f.base64Encoder(await U.digest())}}return R({...h,input:$})}}var yZ={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},u1=(f)=>({applyToStack:(R)=>{R.add(vZ(f),yZ)}});function jZ(f,R){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(f))return!1;try{return R.base64Decoder(f).length===32}catch{return!1}}class a8 extends GR.classBuilder().ep({...hR,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[HR(h,this.serialize,this.deserialize),NR(h,f.getEndpointParameterInstructions()),oh(h,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),u1(h),EN(h)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(i3,r3).ser(Y4).de(J4).build(){}class r8 extends GR.classBuilder().ep({...hR,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(f,R,h,$){return[HR(h,this.serialize,this.deserialize),NR(h,f.getEndpointParameterInstructions()),nR(h)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(D4).de(X4).build(){}class i8 extends GR.classBuilder().ep({...hR,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[HR(h,this.serialize,this.deserialize),NR(h,f.getEndpointParameterInstructions()),oh(h,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),vN(h),nR(h),u1(h)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(n3,o3).ser(Z4).de(z4).build(){}import{Buffer as GF}from"buffer";class HF extends dR{client;constructor(...f){super();this.client=new d8(...f)}async put(f){let R,h,$,A=process.env.BUCKET_NAME;if(f instanceof Blob)R=f,$=`${Bun.randomUUIDv7()}.${f.type.split("/")[1].split(";")[0]}`,h=f.type;else R=f.body,$=f.name,A=f.bucket??A,h=f.contentType;h=R instanceof Blob||R instanceof File?R.type:void 0;let G=R instanceof GF?R:R instanceof Blob||R instanceof File?GF.from(await R.arrayBuffer()):"";return await this.client.send(new i8({Bucket:A,Key:$,Body:G,ContentType:h})),$}async list(f){return await this.client.send(new r8({Bucket:process.env.BUCKET_NAME,Prefix:f}))}async fetch(f){let R=process.env.BUCKET_NAME,h;if(typeof f==="string")h=f;else R=f.bucket??R,h=f.name;if(!h)throw new Error("Object name has to be specified");let $=await this.client.send(new a8({Bucket:R,Key:h}));return new Response($.Body.transformToWebStream(),{headers:{"Content-Type":$.ContentType,"Content-Length":$.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":$.LastModified?.toUTCString()||"",ETag:$.ETag||""}})}}class t1{}class f$ extends t1{requests=new Map;consume(f,R){if(!this.requests.has(f))this.requests.set(f,{date:Date.now(),count:1});else{let h=this.requests.get(f),$=Date.now();if($-h.date>=60000)this.requests.set(f,{date:$,count:1});else this.requests.set(f,{date:h.date,count:h.count+1})}return this.requests.get(f).count}}class NF extends p{driver=new f$;boot(){}}import*as wz from"react-dom/server";var E;(function(f){f.Root="root",f.Text="text",f.Directive="directive",f.Comment="comment",f.Script="script",f.Style="style",f.Tag="tag",f.CDATA="cdata",f.Doctype="doctype"})(E||(E={}));function UF(f){return f.type===E.Tag||f.type===E.Script||f.type===E.Style}var{Root:FF,Text:WF,Directive:SF,Comment:YF,Script:DF,Style:ZF,Tag:MF,CDATA:JF,Doctype:XF}=E;class o8{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(f){this.parent=f}get previousSibling(){return this.prev}set previousSibling(f){this.prev=f}get nextSibling(){return this.next}set nextSibling(f){this.next=f}cloneNode(f=!1){return QF(this,f)}}class R$ extends o8{constructor(f){super();this.data=f}get nodeValue(){return this.data}set nodeValue(f){this.data=f}}class Gh extends R${constructor(){super(...arguments);this.type=E.Text}get nodeType(){return 3}}class h$ extends R${constructor(){super(...arguments);this.type=E.Comment}get nodeType(){return 8}}class $$ extends R${constructor(f,R){super(R);this.name=f,this.type=E.Directive}get nodeType(){return 1}}class A$ extends o8{constructor(f){super();this.children=f}get firstChild(){var f;return(f=this.children[0])!==null&&f!==void 0?f:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(f){this.children=f}}class G$ extends A${constructor(){super(...arguments);this.type=E.CDATA}get nodeType(){return 4}}class Hh extends A${constructor(){super(...arguments);this.type=E.Root}get nodeType(){return 9}}class H$ extends A${constructor(f,R,h=[],$=f==="script"?E.Script:f==="style"?E.Style:E.Tag){super(h);this.name=f,this.attribs=R,this.type=$}get nodeType(){return 1}get tagName(){return this.name}set tagName(f){this.name=f}get attributes(){return Object.keys(this.attribs).map((f)=>{var R,h;return{name:f,value:this.attribs[f],namespace:(R=this["x-attribsNamespace"])===null||R===void 0?void 0:R[f],prefix:(h=this["x-attribsPrefix"])===null||h===void 0?void 0:h[f]}})}}function N$(f){return UF(f)}function OZ(f){return f.type===E.CDATA}function EZ(f){return f.type===E.Text}function VZ(f){return f.type===E.Comment}function TZ(f){return f.type===E.Directive}function gZ(f){return f.type===E.Root}function QF(f,R=!1){let h;if(EZ(f))h=new Gh(f.data);else if(VZ(f))h=new h$(f.data);else if(N$(f)){let $=R?p8(f.children):[],A=new H$(f.name,{...f.attribs},$);if($.forEach((G)=>G.parent=A),f.namespace!=null)A.namespace=f.namespace;if(f["x-attribsNamespace"])A["x-attribsNamespace"]={...f["x-attribsNamespace"]};if(f["x-attribsPrefix"])A["x-attribsPrefix"]={...f["x-attribsPrefix"]};h=A}else if(OZ(f)){let $=R?p8(f.children):[],A=new G$($);$.forEach((G)=>G.parent=A),h=A}else if(gZ(f)){let $=R?p8(f.children):[],A=new Hh($);if($.forEach((G)=>G.parent=A),f["x-mode"])A["x-mode"]=f["x-mode"];h=A}else if(TZ(f)){let $=new $$(f.name,f.data);if(f["x-name"]!=null)$["x-name"]=f["x-name"],$["x-publicId"]=f["x-publicId"],$["x-systemId"]=f["x-systemId"];h=$}else throw new Error(`Not implemented yet: ${f.type}`);if(h.startIndex=f.startIndex,h.endIndex=f.endIndex,f.sourceCodeLocation!=null)h.sourceCodeLocation=f.sourceCodeLocation;return h}function p8(f){let R=f.map((h)=>QF(h,!0));for(let h=1;h<R.length;h++)R[h].prev=R[h-1],R[h-1].next=R[h];return R}var wF={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class n8{constructor(f,R,h){if(this.dom=[],this.root=new Hh(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof R==="function")h=R,R=wF;if(typeof f==="object")R=f,f=void 0;this.callback=f!==null&&f!==void 0?f:null,this.options=R!==null&&R!==void 0?R:wF,this.elementCB=h!==null&&h!==void 0?h:null}onparserinit(f){this.parser=f}onreset(){this.dom=[],this.root=new Hh(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)}onerror(f){this.handleCallback(f)}onclosetag(){this.lastNode=null;let f=this.tagStack.pop();if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(f)}onopentag(f,R){let h=this.options.xmlMode?E.Tag:void 0,$=new H$(f,R,void 0,h);this.addNode($),this.tagStack.push($)}ontext(f){let{lastNode:R}=this;if(R&&R.type===E.Text){if(R.data+=f,this.options.withEndIndices)R.endIndex=this.parser.endIndex}else{let h=new Gh(f);this.addNode(h),this.lastNode=h}}oncomment(f){if(this.lastNode&&this.lastNode.type===E.Comment){this.lastNode.data+=f;return}let R=new h$(f);this.addNode(R),this.lastNode=R}oncommentend(){this.lastNode=null}oncdatastart(){let f=new Gh(""),R=new G$([f]);this.addNode(R),f.parent=R,this.lastNode=f}oncdataend(){this.lastNode=null}onprocessinginstruction(f,R){let h=new $$(f,R);this.addNode(h)}handleCallback(f){if(typeof this.callback==="function")this.callback(f,this.dom);else if(f)throw f}addNode(f){let R=this.tagStack[this.tagStack.length-1],h=R.children[R.children.length-1];if(this.options.withStartIndices)f.startIndex=this.parser.startIndex;if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(R.children.push(f),h)f.prev=h,h.next=f;f.parent=R,this.lastNode=null}}var CZ=/\n/g;function mZ(f){let R=[...f.matchAll(CZ)].map(($)=>$.index||0);R.unshift(-1);let h=e8(R,0,R.length);return($)=>IF(h,$)}function e8(f,R,h){if(h-R==1)return{offset:f[R],index:R+1};let $=Math.ceil((R+h)/2),A=e8(f,R,$),G=e8(f,$,h);return{offset:A.offset,low:A,high:G}}function IF(f,R){return function(h){return Object.prototype.hasOwnProperty.call(h,"index")}(f)?{line:f.index,column:R-f.offset}:IF(f.high.offset<R?f.high:f.low,R)}function u8(f,R="",h={}){let $=typeof R!="string"?R:h,A=typeof R=="string"?R:"",G=f.map(cZ),H=!!$.lineNumbers;return function(N,U=0){let F=H?mZ(N):()=>({line:0,column:0}),S=U,D=[];f:for(;S<N.length;){let J=!1;for(let Z of G){Z.regex.lastIndex=S;let L=Z.regex.exec(N);if(L&&L[0].length>0){if(!Z.discard){let P=F(S),a=typeof Z.replace=="string"?L[0].replace(new RegExp(Z.regex.source,Z.regex.flags),Z.replace):L[0];D.push({state:A,name:Z.name,text:a,offset:S,len:L[0].length,line:P.line,column:P.column})}if(S=Z.regex.lastIndex,J=!0,Z.push){let P=Z.push(N,S);D.push(...P.tokens),S=P.offset}if(Z.pop)break f;break}}if(!J)break}return{tokens:D,offset:S,complete:N.length<=S}}}function cZ(f,R){return{...f,regex:bZ(f,R)}}function bZ(f,R){if(f.name.length===0)throw new Error(`Rule #${R} has empty name, which is not allowed.`);if(function(h){return Object.prototype.hasOwnProperty.call(h,"regex")}(f))return function(h){if(h.global)throw new Error(`Regular expression /${h.source}/${h.flags} contains the global flag, which is not allowed.`);return h.sticky?h:new RegExp(h.source,h.flags+"y")}(f.regex);if(function(h){return Object.prototype.hasOwnProperty.call(h,"str")}(f)){if(f.str.length===0)throw new Error(`Rule #${R} ("${f.name}") has empty "str" property, which is not allowed.`);return new RegExp(LF(f.str),"y")}return new RegExp(LF(f.name),"y")}function LF(f){return f.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function df(f,R){return(h,$)=>{let A=$,G=void 0;if($<h.tokens.length){if(G=f(h.tokens[$],h,$),G!==void 0)A++}else R?.(h,$);return G===void 0?{matched:!1}:{matched:!0,position:A,value:G}}}function t8(f,R){return f.matched?{matched:!0,position:f.position,value:R(f.value,f.position)}:f}function U$(f,R){return f.matched?R(f):f}function Sf(f,R){return(h,$)=>t8(f(h,$),(A,G)=>R(A,h,$,G))}function Nh(f,R){return(h,$)=>{let A=f(h,$);return A.matched?A:{matched:!0,position:$,value:R}}}function H0(...f){return(R,h)=>{for(let $ of f){let A=$(R,h);if(A.matched)return A}return{matched:!1}}}function WR(f,R){return(h,$)=>{let A=f(h,$);return A.matched?A:R(h,$)}}function xZ(f,R){return(h,$)=>{let A=[],G=!0;do{let H=f(h,$);if(H.matched&&R(H.value,A.length+1,h,$,H.position))A.push(H.value),$=H.position;else G=!1}while(G);return{matched:!0,position:$,value:A}}}function F$(f){return xZ(f,()=>!0)}function PF(f){return Zf(f,F$(f),(R,h)=>[R,...h])}function Zf(f,R,h){return($,A)=>U$(f($,A),(G)=>t8(R($,G.position),(H,N)=>h(G.value,H,$,A,N)))}function qF(f,R){return Zf(f,R,(h)=>h)}function fG(f,R){return Zf(f,R,(h,$)=>$)}function W$(f,R,h,$){return(A,G)=>U$(f(A,G),(H)=>U$(R(A,H.position),(N)=>t8(h(A,N.position),(U,F)=>$(H.value,N.value,U,A,G,F))))}function RG(f,R,h){return W$(f,R,h,($,A)=>A)}function kZ(...f){return(R,h)=>{let $=[],A=h;for(let G of f){let H=G(R,A);if(H.matched)$.push(H.value),A=H.position;else return{matched:!1}}return{matched:!0,position:A,value:$}}}function BF(...f){return sZ(kZ(...f))}function sZ(f){return Sf(f,(R)=>R.flatMap((h)=>h))}function lZ(f,R){return(h,$)=>{let A=!0,G=f,H=$;do{let N=R(G,h,H)(h,H);if(N.matched)G=N.value,H=N.position;else A=!1}while(A);return{matched:!0,position:H,value:G}}}function _Z(f,R,h){return lZ(f,($)=>Sf(R,(A,G,H,N)=>h($,A,G,H,N)))}function hG(f,R,h){return dZ(f,($)=>_Z($,Zf(R,h,(A,G)=>[A,G]),(A,[G,H])=>G(A,H)))}function dZ(f,R){return(h,$)=>U$(f(h,$),(A)=>R(A.value,h,$,A.position)(h,A.position))}var rZ="(?:[ \\t\\r\\n\\f]*)",EF="(?:\\n|\\r\\n|\\r|\\f)",D$="[^\\x00-\\x7F]",Wh="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",Sh="(?:\\\\[^\\n\\r\\f0-9a-f])",iZ=`(?:[_a-z]|${D$}|${Wh}|${Sh})`,VF=`(?:[_a-z0-9-]|${D$}|${Wh}|${Sh})`,pZ=`(?:${VF}+)`,oZ=`(?:[-]?${iZ}${VF}*)`,nZ=`'([^\\n\\r\\f\\\\']|\\\\${EF}|${D$}|${Wh}|${Sh})*'`,eZ=`"([^\\n\\r\\f\\\\"]|\\\\${EF}|${D$}|${Wh}|${Sh})*"`,uZ=u8([{name:"ws",regex:new RegExp(rZ)},{name:"hash",regex:new RegExp(`#${pZ}`,"i")},{name:"ident",regex:new RegExp(oZ,"i")},{name:"str1",regex:new RegExp(nZ,"i")},{name:"str2",regex:new RegExp(eZ,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),tZ=u8([{name:"unicode",regex:new RegExp(Wh,"i")},{name:"escape",regex:new RegExp(Sh,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function TF([f,R,h],[$,A,G]){return[f+$,R+A,h+G]}function fM(f){return f.reduce(TF,[0,0,0])}var RM=df((f)=>f.name==="unicode"?String.fromCodePoint(parseInt(f.text.slice(1),16)):void 0),hM=df((f)=>f.name==="escape"?f.text.slice(1):void 0),$M=df((f)=>f.name==="any"?f.text:void 0),AM=Sf(F$(H0(RM,hM,$M)),(f)=>f.join(""));function GG(f){let R=tZ(f);return AM({tokens:R.tokens,options:void 0},0).value}function s(f){return df((R)=>R.name===f?!0:void 0)}var HG=df((f)=>f.name==="ws"?null:void 0),$G=Nh(HG,null);function U0(f){return RG($G,f,$G)}var Fh=df((f)=>f.name==="ident"?GG(f.text):void 0),GM=df((f)=>f.name==="hash"?GG(f.text.slice(1)):void 0),HM=df((f)=>f.name.startsWith("str")?GG(f.text.slice(1,-1)):void 0),gF=qF(Nh(Fh,""),s("|")),NG=WR(Zf(gF,Fh,(f,R)=>({name:R,namespace:f})),Sf(Fh,(f)=>({name:f,namespace:null}))),NM=WR(Zf(gF,s("*"),(f)=>({type:"universal",namespace:f,specificity:[0,0,0]})),Sf(s("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),UM=Sf(NG,({name:f,namespace:R})=>({type:"tag",name:f,namespace:R,specificity:[0,0,1]})),FM=Zf(s("."),Fh,(f,R)=>({type:"class",name:R,specificity:[0,1,0]})),WM=Sf(GM,(f)=>({type:"id",name:f,specificity:[1,0,0]})),KF=df((f)=>{if(f.name==="ident"){if(f.text==="i"||f.text==="I")return"i";if(f.text==="s"||f.text==="S")return"s"}return}),SM=WR(Zf(HM,Nh(fG($G,KF),null),(f,R)=>({value:f,modifier:R})),Zf(Fh,Nh(fG(HG,KF),null),(f,R)=>({value:f,modifier:R}))),YM=H0(Sf(s("="),()=>"="),Zf(s("~"),s("="),()=>"~="),Zf(s("|"),s("="),()=>"|="),Zf(s("^"),s("="),()=>"^="),Zf(s("$"),s("="),()=>"$="),Zf(s("*"),s("="),()=>"*=")),DM=W$(s("["),U0(NG),s("]"),(f,{name:R,namespace:h})=>({type:"attrPresence",name:R,namespace:h,specificity:[0,1,0]})),ZM=RG(s("["),W$(U0(NG),YM,U0(SM),({name:f,namespace:R},h,{value:$,modifier:A})=>({type:"attrValue",name:f,namespace:R,matcher:h,value:$,modifier:A,specificity:[0,1,0]})),s("]")),MM=WR(DM,ZM),JM=WR(NM,UM),vF=H0(WM,FM,MM),yF=Sf(WR(BF(JM,F$(vF)),PF(vF)),(f)=>{return{type:"compound",list:f,specificity:fM(f.map((R)=>R.specificity))}}),XM=H0(Sf(s(">"),()=>">"),Sf(s("+"),()=>"+"),Sf(s("~"),()=>"~"),Zf(s("|"),s("|"),()=>"||")),zM=WR(U0(XM),Sf(HG,()=>" ")),AG=hG(yF,Sf(zM,(f)=>(R,h)=>({type:"compound",list:[...h.list,{type:"combinator",combinator:f,left:R,specificity:R.specificity}],specificity:TF(R.specificity,h.specificity)})),yF),yv=hG(Sf(AG,(f)=>({type:"list",list:[f]})),Sf(U0(s(",")),()=>(f,R)=>({type:"list",list:[...f.list,R]})),AG);function QM(f,R){if(!(typeof R==="string"||R instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");let h=uZ(R);if(!h.complete)throw new Error(`The input "${R}" was only partially tokenized, stopped at offset ${h.offset}!
65
- `+jF(R,h.offset));let $=U0(f)({tokens:h.tokens,options:void 0},0);if(!$.matched)throw new Error(`No match for "${R}" input!`);if($.position<h.tokens.length){let A=h.tokens[$.position];throw new Error(`The input "${R}" was only partially parsed, stopped at offset ${A.offset}!
66
- `+jF(R,A.offset,A.len))}return $.value}function jF(f,R,h=1){return`${f.replace(/(\t)|(\r)|(\n)/g,($,A,G)=>A?"\u2409":G?"\u240D":"\u240A")}
67
- ${"".padEnd(R)}${"^".repeat(h)}`}function CF(f){return QM(AG,f)}function mf(f){if(!f.type)throw new Error("This is not an AST node.");switch(f.type){case"universal":return S$(f.namespace)+"*";case"tag":return S$(f.namespace)+N0(f.name);case"class":return"."+N0(f.name);case"id":return"#"+N0(f.name);case"attrPresence":return`[${S$(f.namespace)}${N0(f.name)}]`;case"attrValue":return`[${S$(f.namespace)}${N0(f.name)}${f.matcher}"${wM(f.value)}"${f.modifier?f.modifier:""}]`;case"combinator":return mf(f.left)+f.combinator;case"compound":return f.list.reduce((R,h)=>{if(h.type==="combinator")return mf(h)+R;else return R+mf(h)},"");case"list":return f.list.map(mf).join(",")}}function S$(f){return f||f===""?N0(f)+"|":""}function Y$(f){return`\\${f.codePointAt(0).toString(16)} `}function N0(f){return f.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(R,h,$,A,G,H,N,U)=>h?Y$(h):$?"-"+Y$($.slice(1)):A?"\\-":G?G:H?"\uFFFD":N?Y$(N):"\\"+U)}function wM(f){return f.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(R,h,$,A,G)=>h?"\\\"":$?"\\\\":A?"\uFFFD":Y$(G))}function Uh(f){if(!f.type)throw new Error("This is not an AST node.");switch(f.type){case"compound":{f.list.forEach(Uh),f.list.sort((R,h)=>mF(OF(R),OF(h)));break}case"combinator":{Uh(f.left);break}case"list":{f.list.forEach(Uh),f.list.sort((R,h)=>mf(R)<mf(h)?-1:1);break}}return f}function OF(f){switch(f.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,f.name];case"attrPresence":return[4,mf(f)];case"attrValue":return[5,mf(f)];case"combinator":return[15,mf(f)]}}function UG(f,R){return mF(f,R)}function mF(f,R){if(!Array.isArray(f)||!Array.isArray(R))throw new Error("Arguments must be arrays.");let h=f.length<R.length?f.length:R.length;for(let $=0;$<h;$++){if(f[$]===R[$])continue;return f[$]<R[$]?-1:1}return f.length-R.length}class Z${constructor(f){this.branches=F0(IM(f))}build(f){return f(this.branches)}}function IM(f){let R=f.length,h=new Array(R);for(let $=0;$<R;$++){let[A,G]=f[$],H=PM(CF(A));h[$]={ast:H,terminal:{type:"terminal",valueContainer:{index:$,value:G,specificity:H.specificity}}}}return h}function PM(f){return bF(f),Uh(f),f}function bF(f){let R=[];f.list.forEach((h)=>{switch(h.type){case"class":R.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:h.specificity,type:"attrValue",value:h.name});break;case"id":R.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:h.specificity,type:"attrValue",value:h.name});break;case"combinator":bF(h.left),R.push(h);break;case"universal":break;default:R.push(h);break}}),f.list=R}function F0(f){let R=[];while(f.length){let h=sF(f,(H)=>!0,xF),{matches:$,nonmatches:A,empty:G}=BM(f,h);if(f=A,$.length)R.push(KM(h,$));if(G.length)R.push(...qM(G))}return R}function qM(f){let R=[];for(let h of f){let $=h.terminal;if($.type==="terminal")R.push($);else{let{matches:A,rest:G}=EM($.cont,(H)=>H.type==="terminal");if(A.forEach((H)=>R.push(H)),G.length)$.cont=G,R.push($)}}return R}function BM(f,R){let h=[],$=[],A=[];for(let G of f){let H=G.ast.list;if(H.length)(H.some((U)=>xF(U)===R)?h:$).push(G);else A.push(G)}return{matches:h,nonmatches:$,empty:A}}function xF(f){switch(f.type){case"attrPresence":return`attrPresence ${f.name}`;case"attrValue":return`attrValue ${f.name}`;case"combinator":return`combinator ${f.combinator}`;default:return f.type}}function KM(f,R){if(f==="tag")return vM(R);if(f.startsWith("attrValue "))return jM(f.substring(10),R);if(f.startsWith("attrPresence "))return yM(f.substring(13),R);if(f==="combinator >")return cF(">",R);if(f==="combinator +")return cF("+",R);throw new Error(`Unsupported selector kind: ${f}`)}function vM(f){let R=FG(f,($)=>$.type==="tag",($)=>$.name);return{type:"tagName",variants:Object.entries(R).map(([$,A])=>({type:"variant",value:$,cont:F0(A.items)}))}}function yM(f,R){for(let h of R)kF(h,($)=>$.type==="attrPresence"&&$.name===f);return{type:"attrPresence",name:f,cont:F0(R)}}function jM(f,R){let h=FG(R,(A)=>A.type==="attrValue"&&A.name===f,(A)=>`${A.matcher} ${A.modifier||""} ${A.value}`),$=[];for(let A of Object.values(h)){let G=A.oneSimpleSelector,H=OM(G),N=F0(A.items);$.push({type:"matcher",matcher:G.matcher,modifier:G.modifier,value:G.value,predicate:H,cont:N})}return{type:"attrValue",name:f,matchers:$}}function OM(f){if(f.modifier==="i"){let R=f.value.toLowerCase();switch(f.matcher){case"=":return(h)=>R===h.toLowerCase();case"~=":return(h)=>h.toLowerCase().split(/[ \t]+/).includes(R);case"^=":return(h)=>h.toLowerCase().startsWith(R);case"$=":return(h)=>h.toLowerCase().endsWith(R);case"*=":return(h)=>h.toLowerCase().includes(R);case"|=":return(h)=>{let $=h.toLowerCase();return R===$||$.startsWith(R)&&$[R.length]==="-"}}}else{let R=f.value;switch(f.matcher){case"=":return(h)=>R===h;case"~=":return(h)=>h.split(/[ \t]+/).includes(R);case"^=":return(h)=>h.startsWith(R);case"$=":return(h)=>h.endsWith(R);case"*=":return(h)=>h.includes(R);case"|=":return(h)=>R===h||h.startsWith(R)&&h[R.length]==="-"}}}function cF(f,R){let h=FG(R,(A)=>A.type==="combinator"&&A.combinator===f,(A)=>mf(A.left)),$=[];for(let A of Object.values(h)){let G=F0(A.items),H=A.oneSimpleSelector.left;$.push({ast:H,terminal:{type:"popElement",cont:G}})}return{type:"pushElement",combinator:f,cont:F0($)}}function FG(f,R,h){let $={};while(f.length){let A=sF(f,R,h),G=(S)=>R(S)&&h(S)===A,H=(S)=>S.ast.list.some(G),{matches:N,rest:U}=VM(f,H),F=null;for(let S of N){let D=kF(S,G);if(!F)F=D}if(F==null)throw new Error("No simple selector is found.");$[A]={oneSimpleSelector:F,items:N},f=U}return $}function kF(f,R){let h=f.ast.list,$=new Array(h.length),A=-1;for(let H=h.length;H-- >0;)if(R(h[H]))$[H]=!0,A=H;if(A==-1)throw new Error("Couldn't find the required simple selector.");let G=h[A];return f.ast.list=h.filter((H,N)=>!$[N]),G}function sF(f,R,h){let $={};for(let H of f){let N={};for(let U of H.ast.list.filter(R))N[h(U)]=!0;for(let U of Object.keys(N))if($[U])$[U]++;else $[U]=1}let A="",G=0;for(let H of Object.entries($))if(H[1]>G)A=H[0],G=H[1];return A}function EM(f,R){let h=[],$=[];for(let A of f)if(R(A))h.push(A);else $.push(A);return{matches:h,rest:$}}function VM(f,R){let h=[],$=[];for(let A of f)if(R(A))h.push(A);else $.push(A);return{matches:h,rest:$}}class WG{constructor(f){this.f=f}pickAll(f){return this.f(f)}pick1(f,R=!1){let h=this.f(f),$=h.length;if($===0)return null;if($===1)return h[0].value;let A=R?TM:gM,G=h[0];for(let H=1;H<$;H++){let N=h[H];if(A(G,N))G=N}return G.value}}function TM(f,R){let h=UG(R.specificity,f.specificity);return h>0||h===0&&R.index<f.index}function gM(f,R){let h=UG(R.specificity,f.specificity);return h>0||h===0&&R.index>f.index}function SG(f){return new WG(W0(f))}function W0(f){let R=f.map(CM);return(h,...$)=>R.flatMap((A)=>A(h,...$))}function CM(f){switch(f.type){case"terminal":{let R=[f.valueContainer];return(h,...$)=>R}case"tagName":return mM(f);case"attrValue":return bM(f);case"attrPresence":return cM(f);case"pushElement":return xM(f);case"popElement":return sM(f)}}function mM(f){let R={};for(let h of f.variants)R[h.value]=W0(h.cont);return(h,...$)=>{let A=R[h.name];return A?A(h,...$):[]}}function cM(f){let R=f.name,h=W0(f.cont);return($,...A)=>Object.prototype.hasOwnProperty.call($.attribs,R)?h($,...A):[]}function bM(f){let R=[];for(let $ of f.matchers){let A=$.predicate,G=W0($.cont);R.push((H,N,...U)=>A(H)?G(N,...U):[])}let h=f.name;return($,...A)=>{let G=$.attribs[h];return G||G===""?R.flatMap((H)=>H(G,$,...A)):[]}}function xM(f){let R=W0(f.cont),h=f.combinator==="+"?lF:kM;return($,...A)=>{let G=h($);if(G===null)return[];return R(G,$,...A)}}var lF=(f)=>{let R=f.prev;if(R===null)return null;return N$(R)?R:lF(R)},kM=(f)=>{let R=f.parent;return R&&N$(R)?R:null};function sM(f){let R=W0(f.cont);return(h,$,...A)=>R($,...A)}var M$=new Uint16Array("\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\x00\x00\x00\x00\x00\x00\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\uD835\uDD04rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\uD835\uDD38plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\uD835\uDC9Cign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\uD835\uDD05pf;\uC000\uD835\uDD39eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\uD835\uDC9Ep\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\uD835\uDD07\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\x00\x00\x00\u0342\u0354\x00\u0405f;\uC000\uD835\uDD3B\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\x00\x00\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\x00\x00\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\x00\u0446\x00\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\x00\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\uD835\uDC9Frok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\uD835\uDD08rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\x00\x00\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\uD835\uDD3Csilon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\uD835\uDD09lled\u0253\u0597\x00\x00\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\x00\u05BF\x00\x00\u05C4f;\uC000\uD835\uDD3DAll;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\uD835\uDD0A;\u62D9pf;\uC000\uD835\uDD3Eeater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\uD835\uDCA2;\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\x00\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\x00\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\uD835\uDD40a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\x00\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\uD835\uDD0Dpf;\uC000\uD835\uDD41\u01E3\u07C7\x00\u07CCr;\uC000\uD835\uDCA5rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\uD835\uDD0Epf;\uC000\uD835\uDD42cr;\uC000\uD835\uDCA6\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\x00\u08C3bleBracket;\u67E6n\u01D4\u08C8\x00\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\uD835\uDD0F\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\uD835\uDD43er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\uD835\uDD10nusPlus;\u6213pf;\uC000\uD835\uDD44c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\uD835\uDD11\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\uD835\uDCA9ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\uD835\uDD12rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\uD835\uDD46enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\uD835\uDCAAash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\uD835\uDD13i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\uD835\uDCAB;\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B\"\u4022r;\uC000\uD835\uDD14pf;\u611Acr;\uC000\uD835\uDCAC\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\x00\u1005bleBracket;\u67E7n\u01D4\u100A\x00\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\uD835\uDD16ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\uD835\uDD4A\u0272\u116D\x00\x00\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\uD835\uDCAEar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\uD835\uDD17\u0100ei\u127B\u1289\u01F2\u1280\x00\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\uD835\uDD4BipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\uD835\uDCAFrok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\x00\u132C\u1331\x00\x00\x00\x00\x00\u1338\u133D\u1377\u1385\x00\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\x00\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\uD835\uDD18rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\uD835\uDD4C\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\uD835\uDCB0ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\uD835\uDD19pf;\uC000\uD835\uDD4Dcr;\uC000\uD835\uDCB1dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\uD835\uDD1Apf;\uC000\uD835\uDD4Ecr;\uC000\uD835\uDCB2\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\uD835\uDD1B;\u439Epf;\uC000\uD835\uDD4Fcr;\uC000\uD835\uDCB3\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\uD835\uDD1Cpf;\uC000\uD835\uDD50cr;\uC000\uD835\uDCB4ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\x00\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\uD835\uDCB5\u0BE1\u1583\u158A\u1590\x00\u15B0\u15B6\u15BF\x00\x00\x00\x00\u15C6\u15DB\u15EB\u165F\u166D\x00\u1695\u169B\u16B2\u16B9\x00\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\uD835\uDD1Erave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\x00\x00\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\uD835\uDD52\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\uD835\uDCB6;\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\uD835\uDD1Fg\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\x00\x00\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\x00\u1833\u01B2\u182F\x00\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\uD835\uDD53\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\uD835\uDCB7mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\x00\u19E8\u1A11\u1A15\u1A32\x00\u1A37\u1A50\x00\x00\u1AB4\x00\x00\u1AC1\x00\x00\u1B21\u1B2E\u1B4D\u1B52\x00\u1BFD\x00\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\x00\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\uD835\uDD20\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\x00\x00\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\x00\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\x00\x00\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\x00\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\uD835\uDD54o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\uD835\uDCB8\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\x00\x00\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\x00\x00\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\uD835\uDD21ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\x00\x00\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\uD835\uDD55\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\x00\x00\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\uD835\uDCB9;\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\uD835\uDD22\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\uD835\uDD56\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\x00\x00\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\x00\u1F9E\x00\u1FA1\u1FA7\x00\x00\u1FC6\u1FCC\x00\u1FD3\x00\u1FE6\u1FEA\u2000\x00\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\x00\x00\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\uD835\uDD23lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\x00\u1FF3f;\uC000\uD835\uDD57\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\x00\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\x00\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\x00\u2036;\u6154;\u6156\u02B4\u203E\u2041\x00\x00\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\x00\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\uD835\uDCBB\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\uD835\uDD24\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\uD835\uDD58\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\x00\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\uD835\uDD25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\uD835\uDD59bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\uD835\uDCBDas\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\x00\u22AA\x00\u22B8\u22C5\u22CE\x00\u22D5\u22F3\x00\x00\u22F8\u2322\u2367\u2362\u237F\x00\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\uD835\uDD26rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\uD835\uDD5Aa;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\uD835\uDCBEn\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\x00\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\uD835\uDD27ath;\u4237pf;\uC000\uD835\uDD5B\u01E3\u23EC\x00\u23F1r;\uC000\uD835\uDCBFrcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\uD835\uDD28reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\uD835\uDD5Ccr;\uC000\uD835\uDCC0\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\x00\u24AA\x00\u24B1\x00\x00\x00\x00\x00\u24B5\u24BA\x00\u24C6\u24C8\u24CD\x00\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\uD835\uDD29\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\uD835\uDD5Dus;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\uD835\uDCC1m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\uD835\uDD2Ao;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\uD835\uDD5E\u0100ct\u28F8\u28FDr;\uC000\uD835\uDCC2pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\x00\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\x00\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\uD835\uDD2B\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\uD835\uDD5F\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\uD835\uDCC3ort\u026D\u2B05\x00\x00\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u2D2D\x00\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\x00\x00\u2D8D\u2DAB\x00\u2DC8\u2DCE\x00\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\uD835\uDD2C\u036F\u2D79\x00\x00\u2D7C\x00\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\uD835\uDD60\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\x00\u2E7D\x00\u2E80\u2E9D\x00\u2EA2\u2EB9\x00\x00\u2ECB\u0E9C\x00\u2F13\x00\x00\u2F2B\u2FBC\x00\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\x00\x00\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\uD835\uDD2D\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\uD835\uDD61nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\uD835\uDCC5;\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\uD835\uDD2Epf;\uC000\uD835\uDD62rime;\u6057cr;\uC000\uD835\uDCC6\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\uD835\uDD2F\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\uD835\uDD63us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\uD835\uDCC7\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\x00\u337A\u33A4\x00\x00\u33EC\u33F0\x00\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\x00\u3616\x00\x00\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\x00\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\uD835\uDD30\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\x00\x00\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\uD835\uDD64a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\uD835\uDCC8tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\x00\u367E\u36C2\x00\x00\x00\x00\x00\u36DB\u3703\x00\u3709\u376C\x00\x00\x00\u3787\u0272\u3656\x00\x00\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\uD835\uDD31\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\x00\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\uD835\uDD65rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\uD835\uDCC9;\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\x00\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\uD835\uDD32rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\x00\x00\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\uD835\uDD66\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\x00\x00\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\uD835\uDCCA\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\uD835\uDD33tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\uD835\uDD67ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\uD835\uDCCB\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\uD835\uDD34pf;\uC000\uD835\uDD68\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\uD835\uDCCC\u0AE3\u178E\u3A87\x00\u3A8B\x00\u3A90\u3A9B\x00\x00\u3A9D\u3AA8\u3AAB\u3AAF\x00\x00\u3AC3\u3ACE\x00\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\uD835\uDD35\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\uD835\uDD69im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\uD835\uDCCD\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\uD835\uDD36cy;\u4457pf;\uC000\uD835\uDD6Acr;\uC000\uD835\uDCCE\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\uD835\uDD37cy;\u4436grarr;\u61DDpf;\uC000\uD835\uDD6Bcr;\uC000\uD835\uDCCF\u0100jn\u3B85\u3B87;\u600Dj;\u600C".split("").map((f)=>f.charCodeAt(0)));var J$=new Uint16Array("\u0200aglq\t\x15\x18\x1B\u026D\x0F\x00\x00\x12p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((f)=>f.charCodeAt(0)));var YG,lM=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),S0=(YG=String.fromCodePoint)!==null&&YG!==void 0?YG:function(f){let R="";if(f>65535)f-=65536,R+=String.fromCharCode(f>>>10&1023|55296),f=56320|f&1023;return R+=String.fromCharCode(f),R};function Yh(f){var R;if(f>=55296&&f<=57343||f>1114111)return 65533;return(R=lM.get(f))!==null&&R!==void 0?R:f}var $f;(function(f){f[f.NUM=35]="NUM",f[f.SEMI=59]="SEMI",f[f.EQUALS=61]="EQUALS",f[f.ZERO=48]="ZERO",f[f.NINE=57]="NINE",f[f.LOWER_A=97]="LOWER_A",f[f.LOWER_F=102]="LOWER_F",f[f.LOWER_X=120]="LOWER_X",f[f.LOWER_Z=122]="LOWER_Z",f[f.UPPER_A=65]="UPPER_A",f[f.UPPER_F=70]="UPPER_F",f[f.UPPER_Z=90]="UPPER_Z"})($f||($f={}));var _M=32,Pf;(function(f){f[f.VALUE_LENGTH=49152]="VALUE_LENGTH",f[f.BRANCH_LENGTH=16256]="BRANCH_LENGTH",f[f.JUMP_TABLE=127]="JUMP_TABLE"})(Pf||(Pf={}));function DG(f){return f>=$f.ZERO&&f<=$f.NINE}function dM(f){return f>=$f.UPPER_A&&f<=$f.UPPER_F||f>=$f.LOWER_A&&f<=$f.LOWER_F}function aM(f){return f>=$f.UPPER_A&&f<=$f.UPPER_Z||f>=$f.LOWER_A&&f<=$f.LOWER_Z||DG(f)}function rM(f){return f===$f.EQUALS||aM(f)}var hf;(function(f){f[f.EntityStart=0]="EntityStart",f[f.NumericStart=1]="NumericStart",f[f.NumericDecimal=2]="NumericDecimal",f[f.NumericHex=3]="NumericHex",f[f.NamedEntity=4]="NamedEntity"})(hf||(hf={}));var mR;(function(f){f[f.Legacy=0]="Legacy",f[f.Strict=1]="Strict",f[f.Attribute=2]="Attribute"})(mR||(mR={}));class _F{constructor(f,R,h){this.decodeTree=f,this.emitCodePoint=R,this.errors=h,this.state=hf.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=mR.Strict}startEntity(f){this.decodeMode=f,this.state=hf.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(f,R){switch(this.state){case hf.EntityStart:{if(f.charCodeAt(R)===$f.NUM)return this.state=hf.NumericStart,this.consumed+=1,this.stateNumericStart(f,R+1);return this.state=hf.NamedEntity,this.stateNamedEntity(f,R)}case hf.NumericStart:return this.stateNumericStart(f,R);case hf.NumericDecimal:return this.stateNumericDecimal(f,R);case hf.NumericHex:return this.stateNumericHex(f,R);case hf.NamedEntity:return this.stateNamedEntity(f,R)}}stateNumericStart(f,R){if(R>=f.length)return-1;if((f.charCodeAt(R)|_M)===$f.LOWER_X)return this.state=hf.NumericHex,this.consumed+=1,this.stateNumericHex(f,R+1);return this.state=hf.NumericDecimal,this.stateNumericDecimal(f,R)}addToNumericResult(f,R,h,$){if(R!==h){let A=h-R;this.result=this.result*Math.pow($,A)+parseInt(f.substr(R,A),$),this.consumed+=A}}stateNumericHex(f,R){let h=R;while(R<f.length){let $=f.charCodeAt(R);if(DG($)||dM($))R+=1;else return this.addToNumericResult(f,h,R,16),this.emitNumericEntity($,3)}return this.addToNumericResult(f,h,R,16),-1}stateNumericDecimal(f,R){let h=R;while(R<f.length){let $=f.charCodeAt(R);if(DG($))R+=1;else return this.addToNumericResult(f,h,R,10),this.emitNumericEntity($,2)}return this.addToNumericResult(f,h,R,10),-1}emitNumericEntity(f,R){var h;if(this.consumed<=R)return(h=this.errors)===null||h===void 0||h.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(f===$f.SEMI)this.consumed+=1;else if(this.decodeMode===mR.Strict)return 0;if(this.emitCodePoint(Yh(this.result),this.consumed),this.errors){if(f!==$f.SEMI)this.errors.missingSemicolonAfterCharacterReference();this.errors.validateNumericCharacterReference(this.result)}return this.consumed}stateNamedEntity(f,R){let{decodeTree:h}=this,$=h[this.treeIndex],A=($&Pf.VALUE_LENGTH)>>14;for(;R<f.length;R++,this.excess++){let G=f.charCodeAt(R);if(this.treeIndex=ZG(h,$,this.treeIndex+Math.max(1,A),G),this.treeIndex<0)return this.result===0||this.decodeMode===mR.Attribute&&(A===0||rM(G))?0:this.emitNotTerminatedNamedEntity();if($=h[this.treeIndex],A=($&Pf.VALUE_LENGTH)>>14,A!==0){if(G===$f.SEMI)return this.emitNamedEntityData(this.treeIndex,A,this.consumed+this.excess);if(this.decodeMode!==mR.Strict)this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0}}return-1}emitNotTerminatedNamedEntity(){var f;let{result:R,decodeTree:h}=this,$=(h[R]&Pf.VALUE_LENGTH)>>14;return this.emitNamedEntityData(R,$,this.consumed),(f=this.errors)===null||f===void 0||f.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(f,R,h){let{decodeTree:$}=this;if(this.emitCodePoint(R===1?$[f]&~Pf.VALUE_LENGTH:$[f+1],h),R===3)this.emitCodePoint($[f+2],h);return h}end(){var f;switch(this.state){case hf.NamedEntity:return this.result!==0&&(this.decodeMode!==mR.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case hf.NumericDecimal:return this.emitNumericEntity(0,2);case hf.NumericHex:return this.emitNumericEntity(0,3);case hf.NumericStart:return(f=this.errors)===null||f===void 0||f.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case hf.EntityStart:return 0}}}function dF(f){let R="",h=new _F(f,($)=>R+=S0($));return function $(A,G){let H=0,N=0;while((N=A.indexOf("&",N))>=0){R+=A.slice(H,N),h.startEntity(G);let F=h.write(A,N+1);if(F<0){H=N+h.end();break}H=N+F,N=F===0?H+1:H}let U=R+A.slice(H);return R="",U}}function ZG(f,R,h,$){let A=(R&Pf.BRANCH_LENGTH)>>7,G=R&Pf.JUMP_TABLE;if(A===0)return G!==0&&$===G?h:-1;if(G){let U=$-G;return U<0||U>=A?-1:f[h+U]-1}let H=h,N=H+A-1;while(H<=N){let U=H+N>>>1,F=f[U];if(F<$)H=U+1;else if(F>$)N=U-1;else return f[U+A]}return-1}var sv=dF(M$),lv=dF(J$);var M;(function(f){f[f.Tab=9]="Tab",f[f.NewLine=10]="NewLine",f[f.FormFeed=12]="FormFeed",f[f.CarriageReturn=13]="CarriageReturn",f[f.Space=32]="Space",f[f.ExclamationMark=33]="ExclamationMark",f[f.Number=35]="Number",f[f.Amp=38]="Amp",f[f.SingleQuote=39]="SingleQuote",f[f.DoubleQuote=34]="DoubleQuote",f[f.Dash=45]="Dash",f[f.Slash=47]="Slash",f[f.Zero=48]="Zero",f[f.Nine=57]="Nine",f[f.Semi=59]="Semi",f[f.Lt=60]="Lt",f[f.Eq=61]="Eq",f[f.Gt=62]="Gt",f[f.Questionmark=63]="Questionmark",f[f.UpperA=65]="UpperA",f[f.LowerA=97]="LowerA",f[f.UpperF=70]="UpperF",f[f.LowerF=102]="LowerF",f[f.UpperZ=90]="UpperZ",f[f.LowerZ=122]="LowerZ",f[f.LowerX=120]="LowerX",f[f.OpeningSquareBracket=91]="OpeningSquareBracket"})(M||(M={}));var Y;(function(f){f[f.Text=1]="Text",f[f.BeforeTagName=2]="BeforeTagName",f[f.InTagName=3]="InTagName",f[f.InSelfClosingTag=4]="InSelfClosingTag",f[f.BeforeClosingTagName=5]="BeforeClosingTagName",f[f.InClosingTagName=6]="InClosingTagName",f[f.AfterClosingTagName=7]="AfterClosingTagName",f[f.BeforeAttributeName=8]="BeforeAttributeName",f[f.InAttributeName=9]="InAttributeName",f[f.AfterAttributeName=10]="AfterAttributeName",f[f.BeforeAttributeValue=11]="BeforeAttributeValue",f[f.InAttributeValueDq=12]="InAttributeValueDq",f[f.InAttributeValueSq=13]="InAttributeValueSq",f[f.InAttributeValueNq=14]="InAttributeValueNq",f[f.BeforeDeclaration=15]="BeforeDeclaration",f[f.InDeclaration=16]="InDeclaration",f[f.InProcessingInstruction=17]="InProcessingInstruction",f[f.BeforeComment=18]="BeforeComment",f[f.CDATASequence=19]="CDATASequence",f[f.InSpecialComment=20]="InSpecialComment",f[f.InCommentLike=21]="InCommentLike",f[f.BeforeSpecialS=22]="BeforeSpecialS",f[f.SpecialStartSequence=23]="SpecialStartSequence",f[f.InSpecialTag=24]="InSpecialTag",f[f.BeforeEntity=25]="BeforeEntity",f[f.BeforeNumericEntity=26]="BeforeNumericEntity",f[f.InNamedEntity=27]="InNamedEntity",f[f.InNumericEntity=28]="InNumericEntity",f[f.InHexEntity=29]="InHexEntity"})(Y||(Y={}));function nf(f){return f===M.Space||f===M.NewLine||f===M.Tab||f===M.FormFeed||f===M.CarriageReturn}function X$(f){return f===M.Slash||f===M.Gt||nf(f)}function aF(f){return f>=M.Zero&&f<=M.Nine}function iM(f){return f>=M.LowerA&&f<=M.LowerZ||f>=M.UpperA&&f<=M.UpperZ}function pM(f){return f>=M.UpperA&&f<=M.UpperF||f>=M.LowerA&&f<=M.LowerF}var cf;(function(f){f[f.NoValue=0]="NoValue",f[f.Unquoted=1]="Unquoted",f[f.Single=2]="Single",f[f.Double=3]="Double"})(cf||(cf={}));var wf={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class z${constructor({xmlMode:f=!1,decodeEntities:R=!0},h){this.cbs=h,this.state=Y.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Y.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=f,this.decodeEntities=R,this.entityTrie=f?J$:M$}reset(){this.state=Y.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Y.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()}end(){if(this.running)this.finish()}pause(){this.running=!1}resume(){if(this.running=!0,this.index<this.buffer.length+this.offset)this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(f){if(f===M.Lt||!this.decodeEntities&&this.fastForwardTo(M.Lt)){if(this.index>this.sectionStart)this.cbs.ontext(this.sectionStart,this.index);this.state=Y.BeforeTagName,this.sectionStart=this.index}else if(this.decodeEntities&&f===M.Amp)this.state=Y.BeforeEntity}stateSpecialStartSequence(f){let R=this.sequenceIndex===this.currentSequence.length;if(!(R?X$(f):(f|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!R){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=Y.InTagName,this.stateInTagName(f)}stateInSpecialTag(f){if(this.sequenceIndex===this.currentSequence.length){if(f===M.Gt||nf(f)){let R=this.index-this.currentSequence.length;if(this.sectionStart<R){let h=this.index;this.index=R,this.cbs.ontext(this.sectionStart,R),this.index=h}this.isSpecial=!1,this.sectionStart=R+2,this.stateInClosingTagName(f);return}this.sequenceIndex=0}if((f|32)===this.currentSequence[this.sequenceIndex])this.sequenceIndex+=1;else if(this.sequenceIndex===0){if(this.currentSequence===wf.TitleEnd){if(this.decodeEntities&&f===M.Amp)this.state=Y.BeforeEntity}else if(this.fastForwardTo(M.Lt))this.sequenceIndex=1}else this.sequenceIndex=Number(f===M.Lt)}stateCDATASequence(f){if(f===wf.Cdata[this.sequenceIndex]){if(++this.sequenceIndex===wf.Cdata.length)this.state=Y.InCommentLike,this.currentSequence=wf.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1}else this.sequenceIndex=0,this.state=Y.InDeclaration,this.stateInDeclaration(f)}fastForwardTo(f){while(++this.index<this.buffer.length+this.offset)if(this.buffer.charCodeAt(this.index-this.offset)===f)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(f){if(f===this.currentSequence[this.sequenceIndex]){if(++this.sequenceIndex===this.currentSequence.length){if(this.currentSequence===wf.CdataEnd)this.cbs.oncdata(this.sectionStart,this.index,2);else this.cbs.oncomment(this.sectionStart,this.index,2);this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=Y.Text}}else if(this.sequenceIndex===0){if(this.fastForwardTo(this.currentSequence[0]))this.sequenceIndex=1}else if(f!==this.currentSequence[this.sequenceIndex-1])this.sequenceIndex=0}isTagStartChar(f){return this.xmlMode?!X$(f):iM(f)}startSpecial(f,R){this.isSpecial=!0,this.currentSequence=f,this.sequenceIndex=R,this.state=Y.SpecialStartSequence}stateBeforeTagName(f){if(f===M.ExclamationMark)this.state=Y.BeforeDeclaration,this.sectionStart=this.index+1;else if(f===M.Questionmark)this.state=Y.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(f)){let R=f|32;if(this.sectionStart=this.index,!this.xmlMode&&R===wf.TitleEnd[2])this.startSpecial(wf.TitleEnd,3);else this.state=!this.xmlMode&&R===wf.ScriptEnd[2]?Y.BeforeSpecialS:Y.InTagName}else if(f===M.Slash)this.state=Y.BeforeClosingTagName;else this.state=Y.Text,this.stateText(f)}stateInTagName(f){if(X$(f))this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f)}stateBeforeClosingTagName(f){if(nf(f));else if(f===M.Gt)this.state=Y.Text;else this.state=this.isTagStartChar(f)?Y.InClosingTagName:Y.InSpecialComment,this.sectionStart=this.index}stateInClosingTagName(f){if(f===M.Gt||nf(f))this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=Y.AfterClosingTagName,this.stateAfterClosingTagName(f)}stateAfterClosingTagName(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.state=Y.Text,this.baseState=Y.Text,this.sectionStart=this.index+1}stateBeforeAttributeName(f){if(f===M.Gt){if(this.cbs.onopentagend(this.index),this.isSpecial)this.state=Y.InSpecialTag,this.sequenceIndex=0;else this.state=Y.Text;this.baseState=this.state,this.sectionStart=this.index+1}else if(f===M.Slash)this.state=Y.InSelfClosingTag;else if(!nf(f))this.state=Y.InAttributeName,this.sectionStart=this.index}stateInSelfClosingTag(f){if(f===M.Gt)this.cbs.onselfclosingtag(this.index),this.state=Y.Text,this.baseState=Y.Text,this.sectionStart=this.index+1,this.isSpecial=!1;else if(!nf(f))this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f)}stateInAttributeName(f){if(f===M.Eq||X$(f))this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Y.AfterAttributeName,this.stateAfterAttributeName(f)}stateAfterAttributeName(f){if(f===M.Eq)this.state=Y.BeforeAttributeValue;else if(f===M.Slash||f===M.Gt)this.cbs.onattribend(cf.NoValue,this.index),this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f);else if(!nf(f))this.cbs.onattribend(cf.NoValue,this.index),this.state=Y.InAttributeName,this.sectionStart=this.index}stateBeforeAttributeValue(f){if(f===M.DoubleQuote)this.state=Y.InAttributeValueDq,this.sectionStart=this.index+1;else if(f===M.SingleQuote)this.state=Y.InAttributeValueSq,this.sectionStart=this.index+1;else if(!nf(f))this.sectionStart=this.index,this.state=Y.InAttributeValueNq,this.stateInAttributeValueNoQuotes(f)}handleInAttributeValue(f,R){if(f===R||!this.decodeEntities&&this.fastForwardTo(R))this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(R===M.DoubleQuote?cf.Double:cf.Single,this.index),this.state=Y.BeforeAttributeName;else if(this.decodeEntities&&f===M.Amp)this.baseState=this.state,this.state=Y.BeforeEntity}stateInAttributeValueDoubleQuotes(f){this.handleInAttributeValue(f,M.DoubleQuote)}stateInAttributeValueSingleQuotes(f){this.handleInAttributeValue(f,M.SingleQuote)}stateInAttributeValueNoQuotes(f){if(nf(f)||f===M.Gt)this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(cf.Unquoted,this.index),this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f);else if(this.decodeEntities&&f===M.Amp)this.baseState=this.state,this.state=Y.BeforeEntity}stateBeforeDeclaration(f){if(f===M.OpeningSquareBracket)this.state=Y.CDATASequence,this.sequenceIndex=0;else this.state=f===M.Dash?Y.BeforeComment:Y.InDeclaration}stateInDeclaration(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.cbs.ondeclaration(this.sectionStart,this.index),this.state=Y.Text,this.sectionStart=this.index+1}stateInProcessingInstruction(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=Y.Text,this.sectionStart=this.index+1}stateBeforeComment(f){if(f===M.Dash)this.state=Y.InCommentLike,this.currentSequence=wf.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1;else this.state=Y.InDeclaration}stateInSpecialComment(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Y.Text,this.sectionStart=this.index+1}stateBeforeSpecialS(f){let R=f|32;if(R===wf.ScriptEnd[3])this.startSpecial(wf.ScriptEnd,4);else if(R===wf.StyleEnd[3])this.startSpecial(wf.StyleEnd,4);else this.state=Y.InTagName,this.stateInTagName(f)}stateBeforeEntity(f){if(this.entityExcess=1,this.entityResult=0,f===M.Number)this.state=Y.BeforeNumericEntity;else if(f===M.Amp);else this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=Y.InNamedEntity,this.stateInNamedEntity(f)}stateInNamedEntity(f){if(this.entityExcess+=1,this.trieIndex=ZG(this.entityTrie,this.trieCurrent,this.trieIndex+1,f),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];let R=this.trieCurrent&Pf.VALUE_LENGTH;if(R){let h=(R>>14)-1;if(!this.allowLegacyEntity()&&f!==M.Semi)this.trieIndex+=h;else{let $=this.index-this.entityExcess+1;if($>this.sectionStart)this.emitPartial(this.sectionStart,$);if(this.entityResult=this.trieIndex,this.trieIndex+=h,this.entityExcess=0,this.sectionStart=this.index+1,h===0)this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&Pf.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~Pf.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(f){if((f|32)===M.LowerX)this.entityExcess++,this.state=Y.InHexEntity;else this.state=Y.InNumericEntity,this.stateInNumericEntity(f)}emitNumericEntity(f){let R=this.index-this.entityExcess-1;if(R+2+Number(this.state===Y.InHexEntity)!==this.index){if(R>this.sectionStart)this.emitPartial(this.sectionStart,R);this.sectionStart=this.index+Number(f),this.emitCodePoint(Yh(this.entityResult))}this.state=this.baseState}stateInNumericEntity(f){if(f===M.Semi)this.emitNumericEntity(!0);else if(aF(f))this.entityResult=this.entityResult*10+(f-M.Zero),this.entityExcess++;else{if(this.allowLegacyEntity())this.emitNumericEntity(!1);else this.state=this.baseState;this.index--}}stateInHexEntity(f){if(f===M.Semi)this.emitNumericEntity(!0);else if(aF(f))this.entityResult=this.entityResult*16+(f-M.Zero),this.entityExcess++;else if(pM(f))this.entityResult=this.entityResult*16+((f|32)-M.LowerA+10),this.entityExcess++;else{if(this.allowLegacyEntity())this.emitNumericEntity(!1);else this.state=this.baseState;this.index--}}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===Y.Text||this.baseState===Y.InSpecialTag)}cleanup(){if(this.running&&this.sectionStart!==this.index){if(this.state===Y.Text||this.state===Y.InSpecialTag&&this.sequenceIndex===0)this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index;else if(this.state===Y.InAttributeValueDq||this.state===Y.InAttributeValueSq||this.state===Y.InAttributeValueNq)this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index}}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){while(this.shouldContinue()){let f=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case Y.Text:{this.stateText(f);break}case Y.SpecialStartSequence:{this.stateSpecialStartSequence(f);break}case Y.InSpecialTag:{this.stateInSpecialTag(f);break}case Y.CDATASequence:{this.stateCDATASequence(f);break}case Y.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(f);break}case Y.InAttributeName:{this.stateInAttributeName(f);break}case Y.InCommentLike:{this.stateInCommentLike(f);break}case Y.InSpecialComment:{this.stateInSpecialComment(f);break}case Y.BeforeAttributeName:{this.stateBeforeAttributeName(f);break}case Y.InTagName:{this.stateInTagName(f);break}case Y.InClosingTagName:{this.stateInClosingTagName(f);break}case Y.BeforeTagName:{this.stateBeforeTagName(f);break}case Y.AfterAttributeName:{this.stateAfterAttributeName(f);break}case Y.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(f);break}case Y.BeforeAttributeValue:{this.stateBeforeAttributeValue(f);break}case Y.BeforeClosingTagName:{this.stateBeforeClosingTagName(f);break}case Y.AfterClosingTagName:{this.stateAfterClosingTagName(f);break}case Y.BeforeSpecialS:{this.stateBeforeSpecialS(f);break}case Y.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(f);break}case Y.InSelfClosingTag:{this.stateInSelfClosingTag(f);break}case Y.InDeclaration:{this.stateInDeclaration(f);break}case Y.BeforeDeclaration:{this.stateBeforeDeclaration(f);break}case Y.BeforeComment:{this.stateBeforeComment(f);break}case Y.InProcessingInstruction:{this.stateInProcessingInstruction(f);break}case Y.InNamedEntity:{this.stateInNamedEntity(f);break}case Y.BeforeEntity:{this.stateBeforeEntity(f);break}case Y.InHexEntity:{this.stateInHexEntity(f);break}case Y.InNumericEntity:{this.stateInNumericEntity(f);break}default:this.stateBeforeNumericEntity(f)}this.index++}this.cleanup()}finish(){if(this.state===Y.InNamedEntity)this.emitNamedEntity();if(this.sectionStart<this.index)this.handleTrailingData();this.cbs.onend()}handleTrailingData(){let f=this.buffer.length+this.offset;if(this.state===Y.InCommentLike)if(this.currentSequence===wf.CdataEnd)this.cbs.oncdata(this.sectionStart,f,0);else this.cbs.oncomment(this.sectionStart,f,0);else if(this.state===Y.InNumericEntity&&this.allowLegacyEntity())this.emitNumericEntity(!1);else if(this.state===Y.InHexEntity&&this.allowLegacyEntity())this.emitNumericEntity(!1);else if(this.state===Y.InTagName||this.state===Y.BeforeAttributeName||this.state===Y.BeforeAttributeValue||this.state===Y.AfterAttributeName||this.state===Y.InAttributeName||this.state===Y.InAttributeValueSq||this.state===Y.InAttributeValueDq||this.state===Y.InAttributeValueNq||this.state===Y.InClosingTagName);else this.cbs.ontext(this.sectionStart,f)}emitPartial(f,R){if(this.baseState!==Y.Text&&this.baseState!==Y.InSpecialTag)this.cbs.onattribdata(f,R);else this.cbs.ontext(f,R)}emitCodePoint(f){if(this.baseState!==Y.Text&&this.baseState!==Y.InSpecialTag)this.cbs.onattribentity(f);else this.cbs.ontextentity(f)}}var Y0=new Set(["input","option","optgroup","select","button","datalist","textarea"]),m=new Set(["p"]),rF=new Set(["thead","tbody"]),iF=new Set(["dd","dt"]),pF=new Set(["rt","rp"]),oM=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",m],["h1",m],["h2",m],["h3",m],["h4",m],["h5",m],["h6",m],["select",Y0],["input",Y0],["output",Y0],["button",Y0],["datalist",Y0],["textarea",Y0],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",iF],["dt",iF],["address",m],["article",m],["aside",m],["blockquote",m],["details",m],["div",m],["dl",m],["fieldset",m],["figcaption",m],["figure",m],["footer",m],["form",m],["header",m],["hr",m],["main",m],["nav",m],["ol",m],["pre",m],["section",m],["table",m],["ul",m],["rt",pF],["rp",pF],["tbody",rF],["tfoot",rF]]),nM=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),oF=new Set(["math","svg"]),nF=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),eM=/\s|\//;class MG{constructor(f,R={}){var h,$,A,G,H;this.options=R,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=f!==null&&f!==void 0?f:{},this.lowerCaseTagNames=(h=R.lowerCaseTags)!==null&&h!==void 0?h:!R.xmlMode,this.lowerCaseAttributeNames=($=R.lowerCaseAttributeNames)!==null&&$!==void 0?$:!R.xmlMode,this.tokenizer=new((A=R.Tokenizer)!==null&&A!==void 0?A:z$)(this.options,this),(H=(G=this.cbs).onparserinit)===null||H===void 0||H.call(G,this)}ontext(f,R){var h,$;let A=this.getSlice(f,R);this.endIndex=R-1,($=(h=this.cbs).ontext)===null||$===void 0||$.call(h,A),this.startIndex=R}ontextentity(f){var R,h;let $=this.tokenizer.getSectionStart();this.endIndex=$-1,(h=(R=this.cbs).ontext)===null||h===void 0||h.call(R,S0(f)),this.startIndex=$}isVoidElement(f){return!this.options.xmlMode&&nM.has(f)}onopentagname(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.lowerCaseTagNames)h=h.toLowerCase();this.emitOpenTag(h)}emitOpenTag(f){var R,h,$,A;this.openTagStart=this.startIndex,this.tagname=f;let G=!this.options.xmlMode&&oM.get(f);if(G)while(this.stack.length>0&&G.has(this.stack[this.stack.length-1])){let H=this.stack.pop();(h=(R=this.cbs).onclosetag)===null||h===void 0||h.call(R,H,!0)}if(!this.isVoidElement(f)){if(this.stack.push(f),oF.has(f))this.foreignContext.push(!0);else if(nF.has(f))this.foreignContext.push(!1)}if((A=($=this.cbs).onopentagname)===null||A===void 0||A.call($,f),this.cbs.onopentag)this.attribs={}}endOpenTag(f){var R,h;if(this.startIndex=this.openTagStart,this.attribs)(h=(R=this.cbs).onopentag)===null||h===void 0||h.call(R,this.tagname,this.attribs,f),this.attribs=null;if(this.cbs.onclosetag&&this.isVoidElement(this.tagname))this.cbs.onclosetag(this.tagname,!0);this.tagname=""}onopentagend(f){this.endIndex=f,this.endOpenTag(!1),this.startIndex=f+1}onclosetag(f,R){var h,$,A,G,H,N;this.endIndex=R;let U=this.getSlice(f,R);if(this.lowerCaseTagNames)U=U.toLowerCase();if(oF.has(U)||nF.has(U))this.foreignContext.pop();if(!this.isVoidElement(U)){let F=this.stack.lastIndexOf(U);if(F!==-1)if(this.cbs.onclosetag){let S=this.stack.length-F;while(S--)this.cbs.onclosetag(this.stack.pop(),S!==0)}else this.stack.length=F;else if(!this.options.xmlMode&&U==="p")this.emitOpenTag("p"),this.closeCurrentTag(!0)}else if(!this.options.xmlMode&&U==="br")($=(h=this.cbs).onopentagname)===null||$===void 0||$.call(h,"br"),(G=(A=this.cbs).onopentag)===null||G===void 0||G.call(A,"br",{},!0),(N=(H=this.cbs).onclosetag)===null||N===void 0||N.call(H,"br",!1);this.startIndex=R+1}onselfclosingtag(f){if(this.endIndex=f,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1])this.closeCurrentTag(!1),this.startIndex=f+1;else this.onopentagend(f)}closeCurrentTag(f){var R,h;let $=this.tagname;if(this.endOpenTag(f),this.stack[this.stack.length-1]===$)(h=(R=this.cbs).onclosetag)===null||h===void 0||h.call(R,$,!f),this.stack.pop()}onattribname(f,R){this.startIndex=f;let h=this.getSlice(f,R);this.attribname=this.lowerCaseAttributeNames?h.toLowerCase():h}onattribdata(f,R){this.attribvalue+=this.getSlice(f,R)}onattribentity(f){this.attribvalue+=S0(f)}onattribend(f,R){var h,$;if(this.endIndex=R,($=(h=this.cbs).onattribute)===null||$===void 0||$.call(h,this.attribname,this.attribvalue,f===cf.Double?'"':f===cf.Single?"'":f===cf.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname))this.attribs[this.attribname]=this.attribvalue;this.attribvalue=""}getInstructionName(f){let R=f.search(eM),h=R<0?f:f.substr(0,R);if(this.lowerCaseTagNames)h=h.toLowerCase();return h}ondeclaration(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.cbs.onprocessinginstruction){let $=this.getInstructionName(h);this.cbs.onprocessinginstruction(`!${$}`,`!${h}`)}this.startIndex=R+1}onprocessinginstruction(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.cbs.onprocessinginstruction){let $=this.getInstructionName(h);this.cbs.onprocessinginstruction(`?${$}`,`?${h}`)}this.startIndex=R+1}oncomment(f,R,h){var $,A,G,H;this.endIndex=R,(A=($=this.cbs).oncomment)===null||A===void 0||A.call($,this.getSlice(f,R-h)),(H=(G=this.cbs).oncommentend)===null||H===void 0||H.call(G),this.startIndex=R+1}oncdata(f,R,h){var $,A,G,H,N,U,F,S,D,J;this.endIndex=R;let Z=this.getSlice(f,R-h);if(this.options.xmlMode||this.options.recognizeCDATA)(A=($=this.cbs).oncdatastart)===null||A===void 0||A.call($),(H=(G=this.cbs).ontext)===null||H===void 0||H.call(G,Z),(U=(N=this.cbs).oncdataend)===null||U===void 0||U.call(N);else(S=(F=this.cbs).oncomment)===null||S===void 0||S.call(F,`[CDATA[${Z}]]`),(J=(D=this.cbs).oncommentend)===null||J===void 0||J.call(D);this.startIndex=R+1}onend(){var f,R;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let h=this.stack.length;h>0;this.cbs.onclosetag(this.stack[--h],!0));}(R=(f=this.cbs).onend)===null||R===void 0||R.call(f)}reset(){var f,R,h,$;(R=(f=this.cbs).onreset)===null||R===void 0||R.call(f),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,($=(h=this.cbs).onparserinit)===null||$===void 0||$.call(h,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(f){this.reset(),this.end(f)}getSlice(f,R){while(f-this.bufferOffset>=this.buffers[0].length)this.shiftBuffer();let h=this.buffers[0].slice(f-this.bufferOffset,R-this.bufferOffset);while(R-this.bufferOffset>this.buffers[0].length)this.shiftBuffer(),h+=this.buffers[0].slice(0,R-this.bufferOffset);return h}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(f){var R,h;if(this.ended){(h=(R=this.cbs).onerror)===null||h===void 0||h.call(R,new Error(".write() after done!"));return}if(this.buffers.push(f),this.tokenizer.running)this.tokenizer.write(f),this.writeIndex++}end(f){var R,h;if(this.ended){(h=(R=this.cbs).onerror)===null||h===void 0||h.call(R,new Error(".end() after done!"));return}if(f)this.write(f);this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){this.tokenizer.resume();while(this.tokenizer.running&&this.writeIndex<this.buffers.length)this.tokenizer.write(this.buffers[this.writeIndex++]);if(this.ended)this.tokenizer.end()}parseChunk(f){this.write(f)}done(f){this.end(f)}}var eF=/["&'<>$\x80-\uFFFF]/g,uF=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),uM=String.prototype.codePointAt!=null?(f,R)=>f.codePointAt(R):(f,R)=>(f.charCodeAt(R)&64512)===55296?(f.charCodeAt(R)-55296)*1024+f.charCodeAt(R+1)-56320+65536:f.charCodeAt(R);function Q$(f){let R="",h=0,$;while(($=eF.exec(f))!==null){let A=$.index,G=f.charCodeAt(A),H=uF.get(G);if(H!==void 0)R+=f.substring(h,A)+H,h=A+1;else R+=`${f.substring(h,A)}&#x${uM(f,A).toString(16)};`,h=eF.lastIndex+=Number((G&64512)===55296)}return R+f.substr(h)}function JG(f,R){return function h($){let A,G=0,H="";while(A=f.exec($)){if(G!==A.index)H+=$.substring(G,A.index);H+=R.get(A[0].charCodeAt(0)),G=A.index+1}return H+$.substring(G)}}var tM=JG(/[&<>'"]/g,uF),XG=JG(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),zG=JG(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var tF;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})(tF||(tF={}));var fW;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})(fW||(fW={}));var RW=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((f)=>[f.toLowerCase(),f])),hW=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((f)=>[f.toLowerCase(),f]));var f5=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function R5(f){return f.replace(/"/g,"&quot;")}function h5(f,R){var h;if(!f)return;let $=((h=R.encodeEntities)!==null&&h!==void 0?h:R.decodeEntities)===!1?R5:R.xmlMode||R.encodeEntities!=="utf8"?Q$:XG;return Object.keys(f).map((A)=>{var G,H;let N=(G=f[A])!==null&&G!==void 0?G:"";if(R.xmlMode==="foreign")A=(H=hW.get(A))!==null&&H!==void 0?H:A;if(!R.emptyAttrs&&!R.xmlMode&&N==="")return A;return`${A}="${$(N)}"`}).join(" ")}var $W=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Dh(f,R={}){let h="length"in f?f:[f],$="";for(let A=0;A<h.length;A++)$+=$5(h[A],R);return $}function $5(f,R){switch(f.type){case FF:return Dh(f.children,R);case XF:case SF:return N5(f);case YF:return W5(f);case JF:return F5(f);case DF:case ZF:case MF:return H5(f,R);case WF:return U5(f,R)}}var A5=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),G5=new Set(["svg","math"]);function H5(f,R){var h;if(R.xmlMode==="foreign"){if(f.name=(h=RW.get(f.name))!==null&&h!==void 0?h:f.name,f.parent&&A5.has(f.parent.name))R={...R,xmlMode:!1}}if(!R.xmlMode&&G5.has(f.name))R={...R,xmlMode:"foreign"};let $=`<${f.name}`,A=h5(f.attribs,R);if(A)$+=` ${A}`;if(f.children.length===0&&(R.xmlMode?R.selfClosingTags!==!1:R.selfClosingTags&&$W.has(f.name))){if(!R.xmlMode)$+=" ";$+="/>"}else{if($+=">",f.children.length>0)$+=Dh(f.children,R);if(R.xmlMode||!$W.has(f.name))$+=`</${f.name}>`}return $}function N5(f){return`<${f.data}>`}function U5(f,R){var h;let $=f.data||"";if(((h=R.encodeEntities)!==null&&h!==void 0?h:R.decodeEntities)!==!1&&!(!R.xmlMode&&f.parent&&f5.has(f.parent.name)))$=R.xmlMode||R.encodeEntities!=="utf8"?Q$($):zG($);return $}function F5(f){return`<![CDATA[${f.children[0].data}]]>`}function W5(f){return`<!--${f.data}-->`}function AW(f,R){let h=new n8(void 0,R);return new MG(h,R).end(f),h.root}var BG=O(UW(),1);function KG(f,R,h=()=>{return}){if(f===void 0){let $=function(...A){return R($,...A)};return $}if(f>=0)return function(...$){return R(KG(f-1,R,h),...$)};return h}function DW(f,R){let h=0,$=f.length;while(h<$&&f[h]===R)++h;while($>h&&f[$-1]===R)--$;return h>0||$<f.length?f.substring(h,$):f}function q5(f,R){let h=f.length;while(h>0&&f[h-1]===R)--h;return h<f.length?f.substring(0,h):f}function B5(f){return f.replace(/[\s\S]/g,(R)=>"\\u"+R.charCodeAt().toString(16).padStart(4,"0"))}function ZW(f,R){let h=new Map;for(let $=f.length;$-- >0;){let A=f[$],G=R(A);h.set(G,h.has(G)?BG.default(A,h.get(G),{arrayMerge:K5}):A)}return[...h.values()].reverse()}var K5=(f,R,h)=>[...R];function Z0(f,R){for(let h of R){if(!f)return;f=f[h]}return f}function FW(f,R="a",h=26){let $=[];do f-=1,$.push(f%h),f=f/h>>0;while(f>0);let A=R.charCodeAt(0);return $.reverse().map((G)=>String.fromCharCode(A+G)).join("")}var QG=["I","X","C","M"],WW=["V","L","D"];function SW(f){return[...f+""].map((R)=>+R).reverse().map((R,h)=>R%5<4?(R<5?"":WW[h])+QG[h].repeat(R%5):QG[h]+(R<5?WW[h]:QG[h+1])).reverse().join("")}class vG{constructor(f,R=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=R||f.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=Z0(f,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=Z0(f,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(f,R=!1){if(this.nextLineAvailableChars<=0&&!R)this.startNewLine();let h=this.nextLineWords.length===0,$=f.length+(h?0:1);if($<=this.nextLineAvailableChars||R)this.nextLineWords.push(f),this.nextLineAvailableChars-=$;else{let[A,...G]=this.splitLongWord(f);if(!h)this.startNewLine();this.nextLineWords.push(A),this.nextLineAvailableChars-=A.length;for(let H of G)this.startNewLine(),this.nextLineWords.push(H),this.nextLineAvailableChars-=H.length}}popWord(){let f=this.nextLineWords.pop();if(f!==void 0){let R=this.nextLineWords.length===0,h=f.length+(R?0:1);this.nextLineAvailableChars+=h}return f}concatWord(f,R=!1){if(this.wordBreakOpportunity&&f.length>this.nextLineAvailableChars)this.pushWord(f,R),this.wordBreakOpportunity=!1;else{let h=this.popWord();this.pushWord(h?h.concat(f):f,R)}}startNewLine(f=1){if(this.lines.push(this.nextLineWords),f>1)this.lines.push(...Array.from({length:f-1},()=>[]));this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map((f)=>f.join(" ")).join(`
68
- `)}splitLongWord(f){let R=[],h=0;while(f.length>this.maxLineLength){let $=f.substring(0,this.maxLineLength),A=f.substring(this.maxLineLength),G=$.lastIndexOf(this.wrapCharacters[h]);if(G>-1)f=$.substring(G+1)+A,R.push($.substring(0,G+1));else if(h++,h<this.wrapCharacters.length)f=$+A;else{if(this.forceWrapOnLimit){if(R.push($),f=A,f.length>this.maxLineLength)continue}else f=$+A;break}}return R.push(f),R}}class M0{constructor(f=null){this.next=f}getRoot(){return this.next?this.next:this}}class bf extends M0{constructor(f,R=null,h=1,$=void 0){super(R);this.leadingLineBreaks=h,this.inlineTextBuilder=new vG(f,$),this.rawText="",this.stashedLineBreaks=0,this.isPre=R&&R.isPre,this.isNoWrap=R&&R.isNoWrap}}class wG extends bf{constructor(f,R=null,{interRowLineBreaks:h=1,leadingLineBreaks:$=2,maxLineLength:A=void 0,maxPrefixLength:G=0,prefixAlign:H="left"}={}){super(f,R,$,A);this.maxPrefixLength=G,this.prefixAlign=H,this.interRowLineBreaks=h}}class SR extends bf{constructor(f,R=null,{leadingLineBreaks:h=1,maxLineLength:$=void 0,prefix:A=""}={}){super(f,R,h,$);this.prefix=A}}class LG extends M0{constructor(f=null){super(f);this.rows=[],this.isPre=f&&f.isPre,this.isNoWrap=f&&f.isNoWrap}}class IG extends M0{constructor(f=null){super(f);this.cells=[],this.isPre=f&&f.isPre,this.isNoWrap=f&&f.isNoWrap}}class YR extends M0{constructor(f,R=null,h=void 0){super(R);this.inlineTextBuilder=new vG(f,h),this.rawText="",this.stashedLineBreaks=0,this.isPre=R&&R.isPre,this.isNoWrap=R&&R.isNoWrap}}class MW extends M0{constructor(f=null,R){super(f);this.transform=R}}function v5(f){return[...f].map((R)=>"\\u"+R.charCodeAt(0).toString(16).padStart(4,"0")).join("")}class JW{constructor(f){this.whitespaceChars=f.preserveNewlines?f.whitespaceCharacters.replace(/\n/g,""):f.whitespaceCharacters;let R=v5(this.whitespaceChars);if(this.leadingWhitespaceRe=new RegExp(`^[${R}]`),this.trailingWhitespaceRe=new RegExp(`[${R}]$`),this.allWhitespaceOrEmptyRe=new RegExp(`^[${R}]*$`),this.newlineOrNonWhitespaceRe=new RegExp(`(\\n|[^\\n${R}])`,"g"),this.newlineOrNonNewlineStringRe=new RegExp("(\\n|[^\\n]+)","g"),f.preserveNewlines){let h=new RegExp(`\\n|[^\\n${R}]+`,"gm");this.shrinkWrapAdd=function($,A,G=(N)=>N,H=!1){if(!$)return;let N=A.stashedSpace,U=!1,F=h.exec($);if(F){if(U=!0,F[0]===`
64
+ `),e4=!0}throw new h0("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),hU(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:R,ssoAccountId:h,ssoRegion:$,ssoRoleName:A,ssoSession:G}=f;if(!R&&!h&&!$&&!A&&!G)throw new h0("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:H}=await import("../chunk-q04g7v20.js");return H(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:R}=await import("../chunk-2j91yc5g.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:R}=await import("../chunk-ezyz3gaq.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:R}=await import("../chunk-szs1nkf4.js");return R(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await n4(f))()},async()=>{throw new h0("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),NZ,HZ),HZ=(f)=>f?.expiration!==void 0,NZ=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;var UZ="AWS_S3_USE_ARN_REGION",FZ="s3_use_arn_region",AU={environmentVariableSelector:(f)=>KR(f,UZ,vR.ENV),configFileSelector:(f)=>KR(f,FZ,vR.CONFIG),default:!1};var NR=v(BR(),1);var HU=v(BR(),1);class $0{constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let h=7,$=Math.abs(Math.round(f));h>-1&&$>0;h--,$/=256)R[h]=$;if(f<0)GU(R);return new $0(R)}valueOf(){let f=this.bytes.slice(0),R=f[0]&128;if(R)GU(f);return parseInt(HU.toHex(f),16)*(R?-1:1)}toString(){return String(this.valueOf())}}function GU(f){for(let R=0;R<8;R++)f[R]^=255;for(let R=7;R>-1;R--)if(f[R]++,f[R]!==0)break}class c8{constructor(f,R){this.toUtf8=f,this.fromUtf8=R}format(f){let R=[];for(let A of Object.keys(f)){let G=this.fromUtf8(A);R.push(Uint8Array.from([G.byteLength]),G,this.formatHeaderValue(f[A]))}let h=new Uint8Array(R.reduce((A,G)=>A+G.byteLength,0)),$=0;for(let A of R)h.set(A,$),$+=A.byteLength;return h}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,f.value,!1),new Uint8Array(R.buffer);case"integer":let h=new DataView(new ArrayBuffer(5));return h.setUint8(0,4),h.setInt32(1,f.value,!1),new Uint8Array(h.buffer);case"long":let $=new Uint8Array(9);return $[0]=5,$.set(f.value.bytes,1),$;case"binary":let A=new DataView(new ArrayBuffer(3+f.value.byteLength));A.setUint8(0,6),A.setUint16(1,f.value.byteLength,!1);let G=new Uint8Array(A.buffer);return G.set(f.value,3),G;case"string":let H=this.fromUtf8(f.value),N=new DataView(new ArrayBuffer(3+H.byteLength));N.setUint8(0,7),N.setUint16(1,H.byteLength,!1);let U=new Uint8Array(N.buffer);return U.set(H,3),U;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set($0.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!vZ.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let S=new Uint8Array(17);return S[0]=9,S.set(NR.fromHex(f.value.replace(/\-/g,"")),1),S}}parse(f){let R={},h=0;while(h<f.byteLength){let $=f.getUint8(h++),A=this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,$));switch(h+=$,f.getUint8(h++)){case 0:R[A]={type:UU,value:!0};break;case 1:R[A]={type:UU,value:!1};break;case 2:R[A]={type:QZ,value:f.getInt8(h++)};break;case 3:R[A]={type:wZ,value:f.getInt16(h,!1)},h+=2;break;case 4:R[A]={type:LZ,value:f.getInt32(h,!1)},h+=4;break;case 5:R[A]={type:IZ,value:new $0(new Uint8Array(f.buffer,f.byteOffset+h,8))},h+=8;break;case 6:let G=f.getUint16(h,!1);h+=2,R[A]={type:PZ,value:new Uint8Array(f.buffer,f.byteOffset+h,G)},h+=G;break;case 7:let H=f.getUint16(h,!1);h+=2,R[A]={type:qZ,value:this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,H))},h+=H;break;case 8:R[A]={type:BZ,value:new Date(new $0(new Uint8Array(f.buffer,f.byteOffset+h,8)).valueOf())},h+=8;break;case 9:let N=new Uint8Array(f.buffer,f.byteOffset+h,16);h+=16,R[A]={type:KZ,value:`${NR.toHex(N.subarray(0,4))}-${NR.toHex(N.subarray(4,6))}-${NR.toHex(N.subarray(6,8))}-${NR.toHex(N.subarray(8,10))}-${NR.toHex(N.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return R}}var NU;(function(f){f[f.boolTrue=0]="boolTrue",f[f.boolFalse=1]="boolFalse",f[f.byte=2]="byte",f[f.short=3]="short",f[f.integer=4]="integer",f[f.long=5]="long",f[f.byteArray=6]="byteArray",f[f.string=7]="string",f[f.timestamp=8]="timestamp",f[f.uuid=9]="uuid"})(NU||(NU={}));var UU="boolean",QZ="byte",wZ="short",LZ="integer",IZ="long",PZ="binary",qZ="string",BZ="timestamp",KZ="uuid",vZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var FU=4,UR=FU*2,gR=4,yZ=UR+gR*2;function WU({byteLength:f,byteOffset:R,buffer:h}){if(f<yZ)throw new Error("Provided message too short to accommodate event stream message overhead");let $=new DataView(h,R,f),A=$.getUint32(0,!1);if(f!==A)throw new Error("Reported message length does not match received message length");let G=$.getUint32(FU,!1),H=$.getUint32(UR,!1),N=$.getUint32(f-gR,!1),U=new PR().update(new Uint8Array(h,R,UR));if(H!==U.digest())throw new Error(`The prelude checksum specified in the message (${H}) does not match the calculated CRC32 checksum (${U.digest()})`);if(U.update(new Uint8Array(h,R+UR,f-(UR+gR))),N!==U.digest())throw new Error(`The message checksum (${U.digest()}) did not match the expected value of ${N}`);return{headers:new DataView(h,R+UR+gR,G),body:new Uint8Array(h,R+UR+gR+G,A-G-(UR+gR+gR))}}class b8{constructor(f,R){this.headerMarshaller=new c8(f,R),this.messageBuffer=[],this.isEndOfStream=!1}feed(f){this.messageBuffer.push(this.decode(f))}endOfStream(){this.isEndOfStream=!0}getMessage(){let f=this.messageBuffer.pop(),R=this.isEndOfStream;return{getMessage(){return f},isEndOfStream(){return R}}}getAvailableMessages(){let f=this.messageBuffer;this.messageBuffer=[];let R=this.isEndOfStream;return{getMessages(){return f},isEndOfStream(){return R}}}encode({headers:f,body:R}){let h=this.headerMarshaller.format(f),$=h.byteLength+R.byteLength+16,A=new Uint8Array($),G=new DataView(A.buffer,A.byteOffset,A.byteLength),H=new PR;return G.setUint32(0,$,!1),G.setUint32(4,h.byteLength,!1),G.setUint32(8,H.update(A.subarray(0,8)).digest(),!1),A.set(h,12),A.set(R,h.byteLength+12),G.setUint32($-4,H.update(A.subarray(8,$-4)).digest(),!1),A}decode(f){let{headers:R,body:h}=WU(f);return{headers:this.headerMarshaller.parse(R),body:h}}formatHeaders(f){return this.headerMarshaller.format(f)}}class x8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.decoder.decode(f)}}class k8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream)yield this.options.encoder.encode(f);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class s8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream){let R=await this.options.deserializer(f);if(R===void 0)continue;yield R}}}class l8{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.serializer(f)}}function SU(f){let R=0,h=0,$=null,A=null,G=(N)=>{if(typeof N!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+N);R=N,h=4,$=new Uint8Array(N),new DataView($.buffer).setUint32(0,N,!1)},H=async function*(){let N=f[Symbol.asyncIterator]();while(!0){let{value:U,done:F}=await N.next();if(F){if(!R)return;else if(R===h)yield $;else throw new Error("Truncated event message received.");return}let S=U.length,D=0;while(D<S){if(!$){let Z=S-D;if(!A)A=new Uint8Array(4);let L=Math.min(4-h,Z);if(A.set(U.slice(D,D+L),h),h+=L,D+=L,h<4)break;G(new DataView(A.buffer).getUint32(0,!1)),A=null}let J=Math.min(R-h,S-D);if($.set(U.slice(D,D+J),h),h+=J,D+=J,R&&R===h)yield $,$=null,R=0,h=0}}};return{[Symbol.asyncIterator]:H}}function YU(f,R){return async function(h){let{value:$}=h.headers[":message-type"];if($==="error"){let A=new Error(h.headers[":error-message"].value||"UnknownError");throw A.name=h.headers[":error-code"].value,A}else if($==="exception"){let A=h.headers[":exception-type"].value,G={[A]:h},H=await f(G);if(H.$unknown){let N=new Error(R(h.body));throw N.name=A,N}throw H[A]}else if($==="event"){let A={[h.headers[":event-type"].value]:h},G=await f(A);if(G.$unknown)return;return G}else throw Error(`Unrecognizable event type: ${h.headers[":event-type"].value}`)}}class i1{constructor({utf8Encoder:f,utf8Decoder:R}){this.eventStreamCodec=new b8(f,R),this.utfEncoder=f}deserialize(f,R){let h=SU(f);return new s8({messageStream:new x8({inputStream:h,decoder:this.eventStreamCodec}),deserializer:YU(R,this.utfEncoder)})}serialize(f,R){return new k8({messageStream:new l8({inputStream:f,serializer:R}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as jZ}from"stream";async function*DU(f){let R=!1,h=!1,$=new Array;f.on("error",(A)=>{if(!R)R=!0;if(A)throw A}),f.on("data",(A)=>{$.push(A)}),f.on("end",()=>{R=!0});while(!h){let A=await new Promise((G)=>setTimeout(()=>G($.shift()),0));if(A)yield A;h=R&&$.length===0}}class _8{constructor({utf8Encoder:f,utf8Decoder:R}){this.universalMarshaller=new i1({utf8Decoder:R,utf8Encoder:f})}deserialize(f,R){let h=typeof f[Symbol.asyncIterator]==="function"?f:DU(f);return this.universalMarshaller.deserialize(h,R)}serialize(f,R){return jZ.from(this.universalMarshaller.serialize(f,R))}}var ZU=(f)=>new _8(f);import{Writable as OZ}from"stream";class p1 extends OZ{constructor(f,R){super(R);this.hash=f}_write(f,R,h){try{this.hash.update(If(f))}catch($){return h($)}h()}}var MU=(f,R)=>{if(R.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");let h=new f,$=new p1(h);return R.pipe($),new Promise((A,G)=>{R.on("error",(H)=>{$.end(),G(H)}),$.on("error",G),$.on("finish",()=>{h.digest().then(A).catch(G)})})};var o1=v(qR(),1);var IU=(f)=>{return{apiVersion:"2006-03-01",base64Decoder:f?.base64Decoder??JU,base64Encoder:f?.base64Encoder??zU,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??Y1,extensions:f?.extensions??[],getAwsChunkedEncodingStream:f?.getAwsChunkedEncodingStream??QU,httpAuthSchemeProvider:f?.httpAuthSchemeProvider??k3,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4"),signer:new o1.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4a"),signer:new o1.AwsSdkSigV4ASigner}],logger:f?.logger??new nh,sdkStreamMixin:f?.sdkStreamMixin??wU,serviceId:f?.serviceId??"S3",signerConstructor:f?.signerConstructor??qA,signingEscapePath:f?.signingEscapePath??!1,urlParser:f?.urlParser??LU,useArnRegion:f?.useArnRegion??!1,utf8Decoder:f?.utf8Decoder??l0,utf8Encoder:f?.utf8Encoder??XU}};var bU=(f)=>{KU(process.version);let R=cU(f),h=()=>R().then(BU),$=IU(f);e1.emitWarningIfUnsupportedVersion(process.version);let A={profile:f?.profile};return{...$,...f,runtime:"node",defaultsMode:R,bodyLengthChecker:f?.bodyLengthChecker??mU,credentialDefaultProvider:f?.credentialDefaultProvider??$U,defaultUserAgentProvider:f?.defaultUserAgentProvider??gU({serviceId:$.serviceId,clientVersion:p4.version}),disableS3ExpressSessionAuth:f?.disableS3ExpressSessionAuth??jf(QA,A),eventStreamSerdeProvider:f?.eventStreamSerdeProvider??ZU,maxAttempts:f?.maxAttempts??jf(VU,f),md5:f?.md5??n1.bind(null,"md5"),region:f?.region??jf(jU,{...OU,...A}),requestChecksumCalculation:f?.requestChecksumCalculation??jf(AN,A),requestHandler:PU.create(f?.requestHandler??h),responseChecksumValidation:f?.responseChecksumValidation??jf(GN,A),retryMode:f?.retryMode??jf({...TU,default:async()=>(await h()).retryMode||EU},f),sha1:f?.sha1??n1.bind(null,"sha1"),sha256:f?.sha256??n1.bind(null,"sha256"),sigv4aSigningRegionSet:f?.sigv4aSigningRegionSet??jf(e1.NODE_SIGV4A_CONFIG_OPTIONS,A),streamCollector:f?.streamCollector??qU,streamHasher:f?.streamHasher??MU,useArnRegion:f?.useArnRegion??jf(AU,A),useDualstackEndpoint:f?.useDualstackEndpoint??jf(vU,A),useFipsEndpoint:f?.useFipsEndpoint??jf(yU,A),userAgentAppId:f?.userAgentAppId??jf(CU,A)}};var xU=(f)=>{let{httpAuthSchemes:R,httpAuthSchemeProvider:h,credentials:$}=f;return{setHttpAuthScheme(A){let G=R.findIndex((H)=>H.schemeId===A.schemeId);if(G===-1)R.push(A);else R.splice(G,1,A)},httpAuthSchemes(){return R},setHttpAuthSchemeProvider(A){h=A},httpAuthSchemeProvider(){return h},setCredentials(A){$=A},credentials(){return $}}},kU=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var iU=(f,R)=>{let h=Object.assign(aU(f),_U(f),sU(f),xU(f));return R.forEach(($)=>$.configure(h)),Object.assign(f,rU(h),dU(h),lU(h),kU(h))};class d8 extends uU{config;constructor(...[f]){let R=bU(f||{});super(R);this.initConfig=R;let h=l3(R),$=tU(h),A=KN($),G=AF(A),H=RF(G),N=pU(H),U=$F(N),F=I6(U),S=s3(F),D=J6(S,{session:[()=>this,m8]}),J=iU(D,f?.extensions||[]);this.config=J,this.middlewareStack.use(fF(this.config)),this.middlewareStack.use(GF(this.config)),this.middlewareStack.use(hF(this.config)),this.middlewareStack.use(oU(this.config)),this.middlewareStack.use(nU(this.config)),this.middlewareStack.use(eU(this.config)),this.middlewareStack.use(A0.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:c3,identityProviderConfigProvider:async(Z)=>new A0.DefaultIdentityProviderConfig({"aws.auth#sigv4":Z.credentials,"aws.auth#sigv4a":Z.credentials})})),this.middlewareStack.use(A0.getHttpSigningPlugin(this.config)),this.middlewareStack.use(L6(this.config)),this.middlewareStack.use(hN(this.config)),this.middlewareStack.use(ON(this.config)),this.middlewareStack.use(wA(this.config)),this.middlewareStack.use(IA(this.config))}destroy(){super.destroy()}}function EZ(f){return(R)=>async(h)=>{let $={...h.input},A=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let G of A){let H=$[G.target];if(H){let N;if(typeof H==="string")if(TZ(H,f))N=f.base64Decoder(H);else N=f.utf8Decoder(H),$[G.target]=f.base64Encoder(N);else N=ArrayBuffer.isView(H)?new Uint8Array(H.buffer,H.byteOffset,H.byteLength):new Uint8Array(H),$[G.target]=f.base64Encoder(N);let U=new f.md5;U.update(N),$[G.hash]=f.base64Encoder(await U.digest())}}return R({...h,input:$})}}var VZ={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},u1=(f)=>({applyToStack:(R)=>{R.add(EZ(f),VZ)}});function TZ(f,R){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(f))return!1;try{return R.base64Decoder(f).length===32}catch{return!1}}var HF=v(a1(),1);class a8 extends GR.classBuilder().ep({...hR,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[HF.getSerdePlugin(h,this.serialize,this.deserialize),HR(h,f.getEndpointParameterInstructions()),ph(h,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),u1(h),EN(h)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(i3,r3).ser(Y4).de(J4).build(){}var NF=v(a1(),1);class r8 extends GR.classBuilder().ep({...hR,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(f,R,h,$){return[NF.getSerdePlugin(h,this.serialize,this.deserialize),HR(h,f.getEndpointParameterInstructions()),oR(h)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(D4).de(X4).build(){}var UF=v(a1(),1);class i8 extends GR.classBuilder().ep({...hR,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[UF.getSerdePlugin(h,this.serialize,this.deserialize),HR(h,f.getEndpointParameterInstructions()),ph(h,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),vN(h),oR(h),u1(h)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(n3,o3).ser(Z4).de(z4).build(){}import{Buffer as FF}from"buffer";class WF extends _R{client;constructor(...f){super();this.client=new d8(...f)}async put(f){let R,h,$,A=process.env.BUCKET_NAME;if(f instanceof Blob)R=f,$=`${Bun.randomUUIDv7()}.${f.type.split("/")[1].split(";")[0]}`,h=f.type;else R=f.body,$=f.name,A=f.bucket??A,h=f.contentType;h=R instanceof Blob||R instanceof File?R.type:void 0;let G=R instanceof FF?R:R instanceof Blob||R instanceof File?FF.from(await R.arrayBuffer()):"";return await this.client.send(new i8({Bucket:A,Key:$,Body:G,ContentType:h})),$}async list(f){return await this.client.send(new r8({Bucket:process.env.BUCKET_NAME,Prefix:f}))}async fetch(f){let R=process.env.BUCKET_NAME,h;if(typeof f==="string")h=f;else R=f.bucket??R,h=f.name;if(!h)throw new Error("Object name has to be specified");let $=await this.client.send(new a8({Bucket:R,Key:h}));return new Response($.Body.transformToWebStream(),{headers:{"Content-Type":$.ContentType,"Content-Length":$.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":$.LastModified?.toUTCString()||"",ETag:$.ETag||""}})}}class t1{}class f$ extends t1{requests=new Map;consume(f,R){if(!this.requests.has(f))this.requests.set(f,{date:Date.now(),count:1});else{let h=this.requests.get(f),$=Date.now();if($-h.date>=60000)this.requests.set(f,{date:$,count:1});else this.requests.set(f,{date:h.date,count:h.count+1})}return this.requests.get(f).count}}class SF extends p{driver=new f$;boot(){}}import*as qz from"react-dom/server";var E;(function(f){f.Root="root",f.Text="text",f.Directive="directive",f.Comment="comment",f.Script="script",f.Style="style",f.Tag="tag",f.CDATA="cdata",f.Doctype="doctype"})(E||(E={}));function YF(f){return f.type===E.Tag||f.type===E.Script||f.type===E.Style}var{Root:DF,Text:ZF,Directive:MF,Comment:JF,Script:XF,Style:zF,Tag:QF,CDATA:wF,Doctype:LF}=E;class o8{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(f){this.parent=f}get previousSibling(){return this.prev}set previousSibling(f){this.prev=f}get nextSibling(){return this.next}set nextSibling(f){this.next=f}cloneNode(f=!1){return PF(this,f)}}class R$ extends o8{constructor(f){super();this.data=f}get nodeValue(){return this.data}set nodeValue(f){this.data=f}}class Ah extends R${constructor(){super(...arguments);this.type=E.Text}get nodeType(){return 3}}class h$ extends R${constructor(){super(...arguments);this.type=E.Comment}get nodeType(){return 8}}class $$ extends R${constructor(f,R){super(R);this.name=f,this.type=E.Directive}get nodeType(){return 1}}class A$ extends o8{constructor(f){super();this.children=f}get firstChild(){var f;return(f=this.children[0])!==null&&f!==void 0?f:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(f){this.children=f}}class G$ extends A${constructor(){super(...arguments);this.type=E.CDATA}get nodeType(){return 4}}class Gh extends A${constructor(){super(...arguments);this.type=E.Root}get nodeType(){return 9}}class H$ extends A${constructor(f,R,h=[],$=f==="script"?E.Script:f==="style"?E.Style:E.Tag){super(h);this.name=f,this.attribs=R,this.type=$}get nodeType(){return 1}get tagName(){return this.name}set tagName(f){this.name=f}get attributes(){return Object.keys(this.attribs).map((f)=>{var R,h;return{name:f,value:this.attribs[f],namespace:(R=this["x-attribsNamespace"])===null||R===void 0?void 0:R[f],prefix:(h=this["x-attribsPrefix"])===null||h===void 0?void 0:h[f]}})}}function N$(f){return YF(f)}function gZ(f){return f.type===E.CDATA}function CZ(f){return f.type===E.Text}function mZ(f){return f.type===E.Comment}function cZ(f){return f.type===E.Directive}function bZ(f){return f.type===E.Root}function PF(f,R=!1){let h;if(CZ(f))h=new Ah(f.data);else if(mZ(f))h=new h$(f.data);else if(N$(f)){let $=R?p8(f.children):[],A=new H$(f.name,{...f.attribs},$);if($.forEach((G)=>G.parent=A),f.namespace!=null)A.namespace=f.namespace;if(f["x-attribsNamespace"])A["x-attribsNamespace"]={...f["x-attribsNamespace"]};if(f["x-attribsPrefix"])A["x-attribsPrefix"]={...f["x-attribsPrefix"]};h=A}else if(gZ(f)){let $=R?p8(f.children):[],A=new G$($);$.forEach((G)=>G.parent=A),h=A}else if(bZ(f)){let $=R?p8(f.children):[],A=new Gh($);if($.forEach((G)=>G.parent=A),f["x-mode"])A["x-mode"]=f["x-mode"];h=A}else if(cZ(f)){let $=new $$(f.name,f.data);if(f["x-name"]!=null)$["x-name"]=f["x-name"],$["x-publicId"]=f["x-publicId"],$["x-systemId"]=f["x-systemId"];h=$}else throw new Error(`Not implemented yet: ${f.type}`);if(h.startIndex=f.startIndex,h.endIndex=f.endIndex,f.sourceCodeLocation!=null)h.sourceCodeLocation=f.sourceCodeLocation;return h}function p8(f){let R=f.map((h)=>PF(h,!0));for(let h=1;h<R.length;h++)R[h].prev=R[h-1],R[h-1].next=R[h];return R}var qF={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class n8{constructor(f,R,h){if(this.dom=[],this.root=new Gh(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof R==="function")h=R,R=qF;if(typeof f==="object")R=f,f=void 0;this.callback=f!==null&&f!==void 0?f:null,this.options=R!==null&&R!==void 0?R:qF,this.elementCB=h!==null&&h!==void 0?h:null}onparserinit(f){this.parser=f}onreset(){this.dom=[],this.root=new Gh(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)}onerror(f){this.handleCallback(f)}onclosetag(){this.lastNode=null;let f=this.tagStack.pop();if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(f)}onopentag(f,R){let h=this.options.xmlMode?E.Tag:void 0,$=new H$(f,R,void 0,h);this.addNode($),this.tagStack.push($)}ontext(f){let{lastNode:R}=this;if(R&&R.type===E.Text){if(R.data+=f,this.options.withEndIndices)R.endIndex=this.parser.endIndex}else{let h=new Ah(f);this.addNode(h),this.lastNode=h}}oncomment(f){if(this.lastNode&&this.lastNode.type===E.Comment){this.lastNode.data+=f;return}let R=new h$(f);this.addNode(R),this.lastNode=R}oncommentend(){this.lastNode=null}oncdatastart(){let f=new Ah(""),R=new G$([f]);this.addNode(R),f.parent=R,this.lastNode=f}oncdataend(){this.lastNode=null}onprocessinginstruction(f,R){let h=new $$(f,R);this.addNode(h)}handleCallback(f){if(typeof this.callback==="function")this.callback(f,this.dom);else if(f)throw f}addNode(f){let R=this.tagStack[this.tagStack.length-1],h=R.children[R.children.length-1];if(this.options.withStartIndices)f.startIndex=this.parser.startIndex;if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(R.children.push(f),h)f.prev=h,h.next=f;f.parent=R,this.lastNode=null}}var xZ=/\n/g;function kZ(f){let R=[...f.matchAll(xZ)].map(($)=>$.index||0);R.unshift(-1);let h=e8(R,0,R.length);return($)=>KF(h,$)}function e8(f,R,h){if(h-R==1)return{offset:f[R],index:R+1};let $=Math.ceil((R+h)/2),A=e8(f,R,$),G=e8(f,$,h);return{offset:A.offset,low:A,high:G}}function KF(f,R){return function(h){return Object.prototype.hasOwnProperty.call(h,"index")}(f)?{line:f.index,column:R-f.offset}:KF(f.high.offset<R?f.high:f.low,R)}function u8(f,R="",h={}){let $=typeof R!="string"?R:h,A=typeof R=="string"?R:"",G=f.map(sZ),H=!!$.lineNumbers;return function(N,U=0){let F=H?kZ(N):()=>({line:0,column:0}),S=U,D=[];f:for(;S<N.length;){let J=!1;for(let Z of G){Z.regex.lastIndex=S;let L=Z.regex.exec(N);if(L&&L[0].length>0){if(!Z.discard){let P=F(S),a=typeof Z.replace=="string"?L[0].replace(new RegExp(Z.regex.source,Z.regex.flags),Z.replace):L[0];D.push({state:A,name:Z.name,text:a,offset:S,len:L[0].length,line:P.line,column:P.column})}if(S=Z.regex.lastIndex,J=!0,Z.push){let P=Z.push(N,S);D.push(...P.tokens),S=P.offset}if(Z.pop)break f;break}}if(!J)break}return{tokens:D,offset:S,complete:N.length<=S}}}function sZ(f,R){return{...f,regex:lZ(f,R)}}function lZ(f,R){if(f.name.length===0)throw new Error(`Rule #${R} has empty name, which is not allowed.`);if(function(h){return Object.prototype.hasOwnProperty.call(h,"regex")}(f))return function(h){if(h.global)throw new Error(`Regular expression /${h.source}/${h.flags} contains the global flag, which is not allowed.`);return h.sticky?h:new RegExp(h.source,h.flags+"y")}(f.regex);if(function(h){return Object.prototype.hasOwnProperty.call(h,"str")}(f)){if(f.str.length===0)throw new Error(`Rule #${R} ("${f.name}") has empty "str" property, which is not allowed.`);return new RegExp(BF(f.str),"y")}return new RegExp(BF(f.name),"y")}function BF(f){return f.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function df(f,R){return(h,$)=>{let A=$,G=void 0;if($<h.tokens.length){if(G=f(h.tokens[$],h,$),G!==void 0)A++}else R?.(h,$);return G===void 0?{matched:!1}:{matched:!0,position:A,value:G}}}function t8(f,R){return f.matched?{matched:!0,position:f.position,value:R(f.value,f.position)}:f}function U$(f,R){return f.matched?R(f):f}function Sf(f,R){return(h,$)=>t8(f(h,$),(A,G)=>R(A,h,$,G))}function Hh(f,R){return(h,$)=>{let A=f(h,$);return A.matched?A:{matched:!0,position:$,value:R}}}function G0(...f){return(R,h)=>{for(let $ of f){let A=$(R,h);if(A.matched)return A}return{matched:!1}}}function FR(f,R){return(h,$)=>{let A=f(h,$);return A.matched?A:R(h,$)}}function _Z(f,R){return(h,$)=>{let A=[],G=!0;do{let H=f(h,$);if(H.matched&&R(H.value,A.length+1,h,$,H.position))A.push(H.value),$=H.position;else G=!1}while(G);return{matched:!0,position:$,value:A}}}function F$(f){return _Z(f,()=>!0)}function vF(f){return Zf(f,F$(f),(R,h)=>[R,...h])}function Zf(f,R,h){return($,A)=>U$(f($,A),(G)=>t8(R($,G.position),(H,N)=>h(G.value,H,$,A,N)))}function yF(f,R){return Zf(f,R,(h)=>h)}function fG(f,R){return Zf(f,R,(h,$)=>$)}function W$(f,R,h,$){return(A,G)=>U$(f(A,G),(H)=>U$(R(A,H.position),(N)=>t8(h(A,N.position),(U,F)=>$(H.value,N.value,U,A,G,F))))}function RG(f,R,h){return W$(f,R,h,($,A)=>A)}function dZ(...f){return(R,h)=>{let $=[],A=h;for(let G of f){let H=G(R,A);if(H.matched)$.push(H.value),A=H.position;else return{matched:!1}}return{matched:!0,position:A,value:$}}}function jF(...f){return aZ(dZ(...f))}function aZ(f){return Sf(f,(R)=>R.flatMap((h)=>h))}function rZ(f,R){return(h,$)=>{let A=!0,G=f,H=$;do{let N=R(G,h,H)(h,H);if(N.matched)G=N.value,H=N.position;else A=!1}while(A);return{matched:!0,position:H,value:G}}}function iZ(f,R,h){return rZ(f,($)=>Sf(R,(A,G,H,N)=>h($,A,G,H,N)))}function hG(f,R,h){return pZ(f,($)=>iZ($,Zf(R,h,(A,G)=>[A,G]),(A,[G,H])=>G(A,H)))}function pZ(f,R){return(h,$)=>U$(f(h,$),(A)=>R(A.value,h,$,A.position)(h,A.position))}var nZ="(?:[ \\t\\r\\n\\f]*)",CF="(?:\\n|\\r\\n|\\r|\\f)",D$="[^\\x00-\\x7F]",Fh="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",Wh="(?:\\\\[^\\n\\r\\f0-9a-f])",eZ=`(?:[_a-z]|${D$}|${Fh}|${Wh})`,mF=`(?:[_a-z0-9-]|${D$}|${Fh}|${Wh})`,uZ=`(?:${mF}+)`,tZ=`(?:[-]?${eZ}${mF}*)`,fM=`'([^\\n\\r\\f\\\\']|\\\\${CF}|${D$}|${Fh}|${Wh})*'`,RM=`"([^\\n\\r\\f\\\\"]|\\\\${CF}|${D$}|${Fh}|${Wh})*"`,hM=u8([{name:"ws",regex:new RegExp(nZ)},{name:"hash",regex:new RegExp(`#${uZ}`,"i")},{name:"ident",regex:new RegExp(tZ,"i")},{name:"str1",regex:new RegExp(fM,"i")},{name:"str2",regex:new RegExp(RM,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),$M=u8([{name:"unicode",regex:new RegExp(Fh,"i")},{name:"escape",regex:new RegExp(Wh,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function cF([f,R,h],[$,A,G]){return[f+$,R+A,h+G]}function AM(f){return f.reduce(cF,[0,0,0])}var GM=df((f)=>f.name==="unicode"?String.fromCodePoint(parseInt(f.text.slice(1),16)):void 0),HM=df((f)=>f.name==="escape"?f.text.slice(1):void 0),NM=df((f)=>f.name==="any"?f.text:void 0),UM=Sf(F$(G0(GM,HM,NM)),(f)=>f.join(""));function GG(f){let R=$M(f);return UM({tokens:R.tokens,options:void 0},0).value}function s(f){return df((R)=>R.name===f?!0:void 0)}var HG=df((f)=>f.name==="ws"?null:void 0),$G=Hh(HG,null);function N0(f){return RG($G,f,$G)}var Uh=df((f)=>f.name==="ident"?GG(f.text):void 0),FM=df((f)=>f.name==="hash"?GG(f.text.slice(1)):void 0),WM=df((f)=>f.name.startsWith("str")?GG(f.text.slice(1,-1)):void 0),bF=yF(Hh(Uh,""),s("|")),NG=FR(Zf(bF,Uh,(f,R)=>({name:R,namespace:f})),Sf(Uh,(f)=>({name:f,namespace:null}))),SM=FR(Zf(bF,s("*"),(f)=>({type:"universal",namespace:f,specificity:[0,0,0]})),Sf(s("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),YM=Sf(NG,({name:f,namespace:R})=>({type:"tag",name:f,namespace:R,specificity:[0,0,1]})),DM=Zf(s("."),Uh,(f,R)=>({type:"class",name:R,specificity:[0,1,0]})),ZM=Sf(FM,(f)=>({type:"id",name:f,specificity:[1,0,0]})),OF=df((f)=>{if(f.name==="ident"){if(f.text==="i"||f.text==="I")return"i";if(f.text==="s"||f.text==="S")return"s"}return}),MM=FR(Zf(WM,Hh(fG($G,OF),null),(f,R)=>({value:f,modifier:R})),Zf(Uh,Hh(fG(HG,OF),null),(f,R)=>({value:f,modifier:R}))),JM=G0(Sf(s("="),()=>"="),Zf(s("~"),s("="),()=>"~="),Zf(s("|"),s("="),()=>"|="),Zf(s("^"),s("="),()=>"^="),Zf(s("$"),s("="),()=>"$="),Zf(s("*"),s("="),()=>"*=")),XM=W$(s("["),N0(NG),s("]"),(f,{name:R,namespace:h})=>({type:"attrPresence",name:R,namespace:h,specificity:[0,1,0]})),zM=RG(s("["),W$(N0(NG),JM,N0(MM),({name:f,namespace:R},h,{value:$,modifier:A})=>({type:"attrValue",name:f,namespace:R,matcher:h,value:$,modifier:A,specificity:[0,1,0]})),s("]")),QM=FR(XM,zM),wM=FR(SM,YM),EF=G0(ZM,DM,QM),VF=Sf(FR(jF(wM,F$(EF)),vF(EF)),(f)=>{return{type:"compound",list:f,specificity:AM(f.map((R)=>R.specificity))}}),LM=G0(Sf(s(">"),()=>">"),Sf(s("+"),()=>"+"),Sf(s("~"),()=>"~"),Zf(s("|"),s("|"),()=>"||")),IM=FR(N0(LM),Sf(HG,()=>" ")),AG=hG(VF,Sf(IM,(f)=>(R,h)=>({type:"compound",list:[...h.list,{type:"combinator",combinator:f,left:R,specificity:R.specificity}],specificity:cF(R.specificity,h.specificity)})),VF),yv=hG(Sf(AG,(f)=>({type:"list",list:[f]})),Sf(N0(s(",")),()=>(f,R)=>({type:"list",list:[...f.list,R]})),AG);function PM(f,R){if(!(typeof R==="string"||R instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");let h=hM(R);if(!h.complete)throw new Error(`The input "${R}" was only partially tokenized, stopped at offset ${h.offset}!
65
+ `+TF(R,h.offset));let $=N0(f)({tokens:h.tokens,options:void 0},0);if(!$.matched)throw new Error(`No match for "${R}" input!`);if($.position<h.tokens.length){let A=h.tokens[$.position];throw new Error(`The input "${R}" was only partially parsed, stopped at offset ${A.offset}!
66
+ `+TF(R,A.offset,A.len))}return $.value}function TF(f,R,h=1){return`${f.replace(/(\t)|(\r)|(\n)/g,($,A,G)=>A?"\u2409":G?"\u240D":"\u240A")}
67
+ ${"".padEnd(R)}${"^".repeat(h)}`}function xF(f){return PM(AG,f)}function mf(f){if(!f.type)throw new Error("This is not an AST node.");switch(f.type){case"universal":return S$(f.namespace)+"*";case"tag":return S$(f.namespace)+H0(f.name);case"class":return"."+H0(f.name);case"id":return"#"+H0(f.name);case"attrPresence":return`[${S$(f.namespace)}${H0(f.name)}]`;case"attrValue":return`[${S$(f.namespace)}${H0(f.name)}${f.matcher}"${qM(f.value)}"${f.modifier?f.modifier:""}]`;case"combinator":return mf(f.left)+f.combinator;case"compound":return f.list.reduce((R,h)=>{if(h.type==="combinator")return mf(h)+R;else return R+mf(h)},"");case"list":return f.list.map(mf).join(",")}}function S$(f){return f||f===""?H0(f)+"|":""}function Y$(f){return`\\${f.codePointAt(0).toString(16)} `}function H0(f){return f.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(R,h,$,A,G,H,N,U)=>h?Y$(h):$?"-"+Y$($.slice(1)):A?"\\-":G?G:H?"\uFFFD":N?Y$(N):"\\"+U)}function qM(f){return f.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(R,h,$,A,G)=>h?"\\\"":$?"\\\\":A?"\uFFFD":Y$(G))}function Nh(f){if(!f.type)throw new Error("This is not an AST node.");switch(f.type){case"compound":{f.list.forEach(Nh),f.list.sort((R,h)=>kF(gF(R),gF(h)));break}case"combinator":{Nh(f.left);break}case"list":{f.list.forEach(Nh),f.list.sort((R,h)=>mf(R)<mf(h)?-1:1);break}}return f}function gF(f){switch(f.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,f.name];case"attrPresence":return[4,mf(f)];case"attrValue":return[5,mf(f)];case"combinator":return[15,mf(f)]}}function UG(f,R){return kF(f,R)}function kF(f,R){if(!Array.isArray(f)||!Array.isArray(R))throw new Error("Arguments must be arrays.");let h=f.length<R.length?f.length:R.length;for(let $=0;$<h;$++){if(f[$]===R[$])continue;return f[$]<R[$]?-1:1}return f.length-R.length}class Z${constructor(f){this.branches=U0(KM(f))}build(f){return f(this.branches)}}function KM(f){let R=f.length,h=new Array(R);for(let $=0;$<R;$++){let[A,G]=f[$],H=vM(xF(A));h[$]={ast:H,terminal:{type:"terminal",valueContainer:{index:$,value:G,specificity:H.specificity}}}}return h}function vM(f){return lF(f),Nh(f),f}function lF(f){let R=[];f.list.forEach((h)=>{switch(h.type){case"class":R.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:h.specificity,type:"attrValue",value:h.name});break;case"id":R.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:h.specificity,type:"attrValue",value:h.name});break;case"combinator":lF(h.left),R.push(h);break;case"universal":break;default:R.push(h);break}}),f.list=R}function U0(f){let R=[];while(f.length){let h=aF(f,(H)=>!0,_F),{matches:$,nonmatches:A,empty:G}=jM(f,h);if(f=A,$.length)R.push(OM(h,$));if(G.length)R.push(...yM(G))}return R}function yM(f){let R=[];for(let h of f){let $=h.terminal;if($.type==="terminal")R.push($);else{let{matches:A,rest:G}=CM($.cont,(H)=>H.type==="terminal");if(A.forEach((H)=>R.push(H)),G.length)$.cont=G,R.push($)}}return R}function jM(f,R){let h=[],$=[],A=[];for(let G of f){let H=G.ast.list;if(H.length)(H.some((U)=>_F(U)===R)?h:$).push(G);else A.push(G)}return{matches:h,nonmatches:$,empty:A}}function _F(f){switch(f.type){case"attrPresence":return`attrPresence ${f.name}`;case"attrValue":return`attrValue ${f.name}`;case"combinator":return`combinator ${f.combinator}`;default:return f.type}}function OM(f,R){if(f==="tag")return EM(R);if(f.startsWith("attrValue "))return TM(f.substring(10),R);if(f.startsWith("attrPresence "))return VM(f.substring(13),R);if(f==="combinator >")return sF(">",R);if(f==="combinator +")return sF("+",R);throw new Error(`Unsupported selector kind: ${f}`)}function EM(f){let R=FG(f,($)=>$.type==="tag",($)=>$.name);return{type:"tagName",variants:Object.entries(R).map(([$,A])=>({type:"variant",value:$,cont:U0(A.items)}))}}function VM(f,R){for(let h of R)dF(h,($)=>$.type==="attrPresence"&&$.name===f);return{type:"attrPresence",name:f,cont:U0(R)}}function TM(f,R){let h=FG(R,(A)=>A.type==="attrValue"&&A.name===f,(A)=>`${A.matcher} ${A.modifier||""} ${A.value}`),$=[];for(let A of Object.values(h)){let G=A.oneSimpleSelector,H=gM(G),N=U0(A.items);$.push({type:"matcher",matcher:G.matcher,modifier:G.modifier,value:G.value,predicate:H,cont:N})}return{type:"attrValue",name:f,matchers:$}}function gM(f){if(f.modifier==="i"){let R=f.value.toLowerCase();switch(f.matcher){case"=":return(h)=>R===h.toLowerCase();case"~=":return(h)=>h.toLowerCase().split(/[ \t]+/).includes(R);case"^=":return(h)=>h.toLowerCase().startsWith(R);case"$=":return(h)=>h.toLowerCase().endsWith(R);case"*=":return(h)=>h.toLowerCase().includes(R);case"|=":return(h)=>{let $=h.toLowerCase();return R===$||$.startsWith(R)&&$[R.length]==="-"}}}else{let R=f.value;switch(f.matcher){case"=":return(h)=>R===h;case"~=":return(h)=>h.split(/[ \t]+/).includes(R);case"^=":return(h)=>h.startsWith(R);case"$=":return(h)=>h.endsWith(R);case"*=":return(h)=>h.includes(R);case"|=":return(h)=>R===h||h.startsWith(R)&&h[R.length]==="-"}}}function sF(f,R){let h=FG(R,(A)=>A.type==="combinator"&&A.combinator===f,(A)=>mf(A.left)),$=[];for(let A of Object.values(h)){let G=U0(A.items),H=A.oneSimpleSelector.left;$.push({ast:H,terminal:{type:"popElement",cont:G}})}return{type:"pushElement",combinator:f,cont:U0($)}}function FG(f,R,h){let $={};while(f.length){let A=aF(f,R,h),G=(S)=>R(S)&&h(S)===A,H=(S)=>S.ast.list.some(G),{matches:N,rest:U}=mM(f,H),F=null;for(let S of N){let D=dF(S,G);if(!F)F=D}if(F==null)throw new Error("No simple selector is found.");$[A]={oneSimpleSelector:F,items:N},f=U}return $}function dF(f,R){let h=f.ast.list,$=new Array(h.length),A=-1;for(let H=h.length;H-- >0;)if(R(h[H]))$[H]=!0,A=H;if(A==-1)throw new Error("Couldn't find the required simple selector.");let G=h[A];return f.ast.list=h.filter((H,N)=>!$[N]),G}function aF(f,R,h){let $={};for(let H of f){let N={};for(let U of H.ast.list.filter(R))N[h(U)]=!0;for(let U of Object.keys(N))if($[U])$[U]++;else $[U]=1}let A="",G=0;for(let H of Object.entries($))if(H[1]>G)A=H[0],G=H[1];return A}function CM(f,R){let h=[],$=[];for(let A of f)if(R(A))h.push(A);else $.push(A);return{matches:h,rest:$}}function mM(f,R){let h=[],$=[];for(let A of f)if(R(A))h.push(A);else $.push(A);return{matches:h,rest:$}}class WG{constructor(f){this.f=f}pickAll(f){return this.f(f)}pick1(f,R=!1){let h=this.f(f),$=h.length;if($===0)return null;if($===1)return h[0].value;let A=R?cM:bM,G=h[0];for(let H=1;H<$;H++){let N=h[H];if(A(G,N))G=N}return G.value}}function cM(f,R){let h=UG(R.specificity,f.specificity);return h>0||h===0&&R.index<f.index}function bM(f,R){let h=UG(R.specificity,f.specificity);return h>0||h===0&&R.index>f.index}function SG(f){return new WG(F0(f))}function F0(f){let R=f.map(xM);return(h,...$)=>R.flatMap((A)=>A(h,...$))}function xM(f){switch(f.type){case"terminal":{let R=[f.valueContainer];return(h,...$)=>R}case"tagName":return kM(f);case"attrValue":return lM(f);case"attrPresence":return sM(f);case"pushElement":return _M(f);case"popElement":return aM(f)}}function kM(f){let R={};for(let h of f.variants)R[h.value]=F0(h.cont);return(h,...$)=>{let A=R[h.name];return A?A(h,...$):[]}}function sM(f){let R=f.name,h=F0(f.cont);return($,...A)=>Object.prototype.hasOwnProperty.call($.attribs,R)?h($,...A):[]}function lM(f){let R=[];for(let $ of f.matchers){let A=$.predicate,G=F0($.cont);R.push((H,N,...U)=>A(H)?G(N,...U):[])}let h=f.name;return($,...A)=>{let G=$.attribs[h];return G||G===""?R.flatMap((H)=>H(G,$,...A)):[]}}function _M(f){let R=F0(f.cont),h=f.combinator==="+"?rF:dM;return($,...A)=>{let G=h($);if(G===null)return[];return R(G,$,...A)}}var rF=(f)=>{let R=f.prev;if(R===null)return null;return N$(R)?R:rF(R)},dM=(f)=>{let R=f.parent;return R&&N$(R)?R:null};function aM(f){let R=F0(f.cont);return(h,$,...A)=>R($,...A)}var M$=new Uint16Array("\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\x00\x00\x00\x00\x00\x00\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\uD835\uDD04rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\uD835\uDD38plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\uD835\uDC9Cign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\uD835\uDD05pf;\uC000\uD835\uDD39eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\uD835\uDC9Ep\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\uD835\uDD07\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\x00\x00\x00\u0342\u0354\x00\u0405f;\uC000\uD835\uDD3B\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\x00\x00\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\x00\x00\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\x00\u0446\x00\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\x00\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\uD835\uDC9Frok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\uD835\uDD08rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\x00\x00\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\uD835\uDD3Csilon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\uD835\uDD09lled\u0253\u0597\x00\x00\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\x00\u05BF\x00\x00\u05C4f;\uC000\uD835\uDD3DAll;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\uD835\uDD0A;\u62D9pf;\uC000\uD835\uDD3Eeater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\uD835\uDCA2;\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\x00\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\x00\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\uD835\uDD40a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\x00\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\uD835\uDD0Dpf;\uC000\uD835\uDD41\u01E3\u07C7\x00\u07CCr;\uC000\uD835\uDCA5rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\uD835\uDD0Epf;\uC000\uD835\uDD42cr;\uC000\uD835\uDCA6\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\x00\u08C3bleBracket;\u67E6n\u01D4\u08C8\x00\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\uD835\uDD0F\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\uD835\uDD43er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\uD835\uDD10nusPlus;\u6213pf;\uC000\uD835\uDD44c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\uD835\uDD11\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\uD835\uDCA9ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\uD835\uDD12rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\uD835\uDD46enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\uD835\uDCAAash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\uD835\uDD13i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\uD835\uDCAB;\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B\"\u4022r;\uC000\uD835\uDD14pf;\u611Acr;\uC000\uD835\uDCAC\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\x00\u1005bleBracket;\u67E7n\u01D4\u100A\x00\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\uD835\uDD16ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\uD835\uDD4A\u0272\u116D\x00\x00\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\uD835\uDCAEar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\uD835\uDD17\u0100ei\u127B\u1289\u01F2\u1280\x00\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\uD835\uDD4BipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\uD835\uDCAFrok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\x00\u132C\u1331\x00\x00\x00\x00\x00\u1338\u133D\u1377\u1385\x00\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\x00\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\uD835\uDD18rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\uD835\uDD4C\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\uD835\uDCB0ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\uD835\uDD19pf;\uC000\uD835\uDD4Dcr;\uC000\uD835\uDCB1dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\uD835\uDD1Apf;\uC000\uD835\uDD4Ecr;\uC000\uD835\uDCB2\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\uD835\uDD1B;\u439Epf;\uC000\uD835\uDD4Fcr;\uC000\uD835\uDCB3\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\uD835\uDD1Cpf;\uC000\uD835\uDD50cr;\uC000\uD835\uDCB4ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\x00\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\uD835\uDCB5\u0BE1\u1583\u158A\u1590\x00\u15B0\u15B6\u15BF\x00\x00\x00\x00\u15C6\u15DB\u15EB\u165F\u166D\x00\u1695\u169B\u16B2\u16B9\x00\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\uD835\uDD1Erave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\x00\x00\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\uD835\uDD52\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\uD835\uDCB6;\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\uD835\uDD1Fg\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\x00\x00\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\x00\u1833\u01B2\u182F\x00\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\uD835\uDD53\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\uD835\uDCB7mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\x00\u19E8\u1A11\u1A15\u1A32\x00\u1A37\u1A50\x00\x00\u1AB4\x00\x00\u1AC1\x00\x00\u1B21\u1B2E\u1B4D\u1B52\x00\u1BFD\x00\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\x00\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\uD835\uDD20\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\x00\x00\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\x00\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\x00\x00\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\x00\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\uD835\uDD54o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\uD835\uDCB8\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\x00\x00\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\x00\x00\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\uD835\uDD21ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\x00\x00\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\uD835\uDD55\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\x00\x00\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\uD835\uDCB9;\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\uD835\uDD22\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\uD835\uDD56\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\x00\x00\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\x00\u1F9E\x00\u1FA1\u1FA7\x00\x00\u1FC6\u1FCC\x00\u1FD3\x00\u1FE6\u1FEA\u2000\x00\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\x00\x00\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\uD835\uDD23lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\x00\u1FF3f;\uC000\uD835\uDD57\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\x00\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\x00\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\x00\u2036;\u6154;\u6156\u02B4\u203E\u2041\x00\x00\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\x00\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\uD835\uDCBB\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\uD835\uDD24\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\uD835\uDD58\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\x00\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\uD835\uDD25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\uD835\uDD59bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\uD835\uDCBDas\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\x00\u22AA\x00\u22B8\u22C5\u22CE\x00\u22D5\u22F3\x00\x00\u22F8\u2322\u2367\u2362\u237F\x00\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\uD835\uDD26rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\uD835\uDD5Aa;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\uD835\uDCBEn\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\x00\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\uD835\uDD27ath;\u4237pf;\uC000\uD835\uDD5B\u01E3\u23EC\x00\u23F1r;\uC000\uD835\uDCBFrcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\uD835\uDD28reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\uD835\uDD5Ccr;\uC000\uD835\uDCC0\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\x00\u24AA\x00\u24B1\x00\x00\x00\x00\x00\u24B5\u24BA\x00\u24C6\u24C8\u24CD\x00\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\uD835\uDD29\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\uD835\uDD5Dus;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\uD835\uDCC1m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\uD835\uDD2Ao;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\uD835\uDD5E\u0100ct\u28F8\u28FDr;\uC000\uD835\uDCC2pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\x00\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\x00\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\uD835\uDD2B\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\uD835\uDD5F\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\uD835\uDCC3ort\u026D\u2B05\x00\x00\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u2D2D\x00\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\x00\x00\u2D8D\u2DAB\x00\u2DC8\u2DCE\x00\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\uD835\uDD2C\u036F\u2D79\x00\x00\u2D7C\x00\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\uD835\uDD60\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\x00\u2E7D\x00\u2E80\u2E9D\x00\u2EA2\u2EB9\x00\x00\u2ECB\u0E9C\x00\u2F13\x00\x00\u2F2B\u2FBC\x00\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\x00\x00\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\uD835\uDD2D\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\uD835\uDD61nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\uD835\uDCC5;\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\uD835\uDD2Epf;\uC000\uD835\uDD62rime;\u6057cr;\uC000\uD835\uDCC6\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\uD835\uDD2F\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\uD835\uDD63us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\uD835\uDCC7\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\x00\u337A\u33A4\x00\x00\u33EC\u33F0\x00\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\x00\u3616\x00\x00\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\x00\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\uD835\uDD30\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\x00\x00\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\uD835\uDD64a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\uD835\uDCC8tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\x00\u367E\u36C2\x00\x00\x00\x00\x00\u36DB\u3703\x00\u3709\u376C\x00\x00\x00\u3787\u0272\u3656\x00\x00\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\uD835\uDD31\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\x00\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\uD835\uDD65rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\uD835\uDCC9;\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\x00\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\uD835\uDD32rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\x00\x00\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\uD835\uDD66\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\x00\x00\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\uD835\uDCCA\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\uD835\uDD33tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\uD835\uDD67ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\uD835\uDCCB\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\uD835\uDD34pf;\uC000\uD835\uDD68\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\uD835\uDCCC\u0AE3\u178E\u3A87\x00\u3A8B\x00\u3A90\u3A9B\x00\x00\u3A9D\u3AA8\u3AAB\u3AAF\x00\x00\u3AC3\u3ACE\x00\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\uD835\uDD35\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\uD835\uDD69im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\uD835\uDCCD\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\uD835\uDD36cy;\u4457pf;\uC000\uD835\uDD6Acr;\uC000\uD835\uDCCE\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\uD835\uDD37cy;\u4436grarr;\u61DDpf;\uC000\uD835\uDD6Bcr;\uC000\uD835\uDCCF\u0100jn\u3B85\u3B87;\u600Dj;\u600C".split("").map((f)=>f.charCodeAt(0)));var J$=new Uint16Array("\u0200aglq\t\x15\x18\x1B\u026D\x0F\x00\x00\x12p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((f)=>f.charCodeAt(0)));var YG,rM=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),W0=(YG=String.fromCodePoint)!==null&&YG!==void 0?YG:function(f){let R="";if(f>65535)f-=65536,R+=String.fromCharCode(f>>>10&1023|55296),f=56320|f&1023;return R+=String.fromCharCode(f),R};function Sh(f){var R;if(f>=55296&&f<=57343||f>1114111)return 65533;return(R=rM.get(f))!==null&&R!==void 0?R:f}var $f;(function(f){f[f.NUM=35]="NUM",f[f.SEMI=59]="SEMI",f[f.EQUALS=61]="EQUALS",f[f.ZERO=48]="ZERO",f[f.NINE=57]="NINE",f[f.LOWER_A=97]="LOWER_A",f[f.LOWER_F=102]="LOWER_F",f[f.LOWER_X=120]="LOWER_X",f[f.LOWER_Z=122]="LOWER_Z",f[f.UPPER_A=65]="UPPER_A",f[f.UPPER_F=70]="UPPER_F",f[f.UPPER_Z=90]="UPPER_Z"})($f||($f={}));var iM=32,Pf;(function(f){f[f.VALUE_LENGTH=49152]="VALUE_LENGTH",f[f.BRANCH_LENGTH=16256]="BRANCH_LENGTH",f[f.JUMP_TABLE=127]="JUMP_TABLE"})(Pf||(Pf={}));function DG(f){return f>=$f.ZERO&&f<=$f.NINE}function pM(f){return f>=$f.UPPER_A&&f<=$f.UPPER_F||f>=$f.LOWER_A&&f<=$f.LOWER_F}function oM(f){return f>=$f.UPPER_A&&f<=$f.UPPER_Z||f>=$f.LOWER_A&&f<=$f.LOWER_Z||DG(f)}function nM(f){return f===$f.EQUALS||oM(f)}var hf;(function(f){f[f.EntityStart=0]="EntityStart",f[f.NumericStart=1]="NumericStart",f[f.NumericDecimal=2]="NumericDecimal",f[f.NumericHex=3]="NumericHex",f[f.NamedEntity=4]="NamedEntity"})(hf||(hf={}));var CR;(function(f){f[f.Legacy=0]="Legacy",f[f.Strict=1]="Strict",f[f.Attribute=2]="Attribute"})(CR||(CR={}));class iF{constructor(f,R,h){this.decodeTree=f,this.emitCodePoint=R,this.errors=h,this.state=hf.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=CR.Strict}startEntity(f){this.decodeMode=f,this.state=hf.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(f,R){switch(this.state){case hf.EntityStart:{if(f.charCodeAt(R)===$f.NUM)return this.state=hf.NumericStart,this.consumed+=1,this.stateNumericStart(f,R+1);return this.state=hf.NamedEntity,this.stateNamedEntity(f,R)}case hf.NumericStart:return this.stateNumericStart(f,R);case hf.NumericDecimal:return this.stateNumericDecimal(f,R);case hf.NumericHex:return this.stateNumericHex(f,R);case hf.NamedEntity:return this.stateNamedEntity(f,R)}}stateNumericStart(f,R){if(R>=f.length)return-1;if((f.charCodeAt(R)|iM)===$f.LOWER_X)return this.state=hf.NumericHex,this.consumed+=1,this.stateNumericHex(f,R+1);return this.state=hf.NumericDecimal,this.stateNumericDecimal(f,R)}addToNumericResult(f,R,h,$){if(R!==h){let A=h-R;this.result=this.result*Math.pow($,A)+parseInt(f.substr(R,A),$),this.consumed+=A}}stateNumericHex(f,R){let h=R;while(R<f.length){let $=f.charCodeAt(R);if(DG($)||pM($))R+=1;else return this.addToNumericResult(f,h,R,16),this.emitNumericEntity($,3)}return this.addToNumericResult(f,h,R,16),-1}stateNumericDecimal(f,R){let h=R;while(R<f.length){let $=f.charCodeAt(R);if(DG($))R+=1;else return this.addToNumericResult(f,h,R,10),this.emitNumericEntity($,2)}return this.addToNumericResult(f,h,R,10),-1}emitNumericEntity(f,R){var h;if(this.consumed<=R)return(h=this.errors)===null||h===void 0||h.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(f===$f.SEMI)this.consumed+=1;else if(this.decodeMode===CR.Strict)return 0;if(this.emitCodePoint(Sh(this.result),this.consumed),this.errors){if(f!==$f.SEMI)this.errors.missingSemicolonAfterCharacterReference();this.errors.validateNumericCharacterReference(this.result)}return this.consumed}stateNamedEntity(f,R){let{decodeTree:h}=this,$=h[this.treeIndex],A=($&Pf.VALUE_LENGTH)>>14;for(;R<f.length;R++,this.excess++){let G=f.charCodeAt(R);if(this.treeIndex=ZG(h,$,this.treeIndex+Math.max(1,A),G),this.treeIndex<0)return this.result===0||this.decodeMode===CR.Attribute&&(A===0||nM(G))?0:this.emitNotTerminatedNamedEntity();if($=h[this.treeIndex],A=($&Pf.VALUE_LENGTH)>>14,A!==0){if(G===$f.SEMI)return this.emitNamedEntityData(this.treeIndex,A,this.consumed+this.excess);if(this.decodeMode!==CR.Strict)this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0}}return-1}emitNotTerminatedNamedEntity(){var f;let{result:R,decodeTree:h}=this,$=(h[R]&Pf.VALUE_LENGTH)>>14;return this.emitNamedEntityData(R,$,this.consumed),(f=this.errors)===null||f===void 0||f.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(f,R,h){let{decodeTree:$}=this;if(this.emitCodePoint(R===1?$[f]&~Pf.VALUE_LENGTH:$[f+1],h),R===3)this.emitCodePoint($[f+2],h);return h}end(){var f;switch(this.state){case hf.NamedEntity:return this.result!==0&&(this.decodeMode!==CR.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case hf.NumericDecimal:return this.emitNumericEntity(0,2);case hf.NumericHex:return this.emitNumericEntity(0,3);case hf.NumericStart:return(f=this.errors)===null||f===void 0||f.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case hf.EntityStart:return 0}}}function pF(f){let R="",h=new iF(f,($)=>R+=W0($));return function $(A,G){let H=0,N=0;while((N=A.indexOf("&",N))>=0){R+=A.slice(H,N),h.startEntity(G);let F=h.write(A,N+1);if(F<0){H=N+h.end();break}H=N+F,N=F===0?H+1:H}let U=R+A.slice(H);return R="",U}}function ZG(f,R,h,$){let A=(R&Pf.BRANCH_LENGTH)>>7,G=R&Pf.JUMP_TABLE;if(A===0)return G!==0&&$===G?h:-1;if(G){let U=$-G;return U<0||U>=A?-1:f[h+U]-1}let H=h,N=H+A-1;while(H<=N){let U=H+N>>>1,F=f[U];if(F<$)H=U+1;else if(F>$)N=U-1;else return f[U+A]}return-1}var sv=pF(M$),lv=pF(J$);var M;(function(f){f[f.Tab=9]="Tab",f[f.NewLine=10]="NewLine",f[f.FormFeed=12]="FormFeed",f[f.CarriageReturn=13]="CarriageReturn",f[f.Space=32]="Space",f[f.ExclamationMark=33]="ExclamationMark",f[f.Number=35]="Number",f[f.Amp=38]="Amp",f[f.SingleQuote=39]="SingleQuote",f[f.DoubleQuote=34]="DoubleQuote",f[f.Dash=45]="Dash",f[f.Slash=47]="Slash",f[f.Zero=48]="Zero",f[f.Nine=57]="Nine",f[f.Semi=59]="Semi",f[f.Lt=60]="Lt",f[f.Eq=61]="Eq",f[f.Gt=62]="Gt",f[f.Questionmark=63]="Questionmark",f[f.UpperA=65]="UpperA",f[f.LowerA=97]="LowerA",f[f.UpperF=70]="UpperF",f[f.LowerF=102]="LowerF",f[f.UpperZ=90]="UpperZ",f[f.LowerZ=122]="LowerZ",f[f.LowerX=120]="LowerX",f[f.OpeningSquareBracket=91]="OpeningSquareBracket"})(M||(M={}));var Y;(function(f){f[f.Text=1]="Text",f[f.BeforeTagName=2]="BeforeTagName",f[f.InTagName=3]="InTagName",f[f.InSelfClosingTag=4]="InSelfClosingTag",f[f.BeforeClosingTagName=5]="BeforeClosingTagName",f[f.InClosingTagName=6]="InClosingTagName",f[f.AfterClosingTagName=7]="AfterClosingTagName",f[f.BeforeAttributeName=8]="BeforeAttributeName",f[f.InAttributeName=9]="InAttributeName",f[f.AfterAttributeName=10]="AfterAttributeName",f[f.BeforeAttributeValue=11]="BeforeAttributeValue",f[f.InAttributeValueDq=12]="InAttributeValueDq",f[f.InAttributeValueSq=13]="InAttributeValueSq",f[f.InAttributeValueNq=14]="InAttributeValueNq",f[f.BeforeDeclaration=15]="BeforeDeclaration",f[f.InDeclaration=16]="InDeclaration",f[f.InProcessingInstruction=17]="InProcessingInstruction",f[f.BeforeComment=18]="BeforeComment",f[f.CDATASequence=19]="CDATASequence",f[f.InSpecialComment=20]="InSpecialComment",f[f.InCommentLike=21]="InCommentLike",f[f.BeforeSpecialS=22]="BeforeSpecialS",f[f.SpecialStartSequence=23]="SpecialStartSequence",f[f.InSpecialTag=24]="InSpecialTag",f[f.BeforeEntity=25]="BeforeEntity",f[f.BeforeNumericEntity=26]="BeforeNumericEntity",f[f.InNamedEntity=27]="InNamedEntity",f[f.InNumericEntity=28]="InNumericEntity",f[f.InHexEntity=29]="InHexEntity"})(Y||(Y={}));function nf(f){return f===M.Space||f===M.NewLine||f===M.Tab||f===M.FormFeed||f===M.CarriageReturn}function X$(f){return f===M.Slash||f===M.Gt||nf(f)}function oF(f){return f>=M.Zero&&f<=M.Nine}function eM(f){return f>=M.LowerA&&f<=M.LowerZ||f>=M.UpperA&&f<=M.UpperZ}function uM(f){return f>=M.UpperA&&f<=M.UpperF||f>=M.LowerA&&f<=M.LowerF}var cf;(function(f){f[f.NoValue=0]="NoValue",f[f.Unquoted=1]="Unquoted",f[f.Single=2]="Single",f[f.Double=3]="Double"})(cf||(cf={}));var wf={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class z${constructor({xmlMode:f=!1,decodeEntities:R=!0},h){this.cbs=h,this.state=Y.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Y.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=f,this.decodeEntities=R,this.entityTrie=f?J$:M$}reset(){this.state=Y.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Y.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()}end(){if(this.running)this.finish()}pause(){this.running=!1}resume(){if(this.running=!0,this.index<this.buffer.length+this.offset)this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(f){if(f===M.Lt||!this.decodeEntities&&this.fastForwardTo(M.Lt)){if(this.index>this.sectionStart)this.cbs.ontext(this.sectionStart,this.index);this.state=Y.BeforeTagName,this.sectionStart=this.index}else if(this.decodeEntities&&f===M.Amp)this.state=Y.BeforeEntity}stateSpecialStartSequence(f){let R=this.sequenceIndex===this.currentSequence.length;if(!(R?X$(f):(f|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!R){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=Y.InTagName,this.stateInTagName(f)}stateInSpecialTag(f){if(this.sequenceIndex===this.currentSequence.length){if(f===M.Gt||nf(f)){let R=this.index-this.currentSequence.length;if(this.sectionStart<R){let h=this.index;this.index=R,this.cbs.ontext(this.sectionStart,R),this.index=h}this.isSpecial=!1,this.sectionStart=R+2,this.stateInClosingTagName(f);return}this.sequenceIndex=0}if((f|32)===this.currentSequence[this.sequenceIndex])this.sequenceIndex+=1;else if(this.sequenceIndex===0){if(this.currentSequence===wf.TitleEnd){if(this.decodeEntities&&f===M.Amp)this.state=Y.BeforeEntity}else if(this.fastForwardTo(M.Lt))this.sequenceIndex=1}else this.sequenceIndex=Number(f===M.Lt)}stateCDATASequence(f){if(f===wf.Cdata[this.sequenceIndex]){if(++this.sequenceIndex===wf.Cdata.length)this.state=Y.InCommentLike,this.currentSequence=wf.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1}else this.sequenceIndex=0,this.state=Y.InDeclaration,this.stateInDeclaration(f)}fastForwardTo(f){while(++this.index<this.buffer.length+this.offset)if(this.buffer.charCodeAt(this.index-this.offset)===f)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(f){if(f===this.currentSequence[this.sequenceIndex]){if(++this.sequenceIndex===this.currentSequence.length){if(this.currentSequence===wf.CdataEnd)this.cbs.oncdata(this.sectionStart,this.index,2);else this.cbs.oncomment(this.sectionStart,this.index,2);this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=Y.Text}}else if(this.sequenceIndex===0){if(this.fastForwardTo(this.currentSequence[0]))this.sequenceIndex=1}else if(f!==this.currentSequence[this.sequenceIndex-1])this.sequenceIndex=0}isTagStartChar(f){return this.xmlMode?!X$(f):eM(f)}startSpecial(f,R){this.isSpecial=!0,this.currentSequence=f,this.sequenceIndex=R,this.state=Y.SpecialStartSequence}stateBeforeTagName(f){if(f===M.ExclamationMark)this.state=Y.BeforeDeclaration,this.sectionStart=this.index+1;else if(f===M.Questionmark)this.state=Y.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(f)){let R=f|32;if(this.sectionStart=this.index,!this.xmlMode&&R===wf.TitleEnd[2])this.startSpecial(wf.TitleEnd,3);else this.state=!this.xmlMode&&R===wf.ScriptEnd[2]?Y.BeforeSpecialS:Y.InTagName}else if(f===M.Slash)this.state=Y.BeforeClosingTagName;else this.state=Y.Text,this.stateText(f)}stateInTagName(f){if(X$(f))this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f)}stateBeforeClosingTagName(f){if(nf(f));else if(f===M.Gt)this.state=Y.Text;else this.state=this.isTagStartChar(f)?Y.InClosingTagName:Y.InSpecialComment,this.sectionStart=this.index}stateInClosingTagName(f){if(f===M.Gt||nf(f))this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=Y.AfterClosingTagName,this.stateAfterClosingTagName(f)}stateAfterClosingTagName(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.state=Y.Text,this.baseState=Y.Text,this.sectionStart=this.index+1}stateBeforeAttributeName(f){if(f===M.Gt){if(this.cbs.onopentagend(this.index),this.isSpecial)this.state=Y.InSpecialTag,this.sequenceIndex=0;else this.state=Y.Text;this.baseState=this.state,this.sectionStart=this.index+1}else if(f===M.Slash)this.state=Y.InSelfClosingTag;else if(!nf(f))this.state=Y.InAttributeName,this.sectionStart=this.index}stateInSelfClosingTag(f){if(f===M.Gt)this.cbs.onselfclosingtag(this.index),this.state=Y.Text,this.baseState=Y.Text,this.sectionStart=this.index+1,this.isSpecial=!1;else if(!nf(f))this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f)}stateInAttributeName(f){if(f===M.Eq||X$(f))this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Y.AfterAttributeName,this.stateAfterAttributeName(f)}stateAfterAttributeName(f){if(f===M.Eq)this.state=Y.BeforeAttributeValue;else if(f===M.Slash||f===M.Gt)this.cbs.onattribend(cf.NoValue,this.index),this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f);else if(!nf(f))this.cbs.onattribend(cf.NoValue,this.index),this.state=Y.InAttributeName,this.sectionStart=this.index}stateBeforeAttributeValue(f){if(f===M.DoubleQuote)this.state=Y.InAttributeValueDq,this.sectionStart=this.index+1;else if(f===M.SingleQuote)this.state=Y.InAttributeValueSq,this.sectionStart=this.index+1;else if(!nf(f))this.sectionStart=this.index,this.state=Y.InAttributeValueNq,this.stateInAttributeValueNoQuotes(f)}handleInAttributeValue(f,R){if(f===R||!this.decodeEntities&&this.fastForwardTo(R))this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(R===M.DoubleQuote?cf.Double:cf.Single,this.index),this.state=Y.BeforeAttributeName;else if(this.decodeEntities&&f===M.Amp)this.baseState=this.state,this.state=Y.BeforeEntity}stateInAttributeValueDoubleQuotes(f){this.handleInAttributeValue(f,M.DoubleQuote)}stateInAttributeValueSingleQuotes(f){this.handleInAttributeValue(f,M.SingleQuote)}stateInAttributeValueNoQuotes(f){if(nf(f)||f===M.Gt)this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(cf.Unquoted,this.index),this.state=Y.BeforeAttributeName,this.stateBeforeAttributeName(f);else if(this.decodeEntities&&f===M.Amp)this.baseState=this.state,this.state=Y.BeforeEntity}stateBeforeDeclaration(f){if(f===M.OpeningSquareBracket)this.state=Y.CDATASequence,this.sequenceIndex=0;else this.state=f===M.Dash?Y.BeforeComment:Y.InDeclaration}stateInDeclaration(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.cbs.ondeclaration(this.sectionStart,this.index),this.state=Y.Text,this.sectionStart=this.index+1}stateInProcessingInstruction(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=Y.Text,this.sectionStart=this.index+1}stateBeforeComment(f){if(f===M.Dash)this.state=Y.InCommentLike,this.currentSequence=wf.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1;else this.state=Y.InDeclaration}stateInSpecialComment(f){if(f===M.Gt||this.fastForwardTo(M.Gt))this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Y.Text,this.sectionStart=this.index+1}stateBeforeSpecialS(f){let R=f|32;if(R===wf.ScriptEnd[3])this.startSpecial(wf.ScriptEnd,4);else if(R===wf.StyleEnd[3])this.startSpecial(wf.StyleEnd,4);else this.state=Y.InTagName,this.stateInTagName(f)}stateBeforeEntity(f){if(this.entityExcess=1,this.entityResult=0,f===M.Number)this.state=Y.BeforeNumericEntity;else if(f===M.Amp);else this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=Y.InNamedEntity,this.stateInNamedEntity(f)}stateInNamedEntity(f){if(this.entityExcess+=1,this.trieIndex=ZG(this.entityTrie,this.trieCurrent,this.trieIndex+1,f),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];let R=this.trieCurrent&Pf.VALUE_LENGTH;if(R){let h=(R>>14)-1;if(!this.allowLegacyEntity()&&f!==M.Semi)this.trieIndex+=h;else{let $=this.index-this.entityExcess+1;if($>this.sectionStart)this.emitPartial(this.sectionStart,$);if(this.entityResult=this.trieIndex,this.trieIndex+=h,this.entityExcess=0,this.sectionStart=this.index+1,h===0)this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&Pf.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~Pf.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(f){if((f|32)===M.LowerX)this.entityExcess++,this.state=Y.InHexEntity;else this.state=Y.InNumericEntity,this.stateInNumericEntity(f)}emitNumericEntity(f){let R=this.index-this.entityExcess-1;if(R+2+Number(this.state===Y.InHexEntity)!==this.index){if(R>this.sectionStart)this.emitPartial(this.sectionStart,R);this.sectionStart=this.index+Number(f),this.emitCodePoint(Sh(this.entityResult))}this.state=this.baseState}stateInNumericEntity(f){if(f===M.Semi)this.emitNumericEntity(!0);else if(oF(f))this.entityResult=this.entityResult*10+(f-M.Zero),this.entityExcess++;else{if(this.allowLegacyEntity())this.emitNumericEntity(!1);else this.state=this.baseState;this.index--}}stateInHexEntity(f){if(f===M.Semi)this.emitNumericEntity(!0);else if(oF(f))this.entityResult=this.entityResult*16+(f-M.Zero),this.entityExcess++;else if(uM(f))this.entityResult=this.entityResult*16+((f|32)-M.LowerA+10),this.entityExcess++;else{if(this.allowLegacyEntity())this.emitNumericEntity(!1);else this.state=this.baseState;this.index--}}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===Y.Text||this.baseState===Y.InSpecialTag)}cleanup(){if(this.running&&this.sectionStart!==this.index){if(this.state===Y.Text||this.state===Y.InSpecialTag&&this.sequenceIndex===0)this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index;else if(this.state===Y.InAttributeValueDq||this.state===Y.InAttributeValueSq||this.state===Y.InAttributeValueNq)this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index}}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){while(this.shouldContinue()){let f=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case Y.Text:{this.stateText(f);break}case Y.SpecialStartSequence:{this.stateSpecialStartSequence(f);break}case Y.InSpecialTag:{this.stateInSpecialTag(f);break}case Y.CDATASequence:{this.stateCDATASequence(f);break}case Y.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(f);break}case Y.InAttributeName:{this.stateInAttributeName(f);break}case Y.InCommentLike:{this.stateInCommentLike(f);break}case Y.InSpecialComment:{this.stateInSpecialComment(f);break}case Y.BeforeAttributeName:{this.stateBeforeAttributeName(f);break}case Y.InTagName:{this.stateInTagName(f);break}case Y.InClosingTagName:{this.stateInClosingTagName(f);break}case Y.BeforeTagName:{this.stateBeforeTagName(f);break}case Y.AfterAttributeName:{this.stateAfterAttributeName(f);break}case Y.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(f);break}case Y.BeforeAttributeValue:{this.stateBeforeAttributeValue(f);break}case Y.BeforeClosingTagName:{this.stateBeforeClosingTagName(f);break}case Y.AfterClosingTagName:{this.stateAfterClosingTagName(f);break}case Y.BeforeSpecialS:{this.stateBeforeSpecialS(f);break}case Y.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(f);break}case Y.InSelfClosingTag:{this.stateInSelfClosingTag(f);break}case Y.InDeclaration:{this.stateInDeclaration(f);break}case Y.BeforeDeclaration:{this.stateBeforeDeclaration(f);break}case Y.BeforeComment:{this.stateBeforeComment(f);break}case Y.InProcessingInstruction:{this.stateInProcessingInstruction(f);break}case Y.InNamedEntity:{this.stateInNamedEntity(f);break}case Y.BeforeEntity:{this.stateBeforeEntity(f);break}case Y.InHexEntity:{this.stateInHexEntity(f);break}case Y.InNumericEntity:{this.stateInNumericEntity(f);break}default:this.stateBeforeNumericEntity(f)}this.index++}this.cleanup()}finish(){if(this.state===Y.InNamedEntity)this.emitNamedEntity();if(this.sectionStart<this.index)this.handleTrailingData();this.cbs.onend()}handleTrailingData(){let f=this.buffer.length+this.offset;if(this.state===Y.InCommentLike)if(this.currentSequence===wf.CdataEnd)this.cbs.oncdata(this.sectionStart,f,0);else this.cbs.oncomment(this.sectionStart,f,0);else if(this.state===Y.InNumericEntity&&this.allowLegacyEntity())this.emitNumericEntity(!1);else if(this.state===Y.InHexEntity&&this.allowLegacyEntity())this.emitNumericEntity(!1);else if(this.state===Y.InTagName||this.state===Y.BeforeAttributeName||this.state===Y.BeforeAttributeValue||this.state===Y.AfterAttributeName||this.state===Y.InAttributeName||this.state===Y.InAttributeValueSq||this.state===Y.InAttributeValueDq||this.state===Y.InAttributeValueNq||this.state===Y.InClosingTagName);else this.cbs.ontext(this.sectionStart,f)}emitPartial(f,R){if(this.baseState!==Y.Text&&this.baseState!==Y.InSpecialTag)this.cbs.onattribdata(f,R);else this.cbs.ontext(f,R)}emitCodePoint(f){if(this.baseState!==Y.Text&&this.baseState!==Y.InSpecialTag)this.cbs.onattribentity(f);else this.cbs.ontextentity(f)}}var S0=new Set(["input","option","optgroup","select","button","datalist","textarea"]),m=new Set(["p"]),nF=new Set(["thead","tbody"]),eF=new Set(["dd","dt"]),uF=new Set(["rt","rp"]),tM=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",m],["h1",m],["h2",m],["h3",m],["h4",m],["h5",m],["h6",m],["select",S0],["input",S0],["output",S0],["button",S0],["datalist",S0],["textarea",S0],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",eF],["dt",eF],["address",m],["article",m],["aside",m],["blockquote",m],["details",m],["div",m],["dl",m],["fieldset",m],["figcaption",m],["figure",m],["footer",m],["form",m],["header",m],["hr",m],["main",m],["nav",m],["ol",m],["pre",m],["section",m],["table",m],["ul",m],["rt",uF],["rp",uF],["tbody",nF],["tfoot",nF]]),f5=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),tF=new Set(["math","svg"]),fW=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),R5=/\s|\//;class MG{constructor(f,R={}){var h,$,A,G,H;this.options=R,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=f!==null&&f!==void 0?f:{},this.lowerCaseTagNames=(h=R.lowerCaseTags)!==null&&h!==void 0?h:!R.xmlMode,this.lowerCaseAttributeNames=($=R.lowerCaseAttributeNames)!==null&&$!==void 0?$:!R.xmlMode,this.tokenizer=new((A=R.Tokenizer)!==null&&A!==void 0?A:z$)(this.options,this),(H=(G=this.cbs).onparserinit)===null||H===void 0||H.call(G,this)}ontext(f,R){var h,$;let A=this.getSlice(f,R);this.endIndex=R-1,($=(h=this.cbs).ontext)===null||$===void 0||$.call(h,A),this.startIndex=R}ontextentity(f){var R,h;let $=this.tokenizer.getSectionStart();this.endIndex=$-1,(h=(R=this.cbs).ontext)===null||h===void 0||h.call(R,W0(f)),this.startIndex=$}isVoidElement(f){return!this.options.xmlMode&&f5.has(f)}onopentagname(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.lowerCaseTagNames)h=h.toLowerCase();this.emitOpenTag(h)}emitOpenTag(f){var R,h,$,A;this.openTagStart=this.startIndex,this.tagname=f;let G=!this.options.xmlMode&&tM.get(f);if(G)while(this.stack.length>0&&G.has(this.stack[this.stack.length-1])){let H=this.stack.pop();(h=(R=this.cbs).onclosetag)===null||h===void 0||h.call(R,H,!0)}if(!this.isVoidElement(f)){if(this.stack.push(f),tF.has(f))this.foreignContext.push(!0);else if(fW.has(f))this.foreignContext.push(!1)}if((A=($=this.cbs).onopentagname)===null||A===void 0||A.call($,f),this.cbs.onopentag)this.attribs={}}endOpenTag(f){var R,h;if(this.startIndex=this.openTagStart,this.attribs)(h=(R=this.cbs).onopentag)===null||h===void 0||h.call(R,this.tagname,this.attribs,f),this.attribs=null;if(this.cbs.onclosetag&&this.isVoidElement(this.tagname))this.cbs.onclosetag(this.tagname,!0);this.tagname=""}onopentagend(f){this.endIndex=f,this.endOpenTag(!1),this.startIndex=f+1}onclosetag(f,R){var h,$,A,G,H,N;this.endIndex=R;let U=this.getSlice(f,R);if(this.lowerCaseTagNames)U=U.toLowerCase();if(tF.has(U)||fW.has(U))this.foreignContext.pop();if(!this.isVoidElement(U)){let F=this.stack.lastIndexOf(U);if(F!==-1)if(this.cbs.onclosetag){let S=this.stack.length-F;while(S--)this.cbs.onclosetag(this.stack.pop(),S!==0)}else this.stack.length=F;else if(!this.options.xmlMode&&U==="p")this.emitOpenTag("p"),this.closeCurrentTag(!0)}else if(!this.options.xmlMode&&U==="br")($=(h=this.cbs).onopentagname)===null||$===void 0||$.call(h,"br"),(G=(A=this.cbs).onopentag)===null||G===void 0||G.call(A,"br",{},!0),(N=(H=this.cbs).onclosetag)===null||N===void 0||N.call(H,"br",!1);this.startIndex=R+1}onselfclosingtag(f){if(this.endIndex=f,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1])this.closeCurrentTag(!1),this.startIndex=f+1;else this.onopentagend(f)}closeCurrentTag(f){var R,h;let $=this.tagname;if(this.endOpenTag(f),this.stack[this.stack.length-1]===$)(h=(R=this.cbs).onclosetag)===null||h===void 0||h.call(R,$,!f),this.stack.pop()}onattribname(f,R){this.startIndex=f;let h=this.getSlice(f,R);this.attribname=this.lowerCaseAttributeNames?h.toLowerCase():h}onattribdata(f,R){this.attribvalue+=this.getSlice(f,R)}onattribentity(f){this.attribvalue+=W0(f)}onattribend(f,R){var h,$;if(this.endIndex=R,($=(h=this.cbs).onattribute)===null||$===void 0||$.call(h,this.attribname,this.attribvalue,f===cf.Double?'"':f===cf.Single?"'":f===cf.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname))this.attribs[this.attribname]=this.attribvalue;this.attribvalue=""}getInstructionName(f){let R=f.search(R5),h=R<0?f:f.substr(0,R);if(this.lowerCaseTagNames)h=h.toLowerCase();return h}ondeclaration(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.cbs.onprocessinginstruction){let $=this.getInstructionName(h);this.cbs.onprocessinginstruction(`!${$}`,`!${h}`)}this.startIndex=R+1}onprocessinginstruction(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.cbs.onprocessinginstruction){let $=this.getInstructionName(h);this.cbs.onprocessinginstruction(`?${$}`,`?${h}`)}this.startIndex=R+1}oncomment(f,R,h){var $,A,G,H;this.endIndex=R,(A=($=this.cbs).oncomment)===null||A===void 0||A.call($,this.getSlice(f,R-h)),(H=(G=this.cbs).oncommentend)===null||H===void 0||H.call(G),this.startIndex=R+1}oncdata(f,R,h){var $,A,G,H,N,U,F,S,D,J;this.endIndex=R;let Z=this.getSlice(f,R-h);if(this.options.xmlMode||this.options.recognizeCDATA)(A=($=this.cbs).oncdatastart)===null||A===void 0||A.call($),(H=(G=this.cbs).ontext)===null||H===void 0||H.call(G,Z),(U=(N=this.cbs).oncdataend)===null||U===void 0||U.call(N);else(S=(F=this.cbs).oncomment)===null||S===void 0||S.call(F,`[CDATA[${Z}]]`),(J=(D=this.cbs).oncommentend)===null||J===void 0||J.call(D);this.startIndex=R+1}onend(){var f,R;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let h=this.stack.length;h>0;this.cbs.onclosetag(this.stack[--h],!0));}(R=(f=this.cbs).onend)===null||R===void 0||R.call(f)}reset(){var f,R,h,$;(R=(f=this.cbs).onreset)===null||R===void 0||R.call(f),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,($=(h=this.cbs).onparserinit)===null||$===void 0||$.call(h,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(f){this.reset(),this.end(f)}getSlice(f,R){while(f-this.bufferOffset>=this.buffers[0].length)this.shiftBuffer();let h=this.buffers[0].slice(f-this.bufferOffset,R-this.bufferOffset);while(R-this.bufferOffset>this.buffers[0].length)this.shiftBuffer(),h+=this.buffers[0].slice(0,R-this.bufferOffset);return h}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(f){var R,h;if(this.ended){(h=(R=this.cbs).onerror)===null||h===void 0||h.call(R,new Error(".write() after done!"));return}if(this.buffers.push(f),this.tokenizer.running)this.tokenizer.write(f),this.writeIndex++}end(f){var R,h;if(this.ended){(h=(R=this.cbs).onerror)===null||h===void 0||h.call(R,new Error(".end() after done!"));return}if(f)this.write(f);this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){this.tokenizer.resume();while(this.tokenizer.running&&this.writeIndex<this.buffers.length)this.tokenizer.write(this.buffers[this.writeIndex++]);if(this.ended)this.tokenizer.end()}parseChunk(f){this.write(f)}done(f){this.end(f)}}var RW=/["&'<>$\x80-\uFFFF]/g,hW=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),h5=String.prototype.codePointAt!=null?(f,R)=>f.codePointAt(R):(f,R)=>(f.charCodeAt(R)&64512)===55296?(f.charCodeAt(R)-55296)*1024+f.charCodeAt(R+1)-56320+65536:f.charCodeAt(R);function Q$(f){let R="",h=0,$;while(($=RW.exec(f))!==null){let A=$.index,G=f.charCodeAt(A),H=hW.get(G);if(H!==void 0)R+=f.substring(h,A)+H,h=A+1;else R+=`${f.substring(h,A)}&#x${h5(f,A).toString(16)};`,h=RW.lastIndex+=Number((G&64512)===55296)}return R+f.substr(h)}function JG(f,R){return function h($){let A,G=0,H="";while(A=f.exec($)){if(G!==A.index)H+=$.substring(G,A.index);H+=R.get(A[0].charCodeAt(0)),G=A.index+1}return H+$.substring(G)}}var $5=JG(/[&<>'"]/g,hW),XG=JG(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),zG=JG(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var $W;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})($W||($W={}));var AW;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})(AW||(AW={}));var GW=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((f)=>[f.toLowerCase(),f])),HW=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((f)=>[f.toLowerCase(),f]));var A5=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function G5(f){return f.replace(/"/g,"&quot;")}function H5(f,R){var h;if(!f)return;let $=((h=R.encodeEntities)!==null&&h!==void 0?h:R.decodeEntities)===!1?G5:R.xmlMode||R.encodeEntities!=="utf8"?Q$:XG;return Object.keys(f).map((A)=>{var G,H;let N=(G=f[A])!==null&&G!==void 0?G:"";if(R.xmlMode==="foreign")A=(H=HW.get(A))!==null&&H!==void 0?H:A;if(!R.emptyAttrs&&!R.xmlMode&&N==="")return A;return`${A}="${$(N)}"`}).join(" ")}var NW=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Yh(f,R={}){let h="length"in f?f:[f],$="";for(let A=0;A<h.length;A++)$+=N5(h[A],R);return $}function N5(f,R){switch(f.type){case DF:return Yh(f.children,R);case LF:case MF:return S5(f);case JF:return Z5(f);case wF:return D5(f);case XF:case zF:case QF:return W5(f,R);case ZF:return Y5(f,R)}}var U5=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),F5=new Set(["svg","math"]);function W5(f,R){var h;if(R.xmlMode==="foreign"){if(f.name=(h=GW.get(f.name))!==null&&h!==void 0?h:f.name,f.parent&&U5.has(f.parent.name))R={...R,xmlMode:!1}}if(!R.xmlMode&&F5.has(f.name))R={...R,xmlMode:"foreign"};let $=`<${f.name}`,A=H5(f.attribs,R);if(A)$+=` ${A}`;if(f.children.length===0&&(R.xmlMode?R.selfClosingTags!==!1:R.selfClosingTags&&NW.has(f.name))){if(!R.xmlMode)$+=" ";$+="/>"}else{if($+=">",f.children.length>0)$+=Yh(f.children,R);if(R.xmlMode||!NW.has(f.name))$+=`</${f.name}>`}return $}function S5(f){return`<${f.data}>`}function Y5(f,R){var h;let $=f.data||"";if(((h=R.encodeEntities)!==null&&h!==void 0?h:R.decodeEntities)!==!1&&!(!R.xmlMode&&f.parent&&A5.has(f.parent.name)))$=R.xmlMode||R.encodeEntities!=="utf8"?Q$($):zG($);return $}function D5(f){return`<![CDATA[${f.children[0].data}]]>`}function Z5(f){return`<!--${f.data}-->`}function UW(f,R){let h=new n8(void 0,R);return new MG(h,R).end(f),h.root}var BG=v(YW(),1);function KG(f,R,h=()=>{return}){if(f===void 0){let $=function(...A){return R($,...A)};return $}if(f>=0)return function(...$){return R(KG(f-1,R,h),...$)};return h}function XW(f,R){let h=0,$=f.length;while(h<$&&f[h]===R)++h;while($>h&&f[$-1]===R)--$;return h>0||$<f.length?f.substring(h,$):f}function y5(f,R){let h=f.length;while(h>0&&f[h-1]===R)--h;return h<f.length?f.substring(0,h):f}function j5(f){return f.replace(/[\s\S]/g,(R)=>"\\u"+R.charCodeAt().toString(16).padStart(4,"0"))}function zW(f,R){let h=new Map;for(let $=f.length;$-- >0;){let A=f[$],G=R(A);h.set(G,h.has(G)?BG.default(A,h.get(G),{arrayMerge:O5}):A)}return[...h.values()].reverse()}var O5=(f,R,h)=>[...R];function D0(f,R){for(let h of R){if(!f)return;f=f[h]}return f}function DW(f,R="a",h=26){let $=[];do f-=1,$.push(f%h),f=f/h>>0;while(f>0);let A=R.charCodeAt(0);return $.reverse().map((G)=>String.fromCharCode(A+G)).join("")}var QG=["I","X","C","M"],ZW=["V","L","D"];function MW(f){return[...f+""].map((R)=>+R).reverse().map((R,h)=>R%5<4?(R<5?"":ZW[h])+QG[h].repeat(R%5):QG[h]+(R<5?ZW[h]:QG[h+1])).reverse().join("")}class vG{constructor(f,R=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=R||f.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=D0(f,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=D0(f,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(f,R=!1){if(this.nextLineAvailableChars<=0&&!R)this.startNewLine();let h=this.nextLineWords.length===0,$=f.length+(h?0:1);if($<=this.nextLineAvailableChars||R)this.nextLineWords.push(f),this.nextLineAvailableChars-=$;else{let[A,...G]=this.splitLongWord(f);if(!h)this.startNewLine();this.nextLineWords.push(A),this.nextLineAvailableChars-=A.length;for(let H of G)this.startNewLine(),this.nextLineWords.push(H),this.nextLineAvailableChars-=H.length}}popWord(){let f=this.nextLineWords.pop();if(f!==void 0){let R=this.nextLineWords.length===0,h=f.length+(R?0:1);this.nextLineAvailableChars+=h}return f}concatWord(f,R=!1){if(this.wordBreakOpportunity&&f.length>this.nextLineAvailableChars)this.pushWord(f,R),this.wordBreakOpportunity=!1;else{let h=this.popWord();this.pushWord(h?h.concat(f):f,R)}}startNewLine(f=1){if(this.lines.push(this.nextLineWords),f>1)this.lines.push(...Array.from({length:f-1},()=>[]));this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map((f)=>f.join(" ")).join(`
68
+ `)}splitLongWord(f){let R=[],h=0;while(f.length>this.maxLineLength){let $=f.substring(0,this.maxLineLength),A=f.substring(this.maxLineLength),G=$.lastIndexOf(this.wrapCharacters[h]);if(G>-1)f=$.substring(G+1)+A,R.push($.substring(0,G+1));else if(h++,h<this.wrapCharacters.length)f=$+A;else{if(this.forceWrapOnLimit){if(R.push($),f=A,f.length>this.maxLineLength)continue}else f=$+A;break}}return R.push(f),R}}class Z0{constructor(f=null){this.next=f}getRoot(){return this.next?this.next:this}}class bf extends Z0{constructor(f,R=null,h=1,$=void 0){super(R);this.leadingLineBreaks=h,this.inlineTextBuilder=new vG(f,$),this.rawText="",this.stashedLineBreaks=0,this.isPre=R&&R.isPre,this.isNoWrap=R&&R.isNoWrap}}class wG extends bf{constructor(f,R=null,{interRowLineBreaks:h=1,leadingLineBreaks:$=2,maxLineLength:A=void 0,maxPrefixLength:G=0,prefixAlign:H="left"}={}){super(f,R,$,A);this.maxPrefixLength=G,this.prefixAlign=H,this.interRowLineBreaks=h}}class WR extends bf{constructor(f,R=null,{leadingLineBreaks:h=1,maxLineLength:$=void 0,prefix:A=""}={}){super(f,R,h,$);this.prefix=A}}class LG extends Z0{constructor(f=null){super(f);this.rows=[],this.isPre=f&&f.isPre,this.isNoWrap=f&&f.isNoWrap}}class IG extends Z0{constructor(f=null){super(f);this.cells=[],this.isPre=f&&f.isPre,this.isNoWrap=f&&f.isNoWrap}}class SR extends Z0{constructor(f,R=null,h=void 0){super(R);this.inlineTextBuilder=new vG(f,h),this.rawText="",this.stashedLineBreaks=0,this.isPre=R&&R.isPre,this.isNoWrap=R&&R.isNoWrap}}class QW extends Z0{constructor(f=null,R){super(f);this.transform=R}}function E5(f){return[...f].map((R)=>"\\u"+R.charCodeAt(0).toString(16).padStart(4,"0")).join("")}class wW{constructor(f){this.whitespaceChars=f.preserveNewlines?f.whitespaceCharacters.replace(/\n/g,""):f.whitespaceCharacters;let R=E5(this.whitespaceChars);if(this.leadingWhitespaceRe=new RegExp(`^[${R}]`),this.trailingWhitespaceRe=new RegExp(`[${R}]$`),this.allWhitespaceOrEmptyRe=new RegExp(`^[${R}]*$`),this.newlineOrNonWhitespaceRe=new RegExp(`(\\n|[^\\n${R}])`,"g"),this.newlineOrNonNewlineStringRe=new RegExp("(\\n|[^\\n]+)","g"),f.preserveNewlines){let h=new RegExp(`\\n|[^\\n${R}]+`,"gm");this.shrinkWrapAdd=function($,A,G=(N)=>N,H=!1){if(!$)return;let N=A.stashedSpace,U=!1,F=h.exec($);if(F){if(U=!0,F[0]===`
69
69
  `)A.startNewLine();else if(N||this.testLeadingWhitespace($))A.pushWord(G(F[0]),H);else A.concatWord(G(F[0]),H);while((F=h.exec($))!==null)if(F[0]===`
70
70
  `)A.startNewLine();else A.pushWord(G(F[0]),H)}A.stashedSpace=N&&!U||this.testTrailingWhitespace($)}}else{let h=new RegExp(`[^${R}]+`,"g");this.shrinkWrapAdd=function($,A,G=(N)=>N,H=!1){if(!$)return;let N=A.stashedSpace,U=!1,F=h.exec($);if(F){if(U=!0,N||this.testLeadingWhitespace($))A.pushWord(G(F[0]),H);else A.concatWord(G(F[0]),H);while((F=h.exec($))!==null)A.pushWord(G(F[0]),H)}A.stashedSpace=N&&!U||this.testTrailingWhitespace($)}}}addLiteral(f,R,h=!0){if(!f)return;let $=R.stashedSpace,A=!1,G=this.newlineOrNonNewlineStringRe.exec(f);if(G){if(A=!0,G[0]===`
71
71
  `)R.startNewLine();else if($)R.pushWord(G[0],h);else R.concatWord(G[0],h);while((G=this.newlineOrNonNewlineStringRe.exec(f))!==null)if(G[0]===`
72
72
  `)R.startNewLine();else R.pushWord(G[0],h)}R.stashedSpace=$&&!A}testLeadingWhitespace(f){return this.leadingWhitespaceRe.test(f)}testTrailingWhitespace(f){return this.trailingWhitespaceRe.test(f)}testContainsWords(f){return!this.allWhitespaceOrEmptyRe.test(f)}countNewlinesNoWords(f){this.newlineOrNonWhitespaceRe.lastIndex=0;let R=0,h;while((h=this.newlineOrNonWhitespaceRe.exec(f))!==null)if(h[0]===`
73
- `)R++;else return 0;return R}}class XW{constructor(f,R,h=void 0){this.options=f,this.picker=R,this.metadata=h,this.whitespaceProcessor=new JW(f),this._stackItem=new bf(f),this._wordTransformer=void 0}pushWordTransform(f){this._wordTransformer=new MW(this._wordTransformer,f)}popWordTransform(){if(!this._wordTransformer)return;let f=this._wordTransformer.transform;return this._wordTransformer=this._wordTransformer.next,f}startNoWrap(){this._stackItem.isNoWrap=!0}stopNoWrap(){this._stackItem.isNoWrap=!1}_getCombinedWordTransformer(){let f=this._wordTransformer?(h)=>zW(h,this._wordTransformer):void 0,R=this.options.encodeCharacters;return f?R?(h)=>R(f(h)):f:R}_popStackItem(){let f=this._stackItem;return this._stackItem=f.next,f}addLineBreak(){if(!(this._stackItem instanceof bf||this._stackItem instanceof SR||this._stackItem instanceof YR))return;if(this._stackItem.isPre)this._stackItem.rawText+=`
74
- `;else this._stackItem.inlineTextBuilder.startNewLine()}addWordBreakOpportunity(){if(this._stackItem instanceof bf||this._stackItem instanceof SR||this._stackItem instanceof YR)this._stackItem.inlineTextBuilder.wordBreakOpportunity=!0}addInline(f,{noWordTransform:R=!1}={}){if(!(this._stackItem instanceof bf||this._stackItem instanceof SR||this._stackItem instanceof YR))return;if(this._stackItem.isPre){this._stackItem.rawText+=f;return}if(f.length===0||this._stackItem.stashedLineBreaks&&!this.whitespaceProcessor.testContainsWords(f))return;if(this.options.preserveNewlines){let h=this.whitespaceProcessor.countNewlinesNoWords(f);if(h>0){this._stackItem.inlineTextBuilder.startNewLine(h);return}}if(this._stackItem.stashedLineBreaks)this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);this.whitespaceProcessor.shrinkWrapAdd(f,this._stackItem.inlineTextBuilder,R?void 0:this._getCombinedWordTransformer(),this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}addLiteral(f){if(!(this._stackItem instanceof bf||this._stackItem instanceof SR||this._stackItem instanceof YR))return;if(f.length===0)return;if(this._stackItem.isPre){this._stackItem.rawText+=f;return}if(this._stackItem.stashedLineBreaks)this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);this.whitespaceProcessor.addLiteral(f,this._stackItem.inlineTextBuilder,this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}openBlock({leadingLineBreaks:f=1,reservedLineLength:R=0,isPre:h=!1}={}){let $=Math.max(20,this._stackItem.inlineTextBuilder.maxLineLength-R);if(this._stackItem=new bf(this.options,this._stackItem,f,$),h)this._stackItem.isPre=!0}closeBlock({trailingLineBreaks:f=1,blockTransform:R=void 0}={}){let h=this._popStackItem(),$=R?R(cR(h)):cR(h);w$(this._stackItem,$,h.leadingLineBreaks,Math.max(h.stashedLineBreaks,f))}openList({maxPrefixLength:f=0,prefixAlign:R="left",interRowLineBreaks:h=1,leadingLineBreaks:$=2}={}){this._stackItem=new wG(this.options,this._stackItem,{interRowLineBreaks:h,leadingLineBreaks:$,maxLineLength:this._stackItem.inlineTextBuilder.maxLineLength,maxPrefixLength:f,prefixAlign:R})}openListItem({prefix:f=""}={}){if(!(this._stackItem instanceof wG))throw new Error("Can't add a list item to something that is not a list! Check the formatter.");let R=this._stackItem,h=Math.max(f.length,R.maxPrefixLength),$=Math.max(20,R.inlineTextBuilder.maxLineLength-h);this._stackItem=new SR(this.options,R,{prefix:f,maxLineLength:$,leadingLineBreaks:R.interRowLineBreaks})}closeListItem(){let f=this._popStackItem(),R=f.next,h=Math.max(f.prefix.length,R.maxPrefixLength),$=`
75
- `+" ".repeat(h),G=(R.prefixAlign==="right"?f.prefix.padStart(h):f.prefix.padEnd(h))+cR(f).replace(/\n/g,$);w$(R,G,f.leadingLineBreaks,Math.max(f.stashedLineBreaks,R.interRowLineBreaks))}closeList({trailingLineBreaks:f=2}={}){let R=this._popStackItem(),h=cR(R);if(h)w$(this._stackItem,h,R.leadingLineBreaks,f)}openTable(){this._stackItem=new LG(this._stackItem)}openTableRow(){if(!(this._stackItem instanceof LG))throw new Error("Can't add a table row to something that is not a table! Check the formatter.");this._stackItem=new IG(this._stackItem)}openTableCell({maxColumnWidth:f=void 0}={}){if(!(this._stackItem instanceof IG))throw new Error("Can't add a table cell to something that is not a table row! Check the formatter.");this._stackItem=new YR(this.options,this._stackItem,f)}closeTableCell({colspan:f=1,rowspan:R=1}={}){let h=this._popStackItem(),$=DW(cR(h),`
76
- `);h.next.cells.push({colspan:f,rowspan:R,text:$})}closeTableRow(){let f=this._popStackItem();f.next.rows.push(f.cells)}closeTable({tableToString:f,leadingLineBreaks:R=2,trailingLineBreaks:h=2}){let $=this._popStackItem(),A=f($.rows);if(A)w$(this._stackItem,A,R,h)}toString(){return cR(this._stackItem.getRoot())}}function cR(f){if(!(f instanceof bf||f instanceof SR||f instanceof YR))throw new Error("Only blocks, list items and table cells can be requested for text contents.");return f.inlineTextBuilder.isEmpty()?f.rawText:f.rawText+f.inlineTextBuilder.toString()}function w$(f,R,h,$){if(!(f instanceof bf||f instanceof SR||f instanceof YR))throw new Error("Only blocks, list items and table cells can contain text.");let A=cR(f),G=Math.max(f.stashedLineBreaks,h);if(f.inlineTextBuilder.clear(),A)f.rawText=A+`
77
- `.repeat(G)+R;else f.rawText=R,f.leadingLineBreaks=G;f.stashedLineBreaks=$}function zW(f,R){return R?zW(R.transform(f),R.next):f}function y5(f={}){let R=f.selectors.filter((H)=>!H.format);if(R.length)throw new Error("Following selectors have no specified format: "+R.map((H)=>`\`${H.selector}\``).join(", "));let h=new Z$(f.selectors.map((H)=>[H.selector,H])).build(SG);if(typeof f.encodeCharacters!=="function")f.encodeCharacters=V5(f.encodeCharacters);let $=new Z$(f.baseElements.selectors.map((H,N)=>[H,N+1])).build(SG);function A(H){return O5(H,f,$)}let G=KG(f.limits.maxDepth,E5,function(H,N){N.addInline(f.limits.ellipsis||"")});return function(H,N=void 0){return j5(H,N,f,h,A,G)}}function j5(f,R,h,$,A,G){let H=h.limits.maxInputLength;if(H&&f&&f.length>H)console.warn(`Input length ${f.length} is above allowed limit of ${H}. Truncating without ellipsis.`),f=f.substring(0,H);let N=AW(f,{decodeEntities:h.decodeEntities}),U=A(N.children),F=new XW(h,$,R);return G(U,F),F.toString()}function O5(f,R,h){let $=[];function A(H,N){N=N.slice(0,R.limits.maxChildNodes);for(let U of N){if(U.type!=="tag")continue;let F=h.pick1(U);if(F>0)$.push({selectorIndex:F,element:U});else if(U.children)H(U.children);if($.length>=R.limits.maxBaseElements)return}}if(KG(R.limits.maxDepth,A)(f),R.baseElements.orderBy!=="occurrence")$.sort((H,N)=>H.selectorIndex-N.selectorIndex);return R.baseElements.returnDomByDefault&&$.length===0?f:$.map((H)=>H.element)}function E5(f,R,h){if(!R)return;let $=h.options;if(R.length>$.limits.maxChildNodes)R=R.slice(0,$.limits.maxChildNodes),R.push({data:$.limits.ellipsis,type:"text"});for(let G of R)switch(G.type){case"text":{h.addInline(G.data);break}case"tag":{let H=h.picker.pick1(G),N=$.formatters[H.format];N(G,f,h,H.options||{});break}}return}function V5(f){if(!f||Object.keys(f).length===0)return;let R=Object.entries(f).filter(([,G])=>G!==!1),h=new RegExp(R.map(([G])=>`(${B5([...G][0])})`).join("|"),"g"),$=R.map(([,G])=>G),A=(G,...H)=>$[H.findIndex((N)=>N)];return(G)=>G.replace(h,A)}function T5(f,R,h,$){}function g5(f,R,h,$){h.addLiteral($.string||"")}function C5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.addLiteral($.string||""),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function m5(f,R,h,$){R(f.children,h)}function c5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function QW(f){let R=f.attribs&&f.attribs.length?" "+Object.entries(f.attribs).map(([h,$])=>$===""?h:`${h}=${$.replace(/"/g,"&quot;")}`).join(" "):"";return`<${f.name}${R}>`}function wW(f){return`</${f.name}>`}function b5(f,R,h,$){h.startNoWrap(),h.addLiteral(QW(f)),h.stopNoWrap(),R(f.children,h),h.startNoWrap(),h.addLiteral(wW(f)),h.stopNoWrap()}function x5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.startNoWrap(),h.addLiteral(QW(f)),h.stopNoWrap(),R(f.children,h),h.startNoWrap(),h.addLiteral(wW(f)),h.stopNoWrap(),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function k5(f,R,h,$){h.startNoWrap(),h.addLiteral(Dh(f,{decodeEntities:h.options.decodeEntities})),h.stopNoWrap()}function s5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.startNoWrap(),h.addLiteral(Dh(f,{decodeEntities:h.options.decodeEntities})),h.stopNoWrap(),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function l5(f,R,h,$){h.addLiteral($.prefix||""),R(f.children,h),h.addLiteral($.suffix||"")}var _5=Object.freeze({__proto__:null,block:c5,blockHtml:s5,blockString:C5,blockTag:x5,inline:m5,inlineHtml:k5,inlineString:g5,inlineSurround:l5,inlineTag:b5,skip:T5});function L$(f,R){if(!f[R])f[R]=[];return f[R]}function d5(f,R=0){while(f[R])R++;return R}function a5(f,R){for(let h=0;h<R;h++){let $=L$(f,h);for(let A=0;A<h;A++){let G=L$(f,A);if($[A]||G[h]){let H=$[A];$[A]=G[h],G[h]=H}}}}function r5(f,R,h,$){for(let A=0;A<f.rowspan;A++){let G=L$(R,h+A);for(let H=0;H<f.colspan;H++)G[$+H]=f}}function PG(f,R){if(f[R]===void 0)f[R]=R===0?0:1+PG(f,R-1);return f[R]}function YW(f,R,h,$){f[R+h]=Math.max(PG(f,R+h),PG(f,R)+$)}function i5(f,R,h){let $=[],A=0,G=f.length,H=[0];for(let F=0;F<G;F++){let S=L$($,F),D=f[F],J=0;for(let Z=0;Z<D.length;Z++){let L=D[Z];J=d5(S,J),r5(L,$,F,J),J+=L.colspan,L.lines=L.text.split(`
78
- `);let P=L.lines.length;YW(H,F,L.rowspan,P+R)}A=S.length>A?S.length:A}a5($,G>A?G:A);let N=[],U=[0];for(let F=0;F<A;F++){let S=0,D,J=Math.min(G,$[F].length);while(S<J)if(D=$[F][S],D){if(!D.rendered){let Z=0;for(let L=0;L<D.lines.length;L++){let P=D.lines[L],a=H[S]+L;N[a]=(N[a]||"").padEnd(U[F])+P,Z=P.length>Z?P.length:Z}YW(U,F,D.colspan,Z+h),D.rendered=!0}S+=D.rowspan}else{let Z=H[S];N[Z]=N[Z]||"",S++}}return N.join(`
79
- `)}function p5(f,R,h,$){h.addLineBreak()}function o5(f,R,h,$){h.addWordBreakOpportunity()}function n5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.addInline("-".repeat($.length||h.options.wordwrap||40)),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function e5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function u5(f,R,h,$){h.openBlock({isPre:!0,leadingLineBreaks:$.leadingLineBreaks||2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function t5(f,R,h,$){if(h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),$.uppercase!==!1)h.pushWordTransform((A)=>A.toUpperCase()),R(f.children,h),h.popWordTransform();else R(f.children,h);h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function fJ(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2,reservedLineLength:2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2,blockTransform:(A)=>($.trimEmptyLines!==!1?DW(A,`
73
+ `)R++;else return 0;return R}}class LW{constructor(f,R,h=void 0){this.options=f,this.picker=R,this.metadata=h,this.whitespaceProcessor=new wW(f),this._stackItem=new bf(f),this._wordTransformer=void 0}pushWordTransform(f){this._wordTransformer=new QW(this._wordTransformer,f)}popWordTransform(){if(!this._wordTransformer)return;let f=this._wordTransformer.transform;return this._wordTransformer=this._wordTransformer.next,f}startNoWrap(){this._stackItem.isNoWrap=!0}stopNoWrap(){this._stackItem.isNoWrap=!1}_getCombinedWordTransformer(){let f=this._wordTransformer?(h)=>IW(h,this._wordTransformer):void 0,R=this.options.encodeCharacters;return f?R?(h)=>R(f(h)):f:R}_popStackItem(){let f=this._stackItem;return this._stackItem=f.next,f}addLineBreak(){if(!(this._stackItem instanceof bf||this._stackItem instanceof WR||this._stackItem instanceof SR))return;if(this._stackItem.isPre)this._stackItem.rawText+=`
74
+ `;else this._stackItem.inlineTextBuilder.startNewLine()}addWordBreakOpportunity(){if(this._stackItem instanceof bf||this._stackItem instanceof WR||this._stackItem instanceof SR)this._stackItem.inlineTextBuilder.wordBreakOpportunity=!0}addInline(f,{noWordTransform:R=!1}={}){if(!(this._stackItem instanceof bf||this._stackItem instanceof WR||this._stackItem instanceof SR))return;if(this._stackItem.isPre){this._stackItem.rawText+=f;return}if(f.length===0||this._stackItem.stashedLineBreaks&&!this.whitespaceProcessor.testContainsWords(f))return;if(this.options.preserveNewlines){let h=this.whitespaceProcessor.countNewlinesNoWords(f);if(h>0){this._stackItem.inlineTextBuilder.startNewLine(h);return}}if(this._stackItem.stashedLineBreaks)this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);this.whitespaceProcessor.shrinkWrapAdd(f,this._stackItem.inlineTextBuilder,R?void 0:this._getCombinedWordTransformer(),this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}addLiteral(f){if(!(this._stackItem instanceof bf||this._stackItem instanceof WR||this._stackItem instanceof SR))return;if(f.length===0)return;if(this._stackItem.isPre){this._stackItem.rawText+=f;return}if(this._stackItem.stashedLineBreaks)this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);this.whitespaceProcessor.addLiteral(f,this._stackItem.inlineTextBuilder,this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}openBlock({leadingLineBreaks:f=1,reservedLineLength:R=0,isPre:h=!1}={}){let $=Math.max(20,this._stackItem.inlineTextBuilder.maxLineLength-R);if(this._stackItem=new bf(this.options,this._stackItem,f,$),h)this._stackItem.isPre=!0}closeBlock({trailingLineBreaks:f=1,blockTransform:R=void 0}={}){let h=this._popStackItem(),$=R?R(mR(h)):mR(h);w$(this._stackItem,$,h.leadingLineBreaks,Math.max(h.stashedLineBreaks,f))}openList({maxPrefixLength:f=0,prefixAlign:R="left",interRowLineBreaks:h=1,leadingLineBreaks:$=2}={}){this._stackItem=new wG(this.options,this._stackItem,{interRowLineBreaks:h,leadingLineBreaks:$,maxLineLength:this._stackItem.inlineTextBuilder.maxLineLength,maxPrefixLength:f,prefixAlign:R})}openListItem({prefix:f=""}={}){if(!(this._stackItem instanceof wG))throw new Error("Can't add a list item to something that is not a list! Check the formatter.");let R=this._stackItem,h=Math.max(f.length,R.maxPrefixLength),$=Math.max(20,R.inlineTextBuilder.maxLineLength-h);this._stackItem=new WR(this.options,R,{prefix:f,maxLineLength:$,leadingLineBreaks:R.interRowLineBreaks})}closeListItem(){let f=this._popStackItem(),R=f.next,h=Math.max(f.prefix.length,R.maxPrefixLength),$=`
75
+ `+" ".repeat(h),G=(R.prefixAlign==="right"?f.prefix.padStart(h):f.prefix.padEnd(h))+mR(f).replace(/\n/g,$);w$(R,G,f.leadingLineBreaks,Math.max(f.stashedLineBreaks,R.interRowLineBreaks))}closeList({trailingLineBreaks:f=2}={}){let R=this._popStackItem(),h=mR(R);if(h)w$(this._stackItem,h,R.leadingLineBreaks,f)}openTable(){this._stackItem=new LG(this._stackItem)}openTableRow(){if(!(this._stackItem instanceof LG))throw new Error("Can't add a table row to something that is not a table! Check the formatter.");this._stackItem=new IG(this._stackItem)}openTableCell({maxColumnWidth:f=void 0}={}){if(!(this._stackItem instanceof IG))throw new Error("Can't add a table cell to something that is not a table row! Check the formatter.");this._stackItem=new SR(this.options,this._stackItem,f)}closeTableCell({colspan:f=1,rowspan:R=1}={}){let h=this._popStackItem(),$=XW(mR(h),`
76
+ `);h.next.cells.push({colspan:f,rowspan:R,text:$})}closeTableRow(){let f=this._popStackItem();f.next.rows.push(f.cells)}closeTable({tableToString:f,leadingLineBreaks:R=2,trailingLineBreaks:h=2}){let $=this._popStackItem(),A=f($.rows);if(A)w$(this._stackItem,A,R,h)}toString(){return mR(this._stackItem.getRoot())}}function mR(f){if(!(f instanceof bf||f instanceof WR||f instanceof SR))throw new Error("Only blocks, list items and table cells can be requested for text contents.");return f.inlineTextBuilder.isEmpty()?f.rawText:f.rawText+f.inlineTextBuilder.toString()}function w$(f,R,h,$){if(!(f instanceof bf||f instanceof WR||f instanceof SR))throw new Error("Only blocks, list items and table cells can contain text.");let A=mR(f),G=Math.max(f.stashedLineBreaks,h);if(f.inlineTextBuilder.clear(),A)f.rawText=A+`
77
+ `.repeat(G)+R;else f.rawText=R,f.leadingLineBreaks=G;f.stashedLineBreaks=$}function IW(f,R){return R?IW(R.transform(f),R.next):f}function V5(f={}){let R=f.selectors.filter((H)=>!H.format);if(R.length)throw new Error("Following selectors have no specified format: "+R.map((H)=>`\`${H.selector}\``).join(", "));let h=new Z$(f.selectors.map((H)=>[H.selector,H])).build(SG);if(typeof f.encodeCharacters!=="function")f.encodeCharacters=m5(f.encodeCharacters);let $=new Z$(f.baseElements.selectors.map((H,N)=>[H,N+1])).build(SG);function A(H){return g5(H,f,$)}let G=KG(f.limits.maxDepth,C5,function(H,N){N.addInline(f.limits.ellipsis||"")});return function(H,N=void 0){return T5(H,N,f,h,A,G)}}function T5(f,R,h,$,A,G){let H=h.limits.maxInputLength;if(H&&f&&f.length>H)console.warn(`Input length ${f.length} is above allowed limit of ${H}. Truncating without ellipsis.`),f=f.substring(0,H);let N=UW(f,{decodeEntities:h.decodeEntities}),U=A(N.children),F=new LW(h,$,R);return G(U,F),F.toString()}function g5(f,R,h){let $=[];function A(H,N){N=N.slice(0,R.limits.maxChildNodes);for(let U of N){if(U.type!=="tag")continue;let F=h.pick1(U);if(F>0)$.push({selectorIndex:F,element:U});else if(U.children)H(U.children);if($.length>=R.limits.maxBaseElements)return}}if(KG(R.limits.maxDepth,A)(f),R.baseElements.orderBy!=="occurrence")$.sort((H,N)=>H.selectorIndex-N.selectorIndex);return R.baseElements.returnDomByDefault&&$.length===0?f:$.map((H)=>H.element)}function C5(f,R,h){if(!R)return;let $=h.options;if(R.length>$.limits.maxChildNodes)R=R.slice(0,$.limits.maxChildNodes),R.push({data:$.limits.ellipsis,type:"text"});for(let G of R)switch(G.type){case"text":{h.addInline(G.data);break}case"tag":{let H=h.picker.pick1(G),N=$.formatters[H.format];N(G,f,h,H.options||{});break}}return}function m5(f){if(!f||Object.keys(f).length===0)return;let R=Object.entries(f).filter(([,G])=>G!==!1),h=new RegExp(R.map(([G])=>`(${j5([...G][0])})`).join("|"),"g"),$=R.map(([,G])=>G),A=(G,...H)=>$[H.findIndex((N)=>N)];return(G)=>G.replace(h,A)}function c5(f,R,h,$){}function b5(f,R,h,$){h.addLiteral($.string||"")}function x5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.addLiteral($.string||""),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function k5(f,R,h,$){R(f.children,h)}function s5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function PW(f){let R=f.attribs&&f.attribs.length?" "+Object.entries(f.attribs).map(([h,$])=>$===""?h:`${h}=${$.replace(/"/g,"&quot;")}`).join(" "):"";return`<${f.name}${R}>`}function qW(f){return`</${f.name}>`}function l5(f,R,h,$){h.startNoWrap(),h.addLiteral(PW(f)),h.stopNoWrap(),R(f.children,h),h.startNoWrap(),h.addLiteral(qW(f)),h.stopNoWrap()}function _5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.startNoWrap(),h.addLiteral(PW(f)),h.stopNoWrap(),R(f.children,h),h.startNoWrap(),h.addLiteral(qW(f)),h.stopNoWrap(),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function d5(f,R,h,$){h.startNoWrap(),h.addLiteral(Yh(f,{decodeEntities:h.options.decodeEntities})),h.stopNoWrap()}function a5(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.startNoWrap(),h.addLiteral(Yh(f,{decodeEntities:h.options.decodeEntities})),h.stopNoWrap(),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function r5(f,R,h,$){h.addLiteral($.prefix||""),R(f.children,h),h.addLiteral($.suffix||"")}var i5=Object.freeze({__proto__:null,block:s5,blockHtml:a5,blockString:x5,blockTag:_5,inline:k5,inlineHtml:d5,inlineString:b5,inlineSurround:r5,inlineTag:l5,skip:c5});function L$(f,R){if(!f[R])f[R]=[];return f[R]}function p5(f,R=0){while(f[R])R++;return R}function o5(f,R){for(let h=0;h<R;h++){let $=L$(f,h);for(let A=0;A<h;A++){let G=L$(f,A);if($[A]||G[h]){let H=$[A];$[A]=G[h],G[h]=H}}}}function n5(f,R,h,$){for(let A=0;A<f.rowspan;A++){let G=L$(R,h+A);for(let H=0;H<f.colspan;H++)G[$+H]=f}}function PG(f,R){if(f[R]===void 0)f[R]=R===0?0:1+PG(f,R-1);return f[R]}function JW(f,R,h,$){f[R+h]=Math.max(PG(f,R+h),PG(f,R)+$)}function e5(f,R,h){let $=[],A=0,G=f.length,H=[0];for(let F=0;F<G;F++){let S=L$($,F),D=f[F],J=0;for(let Z=0;Z<D.length;Z++){let L=D[Z];J=p5(S,J),n5(L,$,F,J),J+=L.colspan,L.lines=L.text.split(`
78
+ `);let P=L.lines.length;JW(H,F,L.rowspan,P+R)}A=S.length>A?S.length:A}o5($,G>A?G:A);let N=[],U=[0];for(let F=0;F<A;F++){let S=0,D,J=Math.min(G,$[F].length);while(S<J)if(D=$[F][S],D){if(!D.rendered){let Z=0;for(let L=0;L<D.lines.length;L++){let P=D.lines[L],a=H[S]+L;N[a]=(N[a]||"").padEnd(U[F])+P,Z=P.length>Z?P.length:Z}JW(U,F,D.colspan,Z+h),D.rendered=!0}S+=D.rowspan}else{let Z=H[S];N[Z]=N[Z]||"",S++}}return N.join(`
79
+ `)}function u5(f,R,h,$){h.addLineBreak()}function t5(f,R,h,$){h.addWordBreakOpportunity()}function fJ(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),h.addInline("-".repeat($.length||h.options.wordwrap||40)),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function RJ(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function hJ(f,R,h,$){h.openBlock({isPre:!0,leadingLineBreaks:$.leadingLineBreaks||2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function $J(f,R,h,$){if(h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2}),$.uppercase!==!1)h.pushWordTransform((A)=>A.toUpperCase()),R(f.children,h),h.popWordTransform();else R(f.children,h);h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2})}function AJ(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks||2,reservedLineLength:2}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks||2,blockTransform:(A)=>($.trimEmptyLines!==!1?XW(A,`
80
80
  `):A).split(`
81
81
  `).map((G)=>"> "+G).join(`
82
- `)})}function qG(f,R){if(!R)return f;let h=typeof R[0]==="string"?R[0]:"[",$=typeof R[1]==="string"?R[1]:"]";return h+f+$}function LW(f,R,h,$,A){let G=typeof R==="function"?R(f,$,A):f;return G[0]==="/"&&h?q5(h,"/")+G:G}function RJ(f,R,h,$){let A=f.attribs||{},G=A.alt?A.alt:"",H=!A.src?"":LW(A.src,$.pathRewrite,$.baseUrl,h.metadata,f),N=!H?G:!G?qG(H,$.linkBrackets):G+" "+qG(H,$.linkBrackets);h.addInline(N,{noWordTransform:!0})}function hJ(f,R,h,$){function A(){if($.ignoreHref)return"";if(!f.attribs||!f.attribs.href)return"";let H=f.attribs.href.replace(/^mailto:/,"");if($.noAnchorUrl&&H[0]==="#")return"";return H=LW(H,$.pathRewrite,$.baseUrl,h.metadata,f),H}let G=A();if(!G)R(f.children,h);else{let H="";if(h.pushWordTransform((U)=>{if(U)H+=U;return U}),R(f.children,h),h.popWordTransform(),!($.hideLinkHrefIfSameAsText&&G===H))h.addInline(!H?G:" "+qG(G,$.linkBrackets),{noWordTransform:!0})}}function IW(f,R,h,$,A){let G=Z0(f,["parent","name"])==="li",H=0,N=(f.children||[]).filter((U)=>U.type!=="text"||!/^\s*$/.test(U.data)).map(function(U){if(U.name!=="li")return{node:U,prefix:""};let F=G?A().trimStart():A();if(F.length>H)H=F.length;return{node:U,prefix:F}});if(!N.length)return;h.openList({interRowLineBreaks:1,leadingLineBreaks:G?1:$.leadingLineBreaks||2,maxPrefixLength:H,prefixAlign:"left"});for(let{node:U,prefix:F}of N)h.openListItem({prefix:F}),R([U],h),h.closeListItem();h.closeList({trailingLineBreaks:G?1:$.trailingLineBreaks||2})}function $J(f,R,h,$){let A=$.itemPrefix||" * ";return IW(f,R,h,$,()=>A)}function AJ(f,R,h,$){let A=Number(f.attribs.start||"1"),G=GJ(f.attribs.type);return IW(f,R,h,$,()=>" "+G(A++)+". ")}function GJ(f="1"){switch(f){case"a":return(R)=>FW(R,"a");case"A":return(R)=>FW(R,"A");case"i":return(R)=>SW(R).toLowerCase();case"I":return(R)=>SW(R);case"1":default:return(R)=>R.toString()}}function HJ(f){let R=[],h=[];for(let $ of f)if($.startsWith("."))R.push($.substring(1));else if($.startsWith("#"))h.push($.substring(1));return{classes:R,ids:h}}function NJ(f,R){if(R===!0)return!0;if(!f)return!1;let{classes:h,ids:$}=HJ(R),A=(f.class||"").split(" "),G=(f.id||"").split(" ");return A.some((H)=>h.includes(H))||G.some((H)=>$.includes(H))}function UJ(f,R,h,$){return NJ(f.attribs,h.options.tables)?PW(f,R,h,$):FJ(f,R,h,$)}function FJ(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks})}function PW(f,R,h,$){h.openTable(),f.children.forEach(G),h.closeTable({tableToString:(H)=>i5(H,$.rowSpacing??0,$.colSpacing??3),leadingLineBreaks:$.leadingLineBreaks,trailingLineBreaks:$.trailingLineBreaks});function A(H){let N=+Z0(H,["attribs","colspan"])||1,U=+Z0(H,["attribs","rowspan"])||1;h.openTableCell({maxColumnWidth:$.maxColumnWidth}),R(H.children,h),h.closeTableCell({colspan:N,rowspan:U})}function G(H){if(H.type!=="tag")return;let N=$.uppercaseHeaderCells!==!1?(U)=>{h.pushWordTransform((F)=>F.toUpperCase()),A(U),h.popWordTransform()}:A;switch(H.name){case"thead":case"tbody":case"tfoot":case"center":H.children.forEach(G);return;case"tr":{h.openTableRow();for(let U of H.children){if(U.type!=="tag")continue;switch(U.name){case"th":{N(U);break}case"td":{A(U);break}}}h.closeTableRow();break}}}}var WJ=Object.freeze({__proto__:null,anchor:hJ,blockquote:fJ,dataTable:PW,heading:t5,horizontalLine:n5,image:RJ,lineBreak:p5,orderedList:AJ,paragraph:e5,pre:u5,table:UJ,unorderedList:$J,wbr:o5}),SJ={baseElements:{selectors:["body"],orderBy:"selectors",returnDomByDefault:!0},decodeEntities:!0,encodeCharacters:{},formatters:{},limits:{ellipsis:"...",maxBaseElements:void 0,maxChildNodes:void 0,maxDepth:void 0,maxInputLength:16777216},longWordSplit:{forceWrapOnLimit:!1,wrapCharacters:[]},preserveNewlines:!1,selectors:[{selector:"*",format:"inline"},{selector:"a",format:"anchor",options:{baseUrl:null,hideLinkHrefIfSameAsText:!1,ignoreHref:!1,linkBrackets:["[","]"],noAnchorUrl:!0}},{selector:"article",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"aside",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"blockquote",format:"blockquote",options:{leadingLineBreaks:2,trailingLineBreaks:2,trimEmptyLines:!0}},{selector:"br",format:"lineBreak"},{selector:"div",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"footer",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"form",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"h1",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h2",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h3",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h4",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h5",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h6",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"header",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"hr",format:"horizontalLine",options:{leadingLineBreaks:2,length:void 0,trailingLineBreaks:2}},{selector:"img",format:"image",options:{baseUrl:null,linkBrackets:["[","]"]}},{selector:"main",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"nav",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"ol",format:"orderedList",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"p",format:"paragraph",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"pre",format:"pre",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"section",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"table",options:{colSpacing:3,leadingLineBreaks:2,maxColumnWidth:60,rowSpacing:0,trailingLineBreaks:2,uppercaseHeaderCells:!0}},{selector:"ul",format:"unorderedList",options:{itemPrefix:" * ",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"wbr",format:"wbr"}],tables:[],whitespaceCharacters:` \r
83
- \f\u200B`,wordwrap:80},YJ=(f,R,h)=>[...f,...R],qW=(f,R,h)=>[...R],DJ=(f,R,h)=>f.some(($)=>typeof $==="object")?YJ(f,R):qW(f,R);function ZJ(f={}){return f=BG.default(SJ,f,{arrayMerge:qW,customMerge:(R)=>R==="selectors"?DJ:void 0}),f.formatters=Object.assign({},_5,WJ,f.formatters),f.selectors=ZW(f.selectors,(R)=>R.selector),MJ(f),y5(f)}function yG(f,R={},h=void 0){return ZJ(R)(f,h)}function MJ(f){if(f.tags){let h=Object.entries(f.tags).map(([$,A])=>({...A,selector:$||"*"}));f.selectors.push(...h),f.selectors=ZW(f.selectors,($)=>$.selector)}function R(h,$,A){let G=$.pop();for(let H of $){let N=h[H];if(!N)N={},h[H]=N;h=N}h[G]=A}if(f.baseElement){let h=f.baseElement;R(f,["baseElements","selectors"],Array.isArray(h)?h:[h])}if(f.returnDomByDefault!==void 0)R(f,["baseElements","returnDomByDefault"],f.returnDomByDefault);for(let h of f.selectors)if(h.format==="anchor"&&Z0(h,["options","noLinkBrackets"]))R(h,["options","linkBrackets"],!1)}var VS=O(vS(),1);import{Writable as qz}from"stream";var{defineProperty:Xz,getOwnPropertySymbols:yS}=Object,zz=Object.prototype.hasOwnProperty,Qz=Object.prototype.propertyIsEnumerable,jS=(f,R,h)=>(R in f)?Xz(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,eG=(f,R)=>{for(var h in R||(R={}))if(zz.call(R,h))jS(f,h,R[h]);if(yS){for(var h of yS(R))if(Qz.call(R,h))jS(f,h,R[h])}return f},uG=(f,R,h)=>{return new Promise(($,A)=>{var G=(U)=>{try{N(h.next(U))}catch(F){A(F)}},H=(U)=>{try{N(h.throw(U))}catch(F){A(F)}},N=(U)=>U.done?$(U.value):Promise.resolve(U.value).then(G,H);N((h=h.apply(f,R)).next())})},Lz={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:`
84
- `},Iz=(f,R={})=>{return VS.default.html(f,eG(eG({},Lz),R))},Pz=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var OS=new TextDecoder("utf-8"),ES=(f)=>uG(void 0,null,function*(){let R="";if("pipeTo"in f){let h=new WritableStream({write($){R+=OS.decode($)}});yield f.pipeTo(h)}else{let h=new qz({write($,A,G){R+=OS.decode($),G()}});return f.pipe(h),new Promise(($,A)=>{h.on("error",A),h.on("close",()=>{$(R)})})}return R}),V$=(f,R)=>uG(void 0,null,function*(){let{default:h}=yield import("react-dom/server"),$;if(Object.hasOwn(h,"renderToReadableStream"))$=yield ES(yield h.renderToReadableStream(f));else yield new Promise((H,N)=>{let U=h.renderToPipeableStream(f,{onAllReady(){return uG(this,null,function*(){$=yield ES(U),H()})},onError(F){N(F)}})});if(R==null?void 0:R.plainText)return yG($,eG({selectors:Pz},R.htmlToTextOptions));let G=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${$.replace(/<!DOCTYPE.*?>/,"")}`;if(R==null?void 0:R.pretty)return Iz(G);return G});var{defineProperty:Bz,defineProperties:Kz,getOwnPropertyDescriptors:vz,getOwnPropertySymbols:TS}=Object,yz=Object.prototype.hasOwnProperty,jz=Object.prototype.propertyIsEnumerable,gS=(f,R,h)=>(R in f)?Bz(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,Kh=(f,R)=>{for(var h in R||(R={}))if(yz.call(R,h))gS(f,h,R[h]);if(TS){for(var h of TS(R))if(jz.call(R,h))gS(f,h,R[h])}return f},Oz=(f,R)=>Kz(f,vz(R)),C=(f,R,h)=>{return new Promise(($,A)=>{var G=(U)=>{try{N(h.next(U))}catch(F){A(F)}},H=(U)=>{try{N(h.throw(U))}catch(F){A(F)}},N=(U)=>U.done?$(U.value):Promise.resolve(U.value).then(G,H);N((h=h.apply(f,R)).next())})},Ez="3.5.0",Vz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post("/api-keys",R,h)})}list(){return C(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/api-keys/${f}`)})}},Tz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post("/audiences",R,h)})}list(){return C(this,null,function*(){return yield this.resend.get("/audiences")})}get(f){return C(this,null,function*(){return yield this.resend.get(`/audiences/${f}`)})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/audiences/${f}`)})}},gz=class{constructor(f){this.resend=f}send(f){return C(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return C(this,arguments,function*(R,h={}){for(let A of R)if(A.react)A.html=yield V$(A.react),delete A.react;return yield this.resend.post("/emails/batch",R,h)})}},Cz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post(`/audiences/${R.audienceId}/contacts`,{unsubscribed:R.unsubscribed,email:R.email,first_name:R.firstName,last_name:R.lastName},h)})}list(f){return C(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts`)})}get(f){return C(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts/${f.id}`)})}update(f){return C(this,null,function*(){return yield this.resend.patch(`/audiences/${f.audienceId}/contacts/${f.id}`,{unsubscribed:f.unsubscribed,first_name:f.firstName,last_name:f.lastName})})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/audiences/${f.audienceId}/contacts/${(f==null?void 0:f.email)?f==null?void 0:f.email:f==null?void 0:f.id}`)})}},mz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post("/domains",R,h)})}list(){return C(this,null,function*(){return yield this.resend.get("/domains")})}get(f){return C(this,null,function*(){return yield this.resend.get(`/domains/${f}`)})}update(f){return C(this,null,function*(){return yield this.resend.patch(`/domains/${f.id}`,{click_tracking:f.clickTracking,open_tracking:f.openTracking,tls:f.tls})})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/domains/${f}`)})}verify(f){return C(this,null,function*(){return yield this.resend.post(`/domains/${f}/verify`)})}},cz=class{constructor(f){this.resend=f}send(f){return C(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return C(this,arguments,function*(R,h={}){if(R.react)R.html=yield V$(R.react),delete R.react;return yield this.resend.post("/emails",R,h)})}get(f){return C(this,null,function*(){return yield this.resend.get(`/emails/${f}`)})}},CS="https://api.resend.com",mS=`resend-node:${Ez}`,bz=typeof process!=="undefined"&&process.env?process.env.RESEND_BASE_URL||CS:CS,xz=typeof process!=="undefined"&&process.env?process.env.RESEND_USER_AGENT||mS:mS,cS=class{constructor(f){if(this.key=f,this.apiKeys=new Vz(this),this.audiences=new Tz(this),this.batch=new gz(this),this.contacts=new Cz(this),this.domains=new mz(this),this.emails=new cz(this),!f){if(typeof process!=="undefined"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":xz,"Content-Type":"application/json"})}fetchRequest(f){return C(this,arguments,function*(R,h={}){try{let $=yield fetch(`${bz}${R}`,h);if(!$.ok)try{let G=yield $.text();return{data:null,error:JSON.parse(G)}}catch(G){if(G instanceof SyntaxError)return{data:null,error:{name:"application_error",message:"Internal server error. We are unable to process your request right now, please try again later."}};let H={message:$.statusText,name:"application_error"};if(G instanceof Error)return{data:null,error:Oz(Kh({},H),{message:G.message})};return{data:null,error:H}}return{data:yield $.json(),error:null}}catch($){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(f,R){return C(this,arguments,function*(h,$,A={}){let G=Kh({method:"POST",headers:this.headers,body:JSON.stringify($)},A);return this.fetchRequest(h,G)})}get(f){return C(this,arguments,function*(R,h={}){let $=Kh({method:"GET",headers:this.headers},h);return this.fetchRequest(R,$)})}put(f,R){return C(this,arguments,function*(h,$,A={}){let G=Kh({method:"PUT",headers:this.headers,body:JSON.stringify($)},A);return this.fetchRequest(h,G)})}patch(f,R){return C(this,arguments,function*(h,$,A={}){let G=Kh({method:"PATCH",headers:this.headers,body:JSON.stringify($)},A);return this.fetchRequest(h,G)})}delete(f,R){return C(this,null,function*(){let h={method:"DELETE",headers:this.headers,body:JSON.stringify(R)};return this.fetchRequest(f,h)})}};class T${}class g$ extends T${apiKey;constructor(f=process.env.RESEND_API_KEY){super();this.apiKey=f}async send(f){let R=new cS(this.apiKey),{data:h,error:$}=await R.emails.send({...f});if($)return console.error($),!1;if(h)return!0;return!1}}class bS extends p{driver=new g$;headers={};boot(){}filterRecipients(f){return f}}class xS extends p{channels={};boot(){}}class kS extends p{root;rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class sS extends p{rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class lS extends p{maxFileSize=10485760;boot(){}onLogFileClosed(f){}onLogCreated(f){}}class _S extends p{jobs=[];concurrency=1;boot(){}}class aS{static name="unset";worker=!1;maxAttempts=3;run(...f){}onFail(f,...R){}onSuccess(f,...R){}onDeadletter(f,...R){}static dispatch(...f){if(this.name==="unset")throw new Error("Cannot dispatch a job with no name");dS.use().push(this,JSON.stringify(f))}}import kz from"sharp";class C${}class m$ extends C${async resize(f,R){let{height:h,width:$,quality:A,fit:G}=R;return await kz(f).resize($>0?$:void 0,h>0?h:void 0,{fit:G}).webp({quality:A>0?A:80,force:!0}).toBuffer()}}class rS extends p{driver=new m$;boot(){}}class J0{}var sz={clientId:process.env.GOOGLE_CLIENT_ID,clientSecret:process.env.GOOGLE_CLIENT_SECRET,redirectPath:"/oauth/google/callback",scope:"https://www.googleapis.com/auth/userinfo.email"};class iS extends J0{config;constructor(f={}){super();this.config={...sz,...f}}getRedirectUrl(){let f=this.config.scope,R=this.config.clientId,h=new URL("https://accounts.google.com/o/oauth2/v2/auth"),$={scope:f,include_granted_scopes:"true",response_type:"code",state:"state_parameter_passthrough_value",redirect_uri:`${process.env.HOST_NAME}/oauth/google/callback`,client_id:R};for(let[G,H]of Object.entries($))h.searchParams.append(G,H);let A=h.toString();return c$.to(A),A}async onCallback(f){let R=new URL("https://oauth2.googleapis.com/token");R.searchParams.append("code",f.search.get("code")),R.searchParams.append("client_id",this.config.clientId),R.searchParams.append("client_secret",this.config.clientSecret),R.searchParams.append("grant_type","authorization_code"),R.searchParams.append("redirect_uri",`${process.env.HOST_NAME}${this.config.redirectPath}`);let h=await fetch(R.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}),{access_token:$}=await h.json(),G=await(await fetch(`https://www.googleapis.com/oauth2/v3/userinfo?access_token=${$}`)).json();return{name:G.name,email:G.email}}}var JR="https://api.x.com/2/",X0="https://api.x.com/labs/2/",XR="https://api.x.com/1.1/",uf="https://upload.x.com/1.1/",pS="https://stream.x.com/1.1/",z0="https://ads-api.x.com/12/",Q0="https://ads-api-sandbox.twitter.com/12/";class tG{constructor({realData:f,rateLimit:R,instance:h,queryParams:$,sharedParams:A}){this._maxResultsWhenFetchLast=100,this._realData=f,this._rateLimit=R,this._instance=h,this._queryParams=$,this._sharedParams=A}get _isRateLimitOk(){if(!this._rateLimit)return!0;if(this._rateLimit.reset*1000<Date.now())return!0;return this._rateLimit.remaining>0}makeRequest(f){return this._instance.get(this.getEndpoint(),f,{fullResponse:!0,params:this._sharedParams})}makeNewInstanceFromResult(f,R){return new this.constructor({realData:f.data,rateLimit:f.rateLimit,instance:this._instance,queryParams:R,sharedParams:this._sharedParams})}getEndpoint(){return this._endpoint}injectQueryParams(f){return{...f?{max_results:f}:{},...this._queryParams}}async next(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchNext(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!0),this}async fetchLast(f=1/0){let R=this.getNextQueryParams(this._maxResultsWhenFetchLast),h=0;while(h<f&&this._isRateLimitOk){let $=await this.makeRequest(R);if(await this.refreshInstanceFromResult($,!0),h+=this.getPageLengthFromRequest($),this.isFetchLastOver($))break;R=this.getNextQueryParams(this._maxResultsWhenFetchLast)}return this}get rateLimit(){var f;return{...(f=this._rateLimit)!==null&&f!==void 0?f:{}}}get data(){return this._realData}get done(){return!this.canFetchNextPage(this._realData)}*[Symbol.iterator](){yield*this.getItemArray()}async*[Symbol.asyncIterator](){yield*this.getItemArray();let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData),yield*h.getItemArray(),f=h}}async*fetchAndIterate(){for(let h of this.getItemArray())yield[h,this];let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData);for(let $ of h.getItemArray())yield[$,h];this._rateLimit=h._rateLimit,f=h}}}class fH extends tG{async previous(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchPrevious(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!1),this}}var w0=tG;class Uf extends w0{getNextQueryParams(f){var R;return{...this._queryParams,cursor:(R=this._realData.next_cursor_str)!==null&&R!==void 0?R:this._realData.next_cursor,...f?{count:f}:{}}}isFetchLastOver(f){return!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!this.isNextCursorInvalid(f.next_cursor)||!this.isNextCursorInvalid(f.next_cursor_str)}isNextCursorInvalid(f){return f===void 0||f===0||f===-1||f==="0"||f==="-1"}}class RH extends Uf{constructor(){super(...arguments);this._endpoint="direct_messages/events/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.events.push(...h.events),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.events.length}getItemArray(){return this.events}get events(){return this._realData.events}}class hH extends Uf{constructor(){super(...arguments);this._endpoint="direct_messages/welcome_messages/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.welcome_messages.push(...h.welcome_messages),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.welcome_messages.length}getItemArray(){return this.welcomeMessages}get welcomeMessages(){return this._realData.welcome_messages}}var d;(function(f){f.Jpeg="image/jpeg",f.Mp4="video/mp4",f.Mov="video/quicktime",f.Gif="image/gif",f.Png="image/png",f.Srt="text/plain",f.Webp="image/webp"})(d||(d={}));var zR;(function(f){f.Create="message_create",f.WelcomeCreate="welcome_message"})(zR||(zR={}));var vh;(function(f){f.Request="request",f.PartialResponse="partial-response",f.Response="response"})(vh||(vh={}));class b$ extends Error{constructor(){super(...arguments);this.error=!0}}class yh extends b${constructor(f,R){super(f);this.type=vh.Request,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get requestError(){return this._options.requestError}toJSON(){return{type:this.type,error:this.requestError}}}class jh extends b${constructor(f,R){super(f);this.type=vh.PartialResponse,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get response(){return this._options.response}get responseError(){return this._options.responseError}get rawContent(){return this._options.rawContent}toJSON(){return{type:this.type,error:this.responseError}}}class Oh extends b${constructor(f,R){super(f);if(this.type=vh.Response,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R}),this.code=R.code,this.headers=R.headers,this.rateLimit=R.rateLimit,R.data&&typeof R.data==="object"&&"error"in R.data&&!R.data.errors){let h={...R.data};h.errors=[{code:sR.InternalError,message:h.error}],this.data=h}else this.data=R.data}get request(){return this._options.request}get response(){return this._options.response}hasErrorCode(...f){let R=this.errors;if(!(R===null||R===void 0?void 0:R.length))return!1;if("code"in R[0])return R.some((A)=>f.includes(A.code));let h=this.data;return f.includes(h.type)}get errors(){var f;return(f=this.data)===null||f===void 0?void 0:f.errors}get rateLimitError(){return this.code===420||this.code===429}get isAuthError(){if(this.code===401)return!0;return this.hasErrorCode(sR.AuthTimestampInvalid,sR.AuthenticationFail,sR.BadAuthenticationData,sR.InvalidOrExpiredToken)}toJSON(){return{type:this.type,code:this.code,error:this.data,rateLimit:this.rateLimit,headers:this.headers}}}var sR;(function(f){f[f.InvalidCoordinates=3]="InvalidCoordinates",f[f.NoLocationFound=13]="NoLocationFound",f[f.AuthenticationFail=32]="AuthenticationFail",f[f.InvalidOrExpiredToken=89]="InvalidOrExpiredToken",f[f.UnableToVerifyCredentials=99]="UnableToVerifyCredentials",f[f.AuthTimestampInvalid=135]="AuthTimestampInvalid",f[f.BadAuthenticationData=215]="BadAuthenticationData",f[f.NoUserMatch=17]="NoUserMatch",f[f.UserNotFound=50]="UserNotFound",f[f.ResourceNotFound=34]="ResourceNotFound",f[f.TweetNotFound=144]="TweetNotFound",f[f.TweetNotVisible=179]="TweetNotVisible",f[f.NotAllowedResource=220]="NotAllowedResource",f[f.MediaIdNotFound=325]="MediaIdNotFound",f[f.TweetNoLongerAvailable=421]="TweetNoLongerAvailable",f[f.TweetViolatedRules=422]="TweetViolatedRules",f[f.TargetUserSuspended=63]="TargetUserSuspended",f[f.YouAreSuspended=64]="YouAreSuspended",f[f.AccountUpdateFailed=120]="AccountUpdateFailed",f[f.NoSelfSpamReport=36]="NoSelfSpamReport",f[f.NoSelfMute=271]="NoSelfMute",f[f.AccountLocked=326]="AccountLocked",f[f.RateLimitExceeded=88]="RateLimitExceeded",f[f.NoDMRightForApp=93]="NoDMRightForApp",f[f.OverCapacity=130]="OverCapacity",f[f.InternalError=131]="InternalError",f[f.TooManyFollowings=161]="TooManyFollowings",f[f.TweetLimitExceeded=185]="TweetLimitExceeded",f[f.DuplicatedTweet=187]="DuplicatedTweet",f[f.TooManySpamReports=205]="TooManySpamReports",f[f.RequestLooksLikeSpam=226]="RequestLooksLikeSpam",f[f.NoWriteRightForApp=261]="NoWriteRightForApp",f[f.TweetActionsDisabled=425]="TweetActionsDisabled",f[f.TweetRepliesRestricted=433]="TweetRepliesRestricted",f[f.NamedParameterMissing=38]="NamedParameterMissing",f[f.InvalidAttachmentUrl=44]="InvalidAttachmentUrl",f[f.TweetTextTooLong=186]="TweetTextTooLong",f[f.MissingUrlParameter=195]="MissingUrlParameter",f[f.NoMultipleGifs=323]="NoMultipleGifs",f[f.InvalidMediaIds=324]="InvalidMediaIds",f[f.InvalidUrl=407]="InvalidUrl",f[f.TooManyTweetAttachments=386]="TooManyTweetAttachments",f[f.StatusAlreadyFavorited=139]="StatusAlreadyFavorited",f[f.FollowRequestAlreadySent=160]="FollowRequestAlreadySent",f[f.CannotUnmuteANonMutedAccount=272]="CannotUnmuteANonMutedAccount",f[f.TweetAlreadyRetweeted=327]="TweetAlreadyRetweeted",f[f.ReplyToDeletedTweet=385]="ReplyToDeletedTweet",f[f.DMReceiverNotFollowingYou=150]="DMReceiverNotFollowingYou",f[f.UnableToSendDM=151]="UnableToSendDM",f[f.MustAllowDMFromAnyone=214]="MustAllowDMFromAnyone",f[f.CannotSendDMToThisUser=349]="CannotSendDMToThisUser",f[f.DMTextTooLong=354]="DMTextTooLong",f[f.SubscriptionAlreadyExists=355]="SubscriptionAlreadyExists",f[f.CallbackUrlNotApproved=415]="CallbackUrlNotApproved",f[f.SuspendedApplication=416]="SuspendedApplication",f[f.OobOauthIsNotAllowed=417]="OobOauthIsNotAllowed"})(sR||(sR={}));var oS;(function(f){f.InvalidRequest="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-request",f.ClientForbidden="https://developer.x.com/en/support/x-api/error-troubleshooting#client-forbidden",f.UnsupportedAuthentication="https://developer.x.com/en/support/x-api/error-troubleshooting#unsupported-authentication",f.InvalidRules="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-rules",f.TooManyRules="https://developer.x.com/en/support/x-api/error-troubleshooting#rule-cap",f.DuplicatedRules="https://developer.x.com/en/support/x-api/error-troubleshooting#duplicate-rules",f.RateLimitExceeded="https://developer.x.com/en/support/x-api/error-troubleshooting#usage-capped",f.ConnectionError="https://developer.x.com/en/support/x-api/error-troubleshooting#streaming-connection",f.ClientDisconnected="https://developer.x.com/en/support/x-api/error-troubleshooting#client-disconnected",f.TwitterDisconnectedYou="https://developer.x.com/en/support/x-api/error-troubleshooting#operational-disconnect",f.ResourceNotFound="https://developer.x.com/en/support/x-api/error-troubleshooting#resource-not-found",f.ResourceUnauthorized="https://developer.x.com/en/support/x-api/error-troubleshooting#not-authorized-for-resource",f.DisallowedResource="https://developer.x.com/en/support/x-api/error-troubleshooting#disallowed-resource"})(oS||(oS={}));var K;(function(f){f.Connected="connected",f.ConnectError="connect error",f.ConnectionError="connection error",f.ConnectionClosed="connection closed",f.ConnectionLost="connection lost",f.ReconnectAttempt="reconnect attempt",f.Reconnected="reconnected",f.ReconnectError="reconnect error",f.ReconnectLimitExceeded="reconnect limit exceeded",f.DataKeepAlive="data keep-alive",f.Data="data event content",f.DataError="data twitter error",f.TweetParseError="data tweet parse error",f.Error="stream error"})(K||(K={}));class Eh{constructor(f){this.value=f}}import*as yH from"fs";var Df={debug:!1,deprecationWarnings:!0,logger:{log:console.log.bind(console)}};function $H(f){let R={value:void 0,promise:f().then((h)=>{return R.value=h,h})};return R}function x$(f){if(Array.isArray(f))return f;return[f]}function eS(f){for(let R in f)if(f[R]===void 0)delete f[R]}function k$(f){return typeof f==="object"&&"errors"in f&&!("data"in f)}function Vh(f){if(Array.isArray(f)&&f.length>1)return!0;return f.toString().includes(",")}var nS=new Set;function AH(f){if(typeof console==="undefined"||!console.warn||!Df.deprecationWarnings)return;let R=`${f.instance}-${f.method}-${f.problem}`;if(nS.has(R))return;let h=`[twitter-api-v2] Deprecation warning: In ${f.instance}.${f.method}() call, ${f.problem}.
85
- ${f.resolution}.`;console.warn(h),console.warn("To disable this message, import variable TwitterApiV2Settings from twitter-api-v2 and set TwitterApiV2Settings.deprecationWarnings to false."),nS.add(R)}import{EventEmitter as rz}from"events";import{request as lz}from"https";import*as Bf from"zlib";import{EventEmitter as _z}from"events";class uS{constructor(f){this.requestData=f,this.requestErrorHandled=!1,this.responseData=[]}get hrefPathname(){let f=this.requestData.url;return f.hostname+f.pathname}isCompressionDisabled(){return!this.requestData.compression||this.requestData.compression==="identity"}isFormEncodedEndpoint(){return this.requestData.url.href.startsWith("https://api.x.com/oauth/")}createRequestError(f){if(Df.debug)Df.logger.log("Request error:",f);return new yh("Request failed.",{request:this.req,error:f})}createPartialResponseError(f,R){let $=`Request failed with partial response with HTTP code ${this.res.statusCode}`;if(R)$+=" (connection abruptly closed)";else $+=" (parse error)";return new jh($,{request:this.req,response:this.res,responseError:f,rawContent:Buffer.concat(this.responseData).toString()})}formatV1Errors(f){return f.map(({code:R,message:h})=>`${h} (Twitter code ${R})`).join(", ")}formatV2Error(f){return`${f.title}: ${f.detail} (see ${f.type})`}createResponseError({res:f,data:R,rateLimit:h,code:$}){var A;if(Df.debug)Df.logger.log(`Request failed with code ${$}, data:`,R),Df.logger.log("Response headers:",f.headers);let G=`Request failed with code ${$}`;if((A=R===null||R===void 0?void 0:R.errors)===null||A===void 0?void 0:A.length){let H=R.errors;if("code"in H[0])G+=" - "+this.formatV1Errors(H);else G+=" - "+this.formatV2Error(R)}return new Oh(G,{code:$,data:R,headers:f.headers,request:this.req,response:f,rateLimit:h})}getResponseDataStream(f){if(this.isCompressionDisabled())return f;let R=(f.headers["content-encoding"]||"identity").trim().toLowerCase();if(R==="br"){let h=Bf.createBrotliDecompress({flush:Bf.constants.BROTLI_OPERATION_FLUSH,finishFlush:Bf.constants.BROTLI_OPERATION_FLUSH});return f.pipe(h),h}if(R==="gzip"){let h=Bf.createGunzip({flush:Bf.constants.Z_SYNC_FLUSH,finishFlush:Bf.constants.Z_SYNC_FLUSH});return f.pipe(h),h}if(R==="deflate"){let h=Bf.createInflate({flush:Bf.constants.Z_SYNC_FLUSH,finishFlush:Bf.constants.Z_SYNC_FLUSH});return f.pipe(h),h}return f}detectResponseType(f){var R,h;if(((R=f.headers["content-type"])===null||R===void 0?void 0:R.includes("application/json"))||((h=f.headers["content-type"])===null||h===void 0?void 0:h.includes("application/problem+json")))return"json";else if(this.isFormEncodedEndpoint())return"url";return"text"}getParsedResponse(f){let R=this.responseData,h=this.requestData.forceParseMode||this.detectResponseType(f);if(h==="buffer")return Buffer.concat(R);else if(h==="text")return Buffer.concat(R).toString();else if(h==="json"){let $=Buffer.concat(R).toString();return $.length?JSON.parse($):void 0}else if(h==="url"){let $=Buffer.concat(R).toString(),A={};for(let[G,H]of new URLSearchParams($))A[G]=H;return A}else return}getRateLimitFromResponse(f){let R=void 0;if(f.headers["x-rate-limit-limit"]){if(R={limit:Number(f.headers["x-rate-limit-limit"]),remaining:Number(f.headers["x-rate-limit-remaining"]),reset:Number(f.headers["x-rate-limit-reset"])},f.headers["x-app-limit-24hour-limit"])R.day={limit:Number(f.headers["x-app-limit-24hour-limit"]),remaining:Number(f.headers["x-app-limit-24hour-remaining"]),reset:Number(f.headers["x-app-limit-24hour-reset"])};if(this.requestData.rateLimitSaver)this.requestData.rateLimitSaver(R)}return R}onSocketEventHandler(f,R,h){let $=this.onSocketCloseHandler.bind(this,f);h.on("close",$),R.on("complete",()=>h.off("close",$))}onSocketCloseHandler(f){if(this.req.removeAllListeners("timeout"),this.res)return;if(!this.requestErrorHandled)return f(this.createRequestError(new Error("Socket closed without any information.")))}requestErrorHandler(f,R){var h,$;($=(h=this.requestData).requestEventDebugHandler)===null||$===void 0||$.call(h,"request-error",{requestError:R}),this.requestErrorHandled=!0,f(this.createRequestError(R))}timeoutErrorHandler(){this.requestErrorHandled=!0,this.req.destroy(new Error("Request timeout."))}classicResponseHandler(f,R,h){this.res=h;let $=this.getResponseDataStream(h);if($.on("data",(A)=>this.responseData.push(A)),$.on("end",this.onResponseEndHandler.bind(this,f,R)),$.on("close",this.onResponseCloseHandler.bind(this,f,R)),this.requestData.requestEventDebugHandler)this.requestData.requestEventDebugHandler("response",{res:h}),h.on("aborted",(A)=>this.requestData.requestEventDebugHandler("response-aborted",{error:A})),h.on("error",(A)=>this.requestData.requestEventDebugHandler("response-error",{error:A})),h.on("close",()=>this.requestData.requestEventDebugHandler("response-close",{data:this.responseData})),h.on("end",()=>this.requestData.requestEventDebugHandler("response-end"))}onResponseEndHandler(f,R){let h=this.getRateLimitFromResponse(this.res),$;try{$=this.getParsedResponse(this.res)}catch(G){R(this.createPartialResponseError(G,!1));return}let A=this.res.statusCode;if(A>=400){R(this.createResponseError({data:$,res:this.res,rateLimit:h,code:A}));return}if(Df.debug)Df.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${this.res.statusCode}`),Df.logger.log("Response body:",$);f({data:$,headers:this.res.headers,rateLimit:h})}onResponseCloseHandler(f,R){let h=this.res;if(h.aborted)try{return this.getParsedResponse(this.res),this.onResponseEndHandler(f,R)}catch($){return R(this.createPartialResponseError($,!0))}if(!h.complete)return R(this.createPartialResponseError(new Error("Response has been interrupted before response could be parsed."),!0))}streamResponseHandler(f,R,h){if(h.statusCode<400){if(Df.debug)Df.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${h.statusCode} (starting stream)`);let A=this.getResponseDataStream(h);f({req:this.req,res:A,originalResponse:h,requestData:this.requestData})}else this.classicResponseHandler(()=>{return},R,h)}debugRequest(){let f=this.requestData.url;if(Df.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]`,this.requestData.options),f.search)Df.logger.log("Request parameters:",[...f.searchParams.entries()].map(([R,h])=>`${R}: ${h}`));if(this.requestData.body)Df.logger.log("Request body:",this.requestData.body)}buildRequest(){var f;let R=this.requestData.url,h=R.username?`${R.username}:${R.password}`:void 0,$=(f=this.requestData.options.headers)!==null&&f!==void 0?f:{};if(this.requestData.compression===!0||this.requestData.compression==="brotli")$["accept-encoding"]="br;q=1.0, gzip;q=0.8, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="gzip")$["accept-encoding"]="gzip;q=1, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="deflate")$["accept-encoding"]="deflate;q=1, *;q=0.1";if(Df.debug)this.debugRequest();this.req=lz({...this.requestData.options,host:R.hostname,port:R.port||void 0,path:R.pathname+R.search,protocol:R.protocol,auth:h,headers:$})}registerRequestEventDebugHandlers(f){f.on("close",()=>this.requestData.requestEventDebugHandler("close")),f.on("abort",()=>this.requestData.requestEventDebugHandler("abort")),f.on("socket",(R)=>{this.requestData.requestEventDebugHandler("socket",{socket:R}),R.on("error",(h)=>this.requestData.requestEventDebugHandler("socket-error",{socket:R,error:h})),R.on("connect",()=>this.requestData.requestEventDebugHandler("socket-connect",{socket:R})),R.on("close",(h)=>this.requestData.requestEventDebugHandler("socket-close",{socket:R,withError:h})),R.on("end",()=>this.requestData.requestEventDebugHandler("socket-end",{socket:R})),R.on("lookup",(...h)=>this.requestData.requestEventDebugHandler("socket-lookup",{socket:R,data:h})),R.on("timeout",()=>this.requestData.requestEventDebugHandler("socket-timeout",{socket:R}))})}makeRequest(){return this.buildRequest(),new Promise((f,R)=>{let h=(H)=>{A.emit("complete"),f(H)},$=(H)=>{A.emit("complete"),R(H)},A=new _z,G=this.req;if(G.on("error",this.requestErrorHandler.bind(this,$)),G.on("socket",this.onSocketEventHandler.bind(this,$,A)),G.on("response",this.classicResponseHandler.bind(this,h,$)),this.requestData.options.timeout)G.on("timeout",this.timeoutErrorHandler.bind(this));if(this.requestData.requestEventDebugHandler)this.registerRequestEventDebugHandlers(G);if(this.requestData.body)G.write(this.requestData.body);G.end()})}async makeRequestAsStream(){let{req:f,res:R,requestData:h,originalResponse:$}=await this.makeRequestAndResolveWhenReady();return new s$(h,{req:f,res:R,originalResponse:$})}makeRequestAndResolveWhenReady(){return this.buildRequest(),new Promise((f,R)=>{let h=this.req;if(h.on("error",this.requestErrorHandler.bind(this,R)),h.on("response",this.streamResponseHandler.bind(this,f,R)),this.requestData.body)h.write(this.requestData.body);h.end()})}}var Th=uS;import{EventEmitter as dz}from"events";class tS extends dz{constructor(f){super();this.stream=f,this.stack=[],this.onStreamData=this.onStreamData.bind(this),this.onStreamError=this.onStreamError.bind(this),this.onceNewEvent=this.once.bind(this,"event"),f.on(K.Data,this.onStreamData),f.on(K.ConnectionError,this.onStreamError),f.on(K.TweetParseError,this.onStreamError),f.on(K.ConnectionClosed,this.onStreamError)}nextEvent(){return new Promise(this.onceNewEvent)}hasStack(){return this.stack.length>0}popStack(){let f=this.stack;return this.stack=[],f}destroy(){this.removeAllListeners(),this.stream.off(K.Data,this.onStreamData),this.stream.off(K.ConnectionError,this.onStreamError),this.stream.off(K.TweetParseError,this.onStreamError),this.stream.off(K.ConnectionClosed,this.onStreamError)}emitEvent(f,R){this.emit("event",{type:f,payload:R})}onStreamError(f){this.emitEvent("error",f)}onStreamData(f){this.stack.push(f),this.emitEvent("data",f)}}var fY=tS;import{EventEmitter as az}from"events";class l$ extends az{constructor(){super(...arguments);this.currentMessage=""}push(f){this.currentMessage+=f,f=this.currentMessage;let R=f.length,h=0,$=0;while($<R){if(f.slice($,$+2)===`\r
86
- `){let A=f.slice(h,$);if(h=$+=2,!A.length)continue;try{let G=JSON.parse(A);if(G){this.emit(lR.ParsedData,G);continue}}catch(G){this.emit(lR.ParseError,G)}}$++}this.currentMessage=f.slice(h,R)}reset(){this.currentMessage=""}}var lR;(function(f){f.ParsedData="parsed data",f.ParseError="parse error"})(lR||(lR={}));var RY=[5,15,30,60,90,120,180,300,600,900],iz=(f)=>f>RY.length?901000:RY[f-1]*1000;class hY extends rz{constructor(f,R){super();if(this.requestData=f,this.autoReconnect=!1,this.autoReconnectRetries=5,this.keepAliveTimeoutMs=120000,this.nextRetryTimeout=iz,this.parser=new l$,this.connectionProcessRunning=!1,this.onKeepAliveTimeout=this.onKeepAliveTimeout.bind(this),this.initEventsFromParser(),R)this.req=R.req,this.res=R.res,this.originalResponse=R.originalResponse,this.initEventsFromRequest()}on(f,R){return super.on(f,R)}initEventsFromRequest(){if(!this.req||!this.res)throw new Error("TweetStream error: You cannot init TweetStream without a request and response object.");let f=(R)=>{this.emit(K.ConnectionError,R),this.emit(K.Error,{type:K.ConnectionError,error:R,message:"Connection lost or closed by Twitter."}),this.onConnectionError()};this.req.on("error",f),this.res.on("error",f),this.res.on("close",()=>f(new Error("Connection closed by Twitter."))),this.res.on("data",(R)=>{if(this.resetKeepAliveTimeout(),R.toString()===`\r
87
- `)return this.emit(K.DataKeepAlive);this.parser.push(R.toString())}),this.resetKeepAliveTimeout()}initEventsFromParser(){let f=this.requestData.payloadIsError;this.parser.on(lR.ParsedData,(R)=>{if(f&&f(R))this.emit(K.DataError,R),this.emit(K.Error,{type:K.DataError,error:R,message:"Twitter sent a payload that is detected as an error payload."});else this.emit(K.Data,R)}),this.parser.on(lR.ParseError,(R)=>{this.emit(K.TweetParseError,R),this.emit(K.Error,{type:K.TweetParseError,error:R,message:"Failed to parse stream data."})})}resetKeepAliveTimeout(){if(this.unbindKeepAliveTimeout(),this.keepAliveTimeoutMs!==1/0)this.keepAliveTimeout=setTimeout(this.onKeepAliveTimeout,this.keepAliveTimeoutMs)}onKeepAliveTimeout(){this.emit(K.ConnectionLost),this.onConnectionError()}unbindTimeouts(){this.unbindRetryTimeout(),this.unbindKeepAliveTimeout()}unbindKeepAliveTimeout(){if(this.keepAliveTimeout)clearTimeout(this.keepAliveTimeout),this.keepAliveTimeout=void 0}unbindRetryTimeout(){if(this.retryTimeout)clearTimeout(this.retryTimeout),this.retryTimeout=void 0}closeWithoutEmit(){if(this.unbindTimeouts(),this.res)this.res.removeAllListeners(),this.res.destroy();if(this.req)this.req.removeAllListeners(),this.req.destroy()}close(){this.emit(K.ConnectionClosed),this.closeWithoutEmit()}destroy(){this.removeAllListeners(),this.close()}async clone(){let R=await new Th(this.requestData).makeRequestAsStream(),h=this.eventNames();for(let $ of h){let A=this.listeners($);for(let G of A)R.on($,G)}return R}async connect(f={}){if(typeof f.autoReconnect!=="undefined")this.autoReconnect=f.autoReconnect;if(typeof f.autoReconnectRetries!=="undefined")this.autoReconnectRetries=f.autoReconnectRetries==="unlimited"?1/0:f.autoReconnectRetries;if(typeof f.keepAliveTimeout!=="undefined")this.keepAliveTimeoutMs=f.keepAliveTimeout==="disable"?1/0:f.keepAliveTimeout;if(typeof f.nextRetryTimeout!=="undefined")this.nextRetryTimeout=f.nextRetryTimeout;this.unbindTimeouts();try{await this.reconnect()}catch(R){if(this.emit(K.ConnectError,0),this.emit(K.Error,{type:K.ConnectError,error:R,message:"Connect error - Initial connection just failed."}),this.autoReconnect)this.makeAutoReconnectRetry(0,R);else throw R}return this}async reconnect(){if(this.connectionProcessRunning)throw new Error("Connection process is already running.");this.connectionProcessRunning=!0;try{let f=!0;if(this.req)f=!1,this.closeWithoutEmit();let{req:R,res:h,originalResponse:$}=await new Th(this.requestData).makeRequestAndResolveWhenReady();this.req=R,this.res=h,this.originalResponse=$,this.emit(f?K.Connected:K.Reconnected),this.parser.reset(),this.initEventsFromRequest()}finally{this.connectionProcessRunning=!1}}async onConnectionError(f=0){if(this.unbindTimeouts(),this.closeWithoutEmit(),!this.autoReconnect){this.emit(K.ConnectionClosed);return}if(f>=this.autoReconnectRetries){this.emit(K.ReconnectLimitExceeded),this.emit(K.ConnectionClosed);return}try{this.emit(K.ReconnectAttempt,f),await this.reconnect()}catch(R){this.emit(K.ReconnectError,f),this.emit(K.Error,{type:K.ReconnectError,error:R,message:`Reconnect error - ${f+1} attempts made yet.`}),this.makeAutoReconnectRetry(f,R)}}makeAutoReconnectRetry(f,R){let h=this.nextRetryTimeout(f+1,R);this.retryTimeout=setTimeout(()=>{this.onConnectionError(f+1)},h)}async*[Symbol.asyncIterator](){let f=new fY(this);try{while(!0){if(!this.req||this.req.aborted)throw new Error("Connection closed");if(f.hasStack())yield*f.popStack();let{type:R,payload:h}=await f.nextEvent();if(R==="error")throw h}}finally{f.destroy()}}}var s$=hY;function $Y(f){var R;if(!((R=f.clientSettings.plugins)===null||R===void 0?void 0:R.length))return!1;for(let h of f.clientSettings.plugins)if(h.onRequestError||h.onResponseError)return!0;return!1}async function AY(f,R,h,$){let A;if($ instanceof yh||$ instanceof jh)A=await this.applyPluginMethod("onRequestError",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,error:$});else if($ instanceof Oh)A=await this.applyPluginMethod("onResponseError",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,error:$});if(A&&A instanceof Eh)return A.value;return Promise.reject($)}import*as NY from"crypto";class kf{constructor(f){this.nonceLength=32,this.consumerKeys=f.consumerKeys}static percentEncode(f){return encodeURIComponent(f).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")}hash(f,R){return NY.createHmac("sha1",R).update(f).digest("base64")}authorize(f,R={}){let h={oauth_consumer_key:this.consumerKeys.key,oauth_nonce:this.getNonce(),oauth_signature_method:"HMAC-SHA1",oauth_timestamp:this.getTimestamp(),oauth_version:"1.0"};if(R.key!==void 0)h.oauth_token=R.key;if(!f.data)f.data={};return h.oauth_signature=this.getSignature(f,R.secret,h),h}toHeader(f){let R=HY(f),h="OAuth ";for(let $ of R){if($.key.indexOf("oauth_")!==0)continue;h+=kf.percentEncode($.key)+'="'+kf.percentEncode($.value)+'",'}return{Authorization:h.slice(0,h.length-1)}}getNonce(){let R="";for(let h=0;h<this.nonceLength;h++)R+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.trunc(Math.random()*62)];return R}getTimestamp(){return Math.trunc(new Date().getTime()/1000)}getSignature(f,R,h){return this.hash(this.getBaseString(f,h),this.getSigningKey(R))}getSigningKey(f){return kf.percentEncode(this.consumerKeys.secret)+"&"+kf.percentEncode(f||"")}getBaseString(f,R){return f.method.toUpperCase()+"&"+kf.percentEncode(this.getBaseUrl(f.url))+"&"+kf.percentEncode(this.getParameterString(f,R))}getParameterString(f,R){let h=HY(nz(GY(R,GY(f.data,oz(f.url))))),$="";for(let{key:A,value:G}of h)if(G&&Array.isArray(G)){G.sort();let H="";G.forEach((N,U)=>{if(H+=A+"="+N,U<G.length)H+="&"}),$+=H}else $+=A+"="+G+"&";return $.slice(0,$.length-1)}getBaseUrl(f){return f.split("?")[0]}}var gh=kf;function GY(f,R){return{...f||{},...R||{}}}function HY(f){return Object.keys(f).sort().map((R)=>({key:R,value:f[R]}))}function pz(f){let R=f.split("&"),h={};for(let $ of R){let[A,G=""]=$.split("=");if(h[A]){if(!Array.isArray(h[A]))h[A]=[h[A]];h[A].push(decodeURIComponent(G))}else h[A]=decodeURIComponent(G)}return h}function oz(f){let R=f.split("?");if(R.length===1)return{};return pz(R[1])}function nz(f){let R={};for(let h in f){let $=f[h];if($&&Array.isArray($))$=$.map((A)=>kf.percentEncode(A));else $=kf.percentEncode($);R[kf.percentEncode(h)]=$}return R}class sf{constructor(){this._boundary="",this._chunks=[]}bodyAppend(...f){let R=f.map((h)=>h instanceof Buffer?h:Buffer.from(h));this._chunks.push(...R)}append(f,R,h){let $=R instanceof Buffer?R:R.toString(),A=this.getMultipartHeader(f,$,h);this.bodyAppend(A,$,sf.LINE_BREAK)}getHeaders(){return{"content-type":"multipart/form-data; boundary="+this.getBoundary()}}getLength(){return this._chunks.reduce((f,R)=>f+R.length,this.getMultipartFooter().length)}getBuffer(){let f=[...this._chunks,this.getMultipartFooter()],R=Buffer.alloc(this.getLength()),h=0;for(let $ of f)for(let A=0;A<$.length;h++,A++)R[h]=$[A];return R}getBoundary(){if(!this._boundary)this.generateBoundary();return this._boundary}generateBoundary(){let f="--------------------------";for(let R=0;R<24;R++)f+=Math.floor(Math.random()*10).toString(16);this._boundary=f}getMultipartHeader(f,R,h){if(!h)h=R instanceof Buffer?sf.DEFAULT_CONTENT_TYPE:"";let $={"Content-Disposition":["form-data",`name="${f}"`],"Content-Type":h},A="";for(let[G,H]of Object.entries($)){if(!H.length)continue;A+=G+": "+x$(H).join("; ")+sf.LINE_BREAK}return"--"+this.getBoundary()+sf.LINE_BREAK+A+sf.LINE_BREAK}getMultipartFooter(){if(this._footerChunk)return this._footerChunk;return this._footerChunk=Buffer.from("--"+this.getBoundary()+"--"+sf.LINE_BREAK)}}sf.LINE_BREAK=`\r
88
- `;sf.DEFAULT_CONTENT_TYPE="application/octet-stream";class GH{static formatQueryToString(f){let R={};for(let h in f)if(typeof f[h]==="string")R[h]=f[h];else if(typeof f[h]!=="undefined")R[h]=String(f[h]);return R}static autoDetectBodyType(f){if(f.pathname.startsWith("/2/")||f.pathname.startsWith("/labs/2/")){if(f.password.startsWith("/2/oauth2"))return"url";return"json"}if(f.hostname==="upload.x.com"){if(f.pathname==="/1.1/media/upload.json")return"form-data";return"json"}let R=f.pathname.split("/1.1/",2)[1];if(this.JSON_1_1_ENDPOINTS.has(R))return"json";return"url"}static addQueryParamsToUrl(f,R){let h=Object.entries(R);if(h.length){let $="";for(let[A,G]of h)$+=($.length?"&":"?")+`${gh.percentEncode(A)}=${gh.percentEncode(G)}`;f.search=$}}static constructBodyParams(f,R,h){if(f instanceof Buffer)return f;if(h==="json"){if(!R["content-type"])R["content-type"]="application/json;charset=UTF-8";return JSON.stringify(f)}else if(h==="url"){if(!R["content-type"])R["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";if(Object.keys(f).length)return new URLSearchParams(f).toString().replace(/\*/g,"%2A");return""}else if(h==="raw")throw new Error("You can only use raw body mode with Buffers. To give a string, use Buffer.from(str).");else{let $=new sf;for(let A in f)$.append(A,f[A]);if(!R["content-type"]){let A=$.getHeaders();R["content-type"]=A["content-type"]}return $.getBuffer()}}static setBodyLengthHeader(f,R){var h;if(f.headers=(h=f.headers)!==null&&h!==void 0?h:{},typeof R==="string")f.headers["content-length"]=Buffer.byteLength(R);else f.headers["content-length"]=R.length}static isOAuthSerializable(f){return!(f instanceof Buffer)}static mergeQueryAndBodyForOAuth(f,R){let h={};for(let $ in f)h[$]=f[$];if(this.isOAuthSerializable(R))for(let $ in R){let A=R[$];if(this.isOAuthSerializable(A))h[$]=typeof A==="object"&&A!==null&&"toString"in A?A.toString():A}return h}static moveUrlQueryParamsIntoObject(f,R){for(let[h,$]of f.searchParams)R[h]=$;return f.search="",f}static applyRequestParametersToUrl(f,R){return f.pathname=f.pathname.replace(/:([A-Z_-]+)/ig,(h,$)=>{if(R[$]!==void 0)return String(R[$]);return h}),f}}GH.JSON_1_1_ENDPOINTS=new Set(["direct_messages/events/new.json","direct_messages/welcome_messages/new.json","direct_messages/welcome_messages/rules/new.json","media/metadata/create.json","collections/entries/curate.json"]);var Vf=GH;import*as UY from"crypto";class _R{static getCodeVerifier(){return this.generateRandomString(128)}static getCodeChallengeFromVerifier(f){return this.escapeBase64Url(UY.createHash("sha256").update(f).digest("base64"))}static getAuthHeader(f,R){let h=encodeURIComponent(f)+":"+encodeURIComponent(R);return Buffer.from(h).toString("base64")}static generateRandomString(f){let R="",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";for(let $=0;$<f;$++)R+=h[Math.floor(Math.random()*h.length)];return R}static escapeBase64Url(f){return f.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}class L0{constructor(f){if(this.rateLimits={},this.clientSettings={},f)this.clientSettings=f}getRateLimits(){return this.rateLimits}saveRateLimit(f,R){this.rateLimits[f]=R}async send(f){var R,h,$,A,G;if((R=this.clientSettings.plugins)===null||R===void 0?void 0:R.length){let D=await this.applyPreRequestConfigHooks(f);if(D)return D}let H=this.getHttpRequestArgs(f),N={method:H.method,headers:H.headers,timeout:f.timeout,agent:this.clientSettings.httpAgent},U=f.enableRateLimitSave!==!1;if(H.body)Vf.setBodyLengthHeader(N,H.body);if((h=this.clientSettings.plugins)===null||h===void 0?void 0:h.length)await this.applyPreRequestHooks(f,H,N);let F=new Th({url:H.url,options:N,body:H.body,rateLimitSaver:U?this.saveRateLimit.bind(this,H.rawUrl):void 0,requestEventDebugHandler:f.requestEventDebugHandler,compression:(A=($=f.compression)!==null&&$!==void 0?$:this.clientSettings.compression)!==null&&A!==void 0?A:!0,forceParseMode:f.forceParseMode}).makeRequest();if($Y(this))F=this.applyResponseErrorHooks(f,H,N,F);let S=await F;if((G=this.clientSettings.plugins)===null||G===void 0?void 0:G.length){let D=await this.applyPostRequestHooks(f,H,N,S);if(D)return D.value}return S}sendStream(f){var R,h;if(this.clientSettings.plugins)this.applyPreStreamRequestConfigHooks(f);let $=this.getHttpRequestArgs(f),A={method:$.method,headers:$.headers,agent:this.clientSettings.httpAgent},G=f.enableRateLimitSave!==!1,H=f.autoConnect!==!1;if($.body)Vf.setBodyLengthHeader(A,$.body);let N={url:$.url,options:A,body:$.body,rateLimitSaver:G?this.saveRateLimit.bind(this,$.rawUrl):void 0,payloadIsError:f.payloadIsError,compression:(h=(R=f.compression)!==null&&R!==void 0?R:this.clientSettings.compression)!==null&&h!==void 0?h:!0},U=new s$(N);if(!H)return U;return U.connect()}initializeToken(f){if(typeof f==="string")this.bearerToken=f;else if(typeof f==="object"&&"appKey"in f){if(this.consumerToken=f.appKey,this.consumerSecret=f.appSecret,f.accessToken&&f.accessSecret)this.accessToken=f.accessToken,this.accessSecret=f.accessSecret;this._oauth=this.buildOAuth()}else if(typeof f==="object"&&"username"in f){let R=encodeURIComponent(f.username)+":"+encodeURIComponent(f.password);this.basicToken=Buffer.from(R).toString("base64")}else if(typeof f==="object"&&"clientId"in f)this.clientId=f.clientId,this.clientSecret=f.clientSecret}getActiveTokens(){if(this.bearerToken)return{type:"oauth2",bearerToken:this.bearerToken};else if(this.basicToken)return{type:"basic",token:this.basicToken};else if(this.consumerSecret&&this._oauth)return{type:"oauth-1.0a",appKey:this.consumerToken,appSecret:this.consumerSecret,accessToken:this.accessToken,accessSecret:this.accessSecret};else if(this.clientId)return{type:"oauth2-user",clientId:this.clientId};return{type:"none"}}buildOAuth(){if(!this.consumerSecret||!this.consumerToken)throw new Error("Invalid consumer tokens");return new gh({consumerKeys:{key:this.consumerToken,secret:this.consumerSecret}})}getOAuthAccessTokens(){if(!this.accessSecret||!this.accessToken)return;return{key:this.accessToken,secret:this.accessSecret}}getPlugins(){var f;return(f=this.clientSettings.plugins)!==null&&f!==void 0?f:[]}hasPlugins(){var f;return!!((f=this.clientSettings.plugins)===null||f===void 0?void 0:f.length)}async applyPluginMethod(f,R){var h;let $;for(let A of this.getPlugins()){let G=await((h=A[f])===null||h===void 0?void 0:h.call(A,R));if(G&&G instanceof Eh)$=G}return $}writeAuthHeaders({headers:f,bodyInSignature:R,url:h,method:$,query:A,body:G}){if(f={...f},this.bearerToken)f.Authorization="Bearer "+this.bearerToken;else if(this.basicToken)f.Authorization="Basic "+this.basicToken;else if(this.clientId&&this.clientSecret)f.Authorization="Basic "+_R.getAuthHeader(this.clientId,this.clientSecret);else if(this.consumerSecret&&this._oauth){let H=R?Vf.mergeQueryAndBodyForOAuth(A,G):A,N=this._oauth.authorize({url:h.toString(),method:$,data:H},this.getOAuthAccessTokens());f={...f,...this._oauth.toHeader(N)}}return f}getUrlObjectFromUrlString(f){if(!f.startsWith("http"))f="https://"+f;return new URL(f)}getHttpRequestArgs({url:f,method:R,query:h={},body:$={},headers:A,forceBodyMode:G,enableAuth:H,params:N}){let U=void 0;if(R=R.toUpperCase(),A=A!==null&&A!==void 0?A:{},!A["x-user-agent"])A["x-user-agent"]="Node.twitter-api-v2";let F=this.getUrlObjectFromUrlString(f),S=F.origin+F.pathname;if(N)Vf.applyRequestParametersToUrl(F,N);let D=Vf.formatQueryToString(h);if(Vf.moveUrlQueryParamsIntoObject(F,D),!($ instanceof Buffer))eS($);let J=G!==null&&G!==void 0?G:Vf.autoDetectBodyType(F);if(H!==!1){let Z=L0.BODY_METHODS.has(R)&&J==="url";A=this.writeAuthHeaders({headers:A,bodyInSignature:Z,method:R,query:D,url:F,body:$})}if(L0.BODY_METHODS.has(R))U=Vf.constructBodyParams($,A,J)||void 0;return Vf.addQueryParamsToUrl(F,D),{rawUrl:S,url:F,method:R,headers:A,body:U}}async applyPreRequestConfigHooks(f){var R;let h=this.getUrlObjectFromUrlString(f.url);for(let $ of this.getPlugins()){let A=await((R=$.onBeforeRequestConfig)===null||R===void 0?void 0:R.call($,{client:this,url:h,params:f}));if(A)return A}}applyPreStreamRequestConfigHooks(f){var R;let h=this.getUrlObjectFromUrlString(f.url);for(let $ of this.getPlugins())(R=$.onBeforeStreamRequestConfig)===null||R===void 0||R.call($,{client:this,url:h,params:f})}async applyPreRequestHooks(f,R,h){await this.applyPluginMethod("onBeforeRequest",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h})}async applyPostRequestHooks(f,R,h,$){return await this.applyPluginMethod("onAfterRequest",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,response:$})}applyResponseErrorHooks(f,R,h,$){return $.catch(AY.bind(this,f,R,h))}}L0.BODY_METHODS=new Set(["POST","PUT","PATCH"]);class QR{constructor(f,R={}){if(this._currentUser=null,this._currentUserV2=null,f instanceof QR)this._requestMaker=f._requestMaker;else this._requestMaker=new L0(R),this._requestMaker.initializeToken(f)}setPrefix(f){this._prefix=f}cloneWithPrefix(f){let R=this.constructor(this);return R.setPrefix(f),R}getActiveTokens(){return this._requestMaker.getActiveTokens()}getPlugins(){return this._requestMaker.getPlugins()}getPluginOfType(f){return this.getPlugins().find((R)=>R instanceof f)}hasHitRateLimit(f){var R;if(this.isRateLimitStatusObsolete(f))return!1;return((R=this.getLastRateLimitStatus(f))===null||R===void 0?void 0:R.remaining)===0}isRateLimitStatusObsolete(f){let R=this.getLastRateLimitStatus(f);if(R===void 0)return!0;return R.reset*1000<Date.now()}getLastRateLimitStatus(f){let R=f.match(/^https?:\/\//)?f:this._prefix+f;return this._requestMaker.getRateLimits()[R]}getCurrentUserObject(f=!1){if(!f&&this._currentUser){if(this._currentUser.value)return Promise.resolve(this._currentUser.value);return this._currentUser.promise}return this._currentUser=$H(()=>this.get("account/verify_credentials.json",{tweet_mode:"extended"},{prefix:XR})),this._currentUser.promise}getCurrentUserV2Object(f=!1){if(!f&&this._currentUserV2){if(this._currentUserV2.value)return Promise.resolve(this._currentUserV2.value);return this._currentUserV2.promise}return this._currentUserV2=$H(()=>this.get("users/me",void 0,{prefix:JR})),this._currentUserV2.promise}async get(f,R={},{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"GET",query:R,...A});return h?G:G.data}async delete(f,R={},{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"DELETE",query:R,...A});return h?G:G.data}async post(f,R,{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"POST",body:R,...A});return h?G:G.data}async put(f,R,{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"PUT",body:R,...A});return h?G:G.data}async patch(f,R,{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"PATCH",body:R,...A});return h?G:G.data}getStream(f,R,{prefix:h=this._prefix,...$}={}){return this._requestMaker.sendStream({url:h?h+f:f,method:"GET",query:R,...$})}postStream(f,R,{prefix:h=this._prefix,...$}={}){return this._requestMaker.sendStream({url:h?h+f:f,method:"POST",body:R,...$})}}class Tf extends QR{constructor(f){if(!(f instanceof QR))throw new Error("You must instance SubTwitterApi instance from existing TwitterApi instance.");super(f)}}class I0 extends w0{constructor(){super(...arguments);this.hasFinishedFetch=!1}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.push(...h),this.hasFinishedFetch=h.length===0}getNextQueryParams(f){let R=BigInt(this._realData[this._realData.length-1].id_str);return{...this.injectQueryParams(f),max_id:(R-BigInt(1)).toString()}}getPageLengthFromRequest(f){return f.data.length}isFetchLastOver(f){return!f.data.length}canFetchNextPage(f){return f.length>0}getItemArray(){return this.tweets}get tweets(){return this._realData}get done(){return super.done||this.hasFinishedFetch}}class HH extends I0{constructor(){super(...arguments);this._endpoint="statuses/home_timeline.json"}}class NH extends I0{constructor(){super(...arguments);this._endpoint="statuses/mentions_timeline.json"}}class _$ extends I0{constructor(){super(...arguments);this._endpoint="statuses/user_timeline.json"}}class UH extends I0{constructor(){super(...arguments);this._endpoint="lists/statuses.json"}}class d$ extends I0{constructor(){super(...arguments);this._endpoint="favorites/list.json"}}class FH extends Uf{constructor(){super(...arguments);this._endpoint="mutes/users/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class WH extends Uf{constructor(){super(...arguments);this._endpoint="mutes/users/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class SH extends Uf{constructor(){super(...arguments);this._endpoint="followers/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class YH extends Uf{constructor(){super(...arguments);this._endpoint="followers/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class DH extends Uf{constructor(){super(...arguments);this._endpoint="friends/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class ZH extends Uf{constructor(){super(...arguments);this._endpoint="friends/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class MH extends w0{constructor(){super(...arguments);this._endpoint="users/search.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.push(...h)}getNextQueryParams(f){var R;let h=Number((R=this._queryParams.page)!==null&&R!==void 0?R:"1");return{...this._queryParams,page:h+1,...f?{count:f}:{}}}getPageLengthFromRequest(f){return f.data.length}isFetchLastOver(f){return!f.data.length}canFetchNextPage(f){return f.length>0}getItemArray(){return this.users}get users(){return this._realData}}class a$ extends Uf{constructor(){super(...arguments);this._endpoint="friendships/incoming.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class JH extends a${constructor(){super(...arguments);this._endpoint="friendships/outgoing.json"}}class r$ extends Uf{refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.lists.push(...h.lists),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.lists.length}getItemArray(){return this.lists}get lists(){return this._realData.lists}}class XH extends r${constructor(){super(...arguments);this._endpoint="lists/memberships.json"}}class zH extends r${constructor(){super(...arguments);this._endpoint="lists/ownerships.json"}}class QH extends r${constructor(){super(...arguments);this._endpoint="lists/subscriptions.json"}}class wH extends Uf{refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class LH extends wH{constructor(){super(...arguments);this._endpoint="lists/members.json"}}class IH extends wH{constructor(){super(...arguments);this._endpoint="lists/subscribers.json"}}class P0 extends Tf{constructor(){super(...arguments);this._prefix=XR}singleTweet(f,R={}){return this.get("statuses/show.json",{tweet_mode:"extended",id:f,...R})}tweets(f,R={}){return this.post("statuses/lookup.json",{tweet_mode:"extended",id:f,...R})}oembedTweet(f,R={}){return this.get("oembed",{url:`https://x.com/i/statuses/${f}`,...R},{prefix:"https://publish.x.com/"})}async homeTimeline(f={}){let R={tweet_mode:"extended",...f},h=await this.get("statuses/home_timeline.json",R,{fullResponse:!0});return new HH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async mentionTimeline(f={}){let R={tweet_mode:"extended",...f},h=await this.get("statuses/mentions_timeline.json",R,{fullResponse:!0});return new NH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userTimeline(f,R={}){let h={tweet_mode:"extended",user_id:f,...R},$=await this.get("statuses/user_timeline.json",h,{fullResponse:!0});return new _$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async userTimelineByUsername(f,R={}){let h={tweet_mode:"extended",screen_name:f,...R},$=await this.get("statuses/user_timeline.json",h,{fullResponse:!0});return new _$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async favoriteTimeline(f,R={}){let h={tweet_mode:"extended",user_id:f,...R},$=await this.get("favorites/list.json",h,{fullResponse:!0});return new d$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async favoriteTimelineByUsername(f,R={}){let h={tweet_mode:"extended",screen_name:f,...R},$=await this.get("favorites/list.json",h,{fullResponse:!0});return new d$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}user(f){return this.get("users/show.json",{tweet_mode:"extended",...f})}users(f){return this.get("users/lookup.json",{tweet_mode:"extended",...f})}verifyCredentials(f={}){return this.get("account/verify_credentials.json",f)}async listMutedUsers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("mutes/users/list.json",R,{fullResponse:!0});return new FH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listMutedUserIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("mutes/users/ids.json",R,{fullResponse:!0});return new WH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFriendList(f={}){let R={...f},h=await this.get("friends/list.json",R,{fullResponse:!0});return new DH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowerList(f={}){let R={...f},h=await this.get("followers/list.json",R,{fullResponse:!0});return new SH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowerIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("followers/ids.json",R,{fullResponse:!0});return new YH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowingIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("friends/ids.json",R,{fullResponse:!0});return new ZH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async searchUsers(f,R={}){let h={q:f,tweet_mode:"extended",page:1,...R},$=await this.get("users/search.json",h,{fullResponse:!0});return new MH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}friendship(f){return this.get("friendships/show.json",f)}friendships(f){return this.get("friendships/lookup.json",f)}friendshipsNoRetweets(){return this.get("friendships/no_retweets/ids.json",{stringify_ids:!0})}async friendshipsIncoming(f={}){let R={stringify_ids:!0,...f},h=await this.get("friendships/incoming.json",R,{fullResponse:!0});return new a$({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async friendshipsOutgoing(f={}){let R={stringify_ids:!0,...f},h=await this.get("friendships/outgoing.json",R,{fullResponse:!0});return new JH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}accountSettings(){return this.get("account/settings.json")}userProfileBannerSizes(f){return this.get("users/profile_banner.json",f)}list(f){return this.get("lists/show.json",{tweet_mode:"extended",...f})}lists(f={}){return this.get("lists/list.json",{tweet_mode:"extended",...f})}async listMembers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/members.json",R,{fullResponse:!0});return new LH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}listGetMember(f){return this.get("lists/members/show.json",{tweet_mode:"extended",...f})}async listMemberships(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/memberships.json",R,{fullResponse:!0});return new XH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listOwnerships(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/ownerships.json",R,{fullResponse:!0});return new zH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listStatuses(f){let R={tweet_mode:"extended",...f},h=await this.get("lists/statuses.json",R,{fullResponse:!0});return new UH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listSubscribers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/subscribers.json",R,{fullResponse:!0});return new IH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}listGetSubscriber(f){return this.get("lists/subscribers/show.json",{tweet_mode:"extended",...f})}async listSubscriptions(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/subscriptions.json",R,{fullResponse:!0});return new QH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}mediaInfo(f){return this.get("media/upload.json",{command:"STATUS",media_id:f},{prefix:uf})}filterStream({autoConnect:f,...R}={}){let h={};for(let[A,G]of Object.entries(R))if(A==="follow"||A==="track")h[A]=G.toString();else if(A==="locations"){let H=G;h.locations=x$(H).map((N)=>`${N.lng},${N.lat}`).join(",")}else h[A]=G;return this.stream.postStream("statuses/filter.json",h,{autoConnect:f})}sampleStream({autoConnect:f,...R}={}){return this.stream.getStream("statuses/sample.json",R,{autoConnect:f})}get stream(){let f=new i$(this);return f.setPrefix(pS),f}trendsByPlace(f,R={}){return this.get("trends/place.json",{id:f,...R})}trendsAvailable(){return this.get("trends/available.json")}trendsClosest(f,R){return this.get("trends/closest.json",{lat:f,long:R})}geoPlace(f){return this.get("geo/id/:place_id.json",void 0,{params:{place_id:f}})}geoSearch(f){return this.get("geo/search.json",f)}geoReverseGeoCode(f){return this.get("geo/reverse_geocode.json",f)}rateLimitStatuses(...f){return this.get("application/rate_limit_status.json",{resources:f})}supportedLanguages(){return this.get("help/languages.json")}}import*as wR from"fs";async function PH(f){let R=await qH(f);if(typeof R==="number")return new Promise((h,$)=>{wR.readFile(R,(A,G)=>{if(A)return $(A);h(G)})});else if(R instanceof Buffer)return R;else return R.readFile()}function qH(f){if(typeof f==="string")return wR.promises.open(f,"r");else if(typeof f==="number")return f;else if(typeof f==="object"&&!(f instanceof Buffer))return f;else if(!(f instanceof Buffer))throw new Error("Given file is not valid, please check its type.");else return f}async function FY(f){if(typeof f==="number")return(await new Promise((h,$)=>{wR.fstat(f,(A,G)=>{if(A)$(A);h(G)})})).size;else if(f instanceof Buffer)return f.length;else return(await f.stat()).size}function WY(f,R,h){if(typeof h==="string")return h;else if(typeof f==="string"&&!R)return ez(f);else if(typeof R==="string")return uz(R);throw new Error("You must specify type if file is a file handle or Buffer.")}function ez(f){if(f.endsWith(".jpeg")||f.endsWith(".jpg"))return d.Jpeg;if(f.endsWith(".png"))return d.Png;if(f.endsWith(".webp"))return d.Webp;if(f.endsWith(".gif"))return d.Gif;if(f.endsWith(".mpeg4")||f.endsWith(".mp4"))return d.Mp4;if(f.endsWith(".mov")||f.endsWith(".mov"))return d.Mov;if(f.endsWith(".srt"))return d.Srt;return AH({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"options.mimeType is missing and filename couldn't help to resolve MIME type, so it will fallback to image/jpeg",resolution:"If you except to give filenames without extensions, please specify explicitlty the MIME type using options.mimeType"}),d.Jpeg}function uz(f){if(AH({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"you're using options.type",resolution:"Remove options.type argument and migrate to options.mimeType which takes the real MIME type. If you're using type=longmp4, add options.longVideo alongside of mimeType=EUploadMimeType.Mp4"}),f==="gif")return d.Gif;if(f==="jpg")return d.Jpeg;if(f==="png")return d.Png;if(f==="webp")return d.Webp;if(f==="srt")return d.Srt;if(f==="mp4"||f==="longmp4")return d.Mp4;if(f==="mov")return d.Mov;return f}function SY(f,R){if(f===d.Mp4||f===d.Mov)return R==="tweet"?"TweetVideo":"DmVideo";if(f===d.Gif)return R==="tweet"?"TweetGif":"DmGif";if(f===d.Srt)return"Subtitles";else return R==="tweet"?"TweetImage":"DmImage"}function BH(f){return new Promise((R)=>setTimeout(R,f*1000))}async function KH(f,R,h=0,$){if(f instanceof Buffer){let G=f.slice(h,h+R);return[G,G.length]}if(!$)throw new Error("Well, we will need a buffer to store file content.");let A;if(typeof f==="number")A=await new Promise((G,H)=>{wR.read(f,$,0,R,h,(N,U)=>{if(N)H(N);G(U)})});else A=(await f.read($,0,R,h)).bytesRead;return[$,A]}var vH="media/upload.json";class q0 extends P0{constructor(){super(...arguments);this._prefix=XR}get readOnly(){return this}tweet(f,R={}){let h={status:f,tweet_mode:"extended",...R};return this.post("statuses/update.json",h)}async quote(f,R,h={}){let $="https://x.com/i/statuses/"+R;return this.tweet(f,{...h,attachment_url:$})}async tweetThread(f){let R=[];for(let h of f){let $=R.length?R[R.length-1]:null,A={...typeof h==="string"?{status:h}:h},G=$?$.id_str:A.in_reply_to_status_id,H=A.status;if(G)R.push(await this.reply(H,G,A));else R.push(await this.tweet(H,A))}return R}reply(f,R,h={}){return this.tweet(f,{auto_populate_reply_metadata:!0,in_reply_to_status_id:R,...h})}deleteTweet(f){return this.post("statuses/destroy/:id.json",{tweet_mode:"extended"},{params:{id:f}})}reportUserAsSpam(f){return this.post("users/report_spam.json",{tweet_mode:"extended",...f})}updateFriendship(f){return this.post("friendships/update.json",f)}createFriendship(f){return this.post("friendships/create.json",f)}destroyFriendship(f){return this.post("friendships/destroy.json",f)}updateAccountSettings(f){return this.post("account/settings.json",f)}updateAccountProfile(f){return this.post("account/update_profile.json",f)}async updateAccountProfileBanner(f,R={}){let h={banner:await PH(f),...R};return this.post("account/update_profile_banner.json",h,{forceBodyMode:"form-data"})}async updateAccountProfileImage(f,R={}){let h={tweet_mode:"extended",image:await PH(f),...R};return this.post("account/update_profile_image.json",h,{forceBodyMode:"form-data"})}removeAccountProfileBanner(){return this.post("account/remove_profile_banner.json")}createList(f){return this.post("lists/create.json",{tweet_mode:"extended",...f})}updateList(f){return this.post("lists/update.json",{tweet_mode:"extended",...f})}removeList(f){return this.post("lists/destroy.json",{tweet_mode:"extended",...f})}addListMembers(f){let h=f.user_id&&Vh(f.user_id)||f.screen_name&&Vh(f.screen_name)?"lists/members/create_all.json":"lists/members/create.json";return this.post(h,f)}removeListMembers(f){let h=f.user_id&&Vh(f.user_id)||f.screen_name&&Vh(f.screen_name)?"lists/members/destroy_all.json":"lists/members/destroy.json";return this.post(h,f)}subscribeToList(f){return this.post("lists/subscribers/create.json",{tweet_mode:"extended",...f})}unsubscribeOfList(f){return this.post("lists/subscribers/destroy.json",{tweet_mode:"extended",...f})}createMediaMetadata(f,R){return this.post("media/metadata/create.json",{media_id:f,...R},{prefix:uf,forceBodyMode:"json"})}createMediaSubtitles(f,R){return this.post("media/subtitles/create.json",{media_id:f,media_category:"TweetVideo",subtitle_info:{subtitles:R}},{prefix:uf,forceBodyMode:"json"})}deleteMediaSubtitles(f,...R){return this.post("media/subtitles/delete.json",{media_id:f,media_category:"TweetVideo",subtitle_info:{subtitles:R.map((h)=>({language_code:h}))}},{prefix:uf,forceBodyMode:"json"})}async uploadMedia(f,R={},h=!1){var $;let A=($=R.chunkLength)!==null&&$!==void 0?$:1048576,{fileHandle:G,mediaCategory:H,fileSize:N,mimeType:U}=await this.getUploadMediaRequirements(f,R);try{let F=await this.post(vH,{command:"INIT",total_bytes:N,media_type:U,media_category:H,additional_owners:R.additionalOwners,shared:R.shared?!0:void 0},{prefix:uf});await this.mediaChunkedUpload(G,A,F.media_id_string,R.maxConcurrentUploads);let S=await this.post(vH,{command:"FINALIZE",media_id:F.media_id_string},{prefix:uf});if(S.processing_info&&S.processing_info.state!=="succeeded")await this.awaitForMediaProcessingCompletion(S);if(h)return S;else return S.media_id_string}finally{if(typeof f==="number")yH.close(f,()=>{});else if(typeof G==="object"&&!(G instanceof Buffer))G.close()}}async awaitForMediaProcessingCompletion(f){var R;while(!0){f=await this.mediaInfo(f.media_id_string);let{processing_info:h}=f;if(!h||h.state==="succeeded")return;if((R=h.error)===null||R===void 0?void 0:R.code){let{name:$,message:A}=h.error;throw new Error(`Failed to process media: ${$} - ${A}.`)}if(h.state==="failed")throw new Error("Failed to process the media.");if(h.check_after_secs)await BH(h.check_after_secs);else await BH(5)}}async getUploadMediaRequirements(f,{mimeType:R,type:h,target:$,longVideo:A}={}){let G;try{G=await qH(f);let H=WY(f,h,R),N;if(H===d.Mp4&&(!R&&!h&&$!=="dm"||A))N="amplify_video";else N=SY(H,$!==null&&$!==void 0?$:"tweet");return{fileHandle:G,mediaCategory:N,fileSize:await FY(G),mimeType:H}}catch(H){if(typeof f==="number")yH.close(f,()=>{});else if(typeof G==="object"&&!(G instanceof Buffer))G.close();throw H}}async mediaChunkedUpload(f,R,h,$=3){let A=0;if($<1)throw new RangeError("Bad maxConcurrentUploads parameter.");let G=f instanceof Buffer?void 0:Buffer.alloc(R),H,N,U=0;[H,N]=await KH(f,R,U,G),U+=N;let F=new Set;while(N){let S=H.slice(0,N);if(S.length){let D=this.post(vH,{command:"APPEND",media_id:h,segment_index:A,media:S},{prefix:uf});F.add(D),D.then(()=>{F.delete(D)}),A++}if(F.size>=$)await Promise.race(F);[H,N]=await KH(f,R,U,G),U+=N}await Promise.all([...F])}}class YY extends q0{constructor(){super(...arguments);this._prefix=XR}get readWrite(){return this}sendDm({recipient_id:f,custom_profile_id:R,...h}){let $={event:{type:zR.Create,[zR.Create]:{target:{recipient_id:f},message_data:h}}};if(R)$.event[zR.Create].custom_profile_id=R;return this.post("direct_messages/events/new.json",$,{forceBodyMode:"json"})}getDmEvent(f){return this.get("direct_messages/events/show.json",{id:f})}deleteDm(f){return this.delete("direct_messages/events/destroy.json",{id:f})}async listDmEvents(f={}){let R={...f},h=await this.get("direct_messages/events/list.json",R,{fullResponse:!0});return new RH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}newWelcomeDm(f,R){let h={[zR.WelcomeCreate]:{name:f,message_data:R}};return this.post("direct_messages/welcome_messages/new.json",h,{forceBodyMode:"json"})}getWelcomeDm(f){return this.get("direct_messages/welcome_messages/show.json",{id:f})}deleteWelcomeDm(f){return this.delete("direct_messages/welcome_messages/destroy.json",{id:f})}updateWelcomeDm(f,R){let h={message_data:R};return this.put("direct_messages/welcome_messages/update.json",h,{forceBodyMode:"json",query:{id:f}})}async listWelcomeDms(f={}){let R={...f},h=await this.get("direct_messages/welcome_messages/list.json",R,{fullResponse:!0});return new hH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}newWelcomeDmRule(f){return this.post("direct_messages/welcome_messages/rules/new.json",{welcome_message_rule:{welcome_message_id:f}},{forceBodyMode:"json"})}getWelcomeDmRule(f){return this.get("direct_messages/welcome_messages/rules/show.json",{id:f})}deleteWelcomeDmRule(f){return this.delete("direct_messages/welcome_messages/rules/destroy.json",{id:f})}async listWelcomeDmRules(f={}){let R={...f};return this.get("direct_messages/welcome_messages/rules/list.json",R)}async setWelcomeDm(f,R=!0){var h;let $=await this.listWelcomeDmRules();if((h=$.welcome_message_rules)===null||h===void 0?void 0:h.length){for(let A of $.welcome_message_rules)if(await this.deleteWelcomeDmRule(A.id),R)await this.deleteWelcomeDm(A.welcome_message_id)}return this.newWelcomeDmRule(f)}markDmAsRead(f,R){return this.post("direct_messages/mark_read.json",{last_read_event_id:f,recipient_id:R},{forceBodyMode:"url"})}indicateDmTyping(f){return this.post("direct_messages/indicate_typing.json",{recipient_id:f},{forceBodyMode:"url"})}async downloadDmImage(f){if(typeof f!=="string"){let h=f[zR.Create].message_data.attachment;if(!h)throw new Error("The given direct message doesn't contain any attachment");f=h.media.media_url_https}let R=await this.get(f,void 0,{forceParseMode:"buffer",prefix:""});if(!R.length)throw new Error("Image not found. Make sure you are logged with credentials able to access direct messages, and check the URL.");return R}}var i$=YY;class _{constructor(f){this.result=f}get tweets(){return _.tweets(this.result)}static tweets(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.tweets)!==null&&h!==void 0?h:[]}tweetById(f){return _.tweetById(this.result,f)}static tweetById(f,R){return this.tweets(f).find((h)=>h.id===R)}retweet(f){return _.retweet(this.result,f)}static retweet(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((A)=>A.type==="retweeted").map((A)=>A.id);return this.tweets(f).find((A)=>$.includes(A.id))}quote(f){return _.quote(this.result,f)}static quote(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((A)=>A.type==="quoted").map((A)=>A.id);return this.tweets(f).find((A)=>$.includes(A.id))}repliedTo(f){return _.repliedTo(this.result,f)}static repliedTo(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((A)=>A.type==="replied_to").map((A)=>A.id);return this.tweets(f).find((A)=>$.includes(A.id))}author(f){return _.author(this.result,f)}static author(f,R){let h=R.author_id;return h?this.users(f).find(($)=>$.id===h):void 0}repliedToAuthor(f){return _.repliedToAuthor(this.result,f)}static repliedToAuthor(f,R){let h=R.in_reply_to_user_id;return h?this.users(f).find(($)=>$.id===h):void 0}get users(){return _.users(this.result)}static users(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.users)!==null&&h!==void 0?h:[]}userById(f){return _.userById(this.result,f)}static userById(f,R){return this.users(f).find((h)=>h.id===R)}pinnedTweet(f){return _.pinnedTweet(this.result,f)}static pinnedTweet(f,R){return R.pinned_tweet_id?this.tweets(f).find((h)=>h.id===R.pinned_tweet_id):void 0}get media(){return _.media(this.result)}static media(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.media)!==null&&h!==void 0?h:[]}medias(f){return _.medias(this.result,f)}static medias(f,R){var h,$;let A=($=(h=R.attachments)===null||h===void 0?void 0:h.media_keys)!==null&&$!==void 0?$:[];return this.media(f).filter((G)=>A.includes(G.media_key))}get polls(){return _.polls(this.result)}static polls(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.polls)!==null&&h!==void 0?h:[]}poll(f){return _.poll(this.result,f)}static poll(f,R){var h,$;let A=($=(h=R.attachments)===null||h===void 0?void 0:h.poll_ids)!==null&&$!==void 0?$:[];if(A.length){let G=A[0];return this.polls(f).find((H)=>H.id===G)}return}get places(){return _.places(this.result)}static places(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.places)!==null&&h!==void 0?h:[]}place(f){return _.place(this.result,f)}static place(f,R){var h;let $=(h=R.geo)===null||h===void 0?void 0:h.place_id;return $?this.places(f).find((A)=>A.id===$):void 0}listOwner(f){return _.listOwner(this.result,f)}static listOwner(f,R){let h=R.owner_id;return h?this.users(f).find(($)=>$.id===h):void 0}spaceCreator(f){return _.spaceCreator(this.result,f)}static spaceCreator(f,R){let h=R.creator_id;return h?this.users(f).find(($)=>$.id===h):void 0}spaceHosts(f){return _.spaceHosts(this.result,f)}static spaceHosts(f,R){var h;let $=(h=R.host_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((A)=>$.includes(A.id))}spaceSpeakers(f){return _.spaceSpeakers(this.result,f)}static spaceSpeakers(f,R){var h;let $=(h=R.speaker_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((A)=>$.includes(A.id))}spaceInvitedUsers(f){return _.spaceInvitedUsers(this.result,f)}static spaceInvitedUsers(f,R){var h;let $=(h=R.invited_user_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((A)=>$.includes(A.id))}}class p$ extends fH{updateIncludes(f){if(f.errors){if(!this._realData.errors)this._realData.errors=[];this._realData.errors=[...this._realData.errors,...f.errors]}if(!f.includes)return;if(!this._realData.includes)this._realData.includes={};let R=this._realData.includes;for(let[h,$]of Object.entries(f.includes)){if(!R[h])R[h]=[];R[h]=[...R[h],...$]}}assertUsable(){if(this.unusable)throw new Error("Unable to use this paginator to fetch more data, as it does not contain any metadata. Check .errors property for more details.")}get meta(){return this._realData.meta}get includes(){var f;if(!((f=this._realData)===null||f===void 0?void 0:f.includes))return new _(this._realData);if(this._includesInstance)return this._includesInstance;return this._includesInstance=new _(this._realData)}get errors(){var f;return(f=this._realData.errors)!==null&&f!==void 0?f:[]}get unusable(){return this.errors.length>0&&!this._realData.meta&&!this._realData.data}}class pf extends p${refreshInstanceFromResult(f,R){var h;let $=f.data,A=(h=$.data)!==null&&h!==void 0?h:[];if(this._rateLimit=f.rateLimit,!this._realData.data)this._realData.data=[];if(R)this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.next_token=$.meta.next_token,this._realData.data.push(...A);else this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.previous_token=$.meta.previous_token,this._realData.data.unshift(...A);this.updateIncludes($)}getNextQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),pagination_token:this._realData.meta.next_token}}getPreviousQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),pagination_token:this._realData.meta.previous_token}}getPageLengthFromRequest(f){var R,h;return(h=(R=f.data.data)===null||R===void 0?void 0:R.length)!==null&&h!==void 0?h:0}isFetchLastOver(f){var R;return!((R=f.data.data)===null||R===void 0?void 0:R.length)||!this.canFetchNextPage(f.data)}canFetchNextPage(f){var R;return!!((R=f.meta)===null||R===void 0?void 0:R.next_token)}}class jH extends p${refreshInstanceFromResult(f,R){var h;let $=f.data,A=(h=$.data)!==null&&h!==void 0?h:[];if(this._rateLimit=f.rateLimit,!this._realData.data)this._realData.data=[];if(R)this._realData.meta.oldest_id=$.meta.oldest_id,this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.next_token=$.meta.next_token,this._realData.data.push(...A);else this._realData.meta.newest_id=$.meta.newest_id,this._realData.meta.result_count+=$.meta.result_count,this._realData.data.unshift(...A);this.updateIncludes($)}getNextQueryParams(f){this.assertUsable();let R={...this.injectQueryParams(f)};if(this._realData.meta.next_token)R.next_token=this._realData.meta.next_token;else{if(R.start_time)R.since_id=this.dateStringToSnowflakeId(R.start_time),delete R.start_time;if(R.end_time)delete R.end_time;R.until_id=this._realData.meta.oldest_id}return R}getPreviousQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),since_id:this._realData.meta.newest_id}}getPageLengthFromRequest(f){var R,h;return(h=(R=f.data.data)===null||R===void 0?void 0:R.length)!==null&&h!==void 0?h:0}isFetchLastOver(f){var R;return!((R=f.data.data)===null||R===void 0?void 0:R.length)||!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!!f.meta.next_token}getItemArray(){return this.tweets}dateStringToSnowflakeId(f){let R=BigInt("1288834974657"),h=new Date(f);if(isNaN(h.valueOf()))throw new Error("Unable to convert start_time/end_time to a valid date. A ISO 8601 DateTime is excepted, please check your input.");return(BigInt(h.valueOf())-R<<BigInt("22")).toString()}get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class B0 extends pf{refreshInstanceFromResult(f,R){super.refreshInstanceFromResult(f,R);let h=f.data;if(R)this._realData.meta.oldest_id=h.meta.oldest_id;else this._realData.meta.newest_id=h.meta.newest_id}getItemArray(){return this.tweets}get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class OH extends jH{constructor(){super(...arguments);this._endpoint="tweets/search/recent"}}class EH extends jH{constructor(){super(...arguments);this._endpoint="tweets/search/all"}}class VH extends B0{constructor(){super(...arguments);this._endpoint="tweets/:id/quote_tweets"}}class TH extends B0{constructor(){super(...arguments);this._endpoint="users/:id/timelines/reverse_chronological"}}class gH extends B0{constructor(){super(...arguments);this._endpoint="users/:id/tweets"}}class CH extends B0{constructor(){super(...arguments);this._endpoint="users/:id/mentions"}}class mH extends B0{constructor(){super(...arguments);this._endpoint="users/:id/bookmarks"}}class cH extends pf{get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}getItemArray(){return this.tweets}}class bH extends cH{constructor(){super(...arguments);this._endpoint="users/:id/liked_tweets"}}class xH extends cH{constructor(){super(...arguments);this._endpoint="lists/:id/tweets"}}class tf extends pf{getItemArray(){return this.users}get users(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class kH extends tf{constructor(){super(...arguments);this._endpoint="users/:id/blocking"}}class sH extends tf{constructor(){super(...arguments);this._endpoint="users/:id/muting"}}class lH extends tf{constructor(){super(...arguments);this._endpoint="users/:id/followers"}}class _H extends tf{constructor(){super(...arguments);this._endpoint="users/:id/following"}}class dH extends tf{constructor(){super(...arguments);this._endpoint="lists/:id/members"}}class aH extends tf{constructor(){super(...arguments);this._endpoint="lists/:id/followers"}}class rH extends tf{constructor(){super(...arguments);this._endpoint="tweets/:id/liking_users"}}class iH extends tf{constructor(){super(...arguments);this._endpoint="tweets/:id/retweeted_by"}}class o$ extends pf{getItemArray(){return this.lists}get lists(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class pH extends o${constructor(){super(...arguments);this._endpoint="users/:id/owned_lists"}}class oH extends o${constructor(){super(...arguments);this._endpoint="users/:id/list_memberships"}}class nH extends o${constructor(){super(...arguments);this._endpoint="users/:id/followed_lists"}}class K0 extends Tf{constructor(){super(...arguments);this._prefix=X0}}class n$ extends pf{getItemArray(){return this.events}get events(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class eH extends n${constructor(){super(...arguments);this._endpoint="dm_events"}}class uH extends n${constructor(){super(...arguments);this._endpoint="dm_conversations/with/:participant_id/dm_events"}}class tH extends n${constructor(){super(...arguments);this._endpoint="dm_conversations/:dm_conversation_id/dm_events"}}class v0 extends Tf{constructor(){super(...arguments);this._prefix=JR}get labs(){if(this._labs)return this._labs;return this._labs=new K0(this)}async search(f,R={}){let h=typeof f==="string"?{...R,query:f}:{...f},$=await this.get("tweets/search/recent",h,{fullResponse:!0});return new OH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async searchAll(f,R={}){let h={...R,query:f},$=await this.get("tweets/search/all",h,{fullResponse:!0});return new EH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}singleTweet(f,R={}){return this.get("tweets/:id",R,{params:{id:f}})}tweets(f,R={}){return this.get("tweets",{ids:f,...R})}tweetCountRecent(f,R={}){return this.get("tweets/counts/recent",{query:f,...R})}tweetCountAll(f,R={}){return this.get("tweets/counts/all",{query:f,...R})}async tweetRetweetedBy(f,R={}){let{asPaginator:h,...$}=R,A=await this.get("tweets/:id/retweeted_by",$,{fullResponse:!0,params:{id:f}});if(!h)return A.data;return new iH({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:$,sharedParams:{id:f}})}async tweetLikedBy(f,R={}){let{asPaginator:h,...$}=R,A=await this.get("tweets/:id/liking_users",$,{fullResponse:!0,params:{id:f}});if(!h)return A.data;return new rH({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:$,sharedParams:{id:f}})}async homeTimeline(f={}){let R=await this.getCurrentUserV2Object(),h=await this.get("users/:id/timelines/reverse_chronological",f,{fullResponse:!0,params:{id:R.data.id}});return new TH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:f,sharedParams:{id:R.data.id}})}async userTimeline(f,R={}){let h=await this.get("users/:id/tweets",R,{fullResponse:!0,params:{id:f}});return new gH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async userMentionTimeline(f,R={}){let h=await this.get("users/:id/mentions",R,{fullResponse:!0,params:{id:f}});return new CH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async quotes(f,R={}){let h=await this.get("tweets/:id/quote_tweets",R,{fullResponse:!0,params:{id:f}});return new VH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async bookmarks(f={}){let R=await this.getCurrentUserV2Object(),h=await this.get("users/:id/bookmarks",f,{fullResponse:!0,params:{id:R.data.id}});return new mH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:f,sharedParams:{id:R.data.id}})}me(f={}){return this.get("users/me",f)}user(f,R={}){return this.get("users/:id",R,{params:{id:f}})}users(f,R={}){let h=Array.isArray(f)?f.join(","):f;return this.get("users",{...R,ids:h})}userByUsername(f,R={}){return this.get("users/by/username/:username",R,{params:{username:f}})}usersByUsernames(f,R={}){return f=Array.isArray(f)?f.join(","):f,this.get("users/by",{...R,usernames:f})}async followers(f,R={}){let{asPaginator:h,...$}=R,A={id:f};if(!h)return this.get("users/:id/followers",$,{params:A});let G=await this.get("users/:id/followers",$,{fullResponse:!0,params:A});return new lH({realData:G.data,rateLimit:G.rateLimit,instance:this,queryParams:$,sharedParams:A})}async following(f,R={}){let{asPaginator:h,...$}=R,A={id:f};if(!h)return this.get("users/:id/following",$,{params:A});let G=await this.get("users/:id/following",$,{fullResponse:!0,params:A});return new _H({realData:G.data,rateLimit:G.rateLimit,instance:this,queryParams:$,sharedParams:A})}async userLikedTweets(f,R={}){let h={id:f},$=await this.get("users/:id/liked_tweets",R,{fullResponse:!0,params:h});return new bH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async userBlockingUsers(f,R={}){let h={id:f},$=await this.get("users/:id/blocking",R,{fullResponse:!0,params:h});return new kH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async userMutingUsers(f,R={}){let h={id:f},$=await this.get("users/:id/muting",R,{fullResponse:!0,params:h});return new sH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}list(f,R={}){return this.get("lists/:id",R,{params:{id:f}})}async listsOwned(f,R={}){let h={id:f},$=await this.get("users/:id/owned_lists",R,{fullResponse:!0,params:h});return new pH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listMemberships(f,R={}){let h={id:f},$=await this.get("users/:id/list_memberships",R,{fullResponse:!0,params:h});return new oH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listFollowed(f,R={}){let h={id:f},$=await this.get("users/:id/followed_lists",R,{fullResponse:!0,params:h});return new nH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listTweets(f,R={}){let h={id:f},$=await this.get("lists/:id/tweets",R,{fullResponse:!0,params:h});return new xH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listMembers(f,R={}){let h={id:f},$=await this.get("lists/:id/members",R,{fullResponse:!0,params:h});return new dH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listFollowers(f,R={}){let h={id:f},$=await this.get("lists/:id/followers",R,{fullResponse:!0,params:h});return new aH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listDmEvents(f={}){let R=await this.get("dm_events",f,{fullResponse:!0});return new eH({realData:R.data,rateLimit:R.rateLimit,instance:this,queryParams:{...f}})}async listDmEventsWithParticipant(f,R={}){let h={participant_id:f},$=await this.get("dm_conversations/with/:participant_id/dm_events",R,{fullResponse:!0,params:h});return new uH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listDmEventsOfConversation(f,R={}){let h={dm_conversation_id:f},$=await this.get("dm_conversations/:dm_conversation_id/dm_events",R,{fullResponse:!0,params:h});return new tH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}space(f,R={}){return this.get("spaces/:id",R,{params:{id:f}})}spaces(f,R={}){return this.get("spaces",{ids:f,...R})}spacesByCreators(f,R={}){return this.get("spaces/by/creator_ids",{user_ids:f,...R})}searchSpaces(f){return this.get("spaces/search",f)}spaceBuyers(f,R={}){return this.get("spaces/:id/buyers",R,{params:{id:f}})}spaceTweets(f,R={}){return this.get("spaces/:id/tweets",R,{params:{id:f}})}searchStream({autoConnect:f,...R}={}){return this.getStream("tweets/search/stream",R,{payloadIsError:k$,autoConnect:f})}streamRules(f={}){return this.get("tweets/search/stream/rules",f)}updateStreamRules(f,R={}){return this.post("tweets/search/stream/rules",f,{query:R})}sampleStream({autoConnect:f,...R}={}){return this.getStream("tweets/sample/stream",R,{payloadIsError:k$,autoConnect:f})}sample10Stream({autoConnect:f,...R}={}){return this.getStream("tweets/sample10/stream",R,{payloadIsError:k$,autoConnect:f})}complianceJobs(f){return this.get("compliance/jobs",f)}complianceJob(f){return this.get("compliance/jobs/:id",void 0,{params:{id:f}})}async sendComplianceJob(f){let R=await this.post("compliance/jobs",{type:f.type,name:f.name}),h=f.ids instanceof Buffer?f.ids:Buffer.from(f.ids.join(`
82
+ `)})}function qG(f,R){if(!R)return f;let h=typeof R[0]==="string"?R[0]:"[",$=typeof R[1]==="string"?R[1]:"]";return h+f+$}function BW(f,R,h,$,A){let G=typeof R==="function"?R(f,$,A):f;return G[0]==="/"&&h?y5(h,"/")+G:G}function GJ(f,R,h,$){let A=f.attribs||{},G=A.alt?A.alt:"",H=!A.src?"":BW(A.src,$.pathRewrite,$.baseUrl,h.metadata,f),N=!H?G:!G?qG(H,$.linkBrackets):G+" "+qG(H,$.linkBrackets);h.addInline(N,{noWordTransform:!0})}function HJ(f,R,h,$){function A(){if($.ignoreHref)return"";if(!f.attribs||!f.attribs.href)return"";let H=f.attribs.href.replace(/^mailto:/,"");if($.noAnchorUrl&&H[0]==="#")return"";return H=BW(H,$.pathRewrite,$.baseUrl,h.metadata,f),H}let G=A();if(!G)R(f.children,h);else{let H="";if(h.pushWordTransform((U)=>{if(U)H+=U;return U}),R(f.children,h),h.popWordTransform(),!($.hideLinkHrefIfSameAsText&&G===H))h.addInline(!H?G:" "+qG(G,$.linkBrackets),{noWordTransform:!0})}}function KW(f,R,h,$,A){let G=D0(f,["parent","name"])==="li",H=0,N=(f.children||[]).filter((U)=>U.type!=="text"||!/^\s*$/.test(U.data)).map(function(U){if(U.name!=="li")return{node:U,prefix:""};let F=G?A().trimStart():A();if(F.length>H)H=F.length;return{node:U,prefix:F}});if(!N.length)return;h.openList({interRowLineBreaks:1,leadingLineBreaks:G?1:$.leadingLineBreaks||2,maxPrefixLength:H,prefixAlign:"left"});for(let{node:U,prefix:F}of N)h.openListItem({prefix:F}),R([U],h),h.closeListItem();h.closeList({trailingLineBreaks:G?1:$.trailingLineBreaks||2})}function NJ(f,R,h,$){let A=$.itemPrefix||" * ";return KW(f,R,h,$,()=>A)}function UJ(f,R,h,$){let A=Number(f.attribs.start||"1"),G=FJ(f.attribs.type);return KW(f,R,h,$,()=>" "+G(A++)+". ")}function FJ(f="1"){switch(f){case"a":return(R)=>DW(R,"a");case"A":return(R)=>DW(R,"A");case"i":return(R)=>MW(R).toLowerCase();case"I":return(R)=>MW(R);case"1":default:return(R)=>R.toString()}}function WJ(f){let R=[],h=[];for(let $ of f)if($.startsWith("."))R.push($.substring(1));else if($.startsWith("#"))h.push($.substring(1));return{classes:R,ids:h}}function SJ(f,R){if(R===!0)return!0;if(!f)return!1;let{classes:h,ids:$}=WJ(R),A=(f.class||"").split(" "),G=(f.id||"").split(" ");return A.some((H)=>h.includes(H))||G.some((H)=>$.includes(H))}function YJ(f,R,h,$){return SJ(f.attribs,h.options.tables)?vW(f,R,h,$):DJ(f,R,h,$)}function DJ(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks})}function vW(f,R,h,$){h.openTable(),f.children.forEach(G),h.closeTable({tableToString:(H)=>e5(H,$.rowSpacing??0,$.colSpacing??3),leadingLineBreaks:$.leadingLineBreaks,trailingLineBreaks:$.trailingLineBreaks});function A(H){let N=+D0(H,["attribs","colspan"])||1,U=+D0(H,["attribs","rowspan"])||1;h.openTableCell({maxColumnWidth:$.maxColumnWidth}),R(H.children,h),h.closeTableCell({colspan:N,rowspan:U})}function G(H){if(H.type!=="tag")return;let N=$.uppercaseHeaderCells!==!1?(U)=>{h.pushWordTransform((F)=>F.toUpperCase()),A(U),h.popWordTransform()}:A;switch(H.name){case"thead":case"tbody":case"tfoot":case"center":H.children.forEach(G);return;case"tr":{h.openTableRow();for(let U of H.children){if(U.type!=="tag")continue;switch(U.name){case"th":{N(U);break}case"td":{A(U);break}}}h.closeTableRow();break}}}}var ZJ=Object.freeze({__proto__:null,anchor:HJ,blockquote:AJ,dataTable:vW,heading:$J,horizontalLine:fJ,image:GJ,lineBreak:u5,orderedList:UJ,paragraph:RJ,pre:hJ,table:YJ,unorderedList:NJ,wbr:t5}),MJ={baseElements:{selectors:["body"],orderBy:"selectors",returnDomByDefault:!0},decodeEntities:!0,encodeCharacters:{},formatters:{},limits:{ellipsis:"...",maxBaseElements:void 0,maxChildNodes:void 0,maxDepth:void 0,maxInputLength:16777216},longWordSplit:{forceWrapOnLimit:!1,wrapCharacters:[]},preserveNewlines:!1,selectors:[{selector:"*",format:"inline"},{selector:"a",format:"anchor",options:{baseUrl:null,hideLinkHrefIfSameAsText:!1,ignoreHref:!1,linkBrackets:["[","]"],noAnchorUrl:!0}},{selector:"article",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"aside",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"blockquote",format:"blockquote",options:{leadingLineBreaks:2,trailingLineBreaks:2,trimEmptyLines:!0}},{selector:"br",format:"lineBreak"},{selector:"div",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"footer",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"form",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"h1",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h2",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h3",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h4",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h5",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h6",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"header",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"hr",format:"horizontalLine",options:{leadingLineBreaks:2,length:void 0,trailingLineBreaks:2}},{selector:"img",format:"image",options:{baseUrl:null,linkBrackets:["[","]"]}},{selector:"main",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"nav",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"ol",format:"orderedList",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"p",format:"paragraph",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"pre",format:"pre",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"section",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"table",options:{colSpacing:3,leadingLineBreaks:2,maxColumnWidth:60,rowSpacing:0,trailingLineBreaks:2,uppercaseHeaderCells:!0}},{selector:"ul",format:"unorderedList",options:{itemPrefix:" * ",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"wbr",format:"wbr"}],tables:[],whitespaceCharacters:` \r
83
+ \f\u200B`,wordwrap:80},JJ=(f,R,h)=>[...f,...R],yW=(f,R,h)=>[...R],XJ=(f,R,h)=>f.some(($)=>typeof $==="object")?JJ(f,R):yW(f,R);function zJ(f={}){return f=BG.default(MJ,f,{arrayMerge:yW,customMerge:(R)=>R==="selectors"?XJ:void 0}),f.formatters=Object.assign({},i5,ZJ,f.formatters),f.selectors=zW(f.selectors,(R)=>R.selector),QJ(f),V5(f)}function yG(f,R={},h=void 0){return zJ(R)(f,h)}function QJ(f){if(f.tags){let h=Object.entries(f.tags).map(([$,A])=>({...A,selector:$||"*"}));f.selectors.push(...h),f.selectors=zW(f.selectors,($)=>$.selector)}function R(h,$,A){let G=$.pop();for(let H of $){let N=h[H];if(!N)N={},h[H]=N;h=N}h[G]=A}if(f.baseElement){let h=f.baseElement;R(f,["baseElements","selectors"],Array.isArray(h)?h:[h])}if(f.returnDomByDefault!==void 0)R(f,["baseElements","returnDomByDefault"],f.returnDomByDefault);for(let h of f.selectors)if(h.format==="anchor"&&D0(h,["options","noLinkBrackets"]))R(h,["options","linkBrackets"],!1)}var mS=v(ES(),1);import{Writable as yz}from"stream";var{defineProperty:Lz,getOwnPropertySymbols:VS}=Object,Iz=Object.prototype.hasOwnProperty,Pz=Object.prototype.propertyIsEnumerable,TS=(f,R,h)=>(R in f)?Lz(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,eG=(f,R)=>{for(var h in R||(R={}))if(Iz.call(R,h))TS(f,h,R[h]);if(VS){for(var h of VS(R))if(Pz.call(R,h))TS(f,h,R[h])}return f},uG=(f,R,h)=>{return new Promise(($,A)=>{var G=(U)=>{try{N(h.next(U))}catch(F){A(F)}},H=(U)=>{try{N(h.throw(U))}catch(F){A(F)}},N=(U)=>U.done?$(U.value):Promise.resolve(U.value).then(G,H);N((h=h.apply(f,R)).next())})},Bz={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:`
84
+ `},Kz=(f,R={})=>{return mS.default.html(f,eG(eG({},Bz),R))},vz=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var gS=new TextDecoder("utf-8"),CS=(f)=>uG(void 0,null,function*(){let R="";if("pipeTo"in f){let h=new WritableStream({write($){R+=gS.decode($)}});yield f.pipeTo(h)}else{let h=new yz({write($,A,G){R+=gS.decode($),G()}});return f.pipe(h),new Promise(($,A)=>{h.on("error",A),h.on("close",()=>{$(R)})})}return R}),V$=(f,R)=>uG(void 0,null,function*(){let{default:h}=yield import("react-dom/server"),$;if(Object.hasOwn(h,"renderToReadableStream"))$=yield CS(yield h.renderToReadableStream(f));else yield new Promise((H,N)=>{let U=h.renderToPipeableStream(f,{onAllReady(){return uG(this,null,function*(){$=yield CS(U),H()})},onError(F){N(F)}})});if(R==null?void 0:R.plainText)return yG($,eG({selectors:vz},R.htmlToTextOptions));let G=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${$.replace(/<!DOCTYPE.*?>/,"")}`;if(R==null?void 0:R.pretty)return Kz(G);return G});var{defineProperty:jz,defineProperties:Oz,getOwnPropertyDescriptors:Ez,getOwnPropertySymbols:cS}=Object,Vz=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,bS=(f,R,h)=>(R in f)?jz(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,Bh=(f,R)=>{for(var h in R||(R={}))if(Vz.call(R,h))bS(f,h,R[h]);if(cS){for(var h of cS(R))if(Tz.call(R,h))bS(f,h,R[h])}return f},gz=(f,R)=>Oz(f,Ez(R)),C=(f,R,h)=>{return new Promise(($,A)=>{var G=(U)=>{try{N(h.next(U))}catch(F){A(F)}},H=(U)=>{try{N(h.throw(U))}catch(F){A(F)}},N=(U)=>U.done?$(U.value):Promise.resolve(U.value).then(G,H);N((h=h.apply(f,R)).next())})},Cz="3.5.0",mz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post("/api-keys",R,h)})}list(){return C(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/api-keys/${f}`)})}},cz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post("/audiences",R,h)})}list(){return C(this,null,function*(){return yield this.resend.get("/audiences")})}get(f){return C(this,null,function*(){return yield this.resend.get(`/audiences/${f}`)})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/audiences/${f}`)})}},bz=class{constructor(f){this.resend=f}send(f){return C(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return C(this,arguments,function*(R,h={}){for(let A of R)if(A.react)A.html=yield V$(A.react),delete A.react;return yield this.resend.post("/emails/batch",R,h)})}},xz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post(`/audiences/${R.audienceId}/contacts`,{unsubscribed:R.unsubscribed,email:R.email,first_name:R.firstName,last_name:R.lastName},h)})}list(f){return C(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts`)})}get(f){return C(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts/${f.id}`)})}update(f){return C(this,null,function*(){return yield this.resend.patch(`/audiences/${f.audienceId}/contacts/${f.id}`,{unsubscribed:f.unsubscribed,first_name:f.firstName,last_name:f.lastName})})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/audiences/${f.audienceId}/contacts/${(f==null?void 0:f.email)?f==null?void 0:f.email:f==null?void 0:f.id}`)})}},kz=class{constructor(f){this.resend=f}create(f){return C(this,arguments,function*(R,h={}){return yield this.resend.post("/domains",R,h)})}list(){return C(this,null,function*(){return yield this.resend.get("/domains")})}get(f){return C(this,null,function*(){return yield this.resend.get(`/domains/${f}`)})}update(f){return C(this,null,function*(){return yield this.resend.patch(`/domains/${f.id}`,{click_tracking:f.clickTracking,open_tracking:f.openTracking,tls:f.tls})})}remove(f){return C(this,null,function*(){return yield this.resend.delete(`/domains/${f}`)})}verify(f){return C(this,null,function*(){return yield this.resend.post(`/domains/${f}/verify`)})}},sz=class{constructor(f){this.resend=f}send(f){return C(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return C(this,arguments,function*(R,h={}){if(R.react)R.html=yield V$(R.react),delete R.react;return yield this.resend.post("/emails",R,h)})}get(f){return C(this,null,function*(){return yield this.resend.get(`/emails/${f}`)})}},xS="https://api.resend.com",kS=`resend-node:${Cz}`,lz=typeof process!=="undefined"&&process.env?process.env.RESEND_BASE_URL||xS:xS,_z=typeof process!=="undefined"&&process.env?process.env.RESEND_USER_AGENT||kS:kS,sS=class{constructor(f){if(this.key=f,this.apiKeys=new mz(this),this.audiences=new cz(this),this.batch=new bz(this),this.contacts=new xz(this),this.domains=new kz(this),this.emails=new sz(this),!f){if(typeof process!=="undefined"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":_z,"Content-Type":"application/json"})}fetchRequest(f){return C(this,arguments,function*(R,h={}){try{let $=yield fetch(`${lz}${R}`,h);if(!$.ok)try{let G=yield $.text();return{data:null,error:JSON.parse(G)}}catch(G){if(G instanceof SyntaxError)return{data:null,error:{name:"application_error",message:"Internal server error. We are unable to process your request right now, please try again later."}};let H={message:$.statusText,name:"application_error"};if(G instanceof Error)return{data:null,error:gz(Bh({},H),{message:G.message})};return{data:null,error:H}}return{data:yield $.json(),error:null}}catch($){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(f,R){return C(this,arguments,function*(h,$,A={}){let G=Bh({method:"POST",headers:this.headers,body:JSON.stringify($)},A);return this.fetchRequest(h,G)})}get(f){return C(this,arguments,function*(R,h={}){let $=Bh({method:"GET",headers:this.headers},h);return this.fetchRequest(R,$)})}put(f,R){return C(this,arguments,function*(h,$,A={}){let G=Bh({method:"PUT",headers:this.headers,body:JSON.stringify($)},A);return this.fetchRequest(h,G)})}patch(f,R){return C(this,arguments,function*(h,$,A={}){let G=Bh({method:"PATCH",headers:this.headers,body:JSON.stringify($)},A);return this.fetchRequest(h,G)})}delete(f,R){return C(this,null,function*(){let h={method:"DELETE",headers:this.headers,body:JSON.stringify(R)};return this.fetchRequest(f,h)})}};class T${}class g$ extends T${apiKey;constructor(f=process.env.RESEND_API_KEY){super();this.apiKey=f}async send(f){let R=new sS(this.apiKey),{data:h,error:$}=await R.emails.send({...f});if($)return console.error($),!1;if(h)return!0;return!1}}class lS extends p{driver=new g$;headers={};boot(){}filterRecipients(f){return f}}class _S extends p{channels={};boot(){}}class dS extends p{root;rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class aS extends p{rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class rS extends p{maxFileSize=10485760;boot(){}onLogFileClosed(f){}onLogCreated(f){}}class iS extends p{jobs=[];concurrency=1;boot(){}}class oS{static name="unset";worker=!1;maxAttempts=3;run(...f){}onFail(f,...R){}onSuccess(f,...R){}onDeadletter(f,...R){}static dispatch(...f){if(this.name==="unset")throw new Error("Cannot dispatch a job with no name");pS.use().push(this,JSON.stringify(f))}}import dz from"sharp";class C${}class m$ extends C${async resize(f,R){let{height:h,width:$,quality:A,fit:G}=R;return await dz(f).resize($>0?$:void 0,h>0?h:void 0,{fit:G}).webp({quality:A>0?A:80,force:!0}).toBuffer()}}class nS extends p{driver=new m$;boot(){}}class M0{}var az={clientId:process.env.GOOGLE_CLIENT_ID,clientSecret:process.env.GOOGLE_CLIENT_SECRET,redirectPath:"/oauth/google/callback",scope:"https://www.googleapis.com/auth/userinfo.email"};class eS extends M0{config;constructor(f={}){super();this.config={...az,...f}}getRedirectUrl(){let f=this.config.scope,R=this.config.clientId,h=new URL("https://accounts.google.com/o/oauth2/v2/auth"),$={scope:f,include_granted_scopes:"true",response_type:"code",state:"state_parameter_passthrough_value",redirect_uri:`${process.env.HOST_NAME}/oauth/google/callback`,client_id:R};for(let[G,H]of Object.entries($))h.searchParams.append(G,H);let A=h.toString();return c$.to(A),A}async onCallback(f){let R=new URL("https://oauth2.googleapis.com/token");R.searchParams.append("code",f.search.get("code")),R.searchParams.append("client_id",this.config.clientId),R.searchParams.append("client_secret",this.config.clientSecret),R.searchParams.append("grant_type","authorization_code"),R.searchParams.append("redirect_uri",`${process.env.HOST_NAME}${this.config.redirectPath}`);let h=await fetch(R.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}),{access_token:$}=await h.json(),G=await(await fetch(`https://www.googleapis.com/oauth2/v3/userinfo?access_token=${$}`)).json();return{name:G.name,email:G.email}}}var MR="https://api.x.com/2/",J0="https://api.x.com/labs/2/",JR="https://api.x.com/1.1/",uf="https://upload.x.com/1.1/",uS="https://stream.x.com/1.1/",X0="https://ads-api.x.com/12/",z0="https://ads-api-sandbox.twitter.com/12/";class tG{constructor({realData:f,rateLimit:R,instance:h,queryParams:$,sharedParams:A}){this._maxResultsWhenFetchLast=100,this._realData=f,this._rateLimit=R,this._instance=h,this._queryParams=$,this._sharedParams=A}get _isRateLimitOk(){if(!this._rateLimit)return!0;if(this._rateLimit.reset*1000<Date.now())return!0;return this._rateLimit.remaining>0}makeRequest(f){return this._instance.get(this.getEndpoint(),f,{fullResponse:!0,params:this._sharedParams})}makeNewInstanceFromResult(f,R){return new this.constructor({realData:f.data,rateLimit:f.rateLimit,instance:this._instance,queryParams:R,sharedParams:this._sharedParams})}getEndpoint(){return this._endpoint}injectQueryParams(f){return{...f?{max_results:f}:{},...this._queryParams}}async next(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchNext(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!0),this}async fetchLast(f=1/0){let R=this.getNextQueryParams(this._maxResultsWhenFetchLast),h=0;while(h<f&&this._isRateLimitOk){let $=await this.makeRequest(R);if(await this.refreshInstanceFromResult($,!0),h+=this.getPageLengthFromRequest($),this.isFetchLastOver($))break;R=this.getNextQueryParams(this._maxResultsWhenFetchLast)}return this}get rateLimit(){var f;return{...(f=this._rateLimit)!==null&&f!==void 0?f:{}}}get data(){return this._realData}get done(){return!this.canFetchNextPage(this._realData)}*[Symbol.iterator](){yield*this.getItemArray()}async*[Symbol.asyncIterator](){yield*this.getItemArray();let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData),yield*h.getItemArray(),f=h}}async*fetchAndIterate(){for(let h of this.getItemArray())yield[h,this];let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData);for(let $ of h.getItemArray())yield[$,h];this._rateLimit=h._rateLimit,f=h}}}class fH extends tG{async previous(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchPrevious(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!1),this}}var Q0=tG;class Uf extends Q0{getNextQueryParams(f){var R;return{...this._queryParams,cursor:(R=this._realData.next_cursor_str)!==null&&R!==void 0?R:this._realData.next_cursor,...f?{count:f}:{}}}isFetchLastOver(f){return!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!this.isNextCursorInvalid(f.next_cursor)||!this.isNextCursorInvalid(f.next_cursor_str)}isNextCursorInvalid(f){return f===void 0||f===0||f===-1||f==="0"||f==="-1"}}class RH extends Uf{constructor(){super(...arguments);this._endpoint="direct_messages/events/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.events.push(...h.events),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.events.length}getItemArray(){return this.events}get events(){return this._realData.events}}class hH extends Uf{constructor(){super(...arguments);this._endpoint="direct_messages/welcome_messages/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.welcome_messages.push(...h.welcome_messages),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.welcome_messages.length}getItemArray(){return this.welcomeMessages}get welcomeMessages(){return this._realData.welcome_messages}}var d;(function(f){f.Jpeg="image/jpeg",f.Mp4="video/mp4",f.Mov="video/quicktime",f.Gif="image/gif",f.Png="image/png",f.Srt="text/plain",f.Webp="image/webp"})(d||(d={}));var XR;(function(f){f.Create="message_create",f.WelcomeCreate="welcome_message"})(XR||(XR={}));var Kh;(function(f){f.Request="request",f.PartialResponse="partial-response",f.Response="response"})(Kh||(Kh={}));class b$ extends Error{constructor(){super(...arguments);this.error=!0}}class vh extends b${constructor(f,R){super(f);this.type=Kh.Request,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get requestError(){return this._options.requestError}toJSON(){return{type:this.type,error:this.requestError}}}class yh extends b${constructor(f,R){super(f);this.type=Kh.PartialResponse,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get response(){return this._options.response}get responseError(){return this._options.responseError}get rawContent(){return this._options.rawContent}toJSON(){return{type:this.type,error:this.responseError}}}class jh extends b${constructor(f,R){super(f);if(this.type=Kh.Response,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R}),this.code=R.code,this.headers=R.headers,this.rateLimit=R.rateLimit,R.data&&typeof R.data==="object"&&"error"in R.data&&!R.data.errors){let h={...R.data};h.errors=[{code:kR.InternalError,message:h.error}],this.data=h}else this.data=R.data}get request(){return this._options.request}get response(){return this._options.response}hasErrorCode(...f){let R=this.errors;if(!(R===null||R===void 0?void 0:R.length))return!1;if("code"in R[0])return R.some((A)=>f.includes(A.code));let h=this.data;return f.includes(h.type)}get errors(){var f;return(f=this.data)===null||f===void 0?void 0:f.errors}get rateLimitError(){return this.code===420||this.code===429}get isAuthError(){if(this.code===401)return!0;return this.hasErrorCode(kR.AuthTimestampInvalid,kR.AuthenticationFail,kR.BadAuthenticationData,kR.InvalidOrExpiredToken)}toJSON(){return{type:this.type,code:this.code,error:this.data,rateLimit:this.rateLimit,headers:this.headers}}}var kR;(function(f){f[f.InvalidCoordinates=3]="InvalidCoordinates",f[f.NoLocationFound=13]="NoLocationFound",f[f.AuthenticationFail=32]="AuthenticationFail",f[f.InvalidOrExpiredToken=89]="InvalidOrExpiredToken",f[f.UnableToVerifyCredentials=99]="UnableToVerifyCredentials",f[f.AuthTimestampInvalid=135]="AuthTimestampInvalid",f[f.BadAuthenticationData=215]="BadAuthenticationData",f[f.NoUserMatch=17]="NoUserMatch",f[f.UserNotFound=50]="UserNotFound",f[f.ResourceNotFound=34]="ResourceNotFound",f[f.TweetNotFound=144]="TweetNotFound",f[f.TweetNotVisible=179]="TweetNotVisible",f[f.NotAllowedResource=220]="NotAllowedResource",f[f.MediaIdNotFound=325]="MediaIdNotFound",f[f.TweetNoLongerAvailable=421]="TweetNoLongerAvailable",f[f.TweetViolatedRules=422]="TweetViolatedRules",f[f.TargetUserSuspended=63]="TargetUserSuspended",f[f.YouAreSuspended=64]="YouAreSuspended",f[f.AccountUpdateFailed=120]="AccountUpdateFailed",f[f.NoSelfSpamReport=36]="NoSelfSpamReport",f[f.NoSelfMute=271]="NoSelfMute",f[f.AccountLocked=326]="AccountLocked",f[f.RateLimitExceeded=88]="RateLimitExceeded",f[f.NoDMRightForApp=93]="NoDMRightForApp",f[f.OverCapacity=130]="OverCapacity",f[f.InternalError=131]="InternalError",f[f.TooManyFollowings=161]="TooManyFollowings",f[f.TweetLimitExceeded=185]="TweetLimitExceeded",f[f.DuplicatedTweet=187]="DuplicatedTweet",f[f.TooManySpamReports=205]="TooManySpamReports",f[f.RequestLooksLikeSpam=226]="RequestLooksLikeSpam",f[f.NoWriteRightForApp=261]="NoWriteRightForApp",f[f.TweetActionsDisabled=425]="TweetActionsDisabled",f[f.TweetRepliesRestricted=433]="TweetRepliesRestricted",f[f.NamedParameterMissing=38]="NamedParameterMissing",f[f.InvalidAttachmentUrl=44]="InvalidAttachmentUrl",f[f.TweetTextTooLong=186]="TweetTextTooLong",f[f.MissingUrlParameter=195]="MissingUrlParameter",f[f.NoMultipleGifs=323]="NoMultipleGifs",f[f.InvalidMediaIds=324]="InvalidMediaIds",f[f.InvalidUrl=407]="InvalidUrl",f[f.TooManyTweetAttachments=386]="TooManyTweetAttachments",f[f.StatusAlreadyFavorited=139]="StatusAlreadyFavorited",f[f.FollowRequestAlreadySent=160]="FollowRequestAlreadySent",f[f.CannotUnmuteANonMutedAccount=272]="CannotUnmuteANonMutedAccount",f[f.TweetAlreadyRetweeted=327]="TweetAlreadyRetweeted",f[f.ReplyToDeletedTweet=385]="ReplyToDeletedTweet",f[f.DMReceiverNotFollowingYou=150]="DMReceiverNotFollowingYou",f[f.UnableToSendDM=151]="UnableToSendDM",f[f.MustAllowDMFromAnyone=214]="MustAllowDMFromAnyone",f[f.CannotSendDMToThisUser=349]="CannotSendDMToThisUser",f[f.DMTextTooLong=354]="DMTextTooLong",f[f.SubscriptionAlreadyExists=355]="SubscriptionAlreadyExists",f[f.CallbackUrlNotApproved=415]="CallbackUrlNotApproved",f[f.SuspendedApplication=416]="SuspendedApplication",f[f.OobOauthIsNotAllowed=417]="OobOauthIsNotAllowed"})(kR||(kR={}));var tS;(function(f){f.InvalidRequest="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-request",f.ClientForbidden="https://developer.x.com/en/support/x-api/error-troubleshooting#client-forbidden",f.UnsupportedAuthentication="https://developer.x.com/en/support/x-api/error-troubleshooting#unsupported-authentication",f.InvalidRules="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-rules",f.TooManyRules="https://developer.x.com/en/support/x-api/error-troubleshooting#rule-cap",f.DuplicatedRules="https://developer.x.com/en/support/x-api/error-troubleshooting#duplicate-rules",f.RateLimitExceeded="https://developer.x.com/en/support/x-api/error-troubleshooting#usage-capped",f.ConnectionError="https://developer.x.com/en/support/x-api/error-troubleshooting#streaming-connection",f.ClientDisconnected="https://developer.x.com/en/support/x-api/error-troubleshooting#client-disconnected",f.TwitterDisconnectedYou="https://developer.x.com/en/support/x-api/error-troubleshooting#operational-disconnect",f.ResourceNotFound="https://developer.x.com/en/support/x-api/error-troubleshooting#resource-not-found",f.ResourceUnauthorized="https://developer.x.com/en/support/x-api/error-troubleshooting#not-authorized-for-resource",f.DisallowedResource="https://developer.x.com/en/support/x-api/error-troubleshooting#disallowed-resource"})(tS||(tS={}));var K;(function(f){f.Connected="connected",f.ConnectError="connect error",f.ConnectionError="connection error",f.ConnectionClosed="connection closed",f.ConnectionLost="connection lost",f.ReconnectAttempt="reconnect attempt",f.Reconnected="reconnected",f.ReconnectError="reconnect error",f.ReconnectLimitExceeded="reconnect limit exceeded",f.DataKeepAlive="data keep-alive",f.Data="data event content",f.DataError="data twitter error",f.TweetParseError="data tweet parse error",f.Error="stream error"})(K||(K={}));class Oh{constructor(f){this.value=f}}import*as yH from"fs";var Df={debug:!1,deprecationWarnings:!0,logger:{log:console.log.bind(console)}};function $H(f){let R={value:void 0,promise:f().then((h)=>{return R.value=h,h})};return R}function x$(f){if(Array.isArray(f))return f;return[f]}function RY(f){for(let R in f)if(f[R]===void 0)delete f[R]}function k$(f){return typeof f==="object"&&"errors"in f&&!("data"in f)}function Eh(f){if(Array.isArray(f)&&f.length>1)return!0;return f.toString().includes(",")}var fY=new Set;function AH(f){if(typeof console==="undefined"||!console.warn||!Df.deprecationWarnings)return;let R=`${f.instance}-${f.method}-${f.problem}`;if(fY.has(R))return;let h=`[twitter-api-v2] Deprecation warning: In ${f.instance}.${f.method}() call, ${f.problem}.
85
+ ${f.resolution}.`;console.warn(h),console.warn("To disable this message, import variable TwitterApiV2Settings from twitter-api-v2 and set TwitterApiV2Settings.deprecationWarnings to false."),fY.add(R)}import{EventEmitter as nz}from"events";import{request as rz}from"https";import*as Bf from"zlib";import{EventEmitter as iz}from"events";class hY{constructor(f){this.requestData=f,this.requestErrorHandled=!1,this.responseData=[]}get hrefPathname(){let f=this.requestData.url;return f.hostname+f.pathname}isCompressionDisabled(){return!this.requestData.compression||this.requestData.compression==="identity"}isFormEncodedEndpoint(){return this.requestData.url.href.startsWith("https://api.x.com/oauth/")}createRequestError(f){if(Df.debug)Df.logger.log("Request error:",f);return new vh("Request failed.",{request:this.req,error:f})}createPartialResponseError(f,R){let $=`Request failed with partial response with HTTP code ${this.res.statusCode}`;if(R)$+=" (connection abruptly closed)";else $+=" (parse error)";return new yh($,{request:this.req,response:this.res,responseError:f,rawContent:Buffer.concat(this.responseData).toString()})}formatV1Errors(f){return f.map(({code:R,message:h})=>`${h} (Twitter code ${R})`).join(", ")}formatV2Error(f){return`${f.title}: ${f.detail} (see ${f.type})`}createResponseError({res:f,data:R,rateLimit:h,code:$}){var A;if(Df.debug)Df.logger.log(`Request failed with code ${$}, data:`,R),Df.logger.log("Response headers:",f.headers);let G=`Request failed with code ${$}`;if((A=R===null||R===void 0?void 0:R.errors)===null||A===void 0?void 0:A.length){let H=R.errors;if("code"in H[0])G+=" - "+this.formatV1Errors(H);else G+=" - "+this.formatV2Error(R)}return new jh(G,{code:$,data:R,headers:f.headers,request:this.req,response:f,rateLimit:h})}getResponseDataStream(f){if(this.isCompressionDisabled())return f;let R=(f.headers["content-encoding"]||"identity").trim().toLowerCase();if(R==="br"){let h=Bf.createBrotliDecompress({flush:Bf.constants.BROTLI_OPERATION_FLUSH,finishFlush:Bf.constants.BROTLI_OPERATION_FLUSH});return f.pipe(h),h}if(R==="gzip"){let h=Bf.createGunzip({flush:Bf.constants.Z_SYNC_FLUSH,finishFlush:Bf.constants.Z_SYNC_FLUSH});return f.pipe(h),h}if(R==="deflate"){let h=Bf.createInflate({flush:Bf.constants.Z_SYNC_FLUSH,finishFlush:Bf.constants.Z_SYNC_FLUSH});return f.pipe(h),h}return f}detectResponseType(f){var R,h;if(((R=f.headers["content-type"])===null||R===void 0?void 0:R.includes("application/json"))||((h=f.headers["content-type"])===null||h===void 0?void 0:h.includes("application/problem+json")))return"json";else if(this.isFormEncodedEndpoint())return"url";return"text"}getParsedResponse(f){let R=this.responseData,h=this.requestData.forceParseMode||this.detectResponseType(f);if(h==="buffer")return Buffer.concat(R);else if(h==="text")return Buffer.concat(R).toString();else if(h==="json"){let $=Buffer.concat(R).toString();return $.length?JSON.parse($):void 0}else if(h==="url"){let $=Buffer.concat(R).toString(),A={};for(let[G,H]of new URLSearchParams($))A[G]=H;return A}else return}getRateLimitFromResponse(f){let R=void 0;if(f.headers["x-rate-limit-limit"]){if(R={limit:Number(f.headers["x-rate-limit-limit"]),remaining:Number(f.headers["x-rate-limit-remaining"]),reset:Number(f.headers["x-rate-limit-reset"])},f.headers["x-app-limit-24hour-limit"])R.day={limit:Number(f.headers["x-app-limit-24hour-limit"]),remaining:Number(f.headers["x-app-limit-24hour-remaining"]),reset:Number(f.headers["x-app-limit-24hour-reset"])};if(this.requestData.rateLimitSaver)this.requestData.rateLimitSaver(R)}return R}onSocketEventHandler(f,R,h){let $=this.onSocketCloseHandler.bind(this,f);h.on("close",$),R.on("complete",()=>h.off("close",$))}onSocketCloseHandler(f){if(this.req.removeAllListeners("timeout"),this.res)return;if(!this.requestErrorHandled)return f(this.createRequestError(new Error("Socket closed without any information.")))}requestErrorHandler(f,R){var h,$;($=(h=this.requestData).requestEventDebugHandler)===null||$===void 0||$.call(h,"request-error",{requestError:R}),this.requestErrorHandled=!0,f(this.createRequestError(R))}timeoutErrorHandler(){this.requestErrorHandled=!0,this.req.destroy(new Error("Request timeout."))}classicResponseHandler(f,R,h){this.res=h;let $=this.getResponseDataStream(h);if($.on("data",(A)=>this.responseData.push(A)),$.on("end",this.onResponseEndHandler.bind(this,f,R)),$.on("close",this.onResponseCloseHandler.bind(this,f,R)),this.requestData.requestEventDebugHandler)this.requestData.requestEventDebugHandler("response",{res:h}),h.on("aborted",(A)=>this.requestData.requestEventDebugHandler("response-aborted",{error:A})),h.on("error",(A)=>this.requestData.requestEventDebugHandler("response-error",{error:A})),h.on("close",()=>this.requestData.requestEventDebugHandler("response-close",{data:this.responseData})),h.on("end",()=>this.requestData.requestEventDebugHandler("response-end"))}onResponseEndHandler(f,R){let h=this.getRateLimitFromResponse(this.res),$;try{$=this.getParsedResponse(this.res)}catch(G){R(this.createPartialResponseError(G,!1));return}let A=this.res.statusCode;if(A>=400){R(this.createResponseError({data:$,res:this.res,rateLimit:h,code:A}));return}if(Df.debug)Df.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${this.res.statusCode}`),Df.logger.log("Response body:",$);f({data:$,headers:this.res.headers,rateLimit:h})}onResponseCloseHandler(f,R){let h=this.res;if(h.aborted)try{return this.getParsedResponse(this.res),this.onResponseEndHandler(f,R)}catch($){return R(this.createPartialResponseError($,!0))}if(!h.complete)return R(this.createPartialResponseError(new Error("Response has been interrupted before response could be parsed."),!0))}streamResponseHandler(f,R,h){if(h.statusCode<400){if(Df.debug)Df.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${h.statusCode} (starting stream)`);let A=this.getResponseDataStream(h);f({req:this.req,res:A,originalResponse:h,requestData:this.requestData})}else this.classicResponseHandler(()=>{return},R,h)}debugRequest(){let f=this.requestData.url;if(Df.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]`,this.requestData.options),f.search)Df.logger.log("Request parameters:",[...f.searchParams.entries()].map(([R,h])=>`${R}: ${h}`));if(this.requestData.body)Df.logger.log("Request body:",this.requestData.body)}buildRequest(){var f;let R=this.requestData.url,h=R.username?`${R.username}:${R.password}`:void 0,$=(f=this.requestData.options.headers)!==null&&f!==void 0?f:{};if(this.requestData.compression===!0||this.requestData.compression==="brotli")$["accept-encoding"]="br;q=1.0, gzip;q=0.8, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="gzip")$["accept-encoding"]="gzip;q=1, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="deflate")$["accept-encoding"]="deflate;q=1, *;q=0.1";if(Df.debug)this.debugRequest();this.req=rz({...this.requestData.options,host:R.hostname,port:R.port||void 0,path:R.pathname+R.search,protocol:R.protocol,auth:h,headers:$})}registerRequestEventDebugHandlers(f){f.on("close",()=>this.requestData.requestEventDebugHandler("close")),f.on("abort",()=>this.requestData.requestEventDebugHandler("abort")),f.on("socket",(R)=>{this.requestData.requestEventDebugHandler("socket",{socket:R}),R.on("error",(h)=>this.requestData.requestEventDebugHandler("socket-error",{socket:R,error:h})),R.on("connect",()=>this.requestData.requestEventDebugHandler("socket-connect",{socket:R})),R.on("close",(h)=>this.requestData.requestEventDebugHandler("socket-close",{socket:R,withError:h})),R.on("end",()=>this.requestData.requestEventDebugHandler("socket-end",{socket:R})),R.on("lookup",(...h)=>this.requestData.requestEventDebugHandler("socket-lookup",{socket:R,data:h})),R.on("timeout",()=>this.requestData.requestEventDebugHandler("socket-timeout",{socket:R}))})}makeRequest(){return this.buildRequest(),new Promise((f,R)=>{let h=(H)=>{A.emit("complete"),f(H)},$=(H)=>{A.emit("complete"),R(H)},A=new iz,G=this.req;if(G.on("error",this.requestErrorHandler.bind(this,$)),G.on("socket",this.onSocketEventHandler.bind(this,$,A)),G.on("response",this.classicResponseHandler.bind(this,h,$)),this.requestData.options.timeout)G.on("timeout",this.timeoutErrorHandler.bind(this));if(this.requestData.requestEventDebugHandler)this.registerRequestEventDebugHandlers(G);if(this.requestData.body)G.write(this.requestData.body);G.end()})}async makeRequestAsStream(){let{req:f,res:R,requestData:h,originalResponse:$}=await this.makeRequestAndResolveWhenReady();return new s$(h,{req:f,res:R,originalResponse:$})}makeRequestAndResolveWhenReady(){return this.buildRequest(),new Promise((f,R)=>{let h=this.req;if(h.on("error",this.requestErrorHandler.bind(this,R)),h.on("response",this.streamResponseHandler.bind(this,f,R)),this.requestData.body)h.write(this.requestData.body);h.end()})}}var Vh=hY;import{EventEmitter as pz}from"events";class $Y extends pz{constructor(f){super();this.stream=f,this.stack=[],this.onStreamData=this.onStreamData.bind(this),this.onStreamError=this.onStreamError.bind(this),this.onceNewEvent=this.once.bind(this,"event"),f.on(K.Data,this.onStreamData),f.on(K.ConnectionError,this.onStreamError),f.on(K.TweetParseError,this.onStreamError),f.on(K.ConnectionClosed,this.onStreamError)}nextEvent(){return new Promise(this.onceNewEvent)}hasStack(){return this.stack.length>0}popStack(){let f=this.stack;return this.stack=[],f}destroy(){this.removeAllListeners(),this.stream.off(K.Data,this.onStreamData),this.stream.off(K.ConnectionError,this.onStreamError),this.stream.off(K.TweetParseError,this.onStreamError),this.stream.off(K.ConnectionClosed,this.onStreamError)}emitEvent(f,R){this.emit("event",{type:f,payload:R})}onStreamError(f){this.emitEvent("error",f)}onStreamData(f){this.stack.push(f),this.emitEvent("data",f)}}var AY=$Y;import{EventEmitter as oz}from"events";class l$ extends oz{constructor(){super(...arguments);this.currentMessage=""}push(f){this.currentMessage+=f,f=this.currentMessage;let R=f.length,h=0,$=0;while($<R){if(f.slice($,$+2)===`\r
86
+ `){let A=f.slice(h,$);if(h=$+=2,!A.length)continue;try{let G=JSON.parse(A);if(G){this.emit(sR.ParsedData,G);continue}}catch(G){this.emit(sR.ParseError,G)}}$++}this.currentMessage=f.slice(h,R)}reset(){this.currentMessage=""}}var sR;(function(f){f.ParsedData="parsed data",f.ParseError="parse error"})(sR||(sR={}));var GY=[5,15,30,60,90,120,180,300,600,900],ez=(f)=>f>GY.length?901000:GY[f-1]*1000;class HY extends nz{constructor(f,R){super();if(this.requestData=f,this.autoReconnect=!1,this.autoReconnectRetries=5,this.keepAliveTimeoutMs=120000,this.nextRetryTimeout=ez,this.parser=new l$,this.connectionProcessRunning=!1,this.onKeepAliveTimeout=this.onKeepAliveTimeout.bind(this),this.initEventsFromParser(),R)this.req=R.req,this.res=R.res,this.originalResponse=R.originalResponse,this.initEventsFromRequest()}on(f,R){return super.on(f,R)}initEventsFromRequest(){if(!this.req||!this.res)throw new Error("TweetStream error: You cannot init TweetStream without a request and response object.");let f=(R)=>{this.emit(K.ConnectionError,R),this.emit(K.Error,{type:K.ConnectionError,error:R,message:"Connection lost or closed by Twitter."}),this.onConnectionError()};this.req.on("error",f),this.res.on("error",f),this.res.on("close",()=>f(new Error("Connection closed by Twitter."))),this.res.on("data",(R)=>{if(this.resetKeepAliveTimeout(),R.toString()===`\r
87
+ `)return this.emit(K.DataKeepAlive);this.parser.push(R.toString())}),this.resetKeepAliveTimeout()}initEventsFromParser(){let f=this.requestData.payloadIsError;this.parser.on(sR.ParsedData,(R)=>{if(f&&f(R))this.emit(K.DataError,R),this.emit(K.Error,{type:K.DataError,error:R,message:"Twitter sent a payload that is detected as an error payload."});else this.emit(K.Data,R)}),this.parser.on(sR.ParseError,(R)=>{this.emit(K.TweetParseError,R),this.emit(K.Error,{type:K.TweetParseError,error:R,message:"Failed to parse stream data."})})}resetKeepAliveTimeout(){if(this.unbindKeepAliveTimeout(),this.keepAliveTimeoutMs!==1/0)this.keepAliveTimeout=setTimeout(this.onKeepAliveTimeout,this.keepAliveTimeoutMs)}onKeepAliveTimeout(){this.emit(K.ConnectionLost),this.onConnectionError()}unbindTimeouts(){this.unbindRetryTimeout(),this.unbindKeepAliveTimeout()}unbindKeepAliveTimeout(){if(this.keepAliveTimeout)clearTimeout(this.keepAliveTimeout),this.keepAliveTimeout=void 0}unbindRetryTimeout(){if(this.retryTimeout)clearTimeout(this.retryTimeout),this.retryTimeout=void 0}closeWithoutEmit(){if(this.unbindTimeouts(),this.res)this.res.removeAllListeners(),this.res.destroy();if(this.req)this.req.removeAllListeners(),this.req.destroy()}close(){this.emit(K.ConnectionClosed),this.closeWithoutEmit()}destroy(){this.removeAllListeners(),this.close()}async clone(){let R=await new Vh(this.requestData).makeRequestAsStream(),h=this.eventNames();for(let $ of h){let A=this.listeners($);for(let G of A)R.on($,G)}return R}async connect(f={}){if(typeof f.autoReconnect!=="undefined")this.autoReconnect=f.autoReconnect;if(typeof f.autoReconnectRetries!=="undefined")this.autoReconnectRetries=f.autoReconnectRetries==="unlimited"?1/0:f.autoReconnectRetries;if(typeof f.keepAliveTimeout!=="undefined")this.keepAliveTimeoutMs=f.keepAliveTimeout==="disable"?1/0:f.keepAliveTimeout;if(typeof f.nextRetryTimeout!=="undefined")this.nextRetryTimeout=f.nextRetryTimeout;this.unbindTimeouts();try{await this.reconnect()}catch(R){if(this.emit(K.ConnectError,0),this.emit(K.Error,{type:K.ConnectError,error:R,message:"Connect error - Initial connection just failed."}),this.autoReconnect)this.makeAutoReconnectRetry(0,R);else throw R}return this}async reconnect(){if(this.connectionProcessRunning)throw new Error("Connection process is already running.");this.connectionProcessRunning=!0;try{let f=!0;if(this.req)f=!1,this.closeWithoutEmit();let{req:R,res:h,originalResponse:$}=await new Vh(this.requestData).makeRequestAndResolveWhenReady();this.req=R,this.res=h,this.originalResponse=$,this.emit(f?K.Connected:K.Reconnected),this.parser.reset(),this.initEventsFromRequest()}finally{this.connectionProcessRunning=!1}}async onConnectionError(f=0){if(this.unbindTimeouts(),this.closeWithoutEmit(),!this.autoReconnect){this.emit(K.ConnectionClosed);return}if(f>=this.autoReconnectRetries){this.emit(K.ReconnectLimitExceeded),this.emit(K.ConnectionClosed);return}try{this.emit(K.ReconnectAttempt,f),await this.reconnect()}catch(R){this.emit(K.ReconnectError,f),this.emit(K.Error,{type:K.ReconnectError,error:R,message:`Reconnect error - ${f+1} attempts made yet.`}),this.makeAutoReconnectRetry(f,R)}}makeAutoReconnectRetry(f,R){let h=this.nextRetryTimeout(f+1,R);this.retryTimeout=setTimeout(()=>{this.onConnectionError(f+1)},h)}async*[Symbol.asyncIterator](){let f=new AY(this);try{while(!0){if(!this.req||this.req.aborted)throw new Error("Connection closed");if(f.hasStack())yield*f.popStack();let{type:R,payload:h}=await f.nextEvent();if(R==="error")throw h}}finally{f.destroy()}}}var s$=HY;function NY(f){var R;if(!((R=f.clientSettings.plugins)===null||R===void 0?void 0:R.length))return!1;for(let h of f.clientSettings.plugins)if(h.onRequestError||h.onResponseError)return!0;return!1}async function UY(f,R,h,$){let A;if($ instanceof vh||$ instanceof yh)A=await this.applyPluginMethod("onRequestError",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,error:$});else if($ instanceof jh)A=await this.applyPluginMethod("onResponseError",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,error:$});if(A&&A instanceof Oh)return A.value;return Promise.reject($)}import*as SY from"crypto";class kf{constructor(f){this.nonceLength=32,this.consumerKeys=f.consumerKeys}static percentEncode(f){return encodeURIComponent(f).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")}hash(f,R){return SY.createHmac("sha1",R).update(f).digest("base64")}authorize(f,R={}){let h={oauth_consumer_key:this.consumerKeys.key,oauth_nonce:this.getNonce(),oauth_signature_method:"HMAC-SHA1",oauth_timestamp:this.getTimestamp(),oauth_version:"1.0"};if(R.key!==void 0)h.oauth_token=R.key;if(!f.data)f.data={};return h.oauth_signature=this.getSignature(f,R.secret,h),h}toHeader(f){let R=WY(f),h="OAuth ";for(let $ of R){if($.key.indexOf("oauth_")!==0)continue;h+=kf.percentEncode($.key)+'="'+kf.percentEncode($.value)+'",'}return{Authorization:h.slice(0,h.length-1)}}getNonce(){let R="";for(let h=0;h<this.nonceLength;h++)R+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.trunc(Math.random()*62)];return R}getTimestamp(){return Math.trunc(new Date().getTime()/1000)}getSignature(f,R,h){return this.hash(this.getBaseString(f,h),this.getSigningKey(R))}getSigningKey(f){return kf.percentEncode(this.consumerKeys.secret)+"&"+kf.percentEncode(f||"")}getBaseString(f,R){return f.method.toUpperCase()+"&"+kf.percentEncode(this.getBaseUrl(f.url))+"&"+kf.percentEncode(this.getParameterString(f,R))}getParameterString(f,R){let h=WY(f9(FY(R,FY(f.data,tz(f.url))))),$="";for(let{key:A,value:G}of h)if(G&&Array.isArray(G)){G.sort();let H="";G.forEach((N,U)=>{if(H+=A+"="+N,U<G.length)H+="&"}),$+=H}else $+=A+"="+G+"&";return $.slice(0,$.length-1)}getBaseUrl(f){return f.split("?")[0]}}var Th=kf;function FY(f,R){return{...f||{},...R||{}}}function WY(f){return Object.keys(f).sort().map((R)=>({key:R,value:f[R]}))}function uz(f){let R=f.split("&"),h={};for(let $ of R){let[A,G=""]=$.split("=");if(h[A]){if(!Array.isArray(h[A]))h[A]=[h[A]];h[A].push(decodeURIComponent(G))}else h[A]=decodeURIComponent(G)}return h}function tz(f){let R=f.split("?");if(R.length===1)return{};return uz(R[1])}function f9(f){let R={};for(let h in f){let $=f[h];if($&&Array.isArray($))$=$.map((A)=>kf.percentEncode(A));else $=kf.percentEncode($);R[kf.percentEncode(h)]=$}return R}class sf{constructor(){this._boundary="",this._chunks=[]}bodyAppend(...f){let R=f.map((h)=>h instanceof Buffer?h:Buffer.from(h));this._chunks.push(...R)}append(f,R,h){let $=R instanceof Buffer?R:R.toString(),A=this.getMultipartHeader(f,$,h);this.bodyAppend(A,$,sf.LINE_BREAK)}getHeaders(){return{"content-type":"multipart/form-data; boundary="+this.getBoundary()}}getLength(){return this._chunks.reduce((f,R)=>f+R.length,this.getMultipartFooter().length)}getBuffer(){let f=[...this._chunks,this.getMultipartFooter()],R=Buffer.alloc(this.getLength()),h=0;for(let $ of f)for(let A=0;A<$.length;h++,A++)R[h]=$[A];return R}getBoundary(){if(!this._boundary)this.generateBoundary();return this._boundary}generateBoundary(){let f="--------------------------";for(let R=0;R<24;R++)f+=Math.floor(Math.random()*10).toString(16);this._boundary=f}getMultipartHeader(f,R,h){if(!h)h=R instanceof Buffer?sf.DEFAULT_CONTENT_TYPE:"";let $={"Content-Disposition":["form-data",`name="${f}"`],"Content-Type":h},A="";for(let[G,H]of Object.entries($)){if(!H.length)continue;A+=G+": "+x$(H).join("; ")+sf.LINE_BREAK}return"--"+this.getBoundary()+sf.LINE_BREAK+A+sf.LINE_BREAK}getMultipartFooter(){if(this._footerChunk)return this._footerChunk;return this._footerChunk=Buffer.from("--"+this.getBoundary()+"--"+sf.LINE_BREAK)}}sf.LINE_BREAK=`\r
88
+ `;sf.DEFAULT_CONTENT_TYPE="application/octet-stream";class GH{static formatQueryToString(f){let R={};for(let h in f)if(typeof f[h]==="string")R[h]=f[h];else if(typeof f[h]!=="undefined")R[h]=String(f[h]);return R}static autoDetectBodyType(f){if(f.pathname.startsWith("/2/")||f.pathname.startsWith("/labs/2/")){if(f.password.startsWith("/2/oauth2"))return"url";return"json"}if(f.hostname==="upload.x.com"){if(f.pathname==="/1.1/media/upload.json")return"form-data";return"json"}let R=f.pathname.split("/1.1/",2)[1];if(this.JSON_1_1_ENDPOINTS.has(R))return"json";return"url"}static addQueryParamsToUrl(f,R){let h=Object.entries(R);if(h.length){let $="";for(let[A,G]of h)$+=($.length?"&":"?")+`${Th.percentEncode(A)}=${Th.percentEncode(G)}`;f.search=$}}static constructBodyParams(f,R,h){if(f instanceof Buffer)return f;if(h==="json"){if(!R["content-type"])R["content-type"]="application/json;charset=UTF-8";return JSON.stringify(f)}else if(h==="url"){if(!R["content-type"])R["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";if(Object.keys(f).length)return new URLSearchParams(f).toString().replace(/\*/g,"%2A");return""}else if(h==="raw")throw new Error("You can only use raw body mode with Buffers. To give a string, use Buffer.from(str).");else{let $=new sf;for(let A in f)$.append(A,f[A]);if(!R["content-type"]){let A=$.getHeaders();R["content-type"]=A["content-type"]}return $.getBuffer()}}static setBodyLengthHeader(f,R){var h;if(f.headers=(h=f.headers)!==null&&h!==void 0?h:{},typeof R==="string")f.headers["content-length"]=Buffer.byteLength(R);else f.headers["content-length"]=R.length}static isOAuthSerializable(f){return!(f instanceof Buffer)}static mergeQueryAndBodyForOAuth(f,R){let h={};for(let $ in f)h[$]=f[$];if(this.isOAuthSerializable(R))for(let $ in R){let A=R[$];if(this.isOAuthSerializable(A))h[$]=typeof A==="object"&&A!==null&&"toString"in A?A.toString():A}return h}static moveUrlQueryParamsIntoObject(f,R){for(let[h,$]of f.searchParams)R[h]=$;return f.search="",f}static applyRequestParametersToUrl(f,R){return f.pathname=f.pathname.replace(/:([A-Z_-]+)/ig,(h,$)=>{if(R[$]!==void 0)return String(R[$]);return h}),f}}GH.JSON_1_1_ENDPOINTS=new Set(["direct_messages/events/new.json","direct_messages/welcome_messages/new.json","direct_messages/welcome_messages/rules/new.json","media/metadata/create.json","collections/entries/curate.json"]);var Vf=GH;import*as YY from"crypto";class lR{static getCodeVerifier(){return this.generateRandomString(128)}static getCodeChallengeFromVerifier(f){return this.escapeBase64Url(YY.createHash("sha256").update(f).digest("base64"))}static getAuthHeader(f,R){let h=encodeURIComponent(f)+":"+encodeURIComponent(R);return Buffer.from(h).toString("base64")}static generateRandomString(f){let R="",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";for(let $=0;$<f;$++)R+=h[Math.floor(Math.random()*h.length)];return R}static escapeBase64Url(f){return f.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}class w0{constructor(f){if(this.rateLimits={},this.clientSettings={},f)this.clientSettings=f}getRateLimits(){return this.rateLimits}saveRateLimit(f,R){this.rateLimits[f]=R}async send(f){var R,h,$,A,G;if((R=this.clientSettings.plugins)===null||R===void 0?void 0:R.length){let D=await this.applyPreRequestConfigHooks(f);if(D)return D}let H=this.getHttpRequestArgs(f),N={method:H.method,headers:H.headers,timeout:f.timeout,agent:this.clientSettings.httpAgent},U=f.enableRateLimitSave!==!1;if(H.body)Vf.setBodyLengthHeader(N,H.body);if((h=this.clientSettings.plugins)===null||h===void 0?void 0:h.length)await this.applyPreRequestHooks(f,H,N);let F=new Vh({url:H.url,options:N,body:H.body,rateLimitSaver:U?this.saveRateLimit.bind(this,H.rawUrl):void 0,requestEventDebugHandler:f.requestEventDebugHandler,compression:(A=($=f.compression)!==null&&$!==void 0?$:this.clientSettings.compression)!==null&&A!==void 0?A:!0,forceParseMode:f.forceParseMode}).makeRequest();if(NY(this))F=this.applyResponseErrorHooks(f,H,N,F);let S=await F;if((G=this.clientSettings.plugins)===null||G===void 0?void 0:G.length){let D=await this.applyPostRequestHooks(f,H,N,S);if(D)return D.value}return S}sendStream(f){var R,h;if(this.clientSettings.plugins)this.applyPreStreamRequestConfigHooks(f);let $=this.getHttpRequestArgs(f),A={method:$.method,headers:$.headers,agent:this.clientSettings.httpAgent},G=f.enableRateLimitSave!==!1,H=f.autoConnect!==!1;if($.body)Vf.setBodyLengthHeader(A,$.body);let N={url:$.url,options:A,body:$.body,rateLimitSaver:G?this.saveRateLimit.bind(this,$.rawUrl):void 0,payloadIsError:f.payloadIsError,compression:(h=(R=f.compression)!==null&&R!==void 0?R:this.clientSettings.compression)!==null&&h!==void 0?h:!0},U=new s$(N);if(!H)return U;return U.connect()}initializeToken(f){if(typeof f==="string")this.bearerToken=f;else if(typeof f==="object"&&"appKey"in f){if(this.consumerToken=f.appKey,this.consumerSecret=f.appSecret,f.accessToken&&f.accessSecret)this.accessToken=f.accessToken,this.accessSecret=f.accessSecret;this._oauth=this.buildOAuth()}else if(typeof f==="object"&&"username"in f){let R=encodeURIComponent(f.username)+":"+encodeURIComponent(f.password);this.basicToken=Buffer.from(R).toString("base64")}else if(typeof f==="object"&&"clientId"in f)this.clientId=f.clientId,this.clientSecret=f.clientSecret}getActiveTokens(){if(this.bearerToken)return{type:"oauth2",bearerToken:this.bearerToken};else if(this.basicToken)return{type:"basic",token:this.basicToken};else if(this.consumerSecret&&this._oauth)return{type:"oauth-1.0a",appKey:this.consumerToken,appSecret:this.consumerSecret,accessToken:this.accessToken,accessSecret:this.accessSecret};else if(this.clientId)return{type:"oauth2-user",clientId:this.clientId};return{type:"none"}}buildOAuth(){if(!this.consumerSecret||!this.consumerToken)throw new Error("Invalid consumer tokens");return new Th({consumerKeys:{key:this.consumerToken,secret:this.consumerSecret}})}getOAuthAccessTokens(){if(!this.accessSecret||!this.accessToken)return;return{key:this.accessToken,secret:this.accessSecret}}getPlugins(){var f;return(f=this.clientSettings.plugins)!==null&&f!==void 0?f:[]}hasPlugins(){var f;return!!((f=this.clientSettings.plugins)===null||f===void 0?void 0:f.length)}async applyPluginMethod(f,R){var h;let $;for(let A of this.getPlugins()){let G=await((h=A[f])===null||h===void 0?void 0:h.call(A,R));if(G&&G instanceof Oh)$=G}return $}writeAuthHeaders({headers:f,bodyInSignature:R,url:h,method:$,query:A,body:G}){if(f={...f},this.bearerToken)f.Authorization="Bearer "+this.bearerToken;else if(this.basicToken)f.Authorization="Basic "+this.basicToken;else if(this.clientId&&this.clientSecret)f.Authorization="Basic "+lR.getAuthHeader(this.clientId,this.clientSecret);else if(this.consumerSecret&&this._oauth){let H=R?Vf.mergeQueryAndBodyForOAuth(A,G):A,N=this._oauth.authorize({url:h.toString(),method:$,data:H},this.getOAuthAccessTokens());f={...f,...this._oauth.toHeader(N)}}return f}getUrlObjectFromUrlString(f){if(!f.startsWith("http"))f="https://"+f;return new URL(f)}getHttpRequestArgs({url:f,method:R,query:h={},body:$={},headers:A,forceBodyMode:G,enableAuth:H,params:N}){let U=void 0;if(R=R.toUpperCase(),A=A!==null&&A!==void 0?A:{},!A["x-user-agent"])A["x-user-agent"]="Node.twitter-api-v2";let F=this.getUrlObjectFromUrlString(f),S=F.origin+F.pathname;if(N)Vf.applyRequestParametersToUrl(F,N);let D=Vf.formatQueryToString(h);if(Vf.moveUrlQueryParamsIntoObject(F,D),!($ instanceof Buffer))RY($);let J=G!==null&&G!==void 0?G:Vf.autoDetectBodyType(F);if(H!==!1){let Z=w0.BODY_METHODS.has(R)&&J==="url";A=this.writeAuthHeaders({headers:A,bodyInSignature:Z,method:R,query:D,url:F,body:$})}if(w0.BODY_METHODS.has(R))U=Vf.constructBodyParams($,A,J)||void 0;return Vf.addQueryParamsToUrl(F,D),{rawUrl:S,url:F,method:R,headers:A,body:U}}async applyPreRequestConfigHooks(f){var R;let h=this.getUrlObjectFromUrlString(f.url);for(let $ of this.getPlugins()){let A=await((R=$.onBeforeRequestConfig)===null||R===void 0?void 0:R.call($,{client:this,url:h,params:f}));if(A)return A}}applyPreStreamRequestConfigHooks(f){var R;let h=this.getUrlObjectFromUrlString(f.url);for(let $ of this.getPlugins())(R=$.onBeforeStreamRequestConfig)===null||R===void 0||R.call($,{client:this,url:h,params:f})}async applyPreRequestHooks(f,R,h){await this.applyPluginMethod("onBeforeRequest",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h})}async applyPostRequestHooks(f,R,h,$){return await this.applyPluginMethod("onAfterRequest",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,response:$})}applyResponseErrorHooks(f,R,h,$){return $.catch(UY.bind(this,f,R,h))}}w0.BODY_METHODS=new Set(["POST","PUT","PATCH"]);class zR{constructor(f,R={}){if(this._currentUser=null,this._currentUserV2=null,f instanceof zR)this._requestMaker=f._requestMaker;else this._requestMaker=new w0(R),this._requestMaker.initializeToken(f)}setPrefix(f){this._prefix=f}cloneWithPrefix(f){let R=this.constructor(this);return R.setPrefix(f),R}getActiveTokens(){return this._requestMaker.getActiveTokens()}getPlugins(){return this._requestMaker.getPlugins()}getPluginOfType(f){return this.getPlugins().find((R)=>R instanceof f)}hasHitRateLimit(f){var R;if(this.isRateLimitStatusObsolete(f))return!1;return((R=this.getLastRateLimitStatus(f))===null||R===void 0?void 0:R.remaining)===0}isRateLimitStatusObsolete(f){let R=this.getLastRateLimitStatus(f);if(R===void 0)return!0;return R.reset*1000<Date.now()}getLastRateLimitStatus(f){let R=f.match(/^https?:\/\//)?f:this._prefix+f;return this._requestMaker.getRateLimits()[R]}getCurrentUserObject(f=!1){if(!f&&this._currentUser){if(this._currentUser.value)return Promise.resolve(this._currentUser.value);return this._currentUser.promise}return this._currentUser=$H(()=>this.get("account/verify_credentials.json",{tweet_mode:"extended"},{prefix:JR})),this._currentUser.promise}getCurrentUserV2Object(f=!1){if(!f&&this._currentUserV2){if(this._currentUserV2.value)return Promise.resolve(this._currentUserV2.value);return this._currentUserV2.promise}return this._currentUserV2=$H(()=>this.get("users/me",void 0,{prefix:MR})),this._currentUserV2.promise}async get(f,R={},{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"GET",query:R,...A});return h?G:G.data}async delete(f,R={},{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"DELETE",query:R,...A});return h?G:G.data}async post(f,R,{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"POST",body:R,...A});return h?G:G.data}async put(f,R,{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"PUT",body:R,...A});return h?G:G.data}async patch(f,R,{fullResponse:h,prefix:$=this._prefix,...A}={}){if($)f=$+f;let G=await this._requestMaker.send({url:f,method:"PATCH",body:R,...A});return h?G:G.data}getStream(f,R,{prefix:h=this._prefix,...$}={}){return this._requestMaker.sendStream({url:h?h+f:f,method:"GET",query:R,...$})}postStream(f,R,{prefix:h=this._prefix,...$}={}){return this._requestMaker.sendStream({url:h?h+f:f,method:"POST",body:R,...$})}}class Tf extends zR{constructor(f){if(!(f instanceof zR))throw new Error("You must instance SubTwitterApi instance from existing TwitterApi instance.");super(f)}}class L0 extends Q0{constructor(){super(...arguments);this.hasFinishedFetch=!1}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.push(...h),this.hasFinishedFetch=h.length===0}getNextQueryParams(f){let R=BigInt(this._realData[this._realData.length-1].id_str);return{...this.injectQueryParams(f),max_id:(R-BigInt(1)).toString()}}getPageLengthFromRequest(f){return f.data.length}isFetchLastOver(f){return!f.data.length}canFetchNextPage(f){return f.length>0}getItemArray(){return this.tweets}get tweets(){return this._realData}get done(){return super.done||this.hasFinishedFetch}}class HH extends L0{constructor(){super(...arguments);this._endpoint="statuses/home_timeline.json"}}class NH extends L0{constructor(){super(...arguments);this._endpoint="statuses/mentions_timeline.json"}}class _$ extends L0{constructor(){super(...arguments);this._endpoint="statuses/user_timeline.json"}}class UH extends L0{constructor(){super(...arguments);this._endpoint="lists/statuses.json"}}class d$ extends L0{constructor(){super(...arguments);this._endpoint="favorites/list.json"}}class FH extends Uf{constructor(){super(...arguments);this._endpoint="mutes/users/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class WH extends Uf{constructor(){super(...arguments);this._endpoint="mutes/users/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class SH extends Uf{constructor(){super(...arguments);this._endpoint="followers/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class YH extends Uf{constructor(){super(...arguments);this._endpoint="followers/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class DH extends Uf{constructor(){super(...arguments);this._endpoint="friends/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class ZH extends Uf{constructor(){super(...arguments);this._endpoint="friends/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class MH extends Q0{constructor(){super(...arguments);this._endpoint="users/search.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.push(...h)}getNextQueryParams(f){var R;let h=Number((R=this._queryParams.page)!==null&&R!==void 0?R:"1");return{...this._queryParams,page:h+1,...f?{count:f}:{}}}getPageLengthFromRequest(f){return f.data.length}isFetchLastOver(f){return!f.data.length}canFetchNextPage(f){return f.length>0}getItemArray(){return this.users}get users(){return this._realData}}class a$ extends Uf{constructor(){super(...arguments);this._endpoint="friendships/incoming.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class JH extends a${constructor(){super(...arguments);this._endpoint="friendships/outgoing.json"}}class r$ extends Uf{refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.lists.push(...h.lists),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.lists.length}getItemArray(){return this.lists}get lists(){return this._realData.lists}}class XH extends r${constructor(){super(...arguments);this._endpoint="lists/memberships.json"}}class zH extends r${constructor(){super(...arguments);this._endpoint="lists/ownerships.json"}}class QH extends r${constructor(){super(...arguments);this._endpoint="lists/subscriptions.json"}}class wH extends Uf{refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class LH extends wH{constructor(){super(...arguments);this._endpoint="lists/members.json"}}class IH extends wH{constructor(){super(...arguments);this._endpoint="lists/subscribers.json"}}class I0 extends Tf{constructor(){super(...arguments);this._prefix=JR}singleTweet(f,R={}){return this.get("statuses/show.json",{tweet_mode:"extended",id:f,...R})}tweets(f,R={}){return this.post("statuses/lookup.json",{tweet_mode:"extended",id:f,...R})}oembedTweet(f,R={}){return this.get("oembed",{url:`https://x.com/i/statuses/${f}`,...R},{prefix:"https://publish.x.com/"})}async homeTimeline(f={}){let R={tweet_mode:"extended",...f},h=await this.get("statuses/home_timeline.json",R,{fullResponse:!0});return new HH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async mentionTimeline(f={}){let R={tweet_mode:"extended",...f},h=await this.get("statuses/mentions_timeline.json",R,{fullResponse:!0});return new NH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userTimeline(f,R={}){let h={tweet_mode:"extended",user_id:f,...R},$=await this.get("statuses/user_timeline.json",h,{fullResponse:!0});return new _$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async userTimelineByUsername(f,R={}){let h={tweet_mode:"extended",screen_name:f,...R},$=await this.get("statuses/user_timeline.json",h,{fullResponse:!0});return new _$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async favoriteTimeline(f,R={}){let h={tweet_mode:"extended",user_id:f,...R},$=await this.get("favorites/list.json",h,{fullResponse:!0});return new d$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async favoriteTimelineByUsername(f,R={}){let h={tweet_mode:"extended",screen_name:f,...R},$=await this.get("favorites/list.json",h,{fullResponse:!0});return new d$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}user(f){return this.get("users/show.json",{tweet_mode:"extended",...f})}users(f){return this.get("users/lookup.json",{tweet_mode:"extended",...f})}verifyCredentials(f={}){return this.get("account/verify_credentials.json",f)}async listMutedUsers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("mutes/users/list.json",R,{fullResponse:!0});return new FH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listMutedUserIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("mutes/users/ids.json",R,{fullResponse:!0});return new WH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFriendList(f={}){let R={...f},h=await this.get("friends/list.json",R,{fullResponse:!0});return new DH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowerList(f={}){let R={...f},h=await this.get("followers/list.json",R,{fullResponse:!0});return new SH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowerIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("followers/ids.json",R,{fullResponse:!0});return new YH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowingIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("friends/ids.json",R,{fullResponse:!0});return new ZH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async searchUsers(f,R={}){let h={q:f,tweet_mode:"extended",page:1,...R},$=await this.get("users/search.json",h,{fullResponse:!0});return new MH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}friendship(f){return this.get("friendships/show.json",f)}friendships(f){return this.get("friendships/lookup.json",f)}friendshipsNoRetweets(){return this.get("friendships/no_retweets/ids.json",{stringify_ids:!0})}async friendshipsIncoming(f={}){let R={stringify_ids:!0,...f},h=await this.get("friendships/incoming.json",R,{fullResponse:!0});return new a$({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async friendshipsOutgoing(f={}){let R={stringify_ids:!0,...f},h=await this.get("friendships/outgoing.json",R,{fullResponse:!0});return new JH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}accountSettings(){return this.get("account/settings.json")}userProfileBannerSizes(f){return this.get("users/profile_banner.json",f)}list(f){return this.get("lists/show.json",{tweet_mode:"extended",...f})}lists(f={}){return this.get("lists/list.json",{tweet_mode:"extended",...f})}async listMembers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/members.json",R,{fullResponse:!0});return new LH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}listGetMember(f){return this.get("lists/members/show.json",{tweet_mode:"extended",...f})}async listMemberships(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/memberships.json",R,{fullResponse:!0});return new XH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listOwnerships(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/ownerships.json",R,{fullResponse:!0});return new zH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listStatuses(f){let R={tweet_mode:"extended",...f},h=await this.get("lists/statuses.json",R,{fullResponse:!0});return new UH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listSubscribers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/subscribers.json",R,{fullResponse:!0});return new IH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}listGetSubscriber(f){return this.get("lists/subscribers/show.json",{tweet_mode:"extended",...f})}async listSubscriptions(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/subscriptions.json",R,{fullResponse:!0});return new QH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}mediaInfo(f){return this.get("media/upload.json",{command:"STATUS",media_id:f},{prefix:uf})}filterStream({autoConnect:f,...R}={}){let h={};for(let[A,G]of Object.entries(R))if(A==="follow"||A==="track")h[A]=G.toString();else if(A==="locations"){let H=G;h.locations=x$(H).map((N)=>`${N.lng},${N.lat}`).join(",")}else h[A]=G;return this.stream.postStream("statuses/filter.json",h,{autoConnect:f})}sampleStream({autoConnect:f,...R}={}){return this.stream.getStream("statuses/sample.json",R,{autoConnect:f})}get stream(){let f=new i$(this);return f.setPrefix(uS),f}trendsByPlace(f,R={}){return this.get("trends/place.json",{id:f,...R})}trendsAvailable(){return this.get("trends/available.json")}trendsClosest(f,R){return this.get("trends/closest.json",{lat:f,long:R})}geoPlace(f){return this.get("geo/id/:place_id.json",void 0,{params:{place_id:f}})}geoSearch(f){return this.get("geo/search.json",f)}geoReverseGeoCode(f){return this.get("geo/reverse_geocode.json",f)}rateLimitStatuses(...f){return this.get("application/rate_limit_status.json",{resources:f})}supportedLanguages(){return this.get("help/languages.json")}}import*as QR from"fs";async function PH(f){let R=await qH(f);if(typeof R==="number")return new Promise((h,$)=>{QR.readFile(R,(A,G)=>{if(A)return $(A);h(G)})});else if(R instanceof Buffer)return R;else return R.readFile()}function qH(f){if(typeof f==="string")return QR.promises.open(f,"r");else if(typeof f==="number")return f;else if(typeof f==="object"&&!(f instanceof Buffer))return f;else if(!(f instanceof Buffer))throw new Error("Given file is not valid, please check its type.");else return f}async function DY(f){if(typeof f==="number")return(await new Promise((h,$)=>{QR.fstat(f,(A,G)=>{if(A)$(A);h(G)})})).size;else if(f instanceof Buffer)return f.length;else return(await f.stat()).size}function ZY(f,R,h){if(typeof h==="string")return h;else if(typeof f==="string"&&!R)return R9(f);else if(typeof R==="string")return h9(R);throw new Error("You must specify type if file is a file handle or Buffer.")}function R9(f){if(f.endsWith(".jpeg")||f.endsWith(".jpg"))return d.Jpeg;if(f.endsWith(".png"))return d.Png;if(f.endsWith(".webp"))return d.Webp;if(f.endsWith(".gif"))return d.Gif;if(f.endsWith(".mpeg4")||f.endsWith(".mp4"))return d.Mp4;if(f.endsWith(".mov")||f.endsWith(".mov"))return d.Mov;if(f.endsWith(".srt"))return d.Srt;return AH({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"options.mimeType is missing and filename couldn't help to resolve MIME type, so it will fallback to image/jpeg",resolution:"If you except to give filenames without extensions, please specify explicitlty the MIME type using options.mimeType"}),d.Jpeg}function h9(f){if(AH({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"you're using options.type",resolution:"Remove options.type argument and migrate to options.mimeType which takes the real MIME type. If you're using type=longmp4, add options.longVideo alongside of mimeType=EUploadMimeType.Mp4"}),f==="gif")return d.Gif;if(f==="jpg")return d.Jpeg;if(f==="png")return d.Png;if(f==="webp")return d.Webp;if(f==="srt")return d.Srt;if(f==="mp4"||f==="longmp4")return d.Mp4;if(f==="mov")return d.Mov;return f}function MY(f,R){if(f===d.Mp4||f===d.Mov)return R==="tweet"?"TweetVideo":"DmVideo";if(f===d.Gif)return R==="tweet"?"TweetGif":"DmGif";if(f===d.Srt)return"Subtitles";else return R==="tweet"?"TweetImage":"DmImage"}function BH(f){return new Promise((R)=>setTimeout(R,f*1000))}async function KH(f,R,h=0,$){if(f instanceof Buffer){let G=f.slice(h,h+R);return[G,G.length]}if(!$)throw new Error("Well, we will need a buffer to store file content.");let A;if(typeof f==="number")A=await new Promise((G,H)=>{QR.read(f,$,0,R,h,(N,U)=>{if(N)H(N);G(U)})});else A=(await f.read($,0,R,h)).bytesRead;return[$,A]}var vH="media/upload.json";class P0 extends I0{constructor(){super(...arguments);this._prefix=JR}get readOnly(){return this}tweet(f,R={}){let h={status:f,tweet_mode:"extended",...R};return this.post("statuses/update.json",h)}async quote(f,R,h={}){let $="https://x.com/i/statuses/"+R;return this.tweet(f,{...h,attachment_url:$})}async tweetThread(f){let R=[];for(let h of f){let $=R.length?R[R.length-1]:null,A={...typeof h==="string"?{status:h}:h},G=$?$.id_str:A.in_reply_to_status_id,H=A.status;if(G)R.push(await this.reply(H,G,A));else R.push(await this.tweet(H,A))}return R}reply(f,R,h={}){return this.tweet(f,{auto_populate_reply_metadata:!0,in_reply_to_status_id:R,...h})}deleteTweet(f){return this.post("statuses/destroy/:id.json",{tweet_mode:"extended"},{params:{id:f}})}reportUserAsSpam(f){return this.post("users/report_spam.json",{tweet_mode:"extended",...f})}updateFriendship(f){return this.post("friendships/update.json",f)}createFriendship(f){return this.post("friendships/create.json",f)}destroyFriendship(f){return this.post("friendships/destroy.json",f)}updateAccountSettings(f){return this.post("account/settings.json",f)}updateAccountProfile(f){return this.post("account/update_profile.json",f)}async updateAccountProfileBanner(f,R={}){let h={banner:await PH(f),...R};return this.post("account/update_profile_banner.json",h,{forceBodyMode:"form-data"})}async updateAccountProfileImage(f,R={}){let h={tweet_mode:"extended",image:await PH(f),...R};return this.post("account/update_profile_image.json",h,{forceBodyMode:"form-data"})}removeAccountProfileBanner(){return this.post("account/remove_profile_banner.json")}createList(f){return this.post("lists/create.json",{tweet_mode:"extended",...f})}updateList(f){return this.post("lists/update.json",{tweet_mode:"extended",...f})}removeList(f){return this.post("lists/destroy.json",{tweet_mode:"extended",...f})}addListMembers(f){let h=f.user_id&&Eh(f.user_id)||f.screen_name&&Eh(f.screen_name)?"lists/members/create_all.json":"lists/members/create.json";return this.post(h,f)}removeListMembers(f){let h=f.user_id&&Eh(f.user_id)||f.screen_name&&Eh(f.screen_name)?"lists/members/destroy_all.json":"lists/members/destroy.json";return this.post(h,f)}subscribeToList(f){return this.post("lists/subscribers/create.json",{tweet_mode:"extended",...f})}unsubscribeOfList(f){return this.post("lists/subscribers/destroy.json",{tweet_mode:"extended",...f})}createMediaMetadata(f,R){return this.post("media/metadata/create.json",{media_id:f,...R},{prefix:uf,forceBodyMode:"json"})}createMediaSubtitles(f,R){return this.post("media/subtitles/create.json",{media_id:f,media_category:"TweetVideo",subtitle_info:{subtitles:R}},{prefix:uf,forceBodyMode:"json"})}deleteMediaSubtitles(f,...R){return this.post("media/subtitles/delete.json",{media_id:f,media_category:"TweetVideo",subtitle_info:{subtitles:R.map((h)=>({language_code:h}))}},{prefix:uf,forceBodyMode:"json"})}async uploadMedia(f,R={},h=!1){var $;let A=($=R.chunkLength)!==null&&$!==void 0?$:1048576,{fileHandle:G,mediaCategory:H,fileSize:N,mimeType:U}=await this.getUploadMediaRequirements(f,R);try{let F=await this.post(vH,{command:"INIT",total_bytes:N,media_type:U,media_category:H,additional_owners:R.additionalOwners,shared:R.shared?!0:void 0},{prefix:uf});await this.mediaChunkedUpload(G,A,F.media_id_string,R.maxConcurrentUploads);let S=await this.post(vH,{command:"FINALIZE",media_id:F.media_id_string},{prefix:uf});if(S.processing_info&&S.processing_info.state!=="succeeded")await this.awaitForMediaProcessingCompletion(S);if(h)return S;else return S.media_id_string}finally{if(typeof f==="number")yH.close(f,()=>{});else if(typeof G==="object"&&!(G instanceof Buffer))G.close()}}async awaitForMediaProcessingCompletion(f){var R;while(!0){f=await this.mediaInfo(f.media_id_string);let{processing_info:h}=f;if(!h||h.state==="succeeded")return;if((R=h.error)===null||R===void 0?void 0:R.code){let{name:$,message:A}=h.error;throw new Error(`Failed to process media: ${$} - ${A}.`)}if(h.state==="failed")throw new Error("Failed to process the media.");if(h.check_after_secs)await BH(h.check_after_secs);else await BH(5)}}async getUploadMediaRequirements(f,{mimeType:R,type:h,target:$,longVideo:A}={}){let G;try{G=await qH(f);let H=ZY(f,h,R),N;if(H===d.Mp4&&(!R&&!h&&$!=="dm"||A))N="amplify_video";else N=MY(H,$!==null&&$!==void 0?$:"tweet");return{fileHandle:G,mediaCategory:N,fileSize:await DY(G),mimeType:H}}catch(H){if(typeof f==="number")yH.close(f,()=>{});else if(typeof G==="object"&&!(G instanceof Buffer))G.close();throw H}}async mediaChunkedUpload(f,R,h,$=3){let A=0;if($<1)throw new RangeError("Bad maxConcurrentUploads parameter.");let G=f instanceof Buffer?void 0:Buffer.alloc(R),H,N,U=0;[H,N]=await KH(f,R,U,G),U+=N;let F=new Set;while(N){let S=H.slice(0,N);if(S.length){let D=this.post(vH,{command:"APPEND",media_id:h,segment_index:A,media:S},{prefix:uf});F.add(D),D.then(()=>{F.delete(D)}),A++}if(F.size>=$)await Promise.race(F);[H,N]=await KH(f,R,U,G),U+=N}await Promise.all([...F])}}class JY extends P0{constructor(){super(...arguments);this._prefix=JR}get readWrite(){return this}sendDm({recipient_id:f,custom_profile_id:R,...h}){let $={event:{type:XR.Create,[XR.Create]:{target:{recipient_id:f},message_data:h}}};if(R)$.event[XR.Create].custom_profile_id=R;return this.post("direct_messages/events/new.json",$,{forceBodyMode:"json"})}getDmEvent(f){return this.get("direct_messages/events/show.json",{id:f})}deleteDm(f){return this.delete("direct_messages/events/destroy.json",{id:f})}async listDmEvents(f={}){let R={...f},h=await this.get("direct_messages/events/list.json",R,{fullResponse:!0});return new RH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}newWelcomeDm(f,R){let h={[XR.WelcomeCreate]:{name:f,message_data:R}};return this.post("direct_messages/welcome_messages/new.json",h,{forceBodyMode:"json"})}getWelcomeDm(f){return this.get("direct_messages/welcome_messages/show.json",{id:f})}deleteWelcomeDm(f){return this.delete("direct_messages/welcome_messages/destroy.json",{id:f})}updateWelcomeDm(f,R){let h={message_data:R};return this.put("direct_messages/welcome_messages/update.json",h,{forceBodyMode:"json",query:{id:f}})}async listWelcomeDms(f={}){let R={...f},h=await this.get("direct_messages/welcome_messages/list.json",R,{fullResponse:!0});return new hH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}newWelcomeDmRule(f){return this.post("direct_messages/welcome_messages/rules/new.json",{welcome_message_rule:{welcome_message_id:f}},{forceBodyMode:"json"})}getWelcomeDmRule(f){return this.get("direct_messages/welcome_messages/rules/show.json",{id:f})}deleteWelcomeDmRule(f){return this.delete("direct_messages/welcome_messages/rules/destroy.json",{id:f})}async listWelcomeDmRules(f={}){let R={...f};return this.get("direct_messages/welcome_messages/rules/list.json",R)}async setWelcomeDm(f,R=!0){var h;let $=await this.listWelcomeDmRules();if((h=$.welcome_message_rules)===null||h===void 0?void 0:h.length){for(let A of $.welcome_message_rules)if(await this.deleteWelcomeDmRule(A.id),R)await this.deleteWelcomeDm(A.welcome_message_id)}return this.newWelcomeDmRule(f)}markDmAsRead(f,R){return this.post("direct_messages/mark_read.json",{last_read_event_id:f,recipient_id:R},{forceBodyMode:"url"})}indicateDmTyping(f){return this.post("direct_messages/indicate_typing.json",{recipient_id:f},{forceBodyMode:"url"})}async downloadDmImage(f){if(typeof f!=="string"){let h=f[XR.Create].message_data.attachment;if(!h)throw new Error("The given direct message doesn't contain any attachment");f=h.media.media_url_https}let R=await this.get(f,void 0,{forceParseMode:"buffer",prefix:""});if(!R.length)throw new Error("Image not found. Make sure you are logged with credentials able to access direct messages, and check the URL.");return R}}var i$=JY;class _{constructor(f){this.result=f}get tweets(){return _.tweets(this.result)}static tweets(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.tweets)!==null&&h!==void 0?h:[]}tweetById(f){return _.tweetById(this.result,f)}static tweetById(f,R){return this.tweets(f).find((h)=>h.id===R)}retweet(f){return _.retweet(this.result,f)}static retweet(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((A)=>A.type==="retweeted").map((A)=>A.id);return this.tweets(f).find((A)=>$.includes(A.id))}quote(f){return _.quote(this.result,f)}static quote(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((A)=>A.type==="quoted").map((A)=>A.id);return this.tweets(f).find((A)=>$.includes(A.id))}repliedTo(f){return _.repliedTo(this.result,f)}static repliedTo(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((A)=>A.type==="replied_to").map((A)=>A.id);return this.tweets(f).find((A)=>$.includes(A.id))}author(f){return _.author(this.result,f)}static author(f,R){let h=R.author_id;return h?this.users(f).find(($)=>$.id===h):void 0}repliedToAuthor(f){return _.repliedToAuthor(this.result,f)}static repliedToAuthor(f,R){let h=R.in_reply_to_user_id;return h?this.users(f).find(($)=>$.id===h):void 0}get users(){return _.users(this.result)}static users(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.users)!==null&&h!==void 0?h:[]}userById(f){return _.userById(this.result,f)}static userById(f,R){return this.users(f).find((h)=>h.id===R)}pinnedTweet(f){return _.pinnedTweet(this.result,f)}static pinnedTweet(f,R){return R.pinned_tweet_id?this.tweets(f).find((h)=>h.id===R.pinned_tweet_id):void 0}get media(){return _.media(this.result)}static media(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.media)!==null&&h!==void 0?h:[]}medias(f){return _.medias(this.result,f)}static medias(f,R){var h,$;let A=($=(h=R.attachments)===null||h===void 0?void 0:h.media_keys)!==null&&$!==void 0?$:[];return this.media(f).filter((G)=>A.includes(G.media_key))}get polls(){return _.polls(this.result)}static polls(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.polls)!==null&&h!==void 0?h:[]}poll(f){return _.poll(this.result,f)}static poll(f,R){var h,$;let A=($=(h=R.attachments)===null||h===void 0?void 0:h.poll_ids)!==null&&$!==void 0?$:[];if(A.length){let G=A[0];return this.polls(f).find((H)=>H.id===G)}return}get places(){return _.places(this.result)}static places(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.places)!==null&&h!==void 0?h:[]}place(f){return _.place(this.result,f)}static place(f,R){var h;let $=(h=R.geo)===null||h===void 0?void 0:h.place_id;return $?this.places(f).find((A)=>A.id===$):void 0}listOwner(f){return _.listOwner(this.result,f)}static listOwner(f,R){let h=R.owner_id;return h?this.users(f).find(($)=>$.id===h):void 0}spaceCreator(f){return _.spaceCreator(this.result,f)}static spaceCreator(f,R){let h=R.creator_id;return h?this.users(f).find(($)=>$.id===h):void 0}spaceHosts(f){return _.spaceHosts(this.result,f)}static spaceHosts(f,R){var h;let $=(h=R.host_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((A)=>$.includes(A.id))}spaceSpeakers(f){return _.spaceSpeakers(this.result,f)}static spaceSpeakers(f,R){var h;let $=(h=R.speaker_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((A)=>$.includes(A.id))}spaceInvitedUsers(f){return _.spaceInvitedUsers(this.result,f)}static spaceInvitedUsers(f,R){var h;let $=(h=R.invited_user_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((A)=>$.includes(A.id))}}class p$ extends fH{updateIncludes(f){if(f.errors){if(!this._realData.errors)this._realData.errors=[];this._realData.errors=[...this._realData.errors,...f.errors]}if(!f.includes)return;if(!this._realData.includes)this._realData.includes={};let R=this._realData.includes;for(let[h,$]of Object.entries(f.includes)){if(!R[h])R[h]=[];R[h]=[...R[h],...$]}}assertUsable(){if(this.unusable)throw new Error("Unable to use this paginator to fetch more data, as it does not contain any metadata. Check .errors property for more details.")}get meta(){return this._realData.meta}get includes(){var f;if(!((f=this._realData)===null||f===void 0?void 0:f.includes))return new _(this._realData);if(this._includesInstance)return this._includesInstance;return this._includesInstance=new _(this._realData)}get errors(){var f;return(f=this._realData.errors)!==null&&f!==void 0?f:[]}get unusable(){return this.errors.length>0&&!this._realData.meta&&!this._realData.data}}class pf extends p${refreshInstanceFromResult(f,R){var h;let $=f.data,A=(h=$.data)!==null&&h!==void 0?h:[];if(this._rateLimit=f.rateLimit,!this._realData.data)this._realData.data=[];if(R)this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.next_token=$.meta.next_token,this._realData.data.push(...A);else this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.previous_token=$.meta.previous_token,this._realData.data.unshift(...A);this.updateIncludes($)}getNextQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),pagination_token:this._realData.meta.next_token}}getPreviousQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),pagination_token:this._realData.meta.previous_token}}getPageLengthFromRequest(f){var R,h;return(h=(R=f.data.data)===null||R===void 0?void 0:R.length)!==null&&h!==void 0?h:0}isFetchLastOver(f){var R;return!((R=f.data.data)===null||R===void 0?void 0:R.length)||!this.canFetchNextPage(f.data)}canFetchNextPage(f){var R;return!!((R=f.meta)===null||R===void 0?void 0:R.next_token)}}class jH extends p${refreshInstanceFromResult(f,R){var h;let $=f.data,A=(h=$.data)!==null&&h!==void 0?h:[];if(this._rateLimit=f.rateLimit,!this._realData.data)this._realData.data=[];if(R)this._realData.meta.oldest_id=$.meta.oldest_id,this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.next_token=$.meta.next_token,this._realData.data.push(...A);else this._realData.meta.newest_id=$.meta.newest_id,this._realData.meta.result_count+=$.meta.result_count,this._realData.data.unshift(...A);this.updateIncludes($)}getNextQueryParams(f){this.assertUsable();let R={...this.injectQueryParams(f)};if(this._realData.meta.next_token)R.next_token=this._realData.meta.next_token;else{if(R.start_time)R.since_id=this.dateStringToSnowflakeId(R.start_time),delete R.start_time;if(R.end_time)delete R.end_time;R.until_id=this._realData.meta.oldest_id}return R}getPreviousQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),since_id:this._realData.meta.newest_id}}getPageLengthFromRequest(f){var R,h;return(h=(R=f.data.data)===null||R===void 0?void 0:R.length)!==null&&h!==void 0?h:0}isFetchLastOver(f){var R;return!((R=f.data.data)===null||R===void 0?void 0:R.length)||!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!!f.meta.next_token}getItemArray(){return this.tweets}dateStringToSnowflakeId(f){let R=BigInt("1288834974657"),h=new Date(f);if(isNaN(h.valueOf()))throw new Error("Unable to convert start_time/end_time to a valid date. A ISO 8601 DateTime is excepted, please check your input.");return(BigInt(h.valueOf())-R<<BigInt("22")).toString()}get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class q0 extends pf{refreshInstanceFromResult(f,R){super.refreshInstanceFromResult(f,R);let h=f.data;if(R)this._realData.meta.oldest_id=h.meta.oldest_id;else this._realData.meta.newest_id=h.meta.newest_id}getItemArray(){return this.tweets}get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class OH extends jH{constructor(){super(...arguments);this._endpoint="tweets/search/recent"}}class EH extends jH{constructor(){super(...arguments);this._endpoint="tweets/search/all"}}class VH extends q0{constructor(){super(...arguments);this._endpoint="tweets/:id/quote_tweets"}}class TH extends q0{constructor(){super(...arguments);this._endpoint="users/:id/timelines/reverse_chronological"}}class gH extends q0{constructor(){super(...arguments);this._endpoint="users/:id/tweets"}}class CH extends q0{constructor(){super(...arguments);this._endpoint="users/:id/mentions"}}class mH extends q0{constructor(){super(...arguments);this._endpoint="users/:id/bookmarks"}}class cH extends pf{get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}getItemArray(){return this.tweets}}class bH extends cH{constructor(){super(...arguments);this._endpoint="users/:id/liked_tweets"}}class xH extends cH{constructor(){super(...arguments);this._endpoint="lists/:id/tweets"}}class tf extends pf{getItemArray(){return this.users}get users(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class kH extends tf{constructor(){super(...arguments);this._endpoint="users/:id/blocking"}}class sH extends tf{constructor(){super(...arguments);this._endpoint="users/:id/muting"}}class lH extends tf{constructor(){super(...arguments);this._endpoint="users/:id/followers"}}class _H extends tf{constructor(){super(...arguments);this._endpoint="users/:id/following"}}class dH extends tf{constructor(){super(...arguments);this._endpoint="lists/:id/members"}}class aH extends tf{constructor(){super(...arguments);this._endpoint="lists/:id/followers"}}class rH extends tf{constructor(){super(...arguments);this._endpoint="tweets/:id/liking_users"}}class iH extends tf{constructor(){super(...arguments);this._endpoint="tweets/:id/retweeted_by"}}class o$ extends pf{getItemArray(){return this.lists}get lists(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class pH extends o${constructor(){super(...arguments);this._endpoint="users/:id/owned_lists"}}class oH extends o${constructor(){super(...arguments);this._endpoint="users/:id/list_memberships"}}class nH extends o${constructor(){super(...arguments);this._endpoint="users/:id/followed_lists"}}class B0 extends Tf{constructor(){super(...arguments);this._prefix=J0}}class n$ extends pf{getItemArray(){return this.events}get events(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class eH extends n${constructor(){super(...arguments);this._endpoint="dm_events"}}class uH extends n${constructor(){super(...arguments);this._endpoint="dm_conversations/with/:participant_id/dm_events"}}class tH extends n${constructor(){super(...arguments);this._endpoint="dm_conversations/:dm_conversation_id/dm_events"}}class K0 extends Tf{constructor(){super(...arguments);this._prefix=MR}get labs(){if(this._labs)return this._labs;return this._labs=new B0(this)}async search(f,R={}){let h=typeof f==="string"?{...R,query:f}:{...f},$=await this.get("tweets/search/recent",h,{fullResponse:!0});return new OH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async searchAll(f,R={}){let h={...R,query:f},$=await this.get("tweets/search/all",h,{fullResponse:!0});return new EH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}singleTweet(f,R={}){return this.get("tweets/:id",R,{params:{id:f}})}tweets(f,R={}){return this.get("tweets",{ids:f,...R})}tweetCountRecent(f,R={}){return this.get("tweets/counts/recent",{query:f,...R})}tweetCountAll(f,R={}){return this.get("tweets/counts/all",{query:f,...R})}async tweetRetweetedBy(f,R={}){let{asPaginator:h,...$}=R,A=await this.get("tweets/:id/retweeted_by",$,{fullResponse:!0,params:{id:f}});if(!h)return A.data;return new iH({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:$,sharedParams:{id:f}})}async tweetLikedBy(f,R={}){let{asPaginator:h,...$}=R,A=await this.get("tweets/:id/liking_users",$,{fullResponse:!0,params:{id:f}});if(!h)return A.data;return new rH({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:$,sharedParams:{id:f}})}async homeTimeline(f={}){let R=await this.getCurrentUserV2Object(),h=await this.get("users/:id/timelines/reverse_chronological",f,{fullResponse:!0,params:{id:R.data.id}});return new TH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:f,sharedParams:{id:R.data.id}})}async userTimeline(f,R={}){let h=await this.get("users/:id/tweets",R,{fullResponse:!0,params:{id:f}});return new gH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async userMentionTimeline(f,R={}){let h=await this.get("users/:id/mentions",R,{fullResponse:!0,params:{id:f}});return new CH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async quotes(f,R={}){let h=await this.get("tweets/:id/quote_tweets",R,{fullResponse:!0,params:{id:f}});return new VH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async bookmarks(f={}){let R=await this.getCurrentUserV2Object(),h=await this.get("users/:id/bookmarks",f,{fullResponse:!0,params:{id:R.data.id}});return new mH({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:f,sharedParams:{id:R.data.id}})}me(f={}){return this.get("users/me",f)}user(f,R={}){return this.get("users/:id",R,{params:{id:f}})}users(f,R={}){let h=Array.isArray(f)?f.join(","):f;return this.get("users",{...R,ids:h})}userByUsername(f,R={}){return this.get("users/by/username/:username",R,{params:{username:f}})}usersByUsernames(f,R={}){return f=Array.isArray(f)?f.join(","):f,this.get("users/by",{...R,usernames:f})}async followers(f,R={}){let{asPaginator:h,...$}=R,A={id:f};if(!h)return this.get("users/:id/followers",$,{params:A});let G=await this.get("users/:id/followers",$,{fullResponse:!0,params:A});return new lH({realData:G.data,rateLimit:G.rateLimit,instance:this,queryParams:$,sharedParams:A})}async following(f,R={}){let{asPaginator:h,...$}=R,A={id:f};if(!h)return this.get("users/:id/following",$,{params:A});let G=await this.get("users/:id/following",$,{fullResponse:!0,params:A});return new _H({realData:G.data,rateLimit:G.rateLimit,instance:this,queryParams:$,sharedParams:A})}async userLikedTweets(f,R={}){let h={id:f},$=await this.get("users/:id/liked_tweets",R,{fullResponse:!0,params:h});return new bH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async userBlockingUsers(f,R={}){let h={id:f},$=await this.get("users/:id/blocking",R,{fullResponse:!0,params:h});return new kH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async userMutingUsers(f,R={}){let h={id:f},$=await this.get("users/:id/muting",R,{fullResponse:!0,params:h});return new sH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}list(f,R={}){return this.get("lists/:id",R,{params:{id:f}})}async listsOwned(f,R={}){let h={id:f},$=await this.get("users/:id/owned_lists",R,{fullResponse:!0,params:h});return new pH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listMemberships(f,R={}){let h={id:f},$=await this.get("users/:id/list_memberships",R,{fullResponse:!0,params:h});return new oH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listFollowed(f,R={}){let h={id:f},$=await this.get("users/:id/followed_lists",R,{fullResponse:!0,params:h});return new nH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listTweets(f,R={}){let h={id:f},$=await this.get("lists/:id/tweets",R,{fullResponse:!0,params:h});return new xH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listMembers(f,R={}){let h={id:f},$=await this.get("lists/:id/members",R,{fullResponse:!0,params:h});return new dH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listFollowers(f,R={}){let h={id:f},$=await this.get("lists/:id/followers",R,{fullResponse:!0,params:h});return new aH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listDmEvents(f={}){let R=await this.get("dm_events",f,{fullResponse:!0});return new eH({realData:R.data,rateLimit:R.rateLimit,instance:this,queryParams:{...f}})}async listDmEventsWithParticipant(f,R={}){let h={participant_id:f},$=await this.get("dm_conversations/with/:participant_id/dm_events",R,{fullResponse:!0,params:h});return new uH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listDmEventsOfConversation(f,R={}){let h={dm_conversation_id:f},$=await this.get("dm_conversations/:dm_conversation_id/dm_events",R,{fullResponse:!0,params:h});return new tH({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}space(f,R={}){return this.get("spaces/:id",R,{params:{id:f}})}spaces(f,R={}){return this.get("spaces",{ids:f,...R})}spacesByCreators(f,R={}){return this.get("spaces/by/creator_ids",{user_ids:f,...R})}searchSpaces(f){return this.get("spaces/search",f)}spaceBuyers(f,R={}){return this.get("spaces/:id/buyers",R,{params:{id:f}})}spaceTweets(f,R={}){return this.get("spaces/:id/tweets",R,{params:{id:f}})}searchStream({autoConnect:f,...R}={}){return this.getStream("tweets/search/stream",R,{payloadIsError:k$,autoConnect:f})}streamRules(f={}){return this.get("tweets/search/stream/rules",f)}updateStreamRules(f,R={}){return this.post("tweets/search/stream/rules",f,{query:R})}sampleStream({autoConnect:f,...R}={}){return this.getStream("tweets/sample/stream",R,{payloadIsError:k$,autoConnect:f})}sample10Stream({autoConnect:f,...R}={}){return this.getStream("tweets/sample10/stream",R,{payloadIsError:k$,autoConnect:f})}complianceJobs(f){return this.get("compliance/jobs",f)}complianceJob(f){return this.get("compliance/jobs/:id",void 0,{params:{id:f}})}async sendComplianceJob(f){let R=await this.post("compliance/jobs",{type:f.type,name:f.name}),h=f.ids instanceof Buffer?f.ids:Buffer.from(f.ids.join(`
89
89
  `));return await this.put(R.data.upload_url,h,{forceBodyMode:"raw",enableAuth:!1,headers:{"Content-Type":"text/plain"},prefix:""}),R}async complianceJobResult(f){let R=f;while(R.status!=="complete"){if(R.status==="expired"||R.status==="failed")throw new Error("Job failed to be completed.");await new Promise(($)=>setTimeout($,3500)),R=(await this.complianceJob(f.id)).data}return(await this.get(f.download_url,void 0,{enableAuth:!1,prefix:""})).trim().split(`
90
- `).filter(($)=>$).map(($)=>JSON.parse($))}async usage(f={}){return this.get("usage/tweets",f)}community(f,R={}){return this.get("communities/:id",R,{params:{id:f}})}searchCommunities(f,R={}){return this.get("communities/search",{query:f,...R})}}class y0 extends K0{constructor(){super(...arguments);this._prefix=X0}get readOnly(){return this}}class j0 extends v0{constructor(){super(...arguments);this._prefix=JR}get readOnly(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new y0(this)}hideReply(f,R){return this.put("tweets/:id/hidden",{hidden:R},{params:{id:f}})}like(f,R){return this.post("users/:id/likes",{tweet_id:R},{params:{id:f}})}unlike(f,R){return this.delete("users/:id/likes/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}retweet(f,R){return this.post("users/:id/retweets",{tweet_id:R},{params:{id:f}})}unretweet(f,R){return this.delete("users/:id/retweets/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}tweet(f,R={}){if(typeof f==="object")R=f;else R={text:f,...R};return this.post("tweets",R)}async uploadMedia(f,R,h=1048576){let $=R.media_category;if(!R.media_category){if(R.media_type.includes("gif"))$="tweet_gif";else if(R.media_type.includes("image"))$="tweet_image";else if(R.media_type.includes("video"))$="tweet_video"}let A={command:"INIT",media_type:R.media_type,total_bytes:f.length,media_category:$},H=(await this.post("media/upload",A,{forceBodyMode:"form-data"})).data.id,N=Math.ceil(f.length/h),U=new Uint8Array(f);for(let D=0;D<N;D++){let J=D*h,Z=Math.min(J+h,f.length),L=U.slice(J,Z),P=Buffer.from(L),a={command:"APPEND",media_id:H,segment_index:D,media:P};await this.post("media/upload",a,{forceBodyMode:"form-data"})}let F={command:"FINALIZE",media_id:H};if((await this.post("media/upload",F,{forceBodyMode:"form-data"})).data.processing_info)await this.waitForMediaProcessing(H);return H}async waitForMediaProcessing(f){var R;let $=(await this.get("media/upload",{command:"STATUS",media_id:f})).data.processing_info;if(!$)return;switch($.state){case"succeeded":return;case"failed":throw new Error(`Media processing failed: ${(R=$.error)===null||R===void 0?void 0:R.message}`);case"pending":case"in_progress":{let A=$===null||$===void 0?void 0:$.check_after_secs;if(A&&A>0)await new Promise((G)=>setTimeout(G,A*1000)),await this.waitForMediaProcessing(f)}}}createMediaMetadata(f,R){return this.post("media/metadata",{id:f,metadata:R})}reply(f,R,h={}){var $;let A={in_reply_to_tweet_id:R,...($=h.reply)!==null&&$!==void 0?$:{}};return this.post("tweets",{text:f,...h,reply:A})}quote(f,R,h={}){return this.tweet(f,{...h,quote_tweet_id:R})}async tweetThread(f){var R,h;let $=[];for(let A of f){let G=$.length?$[$.length-1]:null,H={...typeof A==="string"?{text:A}:A},N=G?G.data.id:(R=H.reply)===null||R===void 0?void 0:R.in_reply_to_tweet_id,U=(h=H.text)!==null&&h!==void 0?h:"";if(N)$.push(await this.reply(U,N,H));else $.push(await this.tweet(U,H))}return $}deleteTweet(f){return this.delete("tweets/:id",void 0,{params:{id:f}})}async bookmark(f){let R=await this.getCurrentUserV2Object();return this.post("users/:id/bookmarks",{tweet_id:f},{params:{id:R.data.id}})}async deleteBookmark(f){let R=await this.getCurrentUserV2Object();return this.delete("users/:id/bookmarks/:tweet_id",void 0,{params:{id:R.data.id,tweet_id:f}})}follow(f,R){return this.post("users/:id/following",{target_user_id:R},{params:{id:f}})}unfollow(f,R){return this.delete("users/:source_user_id/following/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}block(f,R){return this.post("users/:id/blocking",{target_user_id:R},{params:{id:f}})}unblock(f,R){return this.delete("users/:source_user_id/blocking/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}mute(f,R){return this.post("users/:id/muting",{target_user_id:R},{params:{id:f}})}unmute(f,R){return this.delete("users/:source_user_id/muting/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}createList(f){return this.post("lists",f)}updateList(f,R={}){return this.put("lists/:id",R,{params:{id:f}})}removeList(f){return this.delete("lists/:id",void 0,{params:{id:f}})}addListMember(f,R){return this.post("lists/:id/members",{user_id:R},{params:{id:f}})}removeListMember(f,R){return this.delete("lists/:id/members/:user_id",void 0,{params:{id:f,user_id:R}})}subscribeToList(f,R){return this.post("users/:id/followed_lists",{list_id:R},{params:{id:f}})}unsubscribeOfList(f,R){return this.delete("users/:id/followed_lists/:list_id",void 0,{params:{id:f,list_id:R}})}pinList(f,R){return this.post("users/:id/pinned_lists",{list_id:R},{params:{id:f}})}unpinList(f,R){return this.delete("users/:id/pinned_lists/:list_id",void 0,{params:{id:f,list_id:R}})}sendDmInConversation(f,R){return this.post("dm_conversations/:dm_conversation_id/messages",R,{params:{dm_conversation_id:f}})}sendDmToParticipant(f,R){return this.post("dm_conversations/with/:participant_id/messages",R,{params:{participant_id:f}})}createDmConversation(f){return this.post("dm_conversations",f)}}class DY extends y0{constructor(){super(...arguments);this._prefix=X0}get readWrite(){return this}}var ZY=DY;class MY extends j0{constructor(){super(...arguments);this._prefix=JR}get readWrite(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new ZY(this)}}var JY=MY;class Ch extends QR{get v1(){if(this._v1)return this._v1;return this._v1=new P0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new v0(this)}async currentUser(f=!1){return await this.getCurrentUserObject(f)}async currentUserV2(f=!1){return await this.getCurrentUserV2Object(f)}search(f,R){return this.v2.search(f,R)}async generateAuthLink(f="oob",{authAccessType:R,linkMode:h="authenticate",forceLogin:$,screenName:A}={}){let G=await this.post("https://api.x.com/oauth/request_token",{oauth_callback:f,x_auth_access_type:R}),H=`https://api.x.com/oauth/${h}?oauth_token=${encodeURIComponent(G.oauth_token)}`;if($!==void 0)H+=`&force_login=${encodeURIComponent($)}`;if(A!==void 0)H+=`&screen_name=${encodeURIComponent(A)}`;if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth1RequestToken",{client:this._requestMaker,url:H,oauthResult:G});return{url:H,...G}}async login(f){let R=this.getActiveTokens();if(R.type!=="oauth-1.0a")throw new Error("You must setup TwitterApi instance with consumer keys to accept OAuth 1.0 login");let h=await this.post("https://api.x.com/oauth/access_token",{oauth_token:R.accessToken,oauth_verifier:f}),$=new O0({appKey:R.appKey,appSecret:R.appSecret,accessToken:h.oauth_token,accessSecret:h.oauth_token_secret},this._requestMaker.clientSettings);return{accessToken:h.oauth_token,accessSecret:h.oauth_token_secret,userId:h.user_id,screenName:h.screen_name,client:$}}async appLogin(){let f=this.getActiveTokens();if(f.type!=="oauth-1.0a")throw new Error("You must setup TwitterApi instance with consumer keys to accept app-only login");let h=await new O0({username:f.appKey,password:f.appSecret},this._requestMaker.clientSettings).post("https://api.x.com/oauth2/token",{grant_type:"client_credentials"});return new O0(h.access_token,this._requestMaker.clientSettings)}generateOAuth2AuthLink(f,R={}){var h,$;if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. You can find your client ID in Twitter Developer Portal. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let A=(h=R.state)!==null&&h!==void 0?h:_R.generateRandomString(32),G=_R.getCodeVerifier(),H=_R.getCodeChallengeFromVerifier(G),N=($=R.scope)!==null&&$!==void 0?$:"",U=Array.isArray(N)?N.join(" "):N,F=new URL("https://x.com/i/oauth2/authorize"),S={response_type:"code",client_id:this._requestMaker.clientId,redirect_uri:f,state:A,code_challenge:H,code_challenge_method:"s256",scope:U};Vf.addQueryParamsToUrl(F,S);let D={url:F.toString(),state:A,codeVerifier:G,codeChallenge:H};if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth2RequestToken",{client:this._requestMaker,result:D,redirectUri:f});return D}async loginWithOAuth2({code:f,codeVerifier:R,redirectUri:h}){if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let $=await this.post("https://api.x.com/2/oauth2/token",{code:f,code_verifier:R,redirect_uri:h,grant_type:"authorization_code",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult($)}async refreshOAuth2Token(f){if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let R=await this.post("https://api.x.com/2/oauth2/token",{refresh_token:f,grant_type:"refresh_token",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult(R)}async revokeOAuth2Token(f,R="access_token"){if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");return await this.post("https://api.x.com/2/oauth2/revoke",{client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret,token:f,token_type_hint:R})}parseOAuth2AccessTokenResult(f){let R=new O0(f.access_token,this._requestMaker.clientSettings),h=f.scope.split(" ").filter(($)=>$);return{client:R,expiresIn:f.expires_in,accessToken:f.access_token,scope:h,refreshToken:f.refresh_token}}}class mh extends Ch{get v1(){if(this._v1)return this._v1;return this._v1=new q0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new j0(this)}get readOnly(){return this}}class e$ extends Tf{constructor(){super(...arguments);this._prefix=z0}}class u$ extends e${constructor(){super(...arguments);this._prefix=z0}get readOnly(){return this}}class t$ extends Tf{constructor(){super(...arguments);this._prefix=Q0}}class fA extends t${constructor(){super(...arguments);this._prefix=Q0}get readOnly(){return this}}class XY extends fA{constructor(){super(...arguments);this._prefix=Q0}get readWrite(){return this}}var zY=XY;class QY extends u${constructor(){super(...arguments);this._prefix=z0}get readWrite(){return this}get sandbox(){if(this._sandbox)return this._sandbox;return this._sandbox=new zY(this)}}var wY=QY;class RA extends mh{get v1(){if(this._v1)return this._v1;return this._v1=new i$(this)}get v2(){if(this._v2)return this._v2;return this._v2=new JY(this)}get readWrite(){return this}get ads(){if(this._ads)return this._ads;return this._ads=new wY(this)}static getErrors(f){var R;if(typeof f!=="object")return[];if(!("data"in f))return[];return(R=f.data.errors)!==null&&R!==void 0?R:[]}static getProfileImageInSize(f,R){let h=f.split("/").pop(),$=["normal","bigger","mini"],A=f;for(let H of $)if(h.includes(`_${H}`)){A=f.replace(`_${H}`,"");break}if(R==="original")return A;let G=A.lastIndexOf(".");if(G!==-1){let H=A.slice(G+1);return A.slice(0,G)+"_"+R+"."+H}else return A+"_"+R}}var O0=RA;var tz={clientId:process.env.X_CLIENT_ID,clientSecret:process.env.X_SECRET,redirectPath:"/auth/oauth/x/callback",scope:["tweet.read","users.read","offline.access"]};class LY extends J0{config;client;oauthStates=new Map;constructor(f={}){super();this.config={...tz,...f},this.client=new RA({clientId:this.config.clientId,clientSecret:this.config.clientSecret})}getRedirectUrl(){let{url:f,codeVerifier:R,state:h}=this.client.generateOAuth2AuthLink(`${process.env.HOST_NAME}${this.config.redirectPath}`,{scope:this.config.scope});return this.oauthStates.set(h,{state:h,codeVerifier:R}),c$.to(f),f}async onCallback(f){let R=f.search.get("code"),h=f.search.get("state"),$=this.oauthStates.get(h);if(!$)throw new Error("Invalid or expired OAuth state");let A=await this.client.loginWithOAuth2({code:R,codeVerifier:$.codeVerifier,redirectUri:`${process.env.HOST_NAME}${this.config.redirectPath}`});this.oauthStates.delete(h);let{data:G}=await A.client.v2.me({"user.fields":["name","username","entities"]}),{name:H,email:N,id:U="",username:F}=G??{};return{name:H,email:N,username:F,providerId:U}}}class IY extends p{kernel;jobs=[];constructor(f){super();this.kernel=f}boot(){}}class PY{name;cron;callback(){}onTick(){}onComplete(){}static exp(f){return f}}export{LY as XOAuthProvider,kS as ViewRouterServiceProvider,m$ as Sharp,HF as S3Driver,g$ as ResendDriver,NF as RateLimiterServiceProvider,t1 as RateLimiterDriver,_S as QueueServiceProvider,J0 as OAuthProvider,lS as LoggingServiceProvider,aS as Job,f$ as InMemoryRateLimiter,rS as ImageOptimizationServiceProvider,C$ as ImageOptimizationDriver,iS as GoogleOAuthProvider,bh as FileSystemDriver,RN as FileStorageServiceProvider,dR as FileStorageDriver,bS as EmailServiceProvider,T$ as EmailDriver,IY as CronServiceProvider,PY as CronJob,xS as BroadcastingServiceProvider,sS as ApiRouterServiceProvider};export{RN as W,sS as X,NF as Y,bS as Z,xS as _,kS as $,lS as aa,_S as ba,rS as ca,IY as da};
90
+ `).filter(($)=>$).map(($)=>JSON.parse($))}async usage(f={}){return this.get("usage/tweets",f)}community(f,R={}){return this.get("communities/:id",R,{params:{id:f}})}searchCommunities(f,R={}){return this.get("communities/search",{query:f,...R})}}class v0 extends B0{constructor(){super(...arguments);this._prefix=J0}get readOnly(){return this}}class y0 extends K0{constructor(){super(...arguments);this._prefix=MR}get readOnly(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new v0(this)}hideReply(f,R){return this.put("tweets/:id/hidden",{hidden:R},{params:{id:f}})}like(f,R){return this.post("users/:id/likes",{tweet_id:R},{params:{id:f}})}unlike(f,R){return this.delete("users/:id/likes/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}retweet(f,R){return this.post("users/:id/retweets",{tweet_id:R},{params:{id:f}})}unretweet(f,R){return this.delete("users/:id/retweets/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}tweet(f,R={}){if(typeof f==="object")R=f;else R={text:f,...R};return this.post("tweets",R)}async uploadMedia(f,R,h=1048576){let $=R.media_category;if(!R.media_category){if(R.media_type.includes("gif"))$="tweet_gif";else if(R.media_type.includes("image"))$="tweet_image";else if(R.media_type.includes("video"))$="tweet_video"}let A={command:"INIT",media_type:R.media_type,total_bytes:f.length,media_category:$},H=(await this.post("media/upload",A,{forceBodyMode:"form-data"})).data.id,N=Math.ceil(f.length/h),U=new Uint8Array(f);for(let D=0;D<N;D++){let J=D*h,Z=Math.min(J+h,f.length),L=U.slice(J,Z),P=Buffer.from(L),a={command:"APPEND",media_id:H,segment_index:D,media:P};await this.post("media/upload",a,{forceBodyMode:"form-data"})}let F={command:"FINALIZE",media_id:H};if((await this.post("media/upload",F,{forceBodyMode:"form-data"})).data.processing_info)await this.waitForMediaProcessing(H);return H}async waitForMediaProcessing(f){var R;let $=(await this.get("media/upload",{command:"STATUS",media_id:f})).data.processing_info;if(!$)return;switch($.state){case"succeeded":return;case"failed":throw new Error(`Media processing failed: ${(R=$.error)===null||R===void 0?void 0:R.message}`);case"pending":case"in_progress":{let A=$===null||$===void 0?void 0:$.check_after_secs;if(A&&A>0)await new Promise((G)=>setTimeout(G,A*1000)),await this.waitForMediaProcessing(f)}}}createMediaMetadata(f,R){return this.post("media/metadata",{id:f,metadata:R})}reply(f,R,h={}){var $;let A={in_reply_to_tweet_id:R,...($=h.reply)!==null&&$!==void 0?$:{}};return this.post("tweets",{text:f,...h,reply:A})}quote(f,R,h={}){return this.tweet(f,{...h,quote_tweet_id:R})}async tweetThread(f){var R,h;let $=[];for(let A of f){let G=$.length?$[$.length-1]:null,H={...typeof A==="string"?{text:A}:A},N=G?G.data.id:(R=H.reply)===null||R===void 0?void 0:R.in_reply_to_tweet_id,U=(h=H.text)!==null&&h!==void 0?h:"";if(N)$.push(await this.reply(U,N,H));else $.push(await this.tweet(U,H))}return $}deleteTweet(f){return this.delete("tweets/:id",void 0,{params:{id:f}})}async bookmark(f){let R=await this.getCurrentUserV2Object();return this.post("users/:id/bookmarks",{tweet_id:f},{params:{id:R.data.id}})}async deleteBookmark(f){let R=await this.getCurrentUserV2Object();return this.delete("users/:id/bookmarks/:tweet_id",void 0,{params:{id:R.data.id,tweet_id:f}})}follow(f,R){return this.post("users/:id/following",{target_user_id:R},{params:{id:f}})}unfollow(f,R){return this.delete("users/:source_user_id/following/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}block(f,R){return this.post("users/:id/blocking",{target_user_id:R},{params:{id:f}})}unblock(f,R){return this.delete("users/:source_user_id/blocking/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}mute(f,R){return this.post("users/:id/muting",{target_user_id:R},{params:{id:f}})}unmute(f,R){return this.delete("users/:source_user_id/muting/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}createList(f){return this.post("lists",f)}updateList(f,R={}){return this.put("lists/:id",R,{params:{id:f}})}removeList(f){return this.delete("lists/:id",void 0,{params:{id:f}})}addListMember(f,R){return this.post("lists/:id/members",{user_id:R},{params:{id:f}})}removeListMember(f,R){return this.delete("lists/:id/members/:user_id",void 0,{params:{id:f,user_id:R}})}subscribeToList(f,R){return this.post("users/:id/followed_lists",{list_id:R},{params:{id:f}})}unsubscribeOfList(f,R){return this.delete("users/:id/followed_lists/:list_id",void 0,{params:{id:f,list_id:R}})}pinList(f,R){return this.post("users/:id/pinned_lists",{list_id:R},{params:{id:f}})}unpinList(f,R){return this.delete("users/:id/pinned_lists/:list_id",void 0,{params:{id:f,list_id:R}})}sendDmInConversation(f,R){return this.post("dm_conversations/:dm_conversation_id/messages",R,{params:{dm_conversation_id:f}})}sendDmToParticipant(f,R){return this.post("dm_conversations/with/:participant_id/messages",R,{params:{participant_id:f}})}createDmConversation(f){return this.post("dm_conversations",f)}}class XY extends v0{constructor(){super(...arguments);this._prefix=J0}get readWrite(){return this}}var zY=XY;class QY extends y0{constructor(){super(...arguments);this._prefix=MR}get readWrite(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new zY(this)}}var wY=QY;class gh extends zR{get v1(){if(this._v1)return this._v1;return this._v1=new I0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new K0(this)}async currentUser(f=!1){return await this.getCurrentUserObject(f)}async currentUserV2(f=!1){return await this.getCurrentUserV2Object(f)}search(f,R){return this.v2.search(f,R)}async generateAuthLink(f="oob",{authAccessType:R,linkMode:h="authenticate",forceLogin:$,screenName:A}={}){let G=await this.post("https://api.x.com/oauth/request_token",{oauth_callback:f,x_auth_access_type:R}),H=`https://api.x.com/oauth/${h}?oauth_token=${encodeURIComponent(G.oauth_token)}`;if($!==void 0)H+=`&force_login=${encodeURIComponent($)}`;if(A!==void 0)H+=`&screen_name=${encodeURIComponent(A)}`;if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth1RequestToken",{client:this._requestMaker,url:H,oauthResult:G});return{url:H,...G}}async login(f){let R=this.getActiveTokens();if(R.type!=="oauth-1.0a")throw new Error("You must setup TwitterApi instance with consumer keys to accept OAuth 1.0 login");let h=await this.post("https://api.x.com/oauth/access_token",{oauth_token:R.accessToken,oauth_verifier:f}),$=new j0({appKey:R.appKey,appSecret:R.appSecret,accessToken:h.oauth_token,accessSecret:h.oauth_token_secret},this._requestMaker.clientSettings);return{accessToken:h.oauth_token,accessSecret:h.oauth_token_secret,userId:h.user_id,screenName:h.screen_name,client:$}}async appLogin(){let f=this.getActiveTokens();if(f.type!=="oauth-1.0a")throw new Error("You must setup TwitterApi instance with consumer keys to accept app-only login");let h=await new j0({username:f.appKey,password:f.appSecret},this._requestMaker.clientSettings).post("https://api.x.com/oauth2/token",{grant_type:"client_credentials"});return new j0(h.access_token,this._requestMaker.clientSettings)}generateOAuth2AuthLink(f,R={}){var h,$;if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. You can find your client ID in Twitter Developer Portal. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let A=(h=R.state)!==null&&h!==void 0?h:lR.generateRandomString(32),G=lR.getCodeVerifier(),H=lR.getCodeChallengeFromVerifier(G),N=($=R.scope)!==null&&$!==void 0?$:"",U=Array.isArray(N)?N.join(" "):N,F=new URL("https://x.com/i/oauth2/authorize"),S={response_type:"code",client_id:this._requestMaker.clientId,redirect_uri:f,state:A,code_challenge:H,code_challenge_method:"s256",scope:U};Vf.addQueryParamsToUrl(F,S);let D={url:F.toString(),state:A,codeVerifier:G,codeChallenge:H};if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth2RequestToken",{client:this._requestMaker,result:D,redirectUri:f});return D}async loginWithOAuth2({code:f,codeVerifier:R,redirectUri:h}){if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let $=await this.post("https://api.x.com/2/oauth2/token",{code:f,code_verifier:R,redirect_uri:h,grant_type:"authorization_code",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult($)}async refreshOAuth2Token(f){if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let R=await this.post("https://api.x.com/2/oauth2/token",{refresh_token:f,grant_type:"refresh_token",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult(R)}async revokeOAuth2Token(f,R="access_token"){if(!this._requestMaker.clientId)throw new Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");return await this.post("https://api.x.com/2/oauth2/revoke",{client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret,token:f,token_type_hint:R})}parseOAuth2AccessTokenResult(f){let R=new j0(f.access_token,this._requestMaker.clientSettings),h=f.scope.split(" ").filter(($)=>$);return{client:R,expiresIn:f.expires_in,accessToken:f.access_token,scope:h,refreshToken:f.refresh_token}}}class Ch extends gh{get v1(){if(this._v1)return this._v1;return this._v1=new P0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new y0(this)}get readOnly(){return this}}class e$ extends Tf{constructor(){super(...arguments);this._prefix=X0}}class u$ extends e${constructor(){super(...arguments);this._prefix=X0}get readOnly(){return this}}class t$ extends Tf{constructor(){super(...arguments);this._prefix=z0}}class fA extends t${constructor(){super(...arguments);this._prefix=z0}get readOnly(){return this}}class LY extends fA{constructor(){super(...arguments);this._prefix=z0}get readWrite(){return this}}var IY=LY;class PY extends u${constructor(){super(...arguments);this._prefix=X0}get readWrite(){return this}get sandbox(){if(this._sandbox)return this._sandbox;return this._sandbox=new IY(this)}}var qY=PY;class RA extends Ch{get v1(){if(this._v1)return this._v1;return this._v1=new i$(this)}get v2(){if(this._v2)return this._v2;return this._v2=new wY(this)}get readWrite(){return this}get ads(){if(this._ads)return this._ads;return this._ads=new qY(this)}static getErrors(f){var R;if(typeof f!=="object")return[];if(!("data"in f))return[];return(R=f.data.errors)!==null&&R!==void 0?R:[]}static getProfileImageInSize(f,R){let h=f.split("/").pop(),$=["normal","bigger","mini"],A=f;for(let H of $)if(h.includes(`_${H}`)){A=f.replace(`_${H}`,"");break}if(R==="original")return A;let G=A.lastIndexOf(".");if(G!==-1){let H=A.slice(G+1);return A.slice(0,G)+"_"+R+"."+H}else return A+"_"+R}}var j0=RA;var $9={clientId:process.env.X_CLIENT_ID,clientSecret:process.env.X_SECRET,redirectPath:"/auth/oauth/x/callback",scope:["tweet.read","users.read","offline.access"]};class BY extends M0{config;client;oauthStates=new Map;constructor(f={}){super();this.config={...$9,...f},this.client=new RA({clientId:this.config.clientId,clientSecret:this.config.clientSecret})}getRedirectUrl(){let{url:f,codeVerifier:R,state:h}=this.client.generateOAuth2AuthLink(`${process.env.HOST_NAME}${this.config.redirectPath}`,{scope:this.config.scope});return this.oauthStates.set(h,{state:h,codeVerifier:R}),c$.to(f),f}async onCallback(f){let R=f.search.get("code"),h=f.search.get("state"),$=this.oauthStates.get(h);if(!$)throw new Error("Invalid or expired OAuth state");let A=await this.client.loginWithOAuth2({code:R,codeVerifier:$.codeVerifier,redirectUri:`${process.env.HOST_NAME}${this.config.redirectPath}`});this.oauthStates.delete(h);let{data:G}=await A.client.v2.me({"user.fields":["name","username","entities"]}),{name:H,email:N,id:U="",username:F}=G??{};return{name:H,email:N,username:F,providerId:U}}}class KY extends p{kernel;jobs=[];constructor(f){super();this.kernel=f}boot(){}}class vY{name;cron;callback(){}onTick(){}onComplete(){}static exp(f){return f}}export{BY as XOAuthProvider,dS as ViewRouterServiceProvider,m$ as Sharp,WF as S3Driver,g$ as ResendDriver,SF as RateLimiterServiceProvider,t1 as RateLimiterDriver,iS as QueueServiceProvider,M0 as OAuthProvider,rS as LoggingServiceProvider,oS as Job,f$ as InMemoryRateLimiter,nS as ImageOptimizationServiceProvider,C$ as ImageOptimizationDriver,eS as GoogleOAuthProvider,ch as FileSystemDriver,RN as FileStorageServiceProvider,_R as FileStorageDriver,lS as EmailServiceProvider,T$ as EmailDriver,KY as CronServiceProvider,vY as CronJob,_S as BroadcastingServiceProvider,aS as ApiRouterServiceProvider};export{RN as X,aS as Y,SF as Z,lS as _,_S as $,dS as aa,rS as ba,iS as ca,nS as da,KY as ea};
91
91
 
92
- //# debugId=876EE85B275B9FC264756E2164756E21
92
+ //# debugId=292D3B03542C9F5364756E2164756E21