New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@devvit/multiplatform

Package Overview
Dependencies
Maintainers
0
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devvit/multiplatform - npm Package Compare versions

Comparing version 0.0.1-20240809-32e26145 to 0.0.1-20240814-a6381ebc

33

kotlin/ui-shared-shared.d.ts

@@ -39,2 +39,4 @@ type Nullable<T> = T | null | undefined

set featureFlags(value: FeatureFlags);
get performanceAnalyticsDelegate(): PerformanceAnalyticsDelegate;
set performanceAnalyticsDelegate(value: PerformanceAnalyticsDelegate);
}

@@ -73,2 +75,32 @@ export declare class DispatcherSnapshot<State, Event, RuntimeSnapshot, TimerSnapshot> {

}
export declare class BaseTrace {
constructor(spanName: string, durationMs: string);
get spanName(): string;
get durationMs(): string;
}
export declare class ErrorInfo {
constructor(message: string, origin: string, version: string);
get message(): string;
get origin(): string;
get version(): string;
}
export declare interface PerformanceAnalyticsDelegate {
logRuntimeTrace(runtimeTrace: RuntimeTrace): void;
logRuntimeError(errorInfo: ErrorInfo): void;
readonly __doNotUseOrImplementIt: {
readonly "net.devvit.analytics.PerformanceAnalyticsDelegate": unique symbol;
};
}
export declare class NoOpPerformanceAnalyticsDelegate implements PerformanceAnalyticsDelegate {
constructor();
logRuntimeTrace(runtimeTrace: RuntimeTrace): void;
logRuntimeError(errorInfo: ErrorInfo): void;
readonly __doNotUseOrImplementIt: PerformanceAnalyticsDelegate["__doNotUseOrImplementIt"];
}
export declare class RuntimeTrace extends BaseTrace {
constructor(spanName: string, durationMs: string, intent: string, target: string, eventCount: number);
get intent(): string;
get target(): string;
get eventCount(): number;
}
export declare class TimerDefinition {

@@ -97,2 +129,3 @@ constructor(id: string, duration: number);

featureFlags: FeatureFlags;
performanceAnalyticsDelegate: PerformanceAnalyticsDelegate;
}

@@ -99,0 +132,0 @@ export declare interface Event {

586

kotlin/ui-shared-shared.js

@@ -29,5 +29,8 @@ import {

objectMeta213120oau977m as objectMeta,
interfaceMeta1u1l5puptm1ve as interfaceMeta,
getStringHashCode26igk1bx568vk as getStringHashCode,
Long2qws0ah9gnpki as Long,
ArrayList_init_$Create$1s1wkrw82c0iw as ArrayList_init_$Create$_0,
to2cs3ny02qtbcb as to,
numberToLong1a4cndvg6c52s as numberToLong,
} from './kotlin-kotlin-stdlib.js';

@@ -49,2 +52,7 @@ //region block: imports

setMetadataFor(NoOpUnsubscriber, 'NoOpUnsubscriber', objectMeta);
setMetadataFor(BaseTrace, 'BaseTrace', classMeta);
setMetadataFor(ErrorInfo, 'ErrorInfo', classMeta);
setMetadataFor(PerformanceAnalyticsDelegate, 'PerformanceAnalyticsDelegate', interfaceMeta);
setMetadataFor(NoOpPerformanceAnalyticsDelegate, 'NoOpPerformanceAnalyticsDelegate', classMeta, VOID, [PerformanceAnalyticsDelegate], NoOpPerformanceAnalyticsDelegate);
setMetadataFor(RuntimeTrace, 'RuntimeTrace', classMeta, BaseTrace);
setMetadataFor(Disabled, 'Disabled', objectMeta);

@@ -54,2 +62,4 @@ setMetadataFor(NiceLogger, 'NiceLogger', classMeta);

setMetadataFor(TimerDefinition, 'TimerDefinition', classMeta);
setMetadataFor(Span, 'Span', classMeta);
setMetadataFor(Tracer, 'Tracer', objectMeta);
setMetadataFor(JsDispatcherImpl, 'JsDispatcherImpl', classMeta, DispatcherImpl);

@@ -60,5 +70,5 @@ setMetadataFor(JsRequestBuilderAdapter, 'JsRequestBuilderAdapter', classMeta);

function OneAtATimeAssembler(logger) {
this.w5_1 = logger;
this.x5_1 = logger;
}
protoOf(OneAtATimeAssembler).x5 = function (queue, mode) {
protoOf(OneAtATimeAssembler).y5 = function (queue, mode) {
var tmp;

@@ -68,4 +78,4 @@ if (queue.r()) {

} else {
var item = queue.i5();
this.w5_1.z5([mode, 'building batch of ', item]);
var item = queue.j5();
this.x5_1.a6([mode, 'building batch of ', item]);
tmp = listOf(item);

@@ -80,21 +90,21 @@ }

}
protoOf(SubscribeCallbackParams).a6 = function () {
protoOf(SubscribeCallbackParams).b6 = function () {
return this.request;
};
protoOf(SubscribeCallbackParams).b6 = function () {
protoOf(SubscribeCallbackParams).c6 = function () {
return this.response;
};
protoOf(SubscribeCallbackParams).c6 = function () {
protoOf(SubscribeCallbackParams).d6 = function () {
return this.mode;
};
protoOf(SubscribeCallbackParams).d6 = function () {
protoOf(SubscribeCallbackParams).e6 = function () {
return this.request;
};
protoOf(SubscribeCallbackParams).e6 = function () {
protoOf(SubscribeCallbackParams).f6 = function () {
return this.response;
};
protoOf(SubscribeCallbackParams).f6 = function () {
protoOf(SubscribeCallbackParams).g6 = function () {
return this.mode;
};
protoOf(SubscribeCallbackParams).g6 = function (request, response, mode) {
protoOf(SubscribeCallbackParams).h6 = function (request, response, mode) {
return new SubscribeCallbackParams(request, response, mode);

@@ -106,3 +116,3 @@ };

mode = mode === VOID ? this.mode : mode;
return this.g6(request, response, mode);
return this.h6(request, response, mode);
};

@@ -177,11 +187,11 @@ protoOf(SubscribeCallbackParams).toString = function () {

function Callback(success, failure) {
this.j6_1 = success;
this.k6_1 = failure;
this.k6_1 = success;
this.l6_1 = failure;
}
protoOf(Callback).toString = function () {
return 'Callback(success=' + this.j6_1 + ', failure=' + this.k6_1 + ')';
return 'Callback(success=' + this.k6_1 + ', failure=' + this.l6_1 + ')';
};
protoOf(Callback).hashCode = function () {
var result = hashCode(this.j6_1);
result = imul(result, 31) + hashCode(this.k6_1) | 0;
var result = hashCode(this.k6_1);
result = imul(result, 31) + hashCode(this.l6_1) | 0;
return result;

@@ -195,10 +205,10 @@ };

var tmp0_other_with_cast = other instanceof Callback ? other : THROW_CCE();
if (!equals(this.j6_1, tmp0_other_with_cast.j6_1))
return false;
if (!equals(this.k6_1, tmp0_other_with_cast.k6_1))
return false;
if (!equals(this.l6_1, tmp0_other_with_cast.l6_1))
return false;
return true;
};
function _get_local__en0sai($this) {
var tmp = $this.a7_1;
var tmp = $this.b7_1;
if (!(tmp == null))

@@ -211,3 +221,3 @@ return tmp;

function _get_remote__f6fj3v($this) {
var tmp = $this.b7_1;
var tmp = $this.c7_1;
if (!(tmp == null))

@@ -220,3 +230,3 @@ return tmp;

function _get_timers__g2d3wd($this) {
var tmp = $this.c7_1;
var tmp = $this.d7_1;
if (!(tmp == null))

@@ -230,5 +240,5 @@ return tmp;

resetSpeculation($this);
$this.h7_1 = true;
$this.q6_1.z5(['recalculateSpeculativeWork']);
var iterator = $this.u6_1.j();
$this.i7_1 = true;
$this.r6_1.a6(['recalculateSpeculativeWork']);
var iterator = $this.v6_1.j();
var index = 0;

@@ -243,17 +253,17 @@ $l$loop_1: while (iterator.k()) {

continue $l$loop_1;
if ($this.w6_1.d5_1 > 10)
if ($this.x6_1.e5_1 > 10)
break $l$loop_1;
$this.w6_1.g(item);
$this.x6_1.g(item);
}
$this.q6_1.z5(['Speculative queue size: ' + $this.w6_1.d5_1 + ' / ' + $this.w6_1]);
$this.r6_1.a6(['Speculative queue size: ' + $this.x6_1.e5_1 + ' / ' + $this.x6_1]);
}
function cancelSpeculation($this) {
$this.q6_1.z5(['cancelSpeculation']);
$this.h7_1 = false;
$this.r6_1.a6(['cancelSpeculation']);
$this.i7_1 = false;
resetSpeculation($this);
}
function resetSpeculation($this) {
$this.w6_1.l5();
$this.e7_1 = $this.n6_1.clone($this.state);
$this.f7_1 = $this.f7_1 + 1 | 0;
$this.x6_1.m5();
$this.f7_1 = $this.o6_1.clone($this.state);
$this.g7_1 = $this.g7_1 + 1 | 0;
}

@@ -264,26 +274,27 @@ function processBatch($this, batch, mode) {

}
$this.q6_1.z5([mode, 'processing batch of size:' + batch.o(), batch]);
$this.r6_1.a6([mode, 'processing batch of size:' + batch.o(), batch]);
var firstEvent = first(batch);
var isRemote = firstEvent.scope.equals(EventScope_REMOTE_getInstance()) ? true : supportsRemote(firstEvent.scope) ? !_get_local__en0sai($this).isReady() : false;
if (mode.equals(Mode_SYNC_getInstance()))
$this.x6_1 = true;
var request = $this.m6_1.i7(mode.equals(Mode_SPEC_getInstance()) ? $this.e7_1 : $this.state, batch);
$this.y6_1 = true;
var request = $this.n6_1.j7(mode.equals(Mode_SPEC_getInstance()) ? $this.f7_1 : $this.state, batch);
var runtime = isRemote ? _get_remote__f6fj3v($this) : _get_local__en0sai($this);
var tmp1 = $this.r6_1;
$this.r6_1 = tmp1 + 1 | 0;
var tmp1 = $this.s6_1;
$this.s6_1 = tmp1 + 1 | 0;
var requestId = tmp1;
var intendedGeneration = $this.f7_1;
var tmp = DispatcherImpl$processBatch$lambda($this, mode, isRemote, requestId, intendedGeneration, request);
var cbs = new Callback(tmp, DispatcherImpl$processBatch$lambda_0($this, mode, isRemote, requestId, batch));
var intendedGeneration = $this.g7_1;
var processRequestSpan = Tracer_instance.k7('runtime_trace');
var tmp = DispatcherImpl$processBatch$lambda($this, mode, isRemote, processRequestSpan, batch, requestId, intendedGeneration, request);
var cbs = new Callback(tmp, DispatcherImpl$processBatch$lambda_0($this, mode, isRemote, processRequestSpan, batch, requestId));
// Inline function 'kotlin.collections.set' call
$this.y6_1.g1(requestId, cbs);
$this.q6_1.z5(['handle runtime request', request]);
runtime.handle($this.o6_1, request, cbs.j6_1, cbs.k6_1);
$this.z6_1.g1(requestId, cbs);
$this.r6_1.a6(['handle runtime request', request]);
runtime.handle($this.p6_1, request, cbs.k6_1, cbs.l6_1);
}
function reset($this, isResettingTimers) {
$this.h7_1 = $this.g7_1;
$this.x6_1 = false;
$this.state = $this.n6_1.clone($this.d7_1);
$this.v6_1.l5();
$this.u6_1.l5();
$this.i7_1 = $this.h7_1;
$this.y6_1 = false;
$this.state = $this.o6_1.clone($this.e7_1);
$this.w6_1.m5();
$this.v6_1.m5();
_get_local__en0sai($this).reset();

@@ -304,4 +315,4 @@ _get_remote__f6fj3v($this).reset();

var e = $p;
$this.q6_1.j7([e]);
$this.p6_1.errorHandler(e);
$this.r6_1.l7([e]);
$this.q6_1.errorHandler(e);
tmp_0 = default_0;

@@ -322,7 +333,7 @@ } else {

return function () {
this$0.q6_1.z5(['Initializing Dispatcher', $local, $remote]);
this$0.a7_1 = $local;
this$0.b7_1 = $remote;
this$0.c7_1 = $timers;
this$0.k7();
this$0.r6_1.a6(['Initializing Dispatcher', $local, $remote]);
this$0.b7_1 = $local;
this$0.c7_1 = $remote;
this$0.d7_1 = $timers;
this$0.m7();
return Unit_instance;

@@ -332,7 +343,7 @@ };

function DispatcherImpl$subscribe$1$1(this$0, $typedCallback) {
this.l7_1 = this$0;
this.m7_1 = $typedCallback;
this.n7_1 = this$0;
this.o7_1 = $typedCallback;
}
protoOf(DispatcherImpl$subscribe$1$1).unsubscribe = function () {
this.l7_1.z6_1.h(this.m7_1);
this.n7_1.a7_1.h(this.o7_1);
};

@@ -342,17 +353,19 @@ function DispatcherImpl$subscribe$lambda($callback, this$0) {

var typedCallback = typeof $callback === 'function' ? $callback : THROW_CCE();
this$0.z6_1.g(typedCallback);
this$0.a7_1.g(typedCallback);
return new DispatcherImpl$subscribe$1$1(this$0, typedCallback);
};
}
function DispatcherImpl$processBatch$lambda(this$0, $mode, $isRemote, $requestId, $intendedGeneration, $request) {
function DispatcherImpl$processBatch$lambda(this$0, $mode, $isRemote, $processRequestSpan, $batch, $requestId, $intendedGeneration, $request) {
return function (rsp) {
this$0.q6_1.z5([$mode, $isRemote ? 'remote' : 'local', 'runtime success', rsp]);
this$0.y6_1.h1($requestId);
this$0.r6_1.a6([$mode, $isRemote ? 'remote' : 'local', 'runtime success', rsp]);
$processRequestSpan.s7();
logRuntimeTrace(this$0.q6_1.performanceAnalyticsDelegate, $processRequestSpan, $isRemote, '', $batch.o());
this$0.z6_1.h1($requestId);
var tmp;
if ($mode.equals(Mode_SPEC_getInstance()) ? !(this$0.f7_1 === $intendedGeneration) : false) {
this$0.q6_1.z5(['throwing away stale speculative results']);
if ($mode.equals(Mode_SPEC_getInstance()) ? !(this$0.g7_1 === $intendedGeneration) : false) {
this$0.r6_1.a6(['throwing away stale speculative results']);
return Unit_instance;
}
this$0.q6_1.z5([$mode, 'responding', new SubscribeCallbackParams($request, rsp, $mode)]);
var tmp0_iterator = this$0.z6_1.j();
this$0.r6_1.a6([$mode, 'responding', new SubscribeCallbackParams($request, rsp, $mode)]);
var tmp0_iterator = this$0.a7_1.j();
while (tmp0_iterator.k()) {

@@ -365,32 +378,37 @@ var element = tmp0_iterator.m();

if ($mode.equals(Mode_SYNC_getInstance())) {
this$0.state = this$0.n6_1.merge(this$0.state, rsp.state);
this$0.x6_1 = false;
this$0.state = this$0.o6_1.merge(this$0.state, rsp.state);
this$0.y6_1 = false;
tmp_0 = Unit_instance;
} else if ($mode.equals(Mode_SPEC_getInstance())) {
this$0.e7_1 = this$0.n6_1.merge(this$0.e7_1, rsp.state);
this$0.f7_1 = this$0.o6_1.merge(this$0.f7_1, rsp.state);
tmp_0 = Unit_instance;
}
this$0.n7(toList(rsp.replay), $mode);
this$0.t7(toList(rsp.replay), $mode);
var tmp_1;
if ($mode.equals(Mode_SYNC_getInstance()) ? this$0.g7_1 : false) {
if ($mode.equals(Mode_SYNC_getInstance()) ? this$0.h7_1 : false) {
recalculateSpeculativeWork(this$0);
tmp_1 = Unit_instance;
}
this$0.k7();
this$0.m7();
return Unit_instance;
};
}
function DispatcherImpl$processBatch$lambda_0(this$0, $mode, $isRemote, $requestId, $batch) {
function DispatcherImpl$processBatch$lambda_0(this$0, $mode, $isRemote, $processRequestSpan, $batch, $requestId) {
return function (err) {
this$0.q6_1.z5([$mode, $isRemote ? 'remote' : 'local', 'runtime error', err]);
this$0.y6_1.h1($requestId);
var tmp;
this$0.r6_1.a6([$mode, $isRemote ? 'remote' : 'local', 'runtime error', err]);
$processRequestSpan.s7();
logRuntimeTrace(this$0.q6_1.performanceAnalyticsDelegate, $processRequestSpan, $isRemote, '', $batch.o());
var tmp = this$0.q6_1.performanceAnalyticsDelegate;
var tmp0_elvis_lhs = err.message;
logRuntimeError(tmp, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, $isRemote, '');
this$0.z6_1.h1($requestId);
var tmp_0;
if ($mode.equals(Mode_SYNC_getInstance())) {
this$0.x6_1 = false;
tmp = Unit_instance;
this$0.y6_1 = false;
tmp_0 = Unit_instance;
}
var tmp_0;
var tmp_1;
if ($mode.equals(Mode_SPEC_getInstance())) {
cancelSpeculation(this$0);
this$0.k7();
this$0.m7();
return Unit_instance;

@@ -409,3 +427,3 @@ }

var value = destination.p1(key);
var tmp_1;
var tmp_2;
if (value == null) {

@@ -415,11 +433,11 @@ // Inline function 'kotlin.collections.groupByTo.<anonymous>' call

destination.g1(key, answer);
tmp_1 = answer;
tmp_2 = answer;
} else {
tmp_1 = value;
tmp_2 = value;
}
var list = tmp_1;
var list = tmp_2;
list.g(element);
}
var replayable = destination;
var tmp_2;
var tmp_3;
// Inline function 'kotlin.collections.isNullOrEmpty' call

@@ -430,9 +448,9 @@ var this_1 = replayable.p1(false);

// Inline function 'kotlin.collections.toTypedArray' call
var tmp0_elvis_lhs = replayable.p1(false);
var this_2 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
var tmp1_elvis_lhs = replayable.p1(false);
var this_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
var events = copyToArray(this_2);
this$0.q6_1.z5(arrayConcat([['unretryable events', err], events]));
tmp_2 = this$0.p6_1.errorHandler(err);
this$0.r6_1.a6(arrayConcat([['unretryable events', err], events]));
tmp_3 = this$0.q6_1.errorHandler(err);
}
var tmp_3;
var tmp_4;
// Inline function 'kotlin.collections.isNullOrEmpty' call

@@ -442,8 +460,8 @@ var this_3 = replayable.p1(true);

if (!(this_3 == null ? true : this_3.r())) {
var tmp1_safe_receiver = replayable.p1(true);
if (tmp1_safe_receiver == null)
var tmp2_safe_receiver = replayable.p1(true);
if (tmp2_safe_receiver == null)
null;
else {
// Inline function 'kotlin.collections.forEach' call
var tmp0_iterator_0 = tmp1_safe_receiver.j();
var tmp0_iterator_0 = tmp2_safe_receiver.j();
while (tmp0_iterator_0.k()) {

@@ -456,9 +474,9 @@ var element_0 = tmp0_iterator_0.m();

}
var tmp2_elvis_lhs = replayable.p1(true);
this$0.n7(tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, $mode);
if ($mode.equals(Mode_SYNC_getInstance()) ? this$0.g7_1 : false) {
var tmp3_elvis_lhs = replayable.p1(true);
this$0.t7(tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs, $mode);
if ($mode.equals(Mode_SYNC_getInstance()) ? this$0.h7_1 : false) {
recalculateSpeculativeWork(this$0);
}
this$0.k7();
tmp_3 = Unit_instance;
this$0.m7();
tmp_4 = Unit_instance;
}

@@ -470,4 +488,4 @@ return Unit_instance;

return function () {
this$0.q6_1.z5(arrayConcat([['submitted events'], $events]));
var deduped = this$0.s6_1.o7(toList($events));
this$0.r6_1.a6(arrayConcat([['submitted events'], $events]));
var deduped = this$0.t6_1.u7(toList($events));
var tmp0_iterator = deduped.j();

@@ -478,11 +496,11 @@ while (tmp0_iterator.k()) {

if (element.async === true) {
this$0.w6_1.g(element);
} else {
this$0.v6_1.g(element);
} else {
this$0.u6_1.g(element);
if (this$0.x6_1 ? this$0.h7_1 : false) {
this$0.w6_1.g(element);
if (this$0.y6_1 ? this$0.i7_1 : false) {
this$0.x6_1.g(element);
}
}
}
this$0.k7();
this$0.m7();
return Unit_instance;

@@ -499,9 +517,9 @@ };

return function () {
this$0.state = this$0.n6_1.clone($snap.state);
this$0.v6_1.l5();
this$0.state = this$0.o6_1.clone($snap.state);
this$0.w6_1.m5();
var tmp = $snap.asyncQueue;
addAll(this$0.v6_1, isArray(tmp) ? tmp : THROW_CCE());
this$0.u6_1.l5();
addAll(this$0.w6_1, isArray(tmp) ? tmp : THROW_CCE());
this$0.v6_1.m5();
var tmp_0 = $snap.syncQueue;
addAll(this$0.u6_1, isArray(tmp_0) ? tmp_0 : THROW_CCE());
addAll(this$0.v6_1, isArray(tmp_0) ? tmp_0 : THROW_CCE());
cancelSpeculation(this$0);

@@ -517,44 +535,44 @@ _get_local__en0sai(this$0).resume($snap.localSnapshot);

options = options === VOID ? new EmptyOptions() : options;
this.l6_1 = state;
this.m6_1 = requestBuilder;
this.n6_1 = stateOperations;
this.o6_1 = method;
this.p6_1 = options;
this.q6_1 = new NiceLogger(this.p6_1.logger);
this.r6_1 = 0;
this.m6_1 = state;
this.n6_1 = requestBuilder;
this.o6_1 = stateOperations;
this.p6_1 = method;
this.q6_1 = options;
this.r6_1 = new NiceLogger(this.q6_1.logger);
this.s6_1 = 0;
var tmp = this;
tmp.s6_1 = new LocalEventsDeduper(DispatcherImpl$deduper$lambda(this), this.q6_1);
this.t6_1 = new OneAtATimeAssembler(this.q6_1);
this.u6_1 = ArrayDeque_init_$Create$();
tmp.t6_1 = new LocalEventsDeduper(DispatcherImpl$deduper$lambda(this), this.r6_1);
this.u6_1 = new OneAtATimeAssembler(this.r6_1);
this.v6_1 = ArrayDeque_init_$Create$();
this.w6_1 = ArrayDeque_init_$Create$();
this.x6_1 = false;
this.x6_1 = ArrayDeque_init_$Create$();
this.y6_1 = false;
var tmp_0 = this;
// Inline function 'kotlin.collections.mutableMapOf' call
tmp_0.y6_1 = LinkedHashMap_init_$Create$();
tmp_0.z6_1 = LinkedHashMap_init_$Create$();
var tmp_1 = this;
// Inline function 'kotlin.collections.mutableListOf' call
tmp_1.z6_1 = ArrayList_init_$Create$();
this.d7_1 = this.n6_1.clone(this.state);
this.e7_1 = this.n6_1.clone(this.d7_1);
this.f7_1 = 0;
this.g7_1 = this.p6_1.featureFlags.isSpeculativeExecutionEnabled;
this.h7_1 = this.g7_1;
this.q6_1.z5(['Constructed KMP Dispatcher']);
tmp_1.a7_1 = ArrayList_init_$Create$();
this.e7_1 = this.o6_1.clone(this.state);
this.f7_1 = this.o6_1.clone(this.e7_1);
this.g7_1 = 0;
this.h7_1 = this.q6_1.featureFlags.isSpeculativeExecutionEnabled;
this.i7_1 = this.h7_1;
this.r6_1.a6(['Constructed KMP Dispatcher']);
}
protoOf(DispatcherImpl).p7 = function (_set____db54di) {
this.l6_1 = _set____db54di;
protoOf(DispatcherImpl).v7 = function (_set____db54di) {
this.m6_1 = _set____db54di;
};
protoOf(DispatcherImpl).q7 = function () {
return this.l6_1;
protoOf(DispatcherImpl).w7 = function () {
return this.m6_1;
};
protoOf(DispatcherImpl).r7 = function () {
return this.u6_1;
};
protoOf(DispatcherImpl).s7 = function () {
protoOf(DispatcherImpl).x7 = function () {
return this.v6_1;
};
protoOf(DispatcherImpl).t7 = function () {
protoOf(DispatcherImpl).y7 = function () {
return this.w6_1;
};
protoOf(DispatcherImpl).z7 = function () {
return this.x6_1;
};
protoOf(DispatcherImpl).init = function (local, remote, timers) {

@@ -567,28 +585,28 @@ attemptAndCatch(this, Unit_instance, DispatcherImpl$init$lambda(this, local, remote, timers));

};
protoOf(DispatcherImpl).k7 = function () {
this.q6_1.z5(['ticking', 'syncInFlight ' + this.x6_1, 'asyncQueue.size ' + this.v6_1.d5_1, 'syncQueue.size ' + this.u6_1.d5_1, 'speculativeQueue.size ' + this.w6_1.d5_1]);
if ((!_get_local__en0sai(this).isReady() ? !_get_remote__f6fj3v(this).isReady() : false) ? !(this.u6_1.r() ? this.v6_1.r() : false) : false) {
this.q6_1.u7(['ticking with events and no runtime, deferring...']);
protoOf(DispatcherImpl).m7 = function () {
this.r6_1.a6(['ticking', 'syncInFlight ' + this.y6_1, 'asyncQueue.size ' + this.w6_1.e5_1, 'syncQueue.size ' + this.v6_1.e5_1, 'speculativeQueue.size ' + this.x6_1.e5_1]);
if ((!_get_local__en0sai(this).isReady() ? !_get_remote__f6fj3v(this).isReady() : false) ? !(this.v6_1.r() ? this.w6_1.r() : false) : false) {
this.r6_1.a8(['ticking with events and no runtime, deferring...']);
return Unit_instance;
}
if (!this.x6_1) {
var batch = this.t6_1.x5(this.u6_1, Mode_SYNC_getInstance());
if (!this.y6_1) {
var batch = this.u6_1.y5(this.v6_1, Mode_SYNC_getInstance());
processBatch(this, batch, Mode_SYNC_getInstance());
} else if (this.h7_1) {
var batch_0 = this.t6_1.x5(this.w6_1, Mode_SPEC_getInstance());
} else if (this.i7_1) {
var batch_0 = this.u6_1.y5(this.x6_1, Mode_SPEC_getInstance());
processBatch(this, batch_0, Mode_SPEC_getInstance());
}
if (!this.v6_1.r()) {
while (!this.v6_1.r()) {
var batch_1 = this.t6_1.x5(this.v6_1, Mode_ASYNC_getInstance());
if (!this.w6_1.r()) {
while (!this.w6_1.r()) {
var batch_1 = this.u6_1.y5(this.w6_1, Mode_ASYNC_getInstance());
processBatch(this, batch_1, Mode_ASYNC_getInstance());
}
this.k7();
this.m7();
}
};
protoOf(DispatcherImpl).n7 = function (events, fromMode) {
protoOf(DispatcherImpl).t7 = function (events, fromMode) {
if (events.r() ? true : fromMode.equals(Mode_SPEC_getInstance())) {
return Unit_instance;
}
this.q6_1.z5(['replaying ' + events.o() + ' events', events]);
this.r6_1.a6(['replaying ' + events.o() + ' events', events]);
// Inline function 'kotlin.collections.groupBy' call

@@ -618,9 +636,9 @@ // Inline function 'kotlin.collections.groupByTo' call

var tmp0_elvis_lhs = grouped.p1(new Pair(true, true));
this.v6_1.k5(0, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
this.w6_1.l5(0, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
var tmp1_elvis_lhs = grouped.p1(new Pair(true, false));
this.v6_1.n(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs);
this.w6_1.n(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs);
var tmp2_elvis_lhs = grouped.p1(new Pair(false, true));
this.u6_1.k5(0, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
this.v6_1.l5(0, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
var tmp3_elvis_lhs = grouped.p1(new Pair(false, false));
this.u6_1.n(tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs);
this.v6_1.n(tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs);
};

@@ -634,8 +652,8 @@ protoOf(DispatcherImpl).submit = function (events) {

protoOf(DispatcherImpl).snapshot = function () {
var tmp = this.n6_1.clone(this.state);
var tmp = this.o6_1.clone(this.state);
// Inline function 'kotlin.collections.toTypedArray' call
var this_0 = this.u6_1;
var this_0 = this.v6_1;
var tmp_0 = copyToArray(this_0);
// Inline function 'kotlin.collections.toTypedArray' call
var this_1 = this.v6_1;
var this_1 = this.w6_1;
var tmp$ret$1 = copyToArray(this_1);

@@ -657,25 +675,32 @@ return new DispatcherSnapshot(tmp, tmp_0, tmp$ret$1, _get_local__en0sai(this).snapshot(), _get_remote__f6fj3v(this).snapshot(), _get_timers__g2d3wd(this).list());

function EmptyOptions() {
this.v7_1 = new NoOpLogger();
this.b8_1 = new NoOpLogger();
var tmp = this;
tmp.w7_1 = EmptyOptions$errorHandler$lambda;
this.x7_1 = Disabled_instance;
tmp.c8_1 = EmptyOptions$errorHandler$lambda;
this.d8_1 = Disabled_instance;
this.e8_1 = new NoOpPerformanceAnalyticsDelegate();
}
protoOf(EmptyOptions).y7 = function (_set____db54di) {
this.v7_1 = _set____db54di;
protoOf(EmptyOptions).f8 = function (_set____db54di) {
this.b8_1 = _set____db54di;
};
protoOf(EmptyOptions).z7 = function () {
return this.v7_1;
protoOf(EmptyOptions).g8 = function () {
return this.b8_1;
};
protoOf(EmptyOptions).a8 = function (_set____db54di) {
this.w7_1 = _set____db54di;
protoOf(EmptyOptions).h8 = function (_set____db54di) {
this.c8_1 = _set____db54di;
};
protoOf(EmptyOptions).b8 = function () {
return this.w7_1;
protoOf(EmptyOptions).i8 = function () {
return this.c8_1;
};
protoOf(EmptyOptions).c8 = function (_set____db54di) {
this.x7_1 = _set____db54di;
protoOf(EmptyOptions).j8 = function (_set____db54di) {
this.d8_1 = _set____db54di;
};
protoOf(EmptyOptions).d8 = function () {
return this.x7_1;
protoOf(EmptyOptions).k8 = function () {
return this.d8_1;
};
protoOf(EmptyOptions).l8 = function (_set____db54di) {
this.e8_1 = _set____db54di;
};
protoOf(EmptyOptions).m8 = function () {
return this.e8_1;
};
function DispatcherSnapshot(state, syncQueue, asyncQueue, localSnapshot, remoteSnapshot, timerSnapshot) {

@@ -689,39 +714,39 @@ this.state = state;

}
protoOf(DispatcherSnapshot).q7 = function () {
protoOf(DispatcherSnapshot).w7 = function () {
return this.state;
};
protoOf(DispatcherSnapshot).r7 = function () {
protoOf(DispatcherSnapshot).x7 = function () {
return this.syncQueue;
};
protoOf(DispatcherSnapshot).s7 = function () {
protoOf(DispatcherSnapshot).y7 = function () {
return this.asyncQueue;
};
protoOf(DispatcherSnapshot).e8 = function () {
protoOf(DispatcherSnapshot).n8 = function () {
return this.localSnapshot;
};
protoOf(DispatcherSnapshot).f8 = function () {
protoOf(DispatcherSnapshot).o8 = function () {
return this.remoteSnapshot;
};
protoOf(DispatcherSnapshot).g8 = function () {
protoOf(DispatcherSnapshot).p8 = function () {
return this.timerSnapshot;
};
protoOf(DispatcherSnapshot).d6 = function () {
protoOf(DispatcherSnapshot).e6 = function () {
return this.state;
};
protoOf(DispatcherSnapshot).e6 = function () {
protoOf(DispatcherSnapshot).f6 = function () {
return this.syncQueue;
};
protoOf(DispatcherSnapshot).f6 = function () {
protoOf(DispatcherSnapshot).g6 = function () {
return this.asyncQueue;
};
protoOf(DispatcherSnapshot).h8 = function () {
protoOf(DispatcherSnapshot).q8 = function () {
return this.localSnapshot;
};
protoOf(DispatcherSnapshot).i8 = function () {
protoOf(DispatcherSnapshot).r8 = function () {
return this.remoteSnapshot;
};
protoOf(DispatcherSnapshot).j8 = function () {
protoOf(DispatcherSnapshot).s8 = function () {
return this.timerSnapshot;
};
protoOf(DispatcherSnapshot).k8 = function (state, syncQueue, asyncQueue, localSnapshot, remoteSnapshot, timerSnapshot) {
protoOf(DispatcherSnapshot).t8 = function (state, syncQueue, asyncQueue, localSnapshot, remoteSnapshot, timerSnapshot) {
return new DispatcherSnapshot(state, syncQueue, asyncQueue, localSnapshot, remoteSnapshot, timerSnapshot);

@@ -736,3 +761,3 @@ };

timerSnapshot = timerSnapshot === VOID ? this.timerSnapshot : timerSnapshot;
return this.k8(state, syncQueue, asyncQueue, localSnapshot, remoteSnapshot, timerSnapshot);
return this.t8(state, syncQueue, asyncQueue, localSnapshot, remoteSnapshot, timerSnapshot);
};

@@ -819,8 +844,8 @@ protoOf(DispatcherSnapshot).toString = function () {

function LocalEventsDeduper(isLocalRuntimeReady, logger) {
this.n8_1 = isLocalRuntimeReady;
this.o8_1 = logger;
this.w8_1 = isLocalRuntimeReady;
this.x8_1 = logger;
}
protoOf(LocalEventsDeduper).o7 = function (events) {
protoOf(LocalEventsDeduper).u7 = function (events) {
var tmp;
if (this.n8_1()) {
if (this.w8_1()) {
tmp = events;

@@ -843,10 +868,10 @@ } else {

// Inline function 'kotlin.collections.isNotEmpty' call
if (!results.v5_1.r()) {
if (!results.w5_1.r()) {
// Inline function 'kotlin.arrayOf' call
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
var tmp$ret$5 = ['Dropping ' + results.v5_1.o() + ' local events', results.v5_1];
this.o8_1.z5([tmp$ret$5]);
var tmp$ret$5 = ['Dropping ' + results.w5_1.o() + ' local events', results.w5_1];
this.x8_1.a6([tmp$ret$5]);
}
tmp = results.u5_1;
tmp = results.v5_1;
}

@@ -863,7 +888,63 @@ return tmp;

}
function BaseTrace(spanName, durationMs) {
this.spanName = spanName;
this.durationMs = durationMs;
}
protoOf(BaseTrace).y8 = function () {
return this.spanName;
};
protoOf(BaseTrace).z8 = function () {
return this.durationMs;
};
function ErrorInfo(message, origin, version) {
this.message = message;
this.origin = origin;
this.version = version;
}
protoOf(ErrorInfo).y4 = function () {
return this.message;
};
protoOf(ErrorInfo).a9 = function () {
return this.origin;
};
protoOf(ErrorInfo).b9 = function () {
return this.version;
};
function PerformanceAnalyticsDelegate() {
}
function NoOpPerformanceAnalyticsDelegate() {
}
protoOf(NoOpPerformanceAnalyticsDelegate).logRuntimeTrace = function (runtimeTrace) {
};
protoOf(NoOpPerformanceAnalyticsDelegate).logRuntimeError = function (errorInfo) {
};
function logRuntimeTrace(delegate, span, isRemote, intent, eventCount) {
delegate.logRuntimeTrace(new RuntimeTrace(span.p7_1, span.c9().toString(), intent, getRuntimeTarget(isRemote), eventCount));
}
function logRuntimeError(delegate, message, isRemote, version) {
delegate.logRuntimeError(new ErrorInfo(message, getRuntimeTarget(isRemote), version));
}
function getRuntimeTarget(isRemote) {
return isRemote ? 'remote' : 'local';
}
function RuntimeTrace(spanName, durationMs, intent, target, eventCount) {
BaseTrace.call(this, spanName, durationMs);
this.intent = intent;
this.target = target;
this.eventCount = eventCount;
}
protoOf(RuntimeTrace).d9 = function () {
return this.intent;
};
protoOf(RuntimeTrace).e9 = function () {
return this.target;
};
protoOf(RuntimeTrace).f9 = function () {
return this.eventCount;
};
function Disabled() {
this.p8_1 = false;
this.g9_1 = false;
}
protoOf(Disabled).q8 = function () {
return this.p8_1;
protoOf(Disabled).h9 = function () {
return this.g9_1;
};

@@ -875,24 +956,24 @@ var Disabled_instance;

function NiceLogger(logger) {
this.y5_1 = logger;
this.z5_1 = logger;
}
protoOf(NiceLogger).j7 = function (messages) {
protoOf(NiceLogger).l7 = function (messages) {
// Inline function 'kotlin.arrayOf' call
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
var tmp$ret$2 = arrayConcat([[this.y5_1.tag()], messages]);
this.y5_1.error(tmp$ret$2);
var tmp$ret$2 = arrayConcat([[this.z5_1.tag()], messages]);
this.z5_1.error(tmp$ret$2);
};
protoOf(NiceLogger).u7 = function (messages) {
protoOf(NiceLogger).a8 = function (messages) {
// Inline function 'kotlin.arrayOf' call
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
var tmp$ret$2 = arrayConcat([[this.y5_1.tag()], messages]);
this.y5_1.warn(tmp$ret$2);
var tmp$ret$2 = arrayConcat([[this.z5_1.tag()], messages]);
this.z5_1.warn(tmp$ret$2);
};
protoOf(NiceLogger).z5 = function (messages) {
protoOf(NiceLogger).a6 = function (messages) {
// Inline function 'kotlin.arrayOf' call
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
var tmp$ret$2 = arrayConcat([[this.y5_1.tag()], messages]);
this.y5_1.debug(tmp$ret$2);
var tmp$ret$2 = arrayConcat([[this.z5_1.tag()], messages]);
this.z5_1.debug(tmp$ret$2);
};

@@ -916,15 +997,15 @@ function NoOpLogger() {

}
protoOf(TimerDefinition).r8 = function () {
protoOf(TimerDefinition).i9 = function () {
return this.id;
};
protoOf(TimerDefinition).s8 = function () {
protoOf(TimerDefinition).j9 = function () {
return this.duration;
};
protoOf(TimerDefinition).d6 = function () {
protoOf(TimerDefinition).e6 = function () {
return this.id;
};
protoOf(TimerDefinition).e6 = function () {
protoOf(TimerDefinition).f6 = function () {
return this.duration;
};
protoOf(TimerDefinition).t8 = function (id, duration) {
protoOf(TimerDefinition).k9 = function (id, duration) {
return new TimerDefinition(id, duration);

@@ -935,3 +1016,3 @@ };

duration = duration === VOID ? this.duration : duration;
return this.t8(id, duration);
return this.k9(id, duration);
};

@@ -958,2 +1039,22 @@ protoOf(TimerDefinition).toString = function () {

};
function Span(name, start) {
this.p7_1 = name;
this.q7_1 = start;
this.r7_1 = new Long(0, 0);
}
protoOf(Span).s7 = function () {
this.r7_1 = epochMillis();
};
protoOf(Span).c9 = function () {
return this.r7_1.t4(this.q7_1);
};
function Tracer() {
}
protoOf(Tracer).k7 = function (name) {
return new Span(name, epochMillis());
};
var Tracer_instance;
function Tracer_getInstance() {
return Tracer_instance;
}
function JsDispatcherImpl(state, requestBuilder, method, options) {

@@ -963,15 +1064,15 @@ method = method === VOID ? 'RenderPostContent' : method;

DispatcherImpl.call(this, state, new JsRequestBuilderAdapter(requestBuilder), new JsonStateOperations(), method, options);
this.r9_1 = method;
this.s9_1 = options;
this.ia_1 = method;
this.ja_1 = options;
}
function JsRequestBuilderAdapter(jsRequestBuilder) {
this.t9_1 = jsRequestBuilder;
this.ka_1 = jsRequestBuilder;
}
protoOf(JsRequestBuilderAdapter).u9 = function (state, events) {
protoOf(JsRequestBuilderAdapter).la = function (state, events) {
// Inline function 'kotlin.collections.toTypedArray' call
var tmp$ret$0 = copyToArray(events);
return this.t9_1.build(state, tmp$ret$0);
return this.ka_1.build(state, tmp$ret$0);
};
protoOf(JsRequestBuilderAdapter).i7 = function (state, events) {
return this.u9((!(state == null) ? !(state == null) : false) ? state : THROW_CCE(), events);
protoOf(JsRequestBuilderAdapter).j7 = function (state, events) {
return this.la((!(state == null) ? !(state == null) : false) ? state : THROW_CCE(), events);
};

@@ -1009,3 +1110,3 @@ function entriesOf(jsObject) {

// Inline function 'net.devvit.JsonStateOperations.merge.<anonymous>' call
result[element.u5_1] = element.v5_1;
result[element.v5_1] = element.w5_1;
}

@@ -1017,6 +1118,9 @@ // Inline function 'kotlin.collections.forEach' call

// Inline function 'net.devvit.JsonStateOperations.merge.<anonymous>' call
result[element_0.u5_1] = element_0.v5_1;
result[element_0.v5_1] = element_0.w5_1;
}
return result;
};
function epochMillis() {
return numberToLong((new Date()).getTime());
}
//region block: post-declaration

@@ -1026,30 +1130,35 @@ defineProp(protoOf(Mode), 'name', protoOf(Mode).e4);

defineProp(protoOf(DispatcherImpl), 'state', function () {
return this.q7();
return this.w7();
}, function (value) {
this.p7(value);
this.v7(value);
});
defineProp(protoOf(EmptyOptions), 'logger', function () {
return this.z7();
return this.g8();
}, function (value) {
this.y7(value);
this.f8(value);
});
defineProp(protoOf(EmptyOptions), 'errorHandler', function () {
return this.b8();
return this.i8();
}, function (value) {
this.a8(value);
this.h8(value);
});
defineProp(protoOf(EmptyOptions), 'featureFlags', function () {
return this.d8();
return this.k8();
}, function (value) {
this.c8(value);
this.j8(value);
});
defineProp(protoOf(EmptyOptions), 'performanceAnalyticsDelegate', function () {
return this.m8();
}, function (value) {
this.l8(value);
});
defineProp(protoOf(EventScope), 'name', protoOf(EventScope).e4);
defineProp(protoOf(EventScope), 'ordinal', protoOf(EventScope).f4);
defineProp(protoOf(Disabled), 'isSpeculativeExecutionEnabled', function () {
return this.q8();
return this.h9();
});
defineProp(protoOf(JsDispatcherImpl), 'state', function () {
return this.q7();
return this.w7();
}, function (value) {
this.p7(value);
this.v7(value);
});

@@ -1060,2 +1169,3 @@ //endregion

Disabled_instance = new Disabled();
Tracer_instance = new Tracer();
//endregion

@@ -1079,2 +1189,6 @@ //region block: exports

EventScope as EventScope,
BaseTrace as BaseTrace,
ErrorInfo as ErrorInfo,
NoOpPerformanceAnalyticsDelegate as NoOpPerformanceAnalyticsDelegate,
RuntimeTrace as RuntimeTrace,
TimerDefinition as TimerDefinition,

@@ -1081,0 +1195,0 @@ JsDispatcherImpl as JsDispatcherImpl,

{
"name": "@devvit/multiplatform",
"version": "0.0.1-20240809-32e26145",
"version": "0.0.1-20240814-a6381ebc",
"main": "kotlin/ui-shared-shared.mjs",

@@ -5,0 +5,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc