carriera-intern-components 1.1.163 → 1.1.164

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.
@@ -1,6 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class DocumentService {
3
- constructor();
4
3
  /**
5
4
  * Generates a data URL thumbnail for a given file.
6
5
  * Handles PDFs, videos, and images.
@@ -3208,37 +3208,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3208
3208
  type: Input
3209
3209
  }] } });
3210
3210
 
3211
+ pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdfjs/pdf.worker.min.mjs';
3211
3212
  class DocumentService {
3212
- constructor() {
3213
- if (typeof window !== 'undefined' && typeof Worker !== 'undefined') {
3214
- try {
3215
- const baseHref = (document.querySelector('base')?.getAttribute('href') ?? '/');
3216
- const candidatePaths = [
3217
- 'pdfjs/pdf.worker.min.mjs',
3218
- 'assets/pdfjs/pdf.worker.min.mjs',
3219
- ];
3220
- let workerInitialized = false;
3221
- for (const candidate of candidatePaths) {
3222
- try {
3223
- const resolvedUrl = new URL(candidate, baseHref).toString();
3224
- const worker = new Worker(resolvedUrl, { type: 'module' });
3225
- pdfjsLib.GlobalWorkerOptions.workerPort = worker;
3226
- workerInitialized = true;
3227
- break;
3228
- }
3229
- catch (innerError) {
3230
- // try next candidate
3231
- }
3232
- }
3233
- if (!workerInitialized) {
3234
- throw new Error('No PDF.js worker could be initialized from known paths.');
3235
- }
3236
- }
3237
- catch (error) {
3238
- console.warn('PDF.js worker initialization failed:', error);
3239
- }
3240
- }
3241
- }
3242
3213
  /**
3243
3214
  * Generates a data URL thumbnail for a given file.
3244
3215
  * Handles PDFs, videos, and images.
@@ -3379,7 +3350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3379
3350
  args: [{
3380
3351
  providedIn: 'root',
3381
3352
  }]
3382
- }], ctorParameters: () => [] });
3353
+ }] });
3383
3354
 
3384
3355
  /**
3385
3356
  * A component that provides a user interface for file uploading via