diff --git a/android/app/src/main/kotlin/org/getlantern/lantern/handler/MethodHandler.kt b/android/app/src/main/kotlin/org/getlantern/lantern/handler/MethodHandler.kt index a01238345d..e70974fdfd 100644 --- a/android/app/src/main/kotlin/org/getlantern/lantern/handler/MethodHandler.kt +++ b/android/app/src/main/kotlin/org/getlantern/lantern/handler/MethodHandler.kt @@ -130,6 +130,15 @@ enum class Methods(val method: String) { SetRoutingMode("setRoutingMode"), IsSmartRoutingEnabled("isSmartRoutingEnabled"), + // Share My Connection (samizdat) + Unbounded (broflake) peer-share + SetPeerProxyEnabled("setPeerProxyEnabled"), + IsPeerProxyEnabled("isPeerProxyEnabled"), + SetPeerManualPort("setPeerManualPort"), + GetPeerManualPort("getPeerManualPort"), + SetUnboundedEnabled("setUnboundedEnabled"), + IsUnboundedEnabled("isUnboundedEnabled"), + ProbeUPnP("probeUPnP"), + // Telemetry IsTelemetryEnabled("isTelemetryEnabled"), @@ -1221,6 +1230,66 @@ class MethodHandler : FlutterPlugin, } } + // Share My Connection (samizdat) + Unbounded (broflake) + // peer-share. Phones on mobile data won't have UPnP, but + // home WiFi does — manual port forwarding works there too, + // so the whole stack is exposed on Android rather than + // desktop-only. + Methods.SetPeerProxyEnabled.method -> { + scope.handleResult(result, "set_peer_proxy_enabled") { + val enabled = call.argument("enabled") + ?: error("Missing enabled") + Mobile.setPeerShareEnabled(enabled) + } + } + + Methods.IsPeerProxyEnabled.method -> { + scope.handleValue(result, "is_peer_proxy_enabled") { + Mobile.isPeerShareEnabled() + } + } + + Methods.SetPeerManualPort.method -> { + scope.handleResult(result, "set_peer_manual_port") { + // error() surfaces the failure rather than silently + // defaulting to 0 — which would clear the user's + // manual port override on caller bugs. Matches the + // SetPeerProxyEnabled pattern above. + val port = call.argument("port") ?: error("Missing port") + Mobile.setPeerManualPort(port.toLong()) + } + } + + Methods.GetPeerManualPort.method -> { + scope.handleValue(result, "get_peer_manual_port") { + Mobile.getPeerManualPort().toInt() + } + } + + Methods.SetUnboundedEnabled.method -> { + scope.handleResult(result, "set_unbounded_enabled") { + val enabled = call.argument("enabled") + ?: error("Missing enabled") + Mobile.setUnboundedEnabled(enabled) + } + } + + Methods.IsUnboundedEnabled.method -> { + scope.handleValue(result, "is_unbounded_enabled") { + Mobile.isUnboundedEnabled() + } + } + + Methods.ProbeUPnP.method -> { + // UPnP M-SEARCH waits up to ~6s on multicast replies; + // handleValue is already coroutine-backed (Dispatchers.IO + // via scope), so the wait runs off the main thread and + // doesn't block the Flutter UI isolate. + scope.handleValue(result, "probe_upnp") { + Mobile.probeUPnP() + } + } + Methods.IsTelemetryEnabled.method -> { scope.handleValue(result, "is_telemetry_enabled") { Mobile.isTelemetryEnabled() diff --git a/assets/locales/en.po b/assets/locales/en.po index f705fc01c6..792c034b96 100644 --- a/assets/locales/en.po +++ b/assets/locales/en.po @@ -551,6 +551,129 @@ msgstr "Block Ads" msgid "only_active" msgstr "Only active when VPN is connected" +msgid "share_my_connection" +msgstr "Share My Connection" + +msgid "share_my_connection_subtitle" +msgstr "Let other Lantern users route through your connection to bypass censorship." + +msgid "share_my_connection_on_tap_to_view" +msgstr "On — tap to view" + +# Share My Connection screen — body / hero copy +msgid "smc_intro" +msgstr "Help others bypass censorship by sharing a small portion of your home internet connection. While sharing is on, traffic from users in censored regions will egress through your IP." + +# Status card — phase labels +msgid "smc_status_label" +msgstr "Status" + +msgid "smc_status_off" +msgstr "Off" + +msgid "smc_status_probing" +msgstr "Probing your network…" + +msgid "smc_status_active_unbounded" +msgstr "Active — sharing via Unbounded (WebRTC)" + +msgid "smc_status_active_smc" +msgstr "Active — sharing via Share My Connection (residential proxy)" + +msgid "smc_status_mapping_port" +msgstr "Opening port on your router…" + +msgid "smc_status_detecting_ip" +msgstr "Detecting your public IP…" + +msgid "smc_status_registering" +msgstr "Registering with Lantern…" + +msgid "smc_status_starting_proxy" +msgstr "Starting local proxy…" + +msgid "smc_status_verifying" +msgstr "Verifying connectivity…" + +msgid "smc_status_serving" +msgstr "Sharing — ready to serve users in censored regions" + +msgid "smc_status_stopping" +msgstr "Stopping…" + +msgid "smc_status_error_with_message" +msgstr "Couldn't share: %s" + +msgid "smc_status_error_generic" +msgstr "Couldn't share — try toggling again" + +# Status card — stats + tooltip +msgid "smc_stat_active_now" +msgstr "Active now" + +msgid "smc_stat_total_today" +msgstr "Total this session" + +msgid "smc_connections_tooltip" +msgstr "Most connections are short liveness probes — Lantern clients periodically check that this peer is reachable before sending real traffic. A quick burst from many locations is normal; an arc that lingers represents an actual user session." + +# Arrival toast — "New connection from {country}" +msgid "smc_arrival_toast" +msgstr "New connection from %s" + +# Advanced section / manual port forward +msgid "smc_advanced" +msgstr "Advanced" + +msgid "smc_advanced_subtitle" +msgstr "For users whose router doesn't support UPnP" + +msgid "smc_manual_port" +msgstr "Manual port forward" + +msgid "smc_manual_port_description" +msgstr "If your router doesn't support UPnP, configure a port forward on your router and enter the port number here. Lantern will use it as the external port instead of probing UPnP. Leave blank to use UPnP (default)." + +msgid "smc_manual_port_label" +msgstr "Port" + +msgid "smc_manual_port_hint" +msgstr "e.g. 5698" + +msgid "smc_manual_port_save" +msgstr "Save" + +msgid "smc_manual_port_currently_set" +msgstr "Currently set to port %d. Toggle Share My Connection off and back on for the change to take effect." + +msgid "smc_manual_port_out_of_range" +msgstr "Port must be between 1 and 65535" + +msgid "smc_manual_port_cleared" +msgstr "Manual port cleared — using UPnP" + +msgid "smc_manual_port_saved" +msgstr "Manual port set to %d" + +# SmC disclosure dialog (shown before opting into the residential-proxy mode) +msgid "smc_disclosure_title" +msgstr "Use full Share My Connection?" + +msgid "smc_disclosure_body_capability" +msgstr "Your network supports the higher-bandwidth, more block-resistant mode. In this mode, your home internet connection routes traffic for users in censored countries." + +msgid "smc_disclosure_body_safety" +msgstr "Lantern blocks abuse destinations, rotates credentials, and operates as a \"mere conduit\" under DMCA § 512(a) — but your IP address will appear in the destination's logs while you're sharing." + +msgid "smc_disclosure_body_alternative" +msgstr "You can still help by selecting \"Basic mode\" instead, which uses ephemeral WebRTC connections that are not tied to your IP in the same way." + +msgid "smc_disclosure_basic" +msgstr "Basic mode (Unbounded)" + +msgid "smc_disclosure_full" +msgstr "Full mode (SmC)" + msgid "vpn_connected" msgstr "Lantern is now connected." diff --git a/assets/unbounded/explosion.json b/assets/unbounded/explosion.json new file mode 100644 index 0000000000..1773e7f105 --- /dev/null +++ b/assets/unbounded/explosion.json @@ -0,0 +1 @@ +{"nm":"F","h":502,"w":420,"meta":{"g":"LottieFiles Figma v42"},"layers":[{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[187.06,388.01],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[187.06,388.01],"t":114},{"s":[187.06,388.01],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[12.84],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[12.84],"t":114},{"s":[12.84],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":1},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[286.35,305.11],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[286.35,305.11],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[286.35,305.11],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[286.35,305.11],"t":114},{"s":[286.35,305.11],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-15],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-15],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-15],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-15],"t":114},{"s":[-15],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":2},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[57,292.33],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[57,292.33],"t":114},{"s":[57,292.33],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[13.56],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[13.56],"t":114},{"s":[13.56],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":3},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[89,362.45],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[89,362.45],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[89,362.45],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[89,362.45],"t":114},{"s":[89,362.45],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0.03},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":4},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[347,349.67],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[347,349.67],"t":114},{"s":[347,349.67],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":5},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[363,193.71],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[363,193.71],"t":114},{"s":[363,193.71],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-10.18],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-10.18],"t":114},{"s":[-10.18],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":6},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[41,180.93],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[41,180.93],"t":114},{"s":[41,180.93],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-7.58],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-7.58],"t":114},{"s":[-7.58],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":7},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[189.5,216.92],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[189.5,216.92],"t":114},{"s":[189.5,216.92],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":8},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[270.35,139.3],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[270.35,139.3],"t":114},{"s":[270.35,139.3],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-8.33],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-8.33],"t":114},{"s":[-8.33],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":9},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[249,317.89],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[249,317.89],"t":114},{"s":[249,317.89],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[19.7],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[19.7],"t":114},{"s":[19.7],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":10},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[89,96.56],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[89,96.56],"t":114},{"s":[89,96.56],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":11},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[272.03,46.69],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[272.03,46.69],"t":114},{"s":[272.03,46.69],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":12},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[347,71],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[347,71],"t":114},{"s":[347,71],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":13},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[152.62,62.88],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[152.62,62.88],"t":114},{"s":[152.62,62.88],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[20.16],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[20.16],"t":114},{"s":[20.16],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":14},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[108.69,186.58],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[108.69,186.58],"t":114},{"s":[108.69,186.58],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[20.43],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[20.43],"t":114},{"s":[20.43],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":15},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[397.01,263.98],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[397.01,263.98],"t":114},{"s":[397.01,263.98],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-9.8],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[-9.8],"t":114},{"s":[-9.8],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":16},{"ty":4,"nm":"V","sr":1,"st":0,"op":138,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[16,12.78],"t":114},{"s":[16,12.78],"t":137}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100,100],"t":114},{"s":[100,100],"t":137}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[121,437.23],"t":114},{"s":[121,437.23],"t":137}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[0],"t":114},{"s":[0],"t":137}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[0],"t":137}]}},"shapes":[{"ty":"sh","nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":114},{"s":[{"c":true,"i":[[0,0],[1.01,-4.53],[3.3,-8.84],[-1.28,-1.44],[3.68,9.7]],"o":[[-3.41,-9.06],[-1.39,-4.79],[-3.68,9.86],[1.28,-1.17],[0,0]],"v":[[31.5,5.42],[16,4.94],[0.5,5.42],[16,25.56],[31.5,5.42]]}],"t":137}]}},{"ty":"fl","nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[1,0.353,0.475],"t":114},{"s":[1,0.353,0.475],"t":137}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":90},{"o":{"x":0,"y":0},"i":{"x":0.58,"y":1},"s":[100],"t":114},{"s":[100],"t":137}]}}],"ind":17}],"v":"5.7.0","fr":30,"op":136.53,"ip":0,"assets":[]} \ No newline at end of file diff --git a/assets/unbounded/uv-map-dark.png b/assets/unbounded/uv-map-dark.png new file mode 100644 index 0000000000..afe9a07568 Binary files /dev/null and b/assets/unbounded/uv-map-dark.png differ diff --git a/assets/unbounded/uv-map.png b/assets/unbounded/uv-map.png new file mode 100644 index 0000000000..98953b96df Binary files /dev/null and b/assets/unbounded/uv-map.png differ diff --git a/go.mod b/go.mod index db2aeb882f..570d554f7e 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/getlantern/lantern go 1.26.2 -// replace github.com/getlantern/radiance => ../radiance - // replace github.com/getlantern/lantern-server-provisioner => ../lantern-server-provisioner // replace github.com/sagernet/sing-box => ../sing-box-minimal @@ -25,7 +23,7 @@ replace github.com/quic-go/qpack => github.com/quic-go/qpack v0.5.1 require ( github.com/alecthomas/assert/v2 v2.3.0 github.com/getlantern/lantern-server-provisioner v0.0.0-20251031121934-8ea031fccfa9 - github.com/getlantern/radiance v0.0.0-20260529193818-b9df7d613b1a + github.com/getlantern/radiance v0.0.0-20260531221356-11aa55a6ff16 github.com/sagernet/sing-box v1.12.22 golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0 golang.org/x/sys v0.41.0 @@ -172,7 +170,7 @@ require ( github.com/getlantern/domainfront v0.0.0-20260419161617-0bff0b2169f4 // indirect github.com/getlantern/keepcurrent v0.0.0-20260422161259-54a4d9a93694 // indirect github.com/getlantern/kindling v0.0.0-20260529141244-21f8b144afab // indirect - github.com/getlantern/lantern-box v0.0.86 // indirect + github.com/getlantern/lantern-box v0.0.87-0.20260529195337-0b63c0f42962 // indirect github.com/getlantern/lantern-water v0.0.0-20260520145825-958775d51395 // indirect github.com/getlantern/osversion v0.0.0-20240418205916-2e84a4a4e175 // indirect github.com/getlantern/pluriconfig v0.0.0-20251126214241-8cc8bc561535 // indirect diff --git a/go.sum b/go.sum index 33e0b0c3da..528a7c3e57 100644 --- a/go.sum +++ b/go.sum @@ -247,8 +247,8 @@ github.com/getlantern/keepcurrent v0.0.0-20260422161259-54a4d9a93694 h1:iLWm6S/4 github.com/getlantern/keepcurrent v0.0.0-20260422161259-54a4d9a93694/go.mod h1:ag5g9aWUw2FJcX5RVRpJ9EBQBy5yJuy2WXDouIn/m4w= github.com/getlantern/kindling v0.0.0-20260529141244-21f8b144afab h1:PitYhTvo3oHRKYl4pVAoOIN8bhM+Bw+JBWncMglvHSg= github.com/getlantern/kindling v0.0.0-20260529141244-21f8b144afab/go.mod h1:TGTxpoNVwc8Be4qkBNtf5oj2psJaEIZEq47GOPS7zkA= -github.com/getlantern/lantern-box v0.0.86 h1:myJa+Crg/oMgqSFhX7DOox4XcVIx8VFiPnkel8x8YT4= -github.com/getlantern/lantern-box v0.0.86/go.mod h1:BVXPyEicSu7m4nQY1OHPkOZNj87M7sYrzmY9AgyiPkc= +github.com/getlantern/lantern-box v0.0.87-0.20260529195337-0b63c0f42962 h1:VSSC7BIn42+tQmhoYg7Wc+ilkXC4SdoJ0LQ6+4kvtC0= +github.com/getlantern/lantern-box v0.0.87-0.20260529195337-0b63c0f42962/go.mod h1:BVXPyEicSu7m4nQY1OHPkOZNj87M7sYrzmY9AgyiPkc= github.com/getlantern/lantern-server-provisioner v0.0.0-20251031121934-8ea031fccfa9 h1:6seyD2f9tz2am0YQd/Qn+q7LFiiQgnmxgwWFnVceGZw= github.com/getlantern/lantern-server-provisioner v0.0.0-20251031121934-8ea031fccfa9/go.mod h1:s0VKrlJf/z+M0U8IKHFL2hfuflocRw3SINmMacrTlMA= github.com/getlantern/lantern-water v0.0.0-20260520145825-958775d51395 h1:grfGavAUp2E9w9ZoJuM3FyWyQ0sCJ64V4ZMKtZKRqTc= @@ -261,8 +261,8 @@ github.com/getlantern/pluriconfig v0.0.0-20251126214241-8cc8bc561535 h1:rtDmW8YL github.com/getlantern/pluriconfig v0.0.0-20251126214241-8cc8bc561535/go.mod h1:WKJEdjMOD4IuTRYwjQHjT4bmqDl5J82RShMLxPAvi0Q= github.com/getlantern/publicip v0.0.0-20260328175246-2c460fe80c6b h1:gMYJzEhLrmIqQ+JnjiYNm+UyUDalK3WUmVyecFwmV5g= github.com/getlantern/publicip v0.0.0-20260328175246-2c460fe80c6b/go.mod h1:NpfXdK4ldEKkjQ4P1R+DBF4ua5VFOlxmgHROTnYrApg= -github.com/getlantern/radiance v0.0.0-20260529193818-b9df7d613b1a h1:BUnZxaaUJbDmILeIOj+/4qlUQrgD8hdV1+67fkLvdqY= -github.com/getlantern/radiance v0.0.0-20260529193818-b9df7d613b1a/go.mod h1:SOXeNVsbdP1v9yYRbuJLB9tV9DpPI77HN+iSecuC9kM= +github.com/getlantern/radiance v0.0.0-20260531221356-11aa55a6ff16 h1:CpsYjT3sBimvg/GNYO5IKvRjWDc4BCeDjDQxUNsx8gA= +github.com/getlantern/radiance v0.0.0-20260531221356-11aa55a6ff16/go.mod h1:wemClXaug4hwPdsUEm8g1bCa8tkjk3UjDM+6PfWJwMI= github.com/getlantern/samizdat v0.0.3-0.20260529191731-5ea8ae61ddbf h1:KxiMF+oG0rTtuBi7GiIaHfccYOf69rLJ/VnO5myoYc4= github.com/getlantern/samizdat v0.0.3-0.20260529191731-5ea8ae61ddbf/go.mod h1:uEeykQSW2/6rTjfPlj3MTTo59poSHXfAHTGgzYDkbr0= github.com/getlantern/semconv v0.0.0-20260327040646-21845dda05cb h1:c5YM7b3a4r2J8Eh89KkI6M/iTFe6Bi+b8AJlfkKdFq4= diff --git a/ios/Runner/Handlers/MethodHandler.swift b/ios/Runner/Handlers/MethodHandler.swift index 48c41b95af..0126eca141 100644 --- a/ios/Runner/Handlers/MethodHandler.swift +++ b/ios/Runner/Handlers/MethodHandler.swift @@ -263,6 +263,56 @@ class MethodHandler { await MainActor.run { result(MobileIsSmartRoutingEnabled()) } } + // Share My Connection (samizdat) + Unbounded (broflake) peer-share. + // Phones on cellular data won't have UPnP, but home WiFi does — and + // manual port forwarding works on any network where the user owns + // the router. The whole stack is exposed on iOS rather than + // desktop-only. + case "setPeerProxyEnabled": + // requireArg surfaces a FlutterError on missing/invalid + // argument shape instead of silently defaulting to false + // (which would disable sharing on caller bugs). + guard let enabled: Bool = requireArg(call: call, name: "enabled", result: result) else { return } + self.setPeerProxyEnabled(result: result, enabled: enabled) + + case "isPeerProxyEnabled": + Task { + await MainActor.run { result(MobileIsPeerShareEnabled()) } + } + + case "setPeerManualPort": + // requireArg surfaces a FlutterError on missing/invalid + // argument shape instead of silently defaulting to 0 + // (which has the real semantic of clearing the manual port + // override — caller bugs would silently wipe the user's + // setting). + guard let port: Int = requireArg(call: call, name: "port", result: result) else { return } + self.setPeerManualPort(result: result, port: port) + + case "getPeerManualPort": + Task { + await MainActor.run { result(Int(MobileGetPeerManualPort())) } + } + + case "setUnboundedEnabled": + guard let enabled: Bool = requireArg(call: call, name: "enabled", result: result) else { return } + self.setUnboundedEnabled(result: result, enabled: enabled) + + case "isUnboundedEnabled": + Task { + await MainActor.run { result(MobileIsUnboundedEnabled()) } + } + + case "probeUPnP": + // UPnP M-SEARCH multicast wait — up to ~6s in MobileProbeUPnP. + // Hop off the main actor so the wait doesn't stall the UI, then + // deliver the bool back on MainActor for the Flutter result + // callback. + Task.detached { + let available = MobileProbeUPnP() + await MainActor.run { result(available) } + } + case "isTelemetryEnabled": Task { await MainActor.run { result(MobileIsTelemetryEnabled()) } @@ -1127,6 +1177,54 @@ class MethodHandler { } } + // Share My Connection (samizdat) toggle. Mirrors the macOS handler's + // pattern: blocking Mobile call goes onto a Task; result and error + // delivery hop to MainActor. Plain Task (not Task.detached) is fine + // for these PatchSettings calls — they finish in milliseconds, so + // inheriting the current actor's executor is cheap. probeUPnP is + // the one exception that uses Task.detached because its M-SEARCH + // wait is multi-second. + func setPeerProxyEnabled(result: @escaping FlutterResult, enabled: Bool) { + Task { + var error: NSError? + MobileSetPeerShareEnabled(enabled, &error) + if let error { + await self.handleFlutterError(error, result: result, code: "SET_PEER_PROXY_ENABLED_ERROR") + return + } + await MainActor.run { result("ok") } + } + } + + // Manual port forward setting for the SmC residential-proxy path. + // Pass 0 to clear and revert to UPnP-discovered port behavior. + func setPeerManualPort(result: @escaping FlutterResult, port: Int) { + Task { + var error: NSError? + MobileSetPeerManualPort(port, &error) + if let error { + await self.handleFlutterError(error, result: result, code: "SET_PEER_MANUAL_PORT_ERROR") + return + } + await MainActor.run { result("ok") } + } + } + + // Local opt-in for the broflake / Unbounded widget proxy ("Basic mode" + // in the SmC UI). Actual run state also depends on the server's + // unbounded feature flag and supplied UnboundedConfig. + func setUnboundedEnabled(result: @escaping FlutterResult, enabled: Bool) { + Task { + var error: NSError? + MobileSetUnboundedEnabled(enabled, &error) + if let error { + await self.handleFlutterError(error, result: result, code: "SET_UNBOUNDED_ENABLED_ERROR") + return + } + await MainActor.run { result("ok") } + } + } + func updateTelemetryEvents(consent: Bool, result: @escaping FlutterResult) { Task { var error: NSError? diff --git a/lantern-core/core.go b/lantern-core/core.go index 7b2cf30f21..c0ec2bcc5a 100644 --- a/lantern-core/core.go +++ b/lantern-core/core.go @@ -18,9 +18,13 @@ import ( "github.com/getlantern/radiance/common" "github.com/getlantern/radiance/common/env" "github.com/getlantern/radiance/common/settings" + "github.com/getlantern/radiance/events" "github.com/getlantern/radiance/ipc" "github.com/getlantern/radiance/issue" + "github.com/getlantern/radiance/peer" + "github.com/getlantern/radiance/portforward" "github.com/getlantern/radiance/servers" + "github.com/getlantern/radiance/unbounded" "github.com/getlantern/radiance/vpn" "github.com/getlantern/lantern/lantern-core/apps" @@ -36,7 +40,24 @@ const ( EventTypeServerLocation EventType = "server-location" EventTypeConfig EventType = "config" EventTypeCountryCode EventType = "country-code" - DefaultLogLevel = "trace" + // EventTypePeerConnection signals a peer accept/close on the local + // peer-share inbound. Both donor protocols emit this event type: + // samizdat-over-UPnP "Share My Connection" and broflake + // "Unbounded". Message is JSON + // {"state": +1|-1, "source": "...", "timestamp": }. + // Source is "host:port" / "[host]:port" for SmC, bare consumer IP + // for Unbounded. Consumers extract the IP for geo-lookup or + // rate-limit attribution; timestamp is useful for ordering when + // the event-bus dispatch is async. + EventTypePeerConnection EventType = "peer-connection" + // EventTypePeerStatus signals a peer.Client lifecycle phase change + // (mapping_port → registering → verifying → serving on the way up, + // stopping → idle on the way down, error on failure). Message is the + // JSON-marshalled peer.Status struct. The Dart side switches on + // .phase to render progress text and on .error to surface + // diagnostics on the failure path. + EventTypePeerStatus EventType = "peer-status" + DefaultLogLevel = "trace" ) // LanternCore wraps an IPC client and provides the interface expected by the FFI and mobile layers. @@ -153,6 +174,29 @@ type SmartRouting interface { IsSmartRoutingEnabled() bool } +type PeerShare interface { + SetPeerShareEnabled(bool) error + IsPeerShareEnabled() bool + // SetPeerManualPort persists the user's manually-configured router + // port forward (Advanced setting in the Share My Connection UI). + // 0 clears the override, restoring UPnP-discovered port behavior. + SetPeerManualPort(port int) error + GetPeerManualPort() int + // SetUnboundedEnabled is the local opt-in for the broflake / + // Unbounded widget proxy ("Basic mode" in the SmC UI). The + // proxy actually runs only when this is true AND the server-side + // Features[unbounded] flag is on AND the server provides + // UnboundedConfig — see radiance/unbounded.shouldRunUnbounded. + SetUnboundedEnabled(bool) error + IsUnboundedEnabled() bool + // ProbeUPnP runs IGD discovery on the local network and reports + // whether a usable gateway is reachable. Called by the SmC toggle + // path to decide between SmC mode (residential-proxy, needs UPnP + // or a manual port forward) and Unbounded mode (WebRTC, works + // anywhere) when no manual port is configured. + ProbeUPnP() bool +} + type VPN interface { ConnectVPN(tag string) error SelectServer(tag string) error @@ -169,6 +213,7 @@ type Core interface { SplitTunnel Ads SmartRouting + PeerShare VPN Client() *ipc.Client } @@ -240,6 +285,8 @@ func (lc *LanternCore) initialize(opts *utils.Opts, eventEmitter utils.FlutterEv go lc.listenAutoSelectedEvents() go lc.listenConfigEvents() go lc.listenDataCapEvents() + go lc.listenPeerConnectionEvents() + go lc.listenPeerStatusEvents() go lc.fetchUserDataIfNeeded() slog.Debug("LanternCore initialized successfully") @@ -354,6 +401,108 @@ func (lc *LanternCore) listenDataCapEvents() { } } +// listenPeerConnectionEvents forwards inbound accept/close events from +// either of the two donor protocols (samizdat-over-UPnP "Share My +// Connection" and broflake "Unbounded") to the Flutter side via the +// existing FlutterEvent emitter, so the same globe widget can render +// arcs without caring which protocol produced them. Subscription is +// process-lifetime; events.Subscribe silently delivers nothing while +// no peer / widget is active. +// +// The wire format unifies both protocols on a single event type +// (EventTypePeerConnection) with a {state, source, timestamp} +// payload — peer.ConnectionEvent and unbounded.ConnectionEvent both +// carry the same three fields on the radiance side, so the Dart +// consumer can deserialize each frame uniformly without caring +// which protocol produced it. Source is "host:port" / +// "[host]:port" for peer-share, and the broflake-reported consumer +// IP (no port) for Unbounded. Timestamp is Unix milliseconds. +func (lc *LanternCore) listenPeerConnectionEvents() { + // unbounded.ConnectionEvent stays on in-process events.Subscribe for + // now. Unbounded runs in the same process as the consumer in mobile + // builds (broflake-as-library); the desktop path doesn't yet have a + // gomobile-bridged Unbounded peer, so the cross-process gap doesn't + // hit here today. Worth revisiting if Unbounded ever moves out of + // process. + // + // defer Unsubscribe so cleanup runs whenever this function + // returns. In practice that's process shutdown — the function + // is started once from initialize(), the PeerConnectionEvents + // call below blocks until ctx cancellation, and there's no + // retry loop wrapping it. But if PeerConnectionEvents ever did + // exit early on stream error (or a future caller adds retries), + // defer keeps the subscription lifetime bound to this function's + // scope rather than leaking until the next reinitialization — + // which the previous ctx-watching goroutine implicitly relied on. + unbSub := events.Subscribe(func(evt unbounded.ConnectionEvent) { + jsonBytes, err := json.Marshal(map[string]any{ + "state": evt.State, + "source": evt.Source, + "timestamp": evt.Timestamp, + }) + if err != nil { + slog.Error("marshal unbounded connection event", "error", err) + return + } + lc.notifyFlutter(EventTypePeerConnection, string(jsonBytes)) + }) + defer unbSub.Unsubscribe() + + // peer.ConnectionEvent: subscribe via the IPC client's SSE stream. + // The events package's globals are process-scoped — events.Emit in + // lanternd (where radiance/peer runs) doesn't reach events.Subscribe + // in Liblantern. The /peer/connection/events SSE endpoint bridges + // the two processes. PeerConnectionEvents blocks until ctx is done, + // so this goroutine (the caller spawned us with + // `go lc.listenPeerConnectionEvents()`) blocks on it directly — + // wrapping in another go would just exit the outer goroutine + // immediately. + err := lc.client.PeerConnectionEvents(lc.ctx, func(evt peer.ConnectionEvent) { + jsonBytes, err := json.Marshal(map[string]any{ + "state": evt.State, + "source": evt.Source, + "timestamp": evt.Timestamp, + }) + if err != nil { + slog.Error("marshal peer connection event", "error", err) + return + } + lc.notifyFlutter(EventTypePeerConnection, string(jsonBytes)) + }) + if err != nil && lc.ctx.Err() == nil { + slog.Error("peer-connection event stream exited unexpectedly", "error", err) + } +} + +// listenPeerStatusEvents forwards peer.Client lifecycle phase changes to +// the Flutter side. radiance's peer module emits one StatusEvent per +// stage during Start (mapping_port → detecting_ip → registering → +// starting_proxy → verifying → serving) and during Stop (stopping → +// idle), plus an "error" terminal event with Status.Error populated on +// failure. The Dart side renders each phase as user-facing progress +// text instead of a single active/inactive flip. +// +// Message body is the JSON-marshalled peer.Status — the struct already +// carries phase, error, active, sharing_since, external_ip, +// external_port, route_id with stable JSON tags. +func (lc *LanternCore) listenPeerStatusEvents() { + // Same cross-process bridging story as listenPeerConnectionEvents: the + // peer.StatusEvent emits live in lanternd, so subscribing in this + // process via events.Subscribe gets us nothing. /peer/status/events + // SSE in radiance/ipc/server.go is the canonical source. + err := lc.client.PeerStatusEvents(lc.ctx, func(evt peer.StatusEvent) { + jsonBytes, err := json.Marshal(evt.Status) + if err != nil { + slog.Error("marshal peer status event", "error", err) + return + } + lc.notifyFlutter(EventTypePeerStatus, string(jsonBytes)) + }) + if err != nil && lc.ctx.Err() == nil { + slog.Error("peer-status event stream exited unexpectedly", "error", err) + } +} + ///////////////// // VPN // ///////////////// @@ -454,6 +603,65 @@ func (lc *LanternCore) IsSmartRoutingEnabled() bool { return b } +func (lc *LanternCore) SetPeerShareEnabled(enabled bool) error { + _, err := lc.client.PatchSettings(lc.ctx, settings.Settings{settings.PeerShareEnabledKey: enabled}) + return err +} + +func (lc *LanternCore) IsPeerShareEnabled() bool { + b, _ := lc.settings()[settings.PeerShareEnabledKey].(bool) + return b +} + +func (lc *LanternCore) SetPeerManualPort(port int) error { + if port < 0 || port > 65535 { + return fmt.Errorf("port %d out of range (0-65535)", port) + } + _, err := lc.client.PatchSettings(lc.ctx, settings.Settings{settings.PeerManualPortKey: port}) + return err +} + +func (lc *LanternCore) GetPeerManualPort() int { + // koanf typically stores numeric settings as float64 after JSON + // round-trip; handle both float64 and int paths so loads from disk + // and freshly-set values both work. + switch v := lc.settings()[settings.PeerManualPortKey].(type) { + case int: + return v + case float64: + return int(v) + } + return 0 +} + +// ProbeUPnP reports whether the local network has a UPnP / IGD gateway +// that could host a port mapping. The Share My Connection UI flow +// uses this to decide between SmC mode (requires a routable inbound) +// and Unbounded mode (works on any network). The result is a binary +// "available / not available" — distinguishing "no gateway" from +// "discovery timed out" doesn't change anything productive in the UI. +// +// Bounded by an internal 6-second timeout because UPnP M-SEARCH is +// multicast-and-wait: a too-aggressive deadline misses slower +// consumer gateways, while a too-loose one stalls the UI's mode +// decision. The Dart-side FFI wrapper runs this on a background +// isolate so the wait doesn't block the main thread. +func (lc *LanternCore) ProbeUPnP() bool { + ctx, cancel := context.WithTimeout(lc.ctx, 6*time.Second) + defer cancel() + return portforward.ProbeUPnP(ctx) +} + +func (lc *LanternCore) SetUnboundedEnabled(enabled bool) error { + _, err := lc.client.PatchSettings(lc.ctx, settings.Settings{settings.UnboundedKey: enabled}) + return err +} + +func (lc *LanternCore) IsUnboundedEnabled() bool { + b, _ := lc.settings()[settings.UnboundedKey].(bool) + return b +} + func (lc *LanternCore) IsTelemetryEnabled() bool { b, _ := lc.settings()[settings.TelemetryKey].(bool) return b diff --git a/lantern-core/ffi/ffi.go b/lantern-core/ffi/ffi.go index d10403cb72..7c4652ad07 100644 --- a/lantern-core/ffi/ffi.go +++ b/lantern-core/ffi/ffi.go @@ -1352,6 +1352,110 @@ func isSmartRoutingEnabled() C.int { return 0 } +//export setPeerProxyEnabled +func setPeerProxyEnabled(enabled C.int) *C.char { + return runOnGoStack(func() *C.char { + c, errStr := requireCore() + if errStr != nil { + return errStr + } + if err := c.SetPeerShareEnabled(enabled != 0); err != nil { + return SendError(err) + } + return C.CString("ok") + }) +} + +//export isPeerProxyEnabled +func isPeerProxyEnabled() C.int { + c, _ := requireCore() + if c != nil && c.IsPeerShareEnabled() { + return 1 + } + return 0 +} + +// setPeerManualPort persists the manually-configured router port-forward +// for the Share My Connection peer-share feature. 0 clears the override, +// reverting to UPnP discovery on the next peer.Client.Start. +// +//export setPeerManualPort +func setPeerManualPort(port C.int) *C.char { + return runOnGoStack(func() *C.char { + c, errStr := requireCore() + if errStr != nil { + return errStr + } + if err := c.SetPeerManualPort(int(port)); err != nil { + return SendError(err) + } + return C.CString("ok") + }) +} + +//export getPeerManualPort +func getPeerManualPort() C.int { + c, _ := requireCore() + if c == nil { + return 0 + } + return C.int(c.GetPeerManualPort()) +} + +// probeUPnP runs the UPnP / IGD discovery scan against the local +// gateway and returns 1 when discovery succeeds, 0 when it doesn't +// (no gateway, scan timeout, ctx cancellation). The Share My +// Connection UI flow calls this to decide between SmC mode (needs +// a routable inbound) and Unbounded mode (works anywhere) when the +// user toggles sharing on without a manual port configured. +// +// Blocks for up to ~6 seconds (the internal LanternCore deadline) +// on the multicast M-SEARCH wait. Dart callers MUST invoke this +// from a background isolate via runInBackground so the wait +// doesn't pin the main thread. +// +//export probeUPnP +func probeUPnP() C.int { + c, _ := requireCore() + if c == nil { + return 0 + } + if c.ProbeUPnP() { + return 1 + } + return 0 +} + +// setUnboundedEnabled is the local opt-in for the broflake / Unbounded +// widget proxy ("Basic mode" in the SmC UI). The widget actually runs +// only when this is true AND the server-side Features[unbounded] flag +// is on AND the server provides UnboundedConfig — flipping this to +// true on a network where the server hasn't enabled the feature is a +// no-op until the next /config response opts the user in. +// +//export setUnboundedEnabled +func setUnboundedEnabled(enabled C.int) *C.char { + return runOnGoStack(func() *C.char { + c, errStr := requireCore() + if errStr != nil { + return errStr + } + if err := c.SetUnboundedEnabled(enabled != 0); err != nil { + return SendError(err) + } + return C.CString("ok") + }) +} + +//export isUnboundedEnabled +func isUnboundedEnabled() C.int { + c, _ := requireCore() + if c != nil && c.IsUnboundedEnabled() { + return 1 + } + return 0 +} + //export getSplitTunnelState func getSplitTunnelState() *C.char { return runOnGoStack(func() *C.char { diff --git a/lantern-core/mobile/mobile.go b/lantern-core/mobile/mobile.go index 75c4fae397..c01e469556 100644 --- a/lantern-core/mobile/mobile.go +++ b/lantern-core/mobile/mobile.go @@ -203,6 +203,88 @@ func SetSmartRoutingEnabled(enabled bool) error { }) } +func SetPeerShareEnabled(enabled bool) error { + slog.Info("peer-share: SetPeerShareEnabled", "enabled", enabled) + return withCore(func(c lanterncore.Core) error { + return c.SetPeerShareEnabled(enabled) + }) +} + +func IsPeerShareEnabled() bool { + ok, err := withCoreR(func(c lanterncore.Core) (bool, error) { + return c.IsPeerShareEnabled(), nil + }) + if err != nil { + return false + } + return ok +} + +// SetPeerManualPort persists the manually-configured router port forward +// the user has configured for the Share My Connection feature. Pass 0 +// to clear and revert to UPnP-discovered port behavior. Surfaced +// through the macOS / iOS / Android MethodChannel handler so platforms +// running radiance inside a network extension (where the main app +// process can't reach the FFI directly) can still drive the setting. +func SetPeerManualPort(port int) error { + slog.Info("peer-share: SetPeerManualPort", "port", port) + return withCore(func(c lanterncore.Core) error { + return c.SetPeerManualPort(port) + }) +} + +// GetPeerManualPort returns the currently-persisted manual port (0 if +// unset). Same MethodChannel rationale as SetPeerManualPort. +func GetPeerManualPort() int { + v, err := withCoreR(func(c lanterncore.Core) (int, error) { + return c.GetPeerManualPort(), nil + }) + if err != nil { + return 0 + } + return v +} + +// SetUnboundedEnabled is the local opt-in for the broflake / Unbounded +// widget proxy ("Basic mode" in the SmC UI). Surfaced through the +// MethodChannel so platforms running radiance inside a network +// extension (macOS, eventually iOS) can drive the setting from the +// main app process. +func SetUnboundedEnabled(enabled bool) error { + slog.Info("unbounded: SetUnboundedEnabled", "enabled", enabled) + return withCore(func(c lanterncore.Core) error { + return c.SetUnboundedEnabled(enabled) + }) +} + +// IsUnboundedEnabled returns the current local opt-in state for +// Unbounded. Note: actual run state also depends on the server +// Features[unbounded] flag and supplied UnboundedConfig — this just +// reports the persisted local toggle. +func IsUnboundedEnabled() bool { + ok, err := withCoreR(func(c lanterncore.Core) (bool, error) { + return c.IsUnboundedEnabled(), nil + }) + if err != nil { + return false + } + return ok +} + +// ProbeUPnP runs IGD discovery and reports whether a usable gateway +// is reachable. Surfaced through the MethodChannel so the SmC mode +// gate works on platforms whose Flutter side can't reach the FFI +// directly (mobile network-extension hosts). +func ProbeUPnP() bool { + ok, err := withCoreR(func(c lanterncore.Core) (bool, error) { + return c.ProbeUPnP(), nil + }) + if err != nil { + return false + } + return ok +} + func IsSmartRoutingEnabled() bool { ok, err := withCoreR(func(c lanterncore.Core) (bool, error) { return c.IsSmartRoutingEnabled(), nil diff --git a/lantern-core/utils/gostack.go b/lantern-core/utils/gostack.go index 99d6b5b660..75515a23e2 100644 --- a/lantern-core/utils/gostack.go +++ b/lantern-core/utils/gostack.go @@ -1,9 +1,12 @@ package utils import ( + "errors" "fmt" "log/slog" "runtime/debug" + "strings" + "unicode/utf8" ) // RunOffCgoStack executes fn on a new goroutine and returns its result. @@ -16,6 +19,17 @@ import ( // // If fn panics, the panic is recovered and a zero value + error are returned // instead of blocking the caller forever. +// +// Returned errors are normalized to a plain *errorString with a guaranteed +// non-empty, valid-UTF-8 message before crossing back into gomobile's +// objc bridge. The bridge wraps non-nil Go errors as a Universeerror whose +// initWithRef calls [NSString initWithBytesNoCopy: ... encoding:UTF8] on the +// raw error bytes; that returns nil for invalid UTF-8 (e.g. a gzipped 404 +// page, or a binary blob from an upstream LB), and the dictionary literal +// `@{NSLocalizedDescriptionKey: nil}` then aborts the app with +// "attempt to insert nil object from objects[0]". Sanitizing here means every +// gomobile-exported function that funnels through RunOffCgoStack is safe by +// construction, regardless of what shape of error its callee returns. func RunOffCgoStack[T any](fn func() (T, error)) (T, error) { type result struct { val T @@ -34,5 +48,19 @@ func RunOffCgoStack[T any](fn func() (T, error)) (T, error) { ch <- result{val: v, err: err} }() r := <-ch - return r.val, r.err + return r.val, sanitizeForGomobile(r.err) +} + +func sanitizeForGomobile(err error) error { + if err == nil { + return nil + } + msg := err.Error() + if !utf8.ValidString(msg) { + msg = strings.ToValidUTF8(msg, "?") + } + if msg == "" { + msg = "unknown error" + } + return errors.New(msg) } diff --git a/lib/core/models/radiance_settings_state.dart b/lib/core/models/radiance_settings_state.dart index 70323e0a13..e9ca26363c 100644 --- a/lib/core/models/radiance_settings_state.dart +++ b/lib/core/models/radiance_settings_state.dart @@ -12,12 +12,22 @@ class RadianceSettingsState { final RoutingMode routingMode; final bool splitTunneling; final bool telemetry; + final bool peerProxy; + // Local opt-in for the broflake / Unbounded widget proxy. Separate + // from peerProxy because the two are independent toggles — the SmC + // disclosure dialog flips just one of them based on the user's + // choice ("Basic mode" → unboundedEnabled, "Full mode" → peerProxy). + // The VPN settings tile uses BOTH to decide whether to show the + // "On — tap to view" subtitle. + final bool unboundedEnabled; const RadianceSettingsState({ this.blockAds = false, this.routingMode = RoutingMode.full, this.splitTunneling = false, this.telemetry = false, + this.peerProxy = false, + this.unboundedEnabled = false, }); RadianceSettingsState copyWith({ @@ -25,12 +35,16 @@ class RadianceSettingsState { RoutingMode? routingMode, bool? splitTunneling, bool? telemetry, + bool? peerProxy, + bool? unboundedEnabled, }) { return RadianceSettingsState( blockAds: blockAds ?? this.blockAds, routingMode: routingMode ?? this.routingMode, splitTunneling: splitTunneling ?? this.splitTunneling, telemetry: telemetry ?? this.telemetry, + peerProxy: peerProxy ?? this.peerProxy, + unboundedEnabled: unboundedEnabled ?? this.unboundedEnabled, ); } @@ -41,9 +55,17 @@ class RadianceSettingsState { blockAds == other.blockAds && routingMode == other.routingMode && splitTunneling == other.splitTunneling && - telemetry == other.telemetry; + telemetry == other.telemetry && + peerProxy == other.peerProxy && + unboundedEnabled == other.unboundedEnabled; @override - int get hashCode => - Object.hash(blockAds, routingMode, splitTunneling, telemetry); + int get hashCode => Object.hash( + blockAds, + routingMode, + splitTunneling, + telemetry, + peerProxy, + unboundedEnabled, + ); } diff --git a/lib/core/models/unbounded_connection_event.dart b/lib/core/models/unbounded_connection_event.dart new file mode 100644 index 0000000000..467a53e303 --- /dev/null +++ b/lib/core/models/unbounded_connection_event.dart @@ -0,0 +1,48 @@ +import 'package:flutter_earth_globe/globe_coordinates.dart'; + +/// Internal Dart-side connection-change model the ShareNotifier emits +/// to the globe via _eventController. NOT the wire format — +/// FlutterEvent messages from lantern-core (forwarded from radiance) +/// are parsed inline in share_my_connection.dart's event subscription +/// as `{state, source, timestamp}` and synthesized into this model +/// after geo-resolution. +/// +/// workerIdx here is the Dart-side identity counter (_workerSeq++ in +/// the notifier), not the broflake worker index — it's a stable +/// handle for matching accept/close pairs and cancelling pending arc +/// removals when a peer reconnects from the same IP. +class UnboundedConnectionEvent { + final int state; // 1 = connected, -1 = disconnected + final int workerIdx; + final String addr; // IP address + // Geo fields are populated by ShareNotifier after peer lookup. Empty on + // legacy events and on -1 frames (where only workerIdx matters for the + // globe to remove the arc). + final String countryName; + final String countryCode; + final String flagEmoji; + final GlobeCoordinates? coordinates; + // True for synthetic events the notifier emits to seed a newly-mounted + // globe with peers that connected before the screen opened. Lets the UI + // suppress the "new connection from " burst for replays. + final bool isReplay; + + UnboundedConnectionEvent({ + required this.state, + required this.workerIdx, + required this.addr, + this.countryName = '', + this.countryCode = '', + this.flagEmoji = '', + this.coordinates, + this.isReplay = false, + }); +} + +/// Tracks live and cumulative connection counts for Unbounded. +class UnboundedStats { + final int activeCount; + final int totalCount; + + const UnboundedStats({this.activeCount = 0, this.totalCount = 0}); +} diff --git a/lib/core/services/geo_lookup_service.dart b/lib/core/services/geo_lookup_service.dart new file mode 100644 index 0000000000..fdc09ff948 --- /dev/null +++ b/lib/core/services/geo_lookup_service.dart @@ -0,0 +1,247 @@ +import 'dart:convert'; + +import 'package:flutter_earth_globe/globe_coordinates.dart'; +import 'package:http/http.dart' as http; + +/// Result of a peer geo lookup. Country/flag default to empty when the +/// lookup fails; coordinates default to a centre-of-the-globe sentinel. +class PeerGeo { + const PeerGeo({ + required this.coordinates, + required this.countryName, + required this.countryCode, + required this.flagEmoji, + }); + + final GlobeCoordinates coordinates; + final String countryName; + final String countryCode; + final String flagEmoji; + + static const unknown = PeerGeo( + coordinates: GlobeCoordinates(0, 0), + countryName: '', + countryCode: '', + flagEmoji: '', + ); +} + +class GeoLookupService { + static const _selfUrl = 'https://geo.getiantem.org'; + // ipwho.is: HTTPS, no auth, 10k req/month free. Returns country + lat/lon + // + flag emoji in one shot. + static const _peerUrl = 'https://ipwho.is'; + + // Per-IP cache for peerLookup. Most connections are short-lived + // liveness probes from the same handful of client IPs, so without a + // cache an active SmC peer would issue hundreds of ipwho.is requests + // per minute — chewing through the 10k/month free quota and leaking + // more data to the third party than necessary. Cached entries + // (including the PeerGeo.unknown sentinel from a failed lookup) live + // for the rest of the process — IP→country bindings don't change on + // human timescales, and the alternative TTL bookkeeping adds + // complexity without changing the privacy or quota math. + static final Map _peerCache = {}; + + /// Test-only: drop the cache. Production code does not call this. + static void resetCacheForTest() => _peerCache.clear(); + + // ISO country code → approximate centre coordinates. Used as a fallback + // when ipwho.is doesn't return city-level coords. + static const _countryCenters = { + 'AF': (lat: 33.0, lng: 65.0), + 'AL': (lat: 41.0, lng: 20.0), + 'DZ': (lat: 28.0, lng: 3.0), + 'AD': (lat: 42.5, lng: 1.6), + 'AO': (lat: -12.5, lng: 18.5), + 'AR': (lat: -34.0, lng: -64.0), + 'AM': (lat: 40.0, lng: 45.0), + 'AU': (lat: -27.0, lng: 133.0), + 'AT': (lat: 47.33, lng: 13.33), + 'AZ': (lat: 40.5, lng: 47.5), + 'BD': (lat: 24.0, lng: 90.0), + 'BY': (lat: 53.0, lng: 28.0), + 'BE': (lat: 50.83, lng: 4.0), + 'BJ': (lat: 9.5, lng: 2.25), + 'BO': (lat: -17.0, lng: -65.0), + 'BA': (lat: 44.0, lng: 18.0), + 'BR': (lat: -10.0, lng: -55.0), + 'BG': (lat: 43.0, lng: 25.0), + 'KH': (lat: 13.0, lng: 105.0), + 'CM': (lat: 6.0, lng: 12.0), + 'CA': (lat: 60.0, lng: -95.0), + 'CL': (lat: -30.0, lng: -71.0), + 'CN': (lat: 35.0, lng: 105.0), + 'CO': (lat: 4.0, lng: -72.0), + 'CD': (lat: 0.0, lng: 25.0), + 'CR': (lat: 10.0, lng: -84.0), + 'HR': (lat: 45.17, lng: 15.5), + 'CU': (lat: 21.5, lng: -80.0), + 'CZ': (lat: 49.75, lng: 15.5), + 'DK': (lat: 56.0, lng: 10.0), + 'DO': (lat: 19.0, lng: -70.67), + 'EC': (lat: -2.0, lng: -77.5), + 'EG': (lat: 27.0, lng: 30.0), + 'SV': (lat: 13.83, lng: -88.92), + 'EE': (lat: 59.0, lng: 26.0), + 'ET': (lat: 8.0, lng: 38.0), + 'FI': (lat: 64.0, lng: 26.0), + 'FR': (lat: 46.0, lng: 2.0), + 'GE': (lat: 42.0, lng: 43.5), + 'DE': (lat: 51.0, lng: 9.0), + 'GH': (lat: 8.0, lng: -2.0), + 'GR': (lat: 39.0, lng: 22.0), + 'GT': (lat: 15.5, lng: -90.25), + 'HN': (lat: 15.0, lng: -86.5), + 'HK': (lat: 22.25, lng: 114.17), + 'HU': (lat: 47.0, lng: 20.0), + 'IS': (lat: 65.0, lng: -18.0), + 'IN': (lat: 20.0, lng: 77.0), + 'ID': (lat: -5.0, lng: 120.0), + 'IR': (lat: 32.0, lng: 53.0), + 'IQ': (lat: 33.0, lng: 44.0), + 'IE': (lat: 53.0, lng: -8.0), + 'IL': (lat: 31.5, lng: 34.75), + 'IT': (lat: 42.83, lng: 12.83), + 'CI': (lat: 8.0, lng: -5.0), + 'JP': (lat: 36.0, lng: 138.0), + 'JO': (lat: 31.0, lng: 36.0), + 'KZ': (lat: 48.0, lng: 68.0), + 'KE': (lat: 1.0, lng: 38.0), + 'KR': (lat: 37.0, lng: 127.5), + 'KW': (lat: 29.34, lng: 47.66), + 'KG': (lat: 41.0, lng: 75.0), + 'LA': (lat: 18.0, lng: 105.0), + 'LV': (lat: 57.0, lng: 25.0), + 'LB': (lat: 33.83, lng: 35.83), + 'LT': (lat: 56.0, lng: 24.0), + 'MG': (lat: -20.0, lng: 47.0), + 'MY': (lat: 2.5, lng: 112.5), + 'ML': (lat: 17.0, lng: -4.0), + 'MX': (lat: 23.0, lng: -102.0), + 'MD': (lat: 47.0, lng: 29.0), + 'MN': (lat: 46.0, lng: 105.0), + 'MA': (lat: 32.0, lng: -5.0), + 'MZ': (lat: -18.25, lng: 35.0), + 'MM': (lat: 22.0, lng: 98.0), + 'NP': (lat: 28.0, lng: 84.0), + 'NL': (lat: 52.5, lng: 5.75), + 'NZ': (lat: -41.0, lng: 174.0), + 'NI': (lat: 13.0, lng: -85.0), + 'NG': (lat: 10.0, lng: 8.0), + 'NO': (lat: 62.0, lng: 10.0), + 'OM': (lat: 21.0, lng: 57.0), + 'PK': (lat: 30.0, lng: 70.0), + 'PA': (lat: 9.0, lng: -80.0), + 'PY': (lat: -23.0, lng: -58.0), + 'PE': (lat: -10.0, lng: -76.0), + 'PH': (lat: 13.0, lng: 122.0), + 'PL': (lat: 52.0, lng: 20.0), + 'PT': (lat: 39.5, lng: -8.0), + 'QA': (lat: 25.5, lng: 51.25), + 'RO': (lat: 46.0, lng: 25.0), + 'RU': (lat: 60.0, lng: 100.0), + 'SA': (lat: 25.0, lng: 45.0), + 'SN': (lat: 14.0, lng: -14.0), + 'RS': (lat: 44.0, lng: 21.0), + 'SG': (lat: 1.37, lng: 103.8), + 'SK': (lat: 48.67, lng: 19.5), + 'SI': (lat: 46.0, lng: 15.0), + 'ZA': (lat: -29.0, lng: 24.0), + 'ES': (lat: 40.0, lng: -4.0), + 'LK': (lat: 7.0, lng: 81.0), + 'SE': (lat: 62.0, lng: 15.0), + 'CH': (lat: 47.0, lng: 8.0), + 'SY': (lat: 35.0, lng: 38.0), + 'TW': (lat: 23.5, lng: 121.0), + 'TJ': (lat: 39.0, lng: 71.0), + 'TZ': (lat: -6.0, lng: 35.0), + 'TH': (lat: 15.0, lng: 100.0), + 'TN': (lat: 34.0, lng: 9.0), + 'TR': (lat: 39.0, lng: 35.0), + 'TM': (lat: 40.0, lng: 60.0), + 'UA': (lat: 49.0, lng: 32.0), + 'AE': (lat: 24.0, lng: 54.0), + 'GB': (lat: 54.0, lng: -2.0), + 'US': (lat: 38.0, lng: -97.0), + 'UY': (lat: -33.0, lng: -56.0), + 'UZ': (lat: 41.0, lng: 64.0), + 'VE': (lat: 8.0, lng: -66.0), + 'VN': (lat: 16.0, lng: 106.0), + 'YE': (lat: 15.0, lng: 48.0), + 'ZM': (lat: -15.0, lng: 30.0), + 'ZW': (lat: -20.0, lng: 30.0), + }; + + static GlobeCoordinates _isoToCoords(String iso) { + final c = _countryCenters[iso] ?? _countryCenters['US']!; + return GlobeCoordinates(c.lat, c.lng); + } + + /// Looks up the current device's location (no IP argument). + static Future selfLookup() async { + try { + final response = await http + .get(Uri.parse('$_selfUrl/')) + .timeout(const Duration(seconds: 5)); + if (response.statusCode == 200) { + final data = jsonDecode(response.body) as Map; + final iso = + (data['Country'] as Map?)?['IsoCode'] as String? ?? + 'US'; + return _isoToCoords(iso); + } + } catch (_) {} + return _isoToCoords('US'); + } + + /// Looks up country, flag, and coordinates for a peer [ip] address. + /// Returns [PeerGeo.unknown] on any failure so callers can suppress the + /// arc / banner rather than displaying a wrong country. + /// + /// Privacy note: each call ships [ip] — the address of a peer routing + /// through this user's Share My Connection inbound — to ipwho.is, a + /// third-party geo-IP service. For most SmC consumers these are + /// censored users' addresses, so this is an outbound data flow to a + /// non-Lantern endpoint. Current rationale for accepting it: the IP + /// is already public-by-virtue-of-being-a-TCP-source-addr the host + /// observes, ipwho.is doesn't tie lookups to the caller, and the + /// alternative — relaying through Lantern's own infrastructure or + /// shipping a MaxMind DB with the app — is meaningful additional + /// scope. Move this to a Lantern-controlled endpoint or a local DB + /// before any production-scale rollout where peer protection matters + /// beyond demo use. + static Future peerLookup(String ip) async { + // Cache hit: short-circuit before any network I/O. Also caches + // PeerGeo.unknown so a previously-failed lookup doesn't retry on + // every subsequent probe from the same IP. + final cached = _peerCache[ip]; + if (cached != null) return cached; + PeerGeo result = PeerGeo.unknown; + try { + final response = await http + .get(Uri.parse('$_peerUrl/$ip')) + .timeout(const Duration(seconds: 5)); + if (response.statusCode == 200) { + final data = jsonDecode(response.body) as Map; + if (data['success'] == true) { + final iso = (data['country_code'] as String?) ?? ''; + final lat = (data['latitude'] as num?)?.toDouble(); + final lng = (data['longitude'] as num?)?.toDouble(); + final coords = (lat != null && lng != null) + ? GlobeCoordinates(lat, lng) + : _isoToCoords(iso); + final flagObj = data['flag'] as Map?; + result = PeerGeo( + coordinates: coords, + countryName: (data['country'] as String?) ?? '', + countryCode: iso, + flagEmoji: (flagObj?['emoji'] as String?) ?? '', + ); + } + } + } catch (_) {} + _peerCache[ip] = result; + return result; + } +} diff --git a/lib/features/home/provider/radiance_settings_providers.dart b/lib/features/home/provider/radiance_settings_providers.dart index ae9cee0f6d..2a68d2ba27 100644 --- a/lib/features/home/provider/radiance_settings_providers.dart +++ b/lib/features/home/provider/radiance_settings_providers.dart @@ -22,33 +22,44 @@ class RadianceSettings extends _$RadianceSettings { /// Fetches all settings in parallel and assigns a fresh state from the /// results. On a per-field fetch failure, falls back to the hardcoded - /// default for that field. + /// default for that field. Each future is awaited into a named variable + /// (positional-by-name, not positional-by-index) so adding another + /// optional fetch later can't silently desync the read indices. Future _refresh() async { final svc = ref.read(lanternServiceProvider); final blockAdsF = svc.isBlockAdsEnabled(); final routingF = svc.isSmartRoutingEnabled(); final telemetryF = svc.isTelemetryEnabled(); final splitF = PlatformUtils.isIOS ? null : svc.isSplitTunnelingEnabled(); + // Peer-proxy probe runs on every platform with a handler wired up: + // Windows + Linux via FFI, macOS + Android + iOS via MethodChannel. + // Manual port forwarding works on any home WiFi where the user owns + // the router, so mobile is included rather than desktop-only. + final peerF = svc.isPeerProxyEnabled(); + final unboundedF = svc.isUnboundedEnabled(); - final results = await Future.wait([ - blockAdsF, - routingF, - telemetryF, - ?splitF, - ]); + final blockAds = await blockAdsF; + final routing = await routingF; + final telemetry = await telemetryF; + final split = splitF == null ? null : await splitF; + final peer = await peerF; + final unbounded = await unboundedF; if (!ref.mounted) return; const defaults = RadianceSettingsState(); state = RadianceSettingsState( - blockAds: results[0].fold((_) => defaults.blockAds, (v) => v), - routingMode: results[1].fold( + blockAds: blockAds.fold((_) => defaults.blockAds, (v) => v), + routingMode: routing.fold( (_) => defaults.routingMode, (smart) => smart ? RoutingMode.smart : RoutingMode.full, ), - telemetry: results[2].fold((_) => defaults.telemetry, (v) => v), - splitTunneling: splitF == null + telemetry: telemetry.fold((_) => defaults.telemetry, (v) => v), + splitTunneling: split == null ? defaults.splitTunneling - : results[3].fold((_) => defaults.splitTunneling, (v) => v), + : split.fold((_) => defaults.splitTunneling, (v) => v), + peerProxy: peer.fold((_) => defaults.peerProxy, (v) => v), + unboundedEnabled: + unbounded.fold((_) => defaults.unboundedEnabled, (v) => v), ); } @@ -97,6 +108,47 @@ class RadianceSettings extends _$RadianceSettings { (_) => state = state.copyWith(telemetry: consent), ); } + + /// Enable/disable the peer-proxy (Share My Connection) radiance + /// setting. Returns the underlying Either so the caller can react to + /// failure — share_my_connection.dart's _start depends on it to + /// revert UI state if the setting flip fails before peer.Client + /// emits its own phase=error StatusEvent. Internal logging still + /// happens on failure for fire-and-forget call sites. + Future> setPeerProxy(bool value) async { + final svc = ref.read(lanternServiceProvider); + final result = await svc.setPeerProxyEnabled(value); + if (!ref.mounted) return result; + return result.fold( + (err) { + appLogger.error('setPeerProxyEnabled failed: ${err.error}'); + return left(err); + }, + (_) { + state = state.copyWith(peerProxy: value); + return right(unit); + }, + ); + } + + /// Mirror of setPeerProxy for the Unbounded toggle. Returns the + /// Either so callers can react to failure (the Unbounded enable + /// path in share_my_connection.dart uses this for UI rollback). + Future> setUnboundedEnabled(bool value) async { + final svc = ref.read(lanternServiceProvider); + final result = await svc.setUnboundedEnabled(value); + if (!ref.mounted) return result; + return result.fold( + (err) { + appLogger.error('setUnboundedEnabled failed: ${err.error}'); + return left(err); + }, + (_) { + state = state.copyWith(unboundedEnabled: value); + return right(unit); + }, + ); + } } /// Fetches whether user logged in via OAuth from radiance. diff --git a/lib/features/setting/vpn_setting.dart b/lib/features/setting/vpn_setting.dart index 8c108473a9..0071fe5c53 100644 --- a/lib/features/setting/vpn_setting.dart +++ b/lib/features/setting/vpn_setting.dart @@ -6,6 +6,7 @@ import 'package:lantern/core/common/common.dart'; import 'package:lantern/core/widgets/split_tunneling_tile.dart'; import 'package:lantern/core/widgets/switch_button.dart'; import 'package:lantern/features/home/provider/radiance_settings_providers.dart'; +import 'package:lantern/features/share_my_connection/share_my_connection.dart'; @RoutePage(name: 'VPNSetting') class VPNSetting extends HookConsumerWidget { @@ -35,6 +36,18 @@ class VPNSetting extends HookConsumerWidget { final telemetryConsent = ref.watch( radianceSettingsProvider.select((s) => s.telemetry), ); + final peerProxy = ref.watch( + radianceSettingsProvider.select((s) => s.peerProxy), + ); + final unboundedEnabled = ref.watch( + radianceSettingsProvider.select((s) => s.unboundedEnabled), + ); + // The tile reads "On" when EITHER donor protocol is active — + // the disclosure dialog flips peerProxy for "Full mode" and + // unboundedEnabled for "Basic mode", and the user shouldn't + // see a stale "Off" subtitle just because they picked the + // lower-friction Unbounded path. + final shareActive = peerProxy || unboundedEnabled; return ListView( padding: const EdgeInsets.all(0), @@ -56,19 +69,19 @@ class VPNSetting extends HookConsumerWidget { appRouter.push(const ServerSelection()); }, ), - if (!PlatformUtils.isIOS) ...{ + if (!PlatformUtils.isIOS) ...[ DividerSpace(), SplitTunnelingTile( label: 'routing_mode'.i18n, icon: AppImagePaths.route, actionText: routingMode.label(), onPressed: () => appRouter.push(const SmartRouting()), - ) - }, + ), + ], DividerSpace(), if (PlatformUtils.isAndroid || PlatformUtils.isMacOS || - PlatformUtils.isWindows) ...{ + PlatformUtils.isWindows) ...[ SplitTunnelingTile( label: 'split_tunneling'.i18n, icon: AppImagePaths.callSpilt, @@ -76,8 +89,8 @@ class VPNSetting extends HookConsumerWidget { splitTunnelingEnabled ? 'enabled'.i18n : 'disabled'.i18n, onPressed: () => appRouter.push(const SplitTunneling()), ), - DividerSpace() - }, + DividerSpace(), + ], ], ), ), @@ -117,6 +130,36 @@ class VPNSetting extends HookConsumerWidget { }, ), ), + if (PlatformUtils.isDesktop) ...[ + SizedBox(height: 16), + AppCard( + padding: EdgeInsets.zero, + child: AppTile( + label: 'share_my_connection'.i18n, + subtitle: Text( + shareActive + ? 'share_my_connection_on_tap_to_view'.i18n + : 'share_my_connection_subtitle'.i18n, + style: textTheme.labelMedium!.copyWith( + color: context.textTertiary, + letterSpacing: 0.0, + ), + ), + icon: AppImagePaths.share, + trailing: AppImage( + path: AppImagePaths.arrowForward, + height: 20, + ), + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => const ShareMyConnectionScreen(), + ), + ); + }, + ), + ), + ], SizedBox(height: 16), AppCard( padding: EdgeInsets.zero, diff --git a/lib/features/share_my_connection/share_my_connection.dart b/lib/features/share_my_connection/share_my_connection.dart new file mode 100644 index 0000000000..ed9d7f2cb0 --- /dev/null +++ b/lib/features/share_my_connection/share_my_connection.dart @@ -0,0 +1,1497 @@ +// Share My Connection — unified screen for both Unbounded and the +// samizdat-over-UPnP "Share My Connection" modes: +// - Toggle ON triggers a real UPnP / IGD probe via the lantern +// service (FFI on desktop, MethodChannel on mobile). +// - If UPnP works AND the user accepts the SmC disclosure, run SmC mode +// (calls into radiance via the existing radianceSettingsProvider +// setPeerProxy path). +// - Otherwise fall back to Unbounded mode. +// - Globe animates connection arcs from peer-connection FlutterEvents +// streamed up from radiance. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:math' show max, min; + +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_earth_globe/flutter_earth_globe.dart'; +import 'package:flutter_earth_globe/flutter_earth_globe_controller.dart'; +import 'package:flutter_earth_globe/globe_coordinates.dart'; +import 'package:flutter_earth_globe/point.dart'; +import 'package:flutter_earth_globe/point_connection.dart'; +import 'package:flutter_earth_globe/point_connection_style.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:lottie/lottie.dart'; +import 'package:lantern/core/common/common.dart'; +import 'package:lantern/core/models/unbounded_connection_event.dart'; +import 'package:lantern/core/services/geo_lookup_service.dart'; +import 'package:lantern/core/services/injection_container.dart' show sl; +import 'package:lantern/core/services/local_storage_service.dart'; +import 'package:lantern/core/widgets/switch_button.dart'; +import 'package:lantern/features/home/provider/radiance_settings_providers.dart'; +import 'package:lantern/lantern/lantern_service_notifier.dart'; + +// ─── State ─────────────────────────────────────────────────────────────────── + +/// Which underlying protocol the user is contributing through. +/// +/// off — toggle is off / probe in flight +/// unbounded — broflake / WebRTC widget proxy (works on any network) +/// smc — samizdat-over-UPnP "Share My Connection" (higher capability, +/// higher risk; gated on a one-time disclosure) +enum ShareMode { off, unbounded, smc } + +/// Lifecycle phase for SmC mode, sourced from radiance peer.Status.Phase +/// via the `peer-status` FlutterEvent. Stable strings — must stay in +/// sync with radiance/peer/peer.go's Phase constants. +/// +/// idle — nothing running +/// mappingPort — UPnP / manual port mapping in flight +/// detectingIp — public-IP detection +/// registering — POST /v1/peer/register against lantern-cloud +/// startingProxy — libbox samizdat inbound coming up +/// verifying — POST /v1/peer/verify, lantern-cloud is dialing back +/// serving — peer is live and assignable to censored clients +/// stopping — teardown in progress +/// error — Start failed; SharePhase.errorMessage holds the cause +enum SharePhase { + idle, + mappingPort, + detectingIp, + registering, + startingProxy, + verifying, + serving, + stopping, + error; + + static SharePhase fromWire(String? s) => switch (s) { + 'mapping_port' => SharePhase.mappingPort, + 'detecting_ip' => SharePhase.detectingIp, + 'registering' => SharePhase.registering, + 'starting_proxy' => SharePhase.startingProxy, + 'verifying' => SharePhase.verifying, + 'serving' => SharePhase.serving, + 'stopping' => SharePhase.stopping, + 'error' => SharePhase.error, + _ => SharePhase.idle, + }; +} + +class ShareState { + final bool active; + final bool probing; + final ShareMode mode; + final int activeCount; + final int totalCount; + // SmC-only: granular Start/Stop phase from radiance peer.Status. For + // Unbounded mode this stays SharePhase.idle (no equivalent staged + // lifecycle on the broflake side yet). + final SharePhase phase; + final String? errorMessage; + + const ShareState({ + this.active = false, + this.probing = false, + this.mode = ShareMode.off, + this.activeCount = 0, + this.totalCount = 0, + this.phase = SharePhase.idle, + this.errorMessage, + }); + + ShareState copyWith({ + bool? active, + bool? probing, + ShareMode? mode, + int? activeCount, + int? totalCount, + SharePhase? phase, + // Sentinel-defaulted so callers can distinguish "leave alone" (omit + // the argument) from "clear it" (pass null explicitly). The naive + // `String? errorMessage` + `?? this.errorMessage` pattern conflates + // the two and leaves stale error text wedged in state forever — the + // next time a phase transition lands in error, the wrong message + // would get re-rendered. + Object? errorMessage = _unsetErrorMessage, + }) => + ShareState( + active: active ?? this.active, + probing: probing ?? this.probing, + mode: mode ?? this.mode, + activeCount: activeCount ?? this.activeCount, + totalCount: totalCount ?? this.totalCount, + phase: phase ?? this.phase, + errorMessage: identical(errorMessage, _unsetErrorMessage) + ? this.errorMessage + : errorMessage as String?, + ); +} + +// Sentinel for ShareState.copyWith. Has to be a const value distinct +// from any String? a caller might supply (including null), hence the +// private class — `const Object()` instances can be canonicalized to +// the same identity as another bare Object literal. +class _UnsetErrorMessage { + const _UnsetErrorMessage(); +} +const _unsetErrorMessage = _UnsetErrorMessage(); + +// ─── Notifier (mock-backed) ────────────────────────────────────────────────── + +/// Extracts the IP from a peer source string. Handles the four shapes +/// the Go side might emit: +/// - bracketed IPv6 host:port `[2001:db8::1]:443` → `2001:db8::1` +/// - bare IPv6 (no port) `2001:db8::1` → `2001:db8::1` +/// - IPv4 host:port `203.0.113.5:443` → `203.0.113.5` +/// - bare IPv4 (no port) `203.0.113.5` → `203.0.113.5` +/// Returns an empty string if input is empty. +String _extractIP(String source) { + if (source.isEmpty) return ''; + // Bracketed IPv6 host:port — Uri parser strips the brackets and + // returns the inner host. This is the only shape where the + // synthesized-scheme URI parse is unambiguous. + if (source.startsWith('[')) { + final uri = Uri.tryParse('p://$source'); + final host = uri?.host ?? ''; + if (host.isNotEmpty) return host; + return ''; // malformed bracket + } + final first = source.indexOf(':'); + if (first < 0) return source; // bare IPv4 (no port) + // Multiple colons + no brackets = bare IPv6. Bare IPv6 is + // emitted by some broflake paths that don't bracket-format + // addresses; we accept it as-is rather than truncating at the + // last ':' which would mangle the address. + if (first != source.lastIndexOf(':')) return source; + // Exactly one ':' — IPv4 host:port. + return source.substring(0, first); +} + +class _PeerArc { + _PeerArc(this.workerIdx) : streamCount = 1; + final int workerIdx; + int streamCount; + // Geo is resolved async after the first +1 lands. Until then the peer is + // tracked but no arc is emitted — avoids a flash of "unknown" arcs. + PeerGeo? geo; +} + +class ShareNotifier extends Notifier { + // Disclosure ack persists across launches via LocalStorageService + // (SharedPreferences). Key-presence is the signal — the value is + // arbitrary. Cleared by deleteAll() in the existing reset flow. + static const _smcAckKey = 'smc_disclosure_acked'; + LocalStorageService get _storage => sl(); + bool get _smcAck => _storage.containsKey(_smcAckKey); + Future _persistSmcAck() => _storage.setString(_smcAckKey, '1'); + + StreamSubscription? _appEventSub; + int _workerSeq = 0; + // Per-peer arc + active-stream count. samizdat multiplexes many H2 streams + // over one TCP conn, all sharing the same RemoteAddr — ref-count so the arc + // persists until the peer's LAST stream closes, not its first. + final Map _peerArcs = {}; + + final _eventController = + StreamController.broadcast(); + Stream get connectionEvents => + _eventController.stream; + + @override + ShareState build() { + // Keep the notifier alive for the process lifetime. Without this, + // navigating away from the screen disposes the notifier; re-entry + // calls build() again and resets state to mode=off / active=false + // even when SmC or Unbounded is still actually running on the + // backend. The next toggle would then try to re-enable an + // already-enabled setting, and the user loses visibility into + // the active counter and the granular peer-status phase. + // + // ref.onDispose stays registered for explicit Stop/Disable paths + // (provider container reset, hot reload, etc.) so the event + // subscription and stream controller still get cleaned up when + // it does actually happen. + ref.keepAlive(); + ref.onDispose(() { + _stopEventSubscription(); + _eventController.close(); + }); + return const ShareState(); + } + + /// Toggle entry point. Caller passes its BuildContext so we can show the + /// disclosure modal inline, and a WidgetRef so we can drive the radiance + /// peer-share toggle. + /// + /// Resolution order on enable: + /// 1. If the user has set a manual port in Advanced settings, that + /// is an explicit opt-in — go straight to SmC mode. No UPnP + /// probe, no disclosure (user already crossed that line by + /// configuring the port forward on their router). + /// 2. Otherwise probe UPnP. If UPnP works AND the user accepts + /// the SmC disclosure, run SmC. Decline → Unbounded. + /// 3. UPnP unavailable → Unbounded fallback. + Future toggle(BuildContext context, WidgetRef widgetRef) async { + if (state.active || state.probing) { + await _stop(widgetRef); + return; + } + + state = state.copyWith(probing: true); + + // Manual port forward bypasses both the UPnP probe and the SmC + // disclosure dialog. Configuring a port in Advanced is an explicit + // user-driven SmC opt-in — they wouldn't have set it up if they + // weren't sure they wanted to share via the residential-IP path. + final manualPortRes = + await widgetRef.read(lanternServiceProvider).getPeerManualPort(); + final manualPort = manualPortRes.fold((_) => 0, (p) => p); + if (manualPort > 0) { + await _start(widgetRef, ShareMode.smc); + return; + } + + // Real UPnP probe via FFI / MethodChannel. probeUPnP runs IGD + // discovery on the local network and returns true when a usable + // gateway is reachable. Blocks up to ~6 seconds on the M-SEARCH + // multicast wait — long enough that the "Probing your network…" + // status from copyWith(probing: true) above is visible to the + // user. Any failure (no IGD, timeout, FFI / channel error) is + // treated as "UPnP unavailable" → fall back to Unbounded. + final probeRes = + await widgetRef.read(lanternServiceProvider).probeUPnP(); + final upnpAvailable = probeRes.fold((_) => false, (v) => v); + if (!upnpAvailable) { + await _start(widgetRef, ShareMode.unbounded); + return; + } + + if (_smcAck) { + await _start(widgetRef, ShareMode.smc); + return; + } + + if (!context.mounted) { + state = state.copyWith(probing: false); + return; + } + + final accepted = await showDialog( + context: context, + barrierDismissible: false, + builder: (_) => const SmcDisclosureDialog(), + ); + + if (accepted == null) { + // User dismissed without choosing — leave off. + state = state.copyWith(probing: false); + return; + } + if (accepted) { + await _persistSmcAck(); + await _start(widgetRef, ShareMode.smc); + } else { + await _start(widgetRef, ShareMode.unbounded); + } + } + + Future _start(WidgetRef widgetRef, ShareMode mode) async { + state = ShareState( + active: true, + probing: false, + mode: mode, + activeCount: 0, + totalCount: 0, + ); + _startEventSubscription(widgetRef); + switch (mode) { + case ShareMode.smc: + // Flip the radiance peer-proxy setting; LocalBackend.PatchSettings + // routes that into peer.Client.Start, which spins up the UPnP map + // (or honours PeerManualPortKey), registers with lantern-cloud, + // runs the samizdat inbound, and (via the lantern-box peerconn + // listener) emits ConnectionEvents that ride the radiance event + // bus → core.go listenPeerConnectionEvents → FlutterEvent → our + // Dart subscription. + // + // Failures AFTER peer.Client.Start surface via a phase=error + // StatusEvent that _handlePeerStatus turns into a terminal- + // state reset (mode=off, phase=error). Failures BEFORE + // Start (IPC error, MissingPluginException, core not + // initialized) don't go through that path, so check the + // setPeerProxy Either here and revert UI state to + // mode=off, phase=error directly. + final smcRes = await widgetRef + .read(radianceSettingsProvider.notifier) + .setPeerProxy(true); + smcRes.fold( + (err) { + appLogger.error('SmC setPeerProxy failed: ${err.error}'); + _stopEventSubscription(); + state = ShareState( + active: false, + probing: false, + mode: ShareMode.off, + activeCount: 0, + totalCount: 0, + phase: SharePhase.error, + errorMessage: err.error, + ); + }, + (_) => null, + ); + break; + case ShareMode.unbounded: + // Unbounded is the broflake / WebRTC widget-proxy mode. Local + // opt-in only — actual run state also depends on the server's + // Features[unbounded] flag and supplied UnboundedConfig. When + // running, broflake's OnConnectionChange callback emits + // unbounded.ConnectionEvent → forwarded by lantern-core as the + // same EventTypePeerConnection FlutterEvent the SmC path uses, + // so this Dart subscription consumes both protocols uniformly. + // + // Unbounded has no equivalent of the peer.Client phase=error + // StatusEvent that the SmC path leans on for failure recovery, + // so check the Either return here and revert to off if the + // setting flip failed (core not initialized, MethodChannel + // failure, etc.) — otherwise the UI sticks at "Active" while + // nothing actually started. + final res = await widgetRef + .read(lanternServiceProvider) + .setUnboundedEnabled(true); + res.fold( + (err) { + appLogger.error('setUnboundedEnabled failed: ${err.error}'); + _stopEventSubscription(); + state = ShareState( + active: false, + probing: false, + mode: ShareMode.off, + activeCount: 0, + totalCount: 0, + phase: SharePhase.error, + errorMessage: err.error, + ); + }, + (_) => null, + ); + break; + case ShareMode.off: + break; + } + } + + Future _stop(WidgetRef widgetRef) async { + _stopEventSubscription(); + final priorMode = state.mode; + state = const ShareState(); + switch (priorMode) { + case ShareMode.smc: + await widgetRef + .read(radianceSettingsProvider.notifier) + .setPeerProxy(false); + break; + case ShareMode.unbounded: + await widgetRef + .read(lanternServiceProvider) + .setUnboundedEnabled(false); + break; + case ShareMode.off: + break; + } + } + + // ── Live connection event source ─────────────────────────────────────────── + // Subscribes to the existing FFI app-event stream (the same one + // AppEventNotifier uses for config / server-location / data-cap events) + // and filters for type=='peer-connection'. Each event's message is + // {state: +1|-1, source: "ip:port"} originally emitted from the + // lantern-box samizdat inbound via the peerconn listener registry, then + // rebroadcast by lantern-core/core.go listenPeerConnectionEvents. + // + // No local sockets, no fixed ports — the bridge rides on Dart api_dl, + // which is the same channel server-location updates and data-cap events + // already use. + + void _startEventSubscription(WidgetRef widgetRef) { + _peerArcs.clear(); + _appEventSub = widgetRef + .read(lanternServiceProvider) + .watchAppEvents() + .listen((event) { + if (event.eventType == 'peer-status') { + _handlePeerStatus(event.message); + return; + } + if (event.eventType != 'peer-connection') return; + try { + final payload = jsonDecode(event.message) as Map; + final eventState = (payload['state'] as num?)?.toInt() ?? 0; + final source = (payload['source'] as String?) ?? ''; + // Globe only cares about the IP — strip ":port". Handle three + // forms the Go side might emit: + // IPv4 host:port → "203.0.113.5:443" + // IPv6 bracketed host:port → "[2001:db8::1]:443" + // bare IP (no port) → "2001:db8::1" or "203.0.113.5" + // A naive split(':').first works for the first form but + // mangles IPv6 ("[2001" or "2001"). Use Uri.tryParse against + // the synthesized "scheme://source" form to do host extraction + // properly, with a bare-IP fallback for cases where source has + // no port appended. + final ip = _extractIP(source); + if (ip.isEmpty) return; + + if (eventState == 1) { + final existing = _peerArcs[ip]; + if (existing != null) { + existing.streamCount++; + return; + } + final widx = _workerSeq++; + final arc = _PeerArc(widx); + _peerArcs[ip] = arc; + state = state.copyWith( + activeCount: state.activeCount + 1, + totalCount: state.totalCount + 1, + ); + // Resolve country async. Emit the +1 only after lookup so the + // globe can render the arc at the right coords and the UI can + // surface the country name in the connection banner. + unawaited(_resolveAndEmit(ip, arc)); + } else if (eventState == -1) { + final entry = _peerArcs[ip]; + if (entry == null) return; + entry.streamCount--; + if (entry.streamCount > 0) return; + _peerArcs.remove(ip); + // Only emit -1 if we already emitted a +1 for this peer (i.e. + // the geo lookup completed). Otherwise the globe never saw it + // and a -1 with no preceding +1 would just be noise. + if (entry.geo != null) { + _eventController.add(UnboundedConnectionEvent( + state: -1, + workerIdx: entry.workerIdx, + addr: '', + )); + } + state = state.copyWith( + activeCount: max(0, state.activeCount - 1), + ); + } + } catch (e) { + // Malformed event — log without bringing down the listener. + // debugPrint is intentional: appLogger.error would surface as + // a user-visible error toast in some debug builds, and a + // single bad event from the wire shouldn't escalate that + // far. The listener stays subscribed so subsequent + // well-formed events still arrive. + debugPrint('share-my-connection: bad peer-connection event: $e'); + } + }); + } + + Future _resolveAndEmit(String ip, _PeerArc arc) async { + PeerGeo geo; + try { + geo = await GeoLookupService.peerLookup(ip); + } catch (_) { + geo = PeerGeo.unknown; + } + // The notifier could have been disposed during the await (provider + // teardown closes _eventController). Guard before touching it so + // a late lookup completion doesn't throw "Bad state: Cannot add + // event after closing" on the disposed sink. + if (_eventController.isClosed) return; + // Peer may have disconnected before the lookup returned. The map + // entry's identity (workerIdx) is the cheapest check. + final current = _peerArcs[ip]; + if (current == null || current.workerIdx != arc.workerIdx) return; + // Skip arcs we couldn't geo-locate. The peer is still counted in + // activeCount, but we don't draw a wrong-country arc. + if (geo.countryCode.isEmpty) return; + arc.geo = geo; + _eventController.add(UnboundedConnectionEvent( + state: 1, + workerIdx: arc.workerIdx, + addr: ip, + countryName: geo.countryName, + countryCode: geo.countryCode, + flagEmoji: geo.flagEmoji, + coordinates: geo.coordinates, + )); + } + + /// Replays a synthetic +1 for every currently-active peer that has a + /// resolved geo. Callers (e.g. the globe widget when it mounts after + /// the user navigates into the screen) get a one-shot seed of the + /// current world state so they don't render an empty globe despite + /// active connections. Replayed events have isReplay=true so the UI + /// can suppress the "new connection" burst. + void replayCurrentPeers() { + for (final entry in _peerArcs.entries) { + final arc = entry.value; + final geo = arc.geo; + if (geo == null) continue; + _eventController.add(UnboundedConnectionEvent( + state: 1, + workerIdx: arc.workerIdx, + addr: entry.key, + countryName: geo.countryName, + countryCode: geo.countryCode, + flagEmoji: geo.flagEmoji, + coordinates: geo.coordinates, + isReplay: true, + )); + } + } + + void _stopEventSubscription() { + // Synthesize -1 for every active peer BEFORE killing the source + // stream. peer.Client.Stop on the Go side suppresses the box.Close + // disconnect cascade (correct — avoids a flood of post-Stop noise), + // so without this loop the globe would never see -1's for peers + // that were live at toggle-time. Their arcs would orphan and rotate + // with the globe indefinitely. With this loop, the globe sees real + // -1's and runs them through the normal linger-then-remove path. + for (final arc in _peerArcs.values) { + if (arc.geo == null) continue; + _eventController.add(UnboundedConnectionEvent( + state: -1, + workerIdx: arc.workerIdx, + addr: '', + )); + } + _appEventSub?.cancel(); + _appEventSub = null; + _peerArcs.clear(); + _workerSeq = 0; + } + + // Parses a `peer-status` FlutterEvent and folds the new phase / error + // into ShareState. Payload is the JSON-marshalled radiance peer.Status + // (see lantern-core/core.go EventTypePeerStatus). Phase strings come + // from radiance/peer/peer.go's Phase constants; we map them through + // SharePhase.fromWire so an unknown future phase falls back to idle + // instead of crashing the consumer. + void _handlePeerStatus(String message) { + try { + final payload = jsonDecode(message) as Map; + final phase = SharePhase.fromWire(payload['phase'] as String?); + final errMsg = payload['error'] as String?; + final hasErr = errMsg != null && errMsg.isNotEmpty; + + // Terminal-phase reset: when radiance reports the backend is + // idle (clean stop) or error (start failed / runtime collapse), + // the SmC active/mode bits also need to flip — otherwise the + // toggle stays ON while the backend is off. Both terminal + // phases tear down the event subscription and return to the + // off-state; the error phase additionally preserves the + // backend's error message so the StatusCard's (off, error) + // arm renders it. + if ((phase == SharePhase.idle || phase == SharePhase.error) && + state.mode == ShareMode.smc) { + _stopEventSubscription(); + if (phase == SharePhase.error) { + state = ShareState( + phase: SharePhase.error, + errorMessage: hasErr ? errMsg : null, + ); + } else { + state = const ShareState(); + } + return; + } + state = state.copyWith( + phase: phase, + errorMessage: hasErr ? errMsg : null, + ); + } catch (e) { + debugPrint('share-my-connection: bad peer-status event: $e'); + } + } +} + +final shareProvider = + NotifierProvider(ShareNotifier.new); + +// ─── Screen ────────────────────────────────────────────────────────────────── + +class ShareMyConnectionScreen extends HookConsumerWidget { + const ShareMyConnectionScreen({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final state = ref.watch(shareProvider); + final notifier = ref.read(shareProvider.notifier); + final textTheme = Theme.of(context).textTheme; + + return BaseScreen( + title: 'share_my_connection'.i18n, + body: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + children: [ + const SizedBox(height: 12), + Text( + 'smc_intro'.i18n, + style: textTheme.bodyMedium, + ), + const SizedBox(height: 16), + Expanded( + flex: 3, + child: Stack( + children: [ + Positioned.fill(child: _GlobeView()), + // Floating "new connection from X" toast — overlays the + // bottom of the globe area rather than the peer's exact + // location on the sphere. Anchoring to projected coords + // forced the burst to repaint every globe rotation + // frame, which made the rotation jittery. + const Positioned( + left: 0, + right: 0, + bottom: 8, + child: Center(child: _ArrivalToast()), + ), + ], + ), + ), + const SizedBox(height: 8), + _StatusCard(state: state, onToggle: () => notifier.toggle(context, ref)), + const SizedBox(height: 12), + const _AdvancedCard(), + const SizedBox(height: 16), + ], + ), + ), + ); + } +} + +// ─── Status card ───────────────────────────────────────────────────────────── + +class _StatusCard extends StatelessWidget { + final ShareState state; + final VoidCallback onToggle; + + const _StatusCard({required this.state, required this.onToggle}); + + @override + Widget build(BuildContext context) { + final textTheme = Theme.of(context).textTheme; + // Status text source-of-truth, in priority order: + // 1. Off and not probing → "Off" + // 2. Probing UPnP locally → "Probing your network…" + // 3. SmC mode → granular phase from radiance peer.Status. The + // backend emits one phase per stage during Start so the user + // sees real progress instead of "Active" for several seconds. + // 4. Unbounded mode → static "Active — Unbounded" (no equivalent + // staged lifecycle on the broflake side yet). + final modeLabel = switch ((state.mode, state.phase)) { + // Off-with-error is a legitimate terminal state: the enable + // path failed (e.g. setUnboundedEnabled / setPeerProxyEnabled + // returned Left) and reverted mode to off. Render the error + // before the catch-all "Off" so the user sees an actionable + // message instead of a misleading off state. + (ShareMode.off, SharePhase.error) => + state.errorMessage != null + ? 'smc_status_error_with_message'.i18n.fill([state.errorMessage!]) + : 'smc_status_error_generic'.i18n, + (ShareMode.off, _) => + state.probing ? 'smc_status_probing'.i18n : 'smc_status_off'.i18n, + (ShareMode.unbounded, _) => 'smc_status_active_unbounded'.i18n, + (ShareMode.smc, SharePhase.mappingPort) => + 'smc_status_mapping_port'.i18n, + (ShareMode.smc, SharePhase.detectingIp) => + 'smc_status_detecting_ip'.i18n, + (ShareMode.smc, SharePhase.registering) => + 'smc_status_registering'.i18n, + (ShareMode.smc, SharePhase.startingProxy) => + 'smc_status_starting_proxy'.i18n, + (ShareMode.smc, SharePhase.verifying) => + 'smc_status_verifying'.i18n, + (ShareMode.smc, SharePhase.serving) => + 'smc_status_serving'.i18n, + (ShareMode.smc, SharePhase.stopping) => 'smc_status_stopping'.i18n, + (ShareMode.smc, SharePhase.error) => + state.errorMessage != null + ? 'smc_status_error_with_message'.i18n.fill([state.errorMessage!]) + : 'smc_status_error_generic'.i18n, + // SmC active but no phase yet (e.g. very first frame after toggle + // before the backend's first event arrives) — fall back to the + // legacy active label so the UI isn't blank. + (ShareMode.smc, SharePhase.idle) => 'smc_status_active_smc'.i18n, + }; + + return Container( + decoration: BoxDecoration( + color: Theme.of(context).cardColor, + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.black12), + ), + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'smc_status_label'.i18n, + style: textTheme.labelLarge, + ), + const SizedBox(height: 4), + Text( + modeLabel, + style: textTheme.bodyMedium?.copyWith( + color: state.active + ? AppColors.blue4 + : Theme.of(context).hintColor, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + // Match the rest of the app's toggles (vpn_setting.dart etc.). + // SwitchButton has no built-in disabled state, so during the + // probe we render the switch but absorb the tap so the user + // doesn't double-fire toggle(). + SwitchButton( + value: state.active || state.probing, + onChanged: (value) { + if (state.probing) return; + onToggle(); + }, + ), + ], + ), + if (state.active) ...[ + const SizedBox(height: 12), + const Divider(height: 1), + const SizedBox(height: 12), + Stack( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _Stat(label: 'smc_stat_active_now'.i18n, value: '${state.activeCount}'), + _Stat(label: 'smc_stat_total_today'.i18n, value: '${state.totalCount}'), + ], + ), + Positioned( + top: 0, + right: 0, + child: Tooltip( + triggerMode: TooltipTriggerMode.tap, + waitDuration: const Duration(milliseconds: 200), + showDuration: const Duration(seconds: 8), + preferBelow: false, + margin: const EdgeInsets.symmetric(horizontal: 24), + padding: const EdgeInsets.symmetric( + horizontal: 12, vertical: 10), + textStyle: const TextStyle(color: Colors.white, fontSize: 12), + decoration: BoxDecoration( + color: Colors.black87, + borderRadius: BorderRadius.circular(8), + ), + message: 'smc_connections_tooltip'.i18n, + child: Icon( + Icons.info_outline, + size: 16, + color: Theme.of(context).hintColor, + ), + ), + ), + ], + ), + ], + ], + ), + ); + } +} + +class _Stat extends StatelessWidget { + final String label; + final String value; + const _Stat({required this.label, required this.value}); + + @override + Widget build(BuildContext context) { + final textTheme = Theme.of(context).textTheme; + return Column( + children: [ + Text(value, style: textTheme.headlineSmall), + Text(label, style: textTheme.labelSmall), + ], + ); + } +} + +// ─── Globe ─────────────────────────────────────────────────────────────────── + +class _GlobeView extends ConsumerStatefulWidget { + @override + ConsumerState<_GlobeView> createState() => _GlobeViewState(); +} + +class _GlobeViewState extends ConsumerState<_GlobeView> { + static final _arcColor = AppColors.blue4.withValues(alpha: 0.75); + static final _originPointColor = AppColors.blue4.withValues(alpha: 0.15); + static final _peerPointColor = AppColors.yellow3.withValues(alpha: 0.15); + static const _atmosphereDark = AppColors.blue4; + static const _atmosphereLight = AppColors.blue6; + + final FlutterEarthGlobeController _globeController = + FlutterEarthGlobeController( + isRotating: true, + rotationSpeed: 0.04, + zoom: 0, + isZoomEnabled: false, + showAtmosphere: true, + atmosphereColor: _atmosphereDark, + atmosphereOpacity: 0.2, + atmosphereBlur: 20, + ); + + StreamSubscription? _eventSub; + GlobeCoordinates? _originCoords; + // Pending arc removals: peer goes idle → we don't yank the arc + // immediately so brief URL-test probes (which dominate samizdat-peer + // traffic) still register visually. Timer is cancelled if the same + // workerIdx +1's again before it fires. + final Map _pendingRemovals = {}; + static const _arcLinger = Duration(seconds: 5); + + @override + void initState() { + super.initState(); + _globeController.onLoaded = () { + if (!mounted) return; + _applyTheme(); + }; + // Subscribe FIRST so we don't miss any real-time +1 events while + // _initOrigin is in flight. _addPeer guards on _originCoords — + // events that arrive before origin lookup completes are still + // tracked by the notifier's _peerArcs map (the source of truth); + // _initOrigin's continuation calls replayCurrentPeers to draw + // them with the now-known origin coords. Without this ordering, + // arcs drew to GlobeCoordinates(0,0) and never got corrected. + _eventSub = ref + .read(shareProvider.notifier) + .connectionEvents + .listen(_handleEvent); + _initOrigin(); + } + + @override + void dispose() { + _eventSub?.cancel(); + for (final t in _pendingRemovals.values) { + t.cancel(); + } + _pendingRemovals.clear(); + _globeController.dispose(); + super.dispose(); + } + + void _applyTheme() { + final isDark = Theme.of(context).brightness == Brightness.dark; + _globeController.loadSurface(AssetImage( + isDark + ? 'assets/unbounded/uv-map-dark.png' + : 'assets/unbounded/uv-map.png', + )); + _globeController.atmosphereColor = + isDark ? _atmosphereDark : _atmosphereLight; + } + + Future _initOrigin() async { + final coords = await GeoLookupService.selfLookup(); + if (!mounted) return; + _originCoords = coords; + _globeController.addPoint(Point( + id: 'origin', + coordinates: coords, + style: PointStyle(color: _originPointColor, size: 8), + )); + // Origin coords are now known — draw any peers that connected + // before (or during) the origin lookup. _addPeer's null-guard + // skipped them earlier; replayCurrentPeers re-fires +1 events + // for everything in _peerArcs. + ref.read(shareProvider.notifier).replayCurrentPeers(); + } + + void _handleEvent(UnboundedConnectionEvent event) { + if (event.state == 1 && event.coordinates != null) { + // Cancel any lingering removal — same workerIdx is back. + _pendingRemovals.remove(event.workerIdx)?.cancel(); + _addPeer(event); + } else if (event.state == -1) { + // Linger the arc so brief connections still register visually. + _pendingRemovals[event.workerIdx]?.cancel(); + _pendingRemovals[event.workerIdx] = Timer(_arcLinger, () { + _pendingRemovals.remove(event.workerIdx); + if (!mounted) return; + _removePeer(event.workerIdx); + }); + } + } + + // Jitter coords by a workerIdx-derived offset so multiple peers from + // the same country don't draw arcs on top of each other. Hash-based so + // the same widx always lands in the same slot — no jitter drift on + // replay. + GlobeCoordinates _jittered(GlobeCoordinates base, int widx) { + final hash = widx * 2654435761; // Knuth multiplicative hash + final dLat = ((hash >> 4) & 0xff) / 255.0 * 4.0 - 2.0; // [-2, +2]° + final dLng = ((hash >> 12) & 0xff) / 255.0 * 4.0 - 2.0; + return GlobeCoordinates(base.latitude + dLat, base.longitude + dLng); + } + + void _addPeer(UnboundedConnectionEvent event) { + if (!mounted) return; + // Origin not yet resolved — skip the draw rather than render an + // arc to GlobeCoordinates(0, 0). The peer is still tracked in + // the notifier's _peerArcs map, and _initOrigin's continuation + // calls replayCurrentPeers once origin is known so anything + // skipped here gets drawn with the correct destination. + if (_originCoords == null) return; + final coords = _jittered(event.coordinates!, event.workerIdx); + // Arc direction is censored user → uncensored peer (us). The dash + // animation flows from start to end, so the visual "travel" reads + // as traffic arriving at our peer to escape censorship. + _globeController.addPointConnection(PointConnection( + id: 'conn_${event.workerIdx}', + start: coords, + end: _originCoords!, + curveScale: .6, + style: PointConnectionStyle( + color: _arcColor, + lineWidth: 3, + type: PointConnectionType.solid, + dashAnimateTime: 1000, + dashSize: 13, + spacing: 15, + dotSize: 10, + animateOnAdd: true, + ), + )); + _globeController.addPoint(Point( + id: 'peer_${event.workerIdx}', + coordinates: coords, + style: PointStyle(color: _peerPointColor, size: 6), + )); + } + + void _removePeer(int workerIdx) { + _globeController.removePointConnection('conn_$workerIdx'); + _globeController.removePoint('peer_$workerIdx'); + } + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + // FlutterEarthGlobe positions the sphere relative to MediaQuery.size + // (i.e. the full screen). Without overriding it the globe ends up + // off-screen when it lives in a non-fullscreen layout slot. The + // MediaQuery override + Positioned.fill keeps the sphere centred + // within this widget's box; ClipRect keeps arcs from painting + // outside the box when they curve high. + final widgetSize = Size(constraints.maxWidth, constraints.maxHeight); + final radius = + min(constraints.maxWidth, constraints.maxHeight) / 2 * 0.7; + return ClipRect( + // copyWith preserves the inherited devicePixelRatio, + // textScaleFactor, padding/insets etc. — constructing + // MediaQueryData from scratch with just `size:` would drop + // those, breaking high-DPI rendering (pixel ratio falls to + // 1.0) and accessibility scaling for the globe subtree. + child: MediaQuery( + data: MediaQuery.of(context).copyWith(size: widgetSize), + child: Stack( + children: [ + Positioned.fill( + child: FlutterEarthGlobe( + controller: _globeController, + radius: radius, + alignment: const Alignment(0.0, -0.1), + ), + ), + ], + ), + ), + ); + }, + ); + } +} + +// ─── Arrival toast ─────────────────────────────────────────────────────────── + +/// Floating notification overlay shown under the globe when a new peer +/// arrives. Mirrors the unbounded.lantern.io notification pattern: +/// heart-burst on the left, `New connection from ` text on +/// the right. Slides up + fades in, auto-hides after ~3.5s. Listens +/// directly to ShareNotifier.connectionEvents so we don't depend on +/// the globe widget for triggering. +class _ArrivalToast extends ConsumerStatefulWidget { + const _ArrivalToast(); + + @override + ConsumerState<_ArrivalToast> createState() => _ArrivalToastState(); +} + +class _ArrivalToastState extends ConsumerState<_ArrivalToast> { + StreamSubscription? _sub; + Timer? _hideTimer; + UnboundedConnectionEvent? _current; + + @override + void initState() { + super.initState(); + _sub = ref + .read(shareProvider.notifier) + .connectionEvents + .listen(_onEvent); + } + + void _onEvent(UnboundedConnectionEvent event) { + if (event.state != 1 || event.isReplay) return; + if (event.countryName.isEmpty) return; + if (!mounted) return; + _hideTimer?.cancel(); + setState(() => _current = event); + _hideTimer = Timer(const Duration(milliseconds: 3500), () { + if (!mounted) return; + setState(() => _current = null); + }); + } + + @override + void dispose() { + _sub?.cancel(); + _hideTimer?.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final event = _current; + return AnimatedSwitcher( + duration: const Duration(milliseconds: 280), + transitionBuilder: (child, anim) => FadeTransition( + opacity: anim, + child: SlideTransition( + position: Tween( + begin: const Offset(0, 0.4), end: Offset.zero) + .animate(CurvedAnimation(parent: anim, curve: Curves.easeOut)), + child: child, + ), + ), + child: event == null + ? const SizedBox.shrink(key: ValueKey('arrival-hidden')) + : _ArrivalCard( + // ValueKey forces AnimatedSwitcher to swap children when a + // new arrival lands while the previous toast is still up, + // so the Lottie restarts cleanly. + key: ValueKey('arrival-${event.workerIdx}'), + countryName: event.countryName, + flagEmoji: event.flagEmoji, + ), + ); + } +} + +class _ArrivalCard extends StatelessWidget { + const _ArrivalCard({ + super.key, + required this.countryName, + required this.flagEmoji, + }); + + final String countryName; + final String flagEmoji; + + @override + Widget build(BuildContext context) { + return IgnorePointer( + child: Container( + padding: const EdgeInsets.fromLTRB(10, 8, 16, 8), + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.92), + borderRadius: BorderRadius.circular(100), + border: Border.all(color: Colors.black12), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.12), + blurRadius: 12, + offset: const Offset(0, 4), + ), + ], + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(width: 40, height: 40, child: _HeartBurst()), + const SizedBox(width: 12), + Text( + flagEmoji.isEmpty + ? 'smc_arrival_toast'.i18n.fill([countryName]) + : '$flagEmoji ${'smc_arrival_toast'.i18n.fill([countryName])}', + style: const TextStyle( + fontSize: 13, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ); + } +} + +// ─── Heart burst ───────────────────────────────────────────────────────────── + +/// Heart + Lottie explosion lifted from getlantern/unbounded. The pink +/// heart is the inline SVG path from `notification/explosion.tsx` +/// (FF5A79 fill, 32×27 viewBox); the burst is `explosion.json` played +/// once via the `lottie` Flutter package. Rendered inside _ArrivalCard +/// (under the globe), NOT anchored to globe coords — anchoring forced +/// a repaint per globe rotation frame and made rotation jittery. +class _HeartBurst extends StatefulWidget { + const _HeartBurst(); + + @override + State<_HeartBurst> createState() => _HeartBurstState(); +} + +class _HeartBurstState extends State<_HeartBurst> + with TickerProviderStateMixin { + AnimationController? _lottieCtrl; + + @override + void dispose() { + _lottieCtrl?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return IgnorePointer( + child: Stack( + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + // Lottie explosion sized so particle spray extends slightly + // past the card bounds (Clip.none on parent lets it overflow). + // Mirrors unbounded's LottieWrapper sizing, scaled down for an + // inline card slot. + Positioned( + width: 110, + height: 110, + child: Lottie.asset( + 'assets/unbounded/explosion.json', + repeat: false, + fit: BoxFit.contain, + onLoaded: (composition) { + // Dispose guard: Lottie's onLoaded can fire after the + // burst is replaced (rapid peer arrivals replace the + // ArrivalCard before composition load completes). + // Without this, AnimationController(vsync: this) + + // setState would throw on a disposed State. + if (!mounted) return; + // Also dispose any prior controller — a stale + // AnimationController from an earlier onLoaded would + // leak its ticker subscription otherwise. + _lottieCtrl?.dispose(); + _lottieCtrl = AnimationController( + vsync: this, + duration: composition.duration, + )..forward(); + setState(() {}); + }, + controller: _lottieCtrl, + ), + ), + // Heart SVG path — exact coords from unbounded's inline SVG. + const SizedBox( + width: 22, + height: 19, + child: CustomPaint(painter: _HeartPainter()), + ), + ], + ), + ); + } +} + +/// Pink heart from `getlantern/unbounded` — exact SVG path coords +/// (viewBox 0 0 32 27, fill #FF5A79). +class _HeartPainter extends CustomPainter { + const _HeartPainter(); + + @override + void paint(Canvas canvas, Size size) { + final paint = Paint()..color = const Color(0xFFFF5A79); + final path = Path() + ..moveTo(31.5035, 5.87209) + ..cubicTo(28.0938, -3.18494, 17.0123, 0.864084, 16, 5.3926) + ..cubicTo(14.6148, 0.597701, 3.79965, -2.97183, 0.496497, 5.87209) + ..cubicTo(-3.17959, 15.7283, 14.7214, 24.5722, 16, 26.0107) + ..cubicTo(17.2786, 24.8386, 35.1796, 15.5684, 31.5035, 5.87209) + ..close(); + // Scale path from native 32x27 to the canvas size. + final scaled = path.transform(Matrix4.diagonal3Values( + size.width / 32.0, + size.height / 27.0, + 1.0, + ).storage); + canvas.drawPath(scaled, paint); + } + + @override + bool shouldRepaint(_HeartPainter oldDelegate) => false; +} + +// ─── Advanced section ──────────────────────────────────────────────────────── + +/// _AdvancedCard exposes power-user knobs that don't belong in the +/// always-visible status card. Today: manual port forward (for users on +/// networks where UPnP doesn't work, who've configured a router-side +/// port forward by hand). +/// +/// Persisted via the existing FFI setPeerManualPort path; takes effect +/// on the next peer.Client.Start (i.e. next time the toggle is flipped +/// on after editing the field). +class _AdvancedCard extends HookConsumerWidget { + const _AdvancedCard(); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final textTheme = Theme.of(context).textTheme; + return Container( + decoration: BoxDecoration( + color: Theme.of(context).cardColor, + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.black12), + ), + child: Theme( + // Strip the divider lines ExpansionTile draws by default — the + // container border already gives the section its own outline. + data: Theme.of(context).copyWith(dividerColor: Colors.transparent), + child: ExpansionTile( + tilePadding: const EdgeInsets.symmetric(horizontal: 16), + childrenPadding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + title: Text('smc_advanced'.i18n, style: textTheme.labelLarge), + subtitle: Text( + 'smc_advanced_subtitle'.i18n, + style: textTheme.labelSmall, + ), + children: const [_ManualPortField()], + ), + ), + ); + } +} + +class _ManualPortField extends HookConsumerWidget { + const _ManualPortField(); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final textTheme = Theme.of(context).textTheme; + final controller = useTextEditingController(); + final loaded = useState(false); + final saving = useState(false); + final lastSaved = useState(null); + + // Load the persisted port once. We deliberately don't watch a + // provider here — the value rarely changes and a one-shot read + // matches the rest of the radianceSettingsProvider's eager-load + // pattern. + // + // Dispose guard: the user can navigate away while the + // getPeerManualPort future is still in flight (especially on the + // FFI path where it can take several ms). Without the guard, the + // continuation would write to a disposed TextEditingController + // and useState ValueNotifiers and throw. `disposed` flips on the + // useEffect cleanup so post-dispose writes short-circuit. + useEffect(() { + var disposed = false; + Future.microtask(() async { + final result = + await ref.read(lanternServiceProvider).getPeerManualPort(); + if (disposed) return; + result.fold((_) => null, (port) { + if (port > 0) controller.text = port.toString(); + lastSaved.value = port; + }); + loaded.value = true; + }); + return () => disposed = true; + }, const []); + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'smc_manual_port'.i18n, + style: textTheme.labelLarge, + ), + const SizedBox(height: 4), + Text( + 'smc_manual_port_description'.i18n, + style: textTheme.bodySmall, + ), + const SizedBox(height: 12), + Row( + children: [ + Expanded( + child: TextField( + controller: controller, + keyboardType: const TextInputType.numberWithOptions( + decimal: false, + signed: false, + ), + decoration: InputDecoration( + labelText: 'smc_manual_port_label'.i18n, + hintText: 'smc_manual_port_hint'.i18n, + border: const OutlineInputBorder(), + isDense: true, + enabled: loaded.value && !saving.value, + ), + ), + ), + const SizedBox(width: 12), + FilledButton( + onPressed: (loaded.value && !saving.value) + ? () => _save(ref, context, controller, saving, lastSaved) + : null, + child: saving.value + ? const SizedBox( + height: 16, width: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : Text('smc_manual_port_save'.i18n), + ), + ], + ), + if (lastSaved.value != null && lastSaved.value! > 0) ...[ + const SizedBox(height: 8), + Text( + 'smc_manual_port_currently_set'.i18n.fill([lastSaved.value!]), + style: textTheme.bodySmall?.copyWith( + color: Theme.of(context).hintColor, + ), + ), + ], + ], + ); + } + + Future _save( + WidgetRef ref, + BuildContext context, + TextEditingController controller, + ValueNotifier saving, + ValueNotifier lastSaved, + ) async { + saving.value = true; + try { + final raw = controller.text.trim(); + int port = 0; + if (raw.isNotEmpty) { + port = int.tryParse(raw) ?? -1; + if (port < 1 || port > 65535) { + if (context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('smc_manual_port_out_of_range'.i18n)), + ); + } + return; + } + } + final result = + await ref.read(lanternServiceProvider).setPeerManualPort(port); + result.fold( + (err) { + if (context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text(err.localizedErrorMessage)), + ); + } + }, + (_) { + lastSaved.value = port; + if (context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(port == 0 + ? 'smc_manual_port_cleared'.i18n + : 'smc_manual_port_saved'.i18n.fill([port])), + ), + ); + } + }, + ); + } finally { + saving.value = false; + } + } +} + +// ─── Disclosure dialog ─────────────────────────────────────────────────────── + +class SmcDisclosureDialog extends StatelessWidget { + const SmcDisclosureDialog({super.key}); + + @override + Widget build(BuildContext context) { + final textTheme = Theme.of(context).textTheme; + return AlertDialog( + title: Text('smc_disclosure_title'.i18n), + content: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'smc_disclosure_body_capability'.i18n, + style: textTheme.bodyMedium, + ), + const SizedBox(height: 12), + Text( + 'smc_disclosure_body_safety'.i18n, + style: textTheme.bodyMedium, + ), + const SizedBox(height: 12), + Text( + 'smc_disclosure_body_alternative'.i18n, + style: textTheme.bodyMedium?.copyWith( + color: Theme.of(context).hintColor, + ), + ), + ], + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text('smc_disclosure_basic'.i18n), + ), + FilledButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text('smc_disclosure_full'.i18n), + ), + ], + ); + } +} diff --git a/lib/lantern/lantern_core_service.dart b/lib/lantern/lantern_core_service.dart index 7dde6b538b..162a5cdde9 100644 --- a/lib/lantern/lantern_core_service.dart +++ b/lib/lantern/lantern_core_service.dart @@ -79,6 +79,34 @@ abstract class LanternCoreService { Future> isBlockAdsEnabled(); + Future> setPeerProxyEnabled(bool enabled); + + Future> isPeerProxyEnabled(); + + /// Persists the manually-configured router port forward used as the + /// peer-share external port when set. Pass 0 to clear the override + /// and revert to UPnP-discovered port behavior. + Future> setPeerManualPort(int port); + + /// Returns the persisted manual port (0 if unset). + Future> getPeerManualPort(); + + /// Local opt-in for the broflake / Unbounded widget proxy ("Basic + /// mode" in the Share My Connection UI). Actual run state also + /// depends on server feature-flag and config availability. + Future> setUnboundedEnabled(bool enabled); + + Future> isUnboundedEnabled(); + + /// Runs UPnP / IGD discovery on the local network and reports + /// whether a usable gateway is reachable. Used by the Share My + /// Connection toggle path to decide between SmC mode (residential + /// proxy, needs UPnP or a manual port forward) and Unbounded mode + /// (WebRTC, works anywhere) when no manual port is configured. + /// Blocks for up to ~6 seconds on the multicast M-SEARCH wait; + /// the FFI implementation runs in a background isolate. + Future> probeUPnP(); + Future> isSmartRoutingEnabled(); Future> isTelemetryEnabled(); diff --git a/lib/lantern/lantern_ffi_service.dart b/lib/lantern/lantern_ffi_service.dart index dec4dec5ca..f2d38f9cbe 100644 --- a/lib/lantern/lantern_ffi_service.dart +++ b/lib/lantern/lantern_ffi_service.dart @@ -1550,6 +1550,120 @@ class LanternFFIService implements LanternCoreService { } } + @override + Future> setPeerProxyEnabled(bool enabled) async { + try { + final result = await runInBackground(() async { + // The Go side returns C.CString-allocated memory; free via + // freeCString after copying into a Dart string, otherwise + // every toggle leaks a small heap allocation. + final resultPtr = _ffiService.setPeerProxyEnabled(enabled ? 1 : 0); + try { + return resultPtr.cast().toDartString(); + } finally { + _ffiService.freeCString(resultPtr); + } + }); + checkAPIError(result); + return right(unit); + } catch (e, st) { + appLogger.error('setPeerProxyEnabled error: $e', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> isPeerProxyEnabled() async { + try { + final res = _ffiService.isPeerProxyEnabled(); + return right(res != 0); + } catch (e, st) { + appLogger.error('isPeerProxyEnabled error: $e', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> setPeerManualPort(int port) async { + try { + final result = await runInBackground(() async { + // Go returns C.CString-allocated memory; free via freeCString + // after copying into a Dart string. + final resultPtr = _ffiService.setPeerManualPort(port); + try { + return resultPtr.cast().toDartString(); + } finally { + _ffiService.freeCString(resultPtr); + } + }); + checkAPIError(result); + return right(unit); + } catch (e, st) { + appLogger.error('setPeerManualPort error: $e', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> getPeerManualPort() async { + try { + final res = _ffiService.getPeerManualPort(); + return right(res); + } catch (e, st) { + appLogger.error('getPeerManualPort error: $e', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> setUnboundedEnabled(bool enabled) async { + try { + final result = await runInBackground(() async { + // Go returns C.CString-allocated memory; free via freeCString + // after copying into a Dart string. + final resultPtr = _ffiService.setUnboundedEnabled(enabled ? 1 : 0); + try { + return resultPtr.cast().toDartString(); + } finally { + _ffiService.freeCString(resultPtr); + } + }); + checkAPIError(result); + return right(unit); + } catch (e, st) { + appLogger.error('setUnboundedEnabled error: $e', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> isUnboundedEnabled() async { + try { + final res = _ffiService.isUnboundedEnabled(); + return right(res != 0); + } catch (e, st) { + appLogger.error('isUnboundedEnabled error: $e', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> probeUPnP() async { + try { + // UPnP M-SEARCH waits for multicast replies (~5-6s upper bound + // in the LanternCore-side timeout). Off-main-thread mandatory; + // a direct call from the UI isolate stalls every frame for the + // duration of the wait. + final res = await runInBackground(() async { + return _ffiService.probeUPnP(); + }); + return right(res != 0); + } catch (e, st) { + appLogger.error('probeUPnP error: $e', e, st); + return Left(e.toFailure()); + } + } + @override Future> isSmartRoutingEnabled() async { try { diff --git a/lib/lantern/lantern_generated_bindings.dart b/lib/lantern/lantern_generated_bindings.dart index 14cc3944cb..1054e22529 100644 --- a/lib/lantern/lantern_generated_bindings.dart +++ b/lib/lantern/lantern_generated_bindings.dart @@ -18,162 +18,6 @@ class LanternBindings { ffi.Pointer Function(String symbolName) lookup, ) : _lookup = lookup; - void __va_start(ffi.Pointer arg0) { - return ___va_start(arg0); - } - - late final ___va_startPtr = - _lookup)>>( - '__va_start', - ); - late final ___va_start = ___va_startPtr - .asFunction)>(); - - void __security_init_cookie() { - return ___security_init_cookie(); - } - - late final ___security_init_cookiePtr = - _lookup>( - '__security_init_cookie', - ); - late final ___security_init_cookie = ___security_init_cookiePtr - .asFunction(); - - void __security_check_cookie(int _StackCookie) { - return ___security_check_cookie(_StackCookie); - } - - late final ___security_check_cookiePtr = - _lookup>( - '__security_check_cookie', - ); - late final ___security_check_cookie = ___security_check_cookiePtr - .asFunction(); - - void __report_gsfailure(int _StackCookie) { - return ___report_gsfailure(_StackCookie); - } - - late final ___report_gsfailurePtr = - _lookup>( - '__report_gsfailure', - ); - late final ___report_gsfailure = ___report_gsfailurePtr - .asFunction(); - - late final ffi.Pointer ___security_cookie = _lookup( - '__security_cookie', - ); - - int get __security_cookie => ___security_cookie.value; - - set __security_cookie(int value) => ___security_cookie.value = value; - - void _invalid_parameter_noinfo() { - return __invalid_parameter_noinfo(); - } - - late final __invalid_parameter_noinfoPtr = - _lookup>( - '_invalid_parameter_noinfo', - ); - late final __invalid_parameter_noinfo = __invalid_parameter_noinfoPtr - .asFunction(); - - void _invalid_parameter_noinfo_noreturn() { - return __invalid_parameter_noinfo_noreturn(); - } - - late final __invalid_parameter_noinfo_noreturnPtr = - _lookup>( - '_invalid_parameter_noinfo_noreturn', - ); - late final __invalid_parameter_noinfo_noreturn = - __invalid_parameter_noinfo_noreturnPtr.asFunction(); - - void _invoke_watson( - ffi.Pointer _Expression, - ffi.Pointer _FunctionName, - ffi.Pointer _FileName, - int _LineNo, - int _Reserved, - ) { - return __invoke_watson( - _Expression, - _FunctionName, - _FileName, - _LineNo, - _Reserved, - ); - } - - late final __invoke_watsonPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UintPtr, - ) - > - >('_invoke_watson'); - late final __invoke_watson = __invoke_watsonPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ) - >(); - - ffi.Pointer _errno() { - return __errno(); - } - - late final __errnoPtr = - _lookup Function()>>('_errno'); - late final __errno = __errnoPtr.asFunction Function()>(); - - int _set_errno(int _Value) { - return __set_errno(_Value); - } - - late final __set_errnoPtr = - _lookup>('_set_errno'); - late final __set_errno = __set_errnoPtr.asFunction(); - - int _get_errno(ffi.Pointer _Value) { - return __get_errno(_Value); - } - - late final __get_errnoPtr = - _lookup)>>( - '_get_errno', - ); - late final __get_errno = __get_errnoPtr - .asFunction)>(); - - int __threadid() { - return ___threadid(); - } - - late final ___threadidPtr = - _lookup>('__threadid'); - late final ___threadid = ___threadidPtr.asFunction(); - - int __threadhandle() { - return ___threadhandle(); - } - - late final ___threadhandlePtr = - _lookup>('__threadhandle'); - late final ___threadhandle = ___threadhandlePtr.asFunction(); - int _GoStringLen(_GoString_ s) { return __GoStringLen(s); } @@ -196,6722 +40,6197 @@ class LanternBindings { late final __GoStringPtr = __GoStringPtrPtr .asFunction Function(_GoString_)>(); - ffi.Pointer _calloc_base(int _Count, int _Size) { - return __calloc_base(_Count, _Size); + ffi.Pointer> signal( + int arg0, + ffi.Pointer> arg1, + ) { + return _signal(arg0, arg1); } - late final __calloc_basePtr = + late final _signalPtr = _lookup< - ffi.NativeFunction Function(ffi.Size, ffi.Size)> - >('_calloc_base'); - late final __calloc_base = __calloc_basePtr - .asFunction Function(int, int)>(); + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer>, + ) + > + >('signal'); + late final _signal = _signalPtr + .asFunction< + ffi.Pointer> Function( + int, + ffi.Pointer>, + ) + >(); - ffi.Pointer calloc(int _Count, int _Size) { - return _calloc(_Count, _Size); + int getpriority(int arg0, int arg1) { + return _getpriority(arg0, arg1); } - late final _callocPtr = - _lookup< - ffi.NativeFunction Function(ffi.Size, ffi.Size)> - >('calloc'); - late final _calloc = _callocPtr - .asFunction Function(int, int)>(); + late final _getpriorityPtr = + _lookup>( + 'getpriority', + ); + late final _getpriority = _getpriorityPtr + .asFunction(); - int _callnewh(int _Size) { - return __callnewh(_Size); + int getiopolicy_np(int arg0, int arg1) { + return _getiopolicy_np(arg0, arg1); } - late final __callnewhPtr = - _lookup>('_callnewh'); - late final __callnewh = __callnewhPtr.asFunction(); + late final _getiopolicy_npPtr = + _lookup>( + 'getiopolicy_np', + ); + late final _getiopolicy_np = _getiopolicy_npPtr + .asFunction(); - ffi.Pointer _expand(ffi.Pointer _Block, int _Size) { - return __expand(_Block, _Size); + int getrlimit(int arg0, ffi.Pointer arg1) { + return _getrlimit(arg0, arg1); } - late final __expandPtr = + late final _getrlimitPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size) - > - >('_expand'); - late final __expand = __expandPtr - .asFunction Function(ffi.Pointer, int)>(); - - void _free_base(ffi.Pointer _Block) { - return __free_base(_Block); - } - - late final __free_basePtr = - _lookup)>>( - '_free_base', - ); - late final __free_base = __free_basePtr - .asFunction)>(); + ffi.NativeFunction)> + >('getrlimit'); + late final _getrlimit = _getrlimitPtr + .asFunction)>(); - void free(ffi.Pointer _Block) { - return _free(_Block); + int getrusage(int arg0, ffi.Pointer arg1) { + return _getrusage(arg0, arg1); } - late final _freePtr = - _lookup)>>( - 'free', - ); - late final _free = _freePtr - .asFunction)>(); + late final _getrusagePtr = + _lookup< + ffi.NativeFunction)> + >('getrusage'); + late final _getrusage = _getrusagePtr + .asFunction)>(); - ffi.Pointer _malloc_base(int _Size) { - return __malloc_base(_Size); + int setpriority(int arg0, int arg1, int arg2) { + return _setpriority(arg0, arg1, arg2); } - late final __malloc_basePtr = - _lookup Function(ffi.Size)>>( - '_malloc_base', + late final _setpriorityPtr = + _lookup>( + 'setpriority', ); - late final __malloc_base = __malloc_basePtr - .asFunction Function(int)>(); + late final _setpriority = _setpriorityPtr + .asFunction(); - ffi.Pointer malloc(int _Size) { - return _malloc(_Size); + int setiopolicy_np(int arg0, int arg1, int arg2) { + return _setiopolicy_np(arg0, arg1, arg2); } - late final _mallocPtr = - _lookup Function(ffi.Size)>>( - 'malloc', + late final _setiopolicy_npPtr = + _lookup>( + 'setiopolicy_np', ); - late final _malloc = _mallocPtr - .asFunction Function(int)>(); + late final _setiopolicy_np = _setiopolicy_npPtr + .asFunction(); - int _msize_base(ffi.Pointer _Block) { - return __msize_base(_Block); + int setrlimit(int arg0, ffi.Pointer arg1) { + return _setrlimit(arg0, arg1); } - late final __msize_basePtr = - _lookup)>>( - '_msize_base', - ); - late final __msize_base = __msize_basePtr - .asFunction)>(); + late final _setrlimitPtr = + _lookup< + ffi.NativeFunction)> + >('setrlimit'); + late final _setrlimit = _setrlimitPtr + .asFunction)>(); - int _msize(ffi.Pointer _Block) { - return __msize(_Block); + int wait(ffi.Pointer arg0) { + return _wait(arg0); } - late final __msizePtr = - _lookup)>>( - '_msize', - ); - late final __msize = __msizePtr - .asFunction)>(); + late final _waitPtr = + _lookup)>>('wait'); + late final _wait = _waitPtr.asFunction)>(); - ffi.Pointer _realloc_base(ffi.Pointer _Block, int _Size) { - return __realloc_base(_Block, _Size); + int waitpid(int arg0, ffi.Pointer arg1, int arg2) { + return _waitpid(arg0, arg1, arg2); } - late final __realloc_basePtr = + late final _waitpidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size) - > - >('_realloc_base'); - late final __realloc_base = __realloc_basePtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.NativeFunction, ffi.Int)> + >('waitpid'); + late final _waitpid = _waitpidPtr + .asFunction, int)>(); - ffi.Pointer realloc(ffi.Pointer _Block, int _Size) { - return _realloc(_Block, _Size); + int waitid( + idtype_t arg0, + Dart__uint32_t arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _waitid(arg0.value, arg1, arg2, arg3); } - late final _reallocPtr = + late final _waitidPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size) + ffi.Int Function( + ffi.UnsignedInt, + id_t, + ffi.Pointer, + ffi.Int, + ) > - >('realloc'); - late final _realloc = _reallocPtr - .asFunction Function(ffi.Pointer, int)>(); + >('waitid'); + late final _waitid = _waitidPtr + .asFunction, int)>(); - ffi.Pointer _recalloc_base( - ffi.Pointer _Block, - int _Count, - int _Size, - ) { - return __recalloc_base(_Block, _Count, _Size); + int wait3(ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _wait3(arg0, arg1, arg2); } - late final __recalloc_basePtr = + late final _wait3Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ) + pid_t Function(ffi.Pointer, ffi.Int, ffi.Pointer) > - >('_recalloc_base'); - late final __recalloc_base = __recalloc_basePtr + >('wait3'); + late final _wait3 = _wait3Ptr .asFunction< - ffi.Pointer Function(ffi.Pointer, int, int) + int Function(ffi.Pointer, int, ffi.Pointer) >(); - ffi.Pointer _recalloc( - ffi.Pointer _Block, - int _Count, - int _Size, + int wait4( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return __recalloc(_Block, _Count, _Size); + return _wait4(arg0, arg1, arg2, arg3); } - late final __recallocPtr = + late final _wait4Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Size, - ffi.Size, + pid_t Function( + pid_t, + ffi.Pointer, + ffi.Int, + ffi.Pointer, ) > - >('_recalloc'); - late final __recalloc = __recallocPtr + >('wait4'); + late final _wait4 = _wait4Ptr .asFunction< - ffi.Pointer Function(ffi.Pointer, int, int) + int Function(int, ffi.Pointer, int, ffi.Pointer) >(); - void _aligned_free(ffi.Pointer _Block) { - return __aligned_free(_Block); + ffi.Pointer alloca(int __size) { + return _alloca(__size); } - late final __aligned_freePtr = - _lookup)>>( - '_aligned_free', + late final _allocaPtr = + _lookup Function(ffi.Size)>>( + 'alloca', ); - late final __aligned_free = __aligned_freePtr - .asFunction)>(); + late final _alloca = _allocaPtr + .asFunction Function(int)>(); + + late final ffi.Pointer ___mb_cur_max = _lookup( + '__mb_cur_max', + ); + + int get __mb_cur_max => ___mb_cur_max.value; - ffi.Pointer _aligned_malloc(int _Size, int _Alignment) { - return __aligned_malloc(_Size, _Alignment); + set __mb_cur_max(int value) => ___mb_cur_max.value = value; + + ffi.Pointer malloc_type_malloc(int size, int type_id) { + return _malloc_type_malloc(size, type_id); } - late final __aligned_mallocPtr = + late final _malloc_type_mallocPtr = _lookup< - ffi.NativeFunction Function(ffi.Size, ffi.Size)> - >('_aligned_malloc'); - late final __aligned_malloc = __aligned_mallocPtr + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, malloc_type_id_t) + > + >('malloc_type_malloc'); + late final _malloc_type_malloc = _malloc_type_mallocPtr .asFunction Function(int, int)>(); - ffi.Pointer _aligned_offset_malloc( - int _Size, - int _Alignment, - int _Offset, - ) { - return __aligned_offset_malloc(_Size, _Alignment, _Offset); + ffi.Pointer malloc_type_calloc(int count, int size, int type_id) { + return _malloc_type_calloc(count, size, type_id); } - late final __aligned_offset_mallocPtr = + late final _malloc_type_callocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size, ffi.Size) + ffi.Pointer Function(ffi.Size, ffi.Size, malloc_type_id_t) > - >('_aligned_offset_malloc'); - late final __aligned_offset_malloc = __aligned_offset_mallocPtr + >('malloc_type_calloc'); + late final _malloc_type_calloc = _malloc_type_callocPtr .asFunction Function(int, int, int)>(); - int _aligned_msize( - ffi.Pointer _Block, - int _Alignment, - int _Offset, - ) { - return __aligned_msize(_Block, _Alignment, _Offset); + void malloc_type_free(ffi.Pointer ptr, int type_id) { + return _malloc_type_free(ptr, type_id); } - late final __aligned_msizePtr = + late final _malloc_type_freePtr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size, ffi.Size) + ffi.Void Function(ffi.Pointer, malloc_type_id_t) > - >('_aligned_msize'); - late final __aligned_msize = __aligned_msizePtr - .asFunction, int, int)>(); - - ffi.Pointer _aligned_offset_realloc( - ffi.Pointer _Block, - int _Size, - int _Alignment, - int _Offset, + >('malloc_type_free'); + late final _malloc_type_free = _malloc_type_freePtr + .asFunction, int)>(); + + ffi.Pointer malloc_type_realloc( + ffi.Pointer ptr, + int size, + int type_id, ) { - return __aligned_offset_realloc(_Block, _Size, _Alignment, _Offset); + return _malloc_type_realloc(ptr, size, type_id); } - late final __aligned_offset_reallocPtr = + late final _malloc_type_reallocPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Size, - ffi.Size, - ffi.Size, + malloc_type_id_t, ) > - >('_aligned_offset_realloc'); - late final __aligned_offset_realloc = __aligned_offset_reallocPtr + >('malloc_type_realloc'); + late final _malloc_type_realloc = _malloc_type_reallocPtr .asFunction< - ffi.Pointer Function(ffi.Pointer, int, int, int) + ffi.Pointer Function(ffi.Pointer, int, int) >(); - ffi.Pointer _aligned_offset_recalloc( - ffi.Pointer _Block, - int _Count, - int _Size, - int _Alignment, - int _Offset, + ffi.Pointer malloc_type_valloc(int size, int type_id) { + return _malloc_type_valloc(size, type_id); + } + + late final _malloc_type_vallocPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, malloc_type_id_t) + > + >('malloc_type_valloc'); + late final _malloc_type_valloc = _malloc_type_vallocPtr + .asFunction Function(int, int)>(); + + ffi.Pointer malloc_type_aligned_alloc( + int alignment, + int size, + int type_id, ) { - return __aligned_offset_recalloc( - _Block, - _Count, - _Size, - _Alignment, - _Offset, - ); + return _malloc_type_aligned_alloc(alignment, size, type_id); } - late final __aligned_offset_recallocPtr = + late final _malloc_type_aligned_allocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Size, - ffi.Size, - ) + ffi.Pointer Function(ffi.Size, ffi.Size, malloc_type_id_t) > - >('_aligned_offset_recalloc'); - late final __aligned_offset_recalloc = __aligned_offset_recallocPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - int, - int, - int, - int, - ) - >(); + >('malloc_type_aligned_alloc'); + late final _malloc_type_aligned_alloc = _malloc_type_aligned_allocPtr + .asFunction Function(int, int, int)>(); - ffi.Pointer _aligned_realloc( - ffi.Pointer _Block, - int _Size, - int _Alignment, + int malloc_type_posix_memalign( + ffi.Pointer> memptr, + int alignment, + int size, + int type_id, ) { - return __aligned_realloc(_Block, _Size, _Alignment); + return _malloc_type_posix_memalign(memptr, alignment, size, type_id); } - late final __aligned_reallocPtr = + late final _malloc_type_posix_memalignPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, + ffi.Int Function( + ffi.Pointer>, ffi.Size, ffi.Size, + malloc_type_id_t, ) > - >('_aligned_realloc'); - late final __aligned_realloc = __aligned_reallocPtr + >('malloc_type_posix_memalign'); + late final _malloc_type_posix_memalign = _malloc_type_posix_memalignPtr .asFunction< - ffi.Pointer Function(ffi.Pointer, int, int) + int Function(ffi.Pointer>, int, int, int) >(); - ffi.Pointer _aligned_recalloc( - ffi.Pointer _Block, - int _Count, - int _Size, - int _Alignment, + ffi.Pointer malloc_type_zone_malloc( + ffi.Pointer zone, + int size, + int type_id, ) { - return __aligned_recalloc(_Block, _Count, _Size, _Alignment); + return _malloc_type_zone_malloc(zone, size, type_id); } - late final __aligned_recallocPtr = + late final _malloc_type_zone_mallocPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Size, - ffi.Size, + ffi.Pointer, ffi.Size, + malloc_type_id_t, ) > - >('_aligned_recalloc'); - late final __aligned_recalloc = __aligned_recallocPtr + >('malloc_type_zone_malloc'); + late final _malloc_type_zone_malloc = _malloc_type_zone_mallocPtr .asFunction< - ffi.Pointer Function(ffi.Pointer, int, int, int) + ffi.Pointer Function(ffi.Pointer, int, int) >(); - ffi.Pointer bsearch_s( - ffi.Pointer _Key, - ffi.Pointer _Base, - int _NumOfElements, - int _SizeOfElements, - _CoreCrtSecureSearchSortCompareFunction _CompareFunction, - ffi.Pointer _Context, + ffi.Pointer malloc_type_zone_calloc( + ffi.Pointer zone, + int count, + int size, + int type_id, ) { - return _bsearch_s( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - _Context, - ); + return _malloc_type_zone_calloc(zone, count, size, type_id); } - late final _bsearch_sPtr = + late final _malloc_type_zone_callocPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - rsize_t, - rsize_t, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + malloc_type_id_t, ) > - >('bsearch_s'); - late final _bsearch_s = _bsearch_sPtr + >('malloc_type_zone_calloc'); + late final _malloc_type_zone_calloc = _malloc_type_zone_callocPtr .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + int, int, int, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, ) >(); - void qsort_s( - ffi.Pointer _Base, - int _NumOfElements, - int _SizeOfElements, - _CoreCrtSecureSearchSortCompareFunction _CompareFunction, - ffi.Pointer _Context, + void malloc_type_zone_free( + ffi.Pointer zone, + ffi.Pointer ptr, + int type_id, ) { - return _qsort_s( - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - _Context, - ); + return _malloc_type_zone_free(zone, ptr, type_id); } - late final _qsort_sPtr = + late final _malloc_type_zone_freePtr = _lookup< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer, ffi.Pointer, - rsize_t, - rsize_t, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, + malloc_type_id_t, ) > - >('qsort_s'); - late final _qsort_s = _qsort_sPtr + >('malloc_type_zone_free'); + late final _malloc_type_zone_free = _malloc_type_zone_freePtr .asFunction< - void Function( - ffi.Pointer, - int, - int, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, - ) + void Function(ffi.Pointer, ffi.Pointer, int) >(); - ffi.Pointer bsearch( - ffi.Pointer _Key, - ffi.Pointer _Base, - int _NumOfElements, - int _SizeOfElements, - _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction, + ffi.Pointer malloc_type_zone_realloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, + int type_id, ) { - return _bsearch( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - ); + return _malloc_type_zone_realloc(zone, ptr, size, type_id); } - late final _bsearchPtr = + late final _malloc_type_zone_reallocPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Size, - ffi.Size, - _CoreCrtNonSecureSearchSortCompareFunction, + malloc_type_id_t, ) > - >('bsearch'); - late final _bsearch = _bsearchPtr + >('malloc_type_zone_realloc'); + late final _malloc_type_zone_realloc = _malloc_type_zone_reallocPtr .asFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int, - _CoreCrtNonSecureSearchSortCompareFunction, ) >(); - void qsort( - ffi.Pointer _Base, - int _NumOfElements, - int _SizeOfElements, - _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction, + ffi.Pointer malloc_type_zone_valloc( + ffi.Pointer zone, + int size, + int type_id, ) { - return _qsort(_Base, _NumOfElements, _SizeOfElements, _CompareFunction); + return _malloc_type_zone_valloc(zone, size, type_id); } - late final _qsortPtr = + late final _malloc_type_zone_vallocPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, + ffi.Pointer Function( + ffi.Pointer, ffi.Size, - _CoreCrtNonSecureSearchSortCompareFunction, + malloc_type_id_t, ) > - >('qsort'); - late final _qsort = _qsortPtr + >('malloc_type_zone_valloc'); + late final _malloc_type_zone_valloc = _malloc_type_zone_vallocPtr .asFunction< - void Function( - ffi.Pointer, - int, - int, - _CoreCrtNonSecureSearchSortCompareFunction, - ) + ffi.Pointer Function(ffi.Pointer, int, int) >(); - ffi.Pointer _lfind_s( - ffi.Pointer _Key, - ffi.Pointer _Base, - ffi.Pointer _NumOfElements, - int _SizeOfElements, - _CoreCrtSecureSearchSortCompareFunction _CompareFunction, - ffi.Pointer _Context, + ffi.Pointer malloc_type_zone_memalign( + ffi.Pointer zone, + int alignment, + int size, + int type_id, ) { - return __lfind_s( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - _Context, - ); + return _malloc_type_zone_memalign(zone, alignment, size, type_id); } - late final __lfind_sPtr = + late final _malloc_type_zone_memalignPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Size, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, + ffi.Size, + malloc_type_id_t, ) > - >('_lfind_s'); - late final __lfind_s = __lfind_sPtr + >('malloc_type_zone_memalign'); + late final _malloc_type_zone_memalign = _malloc_type_zone_memalignPtr .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + int, + int, int, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, ) >(); - ffi.Pointer _lfind( - ffi.Pointer _Key, - ffi.Pointer _Base, - ffi.Pointer _NumOfElements, - int _SizeOfElements, - _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction, - ) { - return __lfind( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - ); + ffi.Pointer malloc(int __size) { + return _malloc(__size); + } + + late final _mallocPtr = + _lookup Function(ffi.Size)>>( + 'malloc', + ); + late final _malloc = _mallocPtr + .asFunction Function(int)>(); + + ffi.Pointer calloc(int __count, int __size) { + return _calloc(__count, __size); } - late final __lfindPtr = + late final _callocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - _CoreCrtNonSecureSearchSortCompareFunction, - ) + ffi.NativeFunction Function(ffi.Size, ffi.Size)> + >('calloc'); + late final _calloc = _callocPtr + .asFunction Function(int, int)>(); + + void free(ffi.Pointer arg0) { + return _free(arg0); + } + + late final _freePtr = + _lookup)>>( + 'free', + ); + late final _free = _freePtr + .asFunction)>(); + + ffi.Pointer realloc(ffi.Pointer __ptr, int __size) { + return _realloc(__ptr, __size); + } + + late final _reallocPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size) > - >('_lfind'); - late final __lfind = __lfindPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _CoreCrtNonSecureSearchSortCompareFunction, - ) - >(); + >('realloc'); + late final _realloc = _reallocPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer reallocf(ffi.Pointer __ptr, int __size) { + return _reallocf(__ptr, __size); + } + + late final _reallocfPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size) + > + >('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer valloc(int __size) { + return _valloc(__size); + } + + late final _vallocPtr = + _lookup Function(ffi.Size)>>( + 'valloc', + ); + late final _valloc = _vallocPtr + .asFunction Function(int)>(); + + ffi.Pointer aligned_alloc(int __alignment, int __size) { + return _aligned_alloc(__alignment, __size); + } + + late final _aligned_allocPtr = + _lookup< + ffi.NativeFunction Function(ffi.Size, ffi.Size)> + >('aligned_alloc'); + late final _aligned_alloc = _aligned_allocPtr + .asFunction Function(int, int)>(); - ffi.Pointer _lsearch_s( - ffi.Pointer _Key, - ffi.Pointer _Base, - ffi.Pointer _NumOfElements, - int _SizeOfElements, - _CoreCrtSecureSearchSortCompareFunction _CompareFunction, - ffi.Pointer _Context, + int posix_memalign( + ffi.Pointer> __memptr, + int __alignment, + int __size, ) { - return __lsearch_s( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - _Context, - ); + return _posix_memalign(__memptr, __alignment, __size); } - late final __lsearch_sPtr = + late final _posix_memalignPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Int Function( + ffi.Pointer>, + ffi.Size, ffi.Size, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, ) > - >('_lsearch_s'); - late final __lsearch_s = __lsearch_sPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _CoreCrtSecureSearchSortCompareFunction, - ffi.Pointer, - ) - >(); + >('posix_memalign'); + late final _posix_memalign = _posix_memalignPtr + .asFunction>, int, int)>(); - ffi.Pointer _lsearch( - ffi.Pointer _Key, - ffi.Pointer _Base, - ffi.Pointer _NumOfElements, - int _SizeOfElements, - _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction, - ) { - return __lsearch( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - ); + void abort() { + return _abort(); + } + + late final _abortPtr = _lookup>( + 'abort', + ); + late final _abort = _abortPtr.asFunction(); + + int abs(int arg0) { + return _abs(arg0); + } + + late final _absPtr = _lookup>( + 'abs', + ); + late final _abs = _absPtr.asFunction(); + + int atexit(ffi.Pointer> arg0) { + return _atexit(arg0); } - late final __lsearchPtr = + late final _atexitPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - _CoreCrtNonSecureSearchSortCompareFunction, - ) + ffi.Int Function(ffi.Pointer>) > - >('_lsearch'); - late final __lsearch = __lsearchPtr + >('atexit'); + late final _atexit = _atexitPtr .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _CoreCrtNonSecureSearchSortCompareFunction, - ) + int Function(ffi.Pointer>) >(); - ffi.Pointer lfind( - ffi.Pointer _Key, - ffi.Pointer _Base, - ffi.Pointer _NumOfElements, - int _SizeOfElements, - _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction, - ) { - return _lfind$1( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - ); + int at_quick_exit(ffi.Pointer> arg0) { + return _at_quick_exit(arg0); } - late final _lfindPtr = + late final _at_quick_exitPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - _CoreCrtNonSecureSearchSortCompareFunction, - ) + ffi.Int Function(ffi.Pointer>) > - >('lfind'); - late final _lfind$1 = _lfindPtr + >('at_quick_exit'); + late final _at_quick_exit = _at_quick_exitPtr .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _CoreCrtNonSecureSearchSortCompareFunction, - ) + int Function(ffi.Pointer>) >(); - ffi.Pointer lsearch( - ffi.Pointer _Key, - ffi.Pointer _Base, - ffi.Pointer _NumOfElements, - int _SizeOfElements, - _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction, + double atof(ffi.Pointer arg0) { + return _atof(arg0); + } + + late final _atofPtr = + _lookup)>>( + 'atof', + ); + late final _atof = _atofPtr + .asFunction)>(); + + int atoi(ffi.Pointer arg0) { + return _atoi(arg0); + } + + late final _atoiPtr = + _lookup)>>( + 'atoi', + ); + late final _atoi = _atoiPtr.asFunction)>(); + + int atol(ffi.Pointer arg0) { + return _atol(arg0); + } + + late final _atolPtr = + _lookup)>>( + 'atol', + ); + late final _atol = _atolPtr.asFunction)>(); + + int atoll(ffi.Pointer arg0) { + return _atoll(arg0); + } + + late final _atollPtr = + _lookup)>>( + 'atoll', + ); + late final _atoll = _atollPtr + .asFunction)>(); + + ffi.Pointer bsearch( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + __compar, ) { - return _lsearch$1( - _Key, - _Base, - _NumOfElements, - _SizeOfElements, - _CompareFunction, - ); + return _bsearch(__key, __base, __nel, __width, __compar); } - late final _lsearchPtr = + late final _bsearchPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - _CoreCrtNonSecureSearchSortCompareFunction, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, ) > - >('lsearch'); - late final _lsearch$1 = _lsearchPtr + >('bsearch'); + late final _bsearch = _bsearchPtr .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, - _CoreCrtNonSecureSearchSortCompareFunction, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, ) >(); - int _itow_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __itow_s(_Value, _Buffer, _BufferCount, _Radix); + div_t div(int arg0, int arg1) { + return _div(arg0, arg1); } - late final __itow_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function(ffi.Int, ffi.Pointer, ffi.Size, ffi.Int) - > - >('_itow_s'); - late final __itow_s = __itow_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _itow( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __itow(_Value, _Buffer, _Radix); + late final _divPtr = + _lookup>('div'); + late final _div = _divPtr.asFunction(); + + void exit(int arg0) { + return _exit(arg0); } - late final __itowPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, - ffi.Pointer, - ffi.Int, - ) - > - >('_itow'); - late final __itow = __itowPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); + late final _exitPtr = _lookup>( + 'exit', + ); + late final _exit = _exitPtr.asFunction(); - int _ltow_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __ltow_s(_Value, _Buffer, _BufferCount, _Radix); + ffi.Pointer getenv(ffi.Pointer arg0) { + return _getenv(arg0); } - late final __ltow_sPtr = + late final _getenvPtr = _lookup< ffi.NativeFunction< - errno_t Function(ffi.Long, ffi.Pointer, ffi.Size, ffi.Int) + ffi.Pointer Function(ffi.Pointer) > - >('_ltow_s'); - late final __ltow_s = __ltow_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _ltow( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __ltow(_Value, _Buffer, _Radix); + >('getenv'); + late final _getenv = _getenvPtr + .asFunction Function(ffi.Pointer)>(); + + int labs(int arg0) { + return _labs(arg0); + } + + late final _labsPtr = + _lookup>('labs'); + late final _labs = _labsPtr.asFunction(); + + ldiv_t ldiv(int arg0, int arg1) { + return _ldiv(arg0, arg1); + } + + late final _ldivPtr = + _lookup>('ldiv'); + late final _ldiv = _ldivPtr.asFunction(); + + int llabs(int arg0) { + return _llabs(arg0); + } + + late final _llabsPtr = + _lookup>('llabs'); + late final _llabs = _llabsPtr.asFunction(); + + lldiv_t lldiv(int arg0, int arg1) { + return _lldiv(arg0, arg1); + } + + late final _lldivPtr = + _lookup>( + 'lldiv', + ); + late final _lldiv = _lldivPtr.asFunction(); + + int mblen(ffi.Pointer __s, int __n) { + return _mblen(__s, __n); } - late final __ltowPtr = + late final _mblenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Long, - ffi.Pointer, - ffi.Int, - ) - > - >('_ltow'); - late final __ltow = __ltowPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); + ffi.NativeFunction, ffi.Size)> + >('mblen'); + late final _mblen = _mblenPtr + .asFunction, int)>(); - int _ultow_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, + int mbstowcs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int __n, ) { - return __ultow_s(_Value, _Buffer, _BufferCount, _Radix); + return _mbstowcs(arg0, arg1, __n); } - late final __ultow_sPtr = + late final _mbstowcsPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.UnsignedLong, + ffi.Size Function( ffi.Pointer, + ffi.Pointer, ffi.Size, - ffi.Int, ) > - >('_ultow_s'); - late final __ultow_s = __ultow_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _ultow( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __ultow(_Value, _Buffer, _Radix); + >('mbstowcs'); + late final _mbstowcs = _mbstowcsPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int) + >(); + + int mbtowc(ffi.Pointer arg0, ffi.Pointer arg1, int __n) { + return _mbtowc(arg0, arg1, __n); } - late final __ultowPtr = + late final _mbtowcPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedLong, + ffi.Int Function( ffi.Pointer, - ffi.Int, + ffi.Pointer, + ffi.Size, ) > - >('_ultow'); - late final __ultow = __ultowPtr + >('mbtowc'); + late final _mbtowc = _mbtowcPtr .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) + int Function(ffi.Pointer, ffi.Pointer, int) >(); - double wcstod( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, + void qsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + __compar, ) { - return _wcstod(_String, _EndPtr); + return _qsort(__base, __nel, __width, __compar); } - late final _wcstodPtr = + late final _qsortPtr = _lookup< ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, ) > - >('wcstod'); - late final _wcstod = _wcstodPtr + >('qsort'); + late final _qsort = _qsortPtr .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer>, + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, ) >(); - double _wcstod_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - _locale_t _Locale, + void quick_exit(int arg0) { + return _quick_exit(arg0); + } + + late final _quick_exitPtr = + _lookup>('quick_exit'); + late final _quick_exit = _quick_exitPtr.asFunction(); + + int rand() { + return _rand(); + } + + late final _randPtr = _lookup>('rand'); + late final _rand = _randPtr.asFunction(); + + void srand(int arg0) { + return _srand(arg0); + } + + late final _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); + + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __wcstod_l(_String, _EndPtr, _Locale); + return _strtod(arg0, arg1); } - late final __wcstod_lPtr = + late final _strtodPtr = _lookup< ffi.NativeFunction< ffi.Double Function( - ffi.Pointer, - ffi.Pointer>, - _locale_t, + ffi.Pointer, + ffi.Pointer>, ) > - >('_wcstod_l'); - late final __wcstod_l = __wcstod_lPtr + >('strtod'); + late final _strtod = _strtodPtr .asFunction< double Function( - ffi.Pointer, - ffi.Pointer>, - _locale_t, + ffi.Pointer, + ffi.Pointer>, ) >(); - int wcstol( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + double strtof( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return _wcstol(_String, _EndPtr, _Radix); + return _strtof(arg0, arg1); } - late final _wcstolPtr = + late final _strtofPtr = _lookup< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, + ffi.Float Function( + ffi.Pointer, + ffi.Pointer>, ) > - >('wcstol'); - late final _wcstol = _wcstolPtr + >('strtof'); + late final _strtof = _strtofPtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, + double Function( + ffi.Pointer, + ffi.Pointer>, ) >(); - int _wcstol_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __wcstol_l(_String, _EndPtr, _Radix, _Locale); + return _strtol(__str, __endptr, __base); } - late final __wcstol_lPtr = + late final _strtolPtr = _lookup< ffi.NativeFunction< ffi.Long Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, ffi.Int, - _locale_t, ) > - >('_wcstol_l'); - late final __wcstol_l = __wcstol_lPtr + >('strtol'); + late final _strtol = _strtolPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, int, - _locale_t, ) >(); - int wcstoll( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + int strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return _wcstoll(_String, _EndPtr, _Radix); + return _strtoll(__str, __endptr, __base); } - late final _wcstollPtr = + late final _strtollPtr = _lookup< ffi.NativeFunction< ffi.LongLong Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, ffi.Int, ) > - >('wcstoll'); - late final _wcstoll = _wcstollPtr + >('strtoll'); + late final _strtoll = _strtollPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, int, ) >(); - int _wcstoll_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + int strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __wcstoll_l(_String, _EndPtr, _Radix, _Locale); + return _strtoul(__str, __endptr, __base); } - late final __wcstoll_lPtr = + late final _strtoulPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, - ffi.Pointer>, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer>, ffi.Int, - _locale_t, ) > - >('_wcstoll_l'); - late final __wcstoll_l = __wcstoll_lPtr + >('strtoul'); + late final _strtoul = _strtoulPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, int, - _locale_t, ) >(); - int wcstoul( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + int strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return _wcstoul(_String, _EndPtr, _Radix); + return _strtoull(__str, __endptr, __base); } - late final _wcstoulPtr = + late final _strtoullPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer>, + ffi.UnsignedLongLong Function( + ffi.Pointer, + ffi.Pointer>, ffi.Int, ) > - >('wcstoul'); - late final _wcstoul = _wcstoulPtr + >('strtoull'); + late final _strtoull = _strtoullPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, int, ) >(); - int _wcstoul_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + int system(ffi.Pointer arg0) { + return _system(arg0); + } + + late final _systemPtr = + _lookup)>>( + 'system', + ); + late final _system = _systemPtr + .asFunction)>(); + + int wcstombs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int __n, ) { - return __wcstoul_l(_String, _EndPtr, _Radix, _Locale); + return _wcstombs(arg0, arg1, __n); } - late final __wcstoul_lPtr = + late final _wcstombsPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Size Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, + ffi.Size, ) > - >('_wcstoul_l'); - late final __wcstoul_l = __wcstoul_lPtr + >('wcstombs'); + late final _wcstombs = _wcstombsPtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, - ) + int Function(ffi.Pointer, ffi.Pointer, int) >(); - int wcstoull( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + int wctomb(ffi.Pointer arg0, int arg1) { + return _wctomb(arg0, arg1); + } + + late final _wctombPtr = + _lookup< + ffi.NativeFunction, ffi.WChar)> + >('wctomb'); + late final _wctomb = _wctombPtr + .asFunction, int)>(); + + void _Exit(int arg0) { + return __Exit(arg0); + } + + late final __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.asFunction(); + + int a64l(ffi.Pointer arg0) { + return _a64l(arg0); + } + + late final _a64lPtr = + _lookup)>>( + 'a64l', + ); + late final _a64l = _a64lPtr.asFunction)>(); + + double drand48() { + return _drand48(); + } + + late final _drand48Ptr = _lookup>( + 'drand48', + ); + late final _drand48 = _drand48Ptr.asFunction(); + + ffi.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _wcstoull(_String, _EndPtr, _Radix); + return _ecvt(arg0, arg1, arg2, arg3); } - late final _wcstoullPtr = + late final _ecvtPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer Function( + ffi.Double, ffi.Int, + ffi.Pointer, + ffi.Pointer, ) > - >('wcstoull'); - late final _wcstoull = _wcstoullPtr + >('ecvt'); + late final _ecvt = _ecvtPtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer Function( + double, int, + ffi.Pointer, + ffi.Pointer, ) >(); - int _wcstoull_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + double erand48(ffi.Pointer arg0) { + return _erand48(arg0); + } + + late final _erand48Ptr = + _lookup< + ffi.NativeFunction)> + >('erand48'); + late final _erand48 = _erand48Ptr + .asFunction)>(); + + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __wcstoull_l(_String, _EndPtr, _Radix, _Locale); + return _fcvt(arg0, arg1, arg2, arg3); } - late final __wcstoull_lPtr = + late final _fcvtPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer Function( + ffi.Double, ffi.Int, - _locale_t, + ffi.Pointer, + ffi.Pointer, ) > - >('_wcstoull_l'); - late final __wcstoull_l = __wcstoull_lPtr + >('fcvt'); + late final _fcvt = _fcvtPtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer Function( + double, int, - _locale_t, + ffi.Pointer, + ffi.Pointer, ) >(); - double wcstof( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, ) { - return _wcstof(_String, _EndPtr); + return _gcvt(arg0, arg1, arg2); } - late final _wcstofPtr = + late final _gcvtPtr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Pointer Function( + ffi.Double, + ffi.Int, + ffi.Pointer, ) > - >('wcstof'); - late final _wcstof = _wcstofPtr + >('gcvt'); + late final _gcvt = _gcvtPtr .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer>, - ) + ffi.Pointer Function(double, int, ffi.Pointer) >(); - double _wcstof_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - _locale_t _Locale, + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, ) { - return __wcstof_l(_String, _EndPtr, _Locale); + return _getsubopt(arg0, arg1, arg2); } - late final __wcstof_lPtr = + late final _getsuboptPtr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer>, - _locale_t, + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>, ) > - >('_wcstof_l'); - late final __wcstof_l = __wcstof_lPtr + >('getsubopt'); + late final _getsubopt = _getsuboptPtr .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer>, - _locale_t, + int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>, ) >(); - double _wtof(ffi.Pointer _String) { - return __wtof(_String); + int grantpt(int arg0) { + return _grantpt(arg0); } - late final __wtofPtr = - _lookup)>>( - '_wtof', - ); - late final __wtof = __wtofPtr - .asFunction)>(); + late final _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); - double _wtof_l(ffi.Pointer _String, _locale_t _Locale) { - return __wtof_l(_String, _Locale); + ffi.Pointer initstate( + int arg0, + ffi.Pointer arg1, + int __size, + ) { + return _initstate(arg0, arg1, __size); } - late final __wtof_lPtr = + late final _initstatePtr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, _locale_t) + ffi.Pointer Function( + ffi.UnsignedInt, + ffi.Pointer, + ffi.Size, + ) > - >('_wtof_l'); - late final __wtof_l = __wtof_lPtr - .asFunction, _locale_t)>(); - - int _wtoi(ffi.Pointer _String) { - return __wtoi(_String); - } - - late final __wtoiPtr = - _lookup)>>( - '_wtoi', - ); - late final __wtoi = __wtoiPtr - .asFunction)>(); + >('initstate'); + late final _initstate = _initstatePtr + .asFunction< + ffi.Pointer Function(int, ffi.Pointer, int) + >(); - int _wtoi_l(ffi.Pointer _String, _locale_t _Locale) { - return __wtoi_l(_String, _Locale); + int jrand48(ffi.Pointer arg0) { + return _jrand48(arg0); } - late final __wtoi_lPtr = + late final _jrand48Ptr = _lookup< - ffi.NativeFunction, _locale_t)> - >('_wtoi_l'); - late final __wtoi_l = __wtoi_lPtr - .asFunction, _locale_t)>(); + ffi.NativeFunction)> + >('jrand48'); + late final _jrand48 = _jrand48Ptr + .asFunction)>(); - int _wtol(ffi.Pointer _String) { - return __wtol(_String); + ffi.Pointer l64a(int arg0) { + return _l64a(arg0); } - late final __wtolPtr = - _lookup)>>( - '_wtol', + late final _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a', ); - late final __wtol = __wtolPtr - .asFunction)>(); + late final _l64a = _l64aPtr.asFunction Function(int)>(); - int _wtol_l(ffi.Pointer _String, _locale_t _Locale) { - return __wtol_l(_String, _Locale); + void lcong48(ffi.Pointer arg0) { + return _lcong48(arg0); } - late final __wtol_lPtr = + late final _lcong48Ptr = _lookup< - ffi.NativeFunction, _locale_t)> - >('_wtol_l'); - late final __wtol_l = __wtol_lPtr - .asFunction, _locale_t)>(); + ffi.NativeFunction)> + >('lcong48'); + late final _lcong48 = _lcong48Ptr + .asFunction)>(); - int _wtoll(ffi.Pointer _String) { - return __wtoll(_String); + int lrand48() { + return _lrand48(); } - late final __wtollPtr = - _lookup< - ffi.NativeFunction)> - >('_wtoll'); - late final __wtoll = __wtollPtr - .asFunction)>(); + late final _lrand48Ptr = _lookup>( + 'lrand48', + ); + late final _lrand48 = _lrand48Ptr.asFunction(); - int _wtoll_l(ffi.Pointer _String, _locale_t _Locale) { - return __wtoll_l(_String, _Locale); + ffi.Pointer mktemp(ffi.Pointer arg0) { + return _mktemp(arg0); } - late final __wtoll_lPtr = + late final _mktempPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, _locale_t) + ffi.Pointer Function(ffi.Pointer) > - >('_wtoll_l'); - late final __wtoll_l = __wtoll_lPtr - .asFunction, _locale_t)>(); - - int _i64tow_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __i64tow_s(_Value, _Buffer, _BufferCount, _Radix); - } + >('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); - late final __i64tow_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.LongLong, - ffi.Pointer, - ffi.Size, - ffi.Int, - ) - > - >('_i64tow_s'); - late final __i64tow_s = __i64tow_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _i64tow( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __i64tow(_Value, _Buffer, _Radix); + int mkstemp(ffi.Pointer arg0) { + return _mkstemp(arg0); } - late final __i64towPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.LongLong, - ffi.Pointer, - ffi.Int, - ) - > - >('_i64tow'); - late final __i64tow = __i64towPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); + late final _mkstempPtr = + _lookup)>>( + 'mkstemp', + ); + late final _mkstemp = _mkstempPtr + .asFunction)>(); - int _ui64tow_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __ui64tow_s(_Value, _Buffer, _BufferCount, _Radix); + int mrand48() { + return _mrand48(); } - late final __ui64tow_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.UnsignedLongLong, - ffi.Pointer, - ffi.Size, - ffi.Int, - ) - > - >('_ui64tow_s'); - late final __ui64tow_s = __ui64tow_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _ui64tow( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __ui64tow(_Value, _Buffer, _Radix); + late final _mrand48Ptr = _lookup>( + 'mrand48', + ); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48(ffi.Pointer arg0) { + return _nrand48(arg0); } - late final __ui64towPtr = + late final _nrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedLongLong, - ffi.Pointer, - ffi.Int, - ) - > - >('_ui64tow'); - late final __ui64tow = __ui64towPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); + ffi.NativeFunction)> + >('nrand48'); + late final _nrand48 = _nrand48Ptr + .asFunction)>(); - int _wtoi64(ffi.Pointer _String) { - return __wtoi64(_String); + int posix_openpt(int arg0) { + return _posix_openpt(arg0); } - late final __wtoi64Ptr = - _lookup< - ffi.NativeFunction)> - >('_wtoi64'); - late final __wtoi64 = __wtoi64Ptr - .asFunction)>(); + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); - int _wtoi64_l(ffi.Pointer _String, _locale_t _Locale) { - return __wtoi64_l(_String, _Locale); + ffi.Pointer ptsname(int arg0) { + return _ptsname(arg0); } - late final __wtoi64_lPtr = - _lookup< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, _locale_t) - > - >('_wtoi64_l'); - late final __wtoi64_l = __wtoi64_lPtr - .asFunction, _locale_t)>(); - - int _wcstoi64( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - ) { - return __wcstoi64(_String, _EndPtr, _Radix); + late final _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname', + ); + late final _ptsname = _ptsnamePtr + .asFunction Function(int)>(); + + int ptsname_r(int fildes, ffi.Pointer buffer, int buflen) { + return _ptsname_r(fildes, buffer, buflen); } - late final __wcstoi64Ptr = + late final _ptsname_rPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ) + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Size) > - >('_wcstoi64'); - late final __wcstoi64 = __wcstoi64Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >(); + >('ptsname_r'); + late final _ptsname_r = _ptsname_rPtr + .asFunction, int)>(); + + int putenv(ffi.Pointer arg0) { + return _putenv(arg0); + } + + late final _putenvPtr = + _lookup)>>( + 'putenv', + ); + late final _putenv = _putenvPtr + .asFunction)>(); + + int random() { + return _random(); + } + + late final _randomPtr = _lookup>( + 'random', + ); + late final _random = _randomPtr.asFunction(); + + int rand_r(ffi.Pointer arg0) { + return _rand_r(arg0); + } + + late final _rand_rPtr = + _lookup< + ffi.NativeFunction)> + >('rand_r'); + late final _rand_r = _rand_rPtr + .asFunction)>(); - int _wcstoi64_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __wcstoi64_l(_String, _EndPtr, _Radix, _Locale); + return _realpath(arg0, arg1); } - late final __wcstoi64_lPtr = + late final _realpathPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, ) > - >('_wcstoi64_l'); - late final __wcstoi64_l = __wcstoi64_lPtr + >('realpath'); + late final _realpath = _realpathPtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, ) >(); - int _wcstoui64( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - ) { - return __wcstoui64(_String, _EndPtr, _Radix); + ffi.Pointer seed48(ffi.Pointer arg0) { + return _seed48(arg0); } - late final __wcstoui64Ptr = + late final _seed48Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, + ffi.Pointer Function( + ffi.Pointer, ) > - >('_wcstoui64'); - late final __wcstoui64 = __wcstoui64Ptr + >('seed48'); + late final _seed48 = _seed48Ptr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) + ffi.Pointer Function(ffi.Pointer) >(); - int _wcstoui64_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, ) { - return __wcstoui64_l(_String, _EndPtr, _Radix, _Locale); + return _setenv(__name, __value, __overwrite); } - late final __wcstoui64_lPtr = + late final _setenvPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, - ffi.Pointer>, + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, ffi.Int, - _locale_t, ) > - >('_wcstoui64_l'); - late final __wcstoui64_l = __wcstoui64_lPtr + >('setenv'); + late final _setenv = _setenvPtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, - ) + int Function(ffi.Pointer, ffi.Pointer, int) >(); - ffi.Pointer _wfullpath( - ffi.Pointer _Buffer, - ffi.Pointer _Path, - int _BufferCount, - ) { - return __wfullpath(_Buffer, _Path, _BufferCount); + void setkey(ffi.Pointer arg0) { + return _setkey(arg0); + } + + late final _setkeyPtr = + _lookup)>>( + 'setkey', + ); + late final _setkey = _setkeyPtr + .asFunction)>(); + + ffi.Pointer setstate(ffi.Pointer arg0) { + return _setstate(arg0); } - late final __wfullpathPtr = + late final _setstatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_wfullpath'); - late final __wfullpath = __wfullpathPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); + >('setstate'); + late final _setstate = _setstatePtr + .asFunction Function(ffi.Pointer)>(); - int _wmakepath_s( - ffi.Pointer _Buffer, - int _BufferCount, - ffi.Pointer _Drive, - ffi.Pointer _Dir, - ffi.Pointer _Filename, - ffi.Pointer _Ext, - ) { - return __wmakepath_s(_Buffer, _BufferCount, _Drive, _Dir, _Filename, _Ext); + void srand48(int arg0) { + return _srand48(arg0); + } + + late final _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); + + void srandom(int arg0) { + return _srandom(arg0); + } + + late final _srandomPtr = + _lookup>( + 'srandom', + ); + late final _srandom = _srandomPtr.asFunction(); + + int unlockpt(int arg0) { + return _unlockpt(arg0); + } + + late final _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); + + int unsetenv(ffi.Pointer arg0) { + return _unsetenv(arg0); + } + + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv', + ); + late final _unsetenv = _unsetenvPtr + .asFunction)>(); + + int arc4random() { + return _arc4random(); } - late final __wmakepath_sPtr = + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); + + void arc4random_addrandom(ffi.Pointer arg0, int __datlen) { + return _arc4random_addrandom(arg0, __datlen); + } + + late final _arc4random_addrandomPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, ffi.Int) > - >('_wmakepath_s'); - late final __wmakepath_s = __wmakepath_sPtr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); + >('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); - void _wmakepath( - ffi.Pointer _Buffer, - ffi.Pointer _Drive, - ffi.Pointer _Dir, - ffi.Pointer _Filename, - ffi.Pointer _Ext, - ) { - return __wmakepath(_Buffer, _Drive, _Dir, _Filename, _Ext); + void arc4random_buf(ffi.Pointer __buf, int __nbytes) { + return _arc4random_buf(__buf, __nbytes); } - late final __wmakepathPtr = + late final _arc4random_bufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('_wmakepath'); - late final __wmakepath = __wmakepathPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); + ffi.NativeFunction, ffi.Size)> + >('arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); + + void arc4random_stir() { + return _arc4random_stir(); + } + + late final _arc4random_stirPtr = + _lookup>('arc4random_stir'); + late final _arc4random_stir = _arc4random_stirPtr + .asFunction(); - void _wperror(ffi.Pointer _ErrorMessage) { - return __wperror(_ErrorMessage); + int arc4random_uniform(int __upper_bound) { + return _arc4random_uniform(__upper_bound); } - late final __wperrorPtr = - _lookup)>>( - '_wperror', + late final _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform', ); - late final __wperror = __wperrorPtr - .asFunction)>(); - - void _wsplitpath( - ffi.Pointer _FullPath, - ffi.Pointer _Drive, - ffi.Pointer _Dir, - ffi.Pointer _Filename, - ffi.Pointer _Ext, + late final _arc4random_uniform = _arc4random_uniformPtr + .asFunction(); + + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __wsplitpath(_FullPath, _Drive, _Dir, _Filename, _Ext); + return _cgetcap(arg0, arg1, arg2); } - late final __wsplitpathPtr = + late final _cgetcapPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, ) > - >('_wsplitpath'); - late final __wsplitpath = __wsplitpathPtr + >('cgetcap'); + late final _cgetcap = _cgetcapPtr .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, ) >(); - int _wsplitpath_s( - ffi.Pointer _FullPath, - ffi.Pointer _Drive, - int _DriveCount, - ffi.Pointer _Dir, - int _DirCount, - ffi.Pointer _Filename, - int _FilenameCount, - ffi.Pointer _Ext, - int _ExtCount, + int cgetclose() { + return _cgetclose(); + } + + late final _cgetclosePtr = _lookup>( + 'cgetclose', + ); + late final _cgetclose = _cgetclosePtr.asFunction(); + + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return __wsplitpath_s( - _FullPath, - _Drive, - _DriveCount, - _Dir, - _DirCount, - _Filename, - _FilenameCount, - _Ext, - _ExtCount, - ); + return _cgetent(arg0, arg1, arg2); } - late final __wsplitpath_sPtr = + late final _cgetentPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, ) > - >('_wsplitpath_s'); - late final __wsplitpath_s = __wsplitpath_sPtr + >('cgetent'); + late final _cgetent = _cgetentPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer, - int, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, ) >(); - int _wdupenv_s( - ffi.Pointer> _Buffer, - ffi.Pointer _BufferCount, - ffi.Pointer _VarName, + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __wdupenv_s(_Buffer, _BufferCount, _VarName); + return _cgetfirst(arg0, arg1); } - late final __wdupenv_sPtr = + late final _cgetfirstPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, ) > - >('_wdupenv_s'); - late final __wdupenv_s = __wdupenv_sPtr + >('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr .asFunction< int Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, ) >(); - ffi.Pointer _wgetenv(ffi.Pointer _VarName) { - return __wgetenv(_VarName); + int cgetmatch(ffi.Pointer arg0, ffi.Pointer arg1) { + return _cgetmatch(arg0, arg1); } - late final __wgetenvPtr = + late final _cgetmatchPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) + ffi.Int Function(ffi.Pointer, ffi.Pointer) > - >('_wgetenv'); - late final __wgetenv = __wgetenvPtr - .asFunction Function(ffi.Pointer)>(); - - int _wgetenv_s( - ffi.Pointer _RequiredCount, - ffi.Pointer _Buffer, - int _BufferCount, - ffi.Pointer _VarName, + >('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, ffi.Pointer)>(); + + int cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __wgetenv_s(_RequiredCount, _Buffer, _BufferCount, _VarName); + return _cgetnext(arg0, arg1); } - late final __wgetenv_sPtr = + late final _cgetnextPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, ) > - >('_wgetenv_s'); - late final __wgetenv_s = __wgetenv_sPtr + >('cgetnext'); + late final _cgetnext = _cgetnextPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, ) >(); - int _wputenv(ffi.Pointer _EnvString) { - return __wputenv(_EnvString); - } - - late final __wputenvPtr = - _lookup)>>( - '_wputenv', - ); - late final __wputenv = __wputenvPtr - .asFunction)>(); - - int _wputenv_s(ffi.Pointer _Name, ffi.Pointer _Value) { - return __wputenv_s(_Name, _Value); + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _cgetnum(arg0, arg1, arg2); } - late final __wputenv_sPtr = + late final _cgetnumPtr = _lookup< ffi.NativeFunction< - errno_t Function(ffi.Pointer, ffi.Pointer) + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > - >('_wputenv_s'); - late final __wputenv_s = __wputenv_sPtr + >('cgetnum'); + late final _cgetnum = _cgetnumPtr .asFunction< - int Function(ffi.Pointer, ffi.Pointer) + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) >(); - int _wsearchenv_s( - ffi.Pointer _Filename, - ffi.Pointer _VarName, - ffi.Pointer _Buffer, - int _BufferCount, + int cgetset(ffi.Pointer arg0) { + return _cgetset(arg0); + } + + late final _cgetsetPtr = + _lookup)>>( + 'cgetset', + ); + late final _cgetset = _cgetsetPtr + .asFunction)>(); + + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __wsearchenv_s(_Filename, _VarName, _Buffer, _BufferCount); + return _cgetstr(arg0, arg1, arg2); } - late final __wsearchenv_sPtr = + late final _cgetstrPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, ) > - >('_wsearchenv_s'); - late final __wsearchenv_s = __wsearchenv_sPtr + >('cgetstr'); + late final _cgetstr = _cgetstrPtr .asFunction< int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, ) >(); - void _wsearchenv( - ffi.Pointer _Filename, - ffi.Pointer _VarName, - ffi.Pointer _ResultPath, + int cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __wsearchenv(_Filename, _VarName, _ResultPath); + return _cgetustr(arg0, arg1, arg2); } - late final __wsearchenvPtr = + late final _cgetustrPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, ) > - >('_wsearchenv'); - late final __wsearchenv = __wsearchenvPtr + >('cgetustr'); + late final _cgetustr = _cgetustrPtr .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, ) >(); - int _wsystem(ffi.Pointer _Command) { - return __wsystem(_Command); + int daemon(int arg0, int arg1) { + return _daemon(arg0, arg1); } - late final __wsystemPtr = - _lookup)>>( - '_wsystem', - ); - late final __wsystem = __wsystemPtr - .asFunction)>(); + late final _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); + + ffi.Pointer devname(int arg0, int arg1) { + return _devname(arg0, arg1); + } + + late final _devnamePtr = + _lookup< + ffi.NativeFunction Function(dev_t, mode_t)> + >('devname'); + late final _devname = _devnamePtr + .asFunction Function(int, int)>(); - void _swab( - ffi.Pointer _Buf1, - ffi.Pointer _Buf2, - int _SizeInBytes, + ffi.Pointer devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, ) { - return __swab(_Buf1, _Buf2, _SizeInBytes); + return _devname_r(arg0, arg1, buf, len); } - late final __swabPtr = + late final _devname_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, + ffi.Pointer Function( + dev_t, + mode_t, ffi.Pointer, ffi.Int, ) > - >('_swab'); - late final __swab = __swabPtr + >('devname_r'); + late final _devname_r = _devname_rPtr .asFunction< - void Function(ffi.Pointer, ffi.Pointer, int) + ffi.Pointer Function(int, int, ffi.Pointer, int) >(); - void exit(int _Code) { - return _exit$1(_Code); + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getbsize(arg0, arg1); } - late final _exitPtr = _lookup>( - 'exit', - ); - late final _exit$1 = _exitPtr.asFunction(); + late final _getbsizePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('getbsize'); + late final _getbsize = _getbsizePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); - void _exit(int _Code) { - return __exit(_Code); + int getloadavg(ffi.Pointer arg0, int __nelem) { + return _getloadavg(arg0, __nelem); } - late final __exitPtr = - _lookup>('_exit'); - late final __exit = __exitPtr.asFunction(); + late final _getloadavgPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('getloadavg'); + late final _getloadavg = _getloadavgPtr + .asFunction, int)>(); - void _Exit(int _Code) { - return __Exit(_Code); + ffi.Pointer getprogname() { + return _getprogname(); } - late final __ExitPtr = - _lookup>('_Exit'); - late final __Exit = __ExitPtr.asFunction(); - - void quick_exit(int _Code) { - return _quick_exit(_Code); - } - - late final _quick_exitPtr = - _lookup>('quick_exit'); - late final _quick_exit = _quick_exitPtr.asFunction(); + late final _getprognamePtr = + _lookup Function()>>( + 'getprogname', + ); + late final _getprogname = _getprognamePtr + .asFunction Function()>(); - void abort() { - return _abort(); + void setprogname(ffi.Pointer arg0) { + return _setprogname(arg0); } - late final _abortPtr = _lookup>( - 'abort', - ); - late final _abort = _abortPtr.asFunction(); + late final _setprognamePtr = + _lookup)>>( + 'setprogname', + ); + late final _setprogname = _setprognamePtr + .asFunction)>(); - int _set_abort_behavior(int _Flags, int _Mask) { - return __set_abort_behavior(_Flags, _Mask); + int heapsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + __compar, + ) { + return _heapsort(__base, __nel, __width, __compar); } - late final __set_abort_behaviorPtr = + late final _heapsortPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.UnsignedInt, ffi.UnsignedInt) + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, + ) > - >('_set_abort_behavior'); - late final __set_abort_behavior = __set_abort_behaviorPtr - .asFunction(); + >('heapsort'); + late final _heapsort = _heapsortPtr + .asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, + ) + >(); - int atexit(ffi.Pointer> arg0) { - return _atexit(arg0); + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + __compar, + ) { + return _mergesort(__base, __nel, __width, __compar); } - late final _atexitPtr = + late final _mergesortPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>) + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, + ) > - >('atexit'); - late final _atexit = _atexitPtr + >('mergesort'); + late final _mergesort = _mergesortPtr .asFunction< - int Function(ffi.Pointer>) + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, + ) >(); - _onexit_t _onexit(_onexit_t _Func) { - return __onexit(_Func); - } - - late final __onexitPtr = - _lookup>('_onexit'); - late final __onexit = __onexitPtr.asFunction<_onexit_t Function(_onexit_t)>(); - - int at_quick_exit(ffi.Pointer> arg0) { - return _at_quick_exit(arg0); + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + __compar, + ) { + return _psort(__base, __nel, __width, __compar); } - late final _at_quick_exitPtr = + late final _psortPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>) + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, + ) > - >('at_quick_exit'); - late final _at_quick_exit = _at_quick_exitPtr + >('psort'); + late final _psort = _psortPtr .asFunction< - int Function(ffi.Pointer>) + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >, + ) >(); - _purecall_handler _set_purecall_handler(_purecall_handler _Handler) { - return __set_purecall_handler(_Handler); + void psort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + __compar, + ) { + return _psort_r(__base, __nel, __width, arg3, __compar); } - late final __set_purecall_handlerPtr = + late final _psort_rPtr = _lookup< - ffi.NativeFunction<_purecall_handler Function(_purecall_handler)> - >('_set_purecall_handler'); - late final __set_purecall_handler = __set_purecall_handlerPtr - .asFunction<_purecall_handler Function(_purecall_handler)>(); - - _purecall_handler _get_purecall_handler() { - return __get_purecall_handler(); - } - - late final __get_purecall_handlerPtr = - _lookup>( - '_get_purecall_handler', - ); - late final __get_purecall_handler = __get_purecall_handlerPtr - .asFunction<_purecall_handler Function()>(); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ) + > + >('psort_r'); + late final _psort_r = _psort_rPtr + .asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ) + >(); - _invalid_parameter_handler _set_invalid_parameter_handler( - _invalid_parameter_handler _Handler, + void qsort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + __compar, ) { - return __set_invalid_parameter_handler(_Handler); + return _qsort_r(__base, __nel, __width, arg3, __compar); } - late final __set_invalid_parameter_handlerPtr = + late final _qsort_rPtr = _lookup< ffi.NativeFunction< - _invalid_parameter_handler Function(_invalid_parameter_handler) + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ) > - >('_set_invalid_parameter_handler'); - late final __set_invalid_parameter_handler = - __set_invalid_parameter_handlerPtr - .asFunction< - _invalid_parameter_handler Function(_invalid_parameter_handler) - >(); - - _invalid_parameter_handler _get_invalid_parameter_handler() { - return __get_invalid_parameter_handler(); - } - - late final __get_invalid_parameter_handlerPtr = - _lookup>( - '_get_invalid_parameter_handler', - ); - late final __get_invalid_parameter_handler = - __get_invalid_parameter_handlerPtr - .asFunction<_invalid_parameter_handler Function()>(); + >('qsort_r'); + late final _qsort_r = _qsort_rPtr + .asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ) + >(); - _invalid_parameter_handler _set_thread_local_invalid_parameter_handler( - _invalid_parameter_handler _Handler, + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __set_thread_local_invalid_parameter_handler(_Handler); + return _radixsort(__base, __nel, __table, __endbyte); } - late final __set_thread_local_invalid_parameter_handlerPtr = + late final _radixsortPtr = _lookup< ffi.NativeFunction< - _invalid_parameter_handler Function(_invalid_parameter_handler) + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ) > - >('_set_thread_local_invalid_parameter_handler'); - late final __set_thread_local_invalid_parameter_handler = - __set_thread_local_invalid_parameter_handlerPtr - .asFunction< - _invalid_parameter_handler Function(_invalid_parameter_handler) - >(); - - _invalid_parameter_handler _get_thread_local_invalid_parameter_handler() { - return __get_thread_local_invalid_parameter_handler(); - } - - late final __get_thread_local_invalid_parameter_handlerPtr = - _lookup>( - '_get_thread_local_invalid_parameter_handler', - ); - late final __get_thread_local_invalid_parameter_handler = - __get_thread_local_invalid_parameter_handlerPtr - .asFunction<_invalid_parameter_handler Function()>(); - - int _set_error_mode(int _Mode) { - return __set_error_mode(_Mode); - } - - late final __set_error_modePtr = - _lookup>('_set_error_mode'); - late final __set_error_mode = __set_error_modePtr - .asFunction(); - - ffi.Pointer __doserrno() { - return ___doserrno(); - } - - late final ___doserrnoPtr = - _lookup Function()>>( - '__doserrno', - ); - late final ___doserrno = ___doserrnoPtr - .asFunction Function()>(); + >('radixsort'); + late final _radixsort = _radixsortPtr + .asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + int, + ) + >(); - int _set_doserrno(int _Value) { - return __set_doserrno(_Value); + int rpmatch(ffi.Pointer arg0) { + return _rpmatch(arg0); } - late final __set_doserrnoPtr = - _lookup>( - '_set_doserrno', + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch', ); - late final __set_doserrno = __set_doserrnoPtr.asFunction(); - - int _get_doserrno(ffi.Pointer _Value) { - return __get_doserrno(_Value); - } - - late final __get_doserrnoPtr = - _lookup< - ffi.NativeFunction)> - >('_get_doserrno'); - late final __get_doserrno = __get_doserrnoPtr - .asFunction)>(); + late final _rpmatch = _rpmatchPtr + .asFunction)>(); - ffi.Pointer> __sys_errlist() { - return ___sys_errlist(); + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, + ) { + return _sradixsort(__base, __nel, __table, __endbyte); } - late final ___sys_errlistPtr = + late final _sradixsortPtr = _lookup< - ffi.NativeFunction> Function()> - >('__sys_errlist'); - late final ___sys_errlist = ___sys_errlistPtr - .asFunction> Function()>(); - - ffi.Pointer __sys_nerr() { - return ___sys_nerr(); - } - - late final ___sys_nerrPtr = - _lookup Function()>>( - '__sys_nerr', - ); - late final ___sys_nerr = ___sys_nerrPtr - .asFunction Function()>(); + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('sradixsort'); + late final _sradixsort = _sradixsortPtr + .asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + int, + ) + >(); - void perror(ffi.Pointer _ErrMsg) { - return _perror(_ErrMsg); + void sranddev() { + return _sranddev(); } - late final _perrorPtr = - _lookup)>>( - 'perror', - ); - late final _perror = _perrorPtr - .asFunction)>(); + late final _sranddevPtr = _lookup>( + 'sranddev', + ); + late final _sranddev = _sranddevPtr.asFunction(); - ffi.Pointer> __p__pgmptr() { - return ___p__pgmptr(); + void srandomdev() { + return _srandomdev(); } - late final ___p__pgmptrPtr = - _lookup< - ffi.NativeFunction> Function()> - >('__p__pgmptr'); - late final ___p__pgmptr = ___p__pgmptrPtr - .asFunction> Function()>(); + late final _srandomdevPtr = _lookup>( + 'srandomdev', + ); + late final _srandomdev = _srandomdevPtr.asFunction(); - ffi.Pointer> __p__wpgmptr() { - return ___p__wpgmptr(); + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, + ) { + return _strtonum(__numstr, __minval, __maxval, __errstrp); } - late final ___p__wpgmptrPtr = + late final _strtonumPtr = _lookup< - ffi.NativeFunction> Function()> - >('__p__wpgmptr'); - late final ___p__wpgmptr = ___p__wpgmptrPtr - .asFunction> Function()>(); - - ffi.Pointer __p__fmode() { - return ___p__fmode(); - } - - late final ___p__fmodePtr = - _lookup Function()>>( - '__p__fmode', - ); - late final ___p__fmode = ___p__fmodePtr - .asFunction Function()>(); + ffi.NativeFunction< + ffi.LongLong Function( + ffi.Pointer, + ffi.LongLong, + ffi.LongLong, + ffi.Pointer>, + ) + > + >('strtonum'); + late final _strtonum = _strtonumPtr + .asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer>, + ) + >(); - int _get_pgmptr(ffi.Pointer> _Value) { - return __get_pgmptr(_Value); + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoq(__str, __endptr, __base); } - late final __get_pgmptrPtr = + late final _strtoqPtr = _lookup< - ffi.NativeFunction>)> - >('_get_pgmptr'); - late final __get_pgmptr = __get_pgmptrPtr - .asFunction>)>(); + ffi.NativeFunction< + ffi.LongLong Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ) + > + >('strtoq'); + late final _strtoq = _strtoqPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + >(); - int _get_wpgmptr(ffi.Pointer> _Value) { - return __get_wpgmptr(_Value); + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtouq(__str, __endptr, __base); } - late final __get_wpgmptrPtr = + late final _strtouqPtr = _lookup< ffi.NativeFunction< - errno_t Function(ffi.Pointer>) + ffi.UnsignedLongLong Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ) > - >('_get_wpgmptr'); - late final __get_wpgmptr = __get_wpgmptrPtr - .asFunction>)>(); - - int _set_fmode(int _Mode) { - return __set_fmode(_Mode); - } - - late final __set_fmodePtr = - _lookup>('_set_fmode'); - late final __set_fmode = __set_fmodePtr.asFunction(); - - int _get_fmode(ffi.Pointer _PMode) { - return __get_fmode(_PMode); - } - - late final __get_fmodePtr = - _lookup)>>( - '_get_fmode', - ); - late final __get_fmode = __get_fmodePtr - .asFunction)>(); - - int abs(int _Number) { - return _abs(_Number); - } - - late final _absPtr = _lookup>( - 'abs', - ); - late final _abs = _absPtr.asFunction(); - - int labs(int _Number) { - return _labs(_Number); - } + >('strtouq'); + late final _strtouq = _strtouqPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + >(); - late final _labsPtr = - _lookup>('labs'); - late final _labs = _labsPtr.asFunction(); + late final ffi.Pointer> _suboptarg = + _lookup>('suboptarg'); - int llabs(int _Number) { - return _llabs(_Number); - } + ffi.Pointer get suboptarg => _suboptarg.value; - late final _llabsPtr = - _lookup>('llabs'); - late final _llabs = _llabsPtr.asFunction(); + set suboptarg(ffi.Pointer value) => _suboptarg.value = value; - int _abs64(int _Number) { - return __abs64(_Number); + ffi.Pointer getAppDataDir() { + return _getAppDataDir(); } - late final __abs64Ptr = - _lookup>( - '_abs64', + late final _getAppDataDirPtr = + _lookup Function()>>( + 'getAppDataDir', ); - late final __abs64 = __abs64Ptr.asFunction(); + late final _getAppDataDir = _getAppDataDirPtr + .asFunction Function()>(); - int _byteswap_ushort(int _Number) { - return __byteswap_ushort(_Number); + ffi.Pointer setup( + ffi.Pointer _logDir, + ffi.Pointer _dataDir, + ffi.Pointer _locale, + ffi.Pointer _env, + int logP, + int appsP, + int statusP, + int privateServerP, + int appEventP, + int consent, + ffi.Pointer api, + ) { + return _setup( + _logDir, + _dataDir, + _locale, + _env, + logP, + appsP, + statusP, + privateServerP, + appEventP, + consent, + api, + ); } - late final __byteswap_ushortPtr = + late final _setupPtr = _lookup< - ffi.NativeFunction - >('_byteswap_ushort'); - late final __byteswap_ushort = __byteswap_ushortPtr - .asFunction(); + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int, + ffi.Pointer, + ) + > + >('setup'); + late final _setup = _setupPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int, + int, + int, + ffi.Pointer, + ) + >(); - int _byteswap_ulong(int _Number) { - return __byteswap_ulong(_Number); + ffi.Pointer updateTelemetryConsent(int consent) { + return _updateTelemetryConsent(consent); } - late final __byteswap_ulongPtr = - _lookup>( - '_byteswap_ulong', + late final _updateTelemetryConsentPtr = + _lookup Function(ffi.Int)>>( + 'updateTelemetryConsent', ); - late final __byteswap_ulong = __byteswap_ulongPtr - .asFunction(); - - int _byteswap_uint64(int _Number) { - return __byteswap_uint64(_Number); - } - - late final __byteswap_uint64Ptr = - _lookup< - ffi.NativeFunction - >('_byteswap_uint64'); - late final __byteswap_uint64 = __byteswap_uint64Ptr - .asFunction(); + late final _updateTelemetryConsent = _updateTelemetryConsentPtr + .asFunction Function(int)>(); - div_t div(int _Numerator, int _Denominator) { - return _div(_Numerator, _Denominator); + int isTelemetryEnabled() { + return _isTelemetryEnabled(); } - late final _divPtr = - _lookup>('div'); - late final _div = _divPtr.asFunction(); + late final _isTelemetryEnabledPtr = + _lookup>('isTelemetryEnabled'); + late final _isTelemetryEnabled = _isTelemetryEnabledPtr + .asFunction(); - ldiv_t ldiv(int _Numerator, int _Denominator) { - return _ldiv(_Numerator, _Denominator); + int isOAuthLogin() { + return _isOAuthLogin(); } - late final _ldivPtr = - _lookup>('ldiv'); - late final _ldiv = _ldivPtr.asFunction(); + late final _isOAuthLoginPtr = _lookup>( + 'isOAuthLogin', + ); + late final _isOAuthLogin = _isOAuthLoginPtr.asFunction(); - lldiv_t lldiv(int _Numerator, int _Denominator) { - return _lldiv(_Numerator, _Denominator); + ffi.Pointer getOAuthProvider() { + return _getOAuthProvider(); } - late final _lldivPtr = - _lookup>( - 'lldiv', + late final _getOAuthProviderPtr = + _lookup Function()>>( + 'getOAuthProvider', ); - late final _lldiv = _lldivPtr.asFunction(); - - int _rotl(int _Value, int _Shift) { - return __rotl(_Value, _Shift); - } - - late final __rotlPtr = - _lookup< - ffi.NativeFunction - >('_rotl'); - late final __rotl = __rotlPtr.asFunction(); + late final _getOAuthProvider = _getOAuthProviderPtr + .asFunction Function()>(); - int _lrotl(int _Value, int _Shift) { - return __lrotl(_Value, _Shift); + ffi.Pointer availableFeatures() { + return _availableFeatures(); } - late final __lrotlPtr = - _lookup< - ffi.NativeFunction - >('_lrotl'); - late final __lrotl = __lrotlPtr.asFunction(); + late final _availableFeaturesPtr = + _lookup Function()>>( + 'availableFeatures', + ); + late final _availableFeatures = _availableFeaturesPtr + .asFunction Function()>(); - int _rotl64(int _Value, int _Shift) { - return __rotl64(_Value, _Shift); + ffi.Pointer updateLocale(ffi.Pointer _locale) { + return _updateLocale(_locale); } - late final __rotl64Ptr = + late final _updateLocalePtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.UnsignedLongLong, ffi.Int) + ffi.Pointer Function(ffi.Pointer) > - >('_rotl64'); - late final __rotl64 = __rotl64Ptr.asFunction(); - - int _rotr(int _Value, int _Shift) { - return __rotr(_Value, _Shift); - } - - late final __rotrPtr = - _lookup< - ffi.NativeFunction - >('_rotr'); - late final __rotr = __rotrPtr.asFunction(); + >('updateLocale'); + late final _updateLocale = _updateLocalePtr + .asFunction Function(ffi.Pointer)>(); - int _lrotr(int _Value, int _Shift) { - return __lrotr(_Value, _Shift); + ffi.Pointer addSplitTunnelItem( + ffi.Pointer filterTypeC, + ffi.Pointer itemC, + ) { + return _addSplitTunnelItem(filterTypeC, itemC); } - late final __lrotrPtr = + late final _addSplitTunnelItemPtr = _lookup< - ffi.NativeFunction - >('_lrotr'); - late final __lrotr = __lrotrPtr.asFunction(); + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('addSplitTunnelItem'); + late final _addSplitTunnelItem = _addSplitTunnelItemPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); - int _rotr64(int _Value, int _Shift) { - return __rotr64(_Value, _Shift); + ffi.Pointer removeSplitTunnelItem( + ffi.Pointer filterTypeC, + ffi.Pointer itemC, + ) { + return _removeSplitTunnelItem(filterTypeC, itemC); } - late final __rotr64Ptr = + late final _removeSplitTunnelItemPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.UnsignedLongLong, ffi.Int) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) > - >('_rotr64'); - late final __rotr64 = __rotr64Ptr.asFunction(); - - void srand(int _Seed) { - return _srand(_Seed); - } - - late final _srandPtr = - _lookup>('srand'); - late final _srand = _srandPtr.asFunction(); - - int rand() { - return _rand(); - } - - late final _randPtr = _lookup>('rand'); - late final _rand = _randPtr.asFunction(); - - double atof(ffi.Pointer _String) { - return _atof(_String); - } - - late final _atofPtr = - _lookup)>>( - 'atof', - ); - late final _atof = _atofPtr - .asFunction)>(); - - int atoi(ffi.Pointer _String) { - return _atoi(_String); - } - - late final _atoiPtr = - _lookup)>>( - 'atoi', - ); - late final _atoi = _atoiPtr.asFunction)>(); - - int atol(ffi.Pointer _String) { - return _atol(_String); - } - - late final _atolPtr = - _lookup)>>( - 'atol', - ); - late final _atol = _atolPtr.asFunction)>(); + >('removeSplitTunnelItem'); + late final _removeSplitTunnelItem = _removeSplitTunnelItemPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); - int atoll(ffi.Pointer _String) { - return _atoll(_String); + ffi.Pointer setSplitTunnelingEnabled(int enabled) { + return _setSplitTunnelingEnabled(enabled); } - late final _atollPtr = - _lookup)>>( - 'atoll', + late final _setSplitTunnelingEnabledPtr = + _lookup Function(ffi.Int)>>( + 'setSplitTunnelingEnabled', ); - late final _atoll = _atollPtr - .asFunction)>(); + late final _setSplitTunnelingEnabled = _setSplitTunnelingEnabledPtr + .asFunction Function(int)>(); - int _atoi64(ffi.Pointer _String) { - return __atoi64(_String); + int isSplitTunnelingEnabled() { + return _isSplitTunnelingEnabled(); } - late final __atoi64Ptr = - _lookup)>>( - '_atoi64', + late final _isSplitTunnelingEnabledPtr = + _lookup>( + 'isSplitTunnelingEnabled', ); - late final __atoi64 = __atoi64Ptr - .asFunction)>(); + late final _isSplitTunnelingEnabled = _isSplitTunnelingEnabledPtr + .asFunction(); - double _atof_l(ffi.Pointer _String, _locale_t _Locale) { - return __atof_l(_String, _Locale); + ffi.Pointer loadInstalledApps(ffi.Pointer dataDir) { + return _loadInstalledApps(dataDir); } - late final __atof_lPtr = + late final _loadInstalledAppsPtr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, _locale_t) + ffi.Pointer Function(ffi.Pointer) > - >('_atof_l'); - late final __atof_l = __atof_lPtr - .asFunction, _locale_t)>(); - - int _atoi_l(ffi.Pointer _String, _locale_t _Locale) { - return __atoi_l(_String, _Locale); - } - - late final __atoi_lPtr = - _lookup< - ffi.NativeFunction, _locale_t)> - >('_atoi_l'); - late final __atoi_l = __atoi_lPtr - .asFunction, _locale_t)>(); - - int _atol_l(ffi.Pointer _String, _locale_t _Locale) { - return __atol_l(_String, _Locale); - } - - late final __atol_lPtr = - _lookup< - ffi.NativeFunction, _locale_t)> - >('_atol_l'); - late final __atol_l = __atol_lPtr - .asFunction, _locale_t)>(); + >('loadInstalledApps'); + late final _loadInstalledApps = _loadInstalledAppsPtr + .asFunction Function(ffi.Pointer)>(); - int _atoll_l(ffi.Pointer _String, _locale_t _Locale) { - return __atoll_l(_String, _Locale); + ffi.Pointer loadInstalledAppIcon( + ffi.Pointer appPathC, + ffi.Pointer iconPathC, + ) { + return _loadInstalledAppIcon(appPathC, iconPathC); } - late final __atoll_lPtr = + late final _loadInstalledAppIconPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, _locale_t) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) > - >('_atoll_l'); - late final __atoll_l = __atoll_lPtr - .asFunction, _locale_t)>(); + >('loadInstalledAppIcon'); + late final _loadInstalledAppIcon = _loadInstalledAppIconPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); - int _atoi64_l(ffi.Pointer _String, _locale_t _Locale) { - return __atoi64_l(_String, _Locale); + ffi.Pointer getDataCapInfo() { + return _getDataCapInfo(); } - late final __atoi64_lPtr = - _lookup< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, _locale_t) - > - >('_atoi64_l'); - late final __atoi64_l = __atoi64_lPtr - .asFunction, _locale_t)>(); + late final _getDataCapInfoPtr = + _lookup Function()>>( + 'getDataCapInfo', + ); + late final _getDataCapInfo = _getDataCapInfoPtr + .asFunction Function()>(); - int _atoflt(ffi.Pointer<_CRT_FLOAT> _Result, ffi.Pointer _String) { - return __atoflt(_Result, _String); + ffi.Pointer reportIssue( + ffi.Pointer emailC, + ffi.Pointer typeC, + ffi.Pointer descC, + ffi.Pointer deviceC, + ffi.Pointer modelC, + ffi.Pointer logPathC, + ffi.Pointer attachmentsJSONC, + ) { + return _reportIssue( + emailC, + typeC, + descC, + deviceC, + modelC, + logPathC, + attachmentsJSONC, + ); } - late final __atofltPtr = + late final _reportIssuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_CRT_FLOAT>, ffi.Pointer) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > - >('_atoflt'); - late final __atoflt = __atofltPtr + >('reportIssue'); + late final _reportIssue = _reportIssuePtr .asFunction< - int Function(ffi.Pointer<_CRT_FLOAT>, ffi.Pointer) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) >(); - int _atodbl(ffi.Pointer<_CRT_DOUBLE> _Result, ffi.Pointer _String) { - return __atodbl(_Result, _String); + ffi.Pointer getSelectedServerJSON() { + return _getSelectedServerJSON(); } - late final __atodblPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_CRT_DOUBLE>, ffi.Pointer) - > - >('_atodbl'); - late final __atodbl = __atodblPtr - .asFunction< - int Function(ffi.Pointer<_CRT_DOUBLE>, ffi.Pointer) - >(); + late final _getSelectedServerJSONPtr = + _lookup Function()>>( + 'getSelectedServerJSON', + ); + late final _getSelectedServerJSON = _getSelectedServerJSONPtr + .asFunction Function()>(); - int _atoldbl(ffi.Pointer<_LDOUBLE> _Result, ffi.Pointer _String) { - return __atoldbl(_Result, _String); + ffi.Pointer getAutoLocation() { + return _getAutoLocation(); } - late final __atoldblPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_LDOUBLE>, ffi.Pointer) - > - >('_atoldbl'); - late final __atoldbl = __atoldblPtr - .asFunction, ffi.Pointer)>(); - - int _atoflt_l( - ffi.Pointer<_CRT_FLOAT> _Result, - ffi.Pointer _String, - _locale_t _Locale, - ) { - return __atoflt_l(_Result, _String, _Locale); + late final _getAutoLocationPtr = + _lookup Function()>>( + 'getAutoLocation', + ); + late final _getAutoLocation = _getAutoLocationPtr + .asFunction Function()>(); + + ffi.Pointer isTagAvailable(ffi.Pointer _tag) { + return _isTagAvailable(_tag); } - late final __atoflt_lPtr = + late final _isTagAvailablePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer<_CRT_FLOAT>, - ffi.Pointer, - _locale_t, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_atoflt_l'); - late final __atoflt_l = __atoflt_lPtr - .asFunction< - int Function(ffi.Pointer<_CRT_FLOAT>, ffi.Pointer, _locale_t) - >(); + >('isTagAvailable'); + late final _isTagAvailable = _isTagAvailablePtr + .asFunction Function(ffi.Pointer)>(); - int _atodbl_l( - ffi.Pointer<_CRT_DOUBLE> _Result, - ffi.Pointer _String, - _locale_t _Locale, - ) { - return __atodbl_l(_Result, _String, _Locale); + ffi.Pointer getAvailableServers() { + return _getAvailableServers(); } - late final __atodbl_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer<_CRT_DOUBLE>, - ffi.Pointer, - _locale_t, - ) - > - >('_atodbl_l'); - late final __atodbl_l = __atodbl_lPtr - .asFunction< - int Function(ffi.Pointer<_CRT_DOUBLE>, ffi.Pointer, _locale_t) - >(); + late final _getAvailableServersPtr = + _lookup Function()>>( + 'getAvailableServers', + ); + late final _getAvailableServers = _getAvailableServersPtr + .asFunction Function()>(); - int _atoldbl_l( - ffi.Pointer<_LDOUBLE> _Result, - ffi.Pointer _String, - _locale_t _Locale, - ) { - return __atoldbl_l(_Result, _String, _Locale); + ffi.Pointer startVPN() { + return _startVPN(); } - late final __atoldbl_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer<_LDOUBLE>, - ffi.Pointer, - _locale_t, - ) - > - >('_atoldbl_l'); - late final __atoldbl_l = __atoldbl_lPtr - .asFunction< - int Function(ffi.Pointer<_LDOUBLE>, ffi.Pointer, _locale_t) - >(); + late final _startVPNPtr = + _lookup Function()>>('startVPN'); + late final _startVPN = _startVPNPtr + .asFunction Function()>(); - double strtof( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - ) { - return _strtof(_String, _EndPtr); + ffi.Pointer stopVPN() { + return _stopVPN(); } - late final _strtofPtr = - _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer>, - ) - > - >('strtof'); - late final _strtof = _strtofPtr - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer>, - ) - >(); + late final _stopVPNPtr = + _lookup Function()>>('stopVPN'); + late final _stopVPN = _stopVPNPtr + .asFunction Function()>(); - double _strtof_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - _locale_t _Locale, - ) { - return __strtof_l(_String, _EndPtr, _Locale); + ffi.Pointer connectToServer(ffi.Pointer _tag) { + return _connectToServer(_tag); } - late final __strtof_lPtr = + late final _connectToServerPtr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer>, - _locale_t, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_strtof_l'); - late final __strtof_l = __strtof_lPtr - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer>, - _locale_t, - ) - >(); + >('connectToServer'); + late final _connectToServer = _connectToServerPtr + .asFunction Function(ffi.Pointer)>(); - double strtod( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, + int isVPNConnected() { + return _isVPNConnected(); + } + + late final _isVPNConnectedPtr = + _lookup>('isVPNConnected'); + late final _isVPNConnected = _isVPNConnectedPtr.asFunction(); + + ffi.Pointer getUserData() { + return _getUserData(); + } + + late final _getUserDataPtr = + _lookup Function()>>( + 'getUserData', + ); + late final _getUserData = _getUserDataPtr + .asFunction Function()>(); + + ffi.Pointer fetchUserData() { + return _fetchUserData(); + } + + late final _fetchUserDataPtr = + _lookup Function()>>( + 'fetchUserData', + ); + late final _fetchUserData = _fetchUserDataPtr + .asFunction Function()>(); + + ffi.Pointer stripeSubscriptionPaymentRedirect( + ffi.Pointer subType, + ffi.Pointer _planId, + ffi.Pointer _email, + ffi.Pointer _idempotencyKey, ) { - return _strtod(_String, _EndPtr); + return _stripeSubscriptionPaymentRedirect( + subType, + _planId, + _email, + _idempotencyKey, + ); } - late final _strtodPtr = + late final _stripeSubscriptionPaymentRedirectPtr = _lookup< ffi.NativeFunction< - ffi.Double Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ) > - >('strtod'); - late final _strtod = _strtodPtr - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer>, - ) - >(); + >('stripeSubscriptionPaymentRedirect'); + late final _stripeSubscriptionPaymentRedirect = + _stripeSubscriptionPaymentRedirectPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - double _strtod_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - _locale_t _Locale, + ffi.Pointer paymentRedirect( + ffi.Pointer _plan, + ffi.Pointer _provider, + ffi.Pointer _email, + ffi.Pointer _idempotencyKey, ) { - return __strtod_l(_String, _EndPtr, _Locale); + return _paymentRedirect(_plan, _provider, _email, _idempotencyKey); } - late final __strtod_lPtr = + late final _paymentRedirectPtr = _lookup< ffi.NativeFunction< - ffi.Double Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - _locale_t, ) > - >('_strtod_l'); - late final __strtod_l = __strtod_lPtr + >('paymentRedirect'); + late final _paymentRedirect = _paymentRedirectPtr .asFunction< - double Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - _locale_t, ) >(); - int strtol( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - ) { - return _strtol(_String, _EndPtr, _Radix); + ffi.Pointer stripeBillingPortalUrl() { + return _stripeBillingPortalUrl(); } - late final _strtolPtr = - _lookup< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ) - > - >('strtol'); - late final _strtol = _strtolPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >(); + late final _stripeBillingPortalUrlPtr = + _lookup Function()>>( + 'stripeBillingPortalUrl', + ); + late final _stripeBillingPortalUrl = _stripeBillingPortalUrlPtr + .asFunction Function()>(); - int _strtol_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, - ) { - return __strtol_l(_String, _EndPtr, _Radix, _Locale); + ffi.Pointer plans() { + return _plans(); + } + + late final _plansPtr = + _lookup Function()>>('plans'); + late final _plans = _plansPtr.asFunction Function()>(); + + ffi.Pointer oauthLoginUrl(ffi.Pointer _provider) { + return _oauthLoginUrl(_provider); } - late final __strtol_lPtr = + late final _oauthLoginUrlPtr = _lookup< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_strtol_l'); - late final __strtol_l = __strtol_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, - ) - >(); + >('oauthLoginUrl'); + late final _oauthLoginUrl = _oauthLoginUrlPtr + .asFunction Function(ffi.Pointer)>(); - int strtoll( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - ) { - return _strtoll(_String, _EndPtr, _Radix); + ffi.Pointer oAuthLoginCallback(ffi.Pointer _oAuthToken) { + return _oAuthLoginCallback(_oAuthToken); } - late final _strtollPtr = + late final _oAuthLoginCallbackPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('strtoll'); - late final _strtoll = _strtollPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >(); + >('oAuthLoginCallback'); + late final _oAuthLoginCallback = _oAuthLoginCallbackPtr + .asFunction Function(ffi.Pointer)>(); - int _strtoll_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + ffi.Pointer login( + ffi.Pointer _email, + ffi.Pointer _password, ) { - return __strtoll_l(_String, _EndPtr, _Radix, _Locale); + return _login(_email, _password); } - late final __strtoll_lPtr = + late final _loginPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, ) > - >('_strtoll_l'); - late final __strtoll_l = __strtoll_lPtr + >('login'); + late final _login = _loginPtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, ) >(); - int strtoul( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + ffi.Pointer signup( + ffi.Pointer _email, + ffi.Pointer _password, ) { - return _strtoul(_String, _EndPtr, _Radix); + return _signup(_email, _password); } - late final _strtoulPtr = + late final _signupPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Int, ) > - >('strtoul'); - late final _strtoul = _strtoulPtr + >('signup'); + late final _signup = _signupPtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - int, ) >(); - int _strtoul_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, - ) { - return __strtoul_l(_String, _EndPtr, _Radix, _Locale); + ffi.Pointer logout(ffi.Pointer _email) { + return _logout(_email); } - late final __strtoul_lPtr = + late final _logoutPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_strtoul_l'); - late final __strtoul_l = __strtoul_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, - ) - >(); + >('logout'); + late final _logout = _logoutPtr + .asFunction Function(ffi.Pointer)>(); - int strtoull( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - ) { - return _strtoull(_String, _EndPtr, _Radix); + ffi.Pointer startRecoveryByEmail(ffi.Pointer _email) { + return _startRecoveryByEmail(_email); } - late final _strtoullPtr = + late final _startRecoveryByEmailPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('strtoull'); - late final _strtoull = _strtoullPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >(); + >('startRecoveryByEmail'); + late final _startRecoveryByEmail = _startRecoveryByEmailPtr + .asFunction Function(ffi.Pointer)>(); - int _strtoull_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + ffi.Pointer validateEmailRecoveryCode( + ffi.Pointer _email, + ffi.Pointer _code, ) { - return __strtoull_l(_String, _EndPtr, _Radix, _Locale); + return _validateEmailRecoveryCode(_email, _code); } - late final __strtoull_lPtr = + late final _validateEmailRecoveryCodePtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, ) > - >('_strtoull_l'); - late final __strtoull_l = __strtoull_lPtr + >('validateEmailRecoveryCode'); + late final _validateEmailRecoveryCode = _validateEmailRecoveryCodePtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, ) >(); - int _strtoi64( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + ffi.Pointer completeRecoveryByEmail( + ffi.Pointer _email, + ffi.Pointer _newPassword, + ffi.Pointer _code, ) { - return __strtoi64(_String, _EndPtr, _Radix); + return _completeRecoveryByEmail(_email, _newPassword, _code); } - late final __strtoi64Ptr = + late final _completeRecoveryByEmailPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Int, ) > - >('_strtoi64'); - late final __strtoi64 = __strtoi64Ptr + >('completeRecoveryByEmail'); + late final _completeRecoveryByEmail = _completeRecoveryByEmailPtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - int, ) >(); - int _strtoi64_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, - ) { - return __strtoi64_l(_String, _EndPtr, _Radix, _Locale); + ffi.Pointer removeDevice(ffi.Pointer deviceId) { + return _removeDevice(deviceId); } - late final __strtoi64_lPtr = + late final _removeDevicePtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_strtoi64_l'); - late final __strtoi64_l = __strtoi64_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, - ) - >(); + >('removeDevice'); + late final _removeDevice = _removeDevicePtr + .asFunction Function(ffi.Pointer)>(); - int _strtoui64( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, + ffi.Pointer referralAttachment( + ffi.Pointer _referralCode, ) { - return __strtoui64(_String, _EndPtr, _Radix); + return _referralAttachment(_referralCode); } - late final __strtoui64Ptr = + late final _referralAttachmentPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_strtoui64'); - late final __strtoui64 = __strtoui64Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >(); + >('referralAttachment'); + late final _referralAttachment = _referralAttachmentPtr + .asFunction Function(ffi.Pointer)>(); - int _strtoui64_l( - ffi.Pointer _String, - ffi.Pointer> _EndPtr, - int _Radix, - _locale_t _Locale, + ffi.Pointer startChangeEmail( + ffi.Pointer _newEmail, + ffi.Pointer _password, ) { - return __strtoui64_l(_String, _EndPtr, _Radix, _Locale); + return _startChangeEmail(_newEmail, _password); } - late final __strtoui64_lPtr = + late final _startChangeEmailPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Int, - _locale_t, ) > - >('_strtoui64_l'); - late final __strtoui64_l = __strtoui64_lPtr + >('startChangeEmail'); + late final _startChangeEmail = _startChangeEmailPtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - int, - _locale_t, ) >(); - int _itoa_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, + ffi.Pointer completeChangeEmail( + ffi.Pointer _newEmail, + ffi.Pointer _password, + ffi.Pointer _code, ) { - return __itoa_s(_Value, _Buffer, _BufferCount, _Radix); + return _completeChangeEmail(_newEmail, _password, _code); } - late final __itoa_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function(ffi.Int, ffi.Pointer, ffi.Size, ffi.Int) - > - >('_itoa_s'); - late final __itoa_s = __itoa_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _itoa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __itoa(_Value, _Buffer, _Radix); - } - - late final __itoaPtr = + late final _completeChangeEmailPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Int, ffi.Pointer, - ffi.Int, + ffi.Pointer, + ffi.Pointer, ) > - >('_itoa'); - late final __itoa = __itoaPtr + >('completeChangeEmail'); + late final _completeChangeEmail = _completeChangeEmailPtr .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) >(); - int _ltoa_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __ltoa_s(_Value, _Buffer, _BufferCount, _Radix); - } - - late final __ltoa_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function(ffi.Long, ffi.Pointer, ffi.Size, ffi.Int) - > - >('_ltoa_s'); - late final __ltoa_s = __ltoa_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _ltoa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, + ffi.Pointer deleteAccount( + ffi.Pointer _email, + ffi.Pointer _password, ) { - return __ltoa(_Value, _Buffer, _Radix); + return _deleteAccount(_email, _password); } - late final __ltoaPtr = + late final _deleteAccountPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Long, ffi.Pointer, - ffi.Int, + ffi.Pointer, ) > - >('_ltoa'); - late final __ltoa = __ltoaPtr + >('deleteAccount'); + late final _deleteAccount = _deleteAccountPtr .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) >(); - int _ultoa_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __ultoa_s(_Value, _Buffer, _BufferCount, _Radix); - } - - late final __ultoa_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.UnsignedLong, - ffi.Pointer, - ffi.Size, - ffi.Int, - ) - > - >('_ultoa_s'); - late final __ultoa_s = __ultoa_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _ultoa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, + ffi.Pointer activationCode( + ffi.Pointer _email, + ffi.Pointer _resellerCode, ) { - return __ultoa(_Value, _Buffer, _Radix); + return _activationCode(_email, _resellerCode); } - late final __ultoaPtr = + late final _activationCodePtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.UnsignedLong, ffi.Pointer, - ffi.Int, + ffi.Pointer, ) > - >('_ultoa'); - late final __ultoa = __ultoaPtr + >('activationCode'); + late final _activationCode = _activationCodePtr .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) >(); - int _i64toa_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __i64toa_s(_Value, _Buffer, _BufferCount, _Radix); + void freeCString(ffi.Pointer cstr) { + return _freeCString(cstr); } - late final __i64toa_sPtr = + late final _freeCStringPtr = + _lookup)>>( + 'freeCString', + ); + late final _freeCString = _freeCStringPtr + .asFunction)>(); + + ffi.Pointer patchSettings(ffi.Pointer patchJSON) { + return _patchSettings(patchJSON); + } + + late final _patchSettingsPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.LongLong, - ffi.Pointer, - ffi.Size, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_i64toa_s'); - late final __i64toa_s = __i64toa_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _i64toa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __i64toa(_Value, _Buffer, _Radix); + >('patchSettings'); + late final _patchSettings = _patchSettingsPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer getSettings() { + return _getSettings(); + } + + late final _getSettingsPtr = + _lookup Function()>>( + 'getSettings', + ); + late final _getSettings = _getSettingsPtr + .asFunction Function()>(); + + ffi.Pointer patchEnvVars(ffi.Pointer patchJSON) { + return _patchEnvVars(patchJSON); } - late final __i64toaPtr = + late final _patchEnvVarsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.LongLong, - ffi.Pointer, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_i64toa'); - late final __i64toa = __i64toaPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); + >('patchEnvVars'); + late final _patchEnvVars = _patchEnvVarsPtr + .asFunction Function(ffi.Pointer)>(); - int _ui64toa_s( - int _Value, - ffi.Pointer _Buffer, - int _BufferCount, - int _Radix, - ) { - return __ui64toa_s(_Value, _Buffer, _BufferCount, _Radix); + ffi.Pointer getEnvVars() { + return _getEnvVars(); + } + + late final _getEnvVarsPtr = + _lookup Function()>>( + 'getEnvVars', + ); + late final _getEnvVars = _getEnvVarsPtr + .asFunction Function()>(); + + ffi.Pointer runURLTests() { + return _runURLTests(); + } + + late final _runURLTestsPtr = + _lookup Function()>>( + 'runURLTests', + ); + late final _runURLTests = _runURLTestsPtr + .asFunction Function()>(); + + ffi.Pointer updateConfig() { + return _updateConfig(); + } + + late final _updateConfigPtr = + _lookup Function()>>( + 'updateConfig', + ); + late final _updateConfig = _updateConfigPtr + .asFunction Function()>(); + + ffi.Pointer digitalOceanPrivateServer() { + return _digitalOceanPrivateServer(); + } + + late final _digitalOceanPrivateServerPtr = + _lookup Function()>>( + 'digitalOceanPrivateServer', + ); + late final _digitalOceanPrivateServer = _digitalOceanPrivateServerPtr + .asFunction Function()>(); + + ffi.Pointer googleCloudPrivateServer() { + return _googleCloudPrivateServer(); } - late final __ui64toa_sPtr = + late final _googleCloudPrivateServerPtr = + _lookup Function()>>( + 'googleCloudPrivateServer', + ); + late final _googleCloudPrivateServer = _googleCloudPrivateServerPtr + .asFunction Function()>(); + + ffi.Pointer selectAccount(ffi.Pointer _account) { + return _selectAccount(_account); + } + + late final _selectAccountPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.UnsignedLongLong, - ffi.Pointer, - ffi.Size, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_ui64toa_s'); - late final __ui64toa_s = __ui64toa_sPtr - .asFunction, int, int)>(); - - ffi.Pointer _ui64toa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return __ui64toa(_Value, _Buffer, _Radix); + >('selectAccount'); + late final _selectAccount = _selectAccountPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer selectProject(ffi.Pointer _project) { + return _selectProject(_project); } - late final __ui64toaPtr = + late final _selectProjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedLongLong, - ffi.Pointer, - ffi.Int, - ) + ffi.Pointer Function(ffi.Pointer) > - >('_ui64toa'); - late final __ui64toa = __ui64toaPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); + >('selectProject'); + late final _selectProject = _selectProjectPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer validateSession() { + return _validateSession(); + } - int _ecvt_s( - ffi.Pointer _Buffer, - int _BufferCount, - double _Value, - int _DigitCount, - ffi.Pointer _PtDec, - ffi.Pointer _PtSign, + late final _validateSessionPtr = + _lookup Function()>>( + 'validateSession', + ); + late final _validateSession = _validateSessionPtr + .asFunction Function()>(); + + ffi.Pointer startDepolyment( + ffi.Pointer _selectedLocation, + ffi.Pointer _serverName, ) { - return __ecvt_s( - _Buffer, - _BufferCount, - _Value, - _DigitCount, - _PtDec, - _PtSign, - ); + return _startDepolyment(_selectedLocation, _serverName); } - late final __ecvt_sPtr = + late final _startDepolymentPtr = _lookup< ffi.NativeFunction< - errno_t Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Size, - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer, ) > - >('_ecvt_s'); - late final __ecvt_s = __ecvt_sPtr + >('startDepolyment'); + late final _startDepolyment = _startDepolymentPtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - int, - double, - int, - ffi.Pointer, - ffi.Pointer, ) >(); - ffi.Pointer _ecvt( - double _Value, - int _DigitCount, - ffi.Pointer _PtDec, - ffi.Pointer _PtSign, + ffi.Pointer cancelDepolyment() { + return _cancelDepolyment(); + } + + late final _cancelDepolymentPtr = + _lookup Function()>>( + 'cancelDepolyment', + ); + late final _cancelDepolyment = _cancelDepolymentPtr + .asFunction Function()>(); + + ffi.Pointer addServerManagerInstance( + ffi.Pointer _ip, + ffi.Pointer _port, + ffi.Pointer _accessToken, + ffi.Pointer _tag, ) { - return __ecvt(_Value, _DigitCount, _PtDec, _PtSign); + return _addServerManagerInstance(_ip, _port, _accessToken, _tag); } - late final __ecvtPtr = + late final _addServerManagerInstancePtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > - >('_ecvt'); - late final __ecvt = __ecvtPtr + >('addServerManagerInstance'); + late final _addServerManagerInstance = _addServerManagerInstancePtr .asFunction< ffi.Pointer Function( - double, - int, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(); - int _fcvt_s( - ffi.Pointer _Buffer, - int _BufferCount, - double _Value, - int _FractionalDigitCount, - ffi.Pointer _PtDec, - ffi.Pointer _PtSign, + ffi.Pointer inviteToServerManagerInstance( + ffi.Pointer _ip, + ffi.Pointer _port, + ffi.Pointer _accessToken, + ffi.Pointer _inviteName, ) { - return __fcvt_s( - _Buffer, - _BufferCount, - _Value, - _FractionalDigitCount, - _PtDec, - _PtSign, + return _inviteToServerManagerInstance( + _ip, + _port, + _accessToken, + _inviteName, ); } - late final __fcvt_sPtr = + late final _inviteToServerManagerInstancePtr = _lookup< ffi.NativeFunction< - errno_t Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Size, - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer, ) > - >('_fcvt_s'); - late final __fcvt_s = __fcvt_sPtr + >('inviteToServerManagerInstance'); + late final _inviteToServerManagerInstance = _inviteToServerManagerInstancePtr .asFunction< - int Function( + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - int, - double, - int, - ffi.Pointer, - ffi.Pointer, ) >(); - ffi.Pointer _fcvt( - double _Value, - int _FractionalDigitCount, - ffi.Pointer _PtDec, - ffi.Pointer _PtSign, + ffi.Pointer revokeServerManagerInvite( + ffi.Pointer _ip, + ffi.Pointer _port, + ffi.Pointer _accessToken, + ffi.Pointer _inviteName, ) { - return __fcvt(_Value, _FractionalDigitCount, _PtDec, _PtSign); + return _revokeServerManagerInvite(_ip, _port, _accessToken, _inviteName); } - late final __fcvtPtr = + late final _revokeServerManagerInvitePtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > - >('_fcvt'); - late final __fcvt = __fcvtPtr + >('revokeServerManagerInvite'); + late final _revokeServerManagerInvite = _revokeServerManagerInvitePtr .asFunction< ffi.Pointer Function( - double, - int, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(); - int _gcvt_s( - ffi.Pointer _Buffer, - int _BufferCount, - double _Value, - int _DigitCount, + ffi.Pointer addServerBasedOnURLs( + ffi.Pointer _urls, + int _skipCertVerification, ) { - return __gcvt_s(_Buffer, _BufferCount, _Value, _DigitCount); + return _addServerBasedOnURLs(_urls, _skipCertVerification); } - late final __gcvt_sPtr = + late final _addServerBasedOnURLsPtr = _lookup< ffi.NativeFunction< - errno_t Function(ffi.Pointer, ffi.Size, ffi.Double, ffi.Int) + ffi.Pointer Function(ffi.Pointer, ffi.Int) > - >('_gcvt_s'); - late final __gcvt_s = __gcvt_sPtr - .asFunction, int, double, int)>(); - - ffi.Pointer _gcvt( - double _Value, - int _DigitCount, - ffi.Pointer _Buffer, - ) { - return __gcvt(_Value, _DigitCount, _Buffer); + >('addServerBasedOnURLs'); + late final _addServerBasedOnURLs = _addServerBasedOnURLsPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer setBlockAdsEnabled(int enabled) { + return _setBlockAdsEnabled(enabled); } - late final __gcvtPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, - ffi.Int, - ffi.Pointer, - ) - > - >('_gcvt'); - late final __gcvt = __gcvtPtr - .asFunction< - ffi.Pointer Function(double, int, ffi.Pointer) - >(); + late final _setBlockAdsEnabledPtr = + _lookup Function(ffi.Int)>>( + 'setBlockAdsEnabled', + ); + late final _setBlockAdsEnabled = _setBlockAdsEnabledPtr + .asFunction Function(int)>(); - int ___mb_cur_max_func() { - return ____mb_cur_max_func(); + int isBlockAdsEnabled() { + return _isBlockAdsEnabled(); } - late final ____mb_cur_max_funcPtr = - _lookup>('___mb_cur_max_func'); - late final ____mb_cur_max_func = ____mb_cur_max_funcPtr + late final _isBlockAdsEnabledPtr = + _lookup>('isBlockAdsEnabled'); + late final _isBlockAdsEnabled = _isBlockAdsEnabledPtr .asFunction(); - int ___mb_cur_max_l_func(_locale_t _Locale) { - return ____mb_cur_max_l_func(_Locale); + ffi.Pointer setSmartRoutingEnabled(int enabled) { + return _setSmartRoutingEnabled(enabled); } - late final ____mb_cur_max_l_funcPtr = - _lookup>( - '___mb_cur_max_l_func', + late final _setSmartRoutingEnabledPtr = + _lookup Function(ffi.Int)>>( + 'setSmartRoutingEnabled', ); - late final ____mb_cur_max_l_func = ____mb_cur_max_l_funcPtr - .asFunction(); + late final _setSmartRoutingEnabled = _setSmartRoutingEnabledPtr + .asFunction Function(int)>(); - int mblen(ffi.Pointer _Ch, int _MaxCount) { - return _mblen(_Ch, _MaxCount); + int isSmartRoutingEnabled() { + return _isSmartRoutingEnabled(); } - late final _mblenPtr = - _lookup< - ffi.NativeFunction, ffi.Size)> - >('mblen'); - late final _mblen = _mblenPtr - .asFunction, int)>(); + late final _isSmartRoutingEnabledPtr = + _lookup>('isSmartRoutingEnabled'); + late final _isSmartRoutingEnabled = _isSmartRoutingEnabledPtr + .asFunction(); - int _mblen_l(ffi.Pointer _Ch, int _MaxCount, _locale_t _Locale) { - return __mblen_l(_Ch, _MaxCount, _Locale); + ffi.Pointer setPeerProxyEnabled(int enabled) { + return _setPeerProxyEnabled(enabled); } - late final __mblen_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, _locale_t) - > - >('_mblen_l'); - late final __mblen_l = __mblen_lPtr - .asFunction, int, _locale_t)>(); + late final _setPeerProxyEnabledPtr = + _lookup Function(ffi.Int)>>( + 'setPeerProxyEnabled', + ); + late final _setPeerProxyEnabled = _setPeerProxyEnabledPtr + .asFunction Function(int)>(); + + int isPeerProxyEnabled() { + return _isPeerProxyEnabled(); + } + + late final _isPeerProxyEnabledPtr = + _lookup>('isPeerProxyEnabled'); + late final _isPeerProxyEnabled = _isPeerProxyEnabledPtr + .asFunction(); - int _mbstrlen(ffi.Pointer _String) { - return __mbstrlen(_String); + ffi.Pointer setPeerManualPort(int port) { + return _setPeerManualPort(port); } - late final __mbstrlenPtr = - _lookup)>>( - '_mbstrlen', + late final _setPeerManualPortPtr = + _lookup Function(ffi.Int)>>( + 'setPeerManualPort', ); - late final __mbstrlen = __mbstrlenPtr - .asFunction)>(); + late final _setPeerManualPort = _setPeerManualPortPtr + .asFunction Function(int)>(); - int _mbstrlen_l(ffi.Pointer _String, _locale_t _Locale) { - return __mbstrlen_l(_String, _Locale); + int getPeerManualPort() { + return _getPeerManualPort(); } - late final __mbstrlen_lPtr = - _lookup< - ffi.NativeFunction, _locale_t)> - >('_mbstrlen_l'); - late final __mbstrlen_l = __mbstrlen_lPtr - .asFunction, _locale_t)>(); + late final _getPeerManualPortPtr = + _lookup>('getPeerManualPort'); + late final _getPeerManualPort = _getPeerManualPortPtr + .asFunction(); - int _mbstrnlen(ffi.Pointer _String, int _MaxCount) { - return __mbstrnlen(_String, _MaxCount); + int probeUPnP() { + return _probeUPnP(); } - late final __mbstrnlenPtr = - _lookup< - ffi.NativeFunction, ffi.Size)> - >('_mbstrnlen'); - late final __mbstrnlen = __mbstrnlenPtr - .asFunction, int)>(); + late final _probeUPnPPtr = _lookup>( + 'probeUPnP', + ); + late final _probeUPnP = _probeUPnPPtr.asFunction(); - int _mbstrnlen_l( - ffi.Pointer _String, - int _MaxCount, - _locale_t _Locale, - ) { - return __mbstrnlen_l(_String, _MaxCount, _Locale); + ffi.Pointer setUnboundedEnabled(int enabled) { + return _setUnboundedEnabled(enabled); } - late final __mbstrnlen_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size, _locale_t) - > - >('_mbstrnlen_l'); - late final __mbstrnlen_l = __mbstrnlen_lPtr - .asFunction, int, _locale_t)>(); - - int mbtowc( - ffi.Pointer _DstCh, - ffi.Pointer _SrcCh, - int _SrcSizeInBytes, - ) { - return _mbtowc(_DstCh, _SrcCh, _SrcSizeInBytes); + late final _setUnboundedEnabledPtr = + _lookup Function(ffi.Int)>>( + 'setUnboundedEnabled', + ); + late final _setUnboundedEnabled = _setUnboundedEnabledPtr + .asFunction Function(int)>(); + + int isUnboundedEnabled() { + return _isUnboundedEnabled(); } - late final _mbtowcPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ) - > - >('mbtowc'); - late final _mbtowc = _mbtowcPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); + late final _isUnboundedEnabledPtr = + _lookup>('isUnboundedEnabled'); + late final _isUnboundedEnabled = _isUnboundedEnabledPtr + .asFunction(); - int _mbtowc_l( - ffi.Pointer _DstCh, - ffi.Pointer _SrcCh, - int _SrcSizeInBytes, - _locale_t _Locale, - ) { - return __mbtowc_l(_DstCh, _SrcCh, _SrcSizeInBytes, _Locale); + ffi.Pointer getSplitTunnelState() { + return _getSplitTunnelState(); } - late final __mbtowc_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - _locale_t, - ) - > - >('_mbtowc_l'); - late final __mbtowc_l = __mbtowc_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - _locale_t, - ) - >(); + late final _getSplitTunnelStatePtr = + _lookup Function()>>( + 'getSplitTunnelState', + ); + late final _getSplitTunnelState = _getSplitTunnelStatePtr + .asFunction Function()>(); - int mbstowcs_s( - ffi.Pointer _PtNumOfCharConverted, - ffi.Pointer _DstBuf, - int _SizeInWords, - ffi.Pointer _SrcBuf, - int _MaxCount, - ) { - return _mbstowcs_s( - _PtNumOfCharConverted, - _DstBuf, - _SizeInWords, - _SrcBuf, - _MaxCount, - ); + ffi.Pointer getSplitTunnelItems(ffi.Pointer filterTypeC) { + return _getSplitTunnelItems(filterTypeC); } - late final _mbstowcs_sPtr = + late final _getSplitTunnelItemsPtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ) + ffi.Pointer Function(ffi.Pointer) > - >('mbstowcs_s'); - late final _mbstowcs_s = _mbstowcs_sPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - ) - >(); + >('getSplitTunnelItems'); + late final _getSplitTunnelItems = _getSplitTunnelItemsPtr + .asFunction Function(ffi.Pointer)>(); - int mbstowcs( - ffi.Pointer _Dest, - ffi.Pointer _Source, - int _MaxCount, - ) { - return _mbstowcs(_Dest, _Source, _MaxCount); + ffi.Pointer deletePrivateServerByName(ffi.Pointer _name) { + return _deletePrivateServerByName(_name); } - late final _mbstowcsPtr = + late final _deletePrivateServerByNamePtr = _lookup< ffi.NativeFunction< - ffi.Size Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ) + ffi.Pointer Function(ffi.Pointer) > - >('mbstowcs'); - late final _mbstowcs = _mbstowcsPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); + >('deletePrivateServerByName'); + late final _deletePrivateServerByName = _deletePrivateServerByNamePtr + .asFunction Function(ffi.Pointer)>(); - int _mbstowcs_s_l( - ffi.Pointer _PtNumOfCharConverted, - ffi.Pointer _DstBuf, - int _SizeInWords, - ffi.Pointer _SrcBuf, - int _MaxCount, - _locale_t _Locale, + ffi.Pointer updatePrivateServerName( + ffi.Pointer _oldName, + ffi.Pointer _newName, ) { - return __mbstowcs_s_l( - _PtNumOfCharConverted, - _DstBuf, - _SizeInWords, - _SrcBuf, - _MaxCount, - _Locale, - ); + return _updatePrivateServerName(_oldName, _newName); } - late final __mbstowcs_s_lPtr = + late final _updatePrivateServerNamePtr = _lookup< ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Size, - _locale_t, ) > - >('_mbstowcs_s_l'); - late final __mbstowcs_s_l = __mbstowcs_s_lPtr + >('updatePrivateServerName'); + late final _updatePrivateServerName = _updatePrivateServerNamePtr .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - int, - _locale_t, ) >(); - int _mbstowcs_l( - ffi.Pointer _Dest, - ffi.Pointer _Source, - int _MaxCount, - _locale_t _Locale, - ) { - return __mbstowcs_l(_Dest, _Source, _MaxCount, _Locale); + ffi.Pointer getEnabledApps() { + return _getEnabledApps(); } - late final __mbstowcs_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Size Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - _locale_t, - ) - > - >('_mbstowcs_l'); - late final __mbstowcs_l = __mbstowcs_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - _locale_t, - ) - >(); + late final _getEnabledAppsPtr = + _lookup Function()>>( + 'getEnabledApps', + ); + late final _getEnabledApps = _getEnabledAppsPtr + .asFunction Function()>(); +} + +typedef __int8_t = ffi.SignedChar; +typedef Dart__int8_t = int; +typedef __uint8_t = ffi.UnsignedChar; +typedef Dart__uint8_t = int; +typedef __int16_t = ffi.Short; +typedef Dart__int16_t = int; +typedef __uint16_t = ffi.UnsignedShort; +typedef Dart__uint16_t = int; +typedef __int32_t = ffi.Int; +typedef Dart__int32_t = int; +typedef __uint32_t = ffi.UnsignedInt; +typedef Dart__uint32_t = int; +typedef __int64_t = ffi.LongLong; +typedef Dart__int64_t = int; +typedef __uint64_t = ffi.UnsignedLongLong; +typedef Dart__uint64_t = int; +typedef __darwin_intptr_t = ffi.Long; +typedef Dart__darwin_intptr_t = int; +typedef __darwin_natural_t = ffi.UnsignedInt; +typedef Dart__darwin_natural_t = int; +typedef __darwin_ct_rune_t = ffi.Int; +typedef Dart__darwin_ct_rune_t = int; + +final class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; + + @ffi.LongLong() + external int _mbstateL; +} + +typedef __darwin_mbstate_t = __mbstate_t; +typedef __darwin_ptrdiff_t = ffi.Long; +typedef Dart__darwin_ptrdiff_t = int; +typedef __darwin_size_t = ffi.UnsignedLong; +typedef Dart__darwin_size_t = int; +typedef __builtin_va_list = ffi.Pointer; +typedef __darwin_va_list = __builtin_va_list; +typedef __darwin_wchar_t = ffi.Int; +typedef Dart__darwin_wchar_t = int; +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wint_t = ffi.Int; +typedef Dart__darwin_wint_t = int; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef Dart__darwin_clock_t = int; +typedef __darwin_socklen_t = __uint32_t; +typedef __darwin_ssize_t = ffi.Long; +typedef Dart__darwin_ssize_t = int; +typedef __darwin_time_t = ffi.Long; +typedef Dart__darwin_time_t = int; +typedef __darwin_blkcnt_t = __int64_t; +typedef __darwin_blksize_t = __int32_t; +typedef __darwin_dev_t = __int32_t; +typedef __darwin_fsblkcnt_t = ffi.UnsignedInt; +typedef Dart__darwin_fsblkcnt_t = int; +typedef __darwin_fsfilcnt_t = ffi.UnsignedInt; +typedef Dart__darwin_fsfilcnt_t = int; +typedef __darwin_gid_t = __uint32_t; +typedef __darwin_id_t = __uint32_t; +typedef __darwin_ino64_t = __uint64_t; +typedef __darwin_ino_t = __darwin_ino64_t; +typedef __darwin_mach_port_name_t = __darwin_natural_t; +typedef __darwin_mach_port_t = __darwin_mach_port_name_t; +typedef __darwin_mode_t = __uint16_t; +typedef __darwin_off_t = __int64_t; +typedef __darwin_pid_t = __int32_t; +typedef __darwin_sigset_t = __uint32_t; +typedef __darwin_suseconds_t = __int32_t; +typedef __darwin_uid_t = __uint32_t; +typedef __darwin_useconds_t = __uint32_t; + +final class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi.Pointer< + ffi.NativeFunction)> + > + __routine; + + external ffi.Pointer __arg; + + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} + +final class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; + + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} + +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; +typedef __darwin_pthread_cond_t = _opaque_pthread_cond_t; +typedef __darwin_pthread_condattr_t = _opaque_pthread_condattr_t; +typedef __darwin_pthread_key_t = ffi.UnsignedLong; +typedef Dart__darwin_pthread_key_t = int; +typedef __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; +typedef __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t; +typedef __darwin_pthread_once_t = _opaque_pthread_once_t; +typedef __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t; +typedef __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef __darwin_nl_item = ffi.Int; +typedef Dart__darwin_nl_item = int; +typedef __darwin_wctrans_t = ffi.Int; +typedef Dart__darwin_wctrans_t = int; +typedef __darwin_wctype_t = __uint32_t; +typedef u_int8_t = ffi.UnsignedChar; +typedef Dartu_int8_t = int; +typedef u_int16_t = ffi.UnsignedShort; +typedef Dartu_int16_t = int; +typedef u_int32_t = ffi.UnsignedInt; +typedef Dartu_int32_t = int; +typedef u_int64_t = ffi.UnsignedLongLong; +typedef Dartu_int64_t = int; +typedef register_t = ffi.Int64; +typedef Dartregister_t = int; +typedef user_addr_t = u_int64_t; +typedef user_size_t = u_int64_t; +typedef user_ssize_t = ffi.Int64; +typedef Dartuser_ssize_t = int; +typedef user_long_t = ffi.Int64; +typedef Dartuser_long_t = int; +typedef user_ulong_t = u_int64_t; +typedef user_time_t = ffi.Int64; +typedef Dartuser_time_t = int; +typedef user_off_t = ffi.Int64; +typedef Dartuser_off_t = int; +typedef syscall_arg_t = u_int64_t; +typedef ptrdiff_t = __darwin_ptrdiff_t; +typedef rsize_t = __darwin_size_t; +typedef wint_t = __darwin_wint_t; + +final class _GoString_ extends ffi.Struct { + external ffi.Pointer p; + + @ptrdiff_t() + external int n; +} + +enum idtype_t { + P_ALL(0), + P_PID(1), + P_PGID(2); + + final int value; + const idtype_t(this.value); + + static idtype_t fromValue(int value) => switch (value) { + 0 => P_ALL, + 1 => P_PID, + 2 => P_PGID, + _ => throw ArgumentError('Unknown value for idtype_t: $value'), + }; +} + +typedef pid_t = __darwin_pid_t; +typedef id_t = __darwin_id_t; +typedef sig_atomic_t = ffi.Int; +typedef Dartsig_atomic_t = int; + +final class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; + + @__uint32_t() + external int __fsr; + + @__uint32_t() + external int __far; +} + +final class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; + + @__uint32_t() + external int __esr; + + @__uint32_t() + external int __exception; +} + +final class __darwin_arm_exception_state64_v2 extends ffi.Struct { + @__uint64_t() + external int __far; + + @__uint64_t() + external int __esr; +} + +final class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __sp; + + @__uint32_t() + external int __lr; + + @__uint32_t() + external int __pc; + + @__uint32_t() + external int __cpsr; +} + +final class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; + + @__uint64_t() + external int __fp; + + @__uint64_t() + external int __lr; + + @__uint64_t() + external int __sp; + + @__uint64_t() + external int __pc; + + @__uint32_t() + external int __cpsr; + + @__uint32_t() + external int __pad; +} + +final class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __fpscr; +} + +final class __darwin_arm_neon_state64 extends ffi.Opaque {} + +final class __darwin_arm_neon_state extends ffi.Opaque {} + +final class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} + +final class __darwin_arm_sme_state extends ffi.Struct { + @__uint64_t() + external int __svcr; + + @__uint64_t() + external int __tpidr2_el0; + + @__uint16_t() + external int __svl_b; +} + +final class __darwin_arm_sve_z_state extends ffi.Struct { + @ffi.Array.multi([16, 256]) + external ffi.Array> __z; +} + +final class __darwin_arm_sve_p_state extends ffi.Struct { + @ffi.Array.multi([16, 32]) + external ffi.Array> __p; +} + +final class __darwin_arm_sme_za_state extends ffi.Struct { + @ffi.Array.multi([4096]) + external ffi.Array __za; +} + +final class __darwin_arm_sme2_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array __zt0; +} + +final class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} + +final class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; + + @__uint64_t() + external int __mdscr_el1; +} + +final class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; + + @__uint64_t() + external int __mdscr_el1; +} + +final class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} + +final class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; + + external __darwin_arm_thread_state __ss; + + external __darwin_arm_vfp_state __fs; +} + +final class __darwin_mcontext64 extends ffi.Opaque {} + +typedef mcontext_t = ffi.Pointer<__darwin_mcontext64>; +typedef pthread_attr_t = __darwin_pthread_attr_t; + +final class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; + + @__darwin_size_t() + external int ss_size; + + @ffi.Int() + external int ss_flags; +} + +typedef stack_t = __darwin_sigaltstack; + +final class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; + + @__darwin_sigset_t() + external int uc_sigmask; + + external __darwin_sigaltstack uc_stack; + + external ffi.Pointer<__darwin_ucontext> uc_link; + + @__darwin_size_t() + external int uc_mcsize; + + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} + +typedef ucontext_t = __darwin_ucontext; +typedef sigset_t = __darwin_sigset_t; +typedef uid_t = __darwin_uid_t; + +final class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; + + external ffi.Pointer sival_ptr; +} + +final class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; + + @ffi.Int() + external int sigev_signo; + + external sigval sigev_value; + + external ffi.Pointer> + sigev_notify_function; + + external ffi.Pointer sigev_notify_attributes; +} + +final class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; + + @ffi.Int() + external int si_errno; + + @ffi.Int() + external int si_code; + + @pid_t() + external int si_pid; + + @uid_t() + external int si_uid; + + @ffi.Int() + external int si_status; + + external ffi.Pointer si_addr; + + external sigval si_value; + + @ffi.Long() + external int si_band; + + @ffi.Array.multi([7]) + external ffi.Array __pad; +} + +typedef siginfo_t = __siginfo; + +final class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer) + > + > + __sa_sigaction; +} + +final class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u$1; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + > + sa_tramp; + + @sigset_t() + external int sa_mask; + + @ffi.Int() + external int sa_flags; +} + +final class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u$1; + + @sigset_t() + external int sa_mask; + + @ffi.Int() + external int sa_flags; +} + +typedef sig_tFunction = ffi.Void Function(ffi.Int); +typedef Dartsig_tFunction = void Function(int); +typedef sig_t = ffi.Pointer>; + +final class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; + + @ffi.Int() + external int sv_mask; + + @ffi.Int() + external int sv_flags; +} + +final class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; + + @ffi.Int() + external int ss_onstack; +} + +typedef int_least8_t = ffi.Int8; +typedef Dartint_least8_t = int; +typedef int_least16_t = ffi.Int16; +typedef Dartint_least16_t = int; +typedef int_least32_t = ffi.Int32; +typedef Dartint_least32_t = int; +typedef int_least64_t = ffi.Int64; +typedef Dartint_least64_t = int; +typedef uint_least8_t = ffi.Uint8; +typedef Dartuint_least8_t = int; +typedef uint_least16_t = ffi.Uint16; +typedef Dartuint_least16_t = int; +typedef uint_least32_t = ffi.Uint32; +typedef Dartuint_least32_t = int; +typedef uint_least64_t = ffi.Uint64; +typedef Dartuint_least64_t = int; +typedef int_fast8_t = ffi.Int8; +typedef Dartint_fast8_t = int; +typedef int_fast16_t = ffi.Int16; +typedef Dartint_fast16_t = int; +typedef int_fast32_t = ffi.Int32; +typedef Dartint_fast32_t = int; +typedef int_fast64_t = ffi.Int64; +typedef Dartint_fast64_t = int; +typedef uint_fast8_t = ffi.Uint8; +typedef Dartuint_fast8_t = int; +typedef uint_fast16_t = ffi.Uint16; +typedef Dartuint_fast16_t = int; +typedef uint_fast32_t = ffi.Uint32; +typedef Dartuint_fast32_t = int; +typedef uint_fast64_t = ffi.Uint64; +typedef Dartuint_fast64_t = int; +typedef intmax_t = ffi.Long; +typedef Dartintmax_t = int; +typedef uintmax_t = ffi.UnsignedLong; +typedef Dartuintmax_t = int; + +final class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; + + @__darwin_suseconds_t() + external int tv_usec; +} + +typedef rlim_t = __uint64_t; + +final class rusage extends ffi.Struct { + external timeval ru_utime; + + external timeval ru_stime; + + @ffi.Long() + external int ru_maxrss; + + @ffi.Long() + external int ru_ixrss; + + @ffi.Long() + external int ru_idrss; + + @ffi.Long() + external int ru_isrss; + + @ffi.Long() + external int ru_minflt; + + @ffi.Long() + external int ru_majflt; + + @ffi.Long() + external int ru_nswap; + + @ffi.Long() + external int ru_inblock; + + @ffi.Long() + external int ru_oublock; + + @ffi.Long() + external int ru_msgsnd; + + @ffi.Long() + external int ru_msgrcv; + + @ffi.Long() + external int ru_nsignals; + + @ffi.Long() + external int ru_nvcsw; + + @ffi.Long() + external int ru_nivcsw; +} + +typedef rusage_info_t = ffi.Pointer; + +final class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; +} + +final class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; +} + +final class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; +} + +final class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; +} + +final class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; +} + +final class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; + + @ffi.Uint64() + external int ri_flags; +} + +final class rusage_info_v6 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; - int wctomb(ffi.Pointer _MbCh, int _WCh) { - return _wctomb(_MbCh, _WCh); - } + @ffi.Uint64() + external int ri_wired_size; - late final _wctombPtr = - _lookup< - ffi.NativeFunction, ffi.WChar)> - >('wctomb'); - late final _wctomb = _wctombPtr - .asFunction, int)>(); + @ffi.Uint64() + external int ri_resident_size; - int _wctomb_l(ffi.Pointer _MbCh, int _WCh, _locale_t _Locale) { - return __wctomb_l(_MbCh, _WCh, _Locale); - } + @ffi.Uint64() + external int ri_phys_footprint; - late final __wctomb_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.WChar, _locale_t) - > - >('_wctomb_l'); - late final __wctomb_l = __wctomb_lPtr - .asFunction, int, _locale_t)>(); - - int wctomb_s( - ffi.Pointer _SizeConverted, - ffi.Pointer _MbCh, - int _SizeInBytes, - int _WCh, - ) { - return _wctomb_s(_SizeConverted, _MbCh, _SizeInBytes, _WCh); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - late final _wctomb_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - rsize_t, - ffi.WChar, - ) - > - >('wctomb_s'); - late final _wctomb_s = _wctomb_sPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int) - >(); + @ffi.Uint64() + external int ri_proc_exit_abstime; - int _wctomb_s_l( - ffi.Pointer _SizeConverted, - ffi.Pointer _MbCh, - int _SizeInBytes, - int _WCh, - _locale_t _Locale, - ) { - return __wctomb_s_l(_SizeConverted, _MbCh, _SizeInBytes, _WCh, _Locale); - } + @ffi.Uint64() + external int ri_child_user_time; - late final __wctomb_s_lPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.WChar, - _locale_t, - ) - > - >('_wctomb_s_l'); - late final __wctomb_s_l = __wctomb_s_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - _locale_t, - ) - >(); + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; + + @ffi.Uint64() + external int ri_flags; + + @ffi.Uint64() + external int ri_user_ptime; + + @ffi.Uint64() + external int ri_system_ptime; + + @ffi.Uint64() + external int ri_pinstructions; + + @ffi.Uint64() + external int ri_pcycles; + + @ffi.Uint64() + external int ri_energy_nj; + + @ffi.Uint64() + external int ri_penergy_nj; + + @ffi.Uint64() + external int ri_secure_time_in_system; + + @ffi.Uint64() + external int ri_secure_ptime_in_system; + + @ffi.Uint64() + external int ri_neural_footprint; + + @ffi.Uint64() + external int ri_lifetime_max_neural_footprint; + + @ffi.Uint64() + external int ri_interval_max_neural_footprint; + + @ffi.Array.multi([9]) + external ffi.Array ri_reserved; +} + +typedef rusage_info_current = rusage_info_v6; + +final class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; + + @rlim_t() + external int rlim_max; +} + +final class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; + + @ffi.Int32() + external int wm_rate; +} + +final class wait$1 extends ffi.Opaque {} + +typedef ct_rune_t = __darwin_ct_rune_t; +typedef rune_t = __darwin_rune_t; + +final class div_t extends ffi.Struct { + @ffi.Int() + external int quot; + + @ffi.Int() + external int rem; +} + +final class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; + + @ffi.Long() + external int rem; +} + +final class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; + + @ffi.LongLong() + external int rem; +} + +typedef malloc_type_id_t = ffi.UnsignedLongLong; +typedef Dartmalloc_type_id_t = int; + +final class _malloc_zone_t extends ffi.Opaque {} + +typedef malloc_zone_t = _malloc_zone_t; +typedef dev_t = __darwin_dev_t; +typedef mode_t = __darwin_mode_t; +typedef GoInt8 = ffi.SignedChar; +typedef DartGoInt8 = int; +typedef GoUint8 = ffi.UnsignedChar; +typedef DartGoUint8 = int; +typedef GoInt16 = ffi.Short; +typedef DartGoInt16 = int; +typedef GoUint16 = ffi.UnsignedShort; +typedef DartGoUint16 = int; +typedef GoInt32 = ffi.Int; +typedef DartGoInt32 = int; +typedef GoUint32 = ffi.UnsignedInt; +typedef DartGoUint32 = int; +typedef GoInt64 = ffi.LongLong; +typedef DartGoInt64 = int; +typedef GoUint64 = ffi.UnsignedLongLong; +typedef DartGoUint64 = int; +typedef GoInt = GoInt64; +typedef GoUint = GoUint64; +typedef GoUintptr = ffi.Size; +typedef DartGoUintptr = int; +typedef GoFloat32 = ffi.Float; +typedef DartGoFloat32 = double; +typedef GoFloat64 = ffi.Double; +typedef DartGoFloat64 = double; +typedef GoString = _GoString_; +typedef GoMap = ffi.Pointer; +typedef GoChan = ffi.Pointer; + +final class GoInterface extends ffi.Struct { + external ffi.Pointer t; + + external ffi.Pointer v; +} + +final class GoSlice extends ffi.Struct { + external ffi.Pointer data; + + @GoInt() + external int len; + + @GoInt() + external int cap; +} + +const int __has_safe_buffers = 1; + +const int __DARWIN_ONLY_64_BIT_INO_T = 1; + +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; + +const int __DARWIN_ONLY_VERS_1050 = 1; + +const int __DARWIN_UNIX03 = 1; + +const int __DARWIN_64_BIT_INO_T = 1; + +const int __DARWIN_VERS_1050 = 1; + +const int __DARWIN_NON_CANCELABLE = 0; + +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; + +const int __DARWIN_C_ANSI = 4096; + +const int __DARWIN_C_FULL = 900000; + +const int __DARWIN_C_LEVEL = 900000; + +const int __STDC_WANT_LIB_EXT1__ = 1; + +const int __DARWIN_NO_LONG_LONG = 0; + +const int _DARWIN_FEATURE_64_BIT_INODE = 1; + +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; + +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; + +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; + +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; + +const int __has_ptrcheck = 0; + +const int __has_bounds_safety_attributes = 0; + +const int __DARWIN_NULL = 0; + +const int __PTHREAD_SIZE__ = 8176; + +const int __PTHREAD_ATTR_SIZE__ = 56; + +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; + +const int __PTHREAD_MUTEX_SIZE__ = 56; + +const int __PTHREAD_CONDATTR_SIZE__ = 8; + +const int __PTHREAD_COND_SIZE__ = 40; + +const int __PTHREAD_ONCE_SIZE__ = 8; + +const int __PTHREAD_RWLOCK_SIZE__ = 192; + +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; + +const int __DARWIN_WCHAR_MAX = 2147483647; + +const int __DARWIN_WCHAR_MIN = -2147483648; + +const int __DARWIN_WEOF = -1; + +const int _FORTIFY_SOURCE = 2; + +const int NULL = 0; + +const int USER_ADDR_NULL = 0; + +const int __API_TO_BE_DEPRECATED = 100000; + +const int __API_TO_BE_DEPRECATED_MACOS = 100000; + +const int __API_TO_BE_DEPRECATED_MACOSAPPLICATIONEXTENSION = 100000; + +const int __API_TO_BE_DEPRECATED_IOS = 100000; + +const int __API_TO_BE_DEPRECATED_IOSAPPLICATIONEXTENSION = 100000; + +const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; + +const int __API_TO_BE_DEPRECATED_MACCATALYSTAPPLICATIONEXTENSION = 100000; + +const int __API_TO_BE_DEPRECATED_WATCHOS = 100000; + +const int __API_TO_BE_DEPRECATED_WATCHOSAPPLICATIONEXTENSION = 100000; + +const int __API_TO_BE_DEPRECATED_TVOS = 100000; + +const int __API_TO_BE_DEPRECATED_TVOSAPPLICATIONEXTENSION = 100000; + +const int __API_TO_BE_DEPRECATED_DRIVERKIT = 100000; + +const int __API_TO_BE_DEPRECATED_VISIONOS = 100000; + +const int __API_TO_BE_DEPRECATED_VISIONOSAPPLICATIONEXTENSION = 100000; + +const int __API_TO_BE_DEPRECATED_KERNELKIT = 100000; + +const int __MAC_10_0 = 1000; + +const int __MAC_10_1 = 1010; + +const int __MAC_10_2 = 1020; + +const int __MAC_10_3 = 1030; + +const int __MAC_10_4 = 1040; + +const int __MAC_10_5 = 1050; + +const int __MAC_10_6 = 1060; + +const int __MAC_10_7 = 1070; + +const int __MAC_10_8 = 1080; + +const int __MAC_10_9 = 1090; + +const int __MAC_10_10 = 101000; + +const int __MAC_10_10_2 = 101002; + +const int __MAC_10_10_3 = 101003; + +const int __MAC_10_11 = 101100; + +const int __MAC_10_11_2 = 101102; + +const int __MAC_10_11_3 = 101103; + +const int __MAC_10_11_4 = 101104; + +const int __MAC_10_12 = 101200; + +const int __MAC_10_12_1 = 101201; + +const int __MAC_10_12_2 = 101202; + +const int __MAC_10_12_4 = 101204; + +const int __MAC_10_13 = 101300; + +const int __MAC_10_13_1 = 101301; + +const int __MAC_10_13_2 = 101302; + +const int __MAC_10_13_4 = 101304; + +const int __MAC_10_14 = 101400; + +const int __MAC_10_14_1 = 101401; + +const int __MAC_10_14_4 = 101404; + +const int __MAC_10_14_5 = 101405; + +const int __MAC_10_14_6 = 101406; + +const int __MAC_10_15 = 101500; + +const int __MAC_10_15_1 = 101501; + +const int __MAC_10_15_4 = 101504; + +const int __MAC_10_16 = 101600; + +const int __MAC_11_0 = 110000; + +const int __MAC_11_1 = 110100; + +const int __MAC_11_3 = 110300; + +const int __MAC_11_4 = 110400; + +const int __MAC_11_5 = 110500; + +const int __MAC_11_6 = 110600; + +const int __MAC_12_0 = 120000; + +const int __MAC_12_1 = 120100; + +const int __MAC_12_2 = 120200; + +const int __MAC_12_3 = 120300; + +const int __MAC_12_4 = 120400; + +const int __MAC_12_5 = 120500; + +const int __MAC_12_6 = 120600; + +const int __MAC_12_7 = 120700; + +const int __MAC_13_0 = 130000; + +const int __MAC_13_1 = 130100; + +const int __MAC_13_2 = 130200; + +const int __MAC_13_3 = 130300; - int wcstombs_s( - ffi.Pointer _PtNumOfCharConverted, - ffi.Pointer _Dst, - int _DstSizeInBytes, - ffi.Pointer _Src, - int _MaxCountInBytes, - ) { - return _wcstombs_s( - _PtNumOfCharConverted, - _Dst, - _DstSizeInBytes, - _Src, - _MaxCountInBytes, - ); - } +const int __MAC_13_4 = 130400; - late final _wcstombs_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ) - > - >('wcstombs_s'); - late final _wcstombs_s = _wcstombs_sPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - ) - >(); +const int __MAC_13_5 = 130500; - int wcstombs( - ffi.Pointer _Dest, - ffi.Pointer _Source, - int _MaxCount, - ) { - return _wcstombs(_Dest, _Source, _MaxCount); - } +const int __MAC_13_6 = 130600; - late final _wcstombsPtr = - _lookup< - ffi.NativeFunction< - ffi.Size Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ) - > - >('wcstombs'); - late final _wcstombs = _wcstombsPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); +const int __MAC_13_7 = 130700; - int _wcstombs_s_l( - ffi.Pointer _PtNumOfCharConverted, - ffi.Pointer _Dst, - int _DstSizeInBytes, - ffi.Pointer _Src, - int _MaxCountInBytes, - _locale_t _Locale, - ) { - return __wcstombs_s_l( - _PtNumOfCharConverted, - _Dst, - _DstSizeInBytes, - _Src, - _MaxCountInBytes, - _Locale, - ); - } +const int __MAC_14_0 = 140000; - late final __wcstombs_s_lPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - _locale_t, - ) - > - >('_wcstombs_s_l'); - late final __wcstombs_s_l = __wcstombs_s_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - _locale_t, - ) - >(); +const int __MAC_14_1 = 140100; - int _wcstombs_l( - ffi.Pointer _Dest, - ffi.Pointer _Source, - int _MaxCount, - _locale_t _Locale, - ) { - return __wcstombs_l(_Dest, _Source, _MaxCount, _Locale); - } +const int __MAC_14_2 = 140200; - late final __wcstombs_lPtr = - _lookup< - ffi.NativeFunction< - ffi.Size Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - _locale_t, - ) - > - >('_wcstombs_l'); - late final __wcstombs_l = __wcstombs_lPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - _locale_t, - ) - >(); +const int __MAC_14_3 = 140300; - ffi.Pointer _fullpath( - ffi.Pointer _Buffer, - ffi.Pointer _Path, - int _BufferCount, - ) { - return __fullpath(_Buffer, _Path, _BufferCount); - } +const int __MAC_14_4 = 140400; - late final __fullpathPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ) - > - >('_fullpath'); - late final __fullpath = __fullpathPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); +const int __MAC_14_5 = 140500; - int _makepath_s( - ffi.Pointer _Buffer, - int _BufferCount, - ffi.Pointer _Drive, - ffi.Pointer _Dir, - ffi.Pointer _Filename, - ffi.Pointer _Ext, - ) { - return __makepath_s(_Buffer, _BufferCount, _Drive, _Dir, _Filename, _Ext); - } +const int __MAC_14_6 = 140600; - late final __makepath_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('_makepath_s'); - late final __makepath_s = __makepath_sPtr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __MAC_14_7 = 140700; - void _makepath( - ffi.Pointer _Buffer, - ffi.Pointer _Drive, - ffi.Pointer _Dir, - ffi.Pointer _Filename, - ffi.Pointer _Ext, - ) { - return __makepath(_Buffer, _Drive, _Dir, _Filename, _Ext); - } +const int __MAC_15_0 = 150000; - late final __makepathPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('_makepath'); - late final __makepath = __makepathPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __MAC_15_1 = 150100; - void _splitpath( - ffi.Pointer _FullPath, - ffi.Pointer _Drive, - ffi.Pointer _Dir, - ffi.Pointer _Filename, - ffi.Pointer _Ext, - ) { - return __splitpath(_FullPath, _Drive, _Dir, _Filename, _Ext); - } +const int __MAC_15_2 = 150200; - late final __splitpathPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('_splitpath'); - late final __splitpath = __splitpathPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __MAC_15_3 = 150300; - int _splitpath_s( - ffi.Pointer _FullPath, - ffi.Pointer _Drive, - int _DriveCount, - ffi.Pointer _Dir, - int _DirCount, - ffi.Pointer _Filename, - int _FilenameCount, - ffi.Pointer _Ext, - int _ExtCount, - ) { - return __splitpath_s( - _FullPath, - _Drive, - _DriveCount, - _Dir, - _DirCount, - _Filename, - _FilenameCount, - _Ext, - _ExtCount, - ); - } +const int __MAC_15_4 = 150400; - late final __splitpath_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ) - > - >('_splitpath_s'); - late final __splitpath_s = __splitpath_sPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer, - int, - ) - >(); +const int __MAC_15_5 = 150500; - int getenv_s( - ffi.Pointer _RequiredCount, - ffi.Pointer _Buffer, - int _BufferCount, - ffi.Pointer _VarName, - ) { - return _getenv_s(_RequiredCount, _Buffer, _BufferCount, _VarName); - } +const int __MAC_15_6 = 150600; - late final _getenv_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - rsize_t, - ffi.Pointer, - ) - > - >('getenv_s'); - late final _getenv_s = _getenv_sPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >(); +const int __MAC_16_0 = 160000; - ffi.Pointer __p___argc() { - return ___p___argc(); - } +const int __MAC_26_0 = 260000; - late final ___p___argcPtr = - _lookup Function()>>( - '__p___argc', - ); - late final ___p___argc = ___p___argcPtr - .asFunction Function()>(); +const int __MAC_26_1 = 260100; - ffi.Pointer>> __p___argv() { - return ___p___argv(); - } +const int __MAC_26_2 = 260200; - late final ___p___argvPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer>> Function() - > - >('__p___argv'); - late final ___p___argv = ___p___argvPtr - .asFunction>> Function()>(); +const int __MAC_26_3 = 260300; - ffi.Pointer>> __p___wargv() { - return ___p___wargv(); - } +const int __MAC_26_4 = 260400; - late final ___p___wargvPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer>> Function() - > - >('__p___wargv'); - late final ___p___wargv = ___p___wargvPtr - .asFunction< - ffi.Pointer>> Function() - >(); +const int __IPHONE_2_0 = 20000; - ffi.Pointer>> __p__environ() { - return ___p__environ(); - } +const int __IPHONE_2_1 = 20100; - late final ___p__environPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer>> Function() - > - >('__p__environ'); - late final ___p__environ = ___p__environPtr - .asFunction>> Function()>(); +const int __IPHONE_2_2 = 20200; - ffi.Pointer>> __p__wenviron() { - return ___p__wenviron(); - } +const int __IPHONE_3_0 = 30000; - late final ___p__wenvironPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer>> Function() - > - >('__p__wenviron'); - late final ___p__wenviron = ___p__wenvironPtr - .asFunction< - ffi.Pointer>> Function() - >(); +const int __IPHONE_3_1 = 30100; - ffi.Pointer getenv(ffi.Pointer _VarName) { - return _getenv(_VarName); - } +const int __IPHONE_3_2 = 30200; - late final _getenvPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('getenv'); - late final _getenv = _getenvPtr - .asFunction Function(ffi.Pointer)>(); +const int __IPHONE_4_0 = 40000; - int _dupenv_s( - ffi.Pointer> _Buffer, - ffi.Pointer _BufferCount, - ffi.Pointer _VarName, - ) { - return __dupenv_s(_Buffer, _BufferCount, _VarName); - } +const int __IPHONE_4_1 = 40100; - late final __dupenv_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ) - > - >('_dupenv_s'); - late final __dupenv_s = __dupenv_sPtr - .asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __IPHONE_4_2 = 40200; - int system(ffi.Pointer _Command) { - return _system(_Command); - } +const int __IPHONE_4_3 = 40300; - late final _systemPtr = - _lookup)>>( - 'system', - ); - late final _system = _systemPtr - .asFunction)>(); +const int __IPHONE_5_0 = 50000; - int _putenv(ffi.Pointer _EnvString) { - return __putenv(_EnvString); - } +const int __IPHONE_5_1 = 50100; - late final __putenvPtr = - _lookup)>>( - '_putenv', - ); - late final __putenv = __putenvPtr - .asFunction)>(); +const int __IPHONE_6_0 = 60000; - int _putenv_s(ffi.Pointer _Name, ffi.Pointer _Value) { - return __putenv_s(_Name, _Value); - } +const int __IPHONE_6_1 = 60100; - late final __putenv_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function(ffi.Pointer, ffi.Pointer) - > - >('_putenv_s'); - late final __putenv_s = __putenv_sPtr - .asFunction, ffi.Pointer)>(); +const int __IPHONE_7_0 = 70000; + +const int __IPHONE_7_1 = 70100; - int _searchenv_s( - ffi.Pointer _Filename, - ffi.Pointer _VarName, - ffi.Pointer _Buffer, - int _BufferCount, - ) { - return __searchenv_s(_Filename, _VarName, _Buffer, _BufferCount); - } +const int __IPHONE_8_0 = 80000; - late final __searchenv_sPtr = - _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ) - > - >('_searchenv_s'); - late final __searchenv_s = __searchenv_sPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); +const int __IPHONE_8_1 = 80100; - void _searchenv( - ffi.Pointer _Filename, - ffi.Pointer _VarName, - ffi.Pointer _Buffer, - ) { - return __searchenv(_Filename, _VarName, _Buffer); - } +const int __IPHONE_8_2 = 80200; - late final __searchenvPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('_searchenv'); - late final __searchenv = __searchenvPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __IPHONE_8_3 = 80300; - void _seterrormode(int _Mode) { - return __seterrormode(_Mode); - } +const int __IPHONE_8_4 = 80400; - late final __seterrormodePtr = - _lookup>('_seterrormode'); - late final __seterrormode = __seterrormodePtr - .asFunction(); +const int __IPHONE_9_0 = 90000; - void _beep(int _Frequency, int _Duration) { - return __beep(_Frequency, _Duration); - } +const int __IPHONE_9_1 = 90100; - late final __beepPtr = - _lookup< - ffi.NativeFunction - >('_beep'); - late final __beep = __beepPtr.asFunction(); +const int __IPHONE_9_2 = 90200; - void _sleep(int _Duration) { - return __sleep(_Duration); - } +const int __IPHONE_9_3 = 90300; - late final __sleepPtr = - _lookup>( - '_sleep', - ); - late final __sleep = __sleepPtr.asFunction(); +const int __IPHONE_10_0 = 100000; - ffi.Pointer ecvt( - double _Value, - int _DigitCount, - ffi.Pointer _PtDec, - ffi.Pointer _PtSign, - ) { - return _ecvt$1(_Value, _DigitCount, _PtDec, _PtSign); - } +const int __IPHONE_10_1 = 100100; - late final _ecvtPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - >('ecvt'); - late final _ecvt$1 = _ecvtPtr - .asFunction< - ffi.Pointer Function( - double, - int, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __IPHONE_10_2 = 100200; - ffi.Pointer fcvt( - double _Value, - int _FractionalDigitCount, - ffi.Pointer _PtDec, - ffi.Pointer _PtSign, - ) { - return _fcvt$1(_Value, _FractionalDigitCount, _PtDec, _PtSign); - } +const int __IPHONE_10_3 = 100300; - late final _fcvtPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - >('fcvt'); - late final _fcvt$1 = _fcvtPtr - .asFunction< - ffi.Pointer Function( - double, - int, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __IPHONE_11_0 = 110000; - ffi.Pointer gcvt( - double _Value, - int _DigitCount, - ffi.Pointer _DstBuf, - ) { - return _gcvt$1(_Value, _DigitCount, _DstBuf); - } +const int __IPHONE_11_1 = 110100; - late final _gcvtPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, - ffi.Int, - ffi.Pointer, - ) - > - >('gcvt'); - late final _gcvt$1 = _gcvtPtr - .asFunction< - ffi.Pointer Function(double, int, ffi.Pointer) - >(); +const int __IPHONE_11_2 = 110200; - ffi.Pointer itoa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return _itoa$1(_Value, _Buffer, _Radix); - } +const int __IPHONE_11_3 = 110300; - late final _itoaPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, - ffi.Pointer, - ffi.Int, - ) - > - >('itoa'); - late final _itoa$1 = _itoaPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); +const int __IPHONE_11_4 = 110400; - ffi.Pointer ltoa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return _ltoa$1(_Value, _Buffer, _Radix); - } +const int __IPHONE_12_0 = 120000; - late final _ltoaPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Long, - ffi.Pointer, - ffi.Int, - ) - > - >('ltoa'); - late final _ltoa$1 = _ltoaPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); +const int __IPHONE_12_1 = 120100; - void swab( - ffi.Pointer _Buf1, - ffi.Pointer _Buf2, - int _SizeInBytes, - ) { - return _swab$1(_Buf1, _Buf2, _SizeInBytes); - } +const int __IPHONE_12_2 = 120200; - late final _swabPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('swab'); - late final _swab$1 = _swabPtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, int) - >(); +const int __IPHONE_12_3 = 120300; - ffi.Pointer ultoa( - int _Value, - ffi.Pointer _Buffer, - int _Radix, - ) { - return _ultoa$1(_Value, _Buffer, _Radix); - } +const int __IPHONE_12_4 = 120400; - late final _ultoaPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedLong, - ffi.Pointer, - ffi.Int, - ) - > - >('ultoa'); - late final _ultoa$1 = _ultoaPtr - .asFunction< - ffi.Pointer Function(int, ffi.Pointer, int) - >(); +const int __IPHONE_13_0 = 130000; - int putenv(ffi.Pointer _EnvString) { - return _putenv$1(_EnvString); - } +const int __IPHONE_13_1 = 130100; - late final _putenvPtr = - _lookup)>>( - 'putenv', - ); - late final _putenv$1 = _putenvPtr - .asFunction)>(); +const int __IPHONE_13_2 = 130200; - _onexit_t onexit(_onexit_t _Func) { - return _onexit$1(_Func); - } +const int __IPHONE_13_3 = 130300; - late final _onexitPtr = - _lookup>('onexit'); - late final _onexit$1 = _onexitPtr.asFunction<_onexit_t Function(_onexit_t)>(); +const int __IPHONE_13_4 = 130400; - double cabs(_Dcomplex _Z) { - return _cabs(_Z); - } +const int __IPHONE_13_5 = 130500; - late final _cabsPtr = - _lookup>('cabs'); - late final _cabs = _cabsPtr.asFunction(); +const int __IPHONE_13_6 = 130600; - _Dcomplex cacos(_Dcomplex _Z) { - return _cacos(_Z); - } +const int __IPHONE_13_7 = 130700; - late final _cacosPtr = - _lookup>('cacos'); - late final _cacos = _cacosPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_14_0 = 140000; - _Dcomplex cacosh(_Dcomplex _Z) { - return _cacosh(_Z); - } +const int __IPHONE_14_1 = 140100; - late final _cacoshPtr = - _lookup>('cacosh'); - late final _cacosh = _cacoshPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_14_2 = 140200; - double carg(_Dcomplex _Z) { - return _carg(_Z); - } +const int __IPHONE_14_3 = 140300; - late final _cargPtr = - _lookup>('carg'); - late final _carg = _cargPtr.asFunction(); +const int __IPHONE_14_5 = 140500; - _Dcomplex casin(_Dcomplex _Z) { - return _casin(_Z); - } +const int __IPHONE_14_6 = 140600; - late final _casinPtr = - _lookup>('casin'); - late final _casin = _casinPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_14_7 = 140700; - _Dcomplex casinh(_Dcomplex _Z) { - return _casinh(_Z); - } +const int __IPHONE_14_8 = 140800; - late final _casinhPtr = - _lookup>('casinh'); - late final _casinh = _casinhPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_15_0 = 150000; - _Dcomplex catan(_Dcomplex _Z) { - return _catan(_Z); - } +const int __IPHONE_15_1 = 150100; - late final _catanPtr = - _lookup>('catan'); - late final _catan = _catanPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_15_2 = 150200; - _Dcomplex catanh(_Dcomplex _Z) { - return _catanh(_Z); - } +const int __IPHONE_15_3 = 150300; - late final _catanhPtr = - _lookup>('catanh'); - late final _catanh = _catanhPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_15_4 = 150400; - _Dcomplex ccos(_Dcomplex _Z) { - return _ccos(_Z); - } +const int __IPHONE_15_5 = 150500; - late final _ccosPtr = - _lookup>('ccos'); - late final _ccos = _ccosPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_15_6 = 150600; - _Dcomplex ccosh(_Dcomplex _Z) { - return _ccosh(_Z); - } +const int __IPHONE_15_7 = 150700; - late final _ccoshPtr = - _lookup>('ccosh'); - late final _ccosh = _ccoshPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_15_8 = 150800; - _Dcomplex cexp(_Dcomplex _Z) { - return _cexp(_Z); - } +const int __IPHONE_16_0 = 160000; - late final _cexpPtr = - _lookup>('cexp'); - late final _cexp = _cexpPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_16_1 = 160100; - double cimag(_Dcomplex _Z) { - return _cimag(_Z); - } +const int __IPHONE_16_2 = 160200; - late final _cimagPtr = - _lookup>('cimag'); - late final _cimag = _cimagPtr.asFunction(); +const int __IPHONE_16_3 = 160300; - _Dcomplex clog(_Dcomplex _Z) { - return _clog(_Z); - } +const int __IPHONE_16_4 = 160400; - late final _clogPtr = - _lookup>('clog'); - late final _clog = _clogPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_16_5 = 160500; - _Dcomplex clog10(_Dcomplex _Z) { - return _clog10(_Z); - } +const int __IPHONE_16_6 = 160600; - late final _clog10Ptr = - _lookup>('clog10'); - late final _clog10 = _clog10Ptr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_16_7 = 160700; - _Dcomplex conj(_Dcomplex _Z) { - return _conj(_Z); - } +const int __IPHONE_17_0 = 170000; - late final _conjPtr = - _lookup>('conj'); - late final _conj = _conjPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_17_1 = 170100; - _Dcomplex cpow(_Dcomplex _X, _Dcomplex _Y) { - return _cpow(_X, _Y); - } +const int __IPHONE_17_2 = 170200; - late final _cpowPtr = - _lookup>( - 'cpow', - ); - late final _cpow = _cpowPtr - .asFunction<_Dcomplex Function(_Dcomplex, _Dcomplex)>(); +const int __IPHONE_17_3 = 170300; - _Dcomplex cproj(_Dcomplex _Z) { - return _cproj(_Z); - } +const int __IPHONE_17_4 = 170400; - late final _cprojPtr = - _lookup>('cproj'); - late final _cproj = _cprojPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_17_5 = 170500; - double creal(_Dcomplex _Z) { - return _creal(_Z); - } +const int __IPHONE_17_6 = 170600; - late final _crealPtr = - _lookup>('creal'); - late final _creal = _crealPtr.asFunction(); +const int __IPHONE_17_7 = 170700; - _Dcomplex csin(_Dcomplex _Z) { - return _csin(_Z); - } +const int __IPHONE_18_0 = 180000; - late final _csinPtr = - _lookup>('csin'); - late final _csin = _csinPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_18_1 = 180100; - _Dcomplex csinh(_Dcomplex _Z) { - return _csinh(_Z); - } +const int __IPHONE_18_2 = 180200; - late final _csinhPtr = - _lookup>('csinh'); - late final _csinh = _csinhPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_18_3 = 180300; - _Dcomplex csqrt(_Dcomplex _Z) { - return _csqrt(_Z); - } +const int __IPHONE_18_4 = 180400; - late final _csqrtPtr = - _lookup>('csqrt'); - late final _csqrt = _csqrtPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_18_5 = 180500; - _Dcomplex ctan(_Dcomplex _Z) { - return _ctan(_Z); - } +const int __IPHONE_18_6 = 180600; - late final _ctanPtr = - _lookup>('ctan'); - late final _ctan = _ctanPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_19_0 = 190000; - _Dcomplex ctanh(_Dcomplex _Z) { - return _ctanh(_Z); - } +const int __IPHONE_26_0 = 260000; - late final _ctanhPtr = - _lookup>('ctanh'); - late final _ctanh = _ctanhPtr.asFunction<_Dcomplex Function(_Dcomplex)>(); +const int __IPHONE_26_1 = 260100; - double norm(_Dcomplex _Z) { - return _norm(_Z); - } +const int __IPHONE_26_2 = 260200; - late final _normPtr = - _lookup>('norm'); - late final _norm = _normPtr.asFunction(); +const int __IPHONE_26_3 = 260300; - double cabsf(_Fcomplex _Z) { - return _cabsf(_Z); - } +const int __IPHONE_26_4 = 260400; - late final _cabsfPtr = - _lookup>('cabsf'); - late final _cabsf = _cabsfPtr.asFunction(); +const int __WATCHOS_1_0 = 10000; - _Fcomplex cacosf(_Fcomplex _Z) { - return _cacosf(_Z); - } +const int __WATCHOS_2_0 = 20000; - late final _cacosfPtr = - _lookup>('cacosf'); - late final _cacosf = _cacosfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_2_1 = 20100; - _Fcomplex cacoshf(_Fcomplex _Z) { - return _cacoshf(_Z); - } +const int __WATCHOS_2_2 = 20200; - late final _cacoshfPtr = - _lookup>('cacoshf'); - late final _cacoshf = _cacoshfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_3_0 = 30000; - double cargf(_Fcomplex _Z) { - return _cargf(_Z); - } +const int __WATCHOS_3_1 = 30100; - late final _cargfPtr = - _lookup>('cargf'); - late final _cargf = _cargfPtr.asFunction(); +const int __WATCHOS_3_1_1 = 30101; - _Fcomplex casinf(_Fcomplex _Z) { - return _casinf(_Z); - } +const int __WATCHOS_3_2 = 30200; - late final _casinfPtr = - _lookup>('casinf'); - late final _casinf = _casinfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_4_0 = 40000; - _Fcomplex casinhf(_Fcomplex _Z) { - return _casinhf(_Z); - } +const int __WATCHOS_4_1 = 40100; - late final _casinhfPtr = - _lookup>('casinhf'); - late final _casinhf = _casinhfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_4_2 = 40200; - _Fcomplex catanf(_Fcomplex _Z) { - return _catanf(_Z); - } +const int __WATCHOS_4_3 = 40300; - late final _catanfPtr = - _lookup>('catanf'); - late final _catanf = _catanfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_5_0 = 50000; - _Fcomplex catanhf(_Fcomplex _Z) { - return _catanhf(_Z); - } +const int __WATCHOS_5_1 = 50100; - late final _catanhfPtr = - _lookup>('catanhf'); - late final _catanhf = _catanhfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_5_2 = 50200; - _Fcomplex ccosf(_Fcomplex _Z) { - return _ccosf(_Z); - } +const int __WATCHOS_5_3 = 50300; - late final _ccosfPtr = - _lookup>('ccosf'); - late final _ccosf = _ccosfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_6_0 = 60000; - _Fcomplex ccoshf(_Fcomplex _Z) { - return _ccoshf(_Z); - } +const int __WATCHOS_6_1 = 60100; - late final _ccoshfPtr = - _lookup>('ccoshf'); - late final _ccoshf = _ccoshfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_6_2 = 60200; - _Fcomplex cexpf(_Fcomplex _Z) { - return _cexpf(_Z); - } +const int __WATCHOS_7_0 = 70000; - late final _cexpfPtr = - _lookup>('cexpf'); - late final _cexpf = _cexpfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_7_1 = 70100; - double cimagf(_Fcomplex _Z) { - return _cimagf(_Z); - } +const int __WATCHOS_7_2 = 70200; - late final _cimagfPtr = - _lookup>('cimagf'); - late final _cimagf = _cimagfPtr.asFunction(); +const int __WATCHOS_7_3 = 70300; - _Fcomplex clogf(_Fcomplex _Z) { - return _clogf(_Z); - } +const int __WATCHOS_7_4 = 70400; - late final _clogfPtr = - _lookup>('clogf'); - late final _clogf = _clogfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_7_5 = 70500; - _Fcomplex clog10f(_Fcomplex _Z) { - return _clog10f(_Z); - } +const int __WATCHOS_7_6 = 70600; - late final _clog10fPtr = - _lookup>('clog10f'); - late final _clog10f = _clog10fPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_8_0 = 80000; - _Fcomplex conjf(_Fcomplex _Z) { - return _conjf(_Z); - } +const int __WATCHOS_8_1 = 80100; - late final _conjfPtr = - _lookup>('conjf'); - late final _conjf = _conjfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_8_3 = 80300; - _Fcomplex cpowf(_Fcomplex _X, _Fcomplex _Y) { - return _cpowf(_X, _Y); - } +const int __WATCHOS_8_4 = 80400; - late final _cpowfPtr = - _lookup>( - 'cpowf', - ); - late final _cpowf = _cpowfPtr - .asFunction<_Fcomplex Function(_Fcomplex, _Fcomplex)>(); +const int __WATCHOS_8_5 = 80500; - _Fcomplex cprojf(_Fcomplex _Z) { - return _cprojf(_Z); - } +const int __WATCHOS_8_6 = 80600; - late final _cprojfPtr = - _lookup>('cprojf'); - late final _cprojf = _cprojfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_8_7 = 80700; - double crealf(_Fcomplex _Z) { - return _crealf(_Z); - } +const int __WATCHOS_8_8 = 80800; - late final _crealfPtr = - _lookup>('crealf'); - late final _crealf = _crealfPtr.asFunction(); +const int __WATCHOS_9_0 = 90000; - _Fcomplex csinf(_Fcomplex _Z) { - return _csinf(_Z); - } +const int __WATCHOS_9_1 = 90100; - late final _csinfPtr = - _lookup>('csinf'); - late final _csinf = _csinfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_9_2 = 90200; - _Fcomplex csinhf(_Fcomplex _Z) { - return _csinhf(_Z); - } +const int __WATCHOS_9_3 = 90300; - late final _csinhfPtr = - _lookup>('csinhf'); - late final _csinhf = _csinhfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_9_4 = 90400; - _Fcomplex csqrtf(_Fcomplex _Z) { - return _csqrtf(_Z); - } +const int __WATCHOS_9_5 = 90500; - late final _csqrtfPtr = - _lookup>('csqrtf'); - late final _csqrtf = _csqrtfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_9_6 = 90600; - _Fcomplex ctanf(_Fcomplex _Z) { - return _ctanf(_Z); - } +const int __WATCHOS_10_0 = 100000; - late final _ctanfPtr = - _lookup>('ctanf'); - late final _ctanf = _ctanfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_10_1 = 100100; - _Fcomplex ctanhf(_Fcomplex _Z) { - return _ctanhf(_Z); - } +const int __WATCHOS_10_2 = 100200; - late final _ctanhfPtr = - _lookup>('ctanhf'); - late final _ctanhf = _ctanhfPtr.asFunction<_Fcomplex Function(_Fcomplex)>(); +const int __WATCHOS_10_3 = 100300; - double normf(_Fcomplex _Z) { - return _normf(_Z); - } +const int __WATCHOS_10_4 = 100400; - late final _normfPtr = - _lookup>('normf'); - late final _normf = _normfPtr.asFunction(); +const int __WATCHOS_10_5 = 100500; - _Dcomplex _Cbuild(double _Re, double _Im) { - return __Cbuild(_Re, _Im); - } +const int __WATCHOS_10_6 = 100600; - late final __CbuildPtr = - _lookup>( - '_Cbuild', - ); - late final __Cbuild = __CbuildPtr - .asFunction<_Dcomplex Function(double, double)>(); +const int __WATCHOS_10_7 = 100700; - _Dcomplex _Cmulcc(_Dcomplex _X, _Dcomplex _Y) { - return __Cmulcc(_X, _Y); - } +const int __WATCHOS_11_0 = 110000; - late final __CmulccPtr = - _lookup>( - '_Cmulcc', - ); - late final __Cmulcc = __CmulccPtr - .asFunction<_Dcomplex Function(_Dcomplex, _Dcomplex)>(); +const int __WATCHOS_11_1 = 110100; - _Dcomplex _Cmulcr(_Dcomplex _X, double _Y) { - return __Cmulcr(_X, _Y); - } +const int __WATCHOS_11_2 = 110200; - late final __CmulcrPtr = - _lookup>( - '_Cmulcr', - ); - late final __Cmulcr = __CmulcrPtr - .asFunction<_Dcomplex Function(_Dcomplex, double)>(); +const int __WATCHOS_11_3 = 110300; - _Fcomplex _FCbuild(double _Re, double _Im) { - return __FCbuild(_Re, _Im); - } +const int __WATCHOS_11_4 = 110400; - late final __FCbuildPtr = - _lookup>( - '_FCbuild', - ); - late final __FCbuild = __FCbuildPtr - .asFunction<_Fcomplex Function(double, double)>(); +const int __WATCHOS_11_5 = 110500; - _Fcomplex _FCmulcc(_Fcomplex _X, _Fcomplex _Y) { - return __FCmulcc(_X, _Y); - } +const int __WATCHOS_11_6 = 110600; - late final __FCmulccPtr = - _lookup>( - '_FCmulcc', - ); - late final __FCmulcc = __FCmulccPtr - .asFunction<_Fcomplex Function(_Fcomplex, _Fcomplex)>(); +const int __WATCHOS_12_0 = 120000; - _Fcomplex _FCmulcr(_Fcomplex _X, double _Y) { - return __FCmulcr(_X, _Y); - } +const int __WATCHOS_26_0 = 260000; - late final __FCmulcrPtr = - _lookup>( - '_FCmulcr', - ); - late final __FCmulcr = __FCmulcrPtr - .asFunction<_Fcomplex Function(_Fcomplex, double)>(); +const int __WATCHOS_26_1 = 260100; - ffi.Pointer getAppDataDir() { - return _getAppDataDir(); - } +const int __WATCHOS_26_2 = 260200; - late final _getAppDataDirPtr = - _lookup Function()>>( - 'getAppDataDir', - ); - late final _getAppDataDir = _getAppDataDirPtr - .asFunction Function()>(); +const int __WATCHOS_26_3 = 260300; - ffi.Pointer setup( - ffi.Pointer _logDir, - ffi.Pointer _dataDir, - ffi.Pointer _locale, - ffi.Pointer _env, - int logP, - int appsP, - int statusP, - int privateServerP, - int appEventP, - int consent, - ffi.Pointer api, - ) { - return _setup( - _logDir, - _dataDir, - _locale, - _env, - logP, - appsP, - statusP, - privateServerP, - appEventP, - consent, - api, - ); - } +const int __WATCHOS_26_4 = 260400; + +const int __TVOS_9_0 = 90000; + +const int __TVOS_9_1 = 90100; - late final _setupPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int, - ffi.Pointer, - ) - > - >('setup'); - late final _setup = _setupPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int, - int, - int, - ffi.Pointer, - ) - >(); +const int __TVOS_9_2 = 90200; - ffi.Pointer updateTelemetryConsent(int consent) { - return _updateTelemetryConsent(consent); - } +const int __TVOS_10_0 = 100000; - late final _updateTelemetryConsentPtr = - _lookup Function(ffi.Int)>>( - 'updateTelemetryConsent', - ); - late final _updateTelemetryConsent = _updateTelemetryConsentPtr - .asFunction Function(int)>(); +const int __TVOS_10_0_1 = 100001; - int isTelemetryEnabled() { - return _isTelemetryEnabled(); - } +const int __TVOS_10_1 = 100100; - late final _isTelemetryEnabledPtr = - _lookup>('isTelemetryEnabled'); - late final _isTelemetryEnabled = _isTelemetryEnabledPtr - .asFunction(); +const int __TVOS_10_2 = 100200; - int isOAuthLogin() { - return _isOAuthLogin(); - } +const int __TVOS_11_0 = 110000; - late final _isOAuthLoginPtr = _lookup>( - 'isOAuthLogin', - ); - late final _isOAuthLogin = _isOAuthLoginPtr.asFunction(); +const int __TVOS_11_1 = 110100; - ffi.Pointer getOAuthProvider() { - return _getOAuthProvider(); - } +const int __TVOS_11_2 = 110200; - late final _getOAuthProviderPtr = - _lookup Function()>>( - 'getOAuthProvider', - ); - late final _getOAuthProvider = _getOAuthProviderPtr - .asFunction Function()>(); +const int __TVOS_11_3 = 110300; - ffi.Pointer availableFeatures() { - return _availableFeatures(); - } +const int __TVOS_11_4 = 110400; - late final _availableFeaturesPtr = - _lookup Function()>>( - 'availableFeatures', - ); - late final _availableFeatures = _availableFeaturesPtr - .asFunction Function()>(); +const int __TVOS_12_0 = 120000; - ffi.Pointer updateLocale(ffi.Pointer _locale) { - return _updateLocale(_locale); - } +const int __TVOS_12_1 = 120100; - late final _updateLocalePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('updateLocale'); - late final _updateLocale = _updateLocalePtr - .asFunction Function(ffi.Pointer)>(); +const int __TVOS_12_2 = 120200; - ffi.Pointer addSplitTunnelItem( - ffi.Pointer filterTypeC, - ffi.Pointer itemC, - ) { - return _addSplitTunnelItem(filterTypeC, itemC); - } +const int __TVOS_12_3 = 120300; - late final _addSplitTunnelItemPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('addSplitTunnelItem'); - late final _addSplitTunnelItem = _addSplitTunnelItemPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __TVOS_12_4 = 120400; - ffi.Pointer removeSplitTunnelItem( - ffi.Pointer filterTypeC, - ffi.Pointer itemC, - ) { - return _removeSplitTunnelItem(filterTypeC, itemC); - } +const int __TVOS_13_0 = 130000; - late final _removeSplitTunnelItemPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('removeSplitTunnelItem'); - late final _removeSplitTunnelItem = _removeSplitTunnelItemPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __TVOS_13_2 = 130200; - ffi.Pointer setSplitTunnelingEnabled(int enabled) { - return _setSplitTunnelingEnabled(enabled); - } +const int __TVOS_13_3 = 130300; - late final _setSplitTunnelingEnabledPtr = - _lookup Function(ffi.Int)>>( - 'setSplitTunnelingEnabled', - ); - late final _setSplitTunnelingEnabled = _setSplitTunnelingEnabledPtr - .asFunction Function(int)>(); +const int __TVOS_13_4 = 130400; - int isSplitTunnelingEnabled() { - return _isSplitTunnelingEnabled(); - } +const int __TVOS_14_0 = 140000; - late final _isSplitTunnelingEnabledPtr = - _lookup>( - 'isSplitTunnelingEnabled', - ); - late final _isSplitTunnelingEnabled = _isSplitTunnelingEnabledPtr - .asFunction(); +const int __TVOS_14_1 = 140100; - ffi.Pointer loadInstalledApps(ffi.Pointer dataDir) { - return _loadInstalledApps(dataDir); - } +const int __TVOS_14_2 = 140200; - late final _loadInstalledAppsPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('loadInstalledApps'); - late final _loadInstalledApps = _loadInstalledAppsPtr - .asFunction Function(ffi.Pointer)>(); +const int __TVOS_14_3 = 140300; - ffi.Pointer loadInstalledAppIcon( - ffi.Pointer appPath, - ffi.Pointer iconPath, - ) { - return _loadInstalledAppIcon(appPath, iconPath); - } +const int __TVOS_14_5 = 140500; - late final _loadInstalledAppIconPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('loadInstalledAppIcon'); - late final _loadInstalledAppIcon = _loadInstalledAppIconPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __TVOS_14_6 = 140600; - ffi.Pointer getDataCapInfo() { - return _getDataCapInfo(); - } +const int __TVOS_14_7 = 140700; - late final _getDataCapInfoPtr = - _lookup Function()>>( - 'getDataCapInfo', - ); - late final _getDataCapInfo = _getDataCapInfoPtr - .asFunction Function()>(); +const int __TVOS_15_0 = 150000; - ffi.Pointer reportIssue( - ffi.Pointer emailC, - ffi.Pointer typeC, - ffi.Pointer descC, - ffi.Pointer deviceC, - ffi.Pointer modelC, - ffi.Pointer logPathC, - ffi.Pointer attachmentsJSONC, - ) { - return _reportIssue( - emailC, - typeC, - descC, - deviceC, - modelC, - logPathC, - attachmentsJSONC, - ); - } +const int __TVOS_15_1 = 150100; - late final _reportIssuePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('reportIssue'); - late final _reportIssue = _reportIssuePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __TVOS_15_2 = 150200; + +const int __TVOS_15_3 = 150300; + +const int __TVOS_15_4 = 150400; + +const int __TVOS_15_5 = 150500; + +const int __TVOS_15_6 = 150600; + +const int __TVOS_16_0 = 160000; + +const int __TVOS_16_1 = 160100; + +const int __TVOS_16_2 = 160200; + +const int __TVOS_16_3 = 160300; + +const int __TVOS_16_4 = 160400; + +const int __TVOS_16_5 = 160500; + +const int __TVOS_16_6 = 160600; + +const int __TVOS_17_0 = 170000; + +const int __TVOS_17_1 = 170100; + +const int __TVOS_17_2 = 170200; + +const int __TVOS_17_3 = 170300; + +const int __TVOS_17_4 = 170400; + +const int __TVOS_17_5 = 170500; + +const int __TVOS_17_6 = 170600; + +const int __TVOS_18_0 = 180000; + +const int __TVOS_18_1 = 180100; + +const int __TVOS_18_2 = 180200; + +const int __TVOS_18_3 = 180300; + +const int __TVOS_18_4 = 180400; + +const int __TVOS_18_5 = 180500; - ffi.Pointer getSelectedServerJSON() { - return _getSelectedServerJSON(); - } +const int __TVOS_18_6 = 180600; - late final _getSelectedServerJSONPtr = - _lookup Function()>>( - 'getSelectedServerJSON', - ); - late final _getSelectedServerJSON = _getSelectedServerJSONPtr - .asFunction Function()>(); +const int __TVOS_19_0 = 190000; - ffi.Pointer getAutoLocation() { - return _getAutoLocation(); - } +const int __TVOS_26_0 = 260000; - late final _getAutoLocationPtr = - _lookup Function()>>( - 'getAutoLocation', - ); - late final _getAutoLocation = _getAutoLocationPtr - .asFunction Function()>(); +const int __TVOS_26_1 = 260100; - ffi.Pointer isTagAvailable(ffi.Pointer _tag) { - return _isTagAvailable(_tag); - } +const int __TVOS_26_2 = 260200; - late final _isTagAvailablePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('isTagAvailable'); - late final _isTagAvailable = _isTagAvailablePtr - .asFunction Function(ffi.Pointer)>(); +const int __TVOS_26_3 = 260300; - ffi.Pointer getAvailableServers() { - return _getAvailableServers(); - } +const int __TVOS_26_4 = 260400; - late final _getAvailableServersPtr = - _lookup Function()>>( - 'getAvailableServers', - ); - late final _getAvailableServers = _getAvailableServersPtr - .asFunction Function()>(); +const int __BRIDGEOS_2_0 = 20000; - ffi.Pointer startVPN() { - return _startVPN(); - } +const int __BRIDGEOS_3_0 = 30000; - late final _startVPNPtr = - _lookup Function()>>('startVPN'); - late final _startVPN = _startVPNPtr - .asFunction Function()>(); +const int __BRIDGEOS_3_1 = 30100; - ffi.Pointer stopVPN() { - return _stopVPN(); - } +const int __BRIDGEOS_3_4 = 30400; - late final _stopVPNPtr = - _lookup Function()>>('stopVPN'); - late final _stopVPN = _stopVPNPtr - .asFunction Function()>(); +const int __BRIDGEOS_4_0 = 40000; - ffi.Pointer connectToServer(ffi.Pointer _tag) { - return _connectToServer(_tag); - } +const int __BRIDGEOS_4_1 = 40100; - late final _connectToServerPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('connectToServer'); - late final _connectToServer = _connectToServerPtr - .asFunction Function(ffi.Pointer)>(); +const int __BRIDGEOS_5_0 = 50000; - int isVPNConnected() { - return _isVPNConnected(); - } +const int __BRIDGEOS_5_1 = 50100; - late final _isVPNConnectedPtr = - _lookup>('isVPNConnected'); - late final _isVPNConnected = _isVPNConnectedPtr.asFunction(); +const int __BRIDGEOS_5_3 = 50300; - ffi.Pointer getUserData() { - return _getUserData(); - } +const int __BRIDGEOS_6_0 = 60000; - late final _getUserDataPtr = - _lookup Function()>>( - 'getUserData', - ); - late final _getUserData = _getUserDataPtr - .asFunction Function()>(); +const int __BRIDGEOS_6_2 = 60200; - ffi.Pointer fetchUserData() { - return _fetchUserData(); - } +const int __BRIDGEOS_6_4 = 60400; - late final _fetchUserDataPtr = - _lookup Function()>>( - 'fetchUserData', - ); - late final _fetchUserData = _fetchUserDataPtr - .asFunction Function()>(); +const int __BRIDGEOS_6_5 = 60500; - ffi.Pointer stripeSubscriptionPaymentRedirect( - ffi.Pointer subType, - ffi.Pointer _planId, - ffi.Pointer _email, - ffi.Pointer _idempotencyKey, - ) { - return _stripeSubscriptionPaymentRedirect( - subType, - _planId, - _email, - _idempotencyKey, - ); - } +const int __BRIDGEOS_6_6 = 60600; - late final _stripeSubscriptionPaymentRedirectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('stripeSubscriptionPaymentRedirect'); - late final _stripeSubscriptionPaymentRedirect = - _stripeSubscriptionPaymentRedirectPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __BRIDGEOS_7_0 = 70000; - ffi.Pointer paymentRedirect( - ffi.Pointer _plan, - ffi.Pointer _provider, - ffi.Pointer _email, - ffi.Pointer _idempotencyKey, - ) { - return _paymentRedirect(_plan, _provider, _email, _idempotencyKey); - } +const int __BRIDGEOS_7_1 = 70100; - late final _paymentRedirectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('paymentRedirect'); - late final _paymentRedirect = _paymentRedirectPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __BRIDGEOS_7_2 = 70200; - ffi.Pointer stripeBillingPortalUrl() { - return _stripeBillingPortalUrl(); - } +const int __BRIDGEOS_7_3 = 70300; - late final _stripeBillingPortalUrlPtr = - _lookup Function()>>( - 'stripeBillingPortalUrl', - ); - late final _stripeBillingPortalUrl = _stripeBillingPortalUrlPtr - .asFunction Function()>(); +const int __BRIDGEOS_7_4 = 70400; - ffi.Pointer plans() { - return _plans(); - } +const int __BRIDGEOS_7_6 = 70600; - late final _plansPtr = - _lookup Function()>>('plans'); - late final _plans = _plansPtr.asFunction Function()>(); +const int __BRIDGEOS_8_0 = 80000; - ffi.Pointer oauthLoginUrl(ffi.Pointer _provider) { - return _oauthLoginUrl(_provider); - } +const int __BRIDGEOS_8_1 = 80100; - late final _oauthLoginUrlPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('oauthLoginUrl'); - late final _oauthLoginUrl = _oauthLoginUrlPtr - .asFunction Function(ffi.Pointer)>(); +const int __BRIDGEOS_8_2 = 80200; - ffi.Pointer oAuthLoginCallback(ffi.Pointer _oAuthToken) { - return _oAuthLoginCallback(_oAuthToken); - } +const int __BRIDGEOS_8_3 = 80300; - late final _oAuthLoginCallbackPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('oAuthLoginCallback'); - late final _oAuthLoginCallback = _oAuthLoginCallbackPtr - .asFunction Function(ffi.Pointer)>(); +const int __BRIDGEOS_8_4 = 80400; - ffi.Pointer login( - ffi.Pointer _email, - ffi.Pointer _password, - ) { - return _login(_email, _password); - } +const int __BRIDGEOS_8_5 = 80500; - late final _loginPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('login'); - late final _login = _loginPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __BRIDGEOS_8_6 = 80600; - ffi.Pointer signup( - ffi.Pointer _email, - ffi.Pointer _password, - ) { - return _signup(_email, _password); - } +const int __BRIDGEOS_9_0 = 90000; - late final _signupPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('signup'); - late final _signup = _signupPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __BRIDGEOS_9_1 = 90100; - ffi.Pointer logout(ffi.Pointer _email) { - return _logout(_email); - } +const int __BRIDGEOS_9_2 = 90200; - late final _logoutPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('logout'); - late final _logout = _logoutPtr - .asFunction Function(ffi.Pointer)>(); +const int __BRIDGEOS_9_3 = 90300; + +const int __BRIDGEOS_9_4 = 90400; + +const int __BRIDGEOS_9_5 = 90500; + +const int __BRIDGEOS_9_6 = 90600; + +const int __BRIDGEOS_10_0 = 100000; + +const int __BRIDGEOS_10_1 = 100100; + +const int __BRIDGEOS_10_2 = 100200; + +const int __BRIDGEOS_10_3 = 100300; + +const int __BRIDGEOS_10_4 = 100400; + +const int __DRIVERKIT_19_0 = 190000; + +const int __DRIVERKIT_20_0 = 200000; + +const int __DRIVERKIT_21_0 = 210000; + +const int __DRIVERKIT_22_0 = 220000; + +const int __DRIVERKIT_22_4 = 220400; + +const int __DRIVERKIT_22_5 = 220500; + +const int __DRIVERKIT_22_6 = 220600; - ffi.Pointer startRecoveryByEmail(ffi.Pointer _email) { - return _startRecoveryByEmail(_email); - } +const int __DRIVERKIT_23_0 = 230000; - late final _startRecoveryByEmailPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('startRecoveryByEmail'); - late final _startRecoveryByEmail = _startRecoveryByEmailPtr - .asFunction Function(ffi.Pointer)>(); +const int __DRIVERKIT_23_1 = 230100; - ffi.Pointer validateEmailRecoveryCode( - ffi.Pointer _email, - ffi.Pointer _code, - ) { - return _validateEmailRecoveryCode(_email, _code); - } +const int __DRIVERKIT_23_2 = 230200; - late final _validateEmailRecoveryCodePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('validateEmailRecoveryCode'); - late final _validateEmailRecoveryCode = _validateEmailRecoveryCodePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __DRIVERKIT_23_3 = 230300; - ffi.Pointer completeRecoveryByEmail( - ffi.Pointer _email, - ffi.Pointer _newPassword, - ffi.Pointer _code, - ) { - return _completeRecoveryByEmail(_email, _newPassword, _code); - } +const int __DRIVERKIT_23_4 = 230400; - late final _completeRecoveryByEmailPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('completeRecoveryByEmail'); - late final _completeRecoveryByEmail = _completeRecoveryByEmailPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __DRIVERKIT_23_5 = 230500; - ffi.Pointer removeDevice(ffi.Pointer deviceId) { - return _removeDevice(deviceId); - } +const int __DRIVERKIT_23_6 = 230600; - late final _removeDevicePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('removeDevice'); - late final _removeDevice = _removeDevicePtr - .asFunction Function(ffi.Pointer)>(); +const int __DRIVERKIT_24_0 = 240000; - ffi.Pointer referralAttachment( - ffi.Pointer _referralCode, - ) { - return _referralAttachment(_referralCode); - } +const int __DRIVERKIT_24_1 = 240100; - late final _referralAttachmentPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('referralAttachment'); - late final _referralAttachment = _referralAttachmentPtr - .asFunction Function(ffi.Pointer)>(); +const int __DRIVERKIT_24_2 = 240200; - ffi.Pointer startChangeEmail( - ffi.Pointer _newEmail, - ffi.Pointer _password, - ) { - return _startChangeEmail(_newEmail, _password); - } +const int __DRIVERKIT_24_3 = 240300; - late final _startChangeEmailPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('startChangeEmail'); - late final _startChangeEmail = _startChangeEmailPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __DRIVERKIT_24_4 = 240400; - ffi.Pointer completeChangeEmail( - ffi.Pointer _newEmail, - ffi.Pointer _password, - ffi.Pointer _code, - ) { - return _completeChangeEmail(_newEmail, _password, _code); - } +const int __DRIVERKIT_24_5 = 240500; - late final _completeChangeEmailPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('completeChangeEmail'); - late final _completeChangeEmail = _completeChangeEmailPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __DRIVERKIT_24_6 = 240600; - ffi.Pointer deleteAccount( - ffi.Pointer _email, - ffi.Pointer _password, - ) { - return _deleteAccount(_email, _password); - } +const int __DRIVERKIT_25_0 = 250000; - late final _deleteAccountPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('deleteAccount'); - late final _deleteAccount = _deleteAccountPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __DRIVERKIT_25_1 = 250100; - ffi.Pointer activationCode( - ffi.Pointer _email, - ffi.Pointer _resellerCode, - ) { - return _activationCode(_email, _resellerCode); - } +const int __DRIVERKIT_25_2 = 250200; - late final _activationCodePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('activationCode'); - late final _activationCode = _activationCodePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __DRIVERKIT_25_3 = 250300; - void freeCString(ffi.Pointer cstr) { - return _freeCString(cstr); - } +const int __DRIVERKIT_25_4 = 250400; - late final _freeCStringPtr = - _lookup)>>( - 'freeCString', - ); - late final _freeCString = _freeCStringPtr - .asFunction)>(); +const int __VISIONOS_1_0 = 10000; - ffi.Pointer digitalOceanPrivateServer() { - return _digitalOceanPrivateServer(); - } +const int __VISIONOS_1_1 = 10100; - late final _digitalOceanPrivateServerPtr = - _lookup Function()>>( - 'digitalOceanPrivateServer', - ); - late final _digitalOceanPrivateServer = _digitalOceanPrivateServerPtr - .asFunction Function()>(); +const int __VISIONOS_1_2 = 10200; - ffi.Pointer googleCloudPrivateServer() { - return _googleCloudPrivateServer(); - } +const int __VISIONOS_1_3 = 10300; - late final _googleCloudPrivateServerPtr = - _lookup Function()>>( - 'googleCloudPrivateServer', - ); - late final _googleCloudPrivateServer = _googleCloudPrivateServerPtr - .asFunction Function()>(); +const int __VISIONOS_2_0 = 20000; - ffi.Pointer selectAccount(ffi.Pointer _account) { - return _selectAccount(_account); - } +const int __VISIONOS_2_1 = 20100; - late final _selectAccountPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('selectAccount'); - late final _selectAccount = _selectAccountPtr - .asFunction Function(ffi.Pointer)>(); +const int __VISIONOS_2_2 = 20200; - ffi.Pointer selectProject(ffi.Pointer _project) { - return _selectProject(_project); - } +const int __VISIONOS_2_3 = 20300; - late final _selectProjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('selectProject'); - late final _selectProject = _selectProjectPtr - .asFunction Function(ffi.Pointer)>(); +const int __VISIONOS_2_4 = 20400; - ffi.Pointer validateSession() { - return _validateSession(); - } +const int __VISIONOS_2_5 = 20500; - late final _validateSessionPtr = - _lookup Function()>>( - 'validateSession', - ); - late final _validateSession = _validateSessionPtr - .asFunction Function()>(); +const int __VISIONOS_2_6 = 20600; - ffi.Pointer startDepolyment( - ffi.Pointer _selectedLocation, - ffi.Pointer _serverName, - ) { - return _startDepolyment(_selectedLocation, _serverName); - } +const int __VISIONOS_3_0 = 30000; - late final _startDepolymentPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('startDepolyment'); - late final _startDepolyment = _startDepolymentPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int __VISIONOS_26_0 = 260000; + +const int __VISIONOS_26_1 = 260100; + +const int __VISIONOS_26_2 = 260200; + +const int __VISIONOS_26_3 = 260300; - ffi.Pointer cancelDepolyment() { - return _cancelDepolyment(); - } +const int __VISIONOS_26_4 = 260400; - late final _cancelDepolymentPtr = - _lookup Function()>>( - 'cancelDepolyment', - ); - late final _cancelDepolyment = _cancelDepolymentPtr - .asFunction Function()>(); +const int MAC_OS_X_VERSION_10_0 = 1000; - ffi.Pointer addServerManagerInstance( - ffi.Pointer _ip, - ffi.Pointer _port, - ffi.Pointer _accessToken, - ffi.Pointer _tag, - ) { - return _addServerManagerInstance(_ip, _port, _accessToken, _tag); - } +const int MAC_OS_X_VERSION_10_1 = 1010; - late final _addServerManagerInstancePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('addServerManagerInstance'); - late final _addServerManagerInstance = _addServerManagerInstancePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int MAC_OS_X_VERSION_10_2 = 1020; - ffi.Pointer inviteToServerManagerInstance( - ffi.Pointer _ip, - ffi.Pointer _port, - ffi.Pointer _accessToken, - ffi.Pointer _inviteName, - ) { - return _inviteToServerManagerInstance( - _ip, - _port, - _accessToken, - _inviteName, - ); - } +const int MAC_OS_X_VERSION_10_3 = 1030; - late final _inviteToServerManagerInstancePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('inviteToServerManagerInstance'); - late final _inviteToServerManagerInstance = _inviteToServerManagerInstancePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int MAC_OS_X_VERSION_10_4 = 1040; - ffi.Pointer revokeServerManagerInvite( - ffi.Pointer _ip, - ffi.Pointer _port, - ffi.Pointer _accessToken, - ffi.Pointer _inviteName, - ) { - return _revokeServerManagerInvite(_ip, _port, _accessToken, _inviteName); - } +const int MAC_OS_X_VERSION_10_5 = 1050; - late final _revokeServerManagerInvitePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('revokeServerManagerInvite'); - late final _revokeServerManagerInvite = _revokeServerManagerInvitePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int MAC_OS_X_VERSION_10_6 = 1060; - ffi.Pointer addServerBasedOnURLs( - ffi.Pointer _urls, - int _skipCertVerification, - ) { - return _addServerBasedOnURLs(_urls, _skipCertVerification); - } +const int MAC_OS_X_VERSION_10_7 = 1070; - late final _addServerBasedOnURLsPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('addServerBasedOnURLs'); - late final _addServerBasedOnURLs = _addServerBasedOnURLsPtr - .asFunction Function(ffi.Pointer, int)>(); +const int MAC_OS_X_VERSION_10_8 = 1080; - ffi.Pointer setBlockAdsEnabled(int enabled) { - return _setBlockAdsEnabled(enabled); - } +const int MAC_OS_X_VERSION_10_9 = 1090; - late final _setBlockAdsEnabledPtr = - _lookup Function(ffi.Int)>>( - 'setBlockAdsEnabled', - ); - late final _setBlockAdsEnabled = _setBlockAdsEnabledPtr - .asFunction Function(int)>(); +const int MAC_OS_X_VERSION_10_10 = 101000; - int isBlockAdsEnabled() { - return _isBlockAdsEnabled(); - } +const int MAC_OS_X_VERSION_10_10_2 = 101002; - late final _isBlockAdsEnabledPtr = - _lookup>('isBlockAdsEnabled'); - late final _isBlockAdsEnabled = _isBlockAdsEnabledPtr - .asFunction(); +const int MAC_OS_X_VERSION_10_10_3 = 101003; - ffi.Pointer setSmartRoutingEnabled(int enabled) { - return _setSmartRoutingEnabled(enabled); - } +const int MAC_OS_X_VERSION_10_11 = 101100; - late final _setSmartRoutingEnabledPtr = - _lookup Function(ffi.Int)>>( - 'setSmartRoutingEnabled', - ); - late final _setSmartRoutingEnabled = _setSmartRoutingEnabledPtr - .asFunction Function(int)>(); +const int MAC_OS_X_VERSION_10_11_2 = 101102; - int isSmartRoutingEnabled() { - return _isSmartRoutingEnabled(); - } +const int MAC_OS_X_VERSION_10_11_3 = 101103; - late final _isSmartRoutingEnabledPtr = - _lookup>('isSmartRoutingEnabled'); - late final _isSmartRoutingEnabled = _isSmartRoutingEnabledPtr - .asFunction(); +const int MAC_OS_X_VERSION_10_11_4 = 101104; - ffi.Pointer getSplitTunnelState() { - return _getSplitTunnelState(); - } +const int MAC_OS_X_VERSION_10_12 = 101200; - late final _getSplitTunnelStatePtr = - _lookup Function()>>( - 'getSplitTunnelState', - ); - late final _getSplitTunnelState = _getSplitTunnelStatePtr - .asFunction Function()>(); +const int MAC_OS_X_VERSION_10_12_1 = 101201; - ffi.Pointer getSplitTunnelItems(ffi.Pointer filterTypeC) { - return _getSplitTunnelItems(filterTypeC); - } +const int MAC_OS_X_VERSION_10_12_2 = 101202; - late final _getSplitTunnelItemsPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('getSplitTunnelItems'); - late final _getSplitTunnelItems = _getSplitTunnelItemsPtr - .asFunction Function(ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_12_4 = 101204; - ffi.Pointer deletePrivateServerByName(ffi.Pointer _name) { - return _deletePrivateServerByName(_name); - } +const int MAC_OS_X_VERSION_10_13 = 101300; - late final _deletePrivateServerByNamePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('deletePrivateServerByName'); - late final _deletePrivateServerByName = _deletePrivateServerByNamePtr - .asFunction Function(ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_13_1 = 101301; - ffi.Pointer updatePrivateServerName( - ffi.Pointer _oldName, - ffi.Pointer _newName, - ) { - return _updatePrivateServerName(_oldName, _newName); - } +const int MAC_OS_X_VERSION_10_13_2 = 101302; - late final _updatePrivateServerNamePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('updatePrivateServerName'); - late final _updatePrivateServerName = _updatePrivateServerNamePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); +const int MAC_OS_X_VERSION_10_13_4 = 101304; - ffi.Pointer getEnabledApps() { - return _getEnabledApps(); - } +const int MAC_OS_X_VERSION_10_14 = 101400; - late final _getEnabledAppsPtr = - _lookup Function()>>( - 'getEnabledApps', - ); - late final _getEnabledApps = _getEnabledAppsPtr - .asFunction Function()>(); +const int MAC_OS_X_VERSION_10_14_1 = 101401; - ffi.Pointer patchSettings(ffi.Pointer patchJSON) { - return _patchSettings(patchJSON); - } +const int MAC_OS_X_VERSION_10_14_4 = 101404; - late final _patchSettingsPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('patchSettings'); - late final _patchSettings = _patchSettingsPtr - .asFunction Function(ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_14_5 = 101405; - ffi.Pointer getSettings() { - return _getSettings(); - } +const int MAC_OS_X_VERSION_10_14_6 = 101406; - late final _getSettingsPtr = - _lookup Function()>>( - 'getSettings', - ); - late final _getSettings = _getSettingsPtr - .asFunction Function()>(); +const int MAC_OS_X_VERSION_10_15 = 101500; - ffi.Pointer patchEnvVars(ffi.Pointer patchJSON) { - return _patchEnvVars(patchJSON); - } +const int MAC_OS_X_VERSION_10_15_1 = 101501; - late final _patchEnvVarsPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('patchEnvVars'); - late final _patchEnvVars = _patchEnvVarsPtr - .asFunction Function(ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_15_4 = 101504; - ffi.Pointer getEnvVars() { - return _getEnvVars(); - } +const int MAC_OS_X_VERSION_10_16 = 101600; - late final _getEnvVarsPtr = - _lookup Function()>>( - 'getEnvVars', - ); - late final _getEnvVars = _getEnvVarsPtr - .asFunction Function()>(); +const int MAC_OS_VERSION_11_0 = 110000; - ffi.Pointer runURLTests() { - return _runURLTests(); - } +const int MAC_OS_VERSION_11_1 = 110100; - late final _runURLTestsPtr = - _lookup Function()>>( - 'runURLTests', - ); - late final _runURLTests = _runURLTestsPtr - .asFunction Function()>(); +const int MAC_OS_VERSION_11_3 = 110300; + +const int MAC_OS_VERSION_11_4 = 110400; - ffi.Pointer updateConfig() { - return _updateConfig(); - } +const int MAC_OS_VERSION_11_5 = 110500; - late final _updateConfigPtr = - _lookup Function()>>( - 'updateConfig', - ); - late final _updateConfig = _updateConfigPtr - .asFunction Function()>(); -} +const int MAC_OS_VERSION_11_6 = 110600; -typedef va_list = ffi.Pointer; -typedef ptrdiff_t = ffi.LongLong; -typedef Dartptrdiff_t = int; -typedef errno_t = ffi.Int; -typedef Darterrno_t = int; -typedef wint_t = ffi.UnsignedShort; -typedef Dartwint_t = int; -typedef wctype_t = ffi.UnsignedShort; -typedef Dartwctype_t = int; -typedef __time32_t = ffi.Long; -typedef Dart__time32_t = int; -typedef __time64_t = ffi.LongLong; -typedef Dart__time64_t = int; - -final class __crt_locale_data_public extends ffi.Struct { - external ffi.Pointer _locale_pctype; +const int MAC_OS_VERSION_12_0 = 120000; - @ffi.Int() - external int _locale_mb_cur_max; +const int MAC_OS_VERSION_12_1 = 120100; - @ffi.UnsignedInt() - external int _locale_lc_codepage; -} +const int MAC_OS_VERSION_12_2 = 120200; -final class __crt_locale_data extends ffi.Opaque {} +const int MAC_OS_VERSION_12_3 = 120300; -final class __crt_multibyte_data extends ffi.Opaque {} +const int MAC_OS_VERSION_12_4 = 120400; -final class __crt_locale_pointers extends ffi.Struct { - external ffi.Pointer<__crt_locale_data> locinfo; +const int MAC_OS_VERSION_12_5 = 120500; - external ffi.Pointer<__crt_multibyte_data> mbcinfo; -} +const int MAC_OS_VERSION_12_6 = 120600; -typedef _locale_t = ffi.Pointer<__crt_locale_pointers>; +const int MAC_OS_VERSION_12_7 = 120700; -final class _Mbstatet extends ffi.Struct { - @ffi.UnsignedLong() - external int _Wchar; +const int MAC_OS_VERSION_13_0 = 130000; - @ffi.UnsignedShort() - external int _Byte; +const int MAC_OS_VERSION_13_1 = 130100; - @ffi.UnsignedShort() - external int _State; -} +const int MAC_OS_VERSION_13_2 = 130200; -typedef mbstate_t = _Mbstatet; -typedef time_t = __time64_t; -typedef rsize_t = ffi.Size; -typedef Dartrsize_t = int; +const int MAC_OS_VERSION_13_3 = 130300; -final class _GoString_ extends ffi.Struct { - external ffi.Pointer p; +const int MAC_OS_VERSION_13_4 = 130400; - @ptrdiff_t() - external int n; -} +const int MAC_OS_VERSION_13_5 = 130500; -typedef _CoreCrtSecureSearchSortCompareFunctionFunction = - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ); -typedef Dart_CoreCrtSecureSearchSortCompareFunctionFunction = - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ); -typedef _CoreCrtSecureSearchSortCompareFunction = - ffi.Pointer< - ffi.NativeFunction<_CoreCrtSecureSearchSortCompareFunctionFunction> - >; -typedef _CoreCrtNonSecureSearchSortCompareFunctionFunction = - ffi.Int Function(ffi.Pointer, ffi.Pointer); -typedef Dart_CoreCrtNonSecureSearchSortCompareFunctionFunction = - int Function(ffi.Pointer, ffi.Pointer); -typedef _CoreCrtNonSecureSearchSortCompareFunction = - ffi.Pointer< - ffi.NativeFunction<_CoreCrtNonSecureSearchSortCompareFunctionFunction> - >; -typedef _onexit_tFunction = ffi.Int Function(); -typedef Dart_onexit_tFunction = int Function(); -typedef _onexit_t = ffi.Pointer>; -typedef _purecall_handlerFunction = ffi.Void Function(); -typedef Dart_purecall_handlerFunction = void Function(); -typedef _purecall_handler = - ffi.Pointer>; -typedef _invalid_parameter_handlerFunction = - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UintPtr, - ); -typedef Dart_invalid_parameter_handlerFunction = - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ); -typedef _invalid_parameter_handler = - ffi.Pointer>; +const int MAC_OS_VERSION_13_6 = 130600; -final class _div_t extends ffi.Struct { - @ffi.Int() - external int quot; +const int MAC_OS_VERSION_13_7 = 130700; - @ffi.Int() - external int rem; -} +const int MAC_OS_VERSION_14_0 = 140000; -typedef div_t = _div_t; +const int MAC_OS_VERSION_14_1 = 140100; -final class _ldiv_t extends ffi.Struct { - @ffi.Long() - external int quot; +const int MAC_OS_VERSION_14_2 = 140200; - @ffi.Long() - external int rem; -} +const int MAC_OS_VERSION_14_3 = 140300; -typedef ldiv_t = _ldiv_t; +const int MAC_OS_VERSION_14_4 = 140400; -final class _lldiv_t extends ffi.Struct { - @ffi.LongLong() - external int quot; +const int MAC_OS_VERSION_14_5 = 140500; - @ffi.LongLong() - external int rem; -} +const int MAC_OS_VERSION_14_6 = 140600; -typedef lldiv_t = _lldiv_t; +const int MAC_OS_VERSION_14_7 = 140700; -final class _LDOUBLE extends ffi.Struct { - @ffi.Array.multi([10]) - external ffi.Array ld; -} +const int MAC_OS_VERSION_15_0 = 150000; -final class _CRT_DOUBLE extends ffi.Struct { - @ffi.Double() - external double x; -} +const int MAC_OS_VERSION_15_1 = 150100; -final class _CRT_FLOAT extends ffi.Struct { - @ffi.Float() - external double f; -} +const int MAC_OS_VERSION_15_2 = 150200; -final class _LONGDOUBLE extends ffi.Opaque {} +const int MAC_OS_VERSION_15_3 = 150300; -final class _LDBL12 extends ffi.Struct { - @ffi.Array.multi([12]) - external ffi.Array ld12; -} +const int MAC_OS_VERSION_15_4 = 150400; -typedef int_least8_t = ffi.SignedChar; -typedef Dartint_least8_t = int; -typedef int_least16_t = ffi.Short; -typedef Dartint_least16_t = int; -typedef int_least32_t = ffi.Int; -typedef Dartint_least32_t = int; -typedef int_least64_t = ffi.LongLong; -typedef Dartint_least64_t = int; -typedef uint_least8_t = ffi.UnsignedChar; -typedef Dartuint_least8_t = int; -typedef uint_least16_t = ffi.UnsignedShort; -typedef Dartuint_least16_t = int; -typedef uint_least32_t = ffi.UnsignedInt; -typedef Dartuint_least32_t = int; -typedef uint_least64_t = ffi.UnsignedLongLong; -typedef Dartuint_least64_t = int; -typedef int_fast8_t = ffi.SignedChar; -typedef Dartint_fast8_t = int; -typedef int_fast16_t = ffi.Int; -typedef Dartint_fast16_t = int; -typedef int_fast32_t = ffi.Int; -typedef Dartint_fast32_t = int; -typedef int_fast64_t = ffi.LongLong; -typedef Dartint_fast64_t = int; -typedef uint_fast8_t = ffi.UnsignedChar; -typedef Dartuint_fast8_t = int; -typedef uint_fast16_t = ffi.UnsignedInt; -typedef Dartuint_fast16_t = int; -typedef uint_fast32_t = ffi.UnsignedInt; -typedef Dartuint_fast32_t = int; -typedef uint_fast64_t = ffi.UnsignedLongLong; -typedef Dartuint_fast64_t = int; -typedef intmax_t = ffi.LongLong; -typedef Dartintmax_t = int; -typedef uintmax_t = ffi.UnsignedLongLong; -typedef Dartuintmax_t = int; -typedef GoInt8 = ffi.SignedChar; -typedef DartGoInt8 = int; -typedef GoUint8 = ffi.UnsignedChar; -typedef DartGoUint8 = int; -typedef GoInt16 = ffi.Short; -typedef DartGoInt16 = int; -typedef GoUint16 = ffi.UnsignedShort; -typedef DartGoUint16 = int; -typedef GoInt32 = ffi.Int; -typedef DartGoInt32 = int; -typedef GoUint32 = ffi.UnsignedInt; -typedef DartGoUint32 = int; -typedef GoInt64 = ffi.LongLong; -typedef DartGoInt64 = int; -typedef GoUint64 = ffi.UnsignedLongLong; -typedef DartGoUint64 = int; -typedef GoInt = GoInt64; -typedef GoUint = GoUint64; -typedef GoUintptr = ffi.Size; -typedef DartGoUintptr = int; -typedef GoFloat32 = ffi.Float; -typedef DartGoFloat32 = double; -typedef GoFloat64 = ffi.Double; -typedef DartGoFloat64 = double; +const int MAC_OS_VERSION_15_5 = 150500; -final class _C_double_complex extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array _Val; -} +const int MAC_OS_VERSION_15_6 = 150600; -final class _C_float_complex extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array _Val; -} +const int MAC_OS_VERSION_16_0 = 160000; -final class _C_ldouble_complex extends ffi.Opaque {} +const int MAC_OS_VERSION_26_0 = 260000; -typedef _Dcomplex = _C_double_complex; -typedef _Fcomplex = _C_float_complex; -typedef _Lcomplex = _C_ldouble_complex; -typedef GoComplex64 = _Fcomplex; -typedef GoComplex128 = _Dcomplex; -typedef GoString = _GoString_; -typedef GoMap = ffi.Pointer; -typedef GoChan = ffi.Pointer; +const int MAC_OS_VERSION_26_1 = 260100; -final class GoInterface extends ffi.Struct { - external ffi.Pointer t; +const int MAC_OS_VERSION_26_2 = 260200; - external ffi.Pointer v; -} +const int MAC_OS_VERSION_26_3 = 260300; -final class GoSlice extends ffi.Struct { - external ffi.Pointer data; +const int MAC_OS_VERSION_26_4 = 260400; - @GoInt() - external int len; +const int __AVAILABILITY_VERSIONS_VERSION_HASH = 93585900; - @GoInt() - external int cap; -} +const String __AVAILABILITY_VERSIONS_VERSION_STRING = 'Local'; -const int _VCRT_COMPILER_PREPROCESSOR = 1; +const String __AVAILABILITY_FILE = 'AvailabilityVersions.h'; -const int _SAL_VERSION = 20; +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 260000; -const int __SAL_H_VERSION = 180000000; +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 260400; -const int _USE_DECLSPECS_FOR_SAL = 0; +const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; -const int _USE_ATTRIBUTES_FOR_SAL = 0; +const int __DARWIN_NSIG = 32; -const int _CRT_PACKING = 8; +const int NSIG = 32; -const int _VCRUNTIME_DISABLED_WARNINGS = 4514; +const int _ARM_SIGNAL_ = 1; -const int _HAS_EXCEPTIONS = 1; +const int SIGHUP = 1; -const int _WCHAR_T_DEFINED = 1; +const int SIGINT = 2; -const int NULL = 0; +const int SIGQUIT = 3; -const int _HAS_CXX17 = 0; +const int SIGILL = 4; -const int _HAS_CXX20 = 0; +const int SIGTRAP = 5; -const int _HAS_CXX23 = 0; +const int SIGABRT = 6; -const int _HAS_NODISCARD = 1; +const int SIGIOT = 6; -const int _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE = 1; +const int SIGEMT = 7; -const int _CRT_BUILD_DESKTOP_APP = 1; +const int SIGFPE = 8; -const int _UCRT_DISABLED_WARNINGS = 4324; +const int SIGKILL = 9; -const int _ARGMAX = 100; +const int SIGBUS = 10; -const int _TRUNCATE = -1; +const int SIGSEGV = 11; -const int _CRT_INT_MAX = 2147483647; +const int SIGSYS = 12; -const int _CRT_SIZE_MAX = -1; +const int SIGPIPE = 13; -const String __FILEW__ = 'C'; +const int SIGALRM = 14; -const int _CRT_FUNCTIONS_REQUIRED = 1; +const int SIGTERM = 15; -const int _CRT_HAS_CXX17 = 0; +const int SIGURG = 16; -const int _CRT_HAS_C11 = 0; +const int SIGSTOP = 17; -const int _CRT_INTERNAL_NONSTDC_NAMES = 1; +const int SIGTSTP = 18; -const int __STDC_SECURE_LIB__ = 200411; +const int SIGCONT = 19; -const int __GOT_SECURE_LIB__ = 200411; +const int SIGCHLD = 20; -const int __STDC_WANT_SECURE_LIB__ = 1; +const int SIGTTIN = 21; -const int _SECURECRT_FILL_BUFFER_PATTERN = 254; +const int SIGTTOU = 22; -const int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0; +const int SIGIO = 23; -const int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0; +const int SIGXCPU = 24; -const int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 1; +const int SIGXFSZ = 25; -const int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0; +const int SIGVTALRM = 26; -const int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0; +const int SIGPROF = 27; -const int _MAX_ITOSTR_BASE16_COUNT = 9; +const int SIGWINCH = 28; -const int _MAX_ITOSTR_BASE10_COUNT = 12; +const int SIGINFO = 29; -const int _MAX_ITOSTR_BASE8_COUNT = 12; +const int SIGUSR1 = 30; -const int _MAX_ITOSTR_BASE2_COUNT = 33; +const int SIGUSR2 = 31; -const int _MAX_LTOSTR_BASE16_COUNT = 9; +const int __DARWIN_OPAQUE_ARM_THREAD_STATE64 = 0; -const int _MAX_LTOSTR_BASE10_COUNT = 12; +const int SIGEV_NONE = 0; -const int _MAX_LTOSTR_BASE8_COUNT = 12; +const int SIGEV_SIGNAL = 1; -const int _MAX_LTOSTR_BASE2_COUNT = 33; +const int SIGEV_THREAD = 3; -const int _MAX_ULTOSTR_BASE16_COUNT = 9; +const int SIGEV_KEVENT = 4; -const int _MAX_ULTOSTR_BASE10_COUNT = 11; +const int ILL_NOOP = 0; -const int _MAX_ULTOSTR_BASE8_COUNT = 12; +const int ILL_ILLOPC = 1; -const int _MAX_ULTOSTR_BASE2_COUNT = 33; +const int ILL_ILLTRP = 2; -const int _MAX_I64TOSTR_BASE16_COUNT = 17; +const int ILL_PRVOPC = 3; -const int _MAX_I64TOSTR_BASE10_COUNT = 21; +const int ILL_ILLOPN = 4; -const int _MAX_I64TOSTR_BASE8_COUNT = 23; +const int ILL_ILLADR = 5; -const int _MAX_I64TOSTR_BASE2_COUNT = 65; +const int ILL_PRVREG = 6; -const int _MAX_U64TOSTR_BASE16_COUNT = 17; +const int ILL_COPROC = 7; -const int _MAX_U64TOSTR_BASE10_COUNT = 21; +const int ILL_BADSTK = 8; -const int _MAX_U64TOSTR_BASE8_COUNT = 23; +const int FPE_NOOP = 0; -const int _MAX_U64TOSTR_BASE2_COUNT = 65; +const int FPE_FLTDIV = 1; -const int CHAR_BIT = 8; +const int FPE_FLTOVF = 2; -const int SCHAR_MIN = -128; +const int FPE_FLTUND = 3; -const int SCHAR_MAX = 127; +const int FPE_FLTRES = 4; -const int UCHAR_MAX = 255; +const int FPE_FLTINV = 5; -const int CHAR_MIN = -128; +const int FPE_FLTSUB = 6; -const int CHAR_MAX = 127; +const int FPE_INTDIV = 7; -const int MB_LEN_MAX = 5; +const int FPE_INTOVF = 8; -const int SHRT_MIN = -32768; +const int SEGV_NOOP = 0; -const int SHRT_MAX = 32767; +const int SEGV_MAPERR = 1; -const int USHRT_MAX = 65535; +const int SEGV_ACCERR = 2; -const int INT_MIN = -2147483648; +const int BUS_NOOP = 0; -const int INT_MAX = 2147483647; +const int BUS_ADRALN = 1; -const int UINT_MAX = 4294967295; +const int BUS_ADRERR = 2; -const int LONG_MIN = -2147483648; +const int BUS_OBJERR = 3; -const int LONG_MAX = 2147483647; +const int TRAP_BRKPT = 1; -const int ULONG_MAX = 4294967295; +const int TRAP_TRACE = 2; -const int LLONG_MAX = 9223372036854775807; +const int CLD_NOOP = 0; -const int LLONG_MIN = -9223372036854775808; +const int CLD_EXITED = 1; -const int ULLONG_MAX = -1; +const int CLD_KILLED = 2; -const int _I8_MIN = -128; +const int CLD_DUMPED = 3; -const int _I8_MAX = 127; +const int CLD_TRAPPED = 4; -const int _UI8_MAX = 255; +const int CLD_STOPPED = 5; -const int _I16_MIN = -32768; +const int CLD_CONTINUED = 6; -const int _I16_MAX = 32767; +const int POLL_IN = 1; -const int _UI16_MAX = 65535; +const int POLL_OUT = 2; -const int _I32_MIN = -2147483648; +const int POLL_MSG = 3; -const int _I32_MAX = 2147483647; +const int POLL_ERR = 4; -const int _UI32_MAX = 4294967295; +const int POLL_PRI = 5; -const int _I64_MIN = -9223372036854775808; +const int POLL_HUP = 6; -const int _I64_MAX = 9223372036854775807; +const int SA_ONSTACK = 1; -const int _UI64_MAX = -1; +const int SA_RESTART = 2; -const int SIZE_MAX = -1; +const int SA_RESETHAND = 4; -const int RSIZE_MAX = 9223372036854775807; +const int SA_NOCLDSTOP = 8; -const int EXIT_SUCCESS = 0; +const int SA_NODEFER = 16; -const int EXIT_FAILURE = 1; +const int SA_NOCLDWAIT = 32; -const int _WRITE_ABORT_MSG = 1; +const int SA_SIGINFO = 64; -const int _CALL_REPORTFAULT = 2; +const int SA_USERTRAMP = 256; -const int _OUT_TO_DEFAULT = 0; +const int SA_64REGSET = 512; -const int _OUT_TO_STDERR = 1; +const int SA_USERSPACE_MASK = 127; -const int _OUT_TO_MSGBOX = 2; +const int SIG_BLOCK = 1; -const int _REPORT_ERRMODE = 3; +const int SIG_UNBLOCK = 2; -const int RAND_MAX = 32767; +const int SIG_SETMASK = 3; -const int _CVTBUFSIZE = 349; +const int SI_USER = 65537; -const int _MAX_PATH = 260; +const int SI_QUEUE = 65538; -const int _MAX_DRIVE = 3; +const int SI_TIMER = 65539; -const int _MAX_DIR = 256; +const int SI_ASYNCIO = 65540; -const int _MAX_FNAME = 256; +const int SI_MESGQ = 65541; -const int _MAX_EXT = 256; +const int SS_ONSTACK = 1; -const int _MAX_ENV = 32767; +const int SS_DISABLE = 4; -const int INT8_MIN = -128; +const int MINSIGSTKSZ = 32768; -const int INT16_MIN = -32768; +const int SIGSTKSZ = 131072; -const int INT32_MIN = -2147483648; +const int SV_ONSTACK = 1; -const int INT64_MIN = -9223372036854775808; +const int SV_INTERRUPT = 2; + +const int SV_RESETHAND = 4; + +const int SV_NODEFER = 16; + +const int SV_NOCLDSTOP = 8; + +const int SV_SIGINFO = 64; + +const int __WORDSIZE = 64; const int INT8_MAX = 127; @@ -6921,6 +6240,14 @@ const int INT32_MAX = 2147483647; const int INT64_MAX = 9223372036854775807; +const int INT8_MIN = -128; + +const int INT16_MIN = -32768; + +const int INT32_MIN = -2147483648; + +const int INT64_MIN = -9223372036854775808; + const int UINT8_MAX = 255; const int UINT16_MAX = 65535; @@ -6955,7 +6282,7 @@ const int UINT_LEAST64_MAX = -1; const int INT_FAST8_MIN = -128; -const int INT_FAST16_MIN = -2147483648; +const int INT_FAST16_MIN = -32768; const int INT_FAST32_MIN = -2147483648; @@ -6963,7 +6290,7 @@ const int INT_FAST64_MIN = -9223372036854775808; const int INT_FAST8_MAX = 127; -const int INT_FAST16_MAX = 2147483647; +const int INT_FAST16_MAX = 32767; const int INT_FAST32_MAX = 2147483647; @@ -6971,36 +6298,276 @@ const int INT_FAST64_MAX = 9223372036854775807; const int UINT_FAST8_MAX = 255; -const int UINT_FAST16_MAX = 4294967295; +const int UINT_FAST16_MAX = 65535; const int UINT_FAST32_MAX = 4294967295; const int UINT_FAST64_MAX = -1; -const int INTPTR_MIN = -9223372036854775808; - const int INTPTR_MAX = 9223372036854775807; -const int UINTPTR_MAX = -1; +const int INTPTR_MIN = -9223372036854775808; -const int INTMAX_MIN = -9223372036854775808; +const int UINTPTR_MAX = -1; const int INTMAX_MAX = 9223372036854775807; const int UINTMAX_MAX = -1; +const int INTMAX_MIN = -9223372036854775808; + const int PTRDIFF_MIN = -9223372036854775808; const int PTRDIFF_MAX = 9223372036854775807; +const int SIZE_MAX = -1; + +const int RSIZE_MAX = 9223372036854775807; + +const int WCHAR_MAX = 2147483647; + +const int WCHAR_MIN = -2147483648; + +const int WINT_MIN = -2147483648; + +const int WINT_MAX = 2147483647; + const int SIG_ATOMIC_MIN = -2147483648; const int SIG_ATOMIC_MAX = 2147483647; -const int WCHAR_MIN = 0; +const int PRIO_PROCESS = 0; + +const int PRIO_PGRP = 1; + +const int PRIO_USER = 2; + +const int PRIO_DARWIN_THREAD = 3; + +const int PRIO_DARWIN_PROCESS = 4; + +const int PRIO_MIN = -20; + +const int PRIO_MAX = 20; + +const int PRIO_DARWIN_BG = 4096; + +const int PRIO_DARWIN_NONUI = 4097; + +const int RUSAGE_SELF = 0; + +const int RUSAGE_CHILDREN = -1; + +const int RUSAGE_INFO_V0 = 0; + +const int RUSAGE_INFO_V1 = 1; + +const int RUSAGE_INFO_V2 = 2; + +const int RUSAGE_INFO_V3 = 3; + +const int RUSAGE_INFO_V4 = 4; + +const int RUSAGE_INFO_V5 = 5; + +const int RUSAGE_INFO_V6 = 6; + +const int RUSAGE_INFO_CURRENT = 6; + +const int RU_PROC_RUNS_RESLIDE = 1; + +const int RLIM_INFINITY = 9223372036854775807; + +const int RLIM_SAVED_MAX = 9223372036854775807; + +const int RLIM_SAVED_CUR = 9223372036854775807; + +const int RLIMIT_CPU = 0; + +const int RLIMIT_FSIZE = 1; + +const int RLIMIT_DATA = 2; + +const int RLIMIT_STACK = 3; + +const int RLIMIT_CORE = 4; + +const int RLIMIT_AS = 5; + +const int RLIMIT_RSS = 5; + +const int RLIMIT_MEMLOCK = 6; + +const int RLIMIT_NPROC = 7; + +const int RLIMIT_NOFILE = 8; + +const int RLIM_NLIMITS = 9; + +const int _RLIMIT_POSIX_FLAG = 4096; + +const int RLIMIT_WAKEUPS_MONITOR = 1; + +const int RLIMIT_CPU_USAGE_MONITOR = 2; + +const int RLIMIT_THREAD_CPULIMITS = 3; + +const int RLIMIT_FOOTPRINT_INTERVAL = 4; + +const int WAKEMON_ENABLE = 1; + +const int WAKEMON_DISABLE = 2; + +const int WAKEMON_GET_PARAMS = 4; + +const int WAKEMON_SET_DEFAULTS = 8; + +const int WAKEMON_MAKE_FATAL = 16; + +const int CPUMON_MAKE_FATAL = 4096; + +const int FOOTPRINT_INTERVAL_RESET = 1; + +const int IOPOL_TYPE_DISK = 0; + +const int IOPOL_TYPE_VFS_ATIME_UPDATES = 2; + +const int IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3; + +const int IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4; + +const int IOPOL_TYPE_VFS_TRIGGER_RESOLVE = 5; + +const int IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6; + +const int IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7; -const int WCHAR_MAX = 65535; +const int IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8; + +const int IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9; + +const int IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10; + +const int IOPOL_TYPE_VFS_ENTITLED_RESERVE_ACCESS = 14; + +const int IOPOL_SCOPE_PROCESS = 0; + +const int IOPOL_SCOPE_THREAD = 1; + +const int IOPOL_SCOPE_DARWIN_BG = 2; + +const int IOPOL_DEFAULT = 0; + +const int IOPOL_IMPORTANT = 1; + +const int IOPOL_PASSIVE = 2; + +const int IOPOL_THROTTLE = 3; + +const int IOPOL_UTILITY = 4; + +const int IOPOL_STANDARD = 5; + +const int IOPOL_APPLICATION = 5; + +const int IOPOL_NORMAL = 1; + +const int IOPOL_ATIME_UPDATES_DEFAULT = 0; + +const int IOPOL_ATIME_UPDATES_OFF = 1; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_ORIG = 4; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_BASIC_MASK = 3; + +const int IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0; + +const int IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1; + +const int IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT = 0; + +const int IOPOL_VFS_TRIGGER_RESOLVE_OFF = 1; + +const int IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0; + +const int IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1; + +const int IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0; + +const int IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1; + +const int IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0; + +const int IOPOL_VFS_SKIP_MTIME_UPDATE_ON = 1; + +const int IOPOL_VFS_SKIP_MTIME_UPDATE_IGNORE = 2; + +const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0; + +const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1; + +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0; + +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1; + +const int IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT = 0; + +const int IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON = 1; + +const int IOPOL_VFS_ENTITLED_RESERVE_ACCESS_OFF = 0; + +const int IOPOL_VFS_ENTITLED_RESERVE_ACCESS_ON = 1; + +const int WNOHANG = 1; + +const int WUNTRACED = 2; + +const int WCOREFLAG = 128; + +const int _WSTOPPED = 127; + +const int WEXITED = 4; + +const int WSTOPPED = 8; + +const int WCONTINUED = 16; + +const int WNOWAIT = 32; + +const int WAIT_ANY = -1; + +const int WAIT_MYPGRP = 0; + +const int _QUAD_HIGHWORD = 1; + +const int _QUAD_LOWWORD = 0; + +const int __DARWIN_LITTLE_ENDIAN = 1234; + +const int __DARWIN_BIG_ENDIAN = 4321; + +const int __DARWIN_PDP_ENDIAN = 3412; + +const int LITTLE_ENDIAN = 1234; + +const int BIG_ENDIAN = 4321; + +const int PDP_ENDIAN = 3412; + +const int __DARWIN_BYTE_ORDER = 1234; + +const int BYTE_ORDER = 1234; + +const int EXIT_FAILURE = 1; + +const int EXIT_SUCCESS = 0; -const int WINT_MIN = 0; +const int RAND_MAX = 2147483647; -const int WINT_MAX = 65535; +const int _MALLOC_TYPE_MALLOC_BACKDEPLOY_PUBLIC = 1; diff --git a/lib/lantern/lantern_platform_service.dart b/lib/lantern/lantern_platform_service.dart index 734c827544..302360f3d6 100644 --- a/lib/lantern/lantern_platform_service.dart +++ b/lib/lantern/lantern_platform_service.dart @@ -290,6 +290,99 @@ class LanternPlatformService implements LanternCoreService { } } + @override + Future> setPeerProxyEnabled(bool enabled) async { + try { + await _methodChannel.invokeMethod('setPeerProxyEnabled', { + 'enabled': enabled, + }); + return right(unit); + } catch (e, st) { + appLogger.error('setPeerProxyEnabled failed', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> isPeerProxyEnabled() async { + try { + final res = await _methodChannel.invokeMethod('isPeerProxyEnabled'); + return right(res ?? false); + } catch (e, st) { + appLogger.error('isPeerProxyEnabled failed', e, st); + return Left(e.toFailure()); + } + } + + // Manual port forward setting — wired through MethodChannel to the + // platform-specific handler. macOS / iOS Swift and Android Kotlin + // each delegate to Mobile.SetPeerManualPort via the gomobile binding. + @override + Future> setPeerManualPort(int port) async { + try { + await _methodChannel.invokeMethod('setPeerManualPort', { + 'port': port, + }); + return right(unit); + } catch (e, st) { + appLogger.error('setPeerManualPort failed', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> getPeerManualPort() async { + try { + final res = await _methodChannel.invokeMethod('getPeerManualPort'); + return right(res ?? 0); + } catch (e, st) { + appLogger.error('getPeerManualPort failed', e, st); + return Left(e.toFailure()); + } + } + + // Unbounded toggle wired through MethodChannel to the platform-specific + // handler. macOS / iOS Swift and Android Kotlin each delegate to + // Mobile.SetUnboundedEnabled via the gomobile binding. + @override + Future> setUnboundedEnabled(bool enabled) async { + try { + await _methodChannel.invokeMethod('setUnboundedEnabled', { + 'enabled': enabled, + }); + return right(unit); + } catch (e, st) { + appLogger.error('setUnboundedEnabled failed', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> isUnboundedEnabled() async { + try { + final res = await _methodChannel.invokeMethod('isUnboundedEnabled'); + return right(res ?? false); + } catch (e, st) { + appLogger.error('isUnboundedEnabled failed', e, st); + return Left(e.toFailure()); + } + } + + @override + Future> probeUPnP() async { + try { + // The Swift / Kotlin side calls Mobile.ProbeUPnP, which blocks + // up to ~6s on the M-SEARCH multicast scan. The MethodChannel + // call hops to a platform thread, so the Dart UI isolate isn't + // pinned during the wait. + final res = await _methodChannel.invokeMethod('probeUPnP'); + return right(res ?? false); + } catch (e, st) { + appLogger.error('probeUPnP failed', e, st); + return Left(e.toFailure()); + } + } + @override Future> isSmartRoutingEnabled() async { try { diff --git a/lib/lantern/lantern_service.dart b/lib/lantern/lantern_service.dart index 2f3ae8fa48..48c4eea31b 100644 --- a/lib/lantern/lantern_service.dart +++ b/lib/lantern/lantern_service.dart @@ -794,6 +794,62 @@ class LanternService implements LanternCoreService { return _platformService.setBlockAdsEnabled(enabled); } + @override + Future> isPeerProxyEnabled() { + if (PlatformUtils.isFFISupported) { + return _ffiService.isPeerProxyEnabled(); + } + return _platformService.isPeerProxyEnabled(); + } + + @override + Future> setPeerProxyEnabled(bool enabled) { + if (PlatformUtils.isFFISupported) { + return _ffiService.setPeerProxyEnabled(enabled); + } + return _platformService.setPeerProxyEnabled(enabled); + } + + @override + Future> setPeerManualPort(int port) { + if (PlatformUtils.isFFISupported) { + return _ffiService.setPeerManualPort(port); + } + return _platformService.setPeerManualPort(port); + } + + @override + Future> getPeerManualPort() { + if (PlatformUtils.isFFISupported) { + return _ffiService.getPeerManualPort(); + } + return _platformService.getPeerManualPort(); + } + + @override + Future> setUnboundedEnabled(bool enabled) { + if (PlatformUtils.isFFISupported) { + return _ffiService.setUnboundedEnabled(enabled); + } + return _platformService.setUnboundedEnabled(enabled); + } + + @override + Future> isUnboundedEnabled() { + if (PlatformUtils.isFFISupported) { + return _ffiService.isUnboundedEnabled(); + } + return _platformService.isUnboundedEnabled(); + } + + @override + Future> probeUPnP() { + if (PlatformUtils.isFFISupported) { + return _ffiService.probeUPnP(); + } + return _platformService.probeUPnP(); + } + @override Future> isSmartRoutingEnabled() { if (PlatformUtils.isFFISupported) { diff --git a/macos/Runner/Handlers/MethodHandler.swift b/macos/Runner/Handlers/MethodHandler.swift index d41e93e30d..c42a2bb306 100644 --- a/macos/Runner/Handlers/MethodHandler.swift +++ b/macos/Runner/Handlers/MethodHandler.swift @@ -245,6 +245,51 @@ class MethodHandler { let enabled = data?["enabled"] as? Bool ?? false self.setBlockAdsEnabled(result: result, enabled: enabled) + case "isPeerProxyEnabled": + Task { + await MainActor.run { result(MobileIsPeerShareEnabled()) } + } + + case "setPeerProxyEnabled": + // requireArg surfaces a FlutterError on missing/invalid + // argument shape rather than silently defaulting to false + // (which would disable sharing on caller bugs). + guard let enabled: Bool = requireArg(call: call, name: "enabled", result: result) else { return } + self.setPeerProxyEnabled(result: result, enabled: enabled) + + case "setPeerManualPort": + // requireArg surfaces a FlutterError on missing/invalid + // argument shape rather than silently defaulting to 0 + // (which has the real semantic of clearing the manual port + // override — caller bugs would silently wipe the user's + // setting). + guard let port: Int = requireArg(call: call, name: "port", result: result) else { return } + self.setPeerManualPort(result: result, port: port) + + case "getPeerManualPort": + Task { + await MainActor.run { result(Int(MobileGetPeerManualPort())) } + } + + case "setUnboundedEnabled": + guard let enabled: Bool = requireArg(call: call, name: "enabled", result: result) else { return } + self.setUnboundedEnabled(result: result, enabled: enabled) + + case "isUnboundedEnabled": + Task { + await MainActor.run { result(MobileIsUnboundedEnabled()) } + } + + case "probeUPnP": + // UPnP M-SEARCH multicast wait — up to ~6s in MobileProbeUPnP. + // Hop off the main actor (the Task default executor) so the + // wait doesn't stall the UI, then deliver the bool back on + // MainActor for the Flutter result callback. + Task.detached { + let available = MobileProbeUPnP() + await MainActor.run { result(available) } + } + case "updateTelemetryEvents": guard let consent: Bool = self.decodeValue(from: call.arguments, result: result) else { return @@ -1152,6 +1197,48 @@ class MethodHandler { } } + func setPeerProxyEnabled(result: @escaping FlutterResult, enabled: Bool) { + Task { + var error: NSError? + MobileSetPeerShareEnabled(enabled, &error) + if let error { + await self.handleFlutterError(error, result: result, code: "SET_PEER_PROXY_ERROR") + return + } + await MainActor.run { + result("ok") + } + } + } + + func setPeerManualPort(result: @escaping FlutterResult, port: Int) { + Task { + var error: NSError? + MobileSetPeerManualPort(port, &error) + if let error { + await self.handleFlutterError(error, result: result, code: "SET_PEER_MANUAL_PORT_ERROR") + return + } + await MainActor.run { + result("ok") + } + } + } + + func setUnboundedEnabled(result: @escaping FlutterResult, enabled: Bool) { + Task { + var error: NSError? + MobileSetUnboundedEnabled(enabled, &error) + if let error { + await self.handleFlutterError(error, result: result, code: "SET_UNBOUNDED_ENABLED_ERROR") + return + } + await MainActor.run { + result("ok") + } + } + } + func updateTelemetryEvents(consent: Bool, result: @escaping FlutterResult) { Task { var error: NSError? diff --git a/pubspec.lock b/pubspec.lock index aa05b04761..0f69884877 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -105,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + archive: + dependency: transitive + description: + name: archive + sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff + url: "https://pub.dev" + source: hosted + version: "4.0.9" args: dependency: transitive description: @@ -547,6 +555,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_earth_globe: + dependency: "direct main" + description: + name: flutter_earth_globe + sha256: a5461c43f4dbf1c1af4e8fa46293c83e97b8af7908969ccd6c324282e60d9a31 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_hooks: dependency: "direct main" description: @@ -832,7 +848,7 @@ packages: source: hosted version: "4.3.0" http: - dependency: transitive + dependency: "direct main" description: name: http sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" @@ -1076,6 +1092,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + lottie: + dependency: "direct main" + description: + name: lottie + sha256: "8b6359a7422167014aa73ce763fa133fb832065dcc0ac4d1dec1f603a5cef7d0" + url: "https://pub.dev" + source: hosted + version: "3.3.3" matcher: dependency: transitive description: @@ -1284,6 +1308,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.2" + posix: + dependency: transitive + description: + name: posix + sha256: "185ef7606574f789b40f289c233efa52e96dead518aed988e040a10737febb07" + url: "https://pub.dev" + source: hosted + version: "6.5.0" process: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b29849c89c..8c402c033d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -46,6 +46,9 @@ dependencies: #Routing auto_route: ^11.1.0 #UI Utils + flutter_earth_globe: ^2.2.0 + lottie: ^3.3.1 + http: ^1.2.2 animated_toggle_switch: ^0.8.7 animated_text_kit: ^4.3.0 flutter_screenutil: ^5.9.3 @@ -163,6 +166,7 @@ flutter: platforms: - windows - assets/locales/ + - assets/unbounded/ - app.env ffigen: