import { r as registerInstance, h, H as Host, a as getElement, c as createEvent } from './index-Co4V4Zk-.js';

const spwFieldLabelCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-field-label{color:var(--spw-color-themes-grey-grey-800);display:flex;align-items:center;gap:4px;font-weight:600;margin-bottom:8px}.spw-field-label__text{display:inline-block}.spw-field-label__required{color:var(--spw-ds-primary)}.spw-field-label__icon{color:var(--spw-color-themes-grey-grey-600);font-size:16px;flex-shrink:0}`;

const SpwFieldLabel = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Texte à afficher au-dessus du champ de saisie */
        this.label = '';
        /** Indique si le champ est requis */
        this.required = false;
        /** Positionnement du tooltip */
        this.tooltipDirection = 'top';
        /** Curseur du tooltip */
        this.tooltipCursor = 'help';
        this.handleClick = () => {
            const rootNode = this.el.getRootNode();
            const targetElement = rootNode.getElementById(this.name);
            if (targetElement) {
                targetElement.focus();
            }
        };
    }
    get hasTooltip() {
        return !!(this.tooltipText || this.tooltipTitle);
    }
    render() {
        return (h(Host, { key: 'cb454d092cd78fb71bf1167a4e387ad9fd416d69' }, h("label", { key: '641218aa7a026e9dd5805d51926b88ae94692926', class: "spw-field-label", htmlFor: this.name, onClick: this.handleClick }, h("span", { key: '53de42be7abcc40b2418489bc13bcd449dcb342f', class: "spw-field-label__text" }, this.label), this.hasTooltip && (h("spw-tooltip", { key: 'c1f0fdbb0e3742a3f303846b89078a727d69bc04', tooltipTitle: this.tooltipTitle, tooltipText: this.tooltipText, maxWidth: this.tooltipMaxWidth, direction: this.tooltipDirection, cursor: this.tooltipCursor }, h("spw-icon", { key: '01b65ea5af7cbf012902ee0b9d50bede9451d0aa', variant: "fa-regular", icon: "fa-circle-info", class: "spw-field-label__icon" }))), this.required && h("span", { key: '5eb8fd2d808a54133da51de5eaa7f7277d08c393', class: "spw-field-label__required" }, "*"))));
    }
    get el() { return getElement(this); }
};
SpwFieldLabel.style = spwFieldLabelCss();

const spwFieldMessageCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-field-message{display:block;margin-top:8px;display:flex;gap:8px}.spw-field-message--error{color:var(--spw-color-states-error-error-300)}.spw-field-message--hint{color:var(--spw-colors-support-grey-grey-800)}.spw-field-message--success{color:var(--spw-color-states-success-success-500)}.spw-field-message--warning{color:var(--spw-color-themes-orange-orange-500)}.spw-field-message__icon{position:relative;top:1px}.spw-field-message__text{flex:1;font-size:14px;line-height:1.5}`;

const SpwFieldMessage = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Permet d'afficher ou pas une icône dans le message */
        this.showIcon = true;
    }
    get variantIcon() {
        switch (this.variant) {
            case 'error':
                return 'fa-warning';
            case 'hint':
                return 'fa-exclamation-circle';
            case 'success':
                return 'fa-check-circle';
            case 'warning':
                return 'fa-triangle-exclamation';
            default:
                return '';
        }
    }
    get elementClass() {
        return {
            'spw-field-message': true,
            [`spw-field-message--${this.variant}`]: true,
        };
    }
    render() {
        return (h(Host, { key: 'c37e4fcd1a62f74a582ea34b5ad35405d1fdfe15' }, h("div", { key: 'dec558441b64aaaba6fd7ce8501be8c674ade97d', class: this.elementClass }, this.showIcon && (h("div", { key: '867ccb3a82414bc19f8f0e59857b879d615f2d69', class: "spw-field-message__icon" }, h("spw-icon", { key: '2fde1c1acdcbe924bf3448355a17433540ff6a59', icon: this.variantIcon }))), h("span", { key: '0c9b68f44ec54d00aa6ee52b007a3c34e721ebdc', class: "spw-field-message__text" }, h("slot", { key: 'f2fb8c461e7b9b81d5b8a96a2fbcdf3373e66aea' })))));
    }
};
SpwFieldMessage.style = spwFieldMessageCss();

const spwGroupCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;width:100%}.spw-group spw-button:not[is-fullwidth-mobile=false]{display:block;width:100%}@media (min-width: 768px){.spw-group spw-button:not[is-fullwidth-mobile=false]{display:initial;width:auto}}.spw-group__field-label{margin-bottom:12px}.spw-group__field-message{margin-bottom:8px;margin-top:-8px}.spw-group__container{display:flex;width:fit-content}.spw-group--is-full-width .spw-group__container{width:100% !important}@media (min-width: 768px){.spw-group--buttons.spw-group--align-center .spw-group__container{justify-content:center;align-items:center}}@media (min-width: 768px){.spw-group__container{align-items:center}}.spw-group--buttons .spw-group__container{gap:12px;width:100%}@media (min-width: 768px){.spw-group--buttons .spw-group__container{width:fit-content}}.spw-group--links .spw-group__container,.spw-group--checkboxes .spw-group__container,.spw-group--radios .spw-group__container{gap:16px}.spw-group--checkboxes.spw-group--horizontal .spw-group__container,.spw-group--radios.spw-group--horizontal .spw-group__container{gap:16px}@media (min-width: 768px){.spw-group--checkboxes.spw-group--horizontal .spw-group__container,.spw-group--radios.spw-group--horizontal .spw-group__container{gap:24px}}.spw-group--buttons.spw-group--align-right.spw-group--horizontal .spw-group__container{flex-direction:column}@media (min-width: 768px){.spw-group--buttons.spw-group--align-right.spw-group--horizontal .spw-group__container{flex-direction:row-reverse}}.spw-group--buttons.spw-group--align-left.spw-group--horizontal.spw-group--reversed .spw-group__container{flex-direction:column-reverse}@media (min-width: 768px){.spw-group--buttons.spw-group--align-left.spw-group--horizontal.spw-group--reversed .spw-group__container{flex-direction:row}}.spw-group--align-left .spw-group__container{margin-right:auto}.spw-group--align-center .spw-group__container{margin-left:auto;margin-right:auto}.spw-group--align-right .spw-group__container{margin-left:auto}.spw-group--vertical .spw-group__container{flex-direction:column;align-items:flex-start}.spw-group--align-center .spw-group--vertical .spw-group__container{align-items:center}.spw-group--align-right .spw-group--vertical .spw-group__container{align-items:flex-end}.spw-group--horizontal .spw-group__container{flex-direction:column}@media (min-width: 768px){.spw-group--horizontal .spw-group__container{flex-direction:row}}.spw-group--disabled{opacity:0.5;pointer-events:none}`;

const SpwGroup = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Type d'éléments contenus dans le groupe (buttons, checkboxes, radios, links) */
        this.type = 'buttons';
        /** Orientation du groupe (horizontal ou vertical) */
        this.orientation = 'horizontal';
        /** Alignement horizontal du groupe */
        this.alignment = 'left';
        /** Détermine si le groupe est désactivé */
        this.disabled = false;
        /** Texte à afficher au-dessus de l'élément de formulaire */
        this.label = '';
        /** Si `true`, l'ordre des boutons est inversé en mobile (uniquement valable en cas d'alignement left) */
        this.isReversed = false;
        /** Si vrai, le groupe prend toute la largeur */
        this.isFullWidth = false;
        /** Comportement du flex-wrap sur le container */
        this.flexWrap = 'nowrap';
        /** Message d'erreur à afficher sous le groupe (pour les types checkboxes et radios) */
        this.error = '';
        /** Message d'indication (hint) à afficher sous le groupe (pour les types checkboxes et radios) */
        this.hint = '';
        /** Message de succès à afficher sous le groupe (pour les types checkboxes et radios) */
        this.success = '';
        /** Message de warning à afficher sous le groupe (pour les types checkboxes et radios) */
        this.warning = '';
        /** Positionnement du tooltip */
        this.tooltipDirection = 'top';
        /** Curseur du tooltip */
        this.tooltipCursor = 'help';
    }
    get isCheckboxOrRadio() {
        return this.type === 'checkboxes' || this.type === 'radios';
    }
    componentDidLoad() {
        this.handleSlotChange();
    }
    handleSlotChange() {
        var _a;
        const elements = ((_a = this.slotEl) === null || _a === void 0 ? void 0 : _a.assignedElements) ? this.slotEl.assignedElements() : Array.from(this.host.querySelectorAll('*'));
        elements.forEach(element => {
            if (this.disabled) {
                element.setAttribute('disabled', '');
            }
            else {
                element.removeAttribute('disabled');
            }
            if (this.isCheckboxOrRadio && this.error) {
                element.setAttribute('error', '');
            }
            else {
                element.removeAttribute('error');
            }
        });
    }
    get groupClasses() {
        return {
            'spw-group': true,
            'spw-group--horizontal': this.orientation === 'horizontal',
            'spw-group--vertical': this.orientation === 'vertical',
            'spw-group--reversed': this.isReversed,
            'spw-group--disabled': this.disabled,
            'spw-group--is-error': !!(this.error && this.isCheckboxOrRadio),
            'spw-group--is-full-width': this.isFullWidth,
            [`spw-group--${this.type}`]: true,
            [`spw-group--align-${this.alignment}`]: true,
        };
    }
    renderMessages() {
        if (!this.isCheckboxOrRadio)
            return;
        return [
            this.error && h("spw-field-message", { variant: "error" }, this.error),
            this.hint && h("spw-field-message", { variant: "hint" }, this.hint),
            this.success && h("spw-field-message", { variant: "success" }, this.success),
            this.warning && h("spw-field-message", { variant: "warning" }, this.warning),
        ];
    }
    render() {
        return (h(Host, { key: '2d8438c4e41a748a04c282991d6fa0c9811626ef' }, h("div", { key: '3cedc33a257bdb112e0b03dbf703d3eba07f262f', class: this.groupClasses }, this.label && (h("spw-field-label", { key: '9b9988718669bc2f832d280549f32f72b2580e0e', class: "spw-group__field-label", label: this.label, name: this.name, required: this.required, tooltipTitle: this.tooltipTitle, tooltipText: this.tooltipText, tooltipMaxWidth: this.tooltipMaxWidth, tooltipDirection: this.tooltipDirection, tooltipCursor: this.tooltipCursor })), this.isCheckboxOrRadio && this.assistiveText && (h("spw-field-message", { key: '3ffbe7cdc69048a63fbd89342024c86787502a0e', class: "spw-group__field-message", variant: "hint", showIcon: false }, this.assistiveText)), h("div", { key: '50533c9bd5cca52ba2620e005a86a19e23237daa', class: "spw-group__container", style: { flexWrap: this.flexWrap } }, h("slot", { key: '91c0a8fd562f4eaa2edacb5489fc14703c8f88f8', ref: el => (this.slotEl = el) })), this.renderMessages())));
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "disabled": [{
                "handleSlotChange": 0
            }],
        "error": [{
                "handleSlotChange": 0
            }]
    }; }
};
SpwGroup.style = spwGroupCss();

const spwIconCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{line-height:1}.spw-icon.fa-solid,.spw-icon.fa-solid:before{font-family:var(--spw-ds-font-icons-solid)}.spw-icon.fa-brands,.spw-icon.fa-brands:before{font-family:var(--spw-ds-font-icons-brands)}.spw-icon.fa-regular,.spw-icon.fa-regular:before{font-weight:400;font-family:var(--spw-ds-font-icons-solid)}.spw-icon.fa-light,.spw-icon.fa-light:before{font-weight:300;font-family:var(--spw-ds-font-icons-solid)}.spw-icon{font-size:inherit}`;

const SpwIcon = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Permet de spécifier une variante de Font Awesome */
        this.variant = 'fa-solid';
    }
    render() {
        const iconClassName = `spw-icon ${this.variant} ${this.icon}`;
        return h("i", { key: '058bd372340a4a9bd4c212a2168fed97769a553a', class: iconClassName });
    }
    static get assetsDirs() { return ["assets"]; }
};
SpwIcon.style = spwIconCss();

const spwLinkCss = () => `@charset "UTF-8";html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{--spw-link-display:inline;--spw-link-wrap:wrap;--spw-link-color:var(--spw-ds-primary);--spw-link-hover-color:var(--spw-ds-variant);--spw-link-active-color:var(--spw-ds-active);--spw-link-font-weight:700;--spw-link-padding:6px}.spw-link{display:var(--spw-link-display);text-decoration:none;text-wrap:var(--spw-link-wrap);cursor:pointer;color:var(--spw-link-color);border-radius:4px;font-weight:var(--spw-link-font-weight)}.spw-link--surface-dark{color:var(--spw-ds-white)}.spw-link__inner{display:inline;overflow-wrap:break-word;text-decoration:underline;text-underline-offset:2px}.spw-link:focus-visible{outline-offset:2px;outline:3px solid black}.spw-link:hover{color:var(--spw-link-hover-color)}.spw-link:hover .spw-link__inner{text-decoration-thickness:2px}.spw-link:active{color:var(--spw-link-active-color)}.spw-link:active .spw-link__inner{text-decoration-thickness:2px}.spw-link[aria-disabled=true]{pointer-events:none;color:var(--spw-color-themes-grey-grey-600);cursor:not-allowed}.spw-link--surface-dark:hover{color:var(--spw-ds-white)}.spw-link--surface-dark:active{color:var(--spw-ds-white)}.spw-link--surface-dark[aria-disabled=true]{color:var(--spw-ds-white);opacity:0.5}.spw-link--has-icon-right spw-icon{margin-left:var(--spw-link-padding);margin-right:4px}.spw-link--has-icon-left spw-icon{margin-left:4px;margin-right:var(--spw-link-padding)}`;

