tevrocsdk 0.1.49 → 0.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tevroc-sdk.esm.js CHANGED
@@ -196,7 +196,7 @@ var init_dist = __esm({
196
196
  callbackId
197
197
  }, callback);
198
198
  };
199
- const p3 = new Promise((resolve2) => call.then(() => resolve2({ remove: remove2 })));
199
+ const p3 = new Promise((resolve3) => call.then(() => resolve3({ remove: remove2 })));
200
200
  p3.remove = async () => {
201
201
  console.warn(`Using addListener() without 'await' is deprecated.`);
202
202
  await remove2();
@@ -400,11 +400,11 @@ var init_dist = __esm({
400
400
  CapacitorCookies = registerPlugin("CapacitorCookies", {
401
401
  web: () => new CapacitorCookiesPluginWeb()
402
402
  });
403
- readBlobAsBase64 = async (blob) => new Promise((resolve2, reject) => {
403
+ readBlobAsBase64 = async (blob) => new Promise((resolve3, reject) => {
404
404
  const reader = new FileReader();
405
405
  reader.onload = () => {
406
406
  const base64String = reader.result;
407
- resolve2(base64String.indexOf(",") >= 0 ? base64String.split(",")[1] : base64String);
407
+ resolve3(base64String.indexOf(",") >= 0 ? base64String.split(",")[1] : base64String);
408
408
  };
409
409
  reader.onerror = (error) => reject(error);
410
410
  reader.readAsDataURL(blob);
@@ -2375,11 +2375,11 @@ var require_html2canvas = __commonJS({
2375
2375
  };
2376
2376
  function __awaiter(thisArg, _arguments, P2, generator) {
2377
2377
  function adopt(value) {
2378
- return value instanceof P2 ? value : new P2(function(resolve2) {
2379
- resolve2(value);
2378
+ return value instanceof P2 ? value : new P2(function(resolve3) {
2379
+ resolve3(value);
2380
2380
  });
2381
2381
  }
2382
- return new (P2 || (P2 = Promise))(function(resolve2, reject) {
2382
+ return new (P2 || (P2 = Promise))(function(resolve3, reject) {
2383
2383
  function fulfilled(value) {
2384
2384
  try {
2385
2385
  step(generator.next(value));
@@ -2395,7 +2395,7 @@ var require_html2canvas = __commonJS({
2395
2395
  }
2396
2396
  }
2397
2397
  function step(result) {
2398
- result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
2398
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
2399
2399
  }
2400
2400
  step((generator = generator.apply(thisArg, _arguments || [])).next());
2401
2401
  });
@@ -6524,10 +6524,10 @@ var require_html2canvas = __commonJS({
6524
6524
  return svg2;
6525
6525
  };
6526
6526
  var loadSerializedSVG$1 = function(svg2) {
6527
- return new Promise(function(resolve2, reject) {
6527
+ return new Promise(function(resolve3, reject) {
6528
6528
  var img = new Image();
6529
6529
  img.onload = function() {
6530
- return resolve2(img);
6530
+ return resolve3(img);
6531
6531
  };
6532
6532
  img.onerror = reject;
6533
6533
  img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg2));
@@ -7889,24 +7889,24 @@ var require_html2canvas = __commonJS({
7889
7889
  return cloneIframeContainer;
7890
7890
  };
7891
7891
  var imageReady = function(img) {
7892
- return new Promise(function(resolve2) {
7892
+ return new Promise(function(resolve3) {
7893
7893
  if (img.complete) {
7894
- resolve2();
7894
+ resolve3();
7895
7895
  return;
7896
7896
  }
7897
7897
  if (!img.src) {
7898
- resolve2();
7898
+ resolve3();
7899
7899
  return;
7900
7900
  }
7901
- img.onload = resolve2;
7902
- img.onerror = resolve2;
7901
+ img.onload = resolve3;
7902
+ img.onerror = resolve3;
7903
7903
  });
7904
7904
  };
7905
7905
  var imagesReady = function(document2) {
7906
7906
  return Promise.all([].slice.call(document2.images, 0).map(imageReady));
7907
7907
  };
7908
7908
  var iframeLoader = function(iframe) {
7909
- return new Promise(function(resolve2, reject) {
7909
+ return new Promise(function(resolve3, reject) {
7910
7910
  var cloneWindow = iframe.contentWindow;
7911
7911
  if (!cloneWindow) {
7912
7912
  return reject("No window assigned for iframe");
@@ -7917,7 +7917,7 @@ var require_html2canvas = __commonJS({
7917
7917
  var interval = setInterval(function() {
7918
7918
  if (documentClone.body.childNodes.length > 0 && documentClone.readyState === "complete") {
7919
7919
  clearInterval(interval);
7920
- resolve2(iframe);
7920
+ resolve3(iframe);
7921
7921
  }
7922
7922
  }, 50);
7923
7923
  };
@@ -8056,10 +8056,10 @@ var require_html2canvas = __commonJS({
8056
8056
  _a2.label = 2;
8057
8057
  case 2:
8058
8058
  this.context.logger.debug("Added image " + key.substring(0, 256));
8059
- return [4, new Promise(function(resolve2, reject) {
8059
+ return [4, new Promise(function(resolve3, reject) {
8060
8060
  var img = new Image();
8061
8061
  img.onload = function() {
8062
- return resolve2(img);
8062
+ return resolve3(img);
8063
8063
  };
8064
8064
  img.onerror = reject;
8065
8065
  if (isInlineBase64Image(src) || useCORS) {
@@ -8068,7 +8068,7 @@ var require_html2canvas = __commonJS({
8068
8068
  img.src = src;
8069
8069
  if (img.complete === true) {
8070
8070
  setTimeout(function() {
8071
- return resolve2(img);
8071
+ return resolve3(img);
8072
8072
  }, 500);
8073
8073
  }
8074
8074
  if (_this._options.imageTimeout > 0) {
@@ -8096,17 +8096,17 @@ var require_html2canvas = __commonJS({
8096
8096
  throw new Error("No proxy defined");
8097
8097
  }
8098
8098
  var key = src.substring(0, 256);
8099
- return new Promise(function(resolve2, reject) {
8099
+ return new Promise(function(resolve3, reject) {
8100
8100
  var responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? "blob" : "text";
8101
8101
  var xhr = new XMLHttpRequest();
8102
8102
  xhr.onload = function() {
8103
8103
  if (xhr.status === 200) {
8104
8104
  if (responseType === "text") {
8105
- resolve2(xhr.response);
8105
+ resolve3(xhr.response);
8106
8106
  } else {
8107
8107
  var reader_1 = new FileReader();
8108
8108
  reader_1.addEventListener("load", function() {
8109
- return resolve2(reader_1.result);
8109
+ return resolve3(reader_1.result);
8110
8110
  }, false);
8111
8111
  reader_1.addEventListener("error", function(e3) {
8112
8112
  return reject(e3);
@@ -9921,10 +9921,10 @@ var require_html2canvas = __commonJS({
9921
9921
  })(Renderer)
9922
9922
  );
9923
9923
  var loadSerializedSVG = function(svg2) {
9924
- return new Promise(function(resolve2, reject) {
9924
+ return new Promise(function(resolve3, reject) {
9925
9925
  var img = new Image();
9926
9926
  img.onload = function() {
9927
- resolve2(img);
9927
+ resolve3(img);
9928
9928
  };
9929
9929
  img.onerror = reject;
9930
9930
  img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg2));
@@ -12428,7 +12428,7 @@ var require_make_built_in = __commonJS({
12428
12428
  var defineProperty = Object.defineProperty;
12429
12429
  var stringSlice = uncurryThis("".slice);
12430
12430
  var replace = uncurryThis("".replace);
12431
- var join = uncurryThis([].join);
12431
+ var join2 = uncurryThis([].join);
12432
12432
  var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function() {
12433
12433
  return defineProperty(function() {
12434
12434
  }, "length", { value: 8 }).length !== 8;
@@ -12455,7 +12455,7 @@ var require_make_built_in = __commonJS({
12455
12455
  }
12456
12456
  var state = enforceInternalState(value);
12457
12457
  if (!hasOwn(state, "source")) {
12458
- state.source = join(TEMPLATE, typeof name == "string" ? name : "");
12458
+ state.source = join2(TEMPLATE, typeof name == "string" ? name : "");
12459
12459
  }
12460
12460
  return value;
12461
12461
  };
@@ -12707,10 +12707,10 @@ var require_is_forced = __commonJS({
12707
12707
  var isCallable = require_is_callable();
12708
12708
  var replacement = /#|\.prototype\./;
12709
12709
  var isForced = function(feature, detection) {
12710
- var value = data[normalize(feature)];
12710
+ var value = data[normalize2(feature)];
12711
12711
  return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
12712
12712
  };
12713
- var normalize = isForced.normalize = function(string) {
12713
+ var normalize2 = isForced.normalize = function(string) {
12714
12714
  return String(string).replace(replacement, ".").toLowerCase();
12715
12715
  };
12716
12716
  var data = isForced.data = {};
@@ -13435,8 +13435,8 @@ var require_promise_constructor_detection = __commonJS({
13435
13435
  if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
13436
13436
  if (IS_PURE && !(NativePromisePrototype["catch"] && NativePromisePrototype["finally"])) return true;
13437
13437
  if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
13438
- var promise = new NativePromiseConstructor(function(resolve2) {
13439
- resolve2(1);
13438
+ var promise = new NativePromiseConstructor(function(resolve3) {
13439
+ resolve3(1);
13440
13440
  });
13441
13441
  var FakePromise = function(exec) {
13442
13442
  exec(function() {
@@ -13466,13 +13466,13 @@ var require_new_promise_capability = __commonJS({
13466
13466
  var aCallable = require_a_callable();
13467
13467
  var $TypeError = TypeError;
13468
13468
  var PromiseCapability = function(C2) {
13469
- var resolve2, reject;
13469
+ var resolve3, reject;
13470
13470
  this.promise = new C2(function($$resolve, $$reject) {
13471
- if (resolve2 !== void 0 || reject !== void 0) throw new $TypeError("Bad Promise constructor");
13472
- resolve2 = $$resolve;
13471
+ if (resolve3 !== void 0 || reject !== void 0) throw new $TypeError("Bad Promise constructor");
13472
+ resolve3 = $$resolve;
13473
13473
  reject = $$reject;
13474
13474
  });
13475
- this.resolve = aCallable(resolve2);
13475
+ this.resolve = aCallable(resolve3);
13476
13476
  this.reject = aCallable(reject);
13477
13477
  };
13478
13478
  module.exports.f = function(C2) {
@@ -13543,7 +13543,7 @@ var require_es_promise_constructor = __commonJS({
13543
13543
  var value = state.value;
13544
13544
  var ok = state.state === FULFILLED;
13545
13545
  var handler = ok ? reaction.ok : reaction.fail;
13546
- var resolve2 = reaction.resolve;
13546
+ var resolve3 = reaction.resolve;
13547
13547
  var reject = reaction.reject;
13548
13548
  var domain = reaction.domain;
13549
13549
  var result, then, exited;
@@ -13565,8 +13565,8 @@ var require_es_promise_constructor = __commonJS({
13565
13565
  if (result === reaction.promise) {
13566
13566
  reject(new TypeError2("Promise-chain cycle"));
13567
13567
  } else if (then = isThenable(result)) {
13568
- call(then, result, resolve2, reject);
13569
- } else resolve2(result);
13568
+ call(then, result, resolve3, reject);
13569
+ } else resolve3(result);
13570
13570
  } else reject(value);
13571
13571
  } catch (error) {
13572
13572
  if (domain && !exited) domain.exit();
@@ -13722,8 +13722,8 @@ var require_es_promise_constructor = __commonJS({
13722
13722
  if (!NATIVE_PROMISE_SUBCLASSING) {
13723
13723
  defineBuiltIn(NativePromisePrototype, "then", function then(onFulfilled, onRejected) {
13724
13724
  var that = this;
13725
- return new PromiseConstructor(function(resolve2, reject) {
13726
- call(nativeThen, that, resolve2, reject);
13725
+ return new PromiseConstructor(function(resolve3, reject) {
13726
+ call(nativeThen, that, resolve3, reject);
13727
13727
  }).then(onFulfilled, onRejected);
13728
13728
  }, { unsafe: true });
13729
13729
  }
@@ -13983,7 +13983,7 @@ var require_es_promise_all = __commonJS({
13983
13983
  all: function all(iterable) {
13984
13984
  var C2 = this;
13985
13985
  var capability = newPromiseCapabilityModule.f(C2);
13986
- var resolve2 = capability.resolve;
13986
+ var resolve3 = capability.resolve;
13987
13987
  var reject = capability.reject;
13988
13988
  var result = perform(function() {
13989
13989
  var $promiseResolve = aCallable(C2.resolve);
@@ -13998,10 +13998,10 @@ var require_es_promise_all = __commonJS({
13998
13998
  if (alreadyCalled) return;
13999
13999
  alreadyCalled = true;
14000
14000
  values[index2] = value;
14001
- --remaining || resolve2(values);
14001
+ --remaining || resolve3(values);
14002
14002
  }, reject);
14003
14003
  });
14004
- --remaining || resolve2(values);
14004
+ --remaining || resolve3(values);
14005
14005
  });
14006
14006
  if (result.error) reject(result.value);
14007
14007
  return capability.promise;
@@ -14095,8 +14095,8 @@ var require_promise_resolve = __commonJS({
14095
14095
  anObject(C2);
14096
14096
  if (isObject(x3) && x3.constructor === C2) return x3;
14097
14097
  var promiseCapability = newPromiseCapability.f(C2);
14098
- var resolve2 = promiseCapability.resolve;
14099
- resolve2(x3);
14098
+ var resolve3 = promiseCapability.resolve;
14099
+ resolve3(x3);
14100
14100
  return promiseCapability.promise;
14101
14101
  };
14102
14102
  }
@@ -14115,7 +14115,7 @@ var require_es_promise_resolve = __commonJS({
14115
14115
  var PromiseConstructorWrapper = getBuiltIn("Promise");
14116
14116
  var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
14117
14117
  $2({ target: "Promise", stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
14118
- resolve: function resolve2(x3) {
14118
+ resolve: function resolve3(x3) {
14119
14119
  return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x3);
14120
14120
  }
14121
14121
  });
@@ -17123,9 +17123,9 @@ function _createImage() {
17123
17123
  if (anonymousCrossOrigin) {
17124
17124
  image.crossOrigin = "Anonymous";
17125
17125
  }
17126
- return new Promise((resolve2, reject) => {
17126
+ return new Promise((resolve3, reject) => {
17127
17127
  image.onload = () => {
17128
- resolve2(image);
17128
+ resolve3(image);
17129
17129
  };
17130
17130
  image.onerror = (_event, _source, _lineno, _colno, error) => {
17131
17131
  reject(error);
@@ -17840,8 +17840,8 @@ var init_index_es = __esm({
17840
17840
  } = this;
17841
17841
  var frameDuration = 1e3 / FRAMERATE;
17842
17842
  this.frameDuration = frameDuration;
17843
- this.readyPromise = new Promise((resolve2) => {
17844
- this.resolveReady = resolve2;
17843
+ this.readyPromise = new Promise((resolve3) => {
17844
+ this.resolveReady = resolve3;
17845
17845
  });
17846
17846
  if (this.isReady()) {
17847
17847
  this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
@@ -22276,12 +22276,12 @@ var init_web4 = __esm({
22276
22276
  if (!("indexedDB" in window)) {
22277
22277
  throw this.unavailable("This browser doesn't support IndexedDB");
22278
22278
  }
22279
- return new Promise((resolve2, reject) => {
22279
+ return new Promise((resolve3, reject) => {
22280
22280
  const request = indexedDB.open(this.DB_NAME, this.DB_VERSION);
22281
22281
  request.onupgradeneeded = _FilesystemWeb.doUpgrade;
22282
22282
  request.onsuccess = () => {
22283
22283
  this._db = request.result;
22284
- resolve2(request.result);
22284
+ resolve3(request.result);
22285
22285
  };
22286
22286
  request.onerror = () => reject(request.error);
22287
22287
  request.onblocked = () => {
@@ -22307,11 +22307,11 @@ var init_web4 = __esm({
22307
22307
  async dbRequest(cmd, args) {
22308
22308
  const readFlag = this._writeCmds.indexOf(cmd) !== -1 ? "readwrite" : "readonly";
22309
22309
  return this.initDb().then((conn) => {
22310
- return new Promise((resolve2, reject) => {
22310
+ return new Promise((resolve3, reject) => {
22311
22311
  const tx = conn.transaction(["FileStorage"], readFlag);
22312
22312
  const store = tx.objectStore("FileStorage");
22313
22313
  const req = store[cmd](...args);
22314
- req.onsuccess = () => resolve2(req.result);
22314
+ req.onsuccess = () => resolve3(req.result);
22315
22315
  req.onerror = () => reject(req.error);
22316
22316
  });
22317
22317
  });
@@ -22319,12 +22319,12 @@ var init_web4 = __esm({
22319
22319
  async dbIndexRequest(indexName, cmd, args) {
22320
22320
  const readFlag = this._writeCmds.indexOf(cmd) !== -1 ? "readwrite" : "readonly";
22321
22321
  return this.initDb().then((conn) => {
22322
- return new Promise((resolve2, reject) => {
22322
+ return new Promise((resolve3, reject) => {
22323
22323
  const tx = conn.transaction(["FileStorage"], readFlag);
22324
22324
  const store = tx.objectStore("FileStorage");
22325
22325
  const index2 = store.index(indexName);
22326
22326
  const req = index2[cmd](...args);
22327
- req.onsuccess = () => resolve2(req.result);
22327
+ req.onsuccess = () => resolve3(req.result);
22328
22328
  req.onerror = () => reject(req.error);
22329
22329
  });
22330
22330
  });
@@ -22907,6 +22907,191 @@ var init_dist_js2 = __esm({
22907
22907
  });
22908
22908
 
22909
22909
  // node_modules/@tauri-apps/api/path.js
22910
+ var path_exports = {};
22911
+ __export(path_exports, {
22912
+ BaseDirectory: () => BaseDirectory,
22913
+ appCacheDir: () => appCacheDir,
22914
+ appConfigDir: () => appConfigDir,
22915
+ appDataDir: () => appDataDir,
22916
+ appLocalDataDir: () => appLocalDataDir,
22917
+ appLogDir: () => appLogDir,
22918
+ audioDir: () => audioDir,
22919
+ basename: () => basename,
22920
+ cacheDir: () => cacheDir,
22921
+ configDir: () => configDir,
22922
+ dataDir: () => dataDir,
22923
+ delimiter: () => delimiter,
22924
+ desktopDir: () => desktopDir,
22925
+ dirname: () => dirname,
22926
+ documentDir: () => documentDir,
22927
+ downloadDir: () => downloadDir,
22928
+ executableDir: () => executableDir,
22929
+ extname: () => extname,
22930
+ fontDir: () => fontDir,
22931
+ homeDir: () => homeDir,
22932
+ isAbsolute: () => isAbsolute,
22933
+ join: () => join,
22934
+ localDataDir: () => localDataDir,
22935
+ normalize: () => normalize,
22936
+ pictureDir: () => pictureDir,
22937
+ publicDir: () => publicDir,
22938
+ resolve: () => resolve2,
22939
+ resolveResource: () => resolveResource,
22940
+ resourceDir: () => resourceDir,
22941
+ runtimeDir: () => runtimeDir,
22942
+ sep: () => sep,
22943
+ tempDir: () => tempDir,
22944
+ templateDir: () => templateDir,
22945
+ videoDir: () => videoDir
22946
+ });
22947
+ async function appConfigDir() {
22948
+ return invoke("plugin:path|resolve_directory", {
22949
+ directory: BaseDirectory.AppConfig
22950
+ });
22951
+ }
22952
+ async function appDataDir() {
22953
+ return invoke("plugin:path|resolve_directory", {
22954
+ directory: BaseDirectory.AppData
22955
+ });
22956
+ }
22957
+ async function appLocalDataDir() {
22958
+ return invoke("plugin:path|resolve_directory", {
22959
+ directory: BaseDirectory.AppLocalData
22960
+ });
22961
+ }
22962
+ async function appCacheDir() {
22963
+ return invoke("plugin:path|resolve_directory", {
22964
+ directory: BaseDirectory.AppCache
22965
+ });
22966
+ }
22967
+ async function audioDir() {
22968
+ return invoke("plugin:path|resolve_directory", {
22969
+ directory: BaseDirectory.Audio
22970
+ });
22971
+ }
22972
+ async function cacheDir() {
22973
+ return invoke("plugin:path|resolve_directory", {
22974
+ directory: BaseDirectory.Cache
22975
+ });
22976
+ }
22977
+ async function configDir() {
22978
+ return invoke("plugin:path|resolve_directory", {
22979
+ directory: BaseDirectory.Config
22980
+ });
22981
+ }
22982
+ async function dataDir() {
22983
+ return invoke("plugin:path|resolve_directory", {
22984
+ directory: BaseDirectory.Data
22985
+ });
22986
+ }
22987
+ async function desktopDir() {
22988
+ return invoke("plugin:path|resolve_directory", {
22989
+ directory: BaseDirectory.Desktop
22990
+ });
22991
+ }
22992
+ async function documentDir() {
22993
+ return invoke("plugin:path|resolve_directory", {
22994
+ directory: BaseDirectory.Document
22995
+ });
22996
+ }
22997
+ async function downloadDir() {
22998
+ return invoke("plugin:path|resolve_directory", {
22999
+ directory: BaseDirectory.Download
23000
+ });
23001
+ }
23002
+ async function executableDir() {
23003
+ return invoke("plugin:path|resolve_directory", {
23004
+ directory: BaseDirectory.Executable
23005
+ });
23006
+ }
23007
+ async function fontDir() {
23008
+ return invoke("plugin:path|resolve_directory", {
23009
+ directory: BaseDirectory.Font
23010
+ });
23011
+ }
23012
+ async function homeDir() {
23013
+ return invoke("plugin:path|resolve_directory", {
23014
+ directory: BaseDirectory.Home
23015
+ });
23016
+ }
23017
+ async function localDataDir() {
23018
+ return invoke("plugin:path|resolve_directory", {
23019
+ directory: BaseDirectory.LocalData
23020
+ });
23021
+ }
23022
+ async function pictureDir() {
23023
+ return invoke("plugin:path|resolve_directory", {
23024
+ directory: BaseDirectory.Picture
23025
+ });
23026
+ }
23027
+ async function publicDir() {
23028
+ return invoke("plugin:path|resolve_directory", {
23029
+ directory: BaseDirectory.Public
23030
+ });
23031
+ }
23032
+ async function resourceDir() {
23033
+ return invoke("plugin:path|resolve_directory", {
23034
+ directory: BaseDirectory.Resource
23035
+ });
23036
+ }
23037
+ async function resolveResource(resourcePath) {
23038
+ return invoke("plugin:path|resolve_directory", {
23039
+ directory: BaseDirectory.Resource,
23040
+ path: resourcePath
23041
+ });
23042
+ }
23043
+ async function runtimeDir() {
23044
+ return invoke("plugin:path|resolve_directory", {
23045
+ directory: BaseDirectory.Runtime
23046
+ });
23047
+ }
23048
+ async function templateDir() {
23049
+ return invoke("plugin:path|resolve_directory", {
23050
+ directory: BaseDirectory.Template
23051
+ });
23052
+ }
23053
+ async function videoDir() {
23054
+ return invoke("plugin:path|resolve_directory", {
23055
+ directory: BaseDirectory.Video
23056
+ });
23057
+ }
23058
+ async function appLogDir() {
23059
+ return invoke("plugin:path|resolve_directory", {
23060
+ directory: BaseDirectory.AppLog
23061
+ });
23062
+ }
23063
+ async function tempDir() {
23064
+ return invoke("plugin:path|resolve_directory", {
23065
+ directory: BaseDirectory.Temp
23066
+ });
23067
+ }
23068
+ function sep() {
23069
+ return window.__TAURI_INTERNALS__.plugins.path.sep;
23070
+ }
23071
+ function delimiter() {
23072
+ return window.__TAURI_INTERNALS__.plugins.path.delimiter;
23073
+ }
23074
+ async function resolve2(...paths) {
23075
+ return invoke("plugin:path|resolve", { paths });
23076
+ }
23077
+ async function normalize(path) {
23078
+ return invoke("plugin:path|normalize", { path });
23079
+ }
23080
+ async function join(...paths) {
23081
+ return invoke("plugin:path|join", { paths });
23082
+ }
23083
+ async function dirname(path) {
23084
+ return invoke("plugin:path|dirname", { path });
23085
+ }
23086
+ async function extname(path) {
23087
+ return invoke("plugin:path|extname", { path });
23088
+ }
23089
+ async function basename(path, ext) {
23090
+ return invoke("plugin:path|basename", { path, ext });
23091
+ }
23092
+ async function isAbsolute(path) {
23093
+ return invoke("plugin:path|is_absolute", { path });
23094
+ }
22910
23095
  var BaseDirectory;
22911
23096
  var init_path = __esm({
22912
23097
  "node_modules/@tauri-apps/api/path.js"() {
@@ -23431,58 +23616,6 @@ var init_dist_js3 = __esm({
23431
23616
  }
23432
23617
  });
23433
23618
 
23434
- // node_modules/@capacitor/browser/dist/esm/definitions.js
23435
- var init_definitions6 = __esm({
23436
- "node_modules/@capacitor/browser/dist/esm/definitions.js"() {
23437
- }
23438
- });
23439
-
23440
- // node_modules/@capacitor/browser/dist/esm/web.js
23441
- var web_exports6 = {};
23442
- __export(web_exports6, {
23443
- Browser: () => Browser,
23444
- BrowserWeb: () => BrowserWeb
23445
- });
23446
- var BrowserWeb, Browser;
23447
- var init_web6 = __esm({
23448
- "node_modules/@capacitor/browser/dist/esm/web.js"() {
23449
- init_dist();
23450
- BrowserWeb = class extends WebPlugin {
23451
- constructor() {
23452
- super();
23453
- this._lastWindow = null;
23454
- }
23455
- async open(options) {
23456
- this._lastWindow = window.open(options.url, options.windowName || "_blank");
23457
- }
23458
- async close() {
23459
- return new Promise((resolve2, reject) => {
23460
- if (this._lastWindow != null) {
23461
- this._lastWindow.close();
23462
- this._lastWindow = null;
23463
- resolve2();
23464
- } else {
23465
- reject("No active window to close!");
23466
- }
23467
- });
23468
- }
23469
- };
23470
- Browser = new BrowserWeb();
23471
- }
23472
- });
23473
-
23474
- // node_modules/@capacitor/browser/dist/esm/index.js
23475
- var Browser2;
23476
- var init_esm6 = __esm({
23477
- "node_modules/@capacitor/browser/dist/esm/index.js"() {
23478
- init_dist();
23479
- init_definitions6();
23480
- Browser2 = registerPlugin("Browser", {
23481
- web: () => Promise.resolve().then(() => (init_web6(), web_exports6)).then((m4) => new m4.BrowserWeb())
23482
- });
23483
- }
23484
- });
23485
-
23486
23619
  // node_modules/@tauri-apps/api/dpi.js
23487
23620
  var LogicalSize, PhysicalSize, Size, LogicalPosition, PhysicalPosition, Position;
23488
23621
  var init_dpi = __esm({
@@ -26076,6 +26209,12 @@ var init_webview = __esm({
26076
26209
  });
26077
26210
 
26078
26211
  // node_modules/@tauri-apps/api/webviewWindow.js
26212
+ var webviewWindow_exports = {};
26213
+ __export(webviewWindow_exports, {
26214
+ WebviewWindow: () => WebviewWindow,
26215
+ getAllWebviewWindows: () => getAllWebviewWindows,
26216
+ getCurrentWebviewWindow: () => getCurrentWebviewWindow
26217
+ });
26079
26218
  function getCurrentWebviewWindow() {
26080
26219
  const webview = getCurrentWebview();
26081
26220
  return new WebviewWindow(webview.label, { skip: true });
@@ -26259,6 +26398,58 @@ var init_webviewWindow = __esm({
26259
26398
  }
26260
26399
  });
26261
26400
 
26401
+ // node_modules/@capacitor/browser/dist/esm/definitions.js
26402
+ var init_definitions6 = __esm({
26403
+ "node_modules/@capacitor/browser/dist/esm/definitions.js"() {
26404
+ }
26405
+ });
26406
+
26407
+ // node_modules/@capacitor/browser/dist/esm/web.js
26408
+ var web_exports6 = {};
26409
+ __export(web_exports6, {
26410
+ Browser: () => Browser,
26411
+ BrowserWeb: () => BrowserWeb
26412
+ });
26413
+ var BrowserWeb, Browser;
26414
+ var init_web6 = __esm({
26415
+ "node_modules/@capacitor/browser/dist/esm/web.js"() {
26416
+ init_dist();
26417
+ BrowserWeb = class extends WebPlugin {
26418
+ constructor() {
26419
+ super();
26420
+ this._lastWindow = null;
26421
+ }
26422
+ async open(options) {
26423
+ this._lastWindow = window.open(options.url, options.windowName || "_blank");
26424
+ }
26425
+ async close() {
26426
+ return new Promise((resolve3, reject) => {
26427
+ if (this._lastWindow != null) {
26428
+ this._lastWindow.close();
26429
+ this._lastWindow = null;
26430
+ resolve3();
26431
+ } else {
26432
+ reject("No active window to close!");
26433
+ }
26434
+ });
26435
+ }
26436
+ };
26437
+ Browser = new BrowserWeb();
26438
+ }
26439
+ });
26440
+
26441
+ // node_modules/@capacitor/browser/dist/esm/index.js
26442
+ var Browser2;
26443
+ var init_esm6 = __esm({
26444
+ "node_modules/@capacitor/browser/dist/esm/index.js"() {
26445
+ init_dist();
26446
+ init_definitions6();
26447
+ Browser2 = registerPlugin("Browser", {
26448
+ web: () => Promise.resolve().then(() => (init_web6(), web_exports6)).then((m4) => new m4.BrowserWeb())
26449
+ });
26450
+ }
26451
+ });
26452
+
26262
26453
  // src/services/useGoogleAuth.js
26263
26454
  var useGoogleAuth_exports = {};
26264
26455
  __export(useGoogleAuth_exports, {
@@ -40933,12 +41124,12 @@ E.API.PDFObject = (function() {
40933
41124
 
40934
41125
  // src/services/pdf.js
40935
41126
  init_usePlatform();
40936
- var blobToBase64 = (blob) => new Promise((resolve2, reject) => {
41127
+ var blobToBase64 = (blob) => new Promise((resolve3, reject) => {
40937
41128
  const reader = new FileReader();
40938
41129
  reader.onloadend = () => {
40939
41130
  const data = reader.result;
40940
41131
  if (typeof data === "string") {
40941
- resolve2(data.split(",")[1]);
41132
+ resolve3(data.split(",")[1]);
40942
41133
  } else {
40943
41134
  reject(new Error("Unable to encode PDF blob to base64"));
40944
41135
  }
@@ -41050,21 +41241,64 @@ var saveBlobTauri = async (blob, fileName, defaultExt = "pdf") => {
41050
41241
  await writeFile2(filePath, uint83);
41051
41242
  return filePath;
41052
41243
  };
41053
- var openBlobTauri = async (blob, fileName, action = "preview") => {
41054
- const invoke2 = typeof window !== "undefined" ? window.__TAURI__?.core?.invoke : void 0;
41055
- if (typeof invoke2 !== "function") return void 0;
41056
- const payload = await blobToBase64(blob);
41057
- const finalName = getFinalFileName(fileName || "document.pdf");
41058
- return await invoke2("open_pdf_file", {
41059
- fileName: finalName,
41060
- action,
41061
- payload
41244
+ var createTauriPdfUrl = async (blob, fileName = "document.pdf") => {
41245
+ const { writeFile: writeFile2 } = await Promise.resolve().then(() => (init_dist_js3(), dist_js_exports3));
41246
+ const { tempDir: tempDir2, join: join2 } = await Promise.resolve().then(() => (init_path(), path_exports));
41247
+ const safeName = String(fileName || "document.pdf").trim().replace(/[^a-zA-Z0-9._-]+/g, "_");
41248
+ const tempFolder = await tempDir2();
41249
+ const filePath = await join2(tempFolder, `${Date.now()}-${safeName}`);
41250
+ const buffer = await blob.arrayBuffer();
41251
+ await writeFile2(filePath, new Uint8Array(buffer));
41252
+ const normalizedPath = filePath.replace(/\\/g, "/");
41253
+ return normalizedPath.startsWith("/") ? `file://${normalizedPath}` : `file:///${normalizedPath}`;
41254
+ };
41255
+ var openBlobTauri = async (blob, fileName = "document.pdf", autoPrint = false) => {
41256
+ const { WebviewWindow: WebviewWindow2 } = await Promise.resolve().then(() => (init_webviewWindow(), webviewWindow_exports));
41257
+ const pdfUrl = await createTauriPdfUrl(blob, fileName);
41258
+ console.log(
41259
+ "Opening Tauri PDF webview from local file URL"
41260
+ );
41261
+ const label = `pdf-print-${Date.now()}`;
41262
+ const windowInstance = new WebviewWindow2(label, {
41263
+ url: pdfUrl,
41264
+ title: "Print PDF",
41265
+ width: 1e3,
41266
+ height: 800,
41267
+ resizable: true,
41268
+ center: true,
41269
+ focus: true,
41270
+ visible: true
41062
41271
  });
41272
+ windowInstance.once(
41273
+ "tauri://created",
41274
+ () => {
41275
+ console.log(
41276
+ "Tauri PDF print webview opened:",
41277
+ label
41278
+ );
41279
+ try {
41280
+ windowInstance.show?.();
41281
+ windowInstance.setFocus?.();
41282
+ } catch (error) {
41283
+ console.warn("Unable to focus PDF print window:", error);
41284
+ }
41285
+ }
41286
+ );
41287
+ windowInstance.once(
41288
+ "tauri://error",
41289
+ (error) => {
41290
+ console.error(
41291
+ "Tauri PDF print webview error:",
41292
+ error
41293
+ );
41294
+ }
41295
+ );
41296
+ return windowInstance;
41063
41297
  };
41064
41298
  var openPreview = async (blob, fileName) => {
41065
- if (isTauri && typeof window !== "undefined" && window.__TAURI__?.core?.invoke) {
41299
+ if (isTauri && typeof window !== "undefined" && (window.__TAURI__ || window.__TAURI_INTERNALS__)) {
41066
41300
  try {
41067
- const opened = await openBlobTauri(blob, fileName, "preview");
41301
+ const opened = await openBlobTauri(blob, fileName, false);
41068
41302
  if (opened) return opened;
41069
41303
  } catch (err2) {
41070
41304
  }
@@ -41103,10 +41337,10 @@ var openPreview = async (blob, fileName) => {
41103
41337
  }
41104
41338
  return url;
41105
41339
  };
41106
- var printBlob = async (blob) => {
41107
- if (isTauri && typeof window !== "undefined" && window.__TAURI__?.core?.invoke) {
41340
+ var printBlob = async (blob, fileName) => {
41341
+ if (isTauri && typeof window !== "undefined" && (window.__TAURI__ || window.__TAURI_INTERNALS__)) {
41108
41342
  try {
41109
- const opened = await openBlobTauri(blob, "document.pdf", "print");
41343
+ const opened = await openBlobTauri(blob, fileName, true);
41110
41344
  if (opened) return opened;
41111
41345
  } catch (err2) {
41112
41346
  }
@@ -41127,15 +41361,7 @@ var printBlob = async (blob) => {
41127
41361
  printWindow.print?.();
41128
41362
  } catch (err2) {
41129
41363
  }
41130
- try {
41131
- printWindow.close?.();
41132
- } catch (err2) {
41133
- }
41134
- try {
41135
- URL.revokeObjectURL(url);
41136
- } catch (err2) {
41137
- }
41138
- }, 600);
41364
+ }, 800);
41139
41365
  return;
41140
41366
  }
41141
41367
  } catch (err2) {
@@ -41152,24 +41378,18 @@ var printBlob = async (blob) => {
41152
41378
  iframe.style.height = "0";
41153
41379
  iframe.style.border = "0";
41154
41380
  iframe.src = url;
41155
- const cleanup = () => {
41156
- if (iframe.parentNode) {
41157
- iframe.parentNode.removeChild(iframe);
41158
- }
41159
- try {
41160
- URL.revokeObjectURL(url);
41161
- } catch (err2) {
41162
- }
41163
- };
41164
- return new Promise((resolve2, reject) => {
41381
+ return new Promise((resolve3, reject) => {
41165
41382
  iframe.onload = () => {
41166
41383
  try {
41167
41384
  iframe.contentWindow.focus();
41168
- iframe.contentWindow.print();
41169
- setTimeout(cleanup, 1e3);
41170
- resolve2();
41385
+ setTimeout(() => {
41386
+ try {
41387
+ iframe.contentWindow.print();
41388
+ } catch (err2) {
41389
+ }
41390
+ resolve3();
41391
+ }, 800);
41171
41392
  } catch (err2) {
41172
- cleanup();
41173
41393
  reject(err2);
41174
41394
  }
41175
41395
  };
@@ -41233,9 +41453,9 @@ function createPdfApi() {
41233
41453
  const pdfBlob = await normalizePdfBlob(source);
41234
41454
  return await openPreview(pdfBlob, fileName);
41235
41455
  },
41236
- async printPdf(source) {
41456
+ async printPdf(source, fileName = "print.pdf") {
41237
41457
  const pdfBlob = await normalizePdfBlob(source);
41238
- return await printBlob(pdfBlob);
41458
+ return await printBlob(pdfBlob, fileName);
41239
41459
  }
41240
41460
  };
41241
41461
  }