Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/b3980c03e0060f52dd78407cbdacce1ab19a2e70b535eb535ebfef0e84532c34.json

1 line
6 KiB
JSON
Raw Permalink Normal View History

2024-10-31 19:07:58 +00:00
{"ast":null,"code":"import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function audit(durationSelector) {\n return function auditOperatorFunction(source) {\n return source.lift(new AuditOperator(durationSelector));\n };\n}\nclass AuditOperator {\n constructor(durationSelector) {\n this.durationSelector = durationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n }\n}\nclass AuditSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector) {\n super(destination);\n this.durationSelector = durationSelector;\n this.hasValue = false;\n }\n _next(value) {\n this.value = value;\n this.hasValue = true;\n if (!this.throttled) {\n let duration;\n try {\n const {\n durationSelector\n } = this;\n duration = durationSelector(value);\n } catch (err) {\n return this.destination.error(err);\n }\n const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (!innerSubscription || innerSubscription.closed) {\n this.clearThrottle();\n } else {\n this.add(this.throttled = innerSubscription);\n }\n }\n }\n clearThrottle() {\n const {\n value,\n hasValue,\n throttled\n } = this;\n if (throttled) {\n this.remove(throttled);\n this.throttled = undefined;\n throttled.unsubscribe();\n }\n if (hasValue) {\n this.value = undefined;\n this.hasValue = false;\n this.destination.next(value);\n }\n }\n notifyNext() {\n this.clearThrottle();\n }\n notifyComplete() {\n this.clearThrottle();\n }\n}","map":{"version":3,"names":["SimpleOuterSubscriber","innerSubscribe","SimpleInnerSubscriber","audit","durationSelector","auditOperatorFunction","source","lift","AuditOperator","constructor","call","subscriber","subscribe","AuditSubscriber","destination","hasValue","_next","value","throttled","duration","err","error","innerSubscription","closed","clearThrottle","add","remove","undefined","unsubscribe","next","notifyNext","notifyComplete"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/audit.js"],"sourcesContent":["import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function audit(durationSelector) {\n return function auditOperatorFunction(source) {\n return source.lift(new AuditOperator(durationSelector));\n };\n}\nclass AuditOperator {\n constructor(durationSelector) {\n this.durationSelector = durationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n }\n}\nclass AuditSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector) {\n super(destination);\n this.durationSelector = durationSelector;\n this.hasValue = false;\n }\n _next(value) {\n this.value = value;\n this.hasValue = true;\n if (!this.throttled) {\n let duration;\n try {\n const { durationSelector } = this;\n duration = durationSelector(value);\n }\n catch (err) {\n return this.destination.error(err);\n }\n const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (!innerSubscription || innerSubscription.closed) {\n this.clearThrottle();\n }\n else {\n this.add(this.throttled = innerSubscription);\n }\n }\n }\n clearThrottle() {\n const { value, hasValue, throttled } = this;\n if (throttled) {\n this.remove(throttled);\n this.throttled = undefined;\n throttled.unsubscribe();\n }\n if (hasValue) {\n this.va