const SpwLink = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.spwClick = createEvent(this, "spwClick", 7);
        /** Attribut target (détermine où ouvrir le lien) */
        this.target = '_self';
        /** Position de l'icône à l'intérieur du lien (gauche ou droite) */
        this.iconPosition = 'right';
        /** Si désactivé, le lien n'est pas cliquable */
        this.disabled = false;
        /** Permet de choisir la surface d'arrière-plan du lien */
        this.surface = 'light';
        this.onClick = (ev) => {
            if (this.disabled) {
                ev.preventDefault();
                return;
            }
            this.spwClick.emit(ev);
        };
    }
    get elementClass() {
        return {
            'spw-link': true,
            'spw-link--has-icon-right': this.icon && this.iconPosition === 'right',
            'spw-link--has-icon-left': this.icon && this.iconPosition === 'left',
            [`spw-link--surface-${this.surface}`]: true,
            'spw-link--has-icon': !!this.icon,
        };
    }
    render() {
        const { href, rel, download, target, icon, iconPosition, accAriaLabel, disabled } = this;
        const ariaAttributes = {
            'aria-label': accAriaLabel,
            'aria-disabled': disabled ? 'true' : null,
        };
        const iconClass = `spw-icon--${iconPosition}`;
        const iconElement = icon ? h("spw-icon", { class: iconClass, icon: icon }) : null;
        return (h("a", Object.assign({ key: '32378b05b827025261ac14fabf52d5d03539f52a', href: disabled ? undefined : href, rel: rel, download: download, target: target, class: this.elementClass, onClick: this.onClick }, ariaAttributes), iconPosition === 'left' && iconElement, h("div", { key: 'e522dcbaecc16fb7c901bfd32587b19192148613', class: "spw-link__inner" }, h("slot", { key: '702b2c9d307fd53dd60dbf197c9cced7892455ba' })), iconPosition === 'right' && iconElement));
    }
    get el() { return getElement(this); }
};
SpwLink.style = spwLinkCss();

const spwSeparatorCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-separator{display:block;border-width:1px}.spw-separator--horizontal{border-bottom-style:solid;width:auto;height:0}.spw-separator--vertical{border-right-style:solid;width:0;height:auto}.spw-separator--dark{border-color:var(--spw-colors-support-grey-grey-300)}.spw-separator--light{border-color:var(--spw-ds-white)}.spw-separator--thickness-1{border-width:1px}.spw-separator--thickness-2{border-width:2px}`;

const SpwSeparator = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Permet de choisir la surface du séparateur (clair ou sombre) */
        this.surface = 'dark';
        /** Permet de définir la direction du séparateur */
        this.direction = 'horizontal';
        /** Définit l'épaisseur du séparateur */
        this.thickness = 1;
        /** Largeur du séparateur (par défaut 100% si non spécifié) */
        this.width = '100%';
        /** Hauteur du séparateur (par défaut 100% si non spécifié) */
        this.height = '100%';
    }
    get elementClass() {
        return {
            'spw-separator': true,
            [`spw-separator--${this.surface}`]: true,
            [`spw-separator--${this.direction}`]: true,
            [`spw-separator--thickness-${this.thickness}`]: true,
        };
    }
    get style() {
        return {
            width: this.direction === 'horizontal' ? `${this.width}px` : `${this.thickness}px`,
            height: this.direction === 'vertical' ? `${this.height}px` : `${this.thickness}px`,
        };
    }
    render() {
        return h("div", { key: 'd74452bbc8830cf494100c3f6510988104a5b754', class: this.elementClass, style: this.style });
    }
};
SpwSeparator.style = spwSeparatorCss();

const rougeCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-red-red-500);--spw-ds-variant:var(--spw-color-themes-red-red-700);--spw-ds-active:var(--spw-color-themes-red-red-800);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-red-red-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-red-red-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-red-red-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-red-red-800);--spw-ds-alt-purple:#552046;--spw-ds-alt-blue:#202f55;--spw-ds-alt-petrol:#1b4146}`;

const bleuCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-blue-blue-500);--spw-ds-variant:var(--spw-color-themes-blue-blue-700);--spw-ds-active:var(--spw-color-themes-blue-blue-800);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-blue-blue-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-blue-blue-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-blue-blue-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-blue-blue-800)}`;

const bleuClairCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-light-blue-light-blue-600);--spw-ds-variant:var(--spw-color-themes-light-blue-light-blue-800);--spw-ds-active:var(--spw-color-themes-light-blue-light-blue-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-light-blue-light-blue-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-light-blue-light-blue-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-light-blue-light-blue-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-light-blue-light-blue-800)}`;

const vertCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-green-green-700);--spw-ds-variant:var(--spw-color-themes-green-green-800);--spw-ds-active:var(--spw-color-themes-green-green-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-green-green-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-green-green-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-green-green-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-green-green-800)}`;

const vertLegerCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-light-green-light-green-700);--spw-ds-variant:var(--spw-color-themes-light-green-light-green-800);--spw-ds-active:var(--spw-color-themes-light-green-light-green-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-light-green-light-green-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-light-green-light-green-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-light-green-light-green-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-light-green-light-green-800)}`;

const turquoiseCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-teal-teal-700);--spw-ds-variant:var(--spw-color-themes-teal-teal-800);--spw-ds-active:var(--spw-color-themes-teal-teal-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-teal-teal-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-teal-teal-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-teal-teal-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-teal-teal-800)}`;

const orangeCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-orange-orange-700);--spw-ds-variant:var(--spw-color-themes-orange-orange-800);--spw-ds-active:var(--spw-color-themes-orange-orange-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-orange-orange-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-orange-orange-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-orange-orange-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-orange-orange-800)}`;

const indigoCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-indigo-indigo-700);--spw-ds-variant:var(--spw-color-themes-indigo-indigo-800);--spw-ds-active:var(--spw-color-themes-indigo-indigo-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-indigo-indigo-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-indigo-indigo-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-indigo-indigo-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-indigo-indigo-800)}`;

const mauveCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-purple-purple-500);--spw-ds-variant:var(--spw-color-themes-purple-purple-800);--spw-ds-active:var(--spw-color-themes-purple-purple-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-purple-purple-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-purple-purple-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-purple-purple-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-purple-purple-800)}`;

const grisCss = () => `:root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-grey-grey-500);--spw-ds-variant:var(--spw-color-themes-grey-grey-800);--spw-ds-active:var(--spw-color-themes-grey-grey-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-grey-grey-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-grey-grey-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-grey-grey-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-grey-grey-800)}`;

const themes = {
    rouge: rougeCss,
    bleu: bleuCss,
    bleuClair: bleuClairCss,
    vert: vertCss,
    vertLeger: vertLegerCss,
    orange: orangeCss,
    turquoise: turquoiseCss,
    indigo: indigoCss,
    mauve: mauveCss,
    gris: grisCss,
};

const SpwThemeProvider = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Définit le thème employé, conditionne les tokens associés au thème */
        this.theme = 'rouge';
    }
    componentWillLoad() {
        this.applyTheme(this.theme);
    }
    componentWillUpdate() {
        this.applyTheme(this.theme);
    }
    applyTheme(theme) {
        const styleId = 'theme-styles';
        let styleElement = document.getElementById(styleId);
        if (!styleElement) {
            styleElement = document.createElement('style');
            styleElement.id = styleId;
            document.head.appendChild(styleElement);
        }
        const css = themes[theme];
        styleElement.innerHTML = typeof css === 'function' ? css() : css;
        document.documentElement.setAttribute('data-theme', theme);
    }
    render() {
        return (h("main", { key: 'f5a89ddcd66778c2b01aeb9060259606826f56e3', class: `spw-theme-${this.theme}` }, h("slot", { key: 'ad8c44ad796c3cc358c3d0a4317730d858000c96' })));
    }
    get el() { return getElement(this); }
};

const spwTooltipCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-block}.spw-tooltip__target--pointer{cursor:pointer}.spw-tooltip__target--default{cursor:default}.spw-tooltip__target--help{cursor:help}.spw-tooltip__target--disabled{cursor:not-allowed}:host(.spw-tooltip--has-ellipsis) .spw-tooltip__target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`;

const SpwTooltip = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /** Titre du tooltip */
        this.tooltipTitle = '';
        /** Texte du tooltip */
        this.tooltipText = '';
        /** Positionnement du tooltip */
        this.direction = 'top';
        /** Curseur du tooltip */
        this.cursor = 'help';
        this.visible = true;
        this.isVisible = false;
        this.showTooltip = () => {
            if (!this.visible)
                return;
            this.isVisible = true;
            this.createTooltip();
            requestAnimationFrame(() => {
                this.positionTooltip();
            });
            window.addEventListener('scroll', this.handleScrollOrResize, true);
            window.addEventListener('resize', this.handleScrollOrResize);
        };
        this.hideTooltip = () => {
            this.isVisible = false;
            this.removeTooltipFromDOM();
            window.removeEventListener('scroll', this.handleScrollOrResize, true);
            window.removeEventListener('resize', this.handleScrollOrResize);
        };
    }
    connectedCallback() {
        this.handleScrollOrResize = this.handleScrollOrResize.bind(this);
    }
    disconnectedCallback() {
        window.removeEventListener('scroll', this.handleScrollOrResize, true);
        window.removeEventListener('resize', this.handleScrollOrResize);
        this.removeTooltipFromDOM();
    }
    updateTooltipVisibility() {
        if (this.tooltipEl) {
            this.tooltipEl.style.display = this.visible ? 'flex' : 'none';
        }
    }
    componentWillRender() {
        this.updateTooltipVisibility();
    }
    componentDidUpdate() {
        this.updateTooltipVisibility();
    }
    handleScrollOrResize() {
        if (this.isVisible) {
            this.positionTooltip();
        }
    }
    createTooltip() {
        if (!this.tooltipEl) {
            this.tooltipEl = document.createElement('div');
            this.tooltipEl.className = `spw-tooltip-fixed spw-tooltip-fixed--${this.direction}`;
            this.tooltipEl.setAttribute('role', 'tooltip');
            if (this.tooltipTitle) {
                const title = document.createElement('strong');
                title.className = 'spw-tooltip__title';
                title.textContent = this.tooltipTitle;
                this.tooltipEl.appendChild(title);
            }
            if (this.tooltipText) {
                const text = document.createElement('div');
                text.textContent = this.tooltipText;
                this.tooltipEl.appendChild(text);
            }
            document.body.appendChild(this.tooltipEl);
        }
    }
    removeTooltipFromDOM() {
        if (this.tooltipEl && this.tooltipEl.parentNode) {
            this.tooltipEl.parentNode.removeChild(this.tooltipEl);
        }
        this.tooltipEl = null;
    }
    positionTooltip() {
        var _a;
        if (!this.tooltipEl)
            return;
        const target = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.spw-tooltip__target');
        if (!target)
            return;
        const rect = target.getBoundingClientRect();
        const tooltip = this.tooltipEl;
        tooltip.style.visibility = 'hidden';
        tooltip.style.display = 'flex';
        tooltip.style.position = 'fixed';
        tooltip.style.top = '0px';
        tooltip.style.left = '0px';
        tooltip.style.maxWidth = this.maxWidth + 'px' || '100%';
        const tooltipRect = tooltip.getBoundingClientRect();
        let top = 0;
        let left = 0;
        switch (this.direction) {
            case 'top':
                top = rect.top - tooltipRect.height - 8;
                left = rect.left + (rect.width - tooltipRect.width) / 2;
                break;
            case 'bottom':
                top = rect.bottom + 8;
                left = rect.left + (rect.width - tooltipRect.width) / 2;
                break;
            case 'left':
                top = rect.top + (rect.height - tooltipRect.height) / 2;
                left = rect.left - tooltipRect.width - 8;
                break;
            case 'right':
            default:
                top = rect.top + (rect.height - tooltipRect.height) / 2;
                left = rect.right + 8;
                break;
        }
        tooltip.style.top = `${top}px`;
        tooltip.style.left = `${left}px`;
        tooltip.style.zIndex = '9999';
        tooltip.style.visibility = 'visible';
    }
    get classes() {
        return {
            'spw-tooltip__target': true,
            [`spw-tooltip__target--${this.cursor}`]: true,
        };
    }
    render() {
        return (h("div", { key: '06c1bd83ab16650d4c7f8ddf6a5a38f6e30233af', class: this.classes, onMouseEnter: this.showTooltip, onMouseLeave: this.hideTooltip }, h("slot", { key: 'aa259f875573c1d636822c852212320e83710e7f' })));
    }
    get host() { return getElement(this); }
};
SpwTooltip.style = spwTooltipCss();

export { SpwFieldLabel as spw_field_label, SpwFieldMessage as spw_field_message, SpwGroup as spw_group, SpwIcon as spw_icon, SpwLink as spw_link, SpwSeparator as spw_separator, SpwThemeProvider as spw_theme_provider, SpwTooltip as spw_tooltip };
