
    \j4              
       p   S SK Jr  S SK Jr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S S	KJ
r
  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S\S\4S jrS\S\SS4S jr S\S\S\S\\   SS4
S jr!S\S\S\S\\   SS4
S jr"g)     )Optional)TextIO)
attributes)callback_interfaces)	constants)constructors)global_mixins)interface_declaration)	iterables)named_and_indexed_properties)
namespaces)
operations)GenerationContext)"fully_qualified_name_for_interface)#implementation_header_for_interface)GeneratedIncludes)#interface_requires_custom_prototype)#interface_supports_named_properties)parameter_list_length)IDLType)	Interface	interfacereturnc                    [        U R                  5      =(       d    [        U R                  5      =(       d    U R                  S L=(       d    U R                  S L=(       d    U R
                  S L=(       dw    U R                  S L=(       db    U R                  S L=(       dM    U R                  S L=(       d8    U R                  S L=(       d#    U R                  S L=(       d    U R                  S L$ N)boolregular_attributesregular_operationsstringifierindexed_property_getternamed_property_getternamed_property_setternamed_property_deletermaplikesetlikeiterableasync_iterable)r   s    X/mnt/mint/home/seanl/public/Repos/ladybird/Meta/Generators/libweb_bindings/interfaces.pyinterface_needs_impl_fromr)      s    Y))* 
	0	,,-
	0  ,
	0 ,,D8
	0 **$6	
	0
 **$6
	0 ++47
	0 D(
	0 D(
	0 T)
	0 ##4/    outNc                     [        U5      (       d  g SnUR                  S;   a  SnU R                  S[        U5       SU S[        U5       SUR                   S[        U5       S	35        g )
N EventTargetWindowzo
    if (auto window_proxy = js_value.as_if<HTML::WindowProxy>())
        return window_proxy->window().ptr();
z.[[maybe_unused]] static JS::ThrowCompletionOr<z/*> impl_from(JS::VM& vm, JS::Value js_value)
{
z$
    if (auto impl = js_value.as_if<zq>())
        return impl.ptr();
    return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "z5");
}

[[maybe_unused]] static JS::ThrowCompletionOr<z*> impl_from(JS::VM& vm)
{
    auto this_value = vm.this_value();
    if (this_value.is_nullish())
        this_value = &vm.current_realm()->global_object();
    return impl_from(vm, this_value);
}

)r)   namewriter   namespaced_name)r+   r   window_proxy_special_cases      r(   write_impl_fromr5   .   s    $Y// "~~22%!
 II:;]^g;h:i j  $$Fy$Q#R SRR[RkRkQl m/ 0RR[/\.] ^	r*   includescontextc                 :    Uc  g [         R                  " XX#5        g r   )r
   write_declaration)r+   r6   r7   r   s       r(   r9   r9   N   s     ++C7Nr*   c                    Uc  g UR                   (       a  [        R                  " XX5        g UR                  (       a  [        R
                  " XX5        g UR                  S5        UR                  S5        UR                  S5        UR                  UR                  5        UR                  (       aR  UR                  [        UR                  5      5      nUR                  U(       a  UR                  OUR                  5        UR                  [        U5      5        [        U5      (       a"  UR                  S5        UR                  S5        UR                  S;   a2  [        U5      (       a"  UR                  S5        UR                  S5        UR                  (       a3  UR                  S	5        UR                  S
5        UR                  S5        SnUR                  S:X  a  SnUR                  (       a  SUR                   SUR                   S3nSnUR                  (       a  [!        S UR                   5       5      nU R#                  SUR$                   SUR                  (       a  SUR                   SUR                   S3OS SU SUR                   SUR&                   SUR(                   S35        [*        R,                  " XX5        [.        R0                  " XU5        [2        R4                  " XU5        U R#                  SUR$                   SUR$                   S35        UR                  (       aW  [7        UR                  5      S :X  a&  [        R8                  " XXUR                  S   5        O7[        R:                  " XX5        OU R#                  S!UR                   S"35        U R#                  S#5        [7        UR                  5      S :  a6  [=        UR                  5       H  u  px[        R>                  " XXX5        M     [A        U5      (       a  U R#                  S$UR&                   S%UR&                   S&UR&                   S'U S(UR&                   S)UR&                   S*35        S+URB                  ;   a  U R#                  S,UR&                   S-35        U R#                  S.UR&                   S/35        OU R#                  SUR&                   S035        U R#                  S1U S235        [E        U5      (       a=  UR                  S5        U R#                  S3UR&                   SUR                   S435        S+URB                  ;   a  U R#                  S5UR(                   S635        [A        U5      (       a  U R#                  S75        U R#                  S#5        [G        X5        [2        RH                  " XX5        [.        RJ                  " XX5        [L        RN                  " XU5        [P        RR                  " XX5        g [.        RT                  " XU5        UR                  S8:X  a"  UR                  S95        U R#                  S:5        [2        RV                  " XU5        [2        RX                  " XU5        [L        RZ                  " XU5        [\        R^                  " XU5        [\        R`                  " X5        [\        Rb                  " XU5        [\        Rd                  " XU5        [L        Rf                  " XU5        [L        Rh                  " XU5        [L        Rj                  " XU5        [*        R,                  " XX5        [2        Rl                  " XU5        U R#                  S5UR(                   S635        [A        U5      (       a  U R#                  S75        U R#                  S;UR&                   S<35        [.        Rn                  " XU5        [2        RV                  " XUS=S>9  [2        RX                  " XUS=S>9  U R#                  S#5        [G        X5        [2        RH                  " XX5        [.        RJ                  " XX5        [.        Rp                  " XX5        [.        Rr                  " XX5        [2        Rt                  " XX5        [2        Rv                  " XX5        [L        Rx                  " XX5        [\        Rz                  " XX5        [\        R|                  " XU5        [\        R~                  " XX5        [\        R                  " XU5        [\        R                  " XX5        [\        R                  " XX5        [L        R                  " XX5        [L        R                  " XX5        [L        R                  " XX5        [L        RN                  " XU5        [P        RR                  " XX5        g )?NzLibJS/Runtime/ValueInlines.hzLibWeb/Bindings/Intrinsics.hzLibWeb/WebIDL/Tracing.hzLibJS/Runtime/Error.hz"LibWeb/Bindings/ExceptionOrUtils.hr.   zLibWeb/HTML/Window.hzLibWeb/HTML/WindowProxy.hz"LibJS/Runtime/AbstractOperations.hzLibJS/Runtime/Realm.hz%realm.intrinsics().object_prototype()DOMExceptionz$realm.intrinsics().error_prototype()zGC::Ref { ensure_web_prototype<zPrototype>(realm, "z"_fly_string) }r   c              3   L   #    U  H  n[        UR                  5      v   M     g 7fr   )r   
parameters).0constructors     r(   	<genexpr>'write_implementation.<locals>.<genexpr>   s#      !
Mck!+"8"899Mcs   "$zvoid z::initialize(JS::Realm& realm, JS::NativeFunction& object)
{
    auto& vm = realm.vm();
    [[maybe_unused]] u8 default_attributes = JS::Attribute::Enumerable;

    z-object.set_prototype(&ensure_web_constructor<z"_fly_string));r-   z>
    object.define_direct_property(vm.names.length, JS::Value(zs), JS::Attribute::Configurable);
    object.define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "zt"_utf16), JS::Attribute::Configurable);
    object.define_direct_property(vm.names.prototype, &ensure_web_prototype<z
>(realm, "z"_fly_string), 0);
z.}

JS::ThrowCompletionOr<GC::Ref<JS::Object>> z::construct([[maybe_unused]] InterfaceConstructor& constructor, [[maybe_unused]] JS::FunctionObject& new_target)
{
    WebIDL::log_trace(constructor.vm(), "z::construct");
   z]    return constructor.vm().throw_completion<JS::TypeError>(JS::ErrorType::NotAConstructor, "z");
z}

zGC_DEFINE_ALLOCATOR(z);

z::zQ([[maybe_unused]] JS::Realm& realm)
    : Object(ConstructWithPrototypeTag::Tag, z)
{
}

z::~z()
{
}

GlobalzJS::ThrowCompletionOr<bool> z::internal_set_prototype_of(JS::Object* prototype)
{
    // 1. Return ? SetImmutablePrototype(O, V).
    return set_immutable_prototype(prototype);
}

z
void z;::initialize(JS::Realm& realm)
{
    auto& object = *this;
z5::initialize(JS::Realm& realm, JS::Object& object)
{
z    [[maybe_unused]] auto& vm = realm.vm();
    [[maybe_unused]] u8 default_attributes = JS::Attribute::Enumerable | JS::Attribute::Configurable | JS::Attribute::Writable;

    object.set_prototype(z);
z/    object.set_prototype(&ensure_web_prototype<zProperties"_fly_string));
zi    object.define_direct_property(vm.well_known_symbol_to_string_tag(), JS::PrimitiveString::create(vm, "z("_utf16), JS::Attribute::Configurable);
z    Base::initialize(realm);
CSSStylePropertiesz(LibWeb/CSS/GeneratedCSSStyleProperties.hz<    GeneratedCSSStyleProperties::initialize(realm, object);
z}

void z::define_unforgeable_attributes(JS::Realm& realm, [[maybe_unused]] JS::Object& object)
{
    [[maybe_unused]] auto& vm = realm.vm();
    [[maybe_unused]] u8 default_attributes = JS::Attribute::Enumerable;
T)unforgeable)Fis_callback_interfacer   'write_callback_interface_implementationis_namespacer   write_namespace_implementationaddadd_bindingimplemented_nameparent_namer   r   r   r)   r1   r   minr2   constructor_classprototype_classr3   r   define_the_constantsr   define_the_static_attributesr   define_the_static_operationslenwrite_constructor_steps"write_constructor_overload_arbiter	enumeratewrite_constructor_functionr   extended_attributesr   r5   write_static_operationswrite_static_attribute_gettersr   ,write_named_properties_object_implementationr	   !write_global_mixin_implementationdefine_the_regular_attributesdefine_the_regular_operationsdefine_the_stringifier"define_the_indexed_property_getterr   $define_the_pair_iterable_declaration%define_the_async_iterable_declarationdefine_the_maplike_declarationdefine_the_setlike_declaration define_the_named_property_getter define_the_named_property_setter!define_the_named_property_deleterdefine_unscopable_members!define_the_unforgeable_attributeswrite_attribute_getterswrite_attribute_setterswrite_regular_operationswrite_stringifierwrite_indexed_property_getter)write_pair_iterable_declaration_functions'write_iterator_prototype_implementation*write_async_iterable_declaration_functions-write_async_iterator_prototype_implementation#write_maplike_declaration_functions#write_setlike_declaration_functionswrite_named_property_getterwrite_named_property_setterwrite_named_property_deleter)	r+   r6   r7   r   parent_interfaceparent_prototypeconstructor_lengthoverload_indexr?   s	            r(   write_implementationr}   W   s    &&CCCRZf11#TLL/0LL/0LL*+334",,WY5J5J-KLBR->>XaXmXmnLL4Y?@ ++,-9:~~227PQZ7[7[+,019:,-9:>~~' B=i>S>S=TTghqh}h}g~  O  P  !
MVMcMc!
 
 II%	334 5
 JS  J_  J_4Y5J5J4KK^_h_t_t^u  vE  F  eg  h h>>P=Q RSS\SaSaRb cMMVMfMfLggqr{  sL  sL  rM M	 	 ""3E++C9E++C9EII,,5,G,G+H I**3*E*E)F G		 y%%&!+00xT]TjTjklTmn;;C(^		klulzlzk{  |A  B	
 IIg
9!!"Q&+4Y5K5K+L'N33C(Wbs ,M +955		$Y%>%>$? @
 2i778 9..>-? @  3y889 :	
 y444II6y7P7P6Q R   			   ! 	 			eI556 7  	 II ++ ,	 +95534		=i>W>W=XXbclcqcqbr  sN  O	
 9000		w  yB  yR  yR  xS  S|  }	
 /y99II67		''**3M11#T$QQRUajk77hZ,,SIF~~--?@		QR,,SIF%%cY? CCCS\]223)L33CC,,SIF,,SIF AA#PYZ AA#PYZ BB3QZ[""3E((	BII
st}  uN  uN  tO  Ox  	y +955		23II   !  00	J,,SISWX%%cYDQIIgC#&&sXI--cHP&&sXI&&sXI''hJ  xC >>sXa77hZ55cYO88x[;;C9U11#T11#T <<S8_ <<S8_ ==cH` MMc]fg33C(Vr*   )#typingr   r   Generators.libweb_bindingsr   r   r   r   r	   r
   r   r   r   r   "Generators.libweb_bindings.contextr   $Generators.libweb_bindings.cpp_typesr   r   #Generators.libweb_bindings.includesr   0Generators.libweb_bindings.interface_declarationr   7Generators.libweb_bindings.named_and_indexed_propertiesr   .Generators.libweb_bindings.overload_resolutionr   Utils.webidl_parserr   r   r   r)   r5   r9   r}    r*   r(   <module>r      s      1 : 0 3 4 < 0 C 1 1 @ S T A ` g P ' ) t   I $ @O	O,O7HOU]^gUhO	OCW	CW,CW7HCWU]^gUhCW	CWr*   