@phatvu/web-component-poc 1.0.6 → 1.0.8
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/dist/cjs/fast-button_6.cjs.entry.js +578 -0
- package/dist/cjs/{fast-button_4.cjs.entry.js → fast-carousel.cjs.entry.js} +1 -231
- package/dist/cjs/{index-B2BTpdbN.js → index-227GpI8K.js} +66 -2
- package/dist/cjs/job-card.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/web-component-poc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/button/button.css +14 -14
- package/dist/collection/components/button/button.js +12 -24
- package/dist/collection/components/fast-form/fast-form.css +5 -0
- package/dist/collection/components/fast-form/fast-form.js +99 -0
- package/dist/collection/components/fast-input/fast-input.css +45 -0
- package/dist/collection/components/fast-input/fast-input.js +359 -0
- package/dist/collection/components/jobs-list-only/jobs-list-only.js +180 -3
- package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.css +8 -0
- package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +203 -0
- package/dist/components/fast-button.js +1 -1
- package/dist/components/fast-carousel.js +1 -1
- package/dist/components/fast-form.d.ts +11 -0
- package/dist/components/fast-form.js +1 -0
- package/dist/components/fast-input.d.ts +11 -0
- package/dist/components/fast-input.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/job-card.js +1 -1
- package/dist/components/jobs-item.js +1 -1
- package/dist/components/jobs-list-only.js +1 -1
- package/dist/components/jobs-list-reactive.d.ts +11 -0
- package/dist/components/jobs-list-reactive.js +1 -0
- package/dist/components/p-Bb27ylcX.js +1 -0
- package/dist/components/{p-ClQDwJJB.js → p-CzgtwPsc.js} +1 -1
- package/dist/esm/fast-button_6.entry.js +571 -0
- package/dist/esm/{fast-button_4.entry.js → fast-carousel.entry.js} +2 -229
- package/dist/esm/{index-Dk5CvWmb.js → index-BqjrT3zA.js} +66 -2
- package/dist/esm/job-card.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/web-component-poc.js +3 -3
- package/dist/types/components/button/button.d.ts +1 -13
- package/dist/types/components/fast-form/fast-form.d.ts +10 -0
- package/dist/types/components/fast-input/fast-input.d.ts +35 -0
- package/dist/types/components/jobs-list-only/jobs-list-only.d.ts +22 -0
- package/dist/types/components/jobs-list-reactive/jobs-list-reactive.d.ts +26 -0
- package/dist/types/components.d.ts +256 -11
- package/dist/web-component-poc/{p-52c85341.entry.js → p-14247159.entry.js} +1 -1
- package/dist/web-component-poc/p-309a490b.entry.js +1 -0
- package/dist/web-component-poc/p-7ea9a87f.entry.js +1 -0
- package/dist/web-component-poc/{p-Dk5CvWmb.js → p-BqjrT3zA.js} +2 -2
- package/dist/web-component-poc/web-component-poc.esm.js +1 -1
- package/hydrate/index.js +457 -27
- package/hydrate/index.mjs +457 -27
- package/package.json +7 -3
- package/dist/components/p-UM9TUfe3.js +0 -1
- package/dist/web-component-poc/p-96761988.entry.js +0 -1
|
@@ -12,17 +12,14 @@ export { Job } from "./types/jobs-list";
|
|
|
12
12
|
export namespace Components {
|
|
13
13
|
interface FastButton {
|
|
14
14
|
/**
|
|
15
|
-
* When true, the button is disabled and does not emit events.
|
|
16
15
|
* @default false
|
|
17
16
|
*/
|
|
18
17
|
"disabled": boolean;
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @default 'button'
|
|
19
|
+
* @default 'submit'
|
|
22
20
|
*/
|
|
23
21
|
"type": ButtonType;
|
|
24
22
|
/**
|
|
25
|
-
* Visual variant of the button.
|
|
26
23
|
* @default 'primary'
|
|
27
24
|
*/
|
|
28
25
|
"variant": ButtonVariant;
|
|
@@ -70,6 +67,41 @@ export namespace Components {
|
|
|
70
67
|
*/
|
|
71
68
|
"slideClass": string;
|
|
72
69
|
}
|
|
70
|
+
interface FastForm {
|
|
71
|
+
}
|
|
72
|
+
interface FastInput {
|
|
73
|
+
/**
|
|
74
|
+
* @default '/api/jobs/autocomplete'
|
|
75
|
+
*/
|
|
76
|
+
"autocompleteUrl": string;
|
|
77
|
+
/**
|
|
78
|
+
* @default 300
|
|
79
|
+
*/
|
|
80
|
+
"debounceMs": number;
|
|
81
|
+
/**
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
"enableAutocomplete": boolean;
|
|
85
|
+
"getParamName": () => Promise<string>;
|
|
86
|
+
"getValue": () => Promise<string>;
|
|
87
|
+
/**
|
|
88
|
+
* @default 3
|
|
89
|
+
*/
|
|
90
|
+
"minChars": number;
|
|
91
|
+
/**
|
|
92
|
+
* @default 'keyword'
|
|
93
|
+
*/
|
|
94
|
+
"paramName": string;
|
|
95
|
+
/**
|
|
96
|
+
* @default 'Search...'
|
|
97
|
+
*/
|
|
98
|
+
"placeholder": string;
|
|
99
|
+
"targetPath": string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* @default ''
|
|
102
|
+
*/
|
|
103
|
+
"value": string;
|
|
104
|
+
}
|
|
73
105
|
/**
|
|
74
106
|
* JobCard Component
|
|
75
107
|
* A reusable card component for displaying job information based on the React JobItem component.
|
|
@@ -193,10 +225,20 @@ export namespace Components {
|
|
|
193
225
|
"showReference": boolean;
|
|
194
226
|
}
|
|
195
227
|
interface JobsListOnly {
|
|
228
|
+
/**
|
|
229
|
+
* Jobs search endpoint
|
|
230
|
+
* @default '/api/get-jobs'
|
|
231
|
+
*/
|
|
232
|
+
"apiUrl": string;
|
|
196
233
|
/**
|
|
197
234
|
* @default 'Apply Now'
|
|
198
235
|
*/
|
|
199
236
|
"applyButtonText": string;
|
|
237
|
+
/**
|
|
238
|
+
* When true, component manages its own data fetching
|
|
239
|
+
* @default false
|
|
240
|
+
*/
|
|
241
|
+
"autoFetch": boolean;
|
|
200
242
|
/**
|
|
201
243
|
* @default 'Try different keywords'
|
|
202
244
|
*/
|
|
@@ -261,6 +303,11 @@ export namespace Components {
|
|
|
261
303
|
* @default true
|
|
262
304
|
*/
|
|
263
305
|
"showBrand": boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Template string for count display. Tokens: {count} = jobs on page, {total} = total from API.
|
|
308
|
+
* @default ''
|
|
309
|
+
*/
|
|
310
|
+
"showCountText": string;
|
|
264
311
|
/**
|
|
265
312
|
* @default true
|
|
266
313
|
*/
|
|
@@ -282,12 +329,50 @@ export namespace Components {
|
|
|
282
329
|
* @default 0
|
|
283
330
|
*/
|
|
284
331
|
"totalJob": number;
|
|
332
|
+
/**
|
|
333
|
+
* Comma-separated URL param names to watch and forward to the API
|
|
334
|
+
* @default 'keyword'
|
|
335
|
+
*/
|
|
336
|
+
"watchParams": string;
|
|
337
|
+
}
|
|
338
|
+
interface JobsListReactive {
|
|
339
|
+
/**
|
|
340
|
+
* Jobs search endpoint
|
|
341
|
+
* @default '/api/get-jobs'
|
|
342
|
+
*/
|
|
343
|
+
"apiUrl": string;
|
|
344
|
+
/**
|
|
345
|
+
* CSS class added to container while fetching
|
|
346
|
+
* @default 'loading'
|
|
347
|
+
*/
|
|
348
|
+
"loadingClass": string;
|
|
349
|
+
/**
|
|
350
|
+
* Comma-separated URL param names to watch and forward to the API
|
|
351
|
+
* @default 'keyword,location_name'
|
|
352
|
+
*/
|
|
353
|
+
"watchParams": string;
|
|
285
354
|
}
|
|
286
355
|
}
|
|
287
356
|
export interface FastButtonCustomEvent<T> extends CustomEvent<T> {
|
|
288
357
|
detail: T;
|
|
289
358
|
target: HTMLFastButtonElement;
|
|
290
359
|
}
|
|
360
|
+
export interface FastFormCustomEvent<T> extends CustomEvent<T> {
|
|
361
|
+
detail: T;
|
|
362
|
+
target: HTMLFastFormElement;
|
|
363
|
+
}
|
|
364
|
+
export interface FastInputCustomEvent<T> extends CustomEvent<T> {
|
|
365
|
+
detail: T;
|
|
366
|
+
target: HTMLFastInputElement;
|
|
367
|
+
}
|
|
368
|
+
export interface JobsListOnlyCustomEvent<T> extends CustomEvent<T> {
|
|
369
|
+
detail: T;
|
|
370
|
+
target: HTMLJobsListOnlyElement;
|
|
371
|
+
}
|
|
372
|
+
export interface JobsListReactiveCustomEvent<T> extends CustomEvent<T> {
|
|
373
|
+
detail: T;
|
|
374
|
+
target: HTMLJobsListReactiveElement;
|
|
375
|
+
}
|
|
291
376
|
declare global {
|
|
292
377
|
interface HTMLFastButtonElementEventMap {
|
|
293
378
|
"buttonClick": MouseEvent;
|
|
@@ -312,6 +397,41 @@ declare global {
|
|
|
312
397
|
prototype: HTMLFastCarouselElement;
|
|
313
398
|
new (): HTMLFastCarouselElement;
|
|
314
399
|
};
|
|
400
|
+
interface HTMLFastFormElementEventMap {
|
|
401
|
+
"searchExecuted": Record<string, string>;
|
|
402
|
+
}
|
|
403
|
+
interface HTMLFastFormElement extends Components.FastForm, HTMLStencilElement {
|
|
404
|
+
addEventListener<K extends keyof HTMLFastFormElementEventMap>(type: K, listener: (this: HTMLFastFormElement, ev: FastFormCustomEvent<HTMLFastFormElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
405
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
406
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
407
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
408
|
+
removeEventListener<K extends keyof HTMLFastFormElementEventMap>(type: K, listener: (this: HTMLFastFormElement, ev: FastFormCustomEvent<HTMLFastFormElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
409
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
410
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
411
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
412
|
+
}
|
|
413
|
+
var HTMLFastFormElement: {
|
|
414
|
+
prototype: HTMLFastFormElement;
|
|
415
|
+
new (): HTMLFastFormElement;
|
|
416
|
+
};
|
|
417
|
+
interface HTMLFastInputElementEventMap {
|
|
418
|
+
"inputSubmit": void;
|
|
419
|
+
"inputChanged": { value: string };
|
|
420
|
+
}
|
|
421
|
+
interface HTMLFastInputElement extends Components.FastInput, HTMLStencilElement {
|
|
422
|
+
addEventListener<K extends keyof HTMLFastInputElementEventMap>(type: K, listener: (this: HTMLFastInputElement, ev: FastInputCustomEvent<HTMLFastInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
423
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
424
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
425
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
426
|
+
removeEventListener<K extends keyof HTMLFastInputElementEventMap>(type: K, listener: (this: HTMLFastInputElement, ev: FastInputCustomEvent<HTMLFastInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
427
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
428
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
429
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
430
|
+
}
|
|
431
|
+
var HTMLFastInputElement: {
|
|
432
|
+
prototype: HTMLFastInputElement;
|
|
433
|
+
new (): HTMLFastInputElement;
|
|
434
|
+
};
|
|
315
435
|
/**
|
|
316
436
|
* JobCard Component
|
|
317
437
|
* A reusable card component for displaying job information based on the React JobItem component.
|
|
@@ -345,38 +465,63 @@ declare global {
|
|
|
345
465
|
prototype: HTMLJobsItemElement;
|
|
346
466
|
new (): HTMLJobsItemElement;
|
|
347
467
|
};
|
|
468
|
+
interface HTMLJobsListOnlyElementEventMap {
|
|
469
|
+
"fetchComplete": { jobs: any[]; totalJob: number };
|
|
470
|
+
}
|
|
348
471
|
interface HTMLJobsListOnlyElement extends Components.JobsListOnly, HTMLStencilElement {
|
|
472
|
+
addEventListener<K extends keyof HTMLJobsListOnlyElementEventMap>(type: K, listener: (this: HTMLJobsListOnlyElement, ev: JobsListOnlyCustomEvent<HTMLJobsListOnlyElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
473
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
474
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
475
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
476
|
+
removeEventListener<K extends keyof HTMLJobsListOnlyElementEventMap>(type: K, listener: (this: HTMLJobsListOnlyElement, ev: JobsListOnlyCustomEvent<HTMLJobsListOnlyElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
477
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
478
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
479
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
349
480
|
}
|
|
350
481
|
var HTMLJobsListOnlyElement: {
|
|
351
482
|
prototype: HTMLJobsListOnlyElement;
|
|
352
483
|
new (): HTMLJobsListOnlyElement;
|
|
353
484
|
};
|
|
485
|
+
interface HTMLJobsListReactiveElementEventMap {
|
|
486
|
+
"fetchComplete": { jobs: Job[]; totalJob: number };
|
|
487
|
+
}
|
|
488
|
+
interface HTMLJobsListReactiveElement extends Components.JobsListReactive, HTMLStencilElement {
|
|
489
|
+
addEventListener<K extends keyof HTMLJobsListReactiveElementEventMap>(type: K, listener: (this: HTMLJobsListReactiveElement, ev: JobsListReactiveCustomEvent<HTMLJobsListReactiveElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
490
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
491
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
492
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
493
|
+
removeEventListener<K extends keyof HTMLJobsListReactiveElementEventMap>(type: K, listener: (this: HTMLJobsListReactiveElement, ev: JobsListReactiveCustomEvent<HTMLJobsListReactiveElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
494
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
495
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
496
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
497
|
+
}
|
|
498
|
+
var HTMLJobsListReactiveElement: {
|
|
499
|
+
prototype: HTMLJobsListReactiveElement;
|
|
500
|
+
new (): HTMLJobsListReactiveElement;
|
|
501
|
+
};
|
|
354
502
|
interface HTMLElementTagNameMap {
|
|
355
503
|
"fast-button": HTMLFastButtonElement;
|
|
356
504
|
"fast-carousel": HTMLFastCarouselElement;
|
|
505
|
+
"fast-form": HTMLFastFormElement;
|
|
506
|
+
"fast-input": HTMLFastInputElement;
|
|
357
507
|
"job-card": HTMLJobCardElement;
|
|
358
508
|
"jobs-item": HTMLJobsItemElement;
|
|
359
509
|
"jobs-list-only": HTMLJobsListOnlyElement;
|
|
510
|
+
"jobs-list-reactive": HTMLJobsListReactiveElement;
|
|
360
511
|
}
|
|
361
512
|
}
|
|
362
513
|
declare namespace LocalJSX {
|
|
363
514
|
interface FastButton {
|
|
364
515
|
/**
|
|
365
|
-
* When true, the button is disabled and does not emit events.
|
|
366
516
|
* @default false
|
|
367
517
|
*/
|
|
368
518
|
"disabled"?: boolean;
|
|
369
|
-
/**
|
|
370
|
-
* Emitted when the button is clicked (not emitted when disabled).
|
|
371
|
-
*/
|
|
372
519
|
"onButtonClick"?: (event: FastButtonCustomEvent<MouseEvent>) => void;
|
|
373
520
|
/**
|
|
374
|
-
*
|
|
375
|
-
* @default 'button'
|
|
521
|
+
* @default 'submit'
|
|
376
522
|
*/
|
|
377
523
|
"type"?: ButtonType;
|
|
378
524
|
/**
|
|
379
|
-
* Visual variant of the button.
|
|
380
525
|
* @default 'primary'
|
|
381
526
|
*/
|
|
382
527
|
"variant"?: ButtonVariant;
|
|
@@ -408,6 +553,42 @@ declare namespace LocalJSX {
|
|
|
408
553
|
*/
|
|
409
554
|
"slideClass"?: string;
|
|
410
555
|
}
|
|
556
|
+
interface FastForm {
|
|
557
|
+
"onSearchExecuted"?: (event: FastFormCustomEvent<Record<string, string>>) => void;
|
|
558
|
+
}
|
|
559
|
+
interface FastInput {
|
|
560
|
+
/**
|
|
561
|
+
* @default '/api/jobs/autocomplete'
|
|
562
|
+
*/
|
|
563
|
+
"autocompleteUrl"?: string;
|
|
564
|
+
/**
|
|
565
|
+
* @default 300
|
|
566
|
+
*/
|
|
567
|
+
"debounceMs"?: number;
|
|
568
|
+
/**
|
|
569
|
+
* @default false
|
|
570
|
+
*/
|
|
571
|
+
"enableAutocomplete"?: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* @default 3
|
|
574
|
+
*/
|
|
575
|
+
"minChars"?: number;
|
|
576
|
+
"onInputChanged"?: (event: FastInputCustomEvent<{ value: string }>) => void;
|
|
577
|
+
"onInputSubmit"?: (event: FastInputCustomEvent<void>) => void;
|
|
578
|
+
/**
|
|
579
|
+
* @default 'keyword'
|
|
580
|
+
*/
|
|
581
|
+
"paramName"?: string;
|
|
582
|
+
/**
|
|
583
|
+
* @default 'Search...'
|
|
584
|
+
*/
|
|
585
|
+
"placeholder"?: string;
|
|
586
|
+
"targetPath"?: string | undefined;
|
|
587
|
+
/**
|
|
588
|
+
* @default ''
|
|
589
|
+
*/
|
|
590
|
+
"value"?: string;
|
|
591
|
+
}
|
|
411
592
|
/**
|
|
412
593
|
* JobCard Component
|
|
413
594
|
* A reusable card component for displaying job information based on the React JobItem component.
|
|
@@ -531,10 +712,20 @@ declare namespace LocalJSX {
|
|
|
531
712
|
"showReference"?: boolean;
|
|
532
713
|
}
|
|
533
714
|
interface JobsListOnly {
|
|
715
|
+
/**
|
|
716
|
+
* Jobs search endpoint
|
|
717
|
+
* @default '/api/get-jobs'
|
|
718
|
+
*/
|
|
719
|
+
"apiUrl"?: string;
|
|
534
720
|
/**
|
|
535
721
|
* @default 'Apply Now'
|
|
536
722
|
*/
|
|
537
723
|
"applyButtonText"?: string;
|
|
724
|
+
/**
|
|
725
|
+
* When true, component manages its own data fetching
|
|
726
|
+
* @default false
|
|
727
|
+
*/
|
|
728
|
+
"autoFetch"?: boolean;
|
|
538
729
|
/**
|
|
539
730
|
* @default 'Try different keywords'
|
|
540
731
|
*/
|
|
@@ -586,6 +777,7 @@ declare namespace LocalJSX {
|
|
|
586
777
|
* @default defaultNoResultsLine2
|
|
587
778
|
*/
|
|
588
779
|
"noResultsLine2"?: string;
|
|
780
|
+
"onFetchComplete"?: (event: JobsListOnlyCustomEvent<{ jobs: any[]; totalJob: number }>) => void;
|
|
589
781
|
/**
|
|
590
782
|
* @default 'Remote'
|
|
591
783
|
*/
|
|
@@ -599,6 +791,11 @@ declare namespace LocalJSX {
|
|
|
599
791
|
* @default true
|
|
600
792
|
*/
|
|
601
793
|
"showBrand"?: boolean;
|
|
794
|
+
/**
|
|
795
|
+
* Template string for count display. Tokens: {count} = jobs on page, {total} = total from API.
|
|
796
|
+
* @default ''
|
|
797
|
+
*/
|
|
798
|
+
"showCountText"?: string;
|
|
602
799
|
/**
|
|
603
800
|
* @default true
|
|
604
801
|
*/
|
|
@@ -620,6 +817,29 @@ declare namespace LocalJSX {
|
|
|
620
817
|
* @default 0
|
|
621
818
|
*/
|
|
622
819
|
"totalJob"?: number;
|
|
820
|
+
/**
|
|
821
|
+
* Comma-separated URL param names to watch and forward to the API
|
|
822
|
+
* @default 'keyword'
|
|
823
|
+
*/
|
|
824
|
+
"watchParams"?: string;
|
|
825
|
+
}
|
|
826
|
+
interface JobsListReactive {
|
|
827
|
+
/**
|
|
828
|
+
* Jobs search endpoint
|
|
829
|
+
* @default '/api/get-jobs'
|
|
830
|
+
*/
|
|
831
|
+
"apiUrl"?: string;
|
|
832
|
+
/**
|
|
833
|
+
* CSS class added to container while fetching
|
|
834
|
+
* @default 'loading'
|
|
835
|
+
*/
|
|
836
|
+
"loadingClass"?: string;
|
|
837
|
+
"onFetchComplete"?: (event: JobsListReactiveCustomEvent<{ jobs: Job[]; totalJob: number }>) => void;
|
|
838
|
+
/**
|
|
839
|
+
* Comma-separated URL param names to watch and forward to the API
|
|
840
|
+
* @default 'keyword,location_name'
|
|
841
|
+
*/
|
|
842
|
+
"watchParams"?: string;
|
|
623
843
|
}
|
|
624
844
|
|
|
625
845
|
interface FastButtonAttributes {
|
|
@@ -635,6 +855,16 @@ declare namespace LocalJSX {
|
|
|
635
855
|
"slideClass": string;
|
|
636
856
|
"itemClass": string;
|
|
637
857
|
}
|
|
858
|
+
interface FastInputAttributes {
|
|
859
|
+
"placeholder": string;
|
|
860
|
+
"value": string;
|
|
861
|
+
"paramName": string;
|
|
862
|
+
"enableAutocomplete": boolean;
|
|
863
|
+
"autocompleteUrl": string;
|
|
864
|
+
"targetPath": string | undefined;
|
|
865
|
+
"debounceMs": number;
|
|
866
|
+
"minChars": number;
|
|
867
|
+
}
|
|
638
868
|
interface JobCardAttributes {
|
|
639
869
|
"job": Job | string;
|
|
640
870
|
"index": number;
|
|
@@ -675,20 +905,32 @@ declare namespace LocalJSX {
|
|
|
675
905
|
"remoteLocationText": string;
|
|
676
906
|
"enableKilometers": boolean;
|
|
677
907
|
"rootClass": string;
|
|
908
|
+
"showCountText": string;
|
|
678
909
|
"showSuggestions": boolean;
|
|
679
910
|
"clearResultSuggestionsTitleText": string;
|
|
680
911
|
"clearResultSuggestionsLine1": string;
|
|
681
912
|
"clearResultSuggestionsLine2": string;
|
|
682
913
|
"clearResultSuggestionsLine3": string;
|
|
683
914
|
"clearResultSuggestionsLine4": string;
|
|
915
|
+
"autoFetch": boolean;
|
|
916
|
+
"apiUrl": string;
|
|
917
|
+
"watchParams": string;
|
|
918
|
+
}
|
|
919
|
+
interface JobsListReactiveAttributes {
|
|
920
|
+
"apiUrl": string;
|
|
921
|
+
"watchParams": string;
|
|
922
|
+
"loadingClass": string;
|
|
684
923
|
}
|
|
685
924
|
|
|
686
925
|
interface IntrinsicElements {
|
|
687
926
|
"fast-button": Omit<FastButton, keyof FastButtonAttributes> & { [K in keyof FastButton & keyof FastButtonAttributes]?: FastButton[K] } & { [K in keyof FastButton & keyof FastButtonAttributes as `attr:${K}`]?: FastButtonAttributes[K] } & { [K in keyof FastButton & keyof FastButtonAttributes as `prop:${K}`]?: FastButton[K] };
|
|
688
927
|
"fast-carousel": Omit<FastCarousel, keyof FastCarouselAttributes> & { [K in keyof FastCarousel & keyof FastCarouselAttributes]?: FastCarousel[K] } & { [K in keyof FastCarousel & keyof FastCarouselAttributes as `attr:${K}`]?: FastCarouselAttributes[K] } & { [K in keyof FastCarousel & keyof FastCarouselAttributes as `prop:${K}`]?: FastCarousel[K] };
|
|
928
|
+
"fast-form": FastForm;
|
|
929
|
+
"fast-input": Omit<FastInput, keyof FastInputAttributes> & { [K in keyof FastInput & keyof FastInputAttributes]?: FastInput[K] } & { [K in keyof FastInput & keyof FastInputAttributes as `attr:${K}`]?: FastInputAttributes[K] } & { [K in keyof FastInput & keyof FastInputAttributes as `prop:${K}`]?: FastInput[K] };
|
|
689
930
|
"job-card": Omit<JobCard, keyof JobCardAttributes> & { [K in keyof JobCard & keyof JobCardAttributes]?: JobCard[K] } & { [K in keyof JobCard & keyof JobCardAttributes as `attr:${K}`]?: JobCardAttributes[K] } & { [K in keyof JobCard & keyof JobCardAttributes as `prop:${K}`]?: JobCard[K] };
|
|
690
931
|
"jobs-item": Omit<JobsItem, keyof JobsItemAttributes> & { [K in keyof JobsItem & keyof JobsItemAttributes]?: JobsItem[K] } & { [K in keyof JobsItem & keyof JobsItemAttributes as `attr:${K}`]?: JobsItemAttributes[K] } & { [K in keyof JobsItem & keyof JobsItemAttributes as `prop:${K}`]?: JobsItem[K] };
|
|
691
932
|
"jobs-list-only": Omit<JobsListOnly, keyof JobsListOnlyAttributes> & { [K in keyof JobsListOnly & keyof JobsListOnlyAttributes]?: JobsListOnly[K] } & { [K in keyof JobsListOnly & keyof JobsListOnlyAttributes as `attr:${K}`]?: JobsListOnlyAttributes[K] } & { [K in keyof JobsListOnly & keyof JobsListOnlyAttributes as `prop:${K}`]?: JobsListOnly[K] };
|
|
933
|
+
"jobs-list-reactive": Omit<JobsListReactive, keyof JobsListReactiveAttributes> & { [K in keyof JobsListReactive & keyof JobsListReactiveAttributes]?: JobsListReactive[K] } & { [K in keyof JobsListReactive & keyof JobsListReactiveAttributes as `attr:${K}`]?: JobsListReactiveAttributes[K] } & { [K in keyof JobsListReactive & keyof JobsListReactiveAttributes as `prop:${K}`]?: JobsListReactive[K] };
|
|
692
934
|
}
|
|
693
935
|
}
|
|
694
936
|
export { LocalJSX as JSX };
|
|
@@ -697,6 +939,8 @@ declare module "@stencil/core" {
|
|
|
697
939
|
interface IntrinsicElements {
|
|
698
940
|
"fast-button": LocalJSX.IntrinsicElements["fast-button"] & JSXBase.HTMLAttributes<HTMLFastButtonElement>;
|
|
699
941
|
"fast-carousel": LocalJSX.IntrinsicElements["fast-carousel"] & JSXBase.HTMLAttributes<HTMLFastCarouselElement>;
|
|
942
|
+
"fast-form": LocalJSX.IntrinsicElements["fast-form"] & JSXBase.HTMLAttributes<HTMLFastFormElement>;
|
|
943
|
+
"fast-input": LocalJSX.IntrinsicElements["fast-input"] & JSXBase.HTMLAttributes<HTMLFastInputElement>;
|
|
700
944
|
/**
|
|
701
945
|
* JobCard Component
|
|
702
946
|
* A reusable card component for displaying job information based on the React JobItem component.
|
|
@@ -721,6 +965,7 @@ declare module "@stencil/core" {
|
|
|
721
965
|
"job-card": LocalJSX.IntrinsicElements["job-card"] & JSXBase.HTMLAttributes<HTMLJobCardElement>;
|
|
722
966
|
"jobs-item": LocalJSX.IntrinsicElements["jobs-item"] & JSXBase.HTMLAttributes<HTMLJobsItemElement>;
|
|
723
967
|
"jobs-list-only": LocalJSX.IntrinsicElements["jobs-list-only"] & JSXBase.HTMLAttributes<HTMLJobsListOnlyElement>;
|
|
968
|
+
"jobs-list-reactive": LocalJSX.IntrinsicElements["jobs-list-reactive"] & JSXBase.HTMLAttributes<HTMLJobsListReactiveElement>;
|
|
724
969
|
}
|
|
725
970
|
}
|
|
726
971
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o}from"./p-
|
|
1
|
+
import{r as e,h as o}from"./p-BqjrT3zA.js";const r=class{constructor(o){e(this,o)}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;showCommuteTime=!1;streetFormat="{street}, {city_state_abbr}";rootClass="";extraFieldsConfig=[];formatDistance(e){const o=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*e:e).toFixed(1)} ${o}`.replace(".0","")}isEmpty(e){return null==e||""===e||!(!Array.isArray(e)||0!==e.length)}getJobData(){if(!this.job)return null;if("string"==typeof this.job)try{return JSON.parse(this.job)}catch{return console.warn("job-card: Failed to parse job JSON string"),null}return this.job}render(){const e=this.getJobData();if(!e)return null;const r=function(e){const o=e.locations;if(o?.length)return o[0]}(e),a=r?(t=r).cityStateAbbr?t.cityStateAbbr:[t.streetAddress,t.city,t.stateAbbr||t.state,t.countryAbbr||t.country].filter(Boolean).join(", ")||t.locationText||"":"";var t;const n=r?.distance??0,s=n>0?this.formatDistance(n):"",i=e.applyURL||(e.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${e.originalURL}`:"#"),c=`${this.applyButtonText}, ${e.title||""}`,l=e.locations??[],d=l.length>1;return o("div",{class:`job-card ${this.rootClass}`.trim()},o("div",{class:"job-card__header"},o("h3",{class:"job-card__title"},o("a",{class:"job-card__title--link",href:i,target:"_blank",rel:"noopener noreferrer"},e.title||""),this.showReference&&o("span",{class:"job-card__reference "+(e.reference?"":"job-card__reference--empty")},e.reference||""),e.isRemote&&o("span",{class:this.remoteLocationText?"job-card__remote":"job-card__remote job-card__remote--empty"},this.remoteLocationText)),s&&o("div",{class:"job-card__distance"},o("span",{class:"job-card__distance--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),o("span",{class:"job-card__distance--label"},s))),o("div",{class:"job-card__content"},o("div",{class:"job-card__info"},o("div",{class:l.length?"job-card__street":"job-card__street job-card__street--empty"},o("div",{class:"job-card__street--label__wrapper"},o("span",{class:"job-card__street--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),o("span",{class:"job-card__street--label"},a||"—")),d&&o("div",{class:"job-card__street--more-locations__wrapper"},o("span",{class:"job-card__street--amount"},"+",l.length-1),o("span",{class:"job-card__street--more-locations"},this.multiLocationText))),this.showBrand&&o("div",{class:e.brandName?"job-card__brand":"job-card__brand job-card__brand--empty"},o("span",{class:"job-card__brand--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),o("span",{class:"job-card__brand--label"},e.brandName||"—")),this.showEmploymentType&&o("div",{class:e.employmentType?.length?"job-card__employment-type":"job-card__employment-type job-card__employment-type--empty"},o("span",{class:"job-card__employment-type--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),e.employmentType?.length?e.employmentType?.map((e=>o("span",{key:e,class:"job-card__employment-type--label"},e))):o("span",{class:"job-card__employment-type--label"},"—")),(e.jobCardExtraFields??[]).length>0&&e.jobCardExtraFields?.map(((e,r)=>o("div",{key:r,class:this.isEmpty(e.value)?`${e.classname}--empty`:`${e.classname}`},Array.isArray(e.value)?e.value.map(((r,a)=>o("span",{key:a,class:`${e.classname}--label`},r))):o("span",{class:`${e.classname}--label`},e.value))))),o("a",{class:"job-card__apply",href:i,target:"_blank",rel:"noopener noreferrer","aria-label":c},o("span",{class:"job-card__apply--label"},this.applyButtonText),o("span",{class:"job-card__apply--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))))))}};r.style=".job-card{display:block;padding:16px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);transition:box-shadow 0.2s ease, border-color 0.2s ease}.job-card:hover{box-shadow:0 4px 8px rgba(0, 0, 0, 0.12);border-color:#d0d0d0}.job-card__header{margin-bottom:12px}.job-card__title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.job-card__title--link{text-decoration:none;color:#1f9755;transition:color 0.2s ease}.job-card__title--link:hover{text-decoration:underline;color:#1a7a43}.job-card__reference{font-size:0.875em;color:#666;background-color:#f5f5f5;padding:2px 6px;border-radius:3px}.job-card__reference--empty{display:none}.job-card__remote{background:#e8f5e9;color:#2e7d32;border-radius:100px;padding:4px 12px;text-transform:uppercase;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}.job-card__remote--empty{display:none}.job-card__distance{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;font-weight:500;color:#555}.job-card__distance--icon{display:inline-flex;align-items:center}.job-card__distance--icon svg{width:16px;height:16px;color:#1f9755}.job-card__content{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-card__info{flex:1;display:flex;flex-direction:column;gap:8px}.job-card__street,.job-card__brand,.job-card__employment-type{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:14px}.job-card__street--empty,.job-card__brand--empty,.job-card__employment-type--empty{color:#999}.job-card__street--icon,.job-card__brand--icon,.job-card__employment-type--icon{display:inline-flex;align-items:center;flex-shrink:0}.job-card__street--icon svg,.job-card__brand--icon svg,.job-card__employment-type--icon svg{width:16px;height:16px;color:#666}.job-card__street--label,.job-card__brand--label,.job-card__employment-type--label{color:#333}.job-card__street--label__wrapper{display:flex;align-items:center;gap:6px}.job-card__street--more-locations__wrapper{display:flex;align-items:center;gap:2px;font-size:12px;margin-left:2px}.job-card__street--amount{font-weight:600;color:#1f9755}.job-card__street--more-locations{color:#999}.job-card__apply{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;background-color:#198754;color:#fff;border-radius:4px;text-decoration:none;font-weight:600;font-size:14px;transition:background-color 0.2s ease, transform 0.1s ease;white-space:nowrap;flex-shrink:0}.job-card__apply:hover{background-color:#1a6f47;transform:translateY(-1px)}.job-card__apply:active{transform:translateY(0)}.job-card__apply--icon{display:inline-flex;align-items:center}.job-card__apply--icon svg{width:14px;height:14px}@media (max-width: 768px){.job-card{padding:12px}.job-card__content{flex-direction:column;gap:10px}.job-card__apply{width:100%;justify-content:center}.job-card__title{font-size:16px}}@media (max-width: 480px){.job-card{padding:10px}.job-card__title{font-size:15px}.job-card__distance{font-size:12px}.job-card__street,.job-card__brand,.job-card__employment-type{font-size:13px}}";export{r as job_card}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,g as t,h as e}from"./p-BqjrT3zA.js";function o(n){return"number"==typeof n}function r(n){return"string"==typeof n}function i(n){return"boolean"==typeof n}function s(n){return"[object Object]"===Object.prototype.toString.call(n)}function c(n){return Math.abs(n)}function u(n){return Math.sign(n)}function l(n,t){return c(n-t)}function a(n){return g(n).map(Number)}function d(n){return n[f(n)]}function f(n){return Math.max(0,n.length-1)}function h(n,t){return t===f(n)}function p(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function g(n){return Object.keys(n)}function b(n,t){return[n,t].reduce(((n,t)=>(g(t).forEach((e=>{const o=n[e],r=t[e],i=s(o)&&s(r);n[e]=i?b(o,r):r})),n)),{})}function m(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function y(){let n=[];const t={add:function(e,o,r,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(o,r,i),s=()=>e.removeEventListener(o,r,i);else{const n=e;n.addListener(r),s=()=>n.removeListener(r)}return n.push(s),t},clear:function(){n=n.filter((n=>n()))}};return t}function v(n=0,t=0){const e=c(n-t);function o(t){return t<n}function r(n){return n>t}function i(n){return o(n)||r(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?o(e)?n:t:e},reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function x(n,t,e){const{constrain:o}=v(0,n),r=n+1;let i=s(t);function s(n){return e?c((r+n)%r):o(n)}function u(){return i}function l(){return x(n,u(),e)}const a={get:u,set:function(n){return i=s(n),a},add:function(n){return l().set(u()+n)},clone:l};return a}function _(n,t,e,o,r,s,a,d,f,h,p,g,b,x,_,k,w,S,L){const{cross:C,direction:I}=n,M=["INPUT","SELECT","TEXTAREA"],T={passive:!1},A=y(),E=y(),N=v(50,225).constrain(x.measure(20)),R={mouse:300,touch:400},z={mouse:500,touch:600},j=_?43:25;let B=!1,O=0,F=0,D=!1,H=!1,P=!1,$=!1;function G(n){if(!m(n,o)&&n.touches.length>=2)return V(n);const t=s.readPoint(n),e=s.readPoint(n,C),i=l(t,O),c=l(e,F);if(!H&&!$){if(!n.cancelable)return V(n);if(H=i>c,!H)return V(n)}const u=s.pointerMove(n);i>k&&(P=!0),h.useFriction(.3).useDuration(.75),d.start(),r.add(I(u)),n.preventDefault()}function V(n){const t=p.byDistance(0,!1).index!==g.get(),e=s.pointerUp(n)*(_?z:R)[$?"mouse":"touch"],o=function(n,t){const e=g.add(-1*u(n)),o=p.byDistance(n,!_).distance;return _||c(n)<N?o:w&&t?.5*o:p.byIndex(e.get(),0).distance}(I(e),t),r=function(n,t){if(0===n||0===t)return 0;if(c(n)<=c(t))return 0;const e=l(c(n),c(t));return c(e/n)}(e,o),i=j-10*r,a=S+r/50;H=!1,D=!1,E.clear(),h.useDuration(i).useFriction(a),f.distance(o,!_),$=!1,b.emit("pointerUp")}function W(n){P&&(n.stopPropagation(),n.preventDefault(),P=!1)}return{init:function(n){if(!L)return;function c(c){(i(L)||L(n,c))&&function(n){const i=m(n,o);$=i,P=_&&i&&!n.buttons&&B,B=l(r.get(),a.get())>=2,i&&0!==n.button||function(n){return M.includes(n.nodeName||"")}(n.target)||(D=!0,s.pointerDown(n),h.useFriction(0).useDuration(0),r.set(a),function(){const n=$?e:t;E.add(n,"touchmove",G,T).add(n,"touchend",V).add(n,"mousemove",G,T).add(n,"mouseup",V)}(),O=s.readPoint(n),F=s.readPoint(n,C),b.emit("pointerDown"))}(c)}const u=t;A.add(u,"dragstart",(n=>n.preventDefault()),T).add(u,"touchmove",(()=>{}),T).add(u,"touchend",(()=>{})).add(u,"touchstart",c).add(u,"mousedown",c).add(u,"touchcancel",V).add(u,"contextmenu",V).add(u,"click",W,!0)},destroy:function(){A.clear(),E.clear()},pointerDown:function(){return D}}}function k(n,t){let e,o;function r(n){return n.timeStamp}function i(e,o){const r="client"+("x"===(o||n.scroll)?"X":"Y");return(m(e,t)?e:e.touches[0])[r]}return{pointerDown:function(n){return e=n,o=n,i(n)},pointerMove:function(n){const t=i(n)-i(o),s=r(n)-r(e)>170;return o=n,s&&(e=n),t},pointerUp:function(n){if(!e||!o)return 0;const t=i(o)-i(e),s=r(n)-r(e),u=r(n)-r(o)>170,l=t/s;return s&&!u&&c(l)>.1?l:0},readPoint:i}}function w(n,t,e,o,r,s,u){const l=[n].concat(o);let a,d,f=[],h=!1;function p(n){return r.measureSize(u.measure(n))}return{init:function(r){s&&(d=p(n),f=o.map(p),a=new ResizeObserver((e=>{(i(s)||s(r,e))&&function(e){for(const i of e){if(h)return;const e=i.target===n,s=o.indexOf(i.target),u=e?d:f[s];if(c(p(e?n:o[s])-u)>=.5){r.reInit(),t.emit("resize");break}}}(e)})),e.requestAnimationFrame((()=>{l.forEach((n=>a.observe(n)))})))},destroy:function(){h=!0,a&&a.disconnect()}}}function S(n,t,e,o,r){const i=r.measure(10),s=r.measure(50),u=v(.1,.99);let l=!1;function a(){return!l&&!!n.reachedAny(e.get())&&!!n.reachedAny(t.get())}return{shouldConstrain:a,constrain:function(r){if(!a())return;const l=n.reachedMin(t.get())?"min":"max",d=c(n[l]-t.get()),f=e.get()-t.get(),h=u.constrain(d/s);e.subtract(f*h),!r&&c(f)<i&&(e.set(n.constrain(e.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(n){l=!n}}}function L(n,t,e,o){const r=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=v(r,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const r=n*(-1*t);o.forEach((n=>n.add(r)))}}}function C(n){let t=n;function e(n){return o(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function I(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=t.style;let r=null,i=!1;return{clear:function(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=(c=n.direction(t),Math.round(100*c)/100);var c;s!==r&&(o.transform=e(s),r=s)},toggleActive:function(n){i=!n}}}function M(n,t,e,o,r,i,s,c,u){const l=a(r),d=p(h(a(r).reverse(),s[0]),e,!1).concat(p(h(l,t-s[0]-1),-e,!0));function f(n,t){return n.reduce(((n,t)=>n-r[t]),t)}function h(n,t){return n.reduce(((n,e)=>f(n,t)>0?n.concat([e]):n),[])}function p(r,s,l){const a=function(n){return i.map(((e,r)=>({start:e-o[r]+.5+n,end:e+t-.5+n})))}(s);return r.map((t=>{const o=l?0:-e,r=l?e:0,i=a[t][l?"end":"start"];return{index:t,loopPoint:i,slideLocation:C(-1),translate:I(n,u[t]),target:()=>c.get()>i?o:r}}))}return{canLoop:function(){return d.every((({index:n})=>f(l.filter((t=>t!==n)),t)<=.1))},clear:function(){d.forEach((n=>n.translate.clear()))},loop:function(){d.forEach((n=>{const{target:t,translate:e,slideLocation:o}=n,r=t();r!==o.get()&&(e.to(r),o.set(r))}))},loopPoints:d}}function T(n,t,e){let o,r=!1;return{init:function(s){e&&(o=new MutationObserver((n=>{r||(i(e)||e(s,n))&&function(n){for(const e of n)if("childList"===e.type){s.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),r=!0}}}function A(n,t,e,s,b,m,A){const{align:E,axis:N,direction:R,startIndex:z,loop:j,duration:B,dragFree:O,dragThreshold:F,inViewThreshold:D,slidesToScroll:H,skipSnaps:P,containScroll:$,watchResize:G,watchSlides:V,watchDrag:W,watchFocus:q}=m,U={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:o,offsetHeight:r}=n;return{top:t,right:e+o,bottom:t+r,left:e,width:o,height:r}}},Q=U.measure(t),X=e.map(U.measure),J=function(n,t){const e="rtl"===t,o="y"===n,r=!o&&e?-1:1;return{scroll:o?"y":"x",cross:o?"x":"y",startEdge:o?"top":e?"right":"left",endEdge:o?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return o?t:e},direction:function(n){return n*r}}}(N,R),Y=J.measureSize(Q),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=function(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o,i){return r(n)?e[n](o):n(t,o,i)}}}(E,Y),nn=!j&&!!$,tn=j||!!$,{slideSizes:en,slideSizesWithGaps:on,startGap:rn,endGap:sn}=function(n,t,e,o,r,i){const{measureSize:s,startEdge:u,endEdge:l}=n,a=e[0]&&r,f=a?c(t[u]-e[0][u]):0,p=function(){if(!a)return 0;const n=i.getComputedStyle(d(o));return parseFloat(n.getPropertyValue(`margin-${l}`))}(),g=e.map(s),b=e.map(((n,t,e)=>{const o=!t,r=h(e,t);return o?g[t]+f:r?g[t]+p:e[t+1][u]-n[u]})).map(c);return{slideSizes:g,slideSizesWithGaps:b,startGap:f,endGap:p}}(J,Q,X,e,tn,b),cn=function(n,t,e,r,i,s,u,l,h){const{startEdge:p,endEdge:g,direction:b}=n,m=o(e);return{groupSlides:function(n){return m?function(n,t){return a(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,e):function(n){return n.length?a(n).reduce(((e,o,a)=>{const m=d(e)||0,y=0===m,v=o===f(n),x=i[p]-s[m][p],_=i[p]-s[o][g],k=!r&&y?b(u):0,w=c(_-(!r&&v?b(l):0)-(x+k));return a&&w>t+h&&e.push(o),v&&e.push(n.length),e}),[]).map(((t,e,o)=>{const r=Math.max(o[e-1]||0);return n.slice(r,t)})):[]}(n)}}}(J,Y,H,j,Q,X,rn,sn,2),{snaps:un,snapsAligned:ln}=function(n,t,e,o,r){const{startEdge:i,endEdge:s}=n,{groupSlides:u}=r,l=u(o).map((n=>d(n)[s]-n[0][i])).map(c).map(t.measure),a=o.map((n=>e[i]-n[i])).map((n=>-c(n))),f=u(a).map((n=>n[0])).map(((n,t)=>n+l[t]));return{snaps:a,snapsAligned:f}}(J,Z,Q,X,cn),an=-d(un)+d(on),{snapsContained:dn,scrollContainLimit:fn}=function(n,t,e,o){const r=v(-t+n,0),i=e.map(((n,t)=>{const{min:o,max:i}=r,s=r.constrain(n),u=!t,l=h(e,t);return u?i:l||c(o,s)?o:c(i,s)?i:s})).map((n=>parseFloat(n.toFixed(3)))),s=function(){const n=i[0],t=d(i);return v(i.lastIndexOf(n),i.indexOf(t)+1)}();function c(n,t){return l(n,t)<=1}return{snapsContained:function(){if(t<=n+2)return[r.max];if("keepSnaps"===o)return i;const{min:e,max:c}=s;return i.slice(e,c)}(),scrollContainLimit:s}}(Y,an,ln,$),hn=nn?dn:ln,{limit:pn}=function(n,t,e){const o=t[0];return{limit:v(e?o-n:d(t),o)}}(an,hn,j),gn=x(f(hn),z,j),bn=gn.clone(),mn=a(e),yn=function(n,t,e,o){const r=y(),i=1e3/60;let s=null,c=0,u=0;function l(n){if(!u)return;s||(s=n,e(),e());const r=n-s;for(s=n,c+=r;c>=i;)e(),c-=i;o(c/i),u&&(u=t.requestAnimationFrame(l))}function a(){t.cancelAnimationFrame(u),s=null,c=0,u=0}return{init:function(){r.add(n,"visibilitychange",(()=>{n.hidden&&(s=null,c=0)}))},destroy:function(){a(),r.clear()},start:function(){u||(u=t.requestAnimationFrame(l))},stop:a,update:e,render:o}}(s,b,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:o}})=>{o||e.constrain(n.pointerDown()),t.seek()})(Nn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:o,previousLocation:r,scrollLooper:i,slideLooper:s,dragHandler:c,animation:u,eventHandler:l,scrollBounds:a,options:{loop:d}},f)=>{const h=n.settled(),p=!a.shouldConstrain(),g=d?h:h&&p,b=g&&!c.pointerDown();b&&u.stop();const m=e.get()*f+r.get()*(1-f);o.set(m),d&&(i.loop(n.direction()),s.loop()),t.to(o.get()),b&&l.emit("settle"),g||l.emit("scroll")})(Nn,n))),vn=hn[gn.get()],xn=C(vn),_n=C(vn),kn=C(vn),wn=C(vn),Sn=function(n,t,e,o,r){let i=0,s=0,l=r,a=.68,d=n.get(),f=0;function h(n){return l=n,g}function p(n){return a=n,g}const g={direction:function(){return s},duration:function(){return l},velocity:function(){return i},seek:function(){const t=o.get()-n.get();let r=0;return l?(e.set(n),i+=t/l,i*=a,d+=i,n.add(i),r=d-f):(i=0,e.set(o),n.set(o),r=t),s=u(r),f=d,g},settled:function(){return c(o.get()-t.get())<.001},useBaseFriction:function(){return p(.68)},useBaseDuration:function(){return h(r)},useFriction:p,useDuration:h};return g}(xn,kn,_n,wn,B),Ln=function(n,t,e,o,r){const{reachedAny:i,removeOffset:s,constrain:l}=o;function a(n){return n.concat().sort(((n,t)=>c(n)-c(t)))[0]}function f(t,o){const r=[t,t+e,t-e];if(!n)return t;if(!o)return a(r);const i=r.filter((n=>u(n)===o));return i.length?a(i):d(r)-e}return{byDistance:function(e,o){const u=r.get()+e,{index:a,distance:d}=function(e){const o=n?s(e):l(e),r=t.map(((n,t)=>({diff:f(n-o,0),index:t}))).sort(((n,t)=>c(n.diff)-c(t.diff))),{index:i}=r[0];return{index:i,distance:o}}(u),h=!n&&i(u);return!o||h?{index:a,distance:e}:{index:a,distance:e+f(t[a]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-r.get(),e)}},shortcut:f}}(j,hn,an,pn,wn),Cn=function(n,t,e,o,r,i,s){function c(r){const c=r.distance,u=r.index!==t.get();i.add(c),c&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),u&&(e.set(t.get()),t.set(r.index),s.emit("select"))}return{distance:function(n,t){c(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);c(r.byIndex(o.get(),e))}}}(yn,gn,bn,Sn,Ln,wn,A),In=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),Mn=y(),Tn=function(n,t,e,o){const r={};let i,s=null,c=null,u=!1;return{init:function(){i=new IntersectionObserver((n=>{u||(n.forEach((n=>{const e=t.indexOf(n.target);r[e]=n})),s=null,c=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:o}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),u=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return g(r).reduce(((t,e)=>{const o=parseInt(e),{isIntersecting:i}=r[o];return(n&&i||!n&&!i)&&t.push(o),t}),[])}(n);return n&&(s=t),n||(c=t),t}}}(t,e,A,D),{slideRegistry:An}=function(n,t,e,o,r,i){const{groupSlides:s}=r,{min:c,max:u}=o;return{slideRegistry:function(){const o=s(i);return 1===e.length?[i]:n&&"keepSnaps"!==t?o.slice(c,u).map(((n,t,e)=>{const o=!t,r=h(e,t);return o?p(d(e[0])+1):r?p(f(i)-d(e)[0]+1,d(e)[0]):n})):o}()}}(nn,$,hn,fn,cn,mn),En=function(n,t,e,r,s,c,u,l){const a={passive:!0,capture:!0};let d=0;function f(n){"Tab"===n.code&&(d=(new Date).getTime())}return{init:function(h){l&&(c.add(document,"keydown",f,!1),t.forEach(((t,f)=>{c.add(t,"focus",(t=>{(i(l)||l(h,t))&&function(t){if((new Date).getTime()-d>10)return;u.emit("slideFocusStart"),n.scrollLeft=0;const i=e.findIndex((n=>n.includes(t)));o(i)&&(s.useDuration(0),r.index(i,0),u.emit("slideFocus"))}(f)}),a)})))}}}(n,e,An,Cn,Sn,Mn,A,q),Nn={ownerDocument:s,ownerWindow:b,eventHandler:A,containerRect:Q,slideRects:X,animation:yn,axis:J,dragHandler:_(J,n,s,b,wn,k(J,b),xn,yn,Cn,Sn,Ln,gn,A,K,O,F,P,.68,W),eventStore:Mn,percentOfView:K,index:gn,indexPrevious:bn,limit:pn,location:xn,offsetLocation:kn,previousLocation:_n,options:m,resizeHandler:w(t,A,b,e,J,G,U),scrollBody:Sn,scrollBounds:S(pn,kn,wn,Sn,K),scrollLooper:L(an,pn,kn,[xn,kn,_n,wn]),scrollProgress:In,scrollSnapList:hn.map(In.get),scrollSnaps:hn,scrollTarget:Ln,scrollTo:Cn,slideLooper:M(J,Y,an,en,on,un,hn,kn,e),slideFocus:En,slidesHandler:T(t,A,V),slidesInView:Tn,slideIndexes:mn,slideRegistry:An,slidesToScroll:cn,target:wn,translate:I(J,t)};return Nn}const E={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function N(n){function t(n,t){return b(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const o=e.breakpoints||{},r=g(o).filter((t=>n.matchMedia(t).matches)).map((n=>o[n])).reduce(((n,e)=>t(n,e)),{});return t(e,r)},optionsMediaQueries:function(t){return t.map((n=>g(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}}}function R(n,t,e){const o=n.ownerDocument,i=o.defaultView,s=N(i),c=function(n){let t=[];return{init:function(e,o){return t=o.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),o.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(s),u=y(),l=function(){let n,t={};function e(n){return t[n]||[]}const o={init:function(t){n=t},emit:function(t){return e(t).forEach((e=>e(n,t))),o},off:function(n,r){return t[n]=e(n).filter((n=>n!==r)),o},on:function(n,r){return t[n]=e(n).concat([r]),o},clear:function(){t={}}};return o}(),{mergeOptions:a,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:h,off:p,emit:g}=l,b=M;let m,v,x,_,k=!1,w=a(E,R.globalOptions),S=a(w),L=[];function C(t){const e=A(n,x,_,o,i,t,l);return t.loop&&!e.slideLooper.canLoop()?C(Object.assign({},t,{loop:!1})):e}function I(t,e){k||(w=a(w,t),S=d(w),L=e||L,function(){const{container:t,slides:e}=S,o=r(t)?n.querySelector(t):t;x=o||n.children[0];const i=r(e)?x.querySelectorAll(e):e;_=[].slice.call(i||x.children)}(),m=C(S),f([w,...L.map((({options:n})=>n))]).forEach((n=>u.add(n,"change",M))),S.active&&(m.translate.to(m.location.get()),m.animation.init(),m.slidesInView.init(),m.slideFocus.init(B),m.eventHandler.init(B),m.resizeHandler.init(B),m.slidesHandler.init(B),m.options.loop&&m.slideLooper.loop(),x.offsetParent&&_.length&&m.dragHandler.init(B),v=c.init(B,L)))}function M(n,t){const e=j();T(),I(a({startIndex:e},n),t),l.emit("reInit")}function T(){m.dragHandler.destroy(),m.eventStore.clear(),m.translate.clear(),m.slideLooper.clear(),m.resizeHandler.destroy(),m.slidesHandler.destroy(),m.slidesInView.destroy(),m.animation.destroy(),c.destroy(),u.clear()}function z(n,t,e){S.active&&!k&&(m.scrollBody.useBaseFriction().useDuration(!0===t?0:S.duration),m.scrollTo.index(n,e||0))}function j(){return m.index.get()}const B={canScrollNext:function(){return m.index.add(1).get()!==j()},canScrollPrev:function(){return m.index.add(-1).get()!==j()},containerNode:function(){return x},internalEngine:function(){return m},destroy:function(){k||(k=!0,u.clear(),T(),l.emit("destroy"),l.clear())},off:p,on:h,emit:g,plugins:function(){return v},previousScrollSnap:function(){return m.indexPrevious.get()},reInit:b,rootNode:function(){return n},scrollNext:function(n){z(m.index.add(1).get(),n,-1)},scrollPrev:function(n){z(m.index.add(-1).get(),n,1)},scrollProgress:function(){return m.scrollProgress.get(m.offsetLocation.get())},scrollSnapList:function(){return m.scrollSnapList},scrollTo:z,selectedScrollSnap:j,slideNodes:function(){return _},slidesInView:function(){return m.slidesInView.get()},slidesNotInView:function(){return m.slidesInView.get(!1)}};return I(t,e),setTimeout((()=>l.emit("init")),0),B}R.globalOptions=void 0;const z=class{constructor(t){n(this,t)}get el(){return t(this)}items;loop=!0;class;controlClass;slideClass;itemClass;viewportRef;containerRef;slotRef;prevBtnRef;nextBtnRef;dotsRef;embla=null;movedNodes=[];prevClickHandler=null;nextClickHandler=null;dotClickHandlers=[];slotNodesMoved=!1;async scrollPrev(){this.embla?.scrollPrev()}async scrollNext(){this.embla?.scrollNext()}async goToSlide(n){this.embla?.scrollTo(n)}async getEmbla(){return this.embla}moveSlotNodesIntoContainer(){if(!this.slotRef||!this.containerRef||this.slotNodesMoved)return;const n=this.slotRef.assignedNodes().filter((n=>n.nodeType===Node.ELEMENT_NODE));0!==n.length&&(this.movedNodes=[],n.forEach((n=>{this.containerRef.appendChild(n),this.movedNodes.push(n)})),this.slotNodesMoved=!0,this.scheduleEmblaInit())}initScheduled=!1;scheduleEmblaInit(){this.initScheduled||(this.initScheduled=!0,requestAnimationFrame((()=>{this.initScheduled=!1,this.destroyEmbla(),this.initEmbla()})))}moveSlotNodesBack(){const n=this.el;this.movedNodes.forEach((t=>n.appendChild(t))),this.movedNodes=[]}initEmbla(){if(!this.viewportRef||!this.containerRef)return;const n=this.getItemsArray();if(!(void 0!==n?n.length>0:this.containerRef.children.length>0))return;this.embla=R(this.viewportRef,{loop:this.loop,align:"center",containScroll:"trimSnaps"});const t=this.prevBtnRef,e=this.nextBtnRef,o=this.dotsRef,r=()=>{t&&(this.embla?.canScrollPrev()?t.removeAttribute("disabled"):t.setAttribute("disabled","")),e&&(this.embla?.canScrollNext()?e.removeAttribute("disabled"):e.setAttribute("disabled",""))};if(this.embla.on("init",r),this.embla.on("reInit",r),this.embla.on("select",r),t&&e&&(this.prevClickHandler=()=>this.embla?.scrollPrev(),this.nextClickHandler=()=>this.embla?.scrollNext(),t.addEventListener("click",this.prevClickHandler),e.addEventListener("click",this.nextClickHandler)),o){const n=this.embla.scrollSnapList().length;o.innerHTML="";for(let t=0;t<n;t++){const n=document.createElement("button");n.type="button",n.setAttribute("aria-label",`Go to slide ${t+1}`),n.className="carousel__dot",0===t&&n.classList.add("current");const e=document.createElement("div");e.className="carousel__dot-inner",n.appendChild(e);const r=t,i=()=>this.embla?.scrollTo(r);this.dotClickHandlers.push(i),n.addEventListener("click",i),o.appendChild(n)}this.embla.on("select",(()=>{const n=this.embla?.selectedScrollSnap()??0;o.querySelectorAll("button").forEach(((t,e)=>{t.classList.toggle("current",e===n)}))}))}r()}destroyEmbla(){this.prevBtnRef&&this.prevClickHandler&&(this.prevBtnRef.removeEventListener("click",this.prevClickHandler),this.prevClickHandler=null),this.nextBtnRef&&this.nextClickHandler&&(this.nextBtnRef.removeEventListener("click",this.nextClickHandler),this.nextClickHandler=null),this.dotClickHandlers=[],this.dotsRef&&(this.dotsRef.innerHTML=""),this.embla?.destroy(),this.embla=null}onSlotChange=()=>{void 0===this.getItemsArray()&&this.moveSlotNodesIntoContainer()};componentDidRender(){void 0===this.getItemsArray()?(this.slotRef&&(this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.slotRef.addEventListener("slotchange",this.onSlotChange)),requestAnimationFrame((()=>{this.moveSlotNodesIntoContainer(),this.slotNodesMoved||(this.destroyEmbla(),this.initEmbla())}))):(this.destroyEmbla(),this.initEmbla())}disconnectedCallback(){this.slotRef&&this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.destroyEmbla(),void 0===this.getItemsArray()&&(this.moveSlotNodesBack(),this.slotNodesMoved=!1)}getItemsArray(){if(void 0!==this.items){if(Array.isArray(this.items))return this.items;if("string"==typeof this.items)try{const n=JSON.parse(this.items);return Array.isArray(n)?n:void 0}catch{return}}}render(){const n=this.getItemsArray(),t=void 0!==n&&n.length>0;return e("div",{key:"3a2ea6c339bf0fe656e5a333789df7a37156b5dc",class:`carousel ${this.class||""}`.trim()},e("div",{key:"0a73b925095ae3188e5e40b024bc250e4c183894",class:`carousel__viewport ${this.slideClass||""}`.trim(),ref:n=>this.viewportRef=n},e("div",{key:"7fc3b5a72e386f7fa21702aeb363e08da1b728cf",class:"carousel__container",ref:n=>this.containerRef=n},t&&n?n.map(((n,t)=>e("div",{key:t,class:`carousel__slide ${this.itemClass||""}`.trim()},"object"==typeof n&&null!==n&&"content"in n?n.content:String(n)))):null)),!t&&e("div",{key:"dee2fc91470728c136c9853cd74ae350ad3c5676",style:{display:"none"},"aria-hidden":"true"},e("slot",{key:"35dd47c03a1b9b6b73d845252c3d0482590f7da2",ref:n=>this.slotRef=n})),e("div",{key:"df639ad86ae8533f1dc15eed30afb70d99e36e1a",class:`carousel__controls ${this.controlClass||""}`.trim()},e("button",{key:"c17c0ea9bf023b5d2621e558c957d92b13425584",type:"button","aria-label":"Previous",class:"carousel__prev",ref:n=>this.prevBtnRef=n},e("svg",{key:"5125abcae0b08ee72106d511b4c24c2d0f24187b",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},e("path",{key:"9b7f28be56f451ad14de226d7163a5587a1cd9e6","stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))),e("div",{key:"9939d3496092a3f319efac9132cec8097c83b497",class:"carousel__dots",ref:n=>this.dotsRef=n}),e("button",{key:"a0b1228f6df0065885f1d272386283926e78464b",type:"button","aria-label":"Next",class:"carousel__next",ref:n=>this.nextBtnRef=n},e("svg",{key:"e00c92cc0485f41a30e97d5d0466aaee48a64998",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},e("path",{key:"a35c46fdbd1cd333d3e6f76590f45dd837546165","stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})))))}};z.style=":host{display:block}.carousel{display:flex;flex-direction:column;overflow:hidden}.carousel__viewport{overflow:hidden;touch-action:pan-y pinch-zoom}.carousel__container{display:flex;flex-direction:row;height:100%;margin-left:calc(-0.4rem)}.carousel__container ::slotted(*){flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__slide{flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__controls{display:flex;gap:0.25rem;margin-top:0.25rem;justify-content:center;align-items:center}.carousel__prev,.carousel__next{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:currentColor}.carousel__prev:disabled,.carousel__next:disabled{opacity:0.4;cursor:not-allowed}.carousel__icon{width:2.4rem;height:2.4rem}.carousel__dots{display:flex;gap:0.25rem;align-items:center}.carousel__dot{padding:0;border:none;background:none;cursor:pointer;width:0.5rem;height:0.5rem;display:flex;align-items:center;justify-content:center}.carousel__dot-inner{width:100%;height:100%;border-radius:50%;background-color:var(--carousel-dot-bg, #cbd5e1);transition:background-color 0.2s ease}.carousel__dot.current .carousel__dot-inner{background-color:var(--carousel-dot-active-bg, #94a3b8)}";export{z as fast_carousel}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as s,g as i}from"./p-BqjrT3zA.js";const o=class{constructor(s){t(this,s),this.buttonClick=e(this,"buttonClick")}variant="primary";type="submit";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return s("button",{key:"b8e811748ade97c941bdf197a311d69d2801a120",type:this.type,class:{"fast-button":!0,[`fast-button--${this.variant}`]:!0,"fast-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},s("slot",{key:"a6b987059cc33799abd580ea11f0fe644a3973bf"}))}};o.style=":host{display:inline-block}.fast-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.fast-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.fast-button:focus:not(:focus-visible){outline:none}.fast-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.fast-button--primary:hover:not(.fast-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.fast-button--primary:active:not(.fast-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.fast-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.fast-button--secondary:hover:not(.fast-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.fast-button--secondary:active:not(.fast-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.fast-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.fast-button--text:hover:not(.fast-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.fast-button--text:active:not(.fast-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.fast-button--disabled,.fast-button:disabled{opacity:0.6;cursor:not-allowed}";const r=class{constructor(s){t(this,s),this.searchExecuted=e(this,"searchExecuted")}get el(){return i(this)}searchExecuted;handleInputSubmit(){this.submit()}async submit(){const t=this.el.querySelectorAll("fast-input"),e={};for(const s of Array.from(t)){const t=await s.getParamName(),i=await s.getValue();i&&(e[t]=i)}this.updateUrlParams(e),document.dispatchEvent(new CustomEvent("search-executed",{detail:e,bubbles:!0,composed:!0})),this.searchExecuted.emit(e)}updateUrlParams(t){const e=new URLSearchParams(window.location.search),s=this.el.querySelectorAll("fast-input");for(const t of Array.from(s)){const s=t.paramName;s&&e.delete(s)}for(const[s,i]of Object.entries(t))i&&e.set(s,i);const i=e.toString(),o=i?`${window.location.pathname}?${i}`:window.location.pathname;history.pushState({},"",o)}handleFormSubmit=t=>{t.preventDefault(),this.submit()};render(){return s("form",{key:"50436bb904e8b175ae0c23158812a4e4756544c0",class:"fast-form",onSubmit:this.handleFormSubmit},s("slot",{key:"2f76c4c42c15ebf389d6e0fdbcb9a2098bf1156a"}))}};r.style=".fast-form{display:flex;gap:0.5rem;align-items:flex-start}";const a=class{constructor(s){t(this,s),this.inputSubmit=e(this,"inputSubmit"),this.inputChanged=e(this,"inputChanged")}placeholder="Search...";value="";paramName="keyword";enableAutocomplete=!1;autocompleteUrl="/api/jobs/autocomplete";targetPath;debounceMs=300;minChars=3;inputSubmit;inputChanged;inputValue="";suggestions=[];showDropdown=!1;autocompleteLoading=!1;debounceTimer;popstateHandler;async getValue(){return this.inputValue}async getParamName(){return this.paramName}connectedCallback(){const t=this.getUrlParam();this.inputValue=null!==t?t:this.value,this.popstateHandler=()=>{this.inputValue=this.getUrlParam()??""},window.addEventListener("popstate",this.popstateHandler)}disconnectedCallback(){window.removeEventListener("popstate",this.popstateHandler),clearTimeout(this.debounceTimer)}getUrlParam(){return new URLSearchParams(window.location.search).get(this.paramName)}handleInput=t=>{const e=t.target.value;this.inputValue=e,this.inputChanged.emit({value:e}),this.enableAutocomplete&&this.scheduleAutocomplete(e)};handleKeydown=t=>{"Enter"===t.key?(t.preventDefault(),this.showDropdown=!1,this.inputSubmit.emit()):"Escape"===t.key&&(this.showDropdown=!1)};handleBlur=()=>{this.showDropdown=!1};scheduleAutocomplete(t){clearTimeout(this.debounceTimer),t.length<this.minChars?this.showDropdown=!1:this.debounceTimer=setTimeout((()=>this.fetchSuggestions(t)),this.debounceMs)}async fetchSuggestions(t){if(this.targetPath){this.autocompleteLoading=!0,this.showDropdown=!0;try{const e=await fetch(this.autocompleteUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:t,target_path:this.targetPath})});if(!e.ok)throw new Error("autocomplete request failed");const s=await e.json();this.suggestions=s}catch{this.showDropdown=!1,this.suggestions=[]}finally{this.autocompleteLoading=!1}}else console.warn("[fast-input] target-path is required for autocomplete")}selectSuggestion(t){this.inputValue=t,this.showDropdown=!1,this.inputSubmit.emit()}render(){return s("div",{key:"ea03f3dd68d0da4fc30cbc18a1ef66b5974a4f89",class:"fast-input"},s("input",{key:"31d85c4c90dde0e10ea9424b960c5e4f4a3ca54a",type:"text",class:"fast-input__field",placeholder:this.placeholder,value:this.inputValue,onInput:this.handleInput,onKeyDown:this.handleKeydown,onBlur:this.handleBlur}),this.enableAutocomplete&&this.showDropdown&&s("ul",{key:"0de6fd68709d906bafd2fec684f0a73045be3705",class:"fast-input__dropdown"},this.autocompleteLoading?s("li",{class:"fast-input__dropdown-loading"},"Loading..."):this.suggestions.map((t=>s("li",{class:"fast-input__dropdown-item",onMouseDown:t=>{t.preventDefault()},onClick:()=>this.selectSuggestion(t.title)},t.title)))))}};a.style=".fast-input{position:relative;display:inline-block}.fast-input__field{padding:0.5rem 0.75rem;font-size:1rem;border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box}.fast-input__dropdown{position:absolute;top:100%;left:0;right:0;margin:0;padding:0;list-style:none;background:#fff;border:1px solid #ccc;border-top:none;border-radius:0 0 4px 4px;z-index:100;max-height:200px;overflow-y:auto}.fast-input__dropdown-item{padding:0.5rem 0.75rem;cursor:pointer}.fast-input__dropdown-item:hover{background:#f0f0f0}.fast-input__dropdown-loading{padding:0.5rem 0.75rem;color:#999;font-style:italic}";const n=class{constructor(e){t(this,e)}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;formatDistance(t){const e=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*t:t).toFixed(1)} ${e}`.replace(".0","")}render(){if(!this.job)return null;const t=function(t){const e=t.locations;if(e?.length)return e[0]}(this.job),e=t?(i=t).cityStateAbbr?i.cityStateAbbr:[i.streetAddress,i.city,i.stateAbbr||i.state,i.countryAbbr||i.country].filter(Boolean).join(", ")||i.locationText||"":"";var i;const o=t?.distance??0,r=o>0?this.formatDistance(o):"",a=this.job.applyURL||(this.job.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${this.job.originalURL}`:"#"),n=`${this.applyButtonText}, ${this.job.title||""}`,l=this.job.locations??[],c=l.length>1;return s("li",{class:"results-list__item"},s("div",{class:"results-list__item-header"},s("h3",{class:"results-list__item-title"},s("a",{class:"results-list__item-title--link",href:a,target:"_blank",rel:"noopener noreferrer"},this.job.title||""),this.showReference&&s("span",{class:"reference "+(this.job.reference?"":"empty")},this.job.reference||""),this.job.isRemote&&s("span",{class:this.remoteLocationText?"remote":"remote remote--empty"},this.remoteLocationText)),r&&s("div",{class:"results-list__item-distance"},s("span",{class:"results-list__item-distance--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),s("span",{class:"results-list__item-distance--label"},r))),s("div",{class:"results-list__item-content"},s("div",{class:"results-list__item-info"},s("div",{class:l.length?"results-list__item-street":"results-list__item-street results-list__item-street--empty"},s("div",{class:"results-list__item-street--label__wrapper"},s("span",{class:"results-list__item-street--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),s("span",{class:"results-list__item-street--label"},e||"—")),c&&s("div",{class:"results-list__item-street--more-locations__wrapper"},s("span",{class:"results-list__item-street--amount"},"+",l.length-1),s("span",{class:"results-list__item-street--more-locations"},this.multiLocationText))),this.showBrand&&s("div",{class:this.job.brandName?"results-list__item-brand":"results-list__item-brand results-list__item-brand--empty"},s("span",{class:"results-list__item-brand--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),s("span",{class:"results-list__item-brand--label"},this.job.brandName||"—")),this.showEmploymentType&&s("div",{class:this.job.employmentType?.length?"results-list__item-employment-type":"results-list__item-employment-type results-list__item-employment-type--empty"},s("span",{class:"results-list__item-employment-type--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),(this.job.employmentType?.length?this.job.employmentType:["—"]).map((t=>s("span",{key:t,class:"results-list__item-employment-type--label"},t)))),(this.job.jobCardExtraFields??[]).map(((t,e)=>s("div",{key:e,class:(Array.isArray(t.value)?t.value.length:t.value)?t.classname:`${t.classname}--empty`},Array.isArray(t.value)?t.value.map(((e,i)=>s("span",{key:i,class:`${t.classname}--label`},e))):s("span",{class:`${t.classname}--label`},String(t.value)))))),s("a",{class:"results-list__item-apply",href:a,target:"_blank",rel:"noopener noreferrer","aria-label":n},s("span",{class:"results-list__item-apply--label"},this.applyButtonText),s("span",{class:"results-list__item-apply--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"}))))))}};n.style=".results-list__item{list-style:none;padding:10px 0;border-bottom:1px solid #ddd;margin:15px 0;display:inline-block;width:100%;position:relative}.results-list__item:last-child{border-bottom:none}.results-list__item-header{margin:10px 0;font-size:18px;font-weight:700;display:flex;flex-direction:column}.results-list__item-title{margin:0}.results-list__item-title--link{text-decoration:none;color:#1f9755}.results-list__item-title--link:hover{text-decoration:underline}.reference{margin-left:8px;font-size:0.9em;color:#666}.reference.empty{display:none}.remote{background:#f3f3f3;color:#808285;border-radius:100px;padding:6px 16px;text-transform:uppercase;font-size:12px;font-weight:700;line-height:24px;margin-left:8px}.remote--empty{display:none}.results-list__item-distance{display:inline-flex;align-items:center;gap:4px;margin-top:4px;font-size:14px;font-weight:400}.results-list__item-distance--icon{display:inline-flex}.results-list__item-distance--icon svg{width:16px;height:16px}.results-list__item-content{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:8px}.results-list__item-info{flex:1}.results-list__item-street,.results-list__item-brand,.results-list__item-employment-type{margin:10px 0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}.results-list__item-street--empty,.results-list__item-brand--empty,.results-list__item-employment-type--empty{color:#999}.results-list__item-street--icon,.results-list__item-brand--icon,.results-list__item-employment-type--icon{margin-right:6px;display:inline-flex}.results-list__item-street--icon svg,.results-list__item-brand--icon svg,.results-list__item-employment-type--icon svg{width:16px;height:16px}.results-list__item-street--more-locations__wrapper{margin-left:8px}.results-list__item-street--amount{font-weight:600}.results-list__item-apply{margin:10px 0;padding:10px 20px;display:inline-flex;align-items:center;gap:8px;background-color:#198754;color:#fff;border-radius:3px;text-decoration:none;font-weight:600;flex-shrink:0}.results-list__item-apply:hover{background-color:#1f9755;color:#fff}.results-list__item-apply--icon svg{width:14px;height:14px}";const l=[{title:"Senior Software Engineer",reference:"REF-001",originalURL:"/jobs/senior-software-engineer",applyURL:"https://apply.example.com/1",brandName:"Engineering",isRemote:!1,locations:[{city:"San Francisco",stateAbbr:"CA",countryAbbr:"US",distance:5.2,streetAddress:"123 Market St",cityStateAbbr:"San Francisco, CA"}],employmentType:["Full-time","Permanent"]},{title:"Product Manager",reference:"",originalURL:"/jobs/product-manager",brandName:"Product",isRemote:!0,locations:[],employmentType:["Full-time"]},{title:"UX Designer",reference:"REF-003",originalURL:"/jobs/ux-designer",brandName:"Design",isRemote:!1,locations:[{city:"New York",stateAbbr:"NY",countryAbbr:"US",distance:0,cityStateAbbr:"New York, NY"},{city:"Boston",stateAbbr:"MA",countryAbbr:"US",cityStateAbbr:"Boston, MA"}],employmentType:["Full-time","Contract"]}],c=class{constructor(s){t(this,s),this.fetchComplete=e(this,"fetchComplete")}mockData=!1;jobs=[];loading=!1;totalJob=0;noResultsLine1="Sorry, we're not able to load results for your search.";noResultsLine2="Please refine your keywords in the search bar above and try again.";applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;streetFormat="{street}, {city_state_abbr}";multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;rootClass="";showCountText="";showSuggestions=!1;clearResultSuggestionsTitleText="Suggestions";clearResultSuggestionsLine1="Try different keywords";clearResultSuggestionsLine2="Make sure everything is spelled correctly";clearResultSuggestionsLine3="Try other locations";clearResultSuggestionsLine4="";autoFetch=!1;apiUrl="/api/get-jobs";watchParams="keyword";fetchedJobs=[];fetchedTotal=0;fetchLoading=!1;fetchComplete;searchExecutedHandler;popstateHandler;connectedCallback(){this.autoFetch&&(this.fetchJobs(),this.searchExecutedHandler=()=>this.fetchJobs(),this.popstateHandler=()=>this.fetchJobs(),document.addEventListener("search-executed",this.searchExecutedHandler),window.addEventListener("popstate",this.popstateHandler))}disconnectedCallback(){this.autoFetch&&(document.removeEventListener("search-executed",this.searchExecutedHandler),window.removeEventListener("popstate",this.popstateHandler))}async fetchJobs(){this.fetchLoading=!0;const t=new URLSearchParams(window.location.search),e=this.watchParams.split(",").map((t=>t.trim())).filter(Boolean),s=new URLSearchParams;for(const i of e){const e=t.get(i);null!==e&&s.set(i,e)}const i=`${this.apiUrl}?${s.toString()}`;try{const t=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disable_switch_search_mode:!1})});if(!t.ok)throw new Error("fetch failed");const e=await t.json();this.fetchedJobs=e.jobs,this.fetchedTotal=e.totalJob,this.fetchComplete.emit({jobs:e.jobs,totalJob:e.totalJob})}catch{}finally{this.fetchLoading=!1}}renderCountText(t,e){return this.showCountText.replace("{count}",String(t)).replace("{total}",String(e))}getJobsArray(){if(this.mockData)return l;if(this.autoFetch)return this.fetchedJobs;const t=this.jobs;if(Array.isArray(t))return t;if("string"==typeof t)try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}return[]}renderJobItem(t,e){return s("jobs-item",{job:t,index:e,applyButtonText:this.applyButtonText,showBrand:this.showBrand,showReference:this.showReference,showEmploymentType:this.showEmploymentType,multiLocationText:this.multiLocationText,remoteLocationText:this.remoteLocationText,enableKilometers:this.enableKilometers})}render(){const t=this.getJobsArray(),e=!this.mockData&&(this.autoFetch?this.fetchLoading:this.loading),i=this.mockData?t.length:this.autoFetch?this.fetchedTotal:this.totalJob||t.length,o=!e&&0===i&&!this.showSuggestions,r=!e&&0===i&&this.showSuggestions;return s("div",{key:"1974ecb7e1ded8237d851560fc4b20dd63b4e941",class:`jobs-list-root ${this.rootClass}`.trim()},s("div",{key:"3d80283e8508cbe9ec4aa4516a6f832479374e08",class:"results-container"},this.autoFetch&&this.fetchLoading&&s("div",{key:"c5d3c5362a10ce2442925093118d3436227e8058",class:"jobs-list-only__loading"},"Loading..."),s("div",{key:"c68e5aebee17cce16947029031b63364ab25ecda",class:e?"loader":"loader hide","aria-hidden":!e}),i>0&&this.showCountText&&s("p",{key:"e353fa146040fed1aed050ed3ed833903efcdf41",class:"jobs-list-only__count"},this.renderCountText(t.length,i)),i>0&&s("div",{key:"e38346f641a1e776a7e70525bf8f3a6a38b6eea5",class:"card"},s("ul",{key:"db82d99df76e33ad6041d4ec8dd7908cdf8b89d7",class:"results-list front"},t.map(((t,e)=>this.renderJobItem(t,e))))),o&&s("div",{key:"8bd8f45ddb9fcd534c7f386919c1e6cd7a4fb6f3",class:"share-jobs__no-results"},s("h2",{key:"228d32e9dd38f61bcec9f522d3bc4207e17b5365"},this.noResultsLine1),s("h3",{key:"4289b10974936669a00afba6f1d55e33874198b1"},this.noResultsLine2)),r&&s("div",{key:"949e1fe01b2db39a69729a9fbc2eebaf2ea461ba",class:"card primary-color"},s("h4",{key:"af3361f98987a3a19d45afc1174a99fc4174a65a",class:"result-suggestions-title"},this.clearResultSuggestionsTitleText,":"),s("ul",{key:"d7b9236dbbeb9f9596d642aa588d1c1305ed658b",class:"results-list front"},s("li",{key:"0e65c9b985e5708096c8a4b0ea1455b6696db6dd",class:"result-suggestions-line"},this.clearResultSuggestionsLine1),s("li",{key:"a7fe8459960af60acc81822b48436a32c0e4ad0c",class:"result-suggestions-line"},this.clearResultSuggestionsLine2),s("li",{key:"1e41d5730de755d6b2cb9e5fbda33704816f9096",class:"result-suggestions-line"},this.clearResultSuggestionsLine3),this.clearResultSuggestionsLine4&&s("li",{key:"9ab1bee87135bfda9996b2c99134597475bfaecb",class:"result-suggestions-line"},this.clearResultSuggestionsLine4)))))}};c.style=":host{display:block}.jobs-list-root{list-style:none}.results-container{position:relative}.loader{display:inline-block;width:24px;height:24px;border:2px solid #ddd;border-top-color:#1f9755;border-radius:50%;animation:jobs-list-spin 0.8s linear infinite}.loader.hide{display:none}@keyframes jobs-list-spin{to{transform:rotate(360deg)}}.card{border:0}.results-list{list-style:none;margin:0;padding:0;display:block}.results-list.front{margin:3px 0}.share-jobs__no-results{padding:24px;text-align:center}.share-jobs__no-results h2,.share-jobs__no-results h3{margin:8px 0;font-weight:600}.card.primary-color{padding:16px;border-radius:4px;background:#f8f9fa}.result-suggestions-title{margin:0 0 12px 0;font-size:16px}.results-list .result-suggestions-line{list-style:none;margin:4px 0}";const d=class{constructor(s){t(this,s),this.fetchComplete=e(this,"fetchComplete")}get el(){return i(this)}apiUrl="/api/get-jobs";watchParams="keyword,location_name";loadingClass="loading";isLoading=!1;fetchComplete;templateEl=null;searchExecutedHandler;popstateHandler;connectedCallback(){this.templateEl=this.el.querySelector("template"),this.searchExecutedHandler=()=>this.fetchJobs(),this.popstateHandler=()=>this.fetchJobs(),document.addEventListener("search-executed",this.searchExecutedHandler),window.addEventListener("popstate",this.popstateHandler)}disconnectedCallback(){document.removeEventListener("search-executed",this.searchExecutedHandler),window.removeEventListener("popstate",this.popstateHandler)}buildQueryString(){const t=new URLSearchParams(window.location.search),e=this.watchParams.split(",").map((t=>t.trim())).filter(Boolean),s=new URLSearchParams;for(const i of e){const e=t.get(i);null!==e&&""!==e&&s.set(i,e)}return s.toString()}async fetchJobs(){this.isLoading=!0,this.el.classList.add(this.loadingClass);const t=this.buildQueryString(),e=t?`${this.apiUrl}?${t}`:this.apiUrl;try{const t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disable_switch_search_mode:!1})});if(!t.ok)throw new Error("fetch failed");const s=await t.json();this.renderJobs(s.jobs),this.updateCountElements(s.jobs.length,s.totalJob),this.fetchComplete.emit({jobs:s.jobs,totalJob:s.totalJob})}catch{}finally{this.isLoading=!1,this.el.classList.remove(this.loadingClass)}}renderJobs(t){if(!this.templateEl)return;const e=Array.from(this.el.children);for(const t of e)t!==this.templateEl&&t.remove();for(const e of t){const t=this.templateEl.content.cloneNode(!0),s=t.querySelector("job-card");s&&s.setAttribute("job",JSON.stringify(e)),this.el.appendChild(t)}}updateCountElements(t,e){const s=document.querySelectorAll("[data-job-count]"),i=document.querySelectorAll("[data-job-total]");s.forEach((e=>{e.textContent=String(t)})),i.forEach((t=>{t.textContent=String(e)}))}render(){return s("slot",{key:"9f3ab802e19a298a790cfb5e86a4f4888e466804"})}};d.style="jobs-list-reactive{display:block}jobs-list-reactive.loading{opacity:0.6;pointer-events:none}";export{o as fast_button,r as fast_form,a as fast_input,n as jobs_item,c as jobs_list_only,d as jobs_list_reactive}
|