@ucme-ui/angular 0.3.0 → 0.4.0

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.
@@ -136,7 +136,25 @@ const HU_BUILTIN_ICONS = {
136
136
  filter: "M22 3H2l8 9.46V19l4 2v-8.54z",
137
137
  "graduation-cap": "M22 10 12 5 2 10l10 5zM6 12v5c3 3 9 3 12 0v-5",
138
138
  building: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18zM6 12H4a2 2 0 0 0-2 2v8h4M18 9h2a2 2 0 0 1 2 2v11h-4M10 6h4M10 10h4M10 14h4M10 18h4",
139
- clock: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 6v6l4 2"
139
+ clock: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 6v6l4 2",
140
+ bold: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
141
+ italic: "M19 4h-9M14 20H5M15 4 9 20",
142
+ underline: "M6 4v6a6 6 0 0 0 12 0V4M4 20h16",
143
+ strikethrough: "M16 4H9a3 3 0 0 0-2.83 4M14 12a4 4 0 0 1 0 8H6M4 12h16",
144
+ heading: "M6 12h12M6 20V4M18 20V4",
145
+ list: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",
146
+ "list-ordered": "M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",
147
+ quote: "M3 21c3 0 7-1 7-8V5c0-1.25-.76-2-2-2H4c-1.25 0-2 .75-2 2v6c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 0-1 1v3c0 1 0 1 1 1zM15 21c3 0 7-1 7-8V5c0-1.25-.76-2-2-2h-4c-1.25 0-2 .75-2 2v6c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",
148
+ code: "m16 18 6-6-6-6M8 6l-6 6 6 6",
149
+ link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
150
+ unlink: "m18.84 12.25 1.72-1.71a5 5 0 0 0-.12-7.07 5 5 0 0 0-6.95 0l-1.72 1.71M5.17 11.75l-1.71 1.71a5 5 0 0 0 .12 7.07 5 5 0 0 0 6.95 0l1.71-1.71M8 2v3M2 8h3M16 22v-3M22 16h-3",
151
+ undo: "M3 7v6h6M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",
152
+ redo: "M21 7v6h-6M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",
153
+ eraser: "m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21M22 21H7M5 11l9 9",
154
+ "text-color": "M6 16 12 3l6 13M8.2 11h7.6",
155
+ highlighter: "m9 11-6 6v3h9l3-3M22 12l-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",
156
+ image: "M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zM9 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM21 15l-3.09-3.09a2 2 0 0 0-2.82 0L6 21",
157
+ upload: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"
140
158
  };
141
159
  var HuIcon = class HuIcon {
142
160
  customSets = inject(HU_ICON_SETS, { optional: true }) ?? [];
@@ -2761,6 +2779,1196 @@ i0.ɵɵngDeclareClassMetadata({
2761
2779
  }]
2762
2780
  }
2763
2781
  });
2782
+ const TAG_MAP = {
2783
+ P: "p",
2784
+ DIV: "p",
2785
+ BR: "br",
2786
+ STRONG: "strong",
2787
+ B: "strong",
2788
+ EM: "em",
2789
+ I: "em",
2790
+ U: "u",
2791
+ S: "s",
2792
+ STRIKE: "s",
2793
+ DEL: "s",
2794
+ H1: "h1",
2795
+ H2: "h2",
2796
+ H3: "h3",
2797
+ H4: "h3",
2798
+ H5: "h3",
2799
+ H6: "h3",
2800
+ UL: "ul",
2801
+ OL: "ol",
2802
+ LI: "li",
2803
+ BLOCKQUOTE: "blockquote",
2804
+ PRE: "pre",
2805
+ CODE: "code",
2806
+ A: "a",
2807
+ IMG: "img",
2808
+ SPAN: "span",
2809
+ FONT: "span",
2810
+ MARK: "span"
2811
+ };
2812
+ const DROP = /* @__PURE__ */ new Set([
2813
+ "SCRIPT",
2814
+ "STYLE",
2815
+ "IFRAME",
2816
+ "OBJECT",
2817
+ "EMBED",
2818
+ "NOSCRIPT",
2819
+ "TEMPLATE",
2820
+ "SVG",
2821
+ "MATH",
2822
+ "HEAD",
2823
+ "META",
2824
+ "LINK",
2825
+ "TITLE",
2826
+ "FORM",
2827
+ "INPUT",
2828
+ "BUTTON",
2829
+ "SELECT",
2830
+ "TEXTAREA",
2831
+ "VIDEO",
2832
+ "AUDIO",
2833
+ "CANVAS"
2834
+ ]);
2835
+ const BLOCKS = /* @__PURE__ */ new Set([
2836
+ "p",
2837
+ "ul",
2838
+ "ol",
2839
+ "blockquote",
2840
+ "pre",
2841
+ "h1",
2842
+ "h2",
2843
+ "h3"
2844
+ ]);
2845
+ const SAFE_URL = /^(https?:|mailto:|tel:|\/|#|\.{0,2}\/)/i;
2846
+ const SAFE_IMAGE = /^(https?:\/\/|\/|\.{0,2}\/|data:image\/(png|jpe?g|gif|webp);base64,[a-z0-9+/=\s]+$)/i;
2847
+ const SAFE_COLOR = /^(#[0-9a-f]{3,8}|rgba?\(\s*[\d.\s,%]+\)|[a-z]{3,20})$/i;
2848
+ function huIsSafeUrl(url) {
2849
+ const value = url.trim();
2850
+ return !!value && SAFE_URL.test(value) && !/^\s*(javascript|data|vbscript):/i.test(value);
2851
+ }
2852
+ function huIsSafeImageSrc(src) {
2853
+ return SAFE_IMAGE.test(src.trim());
2854
+ }
2855
+ function huSanitizeHtml(html, doc = document) {
2856
+ if (!html) return "";
2857
+ const template = doc.createElement("template");
2858
+ template.innerHTML = html;
2859
+ const out = doc.createElement("div");
2860
+ copyChildren(template.content, out, doc);
2861
+ normalizeTopLevel(out, doc);
2862
+ return out.innerHTML;
2863
+ }
2864
+ function normalizeTopLevel(root, doc) {
2865
+ root.querySelectorAll("p").forEach((p) => {
2866
+ if (!p.textContent?.trim() && !p.querySelector("br, img")) p.remove();
2867
+ });
2868
+ let run = null;
2869
+ Array.from(root.childNodes).forEach((node) => {
2870
+ if (node instanceof Element && BLOCKS.has(node.tagName.toLowerCase())) {
2871
+ run = null;
2872
+ return;
2873
+ }
2874
+ if (!run) {
2875
+ if (node.nodeType === Node.TEXT_NODE && !node.textContent?.trim()) {
2876
+ node.remove();
2877
+ return;
2878
+ }
2879
+ run = doc.createElement("p");
2880
+ root.insertBefore(run, node);
2881
+ }
2882
+ run.appendChild(node);
2883
+ });
2884
+ }
2885
+ function colorStyle(el) {
2886
+ const style = el.style;
2887
+ let color = style?.color || (el.tagName === "FONT" ? el.getAttribute("color") ?? "" : "");
2888
+ let background = style?.backgroundColor || (el.tagName === "MARK" ? "rgba(250, 204, 21, 0.4)" : "");
2889
+ color = SAFE_COLOR.test(color.trim()) ? color.trim() : "";
2890
+ background = SAFE_COLOR.test(background.trim()) ? background.trim() : "";
2891
+ return [color && `color: ${color}`, background && `background-color: ${background}`].filter(Boolean).join("; ");
2892
+ }
2893
+ function copyChildren(from, to, doc) {
2894
+ from.childNodes.forEach((node) => {
2895
+ if (node.nodeType === Node.TEXT_NODE) {
2896
+ to.appendChild(doc.createTextNode(node.textContent ?? ""));
2897
+ return;
2898
+ }
2899
+ if (node.nodeType !== Node.ELEMENT_NODE) return;
2900
+ const el = node;
2901
+ if (DROP.has(el.tagName)) return;
2902
+ const tag = TAG_MAP[el.tagName];
2903
+ if (!tag) {
2904
+ copyChildren(el, to, doc);
2905
+ return;
2906
+ }
2907
+ if (tag === "img") {
2908
+ const src = el.getAttribute("src") ?? "";
2909
+ if (!huIsSafeImageSrc(src)) return;
2910
+ const img = doc.createElement("img");
2911
+ img.setAttribute("src", src.trim());
2912
+ img.setAttribute("alt", el.getAttribute("alt") ?? "");
2913
+ to.appendChild(img);
2914
+ return;
2915
+ }
2916
+ if (tag === "span") {
2917
+ const style = colorStyle(el);
2918
+ if (!style) {
2919
+ copyChildren(el, to, doc);
2920
+ return;
2921
+ }
2922
+ const span = doc.createElement("span");
2923
+ span.setAttribute("style", style);
2924
+ copyChildren(el, span, doc);
2925
+ to.appendChild(span);
2926
+ return;
2927
+ }
2928
+ const clean = doc.createElement(tag);
2929
+ if (tag === "a") {
2930
+ const href = el.getAttribute("href") ?? "";
2931
+ if (!huIsSafeUrl(href)) {
2932
+ copyChildren(el, to, doc);
2933
+ return;
2934
+ }
2935
+ clean.setAttribute("href", href);
2936
+ clean.setAttribute("target", "_blank");
2937
+ clean.setAttribute("rel", "noopener noreferrer");
2938
+ }
2939
+ copyChildren(el, clean, doc);
2940
+ to.appendChild(clean);
2941
+ });
2942
+ }
2943
+ const HU_EDITOR_DEFAULT_TOOLBAR = [
2944
+ "heading",
2945
+ "|",
2946
+ "bold",
2947
+ "italic",
2948
+ "underline",
2949
+ "strike",
2950
+ "|",
2951
+ "textColor",
2952
+ "highlight",
2953
+ "|",
2954
+ "bulletList",
2955
+ "orderedList",
2956
+ "blockquote",
2957
+ "codeBlock",
2958
+ "|",
2959
+ "link",
2960
+ "image",
2961
+ "clear",
2962
+ "|",
2963
+ "undo",
2964
+ "redo"
2965
+ ];
2966
+ const HU_EDITOR_MINIMAL_TOOLBAR = [
2967
+ "bold",
2968
+ "italic",
2969
+ "underline",
2970
+ "|",
2971
+ "bulletList",
2972
+ "orderedList",
2973
+ "|",
2974
+ "link"
2975
+ ];
2976
+ const HU_EDITOR_BUTTONS = {
2977
+ bold: {
2978
+ tool: "bold",
2979
+ icon: "bold",
2980
+ label: "Kalın",
2981
+ shortcut: "Ctrl+B"
2982
+ },
2983
+ italic: {
2984
+ tool: "italic",
2985
+ icon: "italic",
2986
+ label: "İtalik",
2987
+ shortcut: "Ctrl+I"
2988
+ },
2989
+ underline: {
2990
+ tool: "underline",
2991
+ icon: "underline",
2992
+ label: "Altı çizili",
2993
+ shortcut: "Ctrl+U"
2994
+ },
2995
+ strike: {
2996
+ tool: "strike",
2997
+ icon: "strikethrough",
2998
+ label: "Üstü çizili"
2999
+ },
3000
+ textColor: {
3001
+ tool: "textColor",
3002
+ icon: "text-color",
3003
+ label: "Yazı rengi"
3004
+ },
3005
+ highlight: {
3006
+ tool: "highlight",
3007
+ icon: "highlighter",
3008
+ label: "Vurgu rengi"
3009
+ },
3010
+ bulletList: {
3011
+ tool: "bulletList",
3012
+ icon: "list",
3013
+ label: "Madde işaretli liste"
3014
+ },
3015
+ orderedList: {
3016
+ tool: "orderedList",
3017
+ icon: "list-ordered",
3018
+ label: "Numaralı liste"
3019
+ },
3020
+ blockquote: {
3021
+ tool: "blockquote",
3022
+ icon: "quote",
3023
+ label: "Alıntı"
3024
+ },
3025
+ codeBlock: {
3026
+ tool: "codeBlock",
3027
+ icon: "code",
3028
+ label: "Kod bloğu"
3029
+ },
3030
+ link: {
3031
+ tool: "link",
3032
+ icon: "link",
3033
+ label: "Link",
3034
+ shortcut: "Ctrl+K"
3035
+ },
3036
+ image: {
3037
+ tool: "image",
3038
+ icon: "image",
3039
+ label: "Görsel"
3040
+ },
3041
+ clear: {
3042
+ tool: "clear",
3043
+ icon: "eraser",
3044
+ label: "Biçimi temizle"
3045
+ },
3046
+ undo: {
3047
+ tool: "undo",
3048
+ icon: "undo",
3049
+ label: "Geri al",
3050
+ shortcut: "Ctrl+Z"
3051
+ },
3052
+ redo: {
3053
+ tool: "redo",
3054
+ icon: "redo",
3055
+ label: "Yinele",
3056
+ shortcut: "Ctrl+Y"
3057
+ }
3058
+ };
3059
+ const HU_EDITOR_BLOCKS = [
3060
+ {
3061
+ value: "p",
3062
+ label: "Paragraf"
3063
+ },
3064
+ {
3065
+ value: "h1",
3066
+ label: "Başlık 1"
3067
+ },
3068
+ {
3069
+ value: "h2",
3070
+ label: "Başlık 2"
3071
+ },
3072
+ {
3073
+ value: "h3",
3074
+ label: "Başlık 3"
3075
+ }
3076
+ ];
3077
+ const HU_EDITOR_TEXT_COLORS = [
3078
+ {
3079
+ label: "Kırmızı",
3080
+ value: "#dc2626"
3081
+ },
3082
+ {
3083
+ label: "Turuncu",
3084
+ value: "#ea580c"
3085
+ },
3086
+ {
3087
+ label: "Sarı",
3088
+ value: "#ca8a04"
3089
+ },
3090
+ {
3091
+ label: "Yeşil",
3092
+ value: "#16a34a"
3093
+ },
3094
+ {
3095
+ label: "Turkuaz",
3096
+ value: "#0891b2"
3097
+ },
3098
+ {
3099
+ label: "Mavi",
3100
+ value: "#2563eb"
3101
+ },
3102
+ {
3103
+ label: "Mor",
3104
+ value: "#7c3aed"
3105
+ },
3106
+ {
3107
+ label: "Pembe",
3108
+ value: "#db2777"
3109
+ },
3110
+ {
3111
+ label: "Gri",
3112
+ value: "#71717a"
3113
+ }
3114
+ ];
3115
+ const HU_EDITOR_HIGHLIGHT_COLORS = [
3116
+ {
3117
+ label: "Sarı",
3118
+ value: "rgba(250, 204, 21, 0.4)"
3119
+ },
3120
+ {
3121
+ label: "Yeşil",
3122
+ value: "rgba(34, 197, 94, 0.3)"
3123
+ },
3124
+ {
3125
+ label: "Mavi",
3126
+ value: "rgba(59, 130, 246, 0.3)"
3127
+ },
3128
+ {
3129
+ label: "Mor",
3130
+ value: "rgba(139, 92, 246, 0.3)"
3131
+ },
3132
+ {
3133
+ label: "Pembe",
3134
+ value: "rgba(236, 72, 153, 0.3)"
3135
+ },
3136
+ {
3137
+ label: "Kırmızı",
3138
+ value: "rgba(239, 68, 68, 0.3)"
3139
+ },
3140
+ {
3141
+ label: "Turuncu",
3142
+ value: "rgba(249, 115, 22, 0.3)"
3143
+ }
3144
+ ];
3145
+ var HuEditor = class HuEditor {
3146
+ doc = inject(DOCUMENT);
3147
+ injector = inject(Injector);
3148
+ host = inject(ElementRef);
3149
+ field = inject(HU_FORM_FIELD, {
3150
+ optional: true,
3151
+ host: true
3152
+ });
3153
+ value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
3154
+ placeholder = input("Yazmaya başlayın…", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
3155
+ toolbar = input(HU_EDITOR_DEFAULT_TOOLBAR, ...ngDevMode ? [{ debugName: "toolbar" }] : /* istanbul ignore next */ []);
3156
+ readonly = input(false, {
3157
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
3158
+ transform: booleanAttribute
3159
+ });
3160
+ disabled = input(false, {
3161
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
3162
+ transform: booleanAttribute
3163
+ });
3164
+ showCount = input(false, {
3165
+ ...ngDevMode ? { debugName: "showCount" } : /* istanbul ignore next */ {},
3166
+ transform: booleanAttribute
3167
+ });
3168
+ ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
3169
+ id = input(huUniqueId("hu-editor"), ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
3170
+ textColors = input(HU_EDITOR_TEXT_COLORS, ...ngDevMode ? [{ debugName: "textColors" }] : /* istanbul ignore next */ []);
3171
+ highlightColors = input(HU_EDITOR_HIGHLIGHT_COLORS, ...ngDevMode ? [{ debugName: "highlightColors" }] : /* istanbul ignore next */ []);
3172
+ imageUpload = input(null, ...ngDevMode ? [{ debugName: "imageUpload" }] : /* istanbul ignore next */ []);
3173
+ maxImageSize = input(2097152, ...ngDevMode ? [{ debugName: "maxImageSize" }] : /* istanbul ignore next */ []);
3174
+ buttons = HU_EDITOR_BUTTONS;
3175
+ blocks = HU_EDITOR_BLOCKS;
3176
+ focused = signal(false, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
3177
+ active = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
3178
+ block = signal("p", ...ngDevMode ? [{ debugName: "block" }] : /* istanbul ignore next */ []);
3179
+ isEmpty = signal(true, ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
3180
+ counts = signal({
3181
+ words: 0,
3182
+ chars: 0
3183
+ }, ...ngDevMode ? [{ debugName: "counts" }] : /* istanbul ignore next */ []);
3184
+ panel = signal(null, ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
3185
+ linkUrl = signal("", ...ngDevMode ? [{ debugName: "linkUrl" }] : /* istanbul ignore next */ []);
3186
+ hasLink = signal(false, ...ngDevMode ? [{ debugName: "hasLink" }] : /* istanbul ignore next */ []);
3187
+ imageUrl = signal("", ...ngDevMode ? [{ debugName: "imageUrl" }] : /* istanbul ignore next */ []);
3188
+ imageAlt = signal("", ...ngDevMode ? [{ debugName: "imageAlt" }] : /* istanbul ignore next */ []);
3189
+ uploading = signal(false, ...ngDevMode ? [{ debugName: "uploading" }] : /* istanbul ignore next */ []);
3190
+ panelError = signal("", ...ngDevMode ? [{ debugName: "panelError" }] : /* istanbul ignore next */ []);
3191
+ lastTextColor = signal(null, ...ngDevMode ? [{ debugName: "lastTextColor" }] : /* istanbul ignore next */ []);
3192
+ lastHighlight = signal(null, ...ngDevMode ? [{ debugName: "lastHighlight" }] : /* istanbul ignore next */ []);
3193
+ formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
3194
+ isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
3195
+ editable = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []);
3196
+ content = viewChild.required("content", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
3197
+ panelInput = viewChild("panelInput", ...ngDevMode ? [{ debugName: "panelInput" }] : /* istanbul ignore next */ []);
3198
+ fileInput = viewChild("fileInput", ...ngDevMode ? [{ debugName: "fileInput" }] : /* istanbul ignore next */ []);
3199
+ ready = false;
3200
+ lastEmitted = null;
3201
+ savedRange = null;
3202
+ allowedText = computed(() => new Set(this.textColors().map((c) => this.normalizeColor(c.value))), ...ngDevMode ? [{ debugName: "allowedText" }] : /* istanbul ignore next */ []);
3203
+ allowedHighlight = computed(() => new Set(this.highlightColors().map((c) => this.normalizeColor(c.value))), ...ngDevMode ? [{ debugName: "allowedHighlight" }] : /* istanbul ignore next */ []);
3204
+ onChange = () => {};
3205
+ onTouched = () => {};
3206
+ ngControl;
3207
+ get hasControl() {
3208
+ return !!this.resolveControl();
3209
+ }
3210
+ controlErrorVisible = signal(false, ...ngDevMode ? [{ debugName: "controlErrorVisible" }] : /* istanbul ignore next */ []);
3211
+ errors = signal(null, ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
3212
+ isInvalid = computed(() => this.controlErrorVisible() || (this.field?.showError() ?? false), ...ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []);
3213
+ constructor() {
3214
+ afterNextRender(() => {
3215
+ this.ready = true;
3216
+ this.command("defaultParagraphSeparator", "p");
3217
+ this.command("styleWithCSS", "false");
3218
+ this.applyExternal(this.value());
3219
+ });
3220
+ effect(() => {
3221
+ const value = this.value();
3222
+ untracked(() => {
3223
+ if (this.ready) this.applyExternal(value);
3224
+ });
3225
+ });
3226
+ }
3227
+ ngDoCheck() {
3228
+ const c = this.resolveControl();
3229
+ if (!c) return;
3230
+ this.controlErrorVisible.set(!!c.invalid && !!(c.touched || c.dirty));
3231
+ this.errors.set(c.errors);
3232
+ }
3233
+ run(tool) {
3234
+ const active = this.active();
3235
+ switch (tool) {
3236
+ case "bold": return this.exec("bold");
3237
+ case "italic": return this.exec("italic");
3238
+ case "underline": return this.exec("underline");
3239
+ case "strike": return this.exec("strikeThrough");
3240
+ case "bulletList": return this.exec("insertUnorderedList");
3241
+ case "orderedList": return this.exec("insertOrderedList");
3242
+ case "blockquote": return this.exec("formatBlock", active.has("blockquote") ? "<p>" : "<blockquote>");
3243
+ case "codeBlock": return this.exec("formatBlock", active.has("codeBlock") ? "<p>" : "<pre>");
3244
+ case "link": return this.openLink();
3245
+ case "image":
3246
+ case "textColor":
3247
+ case "highlight": return this.togglePanel(tool);
3248
+ case "clear":
3249
+ this.exec("removeFormat");
3250
+ this.exec("unlink");
3251
+ return this.exec("formatBlock", "<p>");
3252
+ case "undo": return this.exec("undo");
3253
+ case "redo": return this.exec("redo");
3254
+ }
3255
+ }
3256
+ setBlock(tag) {
3257
+ this.exec("formatBlock", `<${tag}>`);
3258
+ }
3259
+ isToggle(tool) {
3260
+ return ![
3261
+ "clear",
3262
+ "undo",
3263
+ "redo",
3264
+ "link",
3265
+ "image",
3266
+ "textColor",
3267
+ "highlight"
3268
+ ].includes(tool);
3269
+ }
3270
+ isPanelTool(tool) {
3271
+ return tool === "image" || tool === "textColor" || tool === "highlight" || tool === "link";
3272
+ }
3273
+ togglePanel(panel) {
3274
+ if (!this.editable()) return;
3275
+ if (this.panel() === panel) return this.closePanel();
3276
+ this.captureSelection();
3277
+ this.panelError.set("");
3278
+ if (panel === "image") {
3279
+ this.imageUrl.set("");
3280
+ this.imageAlt.set("");
3281
+ }
3282
+ this.panel.set(panel);
3283
+ if (panel === "image") this.focusPanelInput();
3284
+ }
3285
+ closePanel() {
3286
+ this.panel.set(null);
3287
+ this.panelError.set("");
3288
+ this.restoreSelection();
3289
+ }
3290
+ focusPanelInput() {
3291
+ afterNextRender(() => this.panelInput()?.nativeElement.focus(), { injector: this.injector });
3292
+ }
3293
+ applyColor(kind, color) {
3294
+ if (!this.editable()) return;
3295
+ this.restoreSelection();
3296
+ let value = color;
3297
+ if (!value) value = kind === "textColor" ? "rgb(1, 2, 3)" : "transparent";
3298
+ this.command("styleWithCSS", "true");
3299
+ if (kind === "textColor") this.command("foreColor", value);
3300
+ else if (!this.doc.execCommand("hiliteColor", false, value)) this.command("backColor", value);
3301
+ this.command("styleWithCSS", "false");
3302
+ if (kind === "textColor") this.lastTextColor.set(color);
3303
+ else this.lastHighlight.set(color);
3304
+ this.panel.set(null);
3305
+ this.emit();
3306
+ }
3307
+ openLink() {
3308
+ if (!this.editable()) return;
3309
+ if (this.panel() === "link") return this.closePanel();
3310
+ this.captureSelection();
3311
+ const anchor = this.selectionAnchor();
3312
+ this.hasLink.set(!!anchor);
3313
+ this.linkUrl.set(anchor?.getAttribute("href") ?? "");
3314
+ this.panelError.set("");
3315
+ this.panel.set("link");
3316
+ this.focusPanelInput();
3317
+ }
3318
+ applyLink() {
3319
+ let url = this.linkUrl().trim();
3320
+ if (!url) return this.removeLink();
3321
+ if (!/^[a-z][a-z0-9+.-]*:/i.test(url) && !url.startsWith("/") && !url.startsWith("#")) url = `https://${url}`;
3322
+ if (!huIsSafeUrl(url)) {
3323
+ this.panelError.set("Geçersiz adres.");
3324
+ return;
3325
+ }
3326
+ this.restoreSelection();
3327
+ if (this.doc.getSelection()?.isCollapsed && !this.selectionAnchor()) this.command("insertHTML", `<a href="${escapeHtml(url)}">${escapeHtml(url)}</a>`);
3328
+ else this.command("createLink", url);
3329
+ this.panel.set(null);
3330
+ this.emit();
3331
+ }
3332
+ removeLink() {
3333
+ this.restoreSelection();
3334
+ const anchor = this.selectionAnchor();
3335
+ if (anchor) {
3336
+ const range = this.doc.createRange();
3337
+ range.selectNodeContents(anchor);
3338
+ const selection = this.doc.getSelection();
3339
+ selection?.removeAllRanges();
3340
+ selection?.addRange(range);
3341
+ }
3342
+ this.command("unlink");
3343
+ this.panel.set(null);
3344
+ this.emit();
3345
+ }
3346
+ insertImageFromUrl() {
3347
+ let url = this.imageUrl().trim();
3348
+ if (!url) return;
3349
+ if (!/^[a-z][a-z0-9+.-]*:/i.test(url) && !url.startsWith("/") && !url.startsWith(".")) url = `https://${url}`;
3350
+ if (!huIsSafeImageSrc(url)) {
3351
+ this.panelError.set("Geçersiz görsel adresi.");
3352
+ return;
3353
+ }
3354
+ this.insertImage(url, this.imageAlt().trim());
3355
+ }
3356
+ chooseFile() {
3357
+ this.fileInput()?.nativeElement.click();
3358
+ }
3359
+ async onFileChosen(event) {
3360
+ const input = event.target;
3361
+ const file = input.files?.[0];
3362
+ input.value = "";
3363
+ if (file) await this.uploadImage(file, this.imageAlt().trim());
3364
+ }
3365
+ async uploadImage(file, alt = "") {
3366
+ if (!/^image\/(png|jpe?g|gif|webp)$/i.test(file.type)) {
3367
+ this.showPanelError("Yalnızca PNG, JPEG, GIF veya WebP görseller eklenebilir.");
3368
+ return;
3369
+ }
3370
+ if (file.size > this.maxImageSize()) {
3371
+ const mb = (this.maxImageSize() / 1024 / 1024).toLocaleString("tr-TR", { maximumFractionDigits: 1 });
3372
+ this.showPanelError(`Görsel en fazla ${mb} MB olabilir.`);
3373
+ return;
3374
+ }
3375
+ this.captureSelection();
3376
+ this.uploading.set(true);
3377
+ this.panelError.set("");
3378
+ try {
3379
+ const upload = this.imageUpload();
3380
+ const src = upload ? await upload(file) : await readAsDataUrl(file);
3381
+ if (!huIsSafeImageSrc(src)) throw new Error("unsafe");
3382
+ this.insertImage(src, alt || file.name.replace(/\.[^.]+$/, ""));
3383
+ } catch {
3384
+ this.showPanelError("Görsel yüklenemedi.");
3385
+ } finally {
3386
+ this.uploading.set(false);
3387
+ }
3388
+ }
3389
+ insertImage(src, alt) {
3390
+ this.restoreSelection();
3391
+ this.command("insertHTML", `<img src="${escapeHtml(src)}" alt="${escapeHtml(alt)}">`);
3392
+ this.panel.set(null);
3393
+ this.emit();
3394
+ }
3395
+ showPanelError(message) {
3396
+ if (this.panel() !== "image") this.panel.set("image");
3397
+ this.panelError.set(message);
3398
+ }
3399
+ onInput() {
3400
+ this.emit();
3401
+ }
3402
+ onFocus() {
3403
+ const el = this.content().nativeElement;
3404
+ if (this.editable() && !el.firstElementChild && !el.textContent) {
3405
+ el.innerHTML = "<p><br></p>";
3406
+ const range = this.doc.createRange();
3407
+ range.setStart(el.firstElementChild, 0);
3408
+ range.collapse(true);
3409
+ const selection = this.doc.getSelection();
3410
+ selection?.removeAllRanges();
3411
+ selection?.addRange(range);
3412
+ }
3413
+ }
3414
+ onKeydown(event) {
3415
+ if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "k") {
3416
+ event.preventDefault();
3417
+ this.openLink();
3418
+ }
3419
+ }
3420
+ onContentClick(event) {
3421
+ const target = event.target;
3422
+ if (target instanceof HTMLImageElement && this.editable()) {
3423
+ const range = this.doc.createRange();
3424
+ range.selectNode(target);
3425
+ const selection = this.doc.getSelection();
3426
+ selection?.removeAllRanges();
3427
+ selection?.addRange(range);
3428
+ }
3429
+ }
3430
+ onPaste(event) {
3431
+ if (!event.clipboardData) return;
3432
+ event.preventDefault();
3433
+ this.insertTransfer(event.clipboardData);
3434
+ }
3435
+ onDrop(event) {
3436
+ if (!event.dataTransfer) return;
3437
+ event.preventDefault();
3438
+ const range = this.doc.caretRangeFromPoint?.(event.clientX, event.clientY);
3439
+ if (range) {
3440
+ const selection = this.doc.getSelection();
3441
+ selection?.removeAllRanges();
3442
+ selection?.addRange(range);
3443
+ }
3444
+ this.insertTransfer(event.dataTransfer);
3445
+ }
3446
+ onSelectionChange() {
3447
+ const selection = this.doc.getSelection();
3448
+ const el = this.ready ? this.content().nativeElement : null;
3449
+ if (!el || !selection?.rangeCount || !el.contains(selection.anchorNode)) return;
3450
+ this.savedRange = selection.getRangeAt(0).cloneRange();
3451
+ this.updateState();
3452
+ }
3453
+ onFocusOut(event) {
3454
+ const next = event.relatedTarget;
3455
+ if (next && this.host.nativeElement.contains(next)) return;
3456
+ this.focused.set(false);
3457
+ this.onTouched();
3458
+ }
3459
+ writeValue(value) {
3460
+ this.value.set(typeof value === "string" ? value : "");
3461
+ }
3462
+ registerOnChange(fn) {
3463
+ this.onChange = fn;
3464
+ }
3465
+ registerOnTouched(fn) {
3466
+ this.onTouched = fn;
3467
+ }
3468
+ setDisabledState(disabled) {
3469
+ this.formDisabled.set(disabled);
3470
+ }
3471
+ exec(command, arg) {
3472
+ if (!this.editable()) return;
3473
+ this.restoreSelection();
3474
+ this.command(command, arg);
3475
+ this.emit();
3476
+ }
3477
+ command(command, arg) {
3478
+ this.doc.execCommand(command, false, arg);
3479
+ }
3480
+ captureSelection() {
3481
+ const selection = this.doc.getSelection();
3482
+ const el = this.content().nativeElement;
3483
+ if (selection?.rangeCount && el.contains(selection.anchorNode)) this.savedRange = selection.getRangeAt(0).cloneRange();
3484
+ }
3485
+ restoreSelection() {
3486
+ const el = this.content().nativeElement;
3487
+ this.captureSelection();
3488
+ el.focus({ preventScroll: true });
3489
+ if (this.savedRange && el.contains(this.savedRange.commonAncestorContainer)) {
3490
+ const selection = this.doc.getSelection();
3491
+ selection?.removeAllRanges();
3492
+ selection?.addRange(this.savedRange);
3493
+ }
3494
+ }
3495
+ cleanInlineStyles() {
3496
+ const text = this.allowedText();
3497
+ const highlight = this.allowedHighlight();
3498
+ this.content().nativeElement.querySelectorAll("[style]").forEach((el) => {
3499
+ const keep = [];
3500
+ if (el.tagName === "SPAN") {
3501
+ const color = el.style.color;
3502
+ const background = el.style.backgroundColor;
3503
+ if (color && text.has(this.normalizeColor(color))) keep.push(`color: ${color}`);
3504
+ if (background && highlight.has(this.normalizeColor(background))) keep.push(`background-color: ${background}`);
3505
+ }
3506
+ if (keep.length) el.setAttribute("style", keep.join("; "));
3507
+ else el.removeAttribute("style");
3508
+ });
3509
+ }
3510
+ normalizeColor(value) {
3511
+ const probe = this.doc.createElement("span");
3512
+ probe.style.color = value;
3513
+ return probe.style.color.replace(/\s+/g, "");
3514
+ }
3515
+ insertTransfer(data) {
3516
+ if (!this.editable()) return;
3517
+ const image = Array.from(data.files ?? []).find((f) => f.type.startsWith("image/"));
3518
+ if (image) {
3519
+ this.uploadImage(image);
3520
+ return;
3521
+ }
3522
+ const html = data.getData("text/html");
3523
+ const clean = html ? huSanitizeHtml(html, this.doc) : textToHtml(data.getData("text/plain"));
3524
+ if (clean) this.command("insertHTML", clean);
3525
+ this.emit();
3526
+ }
3527
+ emit() {
3528
+ this.cleanInlineStyles();
3529
+ const html = this.serialize();
3530
+ this.updateDerived();
3531
+ this.updateState();
3532
+ if (html === this.lastEmitted) return;
3533
+ this.lastEmitted = html;
3534
+ this.value.set(html);
3535
+ this.onChange(html);
3536
+ }
3537
+ applyExternal(value) {
3538
+ if (value === this.lastEmitted) return;
3539
+ const clean = huSanitizeHtml(value ?? "", this.doc);
3540
+ this.content().nativeElement.innerHTML = clean;
3541
+ this.cleanInlineStyles();
3542
+ this.lastEmitted = this.serialize();
3543
+ this.updateDerived();
3544
+ }
3545
+ serialize() {
3546
+ const el = this.content().nativeElement;
3547
+ if (!(el.textContent?.trim() ?? "") && !el.querySelector("li, img")) return "";
3548
+ return huSanitizeHtml(el.innerHTML, this.doc);
3549
+ }
3550
+ updateDerived() {
3551
+ const el = this.content().nativeElement;
3552
+ const text = el.textContent ?? "";
3553
+ this.isEmpty.set(!text.trim() && !el.querySelector("li, img"));
3554
+ this.counts.set({
3555
+ chars: text.length,
3556
+ words: text.trim() ? text.trim().split(/\s+/).length : 0
3557
+ });
3558
+ }
3559
+ updateState() {
3560
+ const state = (cmd) => {
3561
+ try {
3562
+ return this.doc.queryCommandState(cmd);
3563
+ } catch {
3564
+ return false;
3565
+ }
3566
+ };
3567
+ const active = /* @__PURE__ */ new Set();
3568
+ if (state("bold")) active.add("bold");
3569
+ if (state("italic")) active.add("italic");
3570
+ if (state("underline")) active.add("underline");
3571
+ if (state("strikeThrough")) active.add("strike");
3572
+ if (state("insertUnorderedList")) active.add("bulletList");
3573
+ if (state("insertOrderedList")) active.add("orderedList");
3574
+ let block = "p";
3575
+ let node = this.doc.getSelection()?.anchorNode ?? null;
3576
+ const root = this.content().nativeElement;
3577
+ while (node && node !== root) {
3578
+ if (node instanceof HTMLElement) {
3579
+ const tag = node.tagName;
3580
+ if (tag === "BLOCKQUOTE") active.add("blockquote");
3581
+ if (tag === "PRE") active.add("codeBlock");
3582
+ if (tag === "A") active.add("link");
3583
+ if ((tag === "H1" || tag === "H2" || tag === "H3") && block === "p") block = tag.toLowerCase();
3584
+ }
3585
+ node = node.parentNode;
3586
+ }
3587
+ this.active.set(active);
3588
+ this.block.set(block);
3589
+ }
3590
+ selectionAnchor() {
3591
+ let node = this.savedRange?.commonAncestorContainer ?? null;
3592
+ const root = this.content().nativeElement;
3593
+ while (node && node !== root) {
3594
+ if (node instanceof HTMLAnchorElement) return node;
3595
+ node = node.parentNode;
3596
+ }
3597
+ return null;
3598
+ }
3599
+ resolveControl() {
3600
+ if (this.ngControl === void 0) this.ngControl = this.injector.get(NgControl, null, {
3601
+ self: true,
3602
+ optional: true
3603
+ });
3604
+ return this.ngControl;
3605
+ }
3606
+ static ɵfac = i0.ɵɵngDeclareFactory({
3607
+ minVersion: "12.0.0",
3608
+ version: "22.2.0",
3609
+ ngImport: i0,
3610
+ type: HuEditor,
3611
+ deps: [],
3612
+ target: i0.ɵɵFactoryTarget.Component
3613
+ });
3614
+ static ɵcmp = i0.ɵɵngDeclareComponent({
3615
+ minVersion: "17.0.0",
3616
+ version: "22.2.0",
3617
+ type: HuEditor,
3618
+ isStandalone: true,
3619
+ selector: "hu-editor",
3620
+ inputs: {
3621
+ value: {
3622
+ classPropertyName: "value",
3623
+ publicName: "value",
3624
+ isSignal: true,
3625
+ isRequired: false,
3626
+ transformFunction: null
3627
+ },
3628
+ placeholder: {
3629
+ classPropertyName: "placeholder",
3630
+ publicName: "placeholder",
3631
+ isSignal: true,
3632
+ isRequired: false,
3633
+ transformFunction: null
3634
+ },
3635
+ toolbar: {
3636
+ classPropertyName: "toolbar",
3637
+ publicName: "toolbar",
3638
+ isSignal: true,
3639
+ isRequired: false,
3640
+ transformFunction: null
3641
+ },
3642
+ readonly: {
3643
+ classPropertyName: "readonly",
3644
+ publicName: "readonly",
3645
+ isSignal: true,
3646
+ isRequired: false,
3647
+ transformFunction: null
3648
+ },
3649
+ disabled: {
3650
+ classPropertyName: "disabled",
3651
+ publicName: "disabled",
3652
+ isSignal: true,
3653
+ isRequired: false,
3654
+ transformFunction: null
3655
+ },
3656
+ showCount: {
3657
+ classPropertyName: "showCount",
3658
+ publicName: "showCount",
3659
+ isSignal: true,
3660
+ isRequired: false,
3661
+ transformFunction: null
3662
+ },
3663
+ ariaLabel: {
3664
+ classPropertyName: "ariaLabel",
3665
+ publicName: "ariaLabel",
3666
+ isSignal: true,
3667
+ isRequired: false,
3668
+ transformFunction: null
3669
+ },
3670
+ id: {
3671
+ classPropertyName: "id",
3672
+ publicName: "id",
3673
+ isSignal: true,
3674
+ isRequired: false,
3675
+ transformFunction: null
3676
+ },
3677
+ textColors: {
3678
+ classPropertyName: "textColors",
3679
+ publicName: "textColors",
3680
+ isSignal: true,
3681
+ isRequired: false,
3682
+ transformFunction: null
3683
+ },
3684
+ highlightColors: {
3685
+ classPropertyName: "highlightColors",
3686
+ publicName: "highlightColors",
3687
+ isSignal: true,
3688
+ isRequired: false,
3689
+ transformFunction: null
3690
+ },
3691
+ imageUpload: {
3692
+ classPropertyName: "imageUpload",
3693
+ publicName: "imageUpload",
3694
+ isSignal: true,
3695
+ isRequired: false,
3696
+ transformFunction: null
3697
+ },
3698
+ maxImageSize: {
3699
+ classPropertyName: "maxImageSize",
3700
+ publicName: "maxImageSize",
3701
+ isSignal: true,
3702
+ isRequired: false,
3703
+ transformFunction: null
3704
+ }
3705
+ },
3706
+ outputs: { value: "valueChange" },
3707
+ host: {
3708
+ listeners: {
3709
+ "focusin": "focused.set(true)",
3710
+ "focusout": "onFocusOut($event)",
3711
+ "document:selectionchange": "onSelectionChange()"
3712
+ },
3713
+ properties: {
3714
+ "class.hu-editor--focused": "focused()",
3715
+ "class.hu-editor--disabled": "isDisabled()",
3716
+ "class.hu-editor--readonly": "readonly()",
3717
+ "class.hu-editor--invalid": "isInvalid()"
3718
+ },
3719
+ classAttribute: "hu-editor"
3720
+ },
3721
+ providers: [{
3722
+ provide: NG_VALUE_ACCESSOR,
3723
+ useExisting: forwardRef(() => HuEditor),
3724
+ multi: true
3725
+ }, {
3726
+ provide: HuFormFieldControl,
3727
+ useExisting: forwardRef(() => HuEditor)
3728
+ }],
3729
+ viewQueries: [
3730
+ {
3731
+ propertyName: "content",
3732
+ first: true,
3733
+ predicate: ["content"],
3734
+ descendants: true,
3735
+ isSignal: true
3736
+ },
3737
+ {
3738
+ propertyName: "panelInput",
3739
+ first: true,
3740
+ predicate: ["panelInput"],
3741
+ descendants: true,
3742
+ isSignal: true
3743
+ },
3744
+ {
3745
+ propertyName: "fileInput",
3746
+ first: true,
3747
+ predicate: ["fileInput"],
3748
+ descendants: true,
3749
+ isSignal: true
3750
+ }
3751
+ ],
3752
+ ngImport: i0,
3753
+ template: "@if (!readonly()) {\n <div class=\"hu-editor__toolbar\" role=\"toolbar\" aria-label=\"Biçimlendirme\" [attr.aria-controls]=\"id()\">\n @for (tool of toolbar(); track $index) {\n @if (tool === '|') {\n <span class=\"hu-editor__sep\" role=\"separator\"></span>\n } @else if (tool === 'heading') {\n <select\n class=\"hu-input hu-editor__block\"\n data-size=\"sm\"\n aria-label=\"Paragraf biçimi\"\n [disabled]=\"!editable()\"\n (change)=\"setBlock($any($event.target).value)\"\n >\n @for (b of blocks; track b.value) {\n <option [value]=\"b.value\" [selected]=\"b.value === block()\">{{ b.label }}</option>\n }\n </select>\n } @else {\n @let b = buttons[tool];\n <button\n type=\"button\"\n class=\"hu-editor__btn\"\n [class.hu-editor__btn--active]=\"active().has(tool) || panel() === tool\"\n [attr.aria-pressed]=\"isToggle(tool) ? active().has(tool) : null\"\n [attr.aria-expanded]=\"isPanelTool(tool) ? panel() === tool : null\"\n [attr.aria-label]=\"b.label\"\n [attr.title]=\"b.shortcut ? b.label + ' (' + b.shortcut + ')' : b.label\"\n [disabled]=\"!editable()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"run(tool)\"\n >\n <hu-icon [name]=\"b.icon\" [size]=\"16\" />\n @if (tool === 'textColor') {\n <span class=\"hu-editor__btn-swatch\" [style.background]=\"lastTextColor() ?? 'currentColor'\"></span>\n } @else if (tool === 'highlight') {\n <span class=\"hu-editor__btn-swatch\" [style.background]=\"lastHighlight() ?? 'transparent'\"></span>\n }\n </button>\n }\n }\n </div>\n}\n\n@switch (panel()) {\n @case ('link') {\n <div class=\"hu-editor__panel\" (keydown.escape)=\"$event.stopPropagation(); closePanel()\">\n <hu-icon class=\"hu-editor__panel-icon\" name=\"link\" [size]=\"14\" />\n <input\n #panelInput\n class=\"hu-input\"\n data-size=\"sm\"\n type=\"text\"\n inputmode=\"url\"\n placeholder=\"https://ornek.com\"\n aria-label=\"Link adresi\"\n [class.hu-input--invalid]=\"!!panelError()\"\n [attr.aria-invalid]=\"!!panelError() || null\"\n [value]=\"linkUrl()\"\n (input)=\"linkUrl.set($any($event.target).value); panelError.set('')\"\n (keydown.enter)=\"$event.preventDefault(); applyLink()\"\n />\n <button hu-button size=\"sm\" type=\"button\" (click)=\"applyLink()\">Uygula</button>\n @if (hasLink()) {\n <button hu-button size=\"sm\" variant=\"ghost\" color=\"danger\" type=\"button\" (click)=\"removeLink()\">\n <hu-icon name=\"unlink\" [size]=\"14\" /> Kaldır\n </button>\n }\n <ng-container *ngTemplateOutlet=\"closeBtn\" />\n </div>\n }\n @case ('image') {\n <div class=\"hu-editor__panel\" (keydown.escape)=\"$event.stopPropagation(); closePanel()\">\n <hu-icon class=\"hu-editor__panel-icon\" name=\"image\" [size]=\"14\" />\n <input\n #panelInput\n class=\"hu-input hu-editor__panel-grow\"\n data-size=\"sm\"\n type=\"text\"\n inputmode=\"url\"\n placeholder=\"Görsel adresi (https://…)\"\n aria-label=\"Görsel adresi\"\n [class.hu-input--invalid]=\"!!panelError()\"\n [value]=\"imageUrl()\"\n [disabled]=\"uploading()\"\n (input)=\"imageUrl.set($any($event.target).value); panelError.set('')\"\n (keydown.enter)=\"$event.preventDefault(); insertImageFromUrl()\"\n />\n <input\n class=\"hu-input hu-editor__panel-alt\"\n data-size=\"sm\"\n type=\"text\"\n placeholder=\"Açıklama (alt)\"\n aria-label=\"Görsel açıklaması\"\n [value]=\"imageAlt()\"\n [disabled]=\"uploading()\"\n (input)=\"imageAlt.set($any($event.target).value)\"\n (keydown.enter)=\"$event.preventDefault(); insertImageFromUrl()\"\n />\n <button hu-button size=\"sm\" type=\"button\" [disabled]=\"uploading() || !imageUrl().trim()\" (click)=\"insertImageFromUrl()\">\n Ekle\n </button>\n <button hu-button size=\"sm\" variant=\"outline\" type=\"button\" [disabled]=\"uploading()\" (click)=\"chooseFile()\">\n @if (uploading()) {\n <hu-spinner size=\"sm\" /> Yükleniyor…\n } @else {\n <hu-icon name=\"upload\" [size]=\"14\" /> Dosya seç\n }\n </button>\n <ng-container *ngTemplateOutlet=\"closeBtn\" />\n </div>\n }\n @case ('textColor') {\n <ng-container *ngTemplateOutlet=\"colors; context: { kind: 'textColor', list: textColors(), label: 'Yazı rengi' }\" />\n }\n @case ('highlight') {\n <ng-container *ngTemplateOutlet=\"colors; context: { kind: 'highlight', list: highlightColors(), label: 'Vurgu rengi' }\" />\n }\n}\n@if (panel() && panelError()) {\n <div class=\"hu-editor__panel-error\" role=\"alert\">{{ panelError() }}</div>\n}\n\n<ng-template #colors let-kind=\"kind\" let-list=\"list\" let-label=\"label\">\n <div\n class=\"hu-editor__panel\"\n role=\"group\"\n [attr.aria-label]=\"label\"\n (keydown.escape)=\"$event.stopPropagation(); closePanel()\"\n >\n <span class=\"hu-editor__panel-label\">{{ label }}</span>\n <div class=\"hu-editor__swatches\">\n @for (c of list; track c.value) {\n <button\n type=\"button\"\n class=\"hu-editor__swatch\"\n [class.hu-editor__swatch--text]=\"kind === 'textColor'\"\n [style.--hu-swatch]=\"c.value\"\n [attr.aria-label]=\"c.label\"\n [attr.title]=\"c.label\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"applyColor(kind, c.value)\"\n >\n @if (kind === 'textColor') {\n A\n }\n </button>\n }\n </div>\n <button\n hu-button\n size=\"sm\"\n variant=\"ghost\"\n type=\"button\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"applyColor(kind, null)\"\n >\n <hu-icon name=\"eraser\" [size]=\"14\" /> Rengi kaldır\n </button>\n <ng-container *ngTemplateOutlet=\"closeBtn\" />\n </div>\n</ng-template>\n\n<ng-template #closeBtn>\n <button hu-button size=\"sm\" variant=\"ghost\" iconOnly type=\"button\" aria-label=\"Kapat\" class=\"hu-editor__panel-close\" (click)=\"closePanel()\">\n <hu-icon name=\"x\" [size]=\"14\" />\n </button>\n</ng-template>\n\n<input #fileInput type=\"file\" accept=\"image/png,image/jpeg,image/gif,image/webp\" hidden (change)=\"onFileChosen($event)\" />\n\n<!-- İçerik Angular tarafından değil, editör tarafından yönetilir (innerHTML) -->\n<div\n #content\n class=\"hu-editor__content\"\n role=\"textbox\"\n aria-multiline=\"true\"\n spellcheck=\"true\"\n [id]=\"id()\"\n [attr.contenteditable]=\"editable() ? 'true' : 'false'\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.data-placeholder]=\"placeholder()\"\n [attr.data-empty]=\"isEmpty()\"\n (input)=\"onInput()\"\n (focus)=\"onFocus()\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"onContentClick($event)\"\n (paste)=\"onPaste($event)\"\n (drop)=\"onDrop($event)\"\n></div>\n\n@if (showCount()) {\n <div class=\"hu-editor__footer\" aria-live=\"polite\">{{ counts().words }} kelime · {{ counts().chars }} karakter</div>\n}\n",
3754
+ styles: ["@charset \"UTF-8\";.hu-editor{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-editor--focused{border-color:var(--hu-primary);box-shadow:var(--hu-ring)}.hu-editor--invalid,.hu-editor--invalid.hu-editor--focused{border-color:var(--hu-danger)}.hu-editor--invalid.hu-editor--focused{box-shadow:var(--hu-ring-danger)}.hu-editor--disabled{background:var(--hu-surface-3);box-shadow:none}.hu-editor--disabled .hu-editor__content{color:var(--hu-text-subtle);cursor:not-allowed}.hu-editor--readonly{background:var(--hu-surface-2);box-shadow:none}.hu-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:var(--hu-space-1) var(--hu-space-2);background:var(--hu-surface-2);border-bottom:1px solid var(--hu-border)}.hu-editor__sep{width:1px;height:1.25rem;margin:0 var(--hu-space-1);background:var(--hu-border-strong)}.hu-editor__block{width:auto;min-width:7.5rem;margin-right:var(--hu-space-1);box-shadow:none}.hu-editor__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;color:var(--hu-text-muted);background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;transition:background-color var(--hu-transition),color var(--hu-transition)}.hu-editor__btn:hover:not(:disabled){color:var(--hu-text);background:var(--hu-surface-3)}.hu-editor__btn:focus-visible{outline:none;box-shadow:var(--hu-ring)}.hu-editor__btn--active,.hu-editor__btn--active:hover:not(:disabled){color:var(--hu-primary-soft-fg);background:var(--hu-primary-soft)}.hu-editor__btn:disabled{opacity:.45;cursor:not-allowed}.hu-editor__btn{position:relative}.hu-editor__btn-swatch{position:absolute;left:.5rem;right:.5rem;bottom:.3rem;height:3px;border-radius:2px;box-shadow:inset 0 0 0 1px var(--hu-border)}.hu-editor__panel{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-2);background:var(--hu-surface-2);border-bottom:1px solid var(--hu-border)}.hu-editor__panel>.hu-input{flex:1 1 14rem;width:auto}.hu-editor__panel>.hu-editor__panel-alt{flex:1 1 9rem}.hu-editor__panel-icon{color:var(--hu-text-subtle)}.hu-editor__panel-label{font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-muted)}.hu-editor__panel-close{margin-left:auto}.hu-editor__panel-error{padding:var(--hu-space-1) var(--hu-space-3);font-size:var(--hu-text-xs);color:var(--hu-danger);background:var(--hu-surface-2);border-bottom:1px solid var(--hu-border)}.hu-editor__swatches{display:flex;flex-wrap:wrap;gap:var(--hu-space-1)}.hu-editor__swatch{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;font-size:var(--hu-text-sm);font-weight:700;color:var(--hu-text);background:var(--hu-swatch);border:1px solid var(--hu-border);border-radius:var(--hu-radius-sm);cursor:pointer;transition:transform var(--hu-transition)}.hu-editor__swatch:hover{transform:scale(1.1)}.hu-editor__swatch:focus-visible{outline:none;box-shadow:var(--hu-ring)}.hu-editor__swatch--text{color:var(--hu-swatch);background:var(--hu-surface)}.hu-editor__content{position:relative;min-height:var(--hu-editor-min-height, 10rem);max-height:var(--hu-editor-max-height, 32rem);overflow-y:auto;padding:var(--hu-space-3) var(--hu-space-4);font-size:var(--hu-text-sm);line-height:1.65;color:var(--hu-text);overflow-wrap:anywhere;outline:none}.hu-editor__content[data-empty=true]:before{content:attr(data-placeholder);position:absolute;color:var(--hu-text-subtle);pointer-events:none}.hu-editor__content>:first-child{margin-top:0}.hu-editor__content>:last-child{margin-bottom:0}.hu-editor__content p{margin:0 0 var(--hu-space-2)}.hu-editor__content h1,.hu-editor__content h2,.hu-editor__content h3{margin:var(--hu-space-4) 0 var(--hu-space-2);line-height:1.3}.hu-editor__content h1{font-size:var(--hu-text-2xl)}.hu-editor__content h2{font-size:var(--hu-text-xl)}.hu-editor__content h3{font-size:var(--hu-text-lg)}.hu-editor__content ul,.hu-editor__content ol{margin:0 0 var(--hu-space-2);padding-left:var(--hu-space-6)}.hu-editor__content blockquote{margin:0 0 var(--hu-space-2);padding:var(--hu-space-1) var(--hu-space-4);color:var(--hu-text-muted);border-left:3px solid var(--hu-primary)}.hu-editor__content pre{margin:0 0 var(--hu-space-2);padding:var(--hu-space-3) var(--hu-space-4);overflow-x:auto;font-family:var(--hu-font-mono);font-size:.8125rem;white-space:pre-wrap;background:var(--hu-surface-3);border-radius:var(--hu-radius-md)}.hu-editor__content code{font-family:var(--hu-font-mono);font-size:.875em}.hu-editor__content a{color:var(--hu-primary);text-decoration:underline;text-underline-offset:2px}.hu-editor__content img{display:inline-block;max-width:100%;height:auto;vertical-align:bottom;border-radius:var(--hu-radius-md)}.hu-editor__content span[style*=background]{padding:0 2px;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.hu-editor__content[contenteditable=true] img{cursor:pointer}.hu-editor__content[contenteditable=true] img:hover{outline:2px solid var(--hu-primary-soft)}.hu-editor__footer{padding:var(--hu-space-1) var(--hu-space-4);font-size:var(--hu-text-xs);color:var(--hu-text-subtle);text-align:right;border-top:1px solid var(--hu-border)}\n"],
3755
+ dependencies: [
3756
+ {
3757
+ kind: "directive",
3758
+ type: NgTemplateOutlet,
3759
+ selector: "[ngTemplateOutlet]",
3760
+ inputs: [
3761
+ "ngTemplateOutletContext",
3762
+ "ngTemplateOutlet",
3763
+ "ngTemplateOutletInjector"
3764
+ ]
3765
+ },
3766
+ {
3767
+ kind: "component",
3768
+ type: HuButton,
3769
+ selector: "button[hu-button], a[hu-button]",
3770
+ inputs: [
3771
+ "variant",
3772
+ "color",
3773
+ "size",
3774
+ "disabled",
3775
+ "loading",
3776
+ "block",
3777
+ "iconOnly",
3778
+ "pill"
3779
+ ]
3780
+ },
3781
+ {
3782
+ kind: "component",
3783
+ type: HuIcon,
3784
+ selector: "hu-icon",
3785
+ inputs: [
3786
+ "name",
3787
+ "size",
3788
+ "strokeWidth",
3789
+ "label"
3790
+ ]
3791
+ },
3792
+ {
3793
+ kind: "component",
3794
+ type: HuSpinner,
3795
+ selector: "hu-spinner",
3796
+ inputs: ["size", "label"]
3797
+ }
3798
+ ],
3799
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3800
+ encapsulation: i0.ViewEncapsulation.None
3801
+ });
3802
+ };
3803
+ i0.ɵɵngDeclareClassMetadata({
3804
+ minVersion: "12.0.0",
3805
+ version: "22.2.0",
3806
+ ngImport: i0,
3807
+ type: HuEditor,
3808
+ decorators: [{
3809
+ type: Component,
3810
+ args: [{
3811
+ selector: "hu-editor",
3812
+ imports: [
3813
+ NgTemplateOutlet,
3814
+ HuButton,
3815
+ HuIcon,
3816
+ HuSpinner
3817
+ ],
3818
+ providers: [{
3819
+ provide: NG_VALUE_ACCESSOR,
3820
+ useExisting: forwardRef(() => HuEditor),
3821
+ multi: true
3822
+ }, {
3823
+ provide: HuFormFieldControl,
3824
+ useExisting: forwardRef(() => HuEditor)
3825
+ }],
3826
+ host: {
3827
+ class: "hu-editor",
3828
+ "[class.hu-editor--focused]": "focused()",
3829
+ "[class.hu-editor--disabled]": "isDisabled()",
3830
+ "[class.hu-editor--readonly]": "readonly()",
3831
+ "[class.hu-editor--invalid]": "isInvalid()",
3832
+ "(focusin)": "focused.set(true)",
3833
+ "(focusout)": "onFocusOut($event)",
3834
+ "(document:selectionchange)": "onSelectionChange()"
3835
+ },
3836
+ encapsulation: ViewEncapsulation.None,
3837
+ changeDetection: ChangeDetectionStrategy.OnPush,
3838
+ template: "@if (!readonly()) {\n <div class=\"hu-editor__toolbar\" role=\"toolbar\" aria-label=\"Biçimlendirme\" [attr.aria-controls]=\"id()\">\n @for (tool of toolbar(); track $index) {\n @if (tool === '|') {\n <span class=\"hu-editor__sep\" role=\"separator\"></span>\n } @else if (tool === 'heading') {\n <select\n class=\"hu-input hu-editor__block\"\n data-size=\"sm\"\n aria-label=\"Paragraf biçimi\"\n [disabled]=\"!editable()\"\n (change)=\"setBlock($any($event.target).value)\"\n >\n @for (b of blocks; track b.value) {\n <option [value]=\"b.value\" [selected]=\"b.value === block()\">{{ b.label }}</option>\n }\n </select>\n } @else {\n @let b = buttons[tool];\n <button\n type=\"button\"\n class=\"hu-editor__btn\"\n [class.hu-editor__btn--active]=\"active().has(tool) || panel() === tool\"\n [attr.aria-pressed]=\"isToggle(tool) ? active().has(tool) : null\"\n [attr.aria-expanded]=\"isPanelTool(tool) ? panel() === tool : null\"\n [attr.aria-label]=\"b.label\"\n [attr.title]=\"b.shortcut ? b.label + ' (' + b.shortcut + ')' : b.label\"\n [disabled]=\"!editable()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"run(tool)\"\n >\n <hu-icon [name]=\"b.icon\" [size]=\"16\" />\n @if (tool === 'textColor') {\n <span class=\"hu-editor__btn-swatch\" [style.background]=\"lastTextColor() ?? 'currentColor'\"></span>\n } @else if (tool === 'highlight') {\n <span class=\"hu-editor__btn-swatch\" [style.background]=\"lastHighlight() ?? 'transparent'\"></span>\n }\n </button>\n }\n }\n </div>\n}\n\n@switch (panel()) {\n @case ('link') {\n <div class=\"hu-editor__panel\" (keydown.escape)=\"$event.stopPropagation(); closePanel()\">\n <hu-icon class=\"hu-editor__panel-icon\" name=\"link\" [size]=\"14\" />\n <input\n #panelInput\n class=\"hu-input\"\n data-size=\"sm\"\n type=\"text\"\n inputmode=\"url\"\n placeholder=\"https://ornek.com\"\n aria-label=\"Link adresi\"\n [class.hu-input--invalid]=\"!!panelError()\"\n [attr.aria-invalid]=\"!!panelError() || null\"\n [value]=\"linkUrl()\"\n (input)=\"linkUrl.set($any($event.target).value); panelError.set('')\"\n (keydown.enter)=\"$event.preventDefault(); applyLink()\"\n />\n <button hu-button size=\"sm\" type=\"button\" (click)=\"applyLink()\">Uygula</button>\n @if (hasLink()) {\n <button hu-button size=\"sm\" variant=\"ghost\" color=\"danger\" type=\"button\" (click)=\"removeLink()\">\n <hu-icon name=\"unlink\" [size]=\"14\" /> Kaldır\n </button>\n }\n <ng-container *ngTemplateOutlet=\"closeBtn\" />\n </div>\n }\n @case ('image') {\n <div class=\"hu-editor__panel\" (keydown.escape)=\"$event.stopPropagation(); closePanel()\">\n <hu-icon class=\"hu-editor__panel-icon\" name=\"image\" [size]=\"14\" />\n <input\n #panelInput\n class=\"hu-input hu-editor__panel-grow\"\n data-size=\"sm\"\n type=\"text\"\n inputmode=\"url\"\n placeholder=\"Görsel adresi (https://…)\"\n aria-label=\"Görsel adresi\"\n [class.hu-input--invalid]=\"!!panelError()\"\n [value]=\"imageUrl()\"\n [disabled]=\"uploading()\"\n (input)=\"imageUrl.set($any($event.target).value); panelError.set('')\"\n (keydown.enter)=\"$event.preventDefault(); insertImageFromUrl()\"\n />\n <input\n class=\"hu-input hu-editor__panel-alt\"\n data-size=\"sm\"\n type=\"text\"\n placeholder=\"Açıklama (alt)\"\n aria-label=\"Görsel açıklaması\"\n [value]=\"imageAlt()\"\n [disabled]=\"uploading()\"\n (input)=\"imageAlt.set($any($event.target).value)\"\n (keydown.enter)=\"$event.preventDefault(); insertImageFromUrl()\"\n />\n <button hu-button size=\"sm\" type=\"button\" [disabled]=\"uploading() || !imageUrl().trim()\" (click)=\"insertImageFromUrl()\">\n Ekle\n </button>\n <button hu-button size=\"sm\" variant=\"outline\" type=\"button\" [disabled]=\"uploading()\" (click)=\"chooseFile()\">\n @if (uploading()) {\n <hu-spinner size=\"sm\" /> Yükleniyor…\n } @else {\n <hu-icon name=\"upload\" [size]=\"14\" /> Dosya seç\n }\n </button>\n <ng-container *ngTemplateOutlet=\"closeBtn\" />\n </div>\n }\n @case ('textColor') {\n <ng-container *ngTemplateOutlet=\"colors; context: { kind: 'textColor', list: textColors(), label: 'Yazı rengi' }\" />\n }\n @case ('highlight') {\n <ng-container *ngTemplateOutlet=\"colors; context: { kind: 'highlight', list: highlightColors(), label: 'Vurgu rengi' }\" />\n }\n}\n@if (panel() && panelError()) {\n <div class=\"hu-editor__panel-error\" role=\"alert\">{{ panelError() }}</div>\n}\n\n<ng-template #colors let-kind=\"kind\" let-list=\"list\" let-label=\"label\">\n <div\n class=\"hu-editor__panel\"\n role=\"group\"\n [attr.aria-label]=\"label\"\n (keydown.escape)=\"$event.stopPropagation(); closePanel()\"\n >\n <span class=\"hu-editor__panel-label\">{{ label }}</span>\n <div class=\"hu-editor__swatches\">\n @for (c of list; track c.value) {\n <button\n type=\"button\"\n class=\"hu-editor__swatch\"\n [class.hu-editor__swatch--text]=\"kind === 'textColor'\"\n [style.--hu-swatch]=\"c.value\"\n [attr.aria-label]=\"c.label\"\n [attr.title]=\"c.label\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"applyColor(kind, c.value)\"\n >\n @if (kind === 'textColor') {\n A\n }\n </button>\n }\n </div>\n <button\n hu-button\n size=\"sm\"\n variant=\"ghost\"\n type=\"button\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"applyColor(kind, null)\"\n >\n <hu-icon name=\"eraser\" [size]=\"14\" /> Rengi kaldır\n </button>\n <ng-container *ngTemplateOutlet=\"closeBtn\" />\n </div>\n</ng-template>\n\n<ng-template #closeBtn>\n <button hu-button size=\"sm\" variant=\"ghost\" iconOnly type=\"button\" aria-label=\"Kapat\" class=\"hu-editor__panel-close\" (click)=\"closePanel()\">\n <hu-icon name=\"x\" [size]=\"14\" />\n </button>\n</ng-template>\n\n<input #fileInput type=\"file\" accept=\"image/png,image/jpeg,image/gif,image/webp\" hidden (change)=\"onFileChosen($event)\" />\n\n<!-- İçerik Angular tarafından değil, editör tarafından yönetilir (innerHTML) -->\n<div\n #content\n class=\"hu-editor__content\"\n role=\"textbox\"\n aria-multiline=\"true\"\n spellcheck=\"true\"\n [id]=\"id()\"\n [attr.contenteditable]=\"editable() ? 'true' : 'false'\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.data-placeholder]=\"placeholder()\"\n [attr.data-empty]=\"isEmpty()\"\n (input)=\"onInput()\"\n (focus)=\"onFocus()\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"onContentClick($event)\"\n (paste)=\"onPaste($event)\"\n (drop)=\"onDrop($event)\"\n></div>\n\n@if (showCount()) {\n <div class=\"hu-editor__footer\" aria-live=\"polite\">{{ counts().words }} kelime · {{ counts().chars }} karakter</div>\n}\n",
3839
+ styles: ["@charset \"UTF-8\";.hu-editor{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-editor--focused{border-color:var(--hu-primary);box-shadow:var(--hu-ring)}.hu-editor--invalid,.hu-editor--invalid.hu-editor--focused{border-color:var(--hu-danger)}.hu-editor--invalid.hu-editor--focused{box-shadow:var(--hu-ring-danger)}.hu-editor--disabled{background:var(--hu-surface-3);box-shadow:none}.hu-editor--disabled .hu-editor__content{color:var(--hu-text-subtle);cursor:not-allowed}.hu-editor--readonly{background:var(--hu-surface-2);box-shadow:none}.hu-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:var(--hu-space-1) var(--hu-space-2);background:var(--hu-surface-2);border-bottom:1px solid var(--hu-border)}.hu-editor__sep{width:1px;height:1.25rem;margin:0 var(--hu-space-1);background:var(--hu-border-strong)}.hu-editor__block{width:auto;min-width:7.5rem;margin-right:var(--hu-space-1);box-shadow:none}.hu-editor__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;color:var(--hu-text-muted);background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;transition:background-color var(--hu-transition),color var(--hu-transition)}.hu-editor__btn:hover:not(:disabled){color:var(--hu-text);background:var(--hu-surface-3)}.hu-editor__btn:focus-visible{outline:none;box-shadow:var(--hu-ring)}.hu-editor__btn--active,.hu-editor__btn--active:hover:not(:disabled){color:var(--hu-primary-soft-fg);background:var(--hu-primary-soft)}.hu-editor__btn:disabled{opacity:.45;cursor:not-allowed}.hu-editor__btn{position:relative}.hu-editor__btn-swatch{position:absolute;left:.5rem;right:.5rem;bottom:.3rem;height:3px;border-radius:2px;box-shadow:inset 0 0 0 1px var(--hu-border)}.hu-editor__panel{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-2);background:var(--hu-surface-2);border-bottom:1px solid var(--hu-border)}.hu-editor__panel>.hu-input{flex:1 1 14rem;width:auto}.hu-editor__panel>.hu-editor__panel-alt{flex:1 1 9rem}.hu-editor__panel-icon{color:var(--hu-text-subtle)}.hu-editor__panel-label{font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-muted)}.hu-editor__panel-close{margin-left:auto}.hu-editor__panel-error{padding:var(--hu-space-1) var(--hu-space-3);font-size:var(--hu-text-xs);color:var(--hu-danger);background:var(--hu-surface-2);border-bottom:1px solid var(--hu-border)}.hu-editor__swatches{display:flex;flex-wrap:wrap;gap:var(--hu-space-1)}.hu-editor__swatch{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;font-size:var(--hu-text-sm);font-weight:700;color:var(--hu-text);background:var(--hu-swatch);border:1px solid var(--hu-border);border-radius:var(--hu-radius-sm);cursor:pointer;transition:transform var(--hu-transition)}.hu-editor__swatch:hover{transform:scale(1.1)}.hu-editor__swatch:focus-visible{outline:none;box-shadow:var(--hu-ring)}.hu-editor__swatch--text{color:var(--hu-swatch);background:var(--hu-surface)}.hu-editor__content{position:relative;min-height:var(--hu-editor-min-height, 10rem);max-height:var(--hu-editor-max-height, 32rem);overflow-y:auto;padding:var(--hu-space-3) var(--hu-space-4);font-size:var(--hu-text-sm);line-height:1.65;color:var(--hu-text);overflow-wrap:anywhere;outline:none}.hu-editor__content[data-empty=true]:before{content:attr(data-placeholder);position:absolute;color:var(--hu-text-subtle);pointer-events:none}.hu-editor__content>:first-child{margin-top:0}.hu-editor__content>:last-child{margin-bottom:0}.hu-editor__content p{margin:0 0 var(--hu-space-2)}.hu-editor__content h1,.hu-editor__content h2,.hu-editor__content h3{margin:var(--hu-space-4) 0 var(--hu-space-2);line-height:1.3}.hu-editor__content h1{font-size:var(--hu-text-2xl)}.hu-editor__content h2{font-size:var(--hu-text-xl)}.hu-editor__content h3{font-size:var(--hu-text-lg)}.hu-editor__content ul,.hu-editor__content ol{margin:0 0 var(--hu-space-2);padding-left:var(--hu-space-6)}.hu-editor__content blockquote{margin:0 0 var(--hu-space-2);padding:var(--hu-space-1) var(--hu-space-4);color:var(--hu-text-muted);border-left:3px solid var(--hu-primary)}.hu-editor__content pre{margin:0 0 var(--hu-space-2);padding:var(--hu-space-3) var(--hu-space-4);overflow-x:auto;font-family:var(--hu-font-mono);font-size:.8125rem;white-space:pre-wrap;background:var(--hu-surface-3);border-radius:var(--hu-radius-md)}.hu-editor__content code{font-family:var(--hu-font-mono);font-size:.875em}.hu-editor__content a{color:var(--hu-primary);text-decoration:underline;text-underline-offset:2px}.hu-editor__content img{display:inline-block;max-width:100%;height:auto;vertical-align:bottom;border-radius:var(--hu-radius-md)}.hu-editor__content span[style*=background]{padding:0 2px;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.hu-editor__content[contenteditable=true] img{cursor:pointer}.hu-editor__content[contenteditable=true] img:hover{outline:2px solid var(--hu-primary-soft)}.hu-editor__footer{padding:var(--hu-space-1) var(--hu-space-4);font-size:var(--hu-text-xs);color:var(--hu-text-subtle);text-align:right;border-top:1px solid var(--hu-border)}\n"]
3840
+ }]
3841
+ }],
3842
+ ctorParameters: () => [],
3843
+ propDecorators: {
3844
+ value: [{
3845
+ type: i0.Input,
3846
+ args: [{
3847
+ isSignal: true,
3848
+ alias: "value",
3849
+ required: false
3850
+ }]
3851
+ }, {
3852
+ type: i0.Output,
3853
+ args: ["valueChange"]
3854
+ }],
3855
+ placeholder: [{
3856
+ type: i0.Input,
3857
+ args: [{
3858
+ isSignal: true,
3859
+ alias: "placeholder",
3860
+ required: false
3861
+ }]
3862
+ }],
3863
+ toolbar: [{
3864
+ type: i0.Input,
3865
+ args: [{
3866
+ isSignal: true,
3867
+ alias: "toolbar",
3868
+ required: false
3869
+ }]
3870
+ }],
3871
+ readonly: [{
3872
+ type: i0.Input,
3873
+ args: [{
3874
+ isSignal: true,
3875
+ alias: "readonly",
3876
+ required: false
3877
+ }]
3878
+ }],
3879
+ disabled: [{
3880
+ type: i0.Input,
3881
+ args: [{
3882
+ isSignal: true,
3883
+ alias: "disabled",
3884
+ required: false
3885
+ }]
3886
+ }],
3887
+ showCount: [{
3888
+ type: i0.Input,
3889
+ args: [{
3890
+ isSignal: true,
3891
+ alias: "showCount",
3892
+ required: false
3893
+ }]
3894
+ }],
3895
+ ariaLabel: [{
3896
+ type: i0.Input,
3897
+ args: [{
3898
+ isSignal: true,
3899
+ alias: "ariaLabel",
3900
+ required: false
3901
+ }]
3902
+ }],
3903
+ id: [{
3904
+ type: i0.Input,
3905
+ args: [{
3906
+ isSignal: true,
3907
+ alias: "id",
3908
+ required: false
3909
+ }]
3910
+ }],
3911
+ textColors: [{
3912
+ type: i0.Input,
3913
+ args: [{
3914
+ isSignal: true,
3915
+ alias: "textColors",
3916
+ required: false
3917
+ }]
3918
+ }],
3919
+ highlightColors: [{
3920
+ type: i0.Input,
3921
+ args: [{
3922
+ isSignal: true,
3923
+ alias: "highlightColors",
3924
+ required: false
3925
+ }]
3926
+ }],
3927
+ imageUpload: [{
3928
+ type: i0.Input,
3929
+ args: [{
3930
+ isSignal: true,
3931
+ alias: "imageUpload",
3932
+ required: false
3933
+ }]
3934
+ }],
3935
+ maxImageSize: [{
3936
+ type: i0.Input,
3937
+ args: [{
3938
+ isSignal: true,
3939
+ alias: "maxImageSize",
3940
+ required: false
3941
+ }]
3942
+ }],
3943
+ content: [{
3944
+ type: i0.ViewChild,
3945
+ args: ["content", { isSignal: true }]
3946
+ }],
3947
+ panelInput: [{
3948
+ type: i0.ViewChild,
3949
+ args: ["panelInput", { isSignal: true }]
3950
+ }],
3951
+ fileInput: [{
3952
+ type: i0.ViewChild,
3953
+ args: ["fileInput", { isSignal: true }]
3954
+ }]
3955
+ }
3956
+ });
3957
+ function escapeHtml(text) {
3958
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3959
+ }
3960
+ function textToHtml(text) {
3961
+ if (!text) return "";
3962
+ return text.replace(/\r\n?/g, "\n").split(/\n{2,}/).map((p) => `<p>${escapeHtml(p).replace(/\n/g, "<br>")}</p>`).join("");
3963
+ }
3964
+ function readAsDataUrl(file) {
3965
+ return new Promise((resolve, reject) => {
3966
+ const reader = new FileReader();
3967
+ reader.onload = () => resolve(String(reader.result));
3968
+ reader.onerror = () => reject(reader.error);
3969
+ reader.readAsDataURL(file);
3970
+ });
3971
+ }
2764
3972
  const HU_STATUS_ICONS = {
2765
3973
  info: "info",
2766
3974
  success: "check-circle",
@@ -5105,16 +6313,33 @@ var HuDropdown = class HuDropdown {
5105
6313
  customTrigger = contentChild(HuDropdownTrigger, ...ngDevMode ? [{ debugName: "customTrigger" }] : /* istanbul ignore next */ []);
5106
6314
  isDivider = isDropdownDivider;
5107
6315
  isHeader = isDropdownHeader;
6316
+ supportsPopover = typeof HTMLElement !== "undefined" && "showPopover" in HTMLElement.prototype;
6317
+ panel = viewChild.required("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
6318
+ focusOnOpen = false;
5108
6319
  typeahead = "";
5109
6320
  typeaheadTimer;
6321
+ constructor() {
6322
+ effect(() => {
6323
+ const open = this.open();
6324
+ afterNextRender(() => this.syncPanel(open), { injector: this.injector });
6325
+ });
6326
+ const win = this.host.nativeElement.ownerDocument.defaultView;
6327
+ const reposition = () => this.open() && this.positionPanel();
6328
+ win?.addEventListener("resize", reposition);
6329
+ win?.addEventListener("scroll", reposition, true);
6330
+ inject(DestroyRef).onDestroy(() => {
6331
+ win?.removeEventListener("resize", reposition);
6332
+ win?.removeEventListener("scroll", reposition, true);
6333
+ });
6334
+ }
5110
6335
  toggle() {
5111
6336
  if (this.open()) this.close();
5112
6337
  else this.show();
5113
6338
  }
5114
6339
  show() {
5115
6340
  if (this.disabled()) return;
6341
+ this.focusOnOpen = true;
5116
6342
  this.open.set(true);
5117
- afterNextRender(() => this.items()[0]?.focus(), { injector: this.injector });
5118
6343
  }
5119
6344
  close(restoreFocus = false) {
5120
6345
  if (!this.open()) return;
@@ -5164,6 +6389,39 @@ var HuDropdown = class HuDropdown {
5164
6389
  }
5165
6390
  return -1;
5166
6391
  }
6392
+ syncPanel(open) {
6393
+ const panel = this.panel().nativeElement;
6394
+ if (this.supportsPopover) {
6395
+ const isOpen = panel.matches(":popover-open");
6396
+ if (open && !isOpen) panel.showPopover();
6397
+ else if (!open && isOpen) panel.hidePopover();
6398
+ }
6399
+ if (!open) return;
6400
+ this.positionPanel();
6401
+ if (this.focusOnOpen) {
6402
+ this.focusOnOpen = false;
6403
+ this.items()[0]?.focus({ preventScroll: true });
6404
+ }
6405
+ }
6406
+ positionPanel() {
6407
+ if (!this.supportsPopover) return;
6408
+ const panel = this.panel().nativeElement;
6409
+ const trigger = this.triggerElement() ?? this.host.nativeElement;
6410
+ const win = this.host.nativeElement.ownerDocument.defaultView;
6411
+ if (!win) return;
6412
+ const anchor = trigger.getBoundingClientRect();
6413
+ const { offsetWidth: width, offsetHeight: height } = panel;
6414
+ const gap = 6;
6415
+ const edge = 8;
6416
+ let left = this.align() === "end" ? anchor.right - width : anchor.left;
6417
+ left = Math.max(edge, Math.min(left, win.innerWidth - width - edge));
6418
+ const below = anchor.bottom + gap;
6419
+ const above = anchor.top - gap - height;
6420
+ const top = below + height <= win.innerHeight - edge || above < edge ? below : above;
6421
+ panel.style.left = `${left}px`;
6422
+ panel.style.top = `${top}px`;
6423
+ panel.dataset["placement"] = top === below ? "bottom" : "top";
6424
+ }
5167
6425
  items() {
5168
6426
  return Array.from(this.host.nativeElement.querySelectorAll(".hu-dropdown__panel .hu-dropdown-item:not(:disabled)"));
5169
6427
  }
@@ -5282,9 +6540,16 @@ var HuDropdown = class HuDropdown {
5282
6540
  descendants: true,
5283
6541
  isSignal: true
5284
6542
  }],
6543
+ viewQueries: [{
6544
+ propertyName: "panel",
6545
+ first: true,
6546
+ predicate: ["panel"],
6547
+ descendants: true,
6548
+ isSignal: true
6549
+ }],
5285
6550
  ngImport: i0,
5286
- template: "@if (!customTrigger()) {\n <button\n hu-button\n type=\"button\"\n class=\"hu-dropdown__trigger\"\n aria-haspopup=\"menu\"\n [variant]=\"variant()\"\n [color]=\"color()\"\n [size]=\"size()\"\n [iconOnly]=\"!!icon() && !label()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (icon()) {\n <hu-icon [name]=\"icon()!\" [size]=\"16\" />\n }\n @if (label()) {\n {{ label() }}\n @if (caret()) {\n <hu-icon class=\"hu-dropdown__caret\" name=\"chevron-down\" [size]=\"16\" />\n }\n }\n </button>\n}\n<ng-content select=\"[huDropdownTrigger]\" />\n\n<div\n class=\"hu-dropdown__panel\"\n role=\"menu\"\n [id]=\"panelId\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.data-align]=\"align()\"\n [hidden]=\"!open()\"\n (keydown)=\"onPanelKeydown($event)\"\n>\n <ng-content select=\"[huDropdownHeader]\" />\n\n @for (entry of options(); track $index) {\n @if (isDivider(entry)) {\n <div class=\"hu-dropdown-divider\" role=\"separator\"></div>\n } @else if (isHeader(entry)) {\n <div class=\"hu-dropdown-label\" role=\"presentation\">{{ entry.header }}</div>\n } @else if (entry.link && !entry.disabled) {\n <a\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [routerLink]=\"entry.link\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [disabled]=\"entry.disabled\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </button>\n }\n }\n</div>\n\n<ng-template #itemContent let-entry>\n @if (entry.icon) {\n <hu-icon class=\"hu-dropdown-item__icon\" [name]=\"entry.icon\" [size]=\"16\" />\n }\n <span class=\"hu-dropdown-item__text\">\n <span class=\"hu-dropdown-item__label\">{{ entry.label }}</span>\n @if (entry.description) {\n <span class=\"hu-dropdown-item__description\">{{ entry.description }}</span>\n }\n </span>\n</ng-template>\n",
5287
- styles: [".hu-dropdown{position:relative;display:inline-flex}.hu-dropdown__caret{margin-right:-2px;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-dropdown--open .hu-dropdown__caret{transform:rotate(180deg)}.hu-dropdown__panel{position:absolute;top:calc(100% + 6px);z-index:1000;display:flex;flex-direction:column;min-width:var(--hu-dropdown-min-width, 12rem);max-width:min(var(--hu-dropdown-max-width, 24rem),100vw - 2rem);padding:var(--hu-space-1);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg);animation:hu-dropdown-in .12s ease-out}.hu-dropdown__panel[hidden]{display:none}.hu-dropdown__panel[data-align=start]{left:0}.hu-dropdown__panel[data-align=end]{right:0}.hu-dropdown__header{display:flex;align-items:center;justify-content:space-between;gap:var(--hu-space-3);padding:var(--hu-space-2) var(--hu-space-3)}.hu-dropdown-item{display:flex;align-items:flex-start;gap:var(--hu-space-2);width:100%;padding:var(--hu-space-2) var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);line-height:1.35;color:var(--hu-text);text-align:left;text-decoration:none;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-dropdown-item:hover:not(:disabled),.hu-dropdown-item:focus-visible{outline:none;background:var(--hu-surface-3)}.hu-dropdown-item:disabled{opacity:.5;cursor:not-allowed}.hu-dropdown-item--danger,.hu-dropdown-item--danger .hu-dropdown-item__icon{color:var(--hu-danger)}.hu-dropdown-item--danger:hover:not(:disabled),.hu-dropdown-item--danger:focus-visible{background:var(--hu-danger-soft)}.hu-dropdown-item__icon{margin-top:1px;color:var(--hu-text-subtle)}.hu-dropdown-item__text{display:flex;flex-direction:column;min-width:0}.hu-dropdown-item__description{font-size:var(--hu-text-xs);color:var(--hu-text-subtle)}.hu-dropdown-divider{height:1px;margin:var(--hu-space-1) calc(var(--hu-space-1) * -1);background:var(--hu-border)}.hu-dropdown-label{padding:var(--hu-space-2) var(--hu-space-3) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}@keyframes hu-dropdown-in{0%{opacity:0;transform:translateY(-4px)}}\n"],
6551
+ template: "@if (!customTrigger()) {\n <button\n hu-button\n type=\"button\"\n class=\"hu-dropdown__trigger\"\n aria-haspopup=\"menu\"\n [variant]=\"variant()\"\n [color]=\"color()\"\n [size]=\"size()\"\n [iconOnly]=\"!!icon() && !label()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (icon()) {\n <hu-icon [name]=\"icon()!\" [size]=\"16\" />\n }\n @if (label()) {\n {{ label() }}\n @if (caret()) {\n <hu-icon class=\"hu-dropdown__caret\" name=\"chevron-down\" [size]=\"16\" />\n }\n }\n </button>\n}\n<ng-content select=\"[huDropdownTrigger]\" />\n\n<div\n #panel\n popover=\"manual\"\n class=\"hu-dropdown__panel\"\n role=\"menu\"\n [class.hu-dropdown__panel--inline]=\"!supportsPopover\"\n [id]=\"panelId\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.data-align]=\"align()\"\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\n (keydown)=\"onPanelKeydown($event)\"\n>\n <ng-content select=\"[huDropdownHeader]\" />\n\n @for (entry of options(); track $index) {\n @if (isDivider(entry)) {\n <div class=\"hu-dropdown-divider\" role=\"separator\"></div>\n } @else if (isHeader(entry)) {\n <div class=\"hu-dropdown-label\" role=\"presentation\">{{ entry.header }}</div>\n } @else if (entry.link && !entry.disabled) {\n <a\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [routerLink]=\"entry.link\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [disabled]=\"entry.disabled\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </button>\n }\n }\n</div>\n\n<ng-template #itemContent let-entry>\n @if (entry.icon) {\n <hu-icon class=\"hu-dropdown-item__icon\" [name]=\"entry.icon\" [size]=\"16\" />\n }\n <span class=\"hu-dropdown-item__text\">\n <span class=\"hu-dropdown-item__label\">{{ entry.label }}</span>\n @if (entry.description) {\n <span class=\"hu-dropdown-item__description\">{{ entry.description }}</span>\n }\n </span>\n</ng-template>\n",
6552
+ styles: [".hu-dropdown{position:relative;display:inline-flex}.hu-dropdown__caret{margin-right:-2px;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-dropdown--open .hu-dropdown__caret{transform:rotate(180deg)}.hu-dropdown__panel{position:fixed;inset:auto;margin:0;flex-direction:column;min-width:var(--hu-dropdown-min-width, 12rem);max-width:min(var(--hu-dropdown-max-width, 24rem),100vw - 2rem);max-height:min(var(--hu-dropdown-max-height, 24rem),100dvh - 2rem);overflow-y:auto;padding:var(--hu-space-1);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-dropdown__panel:popover-open{display:flex;animation:hu-dropdown-in .12s ease-out}.hu-dropdown__panel[data-placement=top]:popover-open{animation-name:hu-dropdown-in-up}.hu-dropdown__panel--inline{position:absolute;top:calc(100% + 6px);z-index:1000;display:flex}.hu-dropdown__panel--inline[hidden]{display:none}.hu-dropdown__panel--inline[data-align=start]{left:0}.hu-dropdown__panel--inline[data-align=end]{right:0}.hu-dropdown__header{display:flex;align-items:center;justify-content:space-between;gap:var(--hu-space-3);padding:var(--hu-space-2) var(--hu-space-3)}.hu-dropdown-item{display:flex;align-items:flex-start;gap:var(--hu-space-2);width:100%;padding:var(--hu-space-2) var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);line-height:1.35;color:var(--hu-text);text-align:left;text-decoration:none;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-dropdown-item:hover:not(:disabled),.hu-dropdown-item:focus-visible{outline:none;background:var(--hu-surface-3)}.hu-dropdown-item:disabled{opacity:.5;cursor:not-allowed}.hu-dropdown-item--danger,.hu-dropdown-item--danger .hu-dropdown-item__icon{color:var(--hu-danger)}.hu-dropdown-item--danger:hover:not(:disabled),.hu-dropdown-item--danger:focus-visible{background:var(--hu-danger-soft)}.hu-dropdown-item__icon{margin-top:1px;color:var(--hu-text-subtle)}.hu-dropdown-item__text{display:flex;flex-direction:column;min-width:0}.hu-dropdown-item__description{font-size:var(--hu-text-xs);color:var(--hu-text-subtle)}.hu-dropdown-divider{height:1px;margin:var(--hu-space-1) calc(var(--hu-space-1) * -1);background:var(--hu-border)}.hu-dropdown-label{padding:var(--hu-space-2) var(--hu-space-3) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}@keyframes hu-dropdown-in{0%{opacity:0;transform:translateY(-4px)}}@keyframes hu-dropdown-in-up{0%{opacity:0;transform:translateY(4px)}}\n"],
5288
6553
  dependencies: [
5289
6554
  {
5290
6555
  kind: "directive",
@@ -5369,10 +6634,11 @@ i0.ɵɵngDeclareClassMetadata({
5369
6634
  },
5370
6635
  encapsulation: ViewEncapsulation.None,
5371
6636
  changeDetection: ChangeDetectionStrategy.OnPush,
5372
- template: "@if (!customTrigger()) {\n <button\n hu-button\n type=\"button\"\n class=\"hu-dropdown__trigger\"\n aria-haspopup=\"menu\"\n [variant]=\"variant()\"\n [color]=\"color()\"\n [size]=\"size()\"\n [iconOnly]=\"!!icon() && !label()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (icon()) {\n <hu-icon [name]=\"icon()!\" [size]=\"16\" />\n }\n @if (label()) {\n {{ label() }}\n @if (caret()) {\n <hu-icon class=\"hu-dropdown__caret\" name=\"chevron-down\" [size]=\"16\" />\n }\n }\n </button>\n}\n<ng-content select=\"[huDropdownTrigger]\" />\n\n<div\n class=\"hu-dropdown__panel\"\n role=\"menu\"\n [id]=\"panelId\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.data-align]=\"align()\"\n [hidden]=\"!open()\"\n (keydown)=\"onPanelKeydown($event)\"\n>\n <ng-content select=\"[huDropdownHeader]\" />\n\n @for (entry of options(); track $index) {\n @if (isDivider(entry)) {\n <div class=\"hu-dropdown-divider\" role=\"separator\"></div>\n } @else if (isHeader(entry)) {\n <div class=\"hu-dropdown-label\" role=\"presentation\">{{ entry.header }}</div>\n } @else if (entry.link && !entry.disabled) {\n <a\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [routerLink]=\"entry.link\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [disabled]=\"entry.disabled\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </button>\n }\n }\n</div>\n\n<ng-template #itemContent let-entry>\n @if (entry.icon) {\n <hu-icon class=\"hu-dropdown-item__icon\" [name]=\"entry.icon\" [size]=\"16\" />\n }\n <span class=\"hu-dropdown-item__text\">\n <span class=\"hu-dropdown-item__label\">{{ entry.label }}</span>\n @if (entry.description) {\n <span class=\"hu-dropdown-item__description\">{{ entry.description }}</span>\n }\n </span>\n</ng-template>\n",
5373
- styles: [".hu-dropdown{position:relative;display:inline-flex}.hu-dropdown__caret{margin-right:-2px;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-dropdown--open .hu-dropdown__caret{transform:rotate(180deg)}.hu-dropdown__panel{position:absolute;top:calc(100% + 6px);z-index:1000;display:flex;flex-direction:column;min-width:var(--hu-dropdown-min-width, 12rem);max-width:min(var(--hu-dropdown-max-width, 24rem),100vw - 2rem);padding:var(--hu-space-1);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg);animation:hu-dropdown-in .12s ease-out}.hu-dropdown__panel[hidden]{display:none}.hu-dropdown__panel[data-align=start]{left:0}.hu-dropdown__panel[data-align=end]{right:0}.hu-dropdown__header{display:flex;align-items:center;justify-content:space-between;gap:var(--hu-space-3);padding:var(--hu-space-2) var(--hu-space-3)}.hu-dropdown-item{display:flex;align-items:flex-start;gap:var(--hu-space-2);width:100%;padding:var(--hu-space-2) var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);line-height:1.35;color:var(--hu-text);text-align:left;text-decoration:none;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-dropdown-item:hover:not(:disabled),.hu-dropdown-item:focus-visible{outline:none;background:var(--hu-surface-3)}.hu-dropdown-item:disabled{opacity:.5;cursor:not-allowed}.hu-dropdown-item--danger,.hu-dropdown-item--danger .hu-dropdown-item__icon{color:var(--hu-danger)}.hu-dropdown-item--danger:hover:not(:disabled),.hu-dropdown-item--danger:focus-visible{background:var(--hu-danger-soft)}.hu-dropdown-item__icon{margin-top:1px;color:var(--hu-text-subtle)}.hu-dropdown-item__text{display:flex;flex-direction:column;min-width:0}.hu-dropdown-item__description{font-size:var(--hu-text-xs);color:var(--hu-text-subtle)}.hu-dropdown-divider{height:1px;margin:var(--hu-space-1) calc(var(--hu-space-1) * -1);background:var(--hu-border)}.hu-dropdown-label{padding:var(--hu-space-2) var(--hu-space-3) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}@keyframes hu-dropdown-in{0%{opacity:0;transform:translateY(-4px)}}\n"]
6637
+ template: "@if (!customTrigger()) {\n <button\n hu-button\n type=\"button\"\n class=\"hu-dropdown__trigger\"\n aria-haspopup=\"menu\"\n [variant]=\"variant()\"\n [color]=\"color()\"\n [size]=\"size()\"\n [iconOnly]=\"!!icon() && !label()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (icon()) {\n <hu-icon [name]=\"icon()!\" [size]=\"16\" />\n }\n @if (label()) {\n {{ label() }}\n @if (caret()) {\n <hu-icon class=\"hu-dropdown__caret\" name=\"chevron-down\" [size]=\"16\" />\n }\n }\n </button>\n}\n<ng-content select=\"[huDropdownTrigger]\" />\n\n<div\n #panel\n popover=\"manual\"\n class=\"hu-dropdown__panel\"\n role=\"menu\"\n [class.hu-dropdown__panel--inline]=\"!supportsPopover\"\n [id]=\"panelId\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.data-align]=\"align()\"\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\n (keydown)=\"onPanelKeydown($event)\"\n>\n <ng-content select=\"[huDropdownHeader]\" />\n\n @for (entry of options(); track $index) {\n @if (isDivider(entry)) {\n <div class=\"hu-dropdown-divider\" role=\"separator\"></div>\n } @else if (isHeader(entry)) {\n <div class=\"hu-dropdown-label\" role=\"presentation\">{{ entry.header }}</div>\n } @else if (entry.link && !entry.disabled) {\n <a\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [routerLink]=\"entry.link\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"hu-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n [class.hu-dropdown-item--danger]=\"entry.danger\"\n [disabled]=\"entry.disabled\"\n (click)=\"choose(entry)\"\n >\n <ng-container *ngTemplateOutlet=\"itemContent; context: { $implicit: entry }\" />\n </button>\n }\n }\n</div>\n\n<ng-template #itemContent let-entry>\n @if (entry.icon) {\n <hu-icon class=\"hu-dropdown-item__icon\" [name]=\"entry.icon\" [size]=\"16\" />\n }\n <span class=\"hu-dropdown-item__text\">\n <span class=\"hu-dropdown-item__label\">{{ entry.label }}</span>\n @if (entry.description) {\n <span class=\"hu-dropdown-item__description\">{{ entry.description }}</span>\n }\n </span>\n</ng-template>\n",
6638
+ styles: [".hu-dropdown{position:relative;display:inline-flex}.hu-dropdown__caret{margin-right:-2px;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-dropdown--open .hu-dropdown__caret{transform:rotate(180deg)}.hu-dropdown__panel{position:fixed;inset:auto;margin:0;flex-direction:column;min-width:var(--hu-dropdown-min-width, 12rem);max-width:min(var(--hu-dropdown-max-width, 24rem),100vw - 2rem);max-height:min(var(--hu-dropdown-max-height, 24rem),100dvh - 2rem);overflow-y:auto;padding:var(--hu-space-1);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-dropdown__panel:popover-open{display:flex;animation:hu-dropdown-in .12s ease-out}.hu-dropdown__panel[data-placement=top]:popover-open{animation-name:hu-dropdown-in-up}.hu-dropdown__panel--inline{position:absolute;top:calc(100% + 6px);z-index:1000;display:flex}.hu-dropdown__panel--inline[hidden]{display:none}.hu-dropdown__panel--inline[data-align=start]{left:0}.hu-dropdown__panel--inline[data-align=end]{right:0}.hu-dropdown__header{display:flex;align-items:center;justify-content:space-between;gap:var(--hu-space-3);padding:var(--hu-space-2) var(--hu-space-3)}.hu-dropdown-item{display:flex;align-items:flex-start;gap:var(--hu-space-2);width:100%;padding:var(--hu-space-2) var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);line-height:1.35;color:var(--hu-text);text-align:left;text-decoration:none;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-dropdown-item:hover:not(:disabled),.hu-dropdown-item:focus-visible{outline:none;background:var(--hu-surface-3)}.hu-dropdown-item:disabled{opacity:.5;cursor:not-allowed}.hu-dropdown-item--danger,.hu-dropdown-item--danger .hu-dropdown-item__icon{color:var(--hu-danger)}.hu-dropdown-item--danger:hover:not(:disabled),.hu-dropdown-item--danger:focus-visible{background:var(--hu-danger-soft)}.hu-dropdown-item__icon{margin-top:1px;color:var(--hu-text-subtle)}.hu-dropdown-item__text{display:flex;flex-direction:column;min-width:0}.hu-dropdown-item__description{font-size:var(--hu-text-xs);color:var(--hu-text-subtle)}.hu-dropdown-divider{height:1px;margin:var(--hu-space-1) calc(var(--hu-space-1) * -1);background:var(--hu-border)}.hu-dropdown-label{padding:var(--hu-space-2) var(--hu-space-3) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}@keyframes hu-dropdown-in{0%{opacity:0;transform:translateY(-4px)}}@keyframes hu-dropdown-in-up{0%{opacity:0;transform:translateY(4px)}}\n"]
5374
6639
  }]
5375
6640
  }],
6641
+ ctorParameters: () => [],
5376
6642
  propDecorators: {
5377
6643
  options: [{
5378
6644
  type: i0.Input,
@@ -5472,11 +6738,17 @@ i0.ɵɵngDeclareClassMetadata({
5472
6738
  customTrigger: [{
5473
6739
  type: i0.ContentChild,
5474
6740
  args: [i0.forwardRef(() => HuDropdownTrigger), { isSignal: true }]
6741
+ }],
6742
+ panel: [{
6743
+ type: i0.ViewChild,
6744
+ args: ["panel", { isSignal: true }]
5475
6745
  }]
5476
6746
  }
5477
6747
  });
5478
6748
  var HuSidebarNav = class HuSidebarNav {
5479
6749
  router = inject(Router);
6750
+ host = inject(ElementRef);
6751
+ injector = inject(Injector);
5480
6752
  groups = input([], ...ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []);
5481
6753
  collapsed = input(false, {
5482
6754
  ...ngDevMode ? { debugName: "collapsed" } : /* istanbul ignore next */ {},
@@ -5487,15 +6759,27 @@ var HuSidebarNav = class HuSidebarNav {
5487
6759
  url = toSignal(this.router.events.pipe(filter((e) => e instanceof NavigationEnd), map((e) => e.urlAfterRedirects)), { initialValue: this.router.url });
5488
6760
  openItems = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "openItems" }] : /* istanbul ignore next */ []);
5489
6761
  constructor() {
6762
+ effect(() => {
6763
+ const expanded = this.groups().flatMap((g) => g.items).filter((item) => item.expanded && item.children?.length);
6764
+ if (expanded.length) untracked(() => this.openItems.update((set) => /* @__PURE__ */ new Set([...set, ...expanded])));
6765
+ });
5490
6766
  effect(() => {
5491
6767
  const url = this.url();
5492
6768
  const parents = this.groups().flatMap((g) => g.items).filter((item) => this.isParentActive(item, url));
5493
6769
  if (parents.length) untracked(() => this.openItems.update((set) => /* @__PURE__ */ new Set([...set, ...parents])));
5494
6770
  });
6771
+ effect(() => {
6772
+ this.url();
6773
+ afterNextRender(() => setTimeout(() => this.host.nativeElement.querySelector(".hu-nav__link--active")?.scrollIntoView({ block: "nearest" })), { injector: this.injector });
6774
+ });
5495
6775
  }
5496
6776
  isParentActive(item, url = this.url()) {
5497
6777
  const path = url.split(/[?#]/)[0];
5498
- return !!item.children?.some((c) => c.link && (path === c.link || path.startsWith(c.link + "/")));
6778
+ const matches = (c) => !!c.link && (path === c.link || path.startsWith(c.link + "/")) || !!c.children?.some(matches);
6779
+ return !!item.children?.some(matches);
6780
+ }
6781
+ isTextBadge(badge) {
6782
+ return typeof badge === "string" && Number.isNaN(Number(badge));
5499
6783
  }
5500
6784
  toggle(item) {
5501
6785
  if (this.collapsed()) {
@@ -5549,8 +6833,18 @@ var HuSidebarNav = class HuSidebarNav {
5549
6833
  classAttribute: "hu-nav"
5550
6834
  },
5551
6835
  ngImport: i0,
5552
- template: "@for (group of groups(); track $index) {\n <div class=\"hu-nav__group\">\n @if (group.title) {\n <div class=\"hu-nav__title\">{{ group.title }}</div>\n }\n <ul class=\"hu-nav__list\">\n @for (item of group.items; track item.label) {\n <li>\n @if (item.children?.length) {\n @let open = openItems().has(item) && !collapsed();\n <button\n type=\"button\"\n class=\"hu-nav__link\"\n [class.hu-nav__link--parent-active]=\"isParentActive(item)\"\n [attr.aria-expanded]=\"open\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"toggle(item)\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n <hu-icon class=\"hu-nav__chevron\" name=\"chevron-down\" [size]=\"16\" />\n </button>\n @if (open) {\n <ul class=\"hu-nav__sublist\">\n @for (child of item.children; track child.label) {\n <li>\n <a\n class=\"hu-nav__link hu-nav__link--sub\"\n [routerLink]=\"child.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: child.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n (click)=\"navigate.emit()\"\n >\n <span class=\"hu-nav__label\">{{ child.label }}</span>\n @if (child.badge != null) {\n <span class=\"hu-nav__badge\">{{ child.badge }}</span>\n }\n </a>\n </li>\n }\n </ul>\n }\n } @else {\n <a\n class=\"hu-nav__link\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: item.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"navigate.emit()\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n @if (item.badge != null) {\n <span class=\"hu-nav__badge\">{{ item.badge }}</span>\n }\n </a>\n }\n </li>\n }\n </ul>\n </div>\n}\n",
6836
+ template: "@for (group of groups(); track $index) {\n <div class=\"hu-nav__group\">\n @if (group.title) {\n <div class=\"hu-nav__title\">{{ group.title }}</div>\n }\n <ul class=\"hu-nav__list\">\n @for (item of group.items; track item.label) {\n <li>\n @if (item.children?.length) {\n @let open = openItems().has(item) && !collapsed();\n <button\n type=\"button\"\n class=\"hu-nav__link\"\n [class.hu-nav__link--parent-active]=\"isParentActive(item)\"\n [attr.aria-expanded]=\"open\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"toggle(item)\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n <hu-icon class=\"hu-nav__chevron\" name=\"chevron-down\" [size]=\"16\" />\n </button>\n @if (open) {\n <ul class=\"hu-nav__sublist\">\n @for (child of item.children; track child.label) {\n @if (child.children?.length) {\n <!-- Kategori başlığı + altındaki linkler -->\n <li class=\"hu-nav__subheader\" role=\"presentation\">{{ child.label }}</li>\n @for (leaf of child.children; track leaf.label) {\n <li><ng-container *ngTemplateOutlet=\"subLink; context: { $implicit: leaf }\" /></li>\n }\n } @else {\n <li><ng-container *ngTemplateOutlet=\"subLink; context: { $implicit: child }\" /></li>\n }\n }\n </ul>\n }\n } @else {\n <a\n class=\"hu-nav__link\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: item.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"navigate.emit()\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n @if (item.badge != null) {\n <span class=\"hu-nav__badge\" [class.hu-nav__badge--text]=\"isTextBadge(item.badge)\">{{ item.badge }}</span>\n }\n </a>\n }\n </li>\n }\n </ul>\n </div>\n}\n\n<ng-template #subLink let-child>\n <a\n class=\"hu-nav__link hu-nav__link--sub\"\n [routerLink]=\"child.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: child.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n (click)=\"navigate.emit()\"\n >\n <span class=\"hu-nav__label\">{{ child.label }}</span>\n @if (child.badge != null) {\n <span class=\"hu-nav__badge\" [class.hu-nav__badge--text]=\"isTextBadge(child.badge)\">{{ child.badge }}</span>\n }\n </a>\n</ng-template>\n",
5553
6837
  dependencies: [
6838
+ {
6839
+ kind: "directive",
6840
+ type: NgTemplateOutlet,
6841
+ selector: "[ngTemplateOutlet]",
6842
+ inputs: [
6843
+ "ngTemplateOutletContext",
6844
+ "ngTemplateOutlet",
6845
+ "ngTemplateOutletInjector"
6846
+ ]
6847
+ },
5554
6848
  {
5555
6849
  kind: "directive",
5556
6850
  type: RouterLink,
@@ -5608,6 +6902,7 @@ i0.ɵɵngDeclareClassMetadata({
5608
6902
  args: [{
5609
6903
  selector: "hu-sidebar-nav",
5610
6904
  imports: [
6905
+ NgTemplateOutlet,
5611
6906
  RouterLink,
5612
6907
  RouterLinkActive,
5613
6908
  HuIcon
@@ -5618,7 +6913,7 @@ i0.ɵɵngDeclareClassMetadata({
5618
6913
  },
5619
6914
  encapsulation: ViewEncapsulation.None,
5620
6915
  changeDetection: ChangeDetectionStrategy.OnPush,
5621
- template: "@for (group of groups(); track $index) {\n <div class=\"hu-nav__group\">\n @if (group.title) {\n <div class=\"hu-nav__title\">{{ group.title }}</div>\n }\n <ul class=\"hu-nav__list\">\n @for (item of group.items; track item.label) {\n <li>\n @if (item.children?.length) {\n @let open = openItems().has(item) && !collapsed();\n <button\n type=\"button\"\n class=\"hu-nav__link\"\n [class.hu-nav__link--parent-active]=\"isParentActive(item)\"\n [attr.aria-expanded]=\"open\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"toggle(item)\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n <hu-icon class=\"hu-nav__chevron\" name=\"chevron-down\" [size]=\"16\" />\n </button>\n @if (open) {\n <ul class=\"hu-nav__sublist\">\n @for (child of item.children; track child.label) {\n <li>\n <a\n class=\"hu-nav__link hu-nav__link--sub\"\n [routerLink]=\"child.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: child.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n (click)=\"navigate.emit()\"\n >\n <span class=\"hu-nav__label\">{{ child.label }}</span>\n @if (child.badge != null) {\n <span class=\"hu-nav__badge\">{{ child.badge }}</span>\n }\n </a>\n </li>\n }\n </ul>\n }\n } @else {\n <a\n class=\"hu-nav__link\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: item.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"navigate.emit()\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n @if (item.badge != null) {\n <span class=\"hu-nav__badge\">{{ item.badge }}</span>\n }\n </a>\n }\n </li>\n }\n </ul>\n </div>\n}\n"
6916
+ template: "@for (group of groups(); track $index) {\n <div class=\"hu-nav__group\">\n @if (group.title) {\n <div class=\"hu-nav__title\">{{ group.title }}</div>\n }\n <ul class=\"hu-nav__list\">\n @for (item of group.items; track item.label) {\n <li>\n @if (item.children?.length) {\n @let open = openItems().has(item) && !collapsed();\n <button\n type=\"button\"\n class=\"hu-nav__link\"\n [class.hu-nav__link--parent-active]=\"isParentActive(item)\"\n [attr.aria-expanded]=\"open\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"toggle(item)\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n <hu-icon class=\"hu-nav__chevron\" name=\"chevron-down\" [size]=\"16\" />\n </button>\n @if (open) {\n <ul class=\"hu-nav__sublist\">\n @for (child of item.children; track child.label) {\n @if (child.children?.length) {\n <!-- Kategori başlığı + altındaki linkler -->\n <li class=\"hu-nav__subheader\" role=\"presentation\">{{ child.label }}</li>\n @for (leaf of child.children; track leaf.label) {\n <li><ng-container *ngTemplateOutlet=\"subLink; context: { $implicit: leaf }\" /></li>\n }\n } @else {\n <li><ng-container *ngTemplateOutlet=\"subLink; context: { $implicit: child }\" /></li>\n }\n }\n </ul>\n }\n } @else {\n <a\n class=\"hu-nav__link\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: item.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n [attr.title]=\"collapsed() ? item.label : null\"\n (click)=\"navigate.emit()\"\n >\n @if (item.icon) {\n <hu-icon class=\"hu-nav__icon\" [name]=\"item.icon\" [size]=\"18\" />\n }\n <span class=\"hu-nav__label\">{{ item.label }}</span>\n @if (item.badge != null) {\n <span class=\"hu-nav__badge\" [class.hu-nav__badge--text]=\"isTextBadge(item.badge)\">{{ item.badge }}</span>\n }\n </a>\n }\n </li>\n }\n </ul>\n </div>\n}\n\n<ng-template #subLink let-child>\n <a\n class=\"hu-nav__link hu-nav__link--sub\"\n [routerLink]=\"child.link\"\n routerLinkActive=\"hu-nav__link--active\"\n [routerLinkActiveOptions]=\"{ exact: child.exact ?? false }\"\n ariaCurrentWhenActive=\"page\"\n (click)=\"navigate.emit()\"\n >\n <span class=\"hu-nav__label\">{{ child.label }}</span>\n @if (child.badge != null) {\n <span class=\"hu-nav__badge\" [class.hu-nav__badge--text]=\"isTextBadge(child.badge)\">{{ child.badge }}</span>\n }\n </a>\n</ng-template>\n"
5622
6917
  }]
5623
6918
  }],
5624
6919
  ctorParameters: () => [],
@@ -5878,7 +7173,7 @@ var HuShell = class HuShell {
5878
7173
  },
5879
7174
  ngImport: i0,
5880
7175
  template: "<a class=\"hu-shell__skip\" href=\"#hu-main\">İçeriğe geç</a>\n\n<aside\n class=\"hu-shell__sidebar\"\n [class.hu-shell__sidebar--dark]=\"sidebarTheme() === 'dark'\"\n [attr.aria-hidden]=\"isMobile() && !mobileOpen() ? 'true' : null\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\"\n>\n <a class=\"hu-shell__brand\" [routerLink]=\"brandLink()\">\n <ng-content select=\"[huShellLogo]\">\n <span class=\"hu-shell__logo hu-shell__logo--default\">\n <hu-icon name=\"graduation-cap\" [size]=\"20\" />\n </span>\n </ng-content>\n <span class=\"hu-shell__brand-text\">\n <span class=\"hu-shell__brand-name\">{{ brand() }}</span>\n @if (brandSubtitle()) {\n <span class=\"hu-shell__brand-subtitle\">{{ brandSubtitle() }}</span>\n }\n </span>\n </a>\n\n <nav class=\"hu-shell__nav\" aria-label=\"Ana menü\">\n <hu-sidebar-nav\n [groups]=\"nav()\"\n [collapsed]=\"isCollapsed()\"\n (navigate)=\"mobileOpen.set(false)\"\n (expandRequest)=\"collapsed.set(false)\"\n />\n </nav>\n\n <ng-content select=\"[huSidebarFooter]\" />\n\n @if (!isMobile()) {\n <button\n type=\"button\"\n class=\"hu-shell__collapse\"\n [attr.aria-label]=\"isCollapsed() ? 'Menüyü genişlet' : 'Menüyü daralt'\"\n [attr.title]=\"isCollapsed() ? 'Menüyü genişlet' : 'Menüyü daralt'\"\n (click)=\"toggleSidebar()\"\n >\n <hu-icon [name]=\"isCollapsed() ? 'chevrons-right' : 'chevrons-left'\" [size]=\"16\" />\n <span class=\"hu-nav__label\">Daralt</span>\n </button>\n }\n</aside>\n\n@if (isMobile() && mobileOpen()) {\n <div class=\"hu-shell__backdrop\" aria-hidden=\"true\" (click)=\"mobileOpen.set(false)\"></div>\n}\n\n<div class=\"hu-shell__main\">\n <header class=\"hu-shell__topbar\">\n @if (isMobile()) {\n <button\n hu-button\n variant=\"ghost\"\n iconOnly\n class=\"hu-shell__menu-toggle\"\n aria-label=\"Menüyü aç\"\n [attr.aria-expanded]=\"mobileOpen()\"\n (click)=\"toggleSidebar()\"\n >\n <hu-icon name=\"menu\" [size]=\"20\" />\n </button>\n }\n <ng-content select=\"[huTopbarStart]\" />\n <span class=\"hu-shell__spacer\"></span>\n <ng-content select=\"[huTopbarEnd]\" />\n </header>\n\n <main class=\"hu-shell__content\" id=\"hu-main\" tabindex=\"-1\">\n <ng-content />\n </main>\n</div>\n",
5881
- styles: [".hu-shell{--_sidebar-w: var(--hu-sidebar-width);display:block;min-height:100dvh}.hu-shell--collapsed{--_sidebar-w: var(--hu-sidebar-collapsed-width)}.hu-shell__skip{position:fixed;top:var(--hu-space-2);left:var(--hu-space-2);z-index:1200;padding:var(--hu-space-2) var(--hu-space-4);color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-md);transform:translateY(-200%)}.hu-shell__skip:focus{transform:none}.hu-shell__sidebar{position:fixed;inset:0 auto 0 0;z-index:900;display:flex;flex-direction:column;width:var(--_sidebar-w);color:var(--hu-sidebar-fg);background:var(--hu-sidebar-bg);border-right:1px solid var(--hu-sidebar-border);transition:width .2s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1)}.hu-shell__sidebar--dark{--hu-sidebar-bg: var(--hu-gray-900);--hu-sidebar-fg: var(--hu-gray-300);--hu-sidebar-muted: var(--hu-gray-500);--hu-sidebar-hover: var(--hu-gray-800);--hu-sidebar-active-bg: color-mix(in srgb, var(--hu-red-500) 20%, transparent);--hu-sidebar-active-fg: #fff;--hu-sidebar-border: var(--hu-gray-800)}.hu-shell__brand{display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-4);color:inherit;text-decoration:none;border-bottom:1px solid var(--hu-sidebar-border);overflow:hidden;flex-shrink:0}.hu-shell__logo{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2.25rem;height:2.25rem}.hu-shell__logo--default{color:#fff;background:var(--hu-red-600);border-radius:var(--hu-radius-md)}.hu-shell__brand-text{display:flex;flex-direction:column;min-width:0;line-height:1.2;white-space:nowrap}.hu-shell__brand-name{font-size:.9375rem;font-weight:700;color:var(--hu-text)}.hu-shell__sidebar--dark .hu-shell__brand-name{color:#fff}.hu-shell__brand-subtitle{font-size:var(--hu-text-xs);color:var(--hu-sidebar-muted);overflow:hidden;text-overflow:ellipsis}.hu-shell__nav{flex:1;padding:var(--hu-space-3);overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.hu-shell__sidebar-footer{padding:var(--hu-space-3);border-top:1px solid var(--hu-sidebar-border)}.hu-shell__collapse{display:flex;align-items:center;gap:var(--hu-space-3);height:2.75rem;padding:0 calc(var(--hu-space-3) + var(--hu-space-3) + 1px);font:inherit;font-size:var(--hu-text-sm);color:var(--hu-sidebar-muted);text-align:left;background:none;border:0;border-top:1px solid var(--hu-sidebar-border);cursor:pointer;flex-shrink:0}.hu-shell__collapse:hover{color:var(--hu-sidebar-fg);background:var(--hu-sidebar-hover)}.hu-shell--collapsed .hu-shell__brand{padding:0 calc((var(--hu-sidebar-collapsed-width) - 2.25rem) / 2)}.hu-shell--collapsed .hu-shell__brand-text,.hu-shell--collapsed .hu-shell__collapse .hu-nav__label{display:none}.hu-shell--collapsed .hu-shell__collapse{justify-content:center;padding:0}.hu-shell__main{display:flex;flex-direction:column;min-height:100dvh;margin-left:var(--_sidebar-w);transition:margin-left .2s cubic-bezier(.4,0,.2,1)}.hu-shell__topbar{position:sticky;top:0;z-index:800;display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-6);background:color-mix(in srgb,var(--hu-surface) 85%,transparent);border-bottom:1px solid var(--hu-border);-webkit-backdrop-filter:saturate(180%) blur(8px);backdrop-filter:saturate(180%) blur(8px)}.hu-shell__topbar-start{display:flex;align-items:center;gap:var(--hu-space-3);min-width:0}.hu-shell__spacer{flex:1}.hu-shell__topbar-end{display:flex;align-items:center;gap:var(--hu-space-1);flex-shrink:0}.hu-shell__content{flex:1;width:100%;max-width:var(--hu-content-max-width);margin:0 auto;padding:var(--hu-space-6)}.hu-shell__content:focus{outline:none}.hu-shell--mobile .hu-shell__sidebar{width:min(var(--hu-sidebar-width),85vw);box-shadow:var(--hu-shadow-lg);transform:translate(-100%)}.hu-shell--mobile.hu-shell--drawer-open .hu-shell__sidebar{transform:none}.hu-shell--mobile .hu-shell__main{margin-left:0}.hu-shell--mobile .hu-shell__topbar{padding:0 var(--hu-space-3)}.hu-shell--mobile .hu-shell__content{padding:var(--hu-space-4)}.hu-shell__backdrop{position:fixed;inset:0;z-index:850;background:#0c0c0e73;animation:hu-fade-in .2s ease-out}.hu-nav{display:flex;flex-direction:column;gap:var(--hu-space-4)}.hu-nav__title{padding:0 var(--hu-space-3) var(--hu-space-2);font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--hu-sidebar-muted);white-space:nowrap}.hu-nav__list,.hu-nav__sublist{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.hu-nav__sublist{margin:2px 0 var(--hu-space-1) calc(var(--hu-space-3) + 9px);padding-left:var(--hu-space-3);border-left:1px solid var(--hu-sidebar-border)}.hu-nav__link{position:relative;display:flex;align-items:center;gap:var(--hu-space-3);width:100%;height:2.375rem;padding:0 var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);font-weight:500;color:var(--hu-sidebar-fg);text-align:left;text-decoration:none;white-space:nowrap;background:none;border:0;border-radius:var(--hu-radius-md);cursor:pointer;transition:background-color var(--hu-transition),color var(--hu-transition)}.hu-nav__link:hover{background:var(--hu-sidebar-hover)}.hu-nav__link:focus-visible{outline:2px solid var(--hu-focus);outline-offset:-2px}.hu-nav__link--sub{height:2.125rem;font-weight:400}.hu-nav__link--active,.hu-nav__link--active:hover{color:var(--hu-sidebar-active-fg);background:var(--hu-sidebar-active-bg)}.hu-nav__link--active .hu-nav__icon,.hu-nav__link--active:hover .hu-nav__icon{color:var(--hu-primary)}.hu-nav__link--active:not(.hu-nav__link--sub):before{content:\"\";position:absolute;top:8px;bottom:8px;left:calc(var(--hu-space-3) * -1);width:3px;background:var(--hu-primary);border-radius:0 3px 3px 0}.hu-nav__link--parent-active{color:var(--hu-text)}.hu-shell__sidebar--dark .hu-nav__link--parent-active{color:#fff}.hu-nav__link--parent-active .hu-nav__icon{color:var(--hu-primary)}.hu-nav__icon{color:var(--hu-sidebar-muted);transition:color var(--hu-transition)}.hu-nav__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.hu-nav__chevron{color:var(--hu-sidebar-muted);transition:transform var(--hu-transition)}[aria-expanded=true]>.hu-nav__chevron{transform:rotate(180deg)}.hu-nav__badge{min-width:1.25rem;height:1.25rem;padding:0 .375rem;font-size:.6875rem;font-weight:600;line-height:1.25rem;text-align:center;color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-full)}.hu-nav--collapsed .hu-nav__title{height:1px;margin:0 var(--hu-space-2) var(--hu-space-2);padding:0;overflow:hidden;color:transparent;background:var(--hu-sidebar-border)}.hu-nav--collapsed .hu-nav__link{justify-content:center;padding:0}.hu-nav--collapsed .hu-nav__label,.hu-nav--collapsed .hu-nav__chevron{display:none}.hu-nav--collapsed .hu-nav__badge{position:absolute;top:3px;right:6px;min-width:.5rem;width:.5rem;height:.5rem;padding:0;font-size:0}@keyframes hu-fade-in{0%{opacity:0}}\n"],
7176
+ styles: [".hu-shell{--_sidebar-w: var(--hu-sidebar-width);display:block;min-height:100dvh}.hu-shell--collapsed{--_sidebar-w: var(--hu-sidebar-collapsed-width)}.hu-shell__skip{position:fixed;top:var(--hu-space-2);left:var(--hu-space-2);z-index:1200;padding:var(--hu-space-2) var(--hu-space-4);color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-md);transform:translateY(-200%)}.hu-shell__skip:focus{transform:none}.hu-shell__sidebar{position:fixed;inset:0 auto 0 0;z-index:900;display:flex;flex-direction:column;width:var(--_sidebar-w);color:var(--hu-sidebar-fg);background:var(--hu-sidebar-bg);border-right:1px solid var(--hu-sidebar-border);transition:width .2s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1)}.hu-shell__sidebar--dark{--hu-sidebar-bg: var(--hu-gray-900);--hu-sidebar-fg: var(--hu-gray-300);--hu-sidebar-muted: var(--hu-gray-500);--hu-sidebar-hover: var(--hu-gray-800);--hu-sidebar-active-bg: color-mix(in srgb, var(--hu-red-500) 20%, transparent);--hu-sidebar-active-fg: #fff;--hu-sidebar-border: var(--hu-gray-800)}.hu-shell__brand{display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-4);color:inherit;text-decoration:none;border-bottom:1px solid var(--hu-sidebar-border);overflow:hidden;flex-shrink:0}.hu-shell__logo{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2.25rem;height:2.25rem}.hu-shell__logo--default{color:#fff;background:var(--hu-red-600);border-radius:var(--hu-radius-md)}.hu-shell__brand-text{display:flex;flex-direction:column;min-width:0;line-height:1.2;white-space:nowrap}.hu-shell__brand-name{font-size:.9375rem;font-weight:700;color:var(--hu-text)}.hu-shell__sidebar--dark .hu-shell__brand-name{color:#fff}.hu-shell__brand-subtitle{font-size:var(--hu-text-xs);color:var(--hu-sidebar-muted);overflow:hidden;text-overflow:ellipsis}.hu-shell__nav{flex:1;padding:var(--hu-space-3);overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.hu-shell__sidebar-footer{padding:var(--hu-space-3);border-top:1px solid var(--hu-sidebar-border)}.hu-shell__collapse{display:flex;align-items:center;gap:var(--hu-space-3);height:2.75rem;padding:0 calc(var(--hu-space-3) + var(--hu-space-3) + 1px);font:inherit;font-size:var(--hu-text-sm);color:var(--hu-sidebar-muted);text-align:left;background:none;border:0;border-top:1px solid var(--hu-sidebar-border);cursor:pointer;flex-shrink:0}.hu-shell__collapse:hover{color:var(--hu-sidebar-fg);background:var(--hu-sidebar-hover)}.hu-shell--collapsed .hu-shell__brand{padding:0 calc((var(--hu-sidebar-collapsed-width) - 2.25rem) / 2)}.hu-shell--collapsed .hu-shell__brand-text,.hu-shell--collapsed .hu-shell__collapse .hu-nav__label{display:none}.hu-shell--collapsed .hu-shell__collapse{justify-content:center;padding:0}.hu-shell__main{display:flex;flex-direction:column;min-height:100dvh;margin-left:var(--_sidebar-w);transition:margin-left .2s cubic-bezier(.4,0,.2,1)}.hu-shell__topbar{position:sticky;top:0;z-index:800;display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-6);background:color-mix(in srgb,var(--hu-surface) 85%,transparent);border-bottom:1px solid var(--hu-border);-webkit-backdrop-filter:saturate(180%) blur(8px);backdrop-filter:saturate(180%) blur(8px)}.hu-shell__topbar-start{display:flex;align-items:center;gap:var(--hu-space-3);min-width:0}.hu-shell__spacer{flex:1}.hu-shell__topbar-end{display:flex;align-items:center;gap:var(--hu-space-1);flex-shrink:0}.hu-shell__content{flex:1;width:100%;max-width:var(--hu-content-max-width);margin:0 auto;padding:var(--hu-space-6)}.hu-shell__content:focus{outline:none}.hu-shell--mobile .hu-shell__sidebar{width:min(var(--hu-sidebar-width),85vw);box-shadow:var(--hu-shadow-lg);transform:translate(-100%)}.hu-shell--mobile.hu-shell--drawer-open .hu-shell__sidebar{transform:none}.hu-shell--mobile .hu-shell__main{margin-left:0}.hu-shell--mobile .hu-shell__topbar{padding:0 var(--hu-space-3)}.hu-shell--mobile .hu-shell__content{padding:var(--hu-space-4)}.hu-shell__backdrop{position:fixed;inset:0;z-index:850;background:#0c0c0e73;animation:hu-fade-in .2s ease-out}.hu-nav{display:flex;flex-direction:column;gap:var(--hu-space-4)}.hu-nav__title{padding:0 var(--hu-space-3) var(--hu-space-2);font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--hu-sidebar-muted);white-space:nowrap}.hu-nav__list,.hu-nav__sublist{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.hu-nav__sublist{margin:2px 0 var(--hu-space-1) calc(var(--hu-space-3) + 9px);padding-left:var(--hu-space-3);border-left:1px solid var(--hu-sidebar-border)}.hu-nav__link{position:relative;display:flex;align-items:center;gap:var(--hu-space-3);width:100%;height:2.375rem;padding:0 var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);font-weight:500;color:var(--hu-sidebar-fg);text-align:left;text-decoration:none;white-space:nowrap;background:none;border:0;border-radius:var(--hu-radius-md);cursor:pointer;transition:background-color var(--hu-transition),color var(--hu-transition)}.hu-nav__link:hover{background:var(--hu-sidebar-hover)}.hu-nav__link:focus-visible{outline:2px solid var(--hu-focus);outline-offset:-2px}.hu-nav__link--sub{height:2.125rem;font-weight:400}.hu-nav__link--active,.hu-nav__link--active:hover{color:var(--hu-sidebar-active-fg);background:var(--hu-sidebar-active-bg)}.hu-nav__link--active .hu-nav__icon,.hu-nav__link--active:hover .hu-nav__icon{color:var(--hu-primary)}.hu-nav__link--active:not(.hu-nav__link--sub):before{content:\"\";position:absolute;top:8px;bottom:8px;left:calc(var(--hu-space-3) * -1);width:3px;background:var(--hu-primary);border-radius:0 3px 3px 0}.hu-nav__link--parent-active{color:var(--hu-text)}.hu-shell__sidebar--dark .hu-nav__link--parent-active{color:#fff}.hu-nav__link--parent-active .hu-nav__icon{color:var(--hu-primary)}.hu-nav__icon{color:var(--hu-sidebar-muted);transition:color var(--hu-transition)}.hu-nav__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.hu-nav__chevron{color:var(--hu-sidebar-muted);transition:transform var(--hu-transition)}[aria-expanded=true]>.hu-nav__chevron{transform:rotate(180deg)}.hu-nav__badge{min-width:1.25rem;height:1.25rem;padding:0 .375rem;font-size:.6875rem;font-weight:600;line-height:1.25rem;text-align:center;color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-full)}.hu-nav__badge--text{height:1.125rem;padding:0 .4375rem;font-size:.625rem;font-weight:700;line-height:1.125rem;letter-spacing:.04em;text-transform:uppercase;color:var(--hu-info-fg);background:var(--hu-info-soft);border-radius:var(--hu-radius-sm)}.hu-nav__subheader{padding:var(--hu-space-3) var(--hu-space-3) var(--hu-space-1);font-size:.75rem;font-weight:600;color:var(--hu-text);white-space:nowrap}.hu-shell__sidebar--dark .hu-nav__subheader{color:#fff}.hu-nav__subheader:first-child{padding-top:var(--hu-space-2)}.hu-nav--collapsed .hu-nav__title{height:1px;margin:0 var(--hu-space-2) var(--hu-space-2);padding:0;overflow:hidden;color:transparent;background:var(--hu-sidebar-border)}.hu-nav--collapsed .hu-nav__link{justify-content:center;padding:0}.hu-nav--collapsed .hu-nav__label,.hu-nav--collapsed .hu-nav__chevron{display:none}.hu-nav--collapsed .hu-nav__badge{position:absolute;top:3px;right:6px;min-width:.5rem;width:.5rem;height:.5rem;padding:0;font-size:0}@keyframes hu-fade-in{0%{opacity:0}}\n"],
5882
7177
  dependencies: [
5883
7178
  {
5884
7179
  kind: "directive",
@@ -5962,7 +7257,7 @@ i0.ɵɵngDeclareClassMetadata({
5962
7257
  encapsulation: ViewEncapsulation.None,
5963
7258
  changeDetection: ChangeDetectionStrategy.OnPush,
5964
7259
  template: "<a class=\"hu-shell__skip\" href=\"#hu-main\">İçeriğe geç</a>\n\n<aside\n class=\"hu-shell__sidebar\"\n [class.hu-shell__sidebar--dark]=\"sidebarTheme() === 'dark'\"\n [attr.aria-hidden]=\"isMobile() && !mobileOpen() ? 'true' : null\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\"\n>\n <a class=\"hu-shell__brand\" [routerLink]=\"brandLink()\">\n <ng-content select=\"[huShellLogo]\">\n <span class=\"hu-shell__logo hu-shell__logo--default\">\n <hu-icon name=\"graduation-cap\" [size]=\"20\" />\n </span>\n </ng-content>\n <span class=\"hu-shell__brand-text\">\n <span class=\"hu-shell__brand-name\">{{ brand() }}</span>\n @if (brandSubtitle()) {\n <span class=\"hu-shell__brand-subtitle\">{{ brandSubtitle() }}</span>\n }\n </span>\n </a>\n\n <nav class=\"hu-shell__nav\" aria-label=\"Ana menü\">\n <hu-sidebar-nav\n [groups]=\"nav()\"\n [collapsed]=\"isCollapsed()\"\n (navigate)=\"mobileOpen.set(false)\"\n (expandRequest)=\"collapsed.set(false)\"\n />\n </nav>\n\n <ng-content select=\"[huSidebarFooter]\" />\n\n @if (!isMobile()) {\n <button\n type=\"button\"\n class=\"hu-shell__collapse\"\n [attr.aria-label]=\"isCollapsed() ? 'Menüyü genişlet' : 'Menüyü daralt'\"\n [attr.title]=\"isCollapsed() ? 'Menüyü genişlet' : 'Menüyü daralt'\"\n (click)=\"toggleSidebar()\"\n >\n <hu-icon [name]=\"isCollapsed() ? 'chevrons-right' : 'chevrons-left'\" [size]=\"16\" />\n <span class=\"hu-nav__label\">Daralt</span>\n </button>\n }\n</aside>\n\n@if (isMobile() && mobileOpen()) {\n <div class=\"hu-shell__backdrop\" aria-hidden=\"true\" (click)=\"mobileOpen.set(false)\"></div>\n}\n\n<div class=\"hu-shell__main\">\n <header class=\"hu-shell__topbar\">\n @if (isMobile()) {\n <button\n hu-button\n variant=\"ghost\"\n iconOnly\n class=\"hu-shell__menu-toggle\"\n aria-label=\"Menüyü aç\"\n [attr.aria-expanded]=\"mobileOpen()\"\n (click)=\"toggleSidebar()\"\n >\n <hu-icon name=\"menu\" [size]=\"20\" />\n </button>\n }\n <ng-content select=\"[huTopbarStart]\" />\n <span class=\"hu-shell__spacer\"></span>\n <ng-content select=\"[huTopbarEnd]\" />\n </header>\n\n <main class=\"hu-shell__content\" id=\"hu-main\" tabindex=\"-1\">\n <ng-content />\n </main>\n</div>\n",
5965
- styles: [".hu-shell{--_sidebar-w: var(--hu-sidebar-width);display:block;min-height:100dvh}.hu-shell--collapsed{--_sidebar-w: var(--hu-sidebar-collapsed-width)}.hu-shell__skip{position:fixed;top:var(--hu-space-2);left:var(--hu-space-2);z-index:1200;padding:var(--hu-space-2) var(--hu-space-4);color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-md);transform:translateY(-200%)}.hu-shell__skip:focus{transform:none}.hu-shell__sidebar{position:fixed;inset:0 auto 0 0;z-index:900;display:flex;flex-direction:column;width:var(--_sidebar-w);color:var(--hu-sidebar-fg);background:var(--hu-sidebar-bg);border-right:1px solid var(--hu-sidebar-border);transition:width .2s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1)}.hu-shell__sidebar--dark{--hu-sidebar-bg: var(--hu-gray-900);--hu-sidebar-fg: var(--hu-gray-300);--hu-sidebar-muted: var(--hu-gray-500);--hu-sidebar-hover: var(--hu-gray-800);--hu-sidebar-active-bg: color-mix(in srgb, var(--hu-red-500) 20%, transparent);--hu-sidebar-active-fg: #fff;--hu-sidebar-border: var(--hu-gray-800)}.hu-shell__brand{display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-4);color:inherit;text-decoration:none;border-bottom:1px solid var(--hu-sidebar-border);overflow:hidden;flex-shrink:0}.hu-shell__logo{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2.25rem;height:2.25rem}.hu-shell__logo--default{color:#fff;background:var(--hu-red-600);border-radius:var(--hu-radius-md)}.hu-shell__brand-text{display:flex;flex-direction:column;min-width:0;line-height:1.2;white-space:nowrap}.hu-shell__brand-name{font-size:.9375rem;font-weight:700;color:var(--hu-text)}.hu-shell__sidebar--dark .hu-shell__brand-name{color:#fff}.hu-shell__brand-subtitle{font-size:var(--hu-text-xs);color:var(--hu-sidebar-muted);overflow:hidden;text-overflow:ellipsis}.hu-shell__nav{flex:1;padding:var(--hu-space-3);overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.hu-shell__sidebar-footer{padding:var(--hu-space-3);border-top:1px solid var(--hu-sidebar-border)}.hu-shell__collapse{display:flex;align-items:center;gap:var(--hu-space-3);height:2.75rem;padding:0 calc(var(--hu-space-3) + var(--hu-space-3) + 1px);font:inherit;font-size:var(--hu-text-sm);color:var(--hu-sidebar-muted);text-align:left;background:none;border:0;border-top:1px solid var(--hu-sidebar-border);cursor:pointer;flex-shrink:0}.hu-shell__collapse:hover{color:var(--hu-sidebar-fg);background:var(--hu-sidebar-hover)}.hu-shell--collapsed .hu-shell__brand{padding:0 calc((var(--hu-sidebar-collapsed-width) - 2.25rem) / 2)}.hu-shell--collapsed .hu-shell__brand-text,.hu-shell--collapsed .hu-shell__collapse .hu-nav__label{display:none}.hu-shell--collapsed .hu-shell__collapse{justify-content:center;padding:0}.hu-shell__main{display:flex;flex-direction:column;min-height:100dvh;margin-left:var(--_sidebar-w);transition:margin-left .2s cubic-bezier(.4,0,.2,1)}.hu-shell__topbar{position:sticky;top:0;z-index:800;display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-6);background:color-mix(in srgb,var(--hu-surface) 85%,transparent);border-bottom:1px solid var(--hu-border);-webkit-backdrop-filter:saturate(180%) blur(8px);backdrop-filter:saturate(180%) blur(8px)}.hu-shell__topbar-start{display:flex;align-items:center;gap:var(--hu-space-3);min-width:0}.hu-shell__spacer{flex:1}.hu-shell__topbar-end{display:flex;align-items:center;gap:var(--hu-space-1);flex-shrink:0}.hu-shell__content{flex:1;width:100%;max-width:var(--hu-content-max-width);margin:0 auto;padding:var(--hu-space-6)}.hu-shell__content:focus{outline:none}.hu-shell--mobile .hu-shell__sidebar{width:min(var(--hu-sidebar-width),85vw);box-shadow:var(--hu-shadow-lg);transform:translate(-100%)}.hu-shell--mobile.hu-shell--drawer-open .hu-shell__sidebar{transform:none}.hu-shell--mobile .hu-shell__main{margin-left:0}.hu-shell--mobile .hu-shell__topbar{padding:0 var(--hu-space-3)}.hu-shell--mobile .hu-shell__content{padding:var(--hu-space-4)}.hu-shell__backdrop{position:fixed;inset:0;z-index:850;background:#0c0c0e73;animation:hu-fade-in .2s ease-out}.hu-nav{display:flex;flex-direction:column;gap:var(--hu-space-4)}.hu-nav__title{padding:0 var(--hu-space-3) var(--hu-space-2);font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--hu-sidebar-muted);white-space:nowrap}.hu-nav__list,.hu-nav__sublist{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.hu-nav__sublist{margin:2px 0 var(--hu-space-1) calc(var(--hu-space-3) + 9px);padding-left:var(--hu-space-3);border-left:1px solid var(--hu-sidebar-border)}.hu-nav__link{position:relative;display:flex;align-items:center;gap:var(--hu-space-3);width:100%;height:2.375rem;padding:0 var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);font-weight:500;color:var(--hu-sidebar-fg);text-align:left;text-decoration:none;white-space:nowrap;background:none;border:0;border-radius:var(--hu-radius-md);cursor:pointer;transition:background-color var(--hu-transition),color var(--hu-transition)}.hu-nav__link:hover{background:var(--hu-sidebar-hover)}.hu-nav__link:focus-visible{outline:2px solid var(--hu-focus);outline-offset:-2px}.hu-nav__link--sub{height:2.125rem;font-weight:400}.hu-nav__link--active,.hu-nav__link--active:hover{color:var(--hu-sidebar-active-fg);background:var(--hu-sidebar-active-bg)}.hu-nav__link--active .hu-nav__icon,.hu-nav__link--active:hover .hu-nav__icon{color:var(--hu-primary)}.hu-nav__link--active:not(.hu-nav__link--sub):before{content:\"\";position:absolute;top:8px;bottom:8px;left:calc(var(--hu-space-3) * -1);width:3px;background:var(--hu-primary);border-radius:0 3px 3px 0}.hu-nav__link--parent-active{color:var(--hu-text)}.hu-shell__sidebar--dark .hu-nav__link--parent-active{color:#fff}.hu-nav__link--parent-active .hu-nav__icon{color:var(--hu-primary)}.hu-nav__icon{color:var(--hu-sidebar-muted);transition:color var(--hu-transition)}.hu-nav__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.hu-nav__chevron{color:var(--hu-sidebar-muted);transition:transform var(--hu-transition)}[aria-expanded=true]>.hu-nav__chevron{transform:rotate(180deg)}.hu-nav__badge{min-width:1.25rem;height:1.25rem;padding:0 .375rem;font-size:.6875rem;font-weight:600;line-height:1.25rem;text-align:center;color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-full)}.hu-nav--collapsed .hu-nav__title{height:1px;margin:0 var(--hu-space-2) var(--hu-space-2);padding:0;overflow:hidden;color:transparent;background:var(--hu-sidebar-border)}.hu-nav--collapsed .hu-nav__link{justify-content:center;padding:0}.hu-nav--collapsed .hu-nav__label,.hu-nav--collapsed .hu-nav__chevron{display:none}.hu-nav--collapsed .hu-nav__badge{position:absolute;top:3px;right:6px;min-width:.5rem;width:.5rem;height:.5rem;padding:0;font-size:0}@keyframes hu-fade-in{0%{opacity:0}}\n"]
7260
+ styles: [".hu-shell{--_sidebar-w: var(--hu-sidebar-width);display:block;min-height:100dvh}.hu-shell--collapsed{--_sidebar-w: var(--hu-sidebar-collapsed-width)}.hu-shell__skip{position:fixed;top:var(--hu-space-2);left:var(--hu-space-2);z-index:1200;padding:var(--hu-space-2) var(--hu-space-4);color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-md);transform:translateY(-200%)}.hu-shell__skip:focus{transform:none}.hu-shell__sidebar{position:fixed;inset:0 auto 0 0;z-index:900;display:flex;flex-direction:column;width:var(--_sidebar-w);color:var(--hu-sidebar-fg);background:var(--hu-sidebar-bg);border-right:1px solid var(--hu-sidebar-border);transition:width .2s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1)}.hu-shell__sidebar--dark{--hu-sidebar-bg: var(--hu-gray-900);--hu-sidebar-fg: var(--hu-gray-300);--hu-sidebar-muted: var(--hu-gray-500);--hu-sidebar-hover: var(--hu-gray-800);--hu-sidebar-active-bg: color-mix(in srgb, var(--hu-red-500) 20%, transparent);--hu-sidebar-active-fg: #fff;--hu-sidebar-border: var(--hu-gray-800)}.hu-shell__brand{display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-4);color:inherit;text-decoration:none;border-bottom:1px solid var(--hu-sidebar-border);overflow:hidden;flex-shrink:0}.hu-shell__logo{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2.25rem;height:2.25rem}.hu-shell__logo--default{color:#fff;background:var(--hu-red-600);border-radius:var(--hu-radius-md)}.hu-shell__brand-text{display:flex;flex-direction:column;min-width:0;line-height:1.2;white-space:nowrap}.hu-shell__brand-name{font-size:.9375rem;font-weight:700;color:var(--hu-text)}.hu-shell__sidebar--dark .hu-shell__brand-name{color:#fff}.hu-shell__brand-subtitle{font-size:var(--hu-text-xs);color:var(--hu-sidebar-muted);overflow:hidden;text-overflow:ellipsis}.hu-shell__nav{flex:1;padding:var(--hu-space-3);overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.hu-shell__sidebar-footer{padding:var(--hu-space-3);border-top:1px solid var(--hu-sidebar-border)}.hu-shell__collapse{display:flex;align-items:center;gap:var(--hu-space-3);height:2.75rem;padding:0 calc(var(--hu-space-3) + var(--hu-space-3) + 1px);font:inherit;font-size:var(--hu-text-sm);color:var(--hu-sidebar-muted);text-align:left;background:none;border:0;border-top:1px solid var(--hu-sidebar-border);cursor:pointer;flex-shrink:0}.hu-shell__collapse:hover{color:var(--hu-sidebar-fg);background:var(--hu-sidebar-hover)}.hu-shell--collapsed .hu-shell__brand{padding:0 calc((var(--hu-sidebar-collapsed-width) - 2.25rem) / 2)}.hu-shell--collapsed .hu-shell__brand-text,.hu-shell--collapsed .hu-shell__collapse .hu-nav__label{display:none}.hu-shell--collapsed .hu-shell__collapse{justify-content:center;padding:0}.hu-shell__main{display:flex;flex-direction:column;min-height:100dvh;margin-left:var(--_sidebar-w);transition:margin-left .2s cubic-bezier(.4,0,.2,1)}.hu-shell__topbar{position:sticky;top:0;z-index:800;display:flex;align-items:center;gap:var(--hu-space-3);height:var(--hu-topbar-height);padding:0 var(--hu-space-6);background:color-mix(in srgb,var(--hu-surface) 85%,transparent);border-bottom:1px solid var(--hu-border);-webkit-backdrop-filter:saturate(180%) blur(8px);backdrop-filter:saturate(180%) blur(8px)}.hu-shell__topbar-start{display:flex;align-items:center;gap:var(--hu-space-3);min-width:0}.hu-shell__spacer{flex:1}.hu-shell__topbar-end{display:flex;align-items:center;gap:var(--hu-space-1);flex-shrink:0}.hu-shell__content{flex:1;width:100%;max-width:var(--hu-content-max-width);margin:0 auto;padding:var(--hu-space-6)}.hu-shell__content:focus{outline:none}.hu-shell--mobile .hu-shell__sidebar{width:min(var(--hu-sidebar-width),85vw);box-shadow:var(--hu-shadow-lg);transform:translate(-100%)}.hu-shell--mobile.hu-shell--drawer-open .hu-shell__sidebar{transform:none}.hu-shell--mobile .hu-shell__main{margin-left:0}.hu-shell--mobile .hu-shell__topbar{padding:0 var(--hu-space-3)}.hu-shell--mobile .hu-shell__content{padding:var(--hu-space-4)}.hu-shell__backdrop{position:fixed;inset:0;z-index:850;background:#0c0c0e73;animation:hu-fade-in .2s ease-out}.hu-nav{display:flex;flex-direction:column;gap:var(--hu-space-4)}.hu-nav__title{padding:0 var(--hu-space-3) var(--hu-space-2);font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--hu-sidebar-muted);white-space:nowrap}.hu-nav__list,.hu-nav__sublist{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.hu-nav__sublist{margin:2px 0 var(--hu-space-1) calc(var(--hu-space-3) + 9px);padding-left:var(--hu-space-3);border-left:1px solid var(--hu-sidebar-border)}.hu-nav__link{position:relative;display:flex;align-items:center;gap:var(--hu-space-3);width:100%;height:2.375rem;padding:0 var(--hu-space-3);font:inherit;font-size:var(--hu-text-sm);font-weight:500;color:var(--hu-sidebar-fg);text-align:left;text-decoration:none;white-space:nowrap;background:none;border:0;border-radius:var(--hu-radius-md);cursor:pointer;transition:background-color var(--hu-transition),color var(--hu-transition)}.hu-nav__link:hover{background:var(--hu-sidebar-hover)}.hu-nav__link:focus-visible{outline:2px solid var(--hu-focus);outline-offset:-2px}.hu-nav__link--sub{height:2.125rem;font-weight:400}.hu-nav__link--active,.hu-nav__link--active:hover{color:var(--hu-sidebar-active-fg);background:var(--hu-sidebar-active-bg)}.hu-nav__link--active .hu-nav__icon,.hu-nav__link--active:hover .hu-nav__icon{color:var(--hu-primary)}.hu-nav__link--active:not(.hu-nav__link--sub):before{content:\"\";position:absolute;top:8px;bottom:8px;left:calc(var(--hu-space-3) * -1);width:3px;background:var(--hu-primary);border-radius:0 3px 3px 0}.hu-nav__link--parent-active{color:var(--hu-text)}.hu-shell__sidebar--dark .hu-nav__link--parent-active{color:#fff}.hu-nav__link--parent-active .hu-nav__icon{color:var(--hu-primary)}.hu-nav__icon{color:var(--hu-sidebar-muted);transition:color var(--hu-transition)}.hu-nav__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.hu-nav__chevron{color:var(--hu-sidebar-muted);transition:transform var(--hu-transition)}[aria-expanded=true]>.hu-nav__chevron{transform:rotate(180deg)}.hu-nav__badge{min-width:1.25rem;height:1.25rem;padding:0 .375rem;font-size:.6875rem;font-weight:600;line-height:1.25rem;text-align:center;color:var(--hu-primary-fg);background:var(--hu-primary);border-radius:var(--hu-radius-full)}.hu-nav__badge--text{height:1.125rem;padding:0 .4375rem;font-size:.625rem;font-weight:700;line-height:1.125rem;letter-spacing:.04em;text-transform:uppercase;color:var(--hu-info-fg);background:var(--hu-info-soft);border-radius:var(--hu-radius-sm)}.hu-nav__subheader{padding:var(--hu-space-3) var(--hu-space-3) var(--hu-space-1);font-size:.75rem;font-weight:600;color:var(--hu-text);white-space:nowrap}.hu-shell__sidebar--dark .hu-nav__subheader{color:#fff}.hu-nav__subheader:first-child{padding-top:var(--hu-space-2)}.hu-nav--collapsed .hu-nav__title{height:1px;margin:0 var(--hu-space-2) var(--hu-space-2);padding:0;overflow:hidden;color:transparent;background:var(--hu-sidebar-border)}.hu-nav--collapsed .hu-nav__link{justify-content:center;padding:0}.hu-nav--collapsed .hu-nav__label,.hu-nav--collapsed .hu-nav__chevron{display:none}.hu-nav--collapsed .hu-nav__badge{position:absolute;top:3px;right:6px;min-width:.5rem;width:.5rem;height:.5rem;padding:0;font-size:0}@keyframes hu-fade-in{0%{opacity:0}}\n"]
5966
7261
  }]
5967
7262
  }],
5968
7263
  ctorParameters: () => [],
@@ -6119,6 +7414,6 @@ const HU_SHELL_IMPORTS = [
6119
7414
  HuSidebarFooter,
6120
7415
  HuShellLogo
6121
7416
  ];
6122
- export { HU_BUILTIN_ICONS, HU_CARD_IMPORTS, HU_DEFAULT_ERROR_MESSAGES, HU_DIALOG_IMPORTS, HU_DROPDOWN_IMPORTS, HU_ERROR_MESSAGES, HU_FORM_FIELD, HU_FORM_FIELD_IMPORTS, HU_ICON_SETS, HU_SHELL_IMPORTS, HU_STATUS_ICONS, HU_TABLE_IMPORTS, HU_TABS_IMPORTS, HuAlert, HuAvatar, HuBadge, HuBreadcrumb, HuButton, HuButtonGroup, HuCalendar, HuCard, HuCardActions, HuCardFooter, HuCellDef, HuCheckbox, HuDatePicker, HuDialog, HuDialogFooter, HuDropdown, HuDropdownHeaderSlot, HuDropdownTrigger, HuFormField, HuFormFieldControl, HuIcon, HuInput, HuPaginator, HuPrefix, HuShell, HuShellLogo, HuSidebarFooter, HuSidebarNav, HuSpinner, HuSuffix, HuSwitch, HuTab, HuTable, HuTabs, HuThemeService, HuThemeToggle, HuToastService, HuToaster, HuTopbarEnd, HuTopbarStart, addDays, addMonths, clampDate, compareDays, daysInMonth, formatDate, formatRange, huMediaQuery, huUniqueId, isDropdownDivider, isDropdownHeader, isSameDay, isSameMonth, isValidDate, parseDate, parseRange, provideHuErrorMessages, provideHuIcons, startOfDay, startOfWeek };
7417
+ export { HU_BUILTIN_ICONS, HU_CARD_IMPORTS, HU_DEFAULT_ERROR_MESSAGES, HU_DIALOG_IMPORTS, HU_DROPDOWN_IMPORTS, HU_EDITOR_BLOCKS, HU_EDITOR_BUTTONS, HU_EDITOR_DEFAULT_TOOLBAR, HU_EDITOR_HIGHLIGHT_COLORS, HU_EDITOR_MINIMAL_TOOLBAR, HU_EDITOR_TEXT_COLORS, HU_ERROR_MESSAGES, HU_FORM_FIELD, HU_FORM_FIELD_IMPORTS, HU_ICON_SETS, HU_SHELL_IMPORTS, HU_STATUS_ICONS, HU_TABLE_IMPORTS, HU_TABS_IMPORTS, HuAlert, HuAvatar, HuBadge, HuBreadcrumb, HuButton, HuButtonGroup, HuCalendar, HuCard, HuCardActions, HuCardFooter, HuCellDef, HuCheckbox, HuDatePicker, HuDialog, HuDialogFooter, HuDropdown, HuDropdownHeaderSlot, HuDropdownTrigger, HuEditor, HuFormField, HuFormFieldControl, HuIcon, HuInput, HuPaginator, HuPrefix, HuShell, HuShellLogo, HuSidebarFooter, HuSidebarNav, HuSpinner, HuSuffix, HuSwitch, HuTab, HuTable, HuTabs, HuThemeService, HuThemeToggle, HuToastService, HuToaster, HuTopbarEnd, HuTopbarStart, addDays, addMonths, clampDate, compareDays, daysInMonth, formatDate, formatRange, huIsSafeImageSrc, huIsSafeUrl, huMediaQuery, huSanitizeHtml, huUniqueId, isDropdownDivider, isDropdownHeader, isSameDay, isSameMonth, isValidDate, parseDate, parseRange, provideHuErrorMessages, provideHuIcons, startOfDay, startOfWeek };
6123
7418
 
6124
7419
  //# sourceMappingURL=ucme-ui-angular.mjs.map