@uyghurcommunity/ui 0.0.0-stage → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +221 -2
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/assets/flags/east-turkistan.svg +1 -0
- package/assets/icon-catalog.json +1514 -0
- package/assets/icons/almond.svg +1 -0
- package/assets/icons/ancient-ruins.svg +1 -0
- package/assets/icons/apricot.svg +1 -0
- package/assets/icons/archway.svg +1 -0
- package/assets/icons/arrow-down.svg +1 -0
- package/assets/icons/arrow-left.svg +1 -0
- package/assets/icons/arrow-right.svg +1 -0
- package/assets/icons/arrow-up.svg +1 -0
- package/assets/icons/atlas.svg +1 -0
- package/assets/icons/aywan.svg +1 -0
- package/assets/icons/book.svg +1 -0
- package/assets/icons/boots.svg +1 -0
- package/assets/icons/calendar.svg +1 -0
- package/assets/icons/calligraphy.svg +1 -0
- package/assets/icons/camel.svg +1 -0
- package/assets/icons/carpet.svg +1 -0
- package/assets/icons/carved-door.svg +1 -0
- package/assets/icons/ceramic-vase.svg +1 -0
- package/assets/icons/chapan.svg +1 -0
- package/assets/icons/check-circle.svg +1 -0
- package/assets/icons/check.svg +1 -0
- package/assets/icons/chevron-down.svg +1 -0
- package/assets/icons/chevron-left.svg +1 -0
- package/assets/icons/chevron-right.svg +1 -0
- package/assets/icons/chevron-up.svg +1 -0
- package/assets/icons/city-gate.svg +1 -0
- package/assets/icons/close.svg +1 -0
- package/assets/icons/code.svg +1 -0
- package/assets/icons/color/almond.svg +1 -0
- package/assets/icons/color/ancient-ruins.svg +1 -0
- package/assets/icons/color/apricot.svg +1 -0
- package/assets/icons/color/archway.svg +1 -0
- package/assets/icons/color/atlas.svg +1 -0
- package/assets/icons/color/aywan.svg +1 -0
- package/assets/icons/color/boots.svg +1 -0
- package/assets/icons/color/calligraphy.svg +1 -0
- package/assets/icons/color/camel.svg +1 -0
- package/assets/icons/color/carpet.svg +1 -0
- package/assets/icons/color/carved-door.svg +1 -0
- package/assets/icons/color/ceramic-vase.svg +1 -0
- package/assets/icons/color/chapan.svg +1 -0
- package/assets/icons/color/city-gate.svg +1 -0
- package/assets/icons/color/cotton.svg +1 -0
- package/assets/icons/color/crescent.svg +1 -0
- package/assets/icons/color/dap.svg +1 -0
- package/assets/icons/color/doppa-top.svg +1 -0
- package/assets/icons/color/doppa.svg +1 -0
- package/assets/icons/color/dove.svg +1 -0
- package/assets/icons/color/dutar.svg +1 -0
- package/assets/icons/color/embroidery.svg +1 -0
- package/assets/icons/color/floral-rosette.svg +1 -0
- package/assets/icons/color/flower.svg +1 -0
- package/assets/icons/color/fur-hat.svg +1 -0
- package/assets/icons/color/ghijek.svg +1 -0
- package/assets/icons/color/grapes.svg +1 -0
- package/assets/icons/color/horse.svg +1 -0
- package/assets/icons/color/jewelry.svg +1 -0
- package/assets/icons/color/laghman.svg +1 -0
- package/assets/icons/color/landscape.svg +1 -0
- package/assets/icons/color/lattice-window.svg +1 -0
- package/assets/icons/color/loom.svg +1 -0
- package/assets/icons/color/madrasa.svg +1 -0
- package/assets/icons/color/mausoleum.svg +1 -0
- package/assets/icons/color/melon.svg +1 -0
- package/assets/icons/color/mens-coat.svg +1 -0
- package/assets/icons/color/minaret.svg +1 -0
- package/assets/icons/color/mosque.svg +1 -0
- package/assets/icons/color/nan-stack.svg +1 -0
- package/assets/icons/color/nan.svg +1 -0
- package/assets/icons/color/ornamental-border.svg +1 -0
- package/assets/icons/color/polo.svg +1 -0
- package/assets/icons/color/pomegranate.svg +1 -0
- package/assets/icons/color/rawap.svg +1 -0
- package/assets/icons/color/samsa.svg +1 -0
- package/assets/icons/color/sash.svg +1 -0
- package/assets/icons/color/satar.svg +1 -0
- package/assets/icons/color/spindle.svg +1 -0
- package/assets/icons/color/star-eight.svg +1 -0
- package/assets/icons/color/surnai.svg +1 -0
- package/assets/icons/color/tambur.svg +1 -0
- package/assets/icons/color/tea-bowl.svg +1 -0
- package/assets/icons/color/tea-set.svg +1 -0
- package/assets/icons/color/teapot.svg +1 -0
- package/assets/icons/color/traditional-house.svg +1 -0
- package/assets/icons/color/traditional-shoes.svg +1 -0
- package/assets/icons/color/tree-of-life.svg +1 -0
- package/assets/icons/color/unity.svg +1 -0
- package/assets/icons/color/uyghur-medallion.svg +1 -0
- package/assets/icons/color/womens-dress.svg +1 -0
- package/assets/icons/color/womens-headdress.svg +1 -0
- package/assets/icons/color/yurt.svg +1 -0
- package/assets/icons/copy.svg +1 -0
- package/assets/icons/cotton.svg +1 -0
- package/assets/icons/crescent.svg +1 -0
- package/assets/icons/dap.svg +1 -0
- package/assets/icons/direction-ltr.svg +1 -0
- package/assets/icons/direction-rtl.svg +1 -0
- package/assets/icons/doppa-top.svg +1 -0
- package/assets/icons/doppa.svg +1 -0
- package/assets/icons/dove.svg +1 -0
- package/assets/icons/download.svg +1 -0
- package/assets/icons/dutar.svg +1 -0
- package/assets/icons/edit.svg +1 -0
- package/assets/icons/embroidery.svg +1 -0
- package/assets/icons/external-link.svg +1 -0
- package/assets/icons/floral-rosette.svg +1 -0
- package/assets/icons/flower.svg +1 -0
- package/assets/icons/fur-hat.svg +1 -0
- package/assets/icons/ghijek.svg +1 -0
- package/assets/icons/globe.svg +1 -0
- package/assets/icons/grapes.svg +1 -0
- package/assets/icons/heart.svg +1 -0
- package/assets/icons/home.svg +1 -0
- package/assets/icons/horse.svg +1 -0
- package/assets/icons/image.svg +1 -0
- package/assets/icons/info.svg +1 -0
- package/assets/icons/jewelry.svg +1 -0
- package/assets/icons/keyboard.svg +1 -0
- package/assets/icons/laghman.svg +1 -0
- package/assets/icons/landscape.svg +1 -0
- package/assets/icons/language.svg +1 -0
- package/assets/icons/lattice-window.svg +1 -0
- package/assets/icons/link.svg +1 -0
- package/assets/icons/loom.svg +1 -0
- package/assets/icons/madrasa.svg +1 -0
- package/assets/icons/mail.svg +1 -0
- package/assets/icons/mausoleum.svg +1 -0
- package/assets/icons/melon.svg +1 -0
- package/assets/icons/mens-coat.svg +1 -0
- package/assets/icons/menu.svg +1 -0
- package/assets/icons/minaret.svg +1 -0
- package/assets/icons/minus.svg +1 -0
- package/assets/icons/moon.svg +1 -0
- package/assets/icons/mosque.svg +1 -0
- package/assets/icons/nan-stack.svg +1 -0
- package/assets/icons/nan.svg +1 -0
- package/assets/icons/ornamental-border.svg +1 -0
- package/assets/icons/palette.svg +1 -0
- package/assets/icons/pause.svg +1 -0
- package/assets/icons/play.svg +1 -0
- package/assets/icons/plus.svg +1 -0
- package/assets/icons/polo.svg +1 -0
- package/assets/icons/pomegranate.svg +1 -0
- package/assets/icons/rawap.svg +1 -0
- package/assets/icons/redo.svg +1 -0
- package/assets/icons/samsa.svg +1 -0
- package/assets/icons/sash.svg +1 -0
- package/assets/icons/satar.svg +1 -0
- package/assets/icons/search.svg +1 -0
- package/assets/icons/settings.svg +1 -0
- package/assets/icons/spindle.svg +1 -0
- package/assets/icons/star-eight.svg +1 -0
- package/assets/icons/star.svg +1 -0
- package/assets/icons/sun.svg +1 -0
- package/assets/icons/surnai.svg +1 -0
- package/assets/icons/tambur.svg +1 -0
- package/assets/icons/tea-bowl.svg +1 -0
- package/assets/icons/tea-set.svg +1 -0
- package/assets/icons/teapot.svg +1 -0
- package/assets/icons/traditional-house.svg +1 -0
- package/assets/icons/traditional-shoes.svg +1 -0
- package/assets/icons/trash.svg +1 -0
- package/assets/icons/tree-of-life.svg +1 -0
- package/assets/icons/undo.svg +1 -0
- package/assets/icons/unity.svg +1 -0
- package/assets/icons/upload.svg +1 -0
- package/assets/icons/user.svg +1 -0
- package/assets/icons/users.svg +1 -0
- package/assets/icons/uyghur-medallion.svg +1 -0
- package/assets/icons/warning.svg +1 -0
- package/assets/icons/womens-dress.svg +1 -0
- package/assets/icons/womens-headdress.svg +1 -0
- package/assets/icons/yurt.svg +1 -0
- package/assets/maps/README.md +27 -0
- package/assets/maps/east-turkistan-filled.svg +1 -0
- package/assets/maps/east-turkistan-outline.svg +1 -0
- package/assets/maps/east-turkistan.metadata.json +64 -0
- package/assets/maps/east-turkistan.source.geojson +1 -0
- package/package.json +93 -4
- package/src/application.css +4 -0
- package/src/application.d.ts +7 -0
- package/src/application.js +120 -0
- package/src/blocks.css +1 -0
- package/src/font.css +8 -0
- package/src/heritage-color.js +30 -0
- package/src/icon-labels.js +98 -0
- package/src/icons.d.ts +13 -0
- package/src/icons.js +102 -0
- package/src/index.d.ts +17 -0
- package/src/index.js +202 -0
- package/src/interactions.css +15 -0
- package/src/interactions.d.ts +10 -0
- package/src/interactions.js +183 -0
- package/src/map-data.js +68 -0
- package/src/maps.d.ts +11 -0
- package/src/maps.js +17 -0
- package/src/reference-clothing.js +51 -0
- package/src/reference-places.js +43 -0
- package/src/styles.css +20 -0
- package/src/themes.d.ts +7 -0
- package/src/themes.js +36 -0
- package/src/traditional-drawings.js +42 -0
- package/src/vendor/README.md +17 -0
- package/src/vendor/keyboard/LICENSE +21 -0
- package/src/vendor/keyboard/index.js +248 -0
- package/src/vendor/keyboard/style.js +22 -0
- package/src/vendor/text/LICENSE +21 -0
- package/src/vendor/text/index.js +275 -0
- package/src/writing.d.ts +17 -0
- package/src/writing.js +115 -0
package/src/index.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { iconSVG } from './icons.js';
|
|
2
|
+
export { iconSVG, flagSVG, iconNames, coloredIconNames, directionalIcons, iconCatalog, iconCategories, findIcons } from './icons.js';
|
|
3
|
+
export { mapSVG, mapMetadata } from './maps.js';
|
|
4
|
+
|
|
5
|
+
function restoreAttribute(node, key, value) { value === null ? node.removeAttribute(key) : node.setAttribute(key, value); }
|
|
6
|
+
|
|
7
|
+
/** Native modal behavior provides focus containment and background inertness. */
|
|
8
|
+
export function bindDialog(dialog, { trigger, initialFocus, dismissOutside = true } = {}) {
|
|
9
|
+
if (!dialog || typeof dialog.showModal !== 'function' || typeof dialog.close !== 'function') throw new TypeError('A supported native <dialog> is required');
|
|
10
|
+
const doc = dialog.ownerDocument;
|
|
11
|
+
if (!dialog.getAttribute('aria-label') && !dialog.getAttribute('aria-labelledby')) throw new TypeError('Give the dialog an accessible label');
|
|
12
|
+
if (typeof dismissOutside !== 'boolean') throw new TypeError('dismissOutside must be a boolean');
|
|
13
|
+
let previous, destroyed = false, startedOutside = false;
|
|
14
|
+
const expanded = trigger?.getAttribute('aria-expanded') ?? null;
|
|
15
|
+
function afterClose() {
|
|
16
|
+
// Native close events are queued. A previous close must not affect a reopened dialog.
|
|
17
|
+
if (destroyed || dialog.open) return;
|
|
18
|
+
startedOutside = false;
|
|
19
|
+
trigger?.setAttribute('aria-expanded', 'false');
|
|
20
|
+
if (previous?.isConnected && typeof previous.focus === 'function') previous.focus();
|
|
21
|
+
previous = null;
|
|
22
|
+
}
|
|
23
|
+
function open() {
|
|
24
|
+
if (destroyed) throw new Error('Dialog binding has been destroyed');
|
|
25
|
+
if (dialog.open) return;
|
|
26
|
+
previous = doc.activeElement;
|
|
27
|
+
dialog.showModal();
|
|
28
|
+
trigger?.setAttribute('aria-expanded', 'true');
|
|
29
|
+
if (initialFocus && dialog.contains(initialFocus)) initialFocus.focus();
|
|
30
|
+
}
|
|
31
|
+
function close(value = '') { startedOutside = false; if (!destroyed && dialog.open) dialog.close(value); }
|
|
32
|
+
function onTrigger(event) { event.preventDefault(); open(); }
|
|
33
|
+
function outside(event) {
|
|
34
|
+
if (event.target !== dialog || !Number.isFinite(event.clientX) || !Number.isFinite(event.clientY)) return false;
|
|
35
|
+
const rect = dialog.getBoundingClientRect?.();
|
|
36
|
+
return !!rect && (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom);
|
|
37
|
+
}
|
|
38
|
+
function pointerDown(event) { startedOutside = dismissOutside && dialog.open && event.isPrimary !== false && (event.button === 0 || event.button === undefined) && outside(event); }
|
|
39
|
+
function pointerCancel() { startedOutside = false; }
|
|
40
|
+
function onClick(event) {
|
|
41
|
+
const dismiss = startedOutside && outside(event); startedOutside = false;
|
|
42
|
+
const button = event.target.closest?.('[data-ug-close]');
|
|
43
|
+
if (button && dialog.contains(button)) { event.preventDefault(); close(button.getAttribute('data-ug-close') || ''); }
|
|
44
|
+
else if (dismiss && !event.defaultPrevented) close();
|
|
45
|
+
}
|
|
46
|
+
trigger?.setAttribute('aria-expanded', String(dialog.open));
|
|
47
|
+
trigger?.addEventListener('click', onTrigger);
|
|
48
|
+
dialog.addEventListener('click', onClick);
|
|
49
|
+
dialog.addEventListener('pointerdown', pointerDown);
|
|
50
|
+
dialog.addEventListener('pointercancel', pointerCancel);
|
|
51
|
+
dialog.addEventListener('close', afterClose);
|
|
52
|
+
return {
|
|
53
|
+
open, close,
|
|
54
|
+
destroy() {
|
|
55
|
+
if (destroyed) return;
|
|
56
|
+
close(); destroyed = true;
|
|
57
|
+
if (previous?.isConnected && typeof previous.focus === 'function') previous.focus();
|
|
58
|
+
previous = null;
|
|
59
|
+
trigger?.removeEventListener('click', onTrigger);
|
|
60
|
+
dialog.removeEventListener('click', onClick);
|
|
61
|
+
dialog.removeEventListener('pointerdown', pointerDown);
|
|
62
|
+
dialog.removeEventListener('pointercancel', pointerCancel);
|
|
63
|
+
dialog.removeEventListener('close', afterClose);
|
|
64
|
+
if (trigger) restoreAttribute(trigger, 'aria-expanded', expanded);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Bind a native disclosure button without changing content or document direction. */
|
|
70
|
+
export function bindDisclosure(button, panel) {
|
|
71
|
+
if (!button || !panel) throw new TypeError('A button and panel are required');
|
|
72
|
+
const oldExpanded = button.getAttribute('aria-expanded'), oldHidden = panel.hidden;
|
|
73
|
+
let destroyed = false;
|
|
74
|
+
function setOpen(value) {
|
|
75
|
+
if (destroyed) throw new Error('Disclosure binding has been destroyed');
|
|
76
|
+
panel.hidden = !value; button.setAttribute('aria-expanded', String(!!value));
|
|
77
|
+
if (!value && panel.contains(panel.ownerDocument.activeElement)) button.focus();
|
|
78
|
+
}
|
|
79
|
+
function toggle() { setOpen(panel.hidden); }
|
|
80
|
+
function onClick(event) { event.preventDefault(); toggle(); }
|
|
81
|
+
function onKey(event) { if (!event.defaultPrevented && event.key === 'Escape' && !panel.hidden) { event.preventDefault(); setOpen(false); button.focus(); } }
|
|
82
|
+
button.addEventListener('click', onClick); panel.addEventListener('keydown', onKey);
|
|
83
|
+
setOpen(!panel.hidden);
|
|
84
|
+
return { setOpen, toggle, destroy() { if (destroyed) return; destroyed = true; button.removeEventListener('click', onClick); panel.removeEventListener('keydown', onKey); panel.hidden = oldHidden; if (oldHidden && panel.contains(panel.ownerDocument.activeElement)) button.focus(); restoreAttribute(button, 'aria-expanded', oldExpanded); } };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Automatic-activation tabs, including RTL horizontal arrow navigation. */
|
|
88
|
+
export function bindTabs(container) {
|
|
89
|
+
if (!container?.querySelectorAll) throw new TypeError('A tab container is required');
|
|
90
|
+
const list = container.querySelector('[role="tablist"]');
|
|
91
|
+
if (!list) throw new TypeError('A tablist is required');
|
|
92
|
+
const tabs = [...list.querySelectorAll('[role="tab"]')].filter((tab) => tab.closest('[role="tablist"]') === list);
|
|
93
|
+
const enabledTabs = () => tabs.filter((tab) => !tab.disabled && tab.getAttribute('aria-disabled') !== 'true');
|
|
94
|
+
if (!enabledTabs().length) throw new TypeError('At least one enabled tab is required');
|
|
95
|
+
const doc = container.ownerDocument;
|
|
96
|
+
const panels = tabs.map((tab) => doc.getElementById(tab.getAttribute('aria-controls')));
|
|
97
|
+
if (panels.some((panel) => !panel || !container.contains(panel))) throw new TypeError('Each tab must control a panel inside the container');
|
|
98
|
+
if (new Set(panels).size !== panels.length) throw new TypeError('Each tab must control a distinct panel');
|
|
99
|
+
const originals = tabs.map((tab, i) => ({ selected: tab.getAttribute('aria-selected'), tabindex: tab.getAttribute('tabindex'), hidden: panels[i].hidden }));
|
|
100
|
+
let destroyed = false;
|
|
101
|
+
function select(tab, focus = false) {
|
|
102
|
+
if (destroyed) throw new Error('Tab binding has been destroyed');
|
|
103
|
+
if (!enabledTabs().includes(tab)) throw new RangeError('Select an enabled tab from this container');
|
|
104
|
+
tabs.forEach((item, i) => { const active = item === tab; item.setAttribute('aria-selected', String(active)); item.setAttribute('tabindex', active ? '0' : '-1'); panels[i].hidden = !active; });
|
|
105
|
+
if (focus) tab.focus();
|
|
106
|
+
}
|
|
107
|
+
function clicked(event) { const tab = event.target.closest?.('[role="tab"]'); if (!event.defaultPrevented && enabledTabs().includes(tab)) { event.preventDefault(); select(tab); } }
|
|
108
|
+
function keyed(event) {
|
|
109
|
+
if (event.defaultPrevented) return;
|
|
110
|
+
const enabled = enabledTabs();
|
|
111
|
+
const tab = event.target.closest?.('[role="tab"]'); if (!enabled.includes(tab)) return;
|
|
112
|
+
const vertical = list.getAttribute('aria-orientation') === 'vertical';
|
|
113
|
+
const rtl = (doc.defaultView?.getComputedStyle?.(list).direction || list.dir || doc.documentElement.dir) === 'rtl';
|
|
114
|
+
let step = 0, index = enabled.indexOf(tab);
|
|
115
|
+
if (event.key === 'Home') index = 0;
|
|
116
|
+
else if (event.key === 'End') index = enabled.length - 1;
|
|
117
|
+
else if (vertical && event.key === 'ArrowDown' || !vertical && event.key === (rtl ? 'ArrowLeft' : 'ArrowRight')) step = 1;
|
|
118
|
+
else if (vertical && event.key === 'ArrowUp' || !vertical && event.key === (rtl ? 'ArrowRight' : 'ArrowLeft')) step = -1;
|
|
119
|
+
else return;
|
|
120
|
+
event.preventDefault(); if (step) index = (index + step + enabled.length) % enabled.length;
|
|
121
|
+
select(enabled[index], true);
|
|
122
|
+
}
|
|
123
|
+
container.addEventListener('click', clicked); container.addEventListener('keydown', keyed);
|
|
124
|
+
select(enabledTabs().find((tab) => tab.getAttribute('aria-selected') === 'true') || enabledTabs()[0]);
|
|
125
|
+
return { select, destroy() { if (destroyed) return; destroyed = true; container.removeEventListener('click', clicked); container.removeEventListener('keydown', keyed); tabs.forEach((tab, i) => { restoreAttribute(tab, 'aria-selected', originals[i].selected); restoreAttribute(tab, 'tabindex', originals[i].tabindex); panels[i].hidden = originals[i].hidden; }); } };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const defaultMessages = {
|
|
129
|
+
valueMissing: 'بۇ رامكىنى تولدۇرۇڭ.', typeMismatch: 'مۇۋاپىق قىممەت كىرگۈزۈڭ.', patternMismatch: 'كۆرسىتىلگەن شەكىلدە كىرگۈزۈڭ.',
|
|
130
|
+
tooShort: 'تېكىست بەك قىسقا.', tooLong: 'تېكىست بەك ئۇزۇن.', rangeUnderflow: 'قېنى تېخىمۇ چوڭ قىممەت كىرگۈزۈڭ.', rangeOverflow: 'كىچىكرەك قىممەت كىرگۈزۈڭ.',
|
|
131
|
+
};
|
|
132
|
+
export function validateForm(form, { messages = {} } = {}) {
|
|
133
|
+
if (!form?.elements) throw new TypeError('A form is required');
|
|
134
|
+
if (!messages || typeof messages !== 'object' || Array.isArray(messages)) throw new TypeError('messages must be a name-to-message object');
|
|
135
|
+
const errors = [];
|
|
136
|
+
for (const field of form.elements) {
|
|
137
|
+
if (typeof field.checkValidity !== 'function') continue;
|
|
138
|
+
const valid = field.willValidate === false || field.checkValidity();
|
|
139
|
+
field.setAttribute('aria-invalid', String(!valid));
|
|
140
|
+
const targetId = field.getAttribute('data-ug-error');
|
|
141
|
+
const target = targetId ? form.ownerDocument.getElementById(targetId) : null;
|
|
142
|
+
let message = '';
|
|
143
|
+
if (!valid) {
|
|
144
|
+
const key = Object.keys(defaultMessages).find((name) => field.validity[name]);
|
|
145
|
+
message = Object.hasOwn(messages, field.name) && typeof messages[field.name] === 'string' ? messages[field.name] : defaultMessages[key] || field.validationMessage || 'قىممەتنى تەكشۈرۈڭ.';
|
|
146
|
+
errors.push({ field, message });
|
|
147
|
+
}
|
|
148
|
+
if (target) target.textContent = message;
|
|
149
|
+
}
|
|
150
|
+
return errors;
|
|
151
|
+
}
|
|
152
|
+
export function bindForm(form, { onValid, messages = {} } = {}) {
|
|
153
|
+
if (!form?.elements || typeof form.addEventListener !== 'function') throw new TypeError('A form is required');
|
|
154
|
+
const oldNoValidate = form.getAttribute('novalidate');
|
|
155
|
+
const fieldStates = new Map(), errorStates = new Map();
|
|
156
|
+
let destroyed = false;
|
|
157
|
+
function validate() {
|
|
158
|
+
if (destroyed) throw new Error('Form binding has been destroyed');
|
|
159
|
+
for (const field of form.elements) {
|
|
160
|
+
if (typeof field.checkValidity !== 'function') continue;
|
|
161
|
+
if (!fieldStates.has(field)) fieldStates.set(field, field.getAttribute('aria-invalid'));
|
|
162
|
+
const id = field.getAttribute('data-ug-error');
|
|
163
|
+
const target = id ? form.ownerDocument.getElementById(id) : null;
|
|
164
|
+
if (target && !errorStates.has(target)) errorStates.set(target, target.textContent);
|
|
165
|
+
}
|
|
166
|
+
return validateForm(form, { messages });
|
|
167
|
+
}
|
|
168
|
+
const submit = (event) => {
|
|
169
|
+
const errors = validate();
|
|
170
|
+
if (errors.length) { event.preventDefault(); errors[0].field.focus(); }
|
|
171
|
+
else if (onValid) { event.preventDefault(); onValid(form, event); }
|
|
172
|
+
};
|
|
173
|
+
// Invalid native forms do not dispatch submit. Handle constraints ourselves so localized errors run.
|
|
174
|
+
form.setAttribute('novalidate', '');
|
|
175
|
+
form.addEventListener('submit', submit);
|
|
176
|
+
return { validate, destroy() {
|
|
177
|
+
if (destroyed) return;
|
|
178
|
+
destroyed = true; form.removeEventListener('submit', submit);
|
|
179
|
+
restoreAttribute(form, 'novalidate', oldNoValidate);
|
|
180
|
+
for (const [field, original] of fieldStates) restoreAttribute(field, 'aria-invalid', original);
|
|
181
|
+
for (const [target, original] of errorStates) target.textContent = original;
|
|
182
|
+
} };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** A plain-text notification. duration:0 keeps it visible until dismissed. */
|
|
186
|
+
export function showToast(region, message, { duration = 8000, dismissLabel = 'ئۇقتۇرۇشنى تاقاش' } = {}) {
|
|
187
|
+
if (!region?.ownerDocument || typeof message !== 'string' || !Number.isFinite(duration) || duration < 0) throw new TypeError('Supply a region, text message, and nonnegative duration');
|
|
188
|
+
const doc = region.ownerDocument, toast = doc.createElement('div'), text = doc.createElement('span'), button = doc.createElement('button');
|
|
189
|
+
const previous = doc.activeElement;
|
|
190
|
+
toast.className = 'ug-toast'; text.textContent = message; button.type = 'button'; button.innerHTML = iconSVG('close', { size: 16 }); button.setAttribute('aria-label', dismissLabel);
|
|
191
|
+
toast.append(text, button); region.append(toast);
|
|
192
|
+
let timer, dismissed = false;
|
|
193
|
+
function dismiss() { if (dismissed) return; dismissed = true; if (timer) clearTimeout(timer); const restoreFocus = toast.contains(doc.activeElement); button.removeEventListener('click', dismiss); toast.remove(); if (restoreFocus && previous?.isConnected && typeof previous.focus === 'function') previous.focus(); }
|
|
194
|
+
button.addEventListener('click', dismiss);
|
|
195
|
+
if (duration) timer = setTimeout(dismiss, duration);
|
|
196
|
+
return { element: toast, dismiss, destroy: dismiss };
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export { bindUyghurInput } from './writing.js';
|
|
200
|
+
export { bindCombobox, bindDropdown, bindDrawer, bindDataTable } from './application.js';
|
|
201
|
+
export { interactionBindings, bindSpotlight, bindTilt, bindSelection, bindSend, bindCompare, bindRipple } from './interactions.js';
|
|
202
|
+
export { createTheme, themePresets, exportThemeCSS, exportThemeJSON, contrastRatio } from './themes.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* Standalone demo styles, also included in each downloadable HTML example. */
|
|
2
|
+
@font-face{font-family:"ALKATIP Basma";src:url("https://db.onlinewebfonts.com/t/3c16518f40da2fc2901f37666c0556a7.woff2") format("woff2"),url("https://db.onlinewebfonts.com/t/3c16518f40da2fc2901f37666c0556a7.woff") format("woff"),url("https://db.onlinewebfonts.com/t/3c16518f40da2fc2901f37666c0556a7.ttf") format("truetype");font-weight:normal;font-style:normal;font-display:swap}
|
|
3
|
+
.ugx-demo{--ugx-ink:#17364b;--ugx-paper:#f5ead4;--ugx-gold:#bc8d43;--ugx-jade:#3f7d6a;--pointer-x:50%;--pointer-y:50%;--split:50%;font:16px/2.2 "ALKATIP Basma",Tahoma,serif;color:var(--ugx-ink);direction:rtl;isolation:isolate;min-width:0}.ugx-demo *{box-sizing:border-box}.ugx-demo button,.ugx-demo input{font:inherit}.ugx-demo button{cursor:pointer;touch-action:manipulation}.ugx-demo button:disabled{cursor:default;opacity:.6}.ugx-demo :focus-visible{outline:3px solid #086aa7;outline-offset:4px}.ugx-demo svg{vertical-align:middle;flex-shrink:0}.ugx-demo p{margin:0}.ugx-demo [lang=en]{font-family:ui-monospace,monospace}.ugx-stage-note{position:absolute;top:20px;left:22px;right:22px;font:8px/1.7 ui-monospace,monospace;letter-spacing:.08em;color:var(--ugx-ink);opacity:.65;text-align:left;z-index:2;pointer-events:none}.ugx-demo-controls{padding:16px 10px 12px;display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;color:var(--ug-text,#17364b);min-height:104px}.ugx-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:40px;border:1px solid var(--ug-line,#c9d7df);border-radius:8px;background:var(--ug-surface,#fff);color:var(--ug-text,#17364b);padding:4px 15px;font:14px/2 "ALKATIP Basma",Tahoma,serif!important;text-decoration:none}.ugx-button:hover{border-color:#8b9ba5}.ugx-button--solid{background:#17364b;color:#f5ead4;border-color:#17364b}.ugx-status{flex-basis:100%;font-size:11px;line-height:1.9;text-align:center;min-height:22px;color:var(--ug-muted,#566b78)}.ugx-setting{display:grid;gap:2px;font-size:12px;line-height:1.8;min-width:0}.ugx-setting input{accent-color:#3f7d6a;min-height:30px;margin:0;width:100%;max-width:100%}.ugx-spotlight,.ugx-depth-scene,.ugx-selection-scene,.ugx-envelope-scene,.ugx-compare-scene,.ugx-ripple-scene{height:280px;border-radius:10px;position:relative;overflow:hidden;background:var(--ugx-paper)}
|
|
4
|
+
.ugx-spotlight{background:#112a37;color:#efe0bc;--pointer-x:50%;--pointer-y:50%}.ugx-spotlight:before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 155px 145px at var(--pointer-x) var(--pointer-y),#bc8d4366,transparent 90%);pointer-events:none}.ugx-stitch-grid{position:absolute;inset:0;opacity:.3;background-image:radial-gradient(#ead5a3 1px,transparent 1px);background-size:17px 17px;mask-image:radial-gradient(ellipse,#000,transparent 90%)}.ugx-spotlight .ugx-stage-note{color:#e8d7b3}.ugx-embroidery{height:218px;display:grid;place-items:center;position:relative}.ugx-embroidery>svg{color:#d9b677;filter:drop-shadow(0 0 18px #d8a44c33)}.ugx-diamond{position:absolute;width:130px;height:130px;border:1px solid #bc8d4377;transform:rotate(45deg);border-radius:24px}.ugx-diamond.diamond-two{width:164px;height:164px;border-style:dashed;border-color:#bc8d4333}.ugx-art-caption{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 20px;border-top:1px solid #e8d7b333;font-size:13px}.ugx-art-caption bdi{font:8px/1.8 ui-monospace,monospace;color:#bc8d43}
|
|
5
|
+
.ugx-depth-scene{display:grid;place-items:center;background:radial-gradient(ellipse at 50% 110%,#d3bc8d55,transparent 65%),#edece6;perspective:900px;overflow:visible}.ugx-doppa-card{--tilt-x:0deg;--tilt-y:0deg;transform:rotateX(var(--tilt-x)) rotateY(var(--tilt-y));transform-style:preserve-3d;position:relative;width:178px;height:210px;border:1px solid #d4b579;border-radius:14px;background:#173b37;color:#f5e4bd;box-shadow:0 18px 30px -16px #112a3777,0 0 0 5px #edece6,0 0 0 6px #d1c4a8;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:18px;line-height:1.5;will-change:transform;transition:transform .22s ease-out}.ugx-doppa-card:before{content:"";position:absolute;inset:9px;border:1px solid #bc8d4388;border-radius:7px}.ugx-card-corner{position:absolute;top:12px;right:17px;color:#d8b571;font-size:15px}.ugx-doppa-mark{transform:translateZ(22px);color:#d8b571}.ugx-doppa-word{font-size:28px;transform:translateZ(30px);margin-top:5px}.ugx-card-edition{font:6px/2 ui-monospace,monospace;letter-spacing:.05em;margin-top:9px;transform:translateZ(16px);color:#d8c8a3}.ugx-depth-controls .ugx-setting{width:100px}
|
|
6
|
+
.ugx-selection-scene{display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f1e5cb;padding:45px 16px 22px}.ugx-stage-title{font-size:23px;margin-bottom:20px!important}.ugx-choice-track{display:flex;position:relative;width:100%;max-width:340px;border-radius:12px;border:1px solid #b9a780;background:#e2d2b033;padding:6px;gap:4px;isolation:isolate}.ugx-choice-track>[data-choice]{flex:1;min-width:0;min-height:90px;border:0;border-radius:8px;position:relative;z-index:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;background:transparent;color:#17364b;line-height:1.8;font-size:15px;transition:color .18s}.ugx-choice-track>[aria-pressed=true]{color:#173b37}.ugx-selection-indicator{position:absolute;left:0;top:6px;bottom:6px;width:calc((100% - 20px)/3);border-radius:8px;background:#fffaee;border:1px solid #3f7d6a;box-shadow:0 3px 8px #173b3722;z-index:0;transition:left .36s cubic-bezier(.2,.9,.2,1),width .36s cubic-bezier(.2,.9,.2,1)}.ugx-selection-scene>.ugx-status{color:#526256;flex-basis:auto;margin-top:14px}.ugx-selection-stitch{display:flex;align-items:center;justify-content:center;gap:8px;color:#a78643;margin-top:16px}.ugx-selection-stitch i{inline-size:48px;border-top:1px solid currentColor;opacity:.75}
|
|
7
|
+
.ugx-envelope-scene{background:#e9eff0;display:grid;place-items:center}.ugx-envelope{position:relative;width:160px;height:105px;margin-top:40px;border-radius:0 0 9px 9px;background:#b2c5c1;box-shadow:0 20px 28px -18px #17364b66;perspective:500px}.ugx-envelope:before{content:"";position:absolute;left:0;top:-48px;border-left:80px solid transparent;border-right:80px solid transparent;border-bottom:49px solid #b2c5c1}.ugx-letter{position:absolute;left:12px;right:12px;top:-24px;height:110px;background:#fffaf0;border-radius:5px;box-shadow:0 0 0 1px #17364b22;padding:12px 15px;color:#17364b;text-align:right;line-height:2;z-index:1}.ugx-letter>span{font-size:13px;white-space:nowrap}.ugx-letter i{display:block;height:2px;background:#d6c4a1;border-radius:2px;margin-top:8px;width:85%}.ugx-letter i:last-child{width:55%}.ugx-envelope-front{position:absolute;inset:0;border-radius:0 0 9px 9px;z-index:2;background:linear-gradient(146deg,transparent 49.7%,#c5d4d0 50%) left/51% 100% no-repeat,linear-gradient(214deg,transparent 49.7%,#cfddda 50%) right/51% 100% no-repeat}.ugx-envelope-seal{position:absolute;top:49px;left:calc(50% - 16px);width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#bc8d43;color:#fff7e8;z-index:3}.ugx-plane{position:absolute;left:calc(50% - 13px);top:125px;z-index:4;color:#17364b;opacity:0;pointer-events:none}.ugx-send-receipt{position:absolute;top:105px;left:calc(50% - 21px);color:#3f7d6a;opacity:0;transform:scale(.8)}.ugx-demo[data-phase=sent] .ugx-envelope{opacity:.2}.ugx-demo[data-phase=sent] .ugx-send-receipt{opacity:1;transform:scale(1)}.ugx-demo[data-phase=sent] .ugx-letter{transform:translateY(20px)}
|
|
8
|
+
.ugx-demo[data-motion=running][data-phase=sending] .ugx-plane{animation:ugx-letter-flight .9s cubic-bezier(.3,.2,.2,1) both}.ugx-demo[data-motion=running][data-phase=sending] .ugx-letter{animation:ugx-letter-fold .6s ease-in both}.ugx-demo[data-motion=running] .ugx-send-receipt,.ugx-demo[data-motion=running] .ugx-envelope{transition:opacity .25s,transform .25s}@keyframes ugx-letter-flight{0%{opacity:0;transform:translate(0,20px) scale(.4)}25%{opacity:1;transform:translate(0,0) rotate(-12deg)}75%{opacity:1}100%{opacity:0;transform:translate(-150px,-100px) rotate(-28deg) scale(.7)}}@keyframes ugx-letter-fold{to{transform:translateY(24px);opacity:.1}}
|
|
9
|
+
.ugx-compare-scene{background-color:#f5ead4;background-image:radial-gradient(#17364b22 .8px,transparent .8px);background-size:16px 16px;direction:ltr}.ugx-map-layer{position:absolute;inset:12px 28px 25px}.ugx-map-layer img{display:block;width:100%;height:100%;object-fit:contain;transform:none}.ugx-map-filled{inset:0;clip-path:inset(0 calc(100% - var(--split)) 0 0);padding:12px 28px 25px}.ugx-compare-line{position:absolute;top:0;bottom:0;left:var(--split);width:1px;background:#17364b88;pointer-events:none}.ugx-compare-line:after{content:"";background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='8.5 0 24 24' fill='none' stroke='%2317364b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(4)'%3E%3Cpath d='m15 5-7 7 7 7'/%3E%3C/g%3E%3Cg transform='translate(13)'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/g%3E%3C/svg%3E");background-position:center;background-size:20px;background-repeat:no-repeat;position:absolute;top:calc(50% - 16px);left:-16px;width:33px;height:33px;display:grid;place-items:center;border:1px solid #b6aa90;border-radius:50%;background-color:#f5ead4;color:#17364b;font:16px/1 sans-serif;box-shadow:0 3px 12px #17364b22}.ugx-map-north{position:absolute;top:15px;right:18px;font:9px/1.8 ui-monospace,monospace}.ugx-map-tag{position:absolute;bottom:10px;left:20px;font-size:13px;direction:rtl}.ugx-compare-controls .ugx-setting{width:100%;padding-inline:8px}.ugx-range-labels{display:flex;justify-content:space-between;gap:15px;width:100%;padding-inline:8px;font-size:10px;line-height:1.5;margin-top:-9px}.ugx-map-source{font-size:10px;color:var(--ug-blue,#086aa7);text-underline-offset:3px}.ugx-compare-controls{gap:7px;min-height:104px}
|
|
10
|
+
.ugx-ripple-scene{display:grid;place-items:center;background:#173b37;color:#e5c78e}.ugx-ripple-scene .ugx-stage-note{color:#d8c8a3}.ugx-ripple-art{width:220px;height:220px;display:grid;place-items:center;position:relative;margin-top:15px}.ugx-ripple-motif{position:relative;display:grid;place-items:center;z-index:2;transition:color .2s}.ugx-ripple-ring{position:absolute;width:125px;height:125px;border:1px solid #bc8d4355;border-radius:27%;transform:rotate(45deg)}.ugx-ripple-ring.ring-two{width:165px;height:165px;border-color:#bc8d4333}.ugx-ripple-ring.ring-three{width:205px;height:205px;border-color:#bc8d431a}.ugx-demo[data-pulse=b] .ugx-ripple-motif{color:#f2ead4}.ugx-demo[data-motion=running][data-phase=active][data-pulse=a] .ugx-ripple-ring{animation:ugx-ripple-a 1.2s ease-out both}.ugx-demo[data-motion=running][data-phase=active][data-pulse=b] .ugx-ripple-ring{animation:ugx-ripple-b 1.2s ease-out both}.ugx-demo[data-motion=running][data-phase=active] .ugx-ripple-ring.ring-two{animation-delay:.09s}.ugx-demo[data-motion=running][data-phase=active] .ugx-ripple-ring.ring-three{animation-delay:.18s}@keyframes ugx-ripple-a{0%{opacity:1;transform:rotate(45deg) scale(.55)}100%{opacity:.15;transform:rotate(100deg) scale(1.25)}}@keyframes ugx-ripple-b{0%{opacity:1;transform:rotate(45deg) scale(.55)}100%{opacity:.15;transform:rotate(100deg) scale(1.25)}}
|
|
11
|
+
.ugx-demo[data-motion=paused] *{animation:none!important;transition:none!important}.ugx-demo[data-motion=paused] .ugx-doppa-card{transform:none;will-change:auto}@media(prefers-reduced-motion:reduce){.ugx-demo *{animation:none!important;transition:none!important}.ugx-doppa-card{transform:none!important;will-change:auto}}@media(max-width:390px){.ugx-art-caption{padding-inline:12px;font-size:12px}.ugx-art-caption bdi{font-size:7px}.ugx-stage-note{left:15px;right:15px;font-size:7px}.ugx-choice-track>[data-choice]{font-size:14px}.ugx-demo-controls{padding-inline:5px}.ugx-button{padding-inline:10px}.ugx-stage-title{font-size:22px}}
|
|
12
|
+
|
|
13
|
+
.ugx-demo:not([data-enhanced]) .ugx-selection-indicator{display:none}.ugx-demo:not([data-enhanced]) [data-choice][aria-pressed=true]{background:#fffaee;box-shadow:inset 0 0 0 1px #3f7d6a}
|
|
14
|
+
|
|
15
|
+
.ugx-demo-controls :focus-visible{outline-color:var(--ug-focus,#086aa7)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface InteractionController { syncMotion(): void; reset(): void; destroy(): void }
|
|
2
|
+
export interface InteractionOptions { motionAllowed?: () => boolean }
|
|
3
|
+
export type InteractionEffect = 'spotlight' | 'tilt' | 'selection' | 'send' | 'compare' | 'ripple';
|
|
4
|
+
export declare function bindSpotlight(root: HTMLElement, options?: InteractionOptions): InteractionController;
|
|
5
|
+
export declare function bindTilt(root: HTMLElement, options?: InteractionOptions): InteractionController;
|
|
6
|
+
export declare function bindSelection(root: HTMLElement, options?: InteractionOptions): InteractionController;
|
|
7
|
+
export declare function bindSend(root: HTMLElement, options?: InteractionOptions): InteractionController;
|
|
8
|
+
export declare function bindCompare(root: HTMLElement, options?: InteractionOptions): InteractionController;
|
|
9
|
+
export declare function bindRipple(root: HTMLElement, options?: InteractionOptions): InteractionController;
|
|
10
|
+
export declare const interactionBindings: Readonly<Record<InteractionEffect, (root: HTMLElement, options?: InteractionOptions) => InteractionController>>;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/** Original, website-only interaction controllers. Each function can be copied on its own. */
|
|
2
|
+
function spotlight(root, { motionAllowed = () => !root.ownerDocument.defaultView.matchMedia('(prefers-reduced-motion: reduce)').matches } = {}) {
|
|
3
|
+
const surface = root.querySelector('[data-surface]');
|
|
4
|
+
const button = root.querySelector('button[data-action="spotlight"]');
|
|
5
|
+
if (!surface || !button) throw new TypeError('Spotlight needs a surface and a button.');
|
|
6
|
+
const status = root.querySelector('[data-demo-status]'), originalStatus = status?.textContent ?? '';
|
|
7
|
+
const positions = [[20, 30], [80, 30], [70, 75], [30, 70]];
|
|
8
|
+
let destroyed = false, step = -1;
|
|
9
|
+
function center() { surface.style.setProperty('--pointer-x', '50%'); surface.style.setProperty('--pointer-y', '50%'); }
|
|
10
|
+
function point(x, y) {
|
|
11
|
+
if (destroyed) return;
|
|
12
|
+
if (!motionAllowed()) { center(); return; }
|
|
13
|
+
surface.style.setProperty('--pointer-x', `${Math.round(Math.max(0, Math.min(100, x)) * 100) / 100}%`);
|
|
14
|
+
surface.style.setProperty('--pointer-y', `${Math.round(Math.max(0, Math.min(100, y)) * 100) / 100}%`);
|
|
15
|
+
}
|
|
16
|
+
function moved(event) {
|
|
17
|
+
if (destroyed || event.pointerType === 'touch') return;
|
|
18
|
+
const rect = surface.getBoundingClientRect();
|
|
19
|
+
if (!rect.width || !rect.height || !Number.isFinite(event.clientX) || !Number.isFinite(event.clientY)) { center(); return; }
|
|
20
|
+
point((event.clientX - rect.left) / rect.width * 100, (event.clientY - rect.top) / rect.height * 100);
|
|
21
|
+
}
|
|
22
|
+
function left() { if (!destroyed) center(); }
|
|
23
|
+
function clicked() {
|
|
24
|
+
if (destroyed) return;
|
|
25
|
+
step = (step + 1) % positions.length; point(...positions[step]);
|
|
26
|
+
if (status) status.textContent = motionAllowed() ? `يورۇقلۇق ئورنى ئۆزگەردى · ${step + 1}` : 'ھەرىكەت ئازايتىلدى؛ يورۇقلۇق مەركەزدە.';
|
|
27
|
+
}
|
|
28
|
+
function reset() { if (destroyed) return; step = -1; center(); if (status) status.textContent = originalStatus; }
|
|
29
|
+
function syncMotion() { if (!destroyed) center(); }
|
|
30
|
+
surface.addEventListener('pointermove', moved); surface.addEventListener('pointerleave', left); button.addEventListener('click', clicked);
|
|
31
|
+
center();
|
|
32
|
+
return { syncMotion, reset, destroy() { if (destroyed) return; reset(); destroyed = true; surface.removeEventListener('pointermove', moved); surface.removeEventListener('pointerleave', left); button.removeEventListener('click', clicked); } };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function tilt(root, { motionAllowed = () => !root.ownerDocument.defaultView.matchMedia('(prefers-reduced-motion: reduce)').matches } = {}) {
|
|
36
|
+
const card = root.querySelector('[data-tilt-card]'), button = root.querySelector('button[data-action="tilt"]');
|
|
37
|
+
if (!card || !button) throw new TypeError('Tilt needs a card and a button.');
|
|
38
|
+
const depth = root.querySelector('input[data-setting="depth"]');
|
|
39
|
+
const status = root.querySelector('[data-demo-status]'), originalStatus = status?.textContent ?? '';
|
|
40
|
+
const initialDepth = Math.max(8, Math.min(20, Number.isFinite(Number(depth?.value)) ? Number(depth.value) : 12));
|
|
41
|
+
let destroyed = false, x = 0, y = 0, posed = false, pointer = null;
|
|
42
|
+
const bounded = (value) => Math.round(Math.max(-12, Math.min(12, value)) * 100) / 100;
|
|
43
|
+
function sensitivity() {
|
|
44
|
+
const value = Number(depth?.value), result = Math.max(8, Math.min(20, Number.isFinite(value) ? value : initialDepth));
|
|
45
|
+
if (depth) depth.value = String(result);
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
function pose(nextX, nextY) {
|
|
49
|
+
if (destroyed) return;
|
|
50
|
+
const allowed = motionAllowed(); x = allowed ? bounded(nextX) : 0; y = allowed ? bounded(nextY) : 0;
|
|
51
|
+
card.style.setProperty('--tilt-x', `${x}deg`); card.style.setProperty('--tilt-y', `${y}deg`);
|
|
52
|
+
}
|
|
53
|
+
function neutral() { if (!destroyed) { pointer = null; posed = false; pose(0, 0); } }
|
|
54
|
+
function moved(event) {
|
|
55
|
+
if (destroyed || event.pointerType === 'touch') return;
|
|
56
|
+
const rect = card.getBoundingClientRect();
|
|
57
|
+
if (!rect.width || !rect.height || !Number.isFinite(event.clientX) || !Number.isFinite(event.clientY)) { neutral(); return; }
|
|
58
|
+
pointer = [Math.max(0, Math.min(1, (event.clientX - rect.left) / rect.width)), Math.max(0, Math.min(1, (event.clientY - rect.top) / rect.height))];
|
|
59
|
+
const amount = sensitivity(); pose((.5 - pointer[1]) * amount * 2, (pointer[0] - .5) * amount * 2);
|
|
60
|
+
}
|
|
61
|
+
function keyed(event) {
|
|
62
|
+
if (destroyed || !['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(event.key)) return;
|
|
63
|
+
event.preventDefault(); pointer = null;
|
|
64
|
+
pose(x + (event.key === 'ArrowUp' ? 2 : event.key === 'ArrowDown' ? -2 : 0), y + (event.key === 'ArrowRight' ? 2 : event.key === 'ArrowLeft' ? -2 : 0));
|
|
65
|
+
if (status) status.textContent = motionAllowed() ? 'كارتىنىڭ يانتۇ ھالىتى ئۆزگەردى.' : 'ھەرىكەت ئازايتىلدى؛ كارتا تۈز ھالەتتە.';
|
|
66
|
+
}
|
|
67
|
+
function clicked() {
|
|
68
|
+
if (destroyed) return;
|
|
69
|
+
pointer = null; posed = !posed; const amount = sensitivity(); pose(posed ? -Math.min(8, amount) : 0, posed ? Math.min(10, amount) : 0);
|
|
70
|
+
if (status) status.textContent = motionAllowed() ? (posed ? 'كارتا يانتۇ ھالەتتە.' : 'كارتا تۈز ھالەتتە.') : 'ھەرىكەت ئازايتىلدى؛ كارتا تۈز ھالەتتە.';
|
|
71
|
+
}
|
|
72
|
+
function depthChanged() {
|
|
73
|
+
if (destroyed) return;
|
|
74
|
+
const amount = sensitivity();
|
|
75
|
+
if (pointer) pose((.5 - pointer[1]) * amount * 2, (pointer[0] - .5) * amount * 2);
|
|
76
|
+
if (status) status.textContent = `چوڭقۇرلۇق: ${amount}`;
|
|
77
|
+
}
|
|
78
|
+
function reset() { if (destroyed) return; if (depth) depth.value = String(initialDepth); neutral(); if (status) status.textContent = originalStatus; }
|
|
79
|
+
function syncMotion() { neutral(); }
|
|
80
|
+
card.addEventListener('pointermove', moved); card.addEventListener('pointerleave', neutral); card.addEventListener('blur', neutral); card.addEventListener('keydown', keyed); button.addEventListener('click', clicked);
|
|
81
|
+
if (button !== card) { button.addEventListener('blur', neutral); card.addEventListener('click', clicked); }
|
|
82
|
+
depth?.addEventListener('input', depthChanged); reset();
|
|
83
|
+
return { syncMotion, reset, destroy() { if (destroyed) return; reset(); destroyed = true; card.removeEventListener('pointermove', moved); card.removeEventListener('pointerleave', neutral); card.removeEventListener('blur', neutral); card.removeEventListener('keydown', keyed); button.removeEventListener('click', clicked); if (button !== card) { button.removeEventListener('blur', neutral); card.removeEventListener('click', clicked); } depth?.removeEventListener('input', depthChanged); } };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function selection(root, { motionAllowed = () => !root.ownerDocument.defaultView.matchMedia('(prefers-reduced-motion: reduce)').matches } = {}) {
|
|
87
|
+
const win = root.ownerDocument.defaultView, track = root.querySelector('[data-choice-track]');
|
|
88
|
+
const choices = track ? [...track.querySelectorAll('button[data-choice]')] : [], indicator = root.querySelector('[data-selection-indicator]');
|
|
89
|
+
if (!track || !choices.length || !indicator) throw new TypeError('Selection needs a track, choices and an indicator.');
|
|
90
|
+
const status = root.querySelector('[data-demo-status]'), initial = Math.min(1, choices.length - 1);
|
|
91
|
+
const transition = indicator.style.transition;
|
|
92
|
+
let destroyed = false, active = initial, observer;
|
|
93
|
+
function position() {
|
|
94
|
+
if (destroyed) return;
|
|
95
|
+
const bounds = track.getBoundingClientRect(), rect = choices[active].getBoundingClientRect();
|
|
96
|
+
const left = rect.left - bounds.left - (track.clientLeft || 0) + (track.scrollLeft || 0);
|
|
97
|
+
indicator.style.left = `${Number.isFinite(left) ? left : 0}px`;
|
|
98
|
+
indicator.style.width = `${Number.isFinite(rect.width) ? Math.max(0, rect.width) : 0}px`;
|
|
99
|
+
}
|
|
100
|
+
function syncMotion() { if (destroyed) return; indicator.style.transition = motionAllowed() ? transition : 'none'; position(); }
|
|
101
|
+
function choose(index, focus = false) {
|
|
102
|
+
if (destroyed) return;
|
|
103
|
+
active = (index + choices.length) % choices.length;
|
|
104
|
+
choices.forEach((choice, i) => choice.setAttribute('aria-pressed', String(i === active)));
|
|
105
|
+
syncMotion(); if (status) status.textContent = `تاللاندى: ${choices[active].textContent.trim()}`;
|
|
106
|
+
if (focus) choices[active].focus();
|
|
107
|
+
}
|
|
108
|
+
const listeners = choices.map((choice, index) => {
|
|
109
|
+
const click = () => choose(index);
|
|
110
|
+
const keydown = (event) => {
|
|
111
|
+
if (destroyed || !['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) return;
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
const direction = win.getComputedStyle?.(track)?.direction || track.dir || root.dir || root.ownerDocument.documentElement.dir;
|
|
114
|
+
const next = event.key === 'Home' ? 0 : event.key === 'End' ? choices.length - 1 : index + (event.key === 'ArrowRight' ? 1 : -1) * (direction === 'rtl' ? -1 : 1);
|
|
115
|
+
choose(next, true);
|
|
116
|
+
};
|
|
117
|
+
choice.addEventListener('click', click); choice.addEventListener('keydown', keydown);
|
|
118
|
+
return { choice, click, keydown };
|
|
119
|
+
});
|
|
120
|
+
if (typeof win.ResizeObserver === 'function') { observer = new win.ResizeObserver(position); observer.observe(track); choices.forEach((choice) => observer.observe(choice)); }
|
|
121
|
+
else win.addEventListener('resize', position);
|
|
122
|
+
function reset() { choose(initial); }
|
|
123
|
+
reset();
|
|
124
|
+
return { syncMotion, reset, destroy() { if (destroyed) return; destroyed = true; observer?.disconnect(); if (!observer) win.removeEventListener('resize', position); listeners.forEach(({ choice, click, keydown }) => { choice.removeEventListener('click', click); choice.removeEventListener('keydown', keydown); }); indicator.style.transition = transition; } };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function send(root, { motionAllowed = () => !root.ownerDocument.defaultView.matchMedia('(prefers-reduced-motion: reduce)').matches } = {}) {
|
|
128
|
+
const win = root.ownerDocument.defaultView, button = root.querySelector('button[data-action="send"]'), resetButton = root.querySelector('button[data-action="reset"]');
|
|
129
|
+
if (!button || !resetButton) throw new TypeError('Send needs send and reset buttons.');
|
|
130
|
+
const status = root.querySelector('[data-demo-status]'), originalStatus = status?.textContent ?? '', originalDisabled = button.disabled;
|
|
131
|
+
let destroyed = false, timer = null;
|
|
132
|
+
function cancel() { if (timer !== null) { win.clearTimeout(timer); timer = null; } }
|
|
133
|
+
function finish() { if (destroyed) return; cancel(); root.dataset.phase = 'sent'; button.disabled = true; if (status) status.textContent = 'مىسال تاماملاندى. تورغا ھېچقانداق ئۇچۇر ئەۋەتىلمىدى.'; }
|
|
134
|
+
function clicked() {
|
|
135
|
+
if (destroyed || button.disabled || root.dataset.phase !== 'ready') return;
|
|
136
|
+
root.dataset.phase = 'sending'; button.disabled = true;
|
|
137
|
+
if (status) status.textContent = 'يەرلىك ھەرىكەت كۆرسىتىلىۋاتىدۇ…';
|
|
138
|
+
if (!motionAllowed()) finish(); else timer = win.setTimeout(finish, 900);
|
|
139
|
+
}
|
|
140
|
+
function reset() { if (destroyed) return; cancel(); root.dataset.phase = 'ready'; button.disabled = originalDisabled; if (status) status.textContent = originalStatus; }
|
|
141
|
+
function syncMotion() { if (!destroyed && root.dataset.phase === 'sending' && !motionAllowed()) finish(); }
|
|
142
|
+
button.addEventListener('click', clicked); resetButton.addEventListener('click', reset); reset();
|
|
143
|
+
return { syncMotion, reset, destroy() { if (destroyed) return; reset(); destroyed = true; button.removeEventListener('click', clicked); resetButton.removeEventListener('click', reset); } };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function compare(root, { motionAllowed = () => !root.ownerDocument.defaultView.matchMedia('(prefers-reduced-motion: reduce)').matches } = {}) {
|
|
147
|
+
const input = root.querySelector('input[data-setting="compare"]');
|
|
148
|
+
if (!input) throw new TypeError('Compare needs a native range input.');
|
|
149
|
+
const status = root.querySelector('[data-demo-status]');
|
|
150
|
+
const bounded = (value) => Math.round(Math.max(0, Math.min(100, Number.isFinite(Number(value)) ? Number(value) : 50)) * 100) / 100;
|
|
151
|
+
const initial = bounded(input.value);
|
|
152
|
+
let destroyed = false;
|
|
153
|
+
function update() { if (destroyed) return; const value = bounded(input.value); input.value = String(value); root.style.setProperty('--split', `${value}%`); if (status) status.textContent = `سېلىشتۇرۇش: ${value}٪`; }
|
|
154
|
+
function reset() { if (destroyed) return; input.value = String(initial); update(); }
|
|
155
|
+
function syncMotion() { if (!destroyed) update(); }
|
|
156
|
+
input.addEventListener('input', update); reset();
|
|
157
|
+
return { syncMotion, reset, destroy() { if (destroyed) return; destroyed = true; input.removeEventListener('input', update); } };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function ripple(root, { motionAllowed = () => !root.ownerDocument.defaultView.matchMedia('(prefers-reduced-motion: reduce)').matches } = {}) {
|
|
161
|
+
const win = root.ownerDocument.defaultView, button = root.querySelector('button[data-action="ripple"]');
|
|
162
|
+
if (!button) throw new TypeError('Ripple needs a button.');
|
|
163
|
+
const status = root.querySelector('[data-demo-status]'), originalStatus = status?.textContent ?? '';
|
|
164
|
+
let destroyed = false, timer = null, pulse = 'b', count = 0;
|
|
165
|
+
function clear() { if (timer !== null) { win.clearTimeout(timer); timer = null; } root.dataset.phase = 'ready'; }
|
|
166
|
+
function clicked() {
|
|
167
|
+
if (destroyed) return;
|
|
168
|
+
clear(); count++;
|
|
169
|
+
pulse = pulse === 'a' ? 'b' : 'a'; root.dataset.pulse = pulse;
|
|
170
|
+
if (!motionAllowed()) { if (status) status.textContent = `ھەرىكەت ئازايتىلدى؛ كۇنۇپكا ئىشلىدى · ${count}`; return; }
|
|
171
|
+
root.dataset.phase = 'active';
|
|
172
|
+
if (status) status.textContent = `تەسىر قوزغىتىلدى · ${count}`;
|
|
173
|
+
timer = win.setTimeout(() => { if (!destroyed) clear(); }, 1400);
|
|
174
|
+
}
|
|
175
|
+
function reset() { if (destroyed) return; clear(); delete root.dataset.pulse; pulse = 'b'; count = 0; if (status) status.textContent = originalStatus; }
|
|
176
|
+
function syncMotion() { if (!destroyed) clear(); }
|
|
177
|
+
button.addEventListener('click', clicked); reset();
|
|
178
|
+
return { syncMotion, reset, destroy() { if (destroyed) return; reset(); destroyed = true; button.removeEventListener('click', clicked); } };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const interactionBindings = Object.freeze({ spotlight, tilt, selection, send, compare, ripple });
|
|
182
|
+
|
|
183
|
+
export { spotlight as bindSpotlight, tilt as bindTilt, selection as bindSelection, send as bindSend, compare as bindCompare, ripple as bindRipple };
|
package/src/map-data.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Generated by scripts/build-map.mjs from public-domain Natural Earth data.
|
|
2
|
+
// All source vertices retained; see assets/maps/east-turkistan.metadata.json.
|
|
3
|
+
export const MAP_VIEWBOX = "0 0 1024 906";
|
|
4
|
+
export const MAP_PATH = "M212.53 811.75L211.43 811.44L210.47 810.55L209.67 809.35L209.04 808.1L207.91 807.9L207.35 807.95L206.81 808.16L205.51 809.23L204.37 809.95L203.15 810.22L197.2 809.12L196.89 809.06L195.38 809.13L192.7 809.57L191.47 809.43L190.13 808.63L188.17 806.83L187.14 806.25L185.87 806.09L182.78 806.52L181.25 806.4L179.73 805.68L179.18 805.12L178.29 803.81L177.74 803.29L176.94 803.01L176.03 803.04L174.29 803.37L172.58 803.32L171.71 803.12L170.92 802.75L170.25 802.12L169.26 800.54L168.67 799.82L167.89 799.45L166.13 799.57L165.9 799.55L165.31 799.49L164.55 799.04L164.03 798.38L163.02 796.83L161.65 795.71L158.6 794.46L157.19 793.58L156.36 791.72L156.96 787.1L156.54 785.26L155.77 785L154.21 786.75L153.21 787.11L152.26 787.14L151.8 787.22L151.34 787.38L150.93 787.73L150.42 788.72L150.12 789.05L149.32 789.21L148.57 789.06L147.83 789.05L146.27 790.27L145.62 790.27L144.95 790L144.1 789.8L143.12 789.93L141.12 790.53L140.12 790.46L138.94 789.3L138.51 787.29L138.34 784.94L137.95 782.77L136.91 780.71L135.71 779.94L132.46 779.71L131.14 779.05L129.84 777.67L128.9 775.86L128.66 773.94L128.96 773.02L129.51 772.43L131.61 770.96L131.92 770.67L132.13 770.23L132.16 769.6L131.82 768.59L131.85 767.98L132.42 767.24L133.18 766.86L133.72 766.39L133.62 765.38L133.19 764.63L132.13 763.18L131.8 762.33L131.79 760.07L132.59 755.56L132.32 754.19L132.14 753.26L132.13 753.21L127.84 744.31L126.78 742.88L124.28 740.43L121.68 738.42L118.35 736.67L115 735.95L112.37 737.04L112.11 737.59L111.98 738.17L111.72 738.56L109.16 738.44L108.26 737.05L107.96 734.93L107.87 732.6L107.58 730.42L106.88 728.71L105.76 727.49L104.16 726.76L99.17 725.62L97.74 724.75L96.55 723.58L95.94 723.21L95.17 723.05L91.56 723.6L89.97 723.61L88.51 724.02L87.78 724.37L87.17 724.84L86.76 725.56L86.39 727.2L86.13 727.74L85.56 727.99L85.33 727.45L85.08 725.73L84.76 725.04L83.54 723.05L83.54 723.05L82.2 721.86L79.1 721.78L77.97 720.68L77.36 719.78L76.71 719.62L75.18 720.29L72.46 721.03L71.65 721.49L70.67 721L70.1 720.05L69.61 718.94L68.87 718L66.25 716.6L64.91 715.53L64.21 714.33L64.31 713.24L64.89 712.95L66.5 713.18L67.4 713.04L68.03 712.65L68.49 711.94L68.87 710.8L69.32 709.89L69.86 709.57L71.22 709.54L73.06 708.97L73.65 708.91L73.93 709.05L74.46 709.65L74.71 709.76L75.06 709.62L75.22 709.42L75.34 709.19L75.89 708.62L76.03 708.25L76.23 707.98L77.07 707.89L77.29 707.75L78.25 706.81L78.69 706.21L79.2 705.82L79.87 705.91L80.15 706.35L81.81 710.25L82.26 710.58L83.06 710.49L86.4 709.6L87.26 709.15L87.73 708.23L88.12 707.25L88.9 706.75L89.91 706.58L93.83 705L94.2 704.32L94.3 702.22L94.82 701.24L95.81 700.71L97.87 699.98L96.53 698.97L95.33 697.71L93.2 694.69L92.46 693.98L88.64 691.59L87.36 690.33L86.39 688.71L85.98 686.71L86.14 685.63L86.6 684.83L87.19 684.11L87.72 683.26L87.86 682.79L87.94 682.29L88.07 681.77L88.36 681.24L89.02 680.28L89.33 679.7L89.48 679.16L89.32 678.14L88.81 677.58L86.66 676.32L86.36 676.01L86.14 675.58L86.02 674.83L86.19 674.54L86.5 674.36L87.22 673.13L87.31 672.73L86.95 672.38L86.47 672.08L86.34 671.77L86.36 671.4L86.26 669.89L86.43 666.31L85.9 664.74L82.93 662.95L82.12 661.35L81.3 654.83L81.29 649.42L81.45 648.4L81.85 647.49L83.64 645.36L84.12 644.44L84.37 643.4L84.38 642.29L84.08 640.67L84.02 640.14L83.9 639.66L83.61 639.32L82.87 638.86L82.56 638.57L82.18 637.95L82.18 637.94L82.18 637.93L81.51 636.99L80.84 636.46L80.07 636.28L79.1 636.37L78.14 636.23L77.43 635.61L76.79 634.81L76.02 634.13L68.87 631.23L62.87 628.12L61.99 627.99L59.05 629.07L58.11 629.1L57.29 628.95L54.7 627.99L53.98 627.98L53.37 628.38L52.78 629.32L52.68 629.78L52.69 630.29L52.63 630.76L52.33 631.12L50.67 631.72L50.35 632.01L50.38 633.1L50.92 634.04L51.25 634.93L50.69 635.87L49.99 636.05L45.94 635.91L45.28 635.49L44.01 634.24L43.28 633.8L41.75 633.17L41.03 632.68L40.23 631.76L39.86 630.87L39.46 628.5L39.17 627.69L37.66 625.02L37.5 624.14L37.77 621.64L37.64 620.55L37.17 619.74L35.94 618.29L35.43 617.45L35.31 616.43L35.66 615.4L36.25 614.5L36.85 613.84L37.81 613.37L39.83 613.36L40.74 613.04L41.35 612.35L41.57 611.48L41.44 610.53L41.01 609.57L40.41 609.14L39.02 607.52L36.52 605.51L36.04 604.77L35.78 603.86L35.4 601.91L35.02 601.13L33.23 599.28L32.24 597.46L32 595.84L32.33 594.16L33.65 590.19L33.75 589.29L33.7 588.12L33.25 584.89L33.28 583.78L41.21 582.65L41.95 582.23L42.36 581.43L42.84 579.47L43.31 578.19L43.84 577.37L44.53 576.79L45.47 576.19L45.69 575.58L44.74 572.53L44.54 570.09L44.28 568.91L43.69 567.91L42.87 567.39L42.16 567.21L41.58 566.83L41.17 565.71L41.12 564.61L41.31 563.5L41.69 562.48L42.2 561.66L43.42 560.6L43.74 560.13L43.94 559.48L44.27 557.12L44.88 556L45.71 555.12L46.41 554.17L46.65 552.83L46.75 552L47 551.26L47.36 550.58L47.79 550L48.94 549.02L51.71 548.63L53.04 548L54.38 547.06L55.84 546.44L57.34 546.24L58.81 546.58L60.26 547.15L61.55 547.36L62.85 547.15L64.37 546.47L68.87 542.69L72.62 538.46L74.02 537.37L75.66 536.47L76.37 535.93L78.54 533.67L79.33 533.32L80.26 533.38L83.81 534.32L85.13 533.96L84.78 532.11L84.27 531.36L82.28 529.46L81.98 528.6L82.28 527.46L82.81 526.27L83.15 525.23L83.19 525.03L83.36 524.44L83.87 523.64L84 523.44L84.89 523.35L85.85 523.81L89.52 526.41L91.05 527.09L92.59 527.44L93.66 527.29L95.72 526.32L96.77 526.15L97.55 526.47L98.34 527.04L99.12 527.43L99.91 527.24L100.23 526.77L100.39 526.23L100.61 525.78L101.13 525.57L101.63 525.46L102.05 525.22L111.26 517.62L113.03 516.54L114.56 516.56L115.73 517.75L116.49 520.16L116.7 523.37L117.01 524.44L117.47 525.16L118.66 526.31L119.07 526.92L119.17 527.94L118.76 528.69L118.2 529.47L117.86 530.56L117.94 531.63L118.62 534.14L118.98 535.12L119.7 535.92L120.65 535.84L122.6 534.98L123.5 534.87L124.42 534.94L127.15 535.66L128.08 535.72L128.98 535.51L129.81 534.93L130.5 533.96L130.98 533L131.53 532.2L135.29 530.33L136.33 530.23L137.13 530.49L138.71 531.39L139.5 531.58L140.92 530.67L142.2 528.83L143.41 527.44L144.65 527.84L145.07 528.79L145.74 532.29L146.34 532.99L147.04 532.72L148.38 531.37L152.06 528.89L153.21 527.72L154.16 526.11L155.52 522.11L156.58 520.37L158.82 518.59L159.3 517.78L159.44 516.86L159.72 511.11L160.44 509.07L161.55 507.33L162.94 506.08L164.61 505.12L165.27 504.41L165.62 503.27L165.52 502.14L165.21 501.03L165.06 499.94L165.45 498.86L166.18 498.16L167.73 496.98L168.33 496.09L169.43 494.98L171.08 494.26L175.61 493.22L176.77 493.44L179.02 494.61L180.3 495.06L185.54 495.4L187.99 494.63L189.33 494.55L191.68 495.06L194.06 496.08L195.32 496.74L196.52 496.8L199.78 495.86L201.93 495.96L202.71 495.89L203.36 495.65L208.92 492.62L210.34 492.15L211.84 492.09L217.36 492.9L219 493.68L219.87 493.78L220.62 493.48L224.88 489.74L225.49 489.04L226.08 488.14L227.22 485.92L228.02 484.35L229.07 482.74L229.76 482.06L231.44 481.04L232.2 480.38L232.63 479.41L232.51 478.39L231.77 476.2L231.94 475.18L232.64 474.3L233.39 473.79L235.07 473L238.98 469.94L242.09 469.28L243.57 468.59L243.99 468.03L244.34 466.62L244.66 466.01L245.22 465.51L245.81 465.17L251.51 462.9L255.31 460.19L256.08 459.79L258.63 459.3L263.37 455.86L265.03 455.19L266.99 454.72L267.89 454.33L268.81 453.66L270.8 451.77L271.54 451.26L272.46 451.03L275.13 451.89L276.11 451.88L276.96 451.54L280.29 449.23L283.02 448.19L285.4 446.49L287.29 446.02L289.28 446.07L291.16 445.8L292.66 444.36L293.06 443.36L293.53 441.25L293.91 440.25L294.5 439.42L295.18 438.87L296.72 438.23L298.89 437.66L309.47 437.79L311.55 437.07L312.67 435.27L312.62 434.19L312.24 433.39L311.72 432.68L311.28 431.85L311.07 430.93L310.94 429.08L310.67 428.22L312.31 427.35L312.79 426.69L313.12 425.47L312.33 421.39L311.74 420.56L311.31 419.74L311.03 418.84L310.08 414.32L310.02 413.65L310.5 412.54L310.75 411.81L310.68 411.12L310.24 410.13L309.13 408.51L308.65 407.63L308.28 405.41L307.94 404.53L307.71 403.63L307.87 402.39L308.23 401.5L309.77 399.16L310.46 397.49L311.4 394.09L312.27 392.66L312.97 392.24L313.69 392.29L315.16 392.69L315.89 392.61L317.9 391.8L318.69 391.14L321.88 389.95L324.02 389.7L324.94 389.13L325.19 387.97L324.7 386.96L323.81 386.46L321.88 386.19L319 384.8L317.57 383.64L316.78 382.2L317.33 380.61L319.1 379.47L322.8 377.91L326.09 375.45L327.89 374.61L329.64 374.69L331.78 376.28L332.65 376.49L333.58 376.33L334.42 375.82L335.03 374.96L335.26 373.75L335.04 372.68L334.07 370.88L333.85 369.81L333.82 368.71L333.68 367.61L333.37 366.62L332.82 365.84L331.15 365.02L329.57 364.6L328.91 363.72L331.08 359.83L331.75 358.06L331.86 356.19L326.87 343.38L321.88 330.58L320.35 328.38L319.65 327.06L319.21 325.87L319.21 325.86L319.19 324.71L319.09 323.67L318.83 322.71L318.35 321.77L316.98 320.41L316.36 319.63L316.1 318.59L316.4 316.46L317.54 312.37L317.53 310.15L315.84 301.8L315.74 299.77L316.05 297.45L317.18 293.15L317.83 291.93L317.99 291.27L317.71 290.56L316.95 289.59L316.75 289.06L316.81 288.43L317.67 287.39L319.14 286.73L321.88 286.12L322.55 285.66L322.78 284.91L322.56 284.17L321.88 283.75L315.07 281.2L312.91 279.55L312.13 279.18L311.01 279.06L303.46 280.62L301.46 280.44L296.26 277.28L295.18 275.91L295.82 274.2L296.67 273.57L298.63 272.61L302.81 269.12L304.41 267.66L306.16 266.91L308.03 266.78L311.04 267.26L314.06 266.11L317.2 266.28L318.25 266.14L318.94 265.52L319.73 263.51L320.58 262.82L321.52 262.7L324.44 263L331.2 260.58L333.25 260.55L336.7 261.6L337.81 261.56L342.96 259.59L344.9 259.56L346.61 258.96L350.06 257.12L366.83 252.09L370.23 249.76L372.03 248.99L373.7 249.45L375.15 249.55L376.24 251.27L376.93 253.6L377.18 255.55L377.23 256.87L377.44 257.63L378.02 258.03L380.89 258.46L381.55 258.88L382.36 259.77L384.04 260.54L386.17 260.02L394.23 256.13L396.49 255.58L398.57 255.79L400.56 257.11L404.17 260.95L406.21 262.17L408.91 261.72L410.83 258.7L412.06 254.63L412.88 249.48L412.98 247.23L412.8 245.14L412.11 244.03L407.78 242.3L401.44 241.43L399.97 240.74L399.96 240.74L399.96 240.74L398.44 238.48L398.68 237.27L398.99 235.66L400.32 232.69L401.84 227.07L405.02 221.89L406.21 219.18L406.77 217.57L407.9 212.38L409 204.52L410.11 200.84L411.78 197.5L414.59 193.2L415.22 191.41L415.72 188.33L416 187.35L417.67 183.99L421.53 170.42L427.71 158.5L427.97 157.58L428.04 156.62L427.83 155.64L427.71 154.53L427.9 153.41L428.55 151.28L428.58 150.66L428.3 149.56L428.24 148.98L428.37 148.35L428.83 147.14L428.96 146.48L428.89 144.2L429.22 143.55L430.3 143.06L431.34 142.84L432.5 142.77L433.65 142.89L434.66 143.24L436.83 145.01L437.68 145.48L441.57 146.28L443.22 147.01L450.44 151.43L466.5 156.72L470.46 156.7L473.43 157.26L474.45 157.09L477.15 155.64L477.16 155.63L477.18 155.63L477.2 155.62L481.7 155.23L486.88 155.64L486.91 155.63L487.61 155.57L488.28 155.63L490.55 156.64L492.46 156.95L496.47 156.02L498.47 156.16L499.98 156.93L501.35 158.2L502.19 159.89L502.1 161.91L501.64 162.83L501.04 163.74L500.67 164.59L500.84 165.38L501.68 165.75L502.84 165.56L505.92 164.37L509.12 163.72L510 163.13L510.95 161.43L511.64 160.8L512.26 160.48L514.15 160.06L514.7 159.74L515.92 158.46L518.82 156.48L519.72 155.64L520.74 153.92L521.31 153.33L522.19 152.88L523.04 152.72L525.47 153L530.89 152.22L533.69 152.3L533.99 151.61L534.09 150.56L534.46 149.55L535 148.75L535.38 147.98L535.61 147.11L535.73 146.04L536.14 145.1L537.02 144.51L538.03 144.21L539.96 144.01L540.48 143.52L540.68 142.68L540.85 141.51L541.3 139.64L541.3 138.74L540.93 137.7L540.8 136.74L541.09 135.7L541.29 134.59L540.93 133.43L537.97 128.95L537.31 127.27L537.31 127.26L537.12 125.52L537.79 121.71L537.77 119.83L534.4 103.02L534.5 101.63L534.96 100.39L535.73 98.89L536.35 96.75L537.39 90.48L542.97 78.13L544.18 76.35L545.71 75.36L555.09 74.12L562.93 74.76L565.24 73.67L566.91 71.84L567.8 71.08L568.91 70.66L572.99 70.92L577.88 69.14L578.66 68.57L579.09 67.86L579.87 65.91L580.37 65L581.03 64.26L583.05 62.5L586.23 58.57L586.55 57.89L586.54 57.11L586.06 54.7L586.01 54.03L586.3 53.5L587.08 52.66L588.13 50.87L587.46 49.77L586.12 48.63L585.12 46.71L584.84 45.32L584.75 44.34L584.94 43.45L585.51 42.29L586.19 41.31L586.89 40.6L588.53 39.35L589.25 38.43L590.18 36.42L591.08 35.77L592.25 35.68L594.75 36.38L595.97 36.5L601.91 34.38L603.84 34.78L605.47 35.57L610.66 36.91L612.28 37.48L613.89 37.71L615.49 37.51L617.06 36.77L617.32 36.54L617.55 36.24L617.74 35.89L618.09 34.98L618.35 34.88L618.68 34.96L619.16 34.95L627.22 32.73L631.43 32.33L631.51 33.01L632.11 34.71L632.24 36.03L631.99 36.86L631.63 37.67L631.42 38.87L631.67 40.11L632.34 40.59L633.14 40.86L633.79 41.51L633.8 43.56L632.26 44.81L628.93 46.26L628.37 47.13L628.03 48.17L628.12 49.16L628.83 49.84L629.76 50.19L630.22 50.45L630.58 50.84L630.76 51.37L630.83 52.55L630.99 53.06L631.63 53.76L632.5 54.27L635.28 55.43L637.17 55.3L638.14 55.59L640.6 57.12L641.68 58.31L641.87 59.76L641.5 60.28L639.61 61.41L639.32 61.83L639.08 62.45L638.74 63.07L638.14 63.51L636.77 64.47L637.15 65.85L638.46 67.15L639.88 67.86L640.37 67.87L641.37 67.67L641.81 67.68L642.21 67.92L642.9 68.64L644.06 69.18L645.43 70.15L646.18 70.47L646.92 70.53L648.36 70.4L649.11 70.5L652.03 71.88L653.18 72.73L655.35 75.3L656.75 76.13L657.72 76.15L658.54 75.9L659.38 75.78L660.38 76.22L663.01 79.03L663.34 80.03L662.74 82.14L662.85 83.27L663.17 84.35L663.36 85.46L663.67 86.46L664.32 87.27L665.99 88.51L666.82 88.78L667.88 88.67L669.08 89.05L671.87 91.65L673.14 92.48L674.24 92.52L676.68 92.2L677.84 92.48L678.5 92.99L683.27 98.89L683.28 98.89L683.29 98.9L684.5 99.39L688.4 99.4L690.57 99.8L691.64 99.61L692.68 98.88L693.4 98.17L695.45 96.66L696.29 96.29L696.92 96.33L698.61 97.18L699.29 97.26L701.4 97.19L702.59 96.79L704.2 96.73L705.47 97.33L705.65 98.9L705.63 99.85L705.95 100.65L706.51 101.18L707.22 101.35L707.81 101.67L708.18 102.49L708.5 103.44L708.98 104.18L709.69 104.5L711.18 104.79L711.86 105.41L712.18 106.17L712.57 107.79L713.03 108.46L714.39 108.79L718.84 108.46L720.2 108.02L720.76 107.33L720.89 106.58L720.95 105.82L721.27 105.12L721.97 104.81L723.63 105.28L725.4 105.31L726.04 105.94L726.23 106.97L725.88 108.2L725.72 109.23L726 110.44L726.5 111.55L727.01 112.33L728.58 113.81L730.41 114.95L732.36 115.76L736.26 116.74L737.16 117.21L738.06 117.86L738.26 118.48L737.75 119.09L737.33 119.88L737.8 121.03L738.37 121.85L739.61 124.69L740.16 125.47L741.54 126.49L742.13 127.26L742.23 128.98L742.15 130.81L742.42 132.31L743.56 133.05L744.07 133.78L744.19 134.71L744 135.67L743.56 136.5L743.28 136.88L743.19 137.29L743.29 137.71L753.55 154.41L754.83 155.7L756.49 156.02L757.49 155.99L758.45 156.24L759.34 156.76L760.2 157.49L760.85 158.38L761.21 159.32L761.49 160.31L761.9 161.35L762.22 161.74L762.57 162.01L762.86 162.34L763.01 162.93L762.93 163.36L762.43 164.23L762.32 164.68L762.54 165.84L763.14 166.65L764.64 168.06L765.9 169.97L766.35 172.08L766.3 172.84L766.19 174.37L765.61 176.79L765.52 178.24L766.17 178.77L767.06 179.08L767.7 179.84L767.6 180.71L767.19 181.96L766.29 184L765.75 185.03L765.11 187.29L764.64 188.35L762.98 192.47L761.73 193.98L761.31 194.85L761.44 196L763.53 202.44L764.64 204.01L765.52 205.53L765.92 208.12L765.8 210.75L765.11 212.38L764.64 212.71L762.29 214.82L753.5 226.05L752.9 227.31L750.98 240.75L751.87 241.74L754.64 243.67L755.29 244.85L755.68 246.51L756.33 248.01L756.86 249.57L756.88 251.47L757.11 252.12L758.83 252.84L759.55 253.38L760.07 254.35L760.04 254.97L759.8 255.59L759.69 256.53L760.35 258.17L761.71 258.18L764.64 256.54L766.17 256.31L768.09 256.39L769.97 256.78L771.39 257.51L771.92 258.11L772.85 259.45L773.47 260.01L776.2 261.37L780.31 262.28L781.15 262.25L781.87 261.69L782.55 260.97L783.27 260.47L784.18 260.44L784.92 260.93L787.7 264.34L788.21 264.7L788.6 264.66L788.98 264.46L789.48 264.36L793.65 265.36L794.52 265.26L796.25 264.72L797.19 264.62L804.45 265.01L806.81 264.57L808.26 264.41L809.68 264.49L811.05 264.83L812.44 265.43L816.03 267.91L817.1 268.16L819.16 267.63L819.9 267.63L821.82 268.29L822.51 268.3L824.58 267.99L825.32 268.1L827.22 268.85L827.9 268.88L831.99 268L834.79 267.85L839.61 266.58L841.56 266.85L842.2 266.81L843.61 266.52L844.18 266.59L846.5 267.91L847.72 268.4L848.98 268.47L849.8 268.26L850.62 268.21L851.43 268.3L852.25 268.54L853.24 268.44L855.9 268.18L857.02 268.3L860.33 269.78L861.38 269.86L863.41 269.54L864.42 269.59L865.27 269.96L866.9 270.97L867.77 271.28L872.19 271.5L879.06 274.92L880.15 275.85L886.92 284.95L889.15 287.3L891.16 288.03L894.68 288.52L896.58 288.5L898.49 287.62L899.18 287.7L899.88 287.98L900.43 288.35L903.91 292.03L904.67 293.06L905.78 295.52L906.48 296.42L907.66 296.86L910.35 296.86L911.62 297.49L917.01 300.73L919.92 303.42L920.57 304.27L921.05 305.24L921.65 305.99L922.61 306.43L930.4 308.78L934.12 310.76L935.93 311.01L950.38 309.19L951.15 309.56L950.79 310.68L949.55 312.33L949.03 313.29L948.74 314.84L948.17 315.93L947.99 316.5L947.94 317.06L948.22 319.91L947.82 323.17L947.83 324.51L948.19 325.1L952.21 326.13L954.41 326.24L955.9 326.67L956.95 327.88L959.23 332.89L963.58 346.45L969.5 359.03L969.86 361.09L970.03 363.7L970.43 366.08L971.25 368.21L972.69 370.05L988.96 386.02L989.99 387.33L990.5 388.49L990.77 389.81L991.34 396.93L991.64 397.86L992 397.95L980.38 405.67L979.63 406.48L979.2 407.24L978.8 408.27L978.4 410.61L977.3 431.11L977.4 433.16L977.61 434.32L978.28 436.5L978.42 437.23L978.42 438.23L978.29 438.78L978.06 439.24L974.53 443.56L970.81 447.21L969.69 447.94L968.36 448.48L966.93 448.64L955.13 447.15L936.84 450.98L916.71 462.52L892.67 489.82L882.08 505.75L880.18 510.29L878.25 513.69L874.39 519.11L872.57 520.64L871.27 521.4L866.81 523.12L863.49 525.4L862.11 525.84L851.59 524.67L849.63 524.79L847.57 525.66L846.91 528.47L846.64 545.77L846.47 547.18L846.13 547.98L840.65 557.83L840.35 558.7L840.16 559.41L840.1 560.28L840.19 561.55L840.44 563.22L847.84 583.54L847.99 584.16L848.1 584.91L848.08 586.97L847.54 591.59L847.31 599.89L847.34 600.55L846.83 600.53L846 600.66L842.07 602.05L829.14 605L824.5 605.38L823.37 605.65L822.36 606.09L821.91 606.39L818.35 609.84L813.04 612.59L806.83 614.51L802.83 616.29L792.2 619.11L786.42 619.59L785.35 619.89L784.35 620.34L780.14 622.85L778.11 623.68L775.22 623.74L774.08 623.95L770.75 625.33L766.22 626.32L762.48 626.08L761.26 626.19L754.52 627.77L753.27 627.86L751.6 627.5L751.32 627.54L751.08 627.72L750.89 628.02L750.72 628.46L750.63 628.85L750.54 629.92L750.47 630.26L750.34 630.54L750.15 630.77L749.94 630.92L747.95 631.9L746.7 632.94L746.15 633.55L743.69 635.75L740.89 637.38L740.44 637.78L739.58 638.38L737.04 639.48L736.7 639.54L734.32 639.08L733.67 639.08L732.19 639.34L731.47 639.64L730.78 640.08L730.24 640.67L729.88 641.41L729.99 642.77L730.47 644.46L731.68 647.49L742.05 666.19L742.23 666.85L742.43 667.9L742.56 669.56L742.43 670.74L742.22 671.62L740.81 674.65L740.69 675.04L740.62 675.42L740.6 675.77L740.64 676.38L740.76 676.84L740.94 677.32L741.34 677.97L741.64 678.29L741.93 678.53L747.52 681.18L752.01 684.71L758.71 688.23L760.07 689.6L761.44 691.31L763.12 692.79L763.89 693.24L768.8 695.03L769.14 695.29L769.54 695.73L770.18 696.72L770.65 697.82L771.01 698.96L772.09 704.37L772.57 705.68L775.6 711.63L778.44 714.94L778.76 715.39L779.03 715.96L779.22 716.68L779.34 717.46L779.44 718.73L779.42 719.71L779.32 720.23L779.14 720.7L778.69 721.35L778.29 721.71L777.82 721.95L773.76 722.63L772.49 723.16L768.01 725.83L765.71 726.62L764.94 726.71L764.16 726.71L761.28 726.16L761.1 726.15L758.85 726.81L758.37 727.05L757.59 727.79L755.82 730.44L753.56 732.85L753.1 733.62L752.88 734.24L752.62 735.41L752.46 737.14L752.54 739.83L752.87 741.98L752.95 742.27L753.14 742.8L753.48 743.36L755.58 745.95L757.48 747.77L758.97 748.62L759.71 748.87L763.03 749.38L764.52 749.82L765.07 750.09L765.47 750.36L765.71 750.56L765.98 750.89L766.73 753.34L768.27 761.67L769.23 764.67L770.66 768.25L771.42 771.48L771.48 772.63L771.43 773.53L771.24 774.29L770.91 774.85L770.39 775.27L769.57 775.52L767.7 775.87L765.94 776.46L762.11 778.71L761.23 779.09L760.42 779.26L759.51 779.19L758.5 778.87L750.62 773.46L749.78 773.16L735.85 772.91L730.51 772.13L730.02 771.95L729.65 771.68L729.36 771.34L729.11 770.91L727.66 767.84L727.03 766.92L726.42 766.22L725.38 765.25L724.77 764.77L724.41 764.79L724.1 765.12L722.65 771.91L722.54 772.73L722.34 773.51L721.94 774.25L721.25 774.92L720.1 775.5L719 775.72L717.9 775.74L709.93 774.81L690.78 764.51L689.98 764.35L686.01 764.58L684.64 764.46L683.04 764.06L681.06 763.92L680.63 763.8L680.29 763.65L679.59 763.16L676.4 759.59L675.08 758.62L674.54 758.37L674.1 758.26L669.19 758.56L661.21 755.95L660.95 755.81L660.72 755.65L660.53 755.47L660.38 755.27L660.29 755.1L660.13 754.9L659.86 754.61L659.2 754.2L658.54 753.99L655.97 753.65L650.85 754.01L645.45 755.15L642.49 755.39L639.18 755.15L638.88 755.22L638.59 755.34L638.18 755.63L637.79 755.98L636.75 757.14L635.99 757.75L634.44 758.52L632.94 758.87L629.3 759.05L621.08 760.52L618.72 760.45L618.12 760.37L616.06 759.64L613.64 758.46L612.36 758.15L611.58 758.24L605.18 762.21L604.59 762.38L599.68 762.88L598.29 763.3L597.42 763.68L597.04 763.91L589.42 764.42L588.02 764.69L584.94 766.33L583.94 766.69L582.72 766.98L579.7 767.17L575.77 766.68L574.86 766.76L574.21 767.01L573.76 767.53L573.29 768.16L572.9 768.82L572.52 769.26L572.18 769.56L571.68 769.81L566.32 771.2L565.18 771.75L564.7 772.05L564.29 772.37L563.79 772.88L563.55 773.37L563.37 774.04L562.93 776.7L562.71 777.51L562.36 778.31L561.97 778.93L561.54 779.45L560.45 780.29L560.26 780.57L560.15 780.84L559.9 781.87L559.58 783.94L559.5 784.22L558.52 786.52L557.93 787.39L556.02 789.31L554.55 791.67L554.27 791.95L553.71 792.39L552.78 792.85L551.88 792.99L545.06 792.37L544.09 792.49L543.4 792.74L542.89 793.12L538.8 797.88L537.89 798.54L537.23 798.88L536.76 798.98L536.36 798.9L536.05 798.64L535.8 798.25L535.58 797.74L535.04 796.02L534.91 795.73L534.75 795.56L531.72 793.68L531.33 793.53L530.77 793.4L529.08 793.27L528.16 793.37L527.07 793.71L525.99 794.25L524.62 794.69L524.08 794.77L523.64 794.76L523.35 794.66L522.11 793.93L521.71 793.81L520.13 793.62L518.98 793.66L509.44 797.09L506.23 800.26L503.29 802.13L495.18 804.05L494.25 804.46L479.54 814.14L477.84 814.83L477.04 814.9L476.11 814.79L475.28 814.46L472.65 812.85L472.14 812.63L471.51 812.48L470.87 812.46L469.83 812.6L465.04 814.96L454.26 815.84L452.14 815.74L451.1 815.41L449.34 814.35L447.41 813.88L443.19 813.85L442.18 813.68L441.45 813.45L440.04 812.76L438.7 812.31L437.86 812.18L437.18 812.22L434.93 813.1L433.45 813.26L432.48 812.79L431.78 812.11L431.01 811.2L430.1 810.39L428.59 809.57L427.7 808.93L427.13 808.38L426.97 807.95L426.93 807.58L426.95 806.92L427.41 802.12L427.33 800.95L427 799.78L426.5 798.92L425.62 797.96L424.63 797.46L423.48 797.12L420.96 796.95L420 797.1L419.23 797.36L417 798.91L416.11 799.31L414.48 799.26L405.48 797.19L404.2 797.07L403.63 797.3L403.04 797.67L401.88 798.66L401.36 798.94L400.42 799.3L399.98 799.68L399.6 800.25L399.4 801.08L399.34 803.14L399.21 803.78L398.99 804.38L398.72 804.84L398.34 805.29L395.52 807.51L389.78 810.79L389.34 811.12L388.94 811.6L388.69 812.01L388.52 812.42L387.99 815.32L387.71 816.24L387.41 816.88L387.1 817.32L386.67 817.75L386.24 818.08L382.96 819.63L373.98 822.27L369.46 822.77L368.29 822.65L367.54 822.32L366.96 821.92L363.45 818.61L362.6 818.11L361.58 817.71L359.9 817.38L359.04 817.35L354.93 818.38L353.8 818.39L352.84 818.23L351.47 817.56L349.48 816.14L348.47 814.99L347.83 814.43L347.08 814.11L346.54 814.16L346.11 814.46L345.77 814.96L345.54 815.58L345.41 816.06L345.38 816.44L345.39 816.84L345.53 818.57L345.46 818.95L345.19 819.2L344.78 819.4L343.97 819.59L343.48 819.62L343.08 819.56L342.1 819.01L339.47 817.06L338.74 816.72L338.01 816.51L337.5 816.45L336.8 816.46L335.16 816.71L334.11 816.72L333.78 816.67L333.18 816.48L332.14 815.95L330.34 814.69L330.08 814.57L329.47 814.4L324.63 814.03L323.39 813.72L322.3 813.27L318.17 810.24L317.22 809.28L317.2 809.26L315.27 807.31L314.97 807.15L313.37 806.27L312.75 807.03L312.71 807.46L312.68 807.74L312.81 808.61L312.88 809.6L312.89 811.49L312.75 812.53L312.52 813.36L311.74 814.92L309.23 821.84L308.78 822.84L308.15 823.76L305.91 826.04L303.35 829.41L302.66 830.55L302.4 831.34L302.4 832.04L302.62 832.56L302.9 833.02L303.21 833.44L303.5 833.9L303.71 834.5L303.78 835.21L303.65 836.14L303.4 836.78L303.04 837.28L302.62 837.61L302.22 837.85L301.85 838L299.76 838.37L299.21 838.55L298.7 838.78L298.14 839.17L297.6 839.73L296.9 840.77L296.75 841.54L296.79 842.23L297.52 843.79L297.7 844.38L297.91 846.52L298.06 847.12L298.29 847.65L299.82 849.95L300.05 850.47L300.21 851.2L300.26 852.05L300.12 853.38L299.96 854.1L299.4 855.28L299.18 855.68L298.17 857.46L296.71 861.73L296.01 863.38L293.12 868.5L292.55 869.18L292.09 869.45L291.56 869.63L290.95 869.68L290.33 869.62L289.88 869.53L289.6 869.41L289.39 869.32L287.21 867.89L285.04 866.93L281.25 866.19L279.92 866.22L278.74 866.48L277.94 866.76L275.7 868.04L275 868.3L273.9 868.51L269.75 867.96L268.86 867.95L268.26 868.02L261.22 871.13L260.77 871.42L259.58 872.65L259.02 873.09L257.82 873.67L257.57 873.14L256.35 871.83L254.82 871.07L252.85 870.44L251.27 869.41L249.12 866.21L245.49 863.09L243.07 861.95L233.46 860.12L231.6 859.23L229.94 857.51L228.98 855.57L226.37 844.82L226 843.83L224.3 841.38L223.71 839.44L223.33 835.14L222.94 833.07L219 825.19L217.51 820.95L217.88 816.49L219.07 813.62L219.81 810.51L219.33 808.31L216.86 808.17L215.68 808.85L213.78 811.19L212.53 811.75Z";
|
|
5
|
+
export const mapMetadata = Object.freeze({
|
|
6
|
+
"id": "east-turkistan",
|
|
7
|
+
"name": {
|
|
8
|
+
"ug": "شەرقىي تۈركىستان",
|
|
9
|
+
"en": "East Turkistan"
|
|
10
|
+
},
|
|
11
|
+
"source": {
|
|
12
|
+
"provider": "Natural Earth",
|
|
13
|
+
"dataset": "10m Admin 1 – States, Provinces",
|
|
14
|
+
"scale": "1:10,000,000",
|
|
15
|
+
"layerVersion": "5.1.1",
|
|
16
|
+
"repositoryRelease": "v5.1.2",
|
|
17
|
+
"repositoryCommit": "f1890d9f152c896d250a77557a5751a93d494776",
|
|
18
|
+
"url": "https://github.com/nvkelso/natural-earth-vector/blob/f1890d9f152c896d250a77557a5751a93d494776/geojson/ne_10m_admin_1_states_provinces.geojson",
|
|
19
|
+
"rawUrl": "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/f1890d9f152c896d250a77557a5751a93d494776/geojson/ne_10m_admin_1_states_provinces.geojson",
|
|
20
|
+
"datasetPage": "https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/",
|
|
21
|
+
"license": "Public domain",
|
|
22
|
+
"licenseUrl": "https://www.naturalearthdata.com/about/terms-of-use/",
|
|
23
|
+
"credit": "Made with Natural Earth.",
|
|
24
|
+
"sourceFeature": {
|
|
25
|
+
"name": "Xinjiang",
|
|
26
|
+
"adm1_code": "CHN-1756",
|
|
27
|
+
"iso_3166_2": "CN-XJ",
|
|
28
|
+
"ne_id": 1159312657
|
|
29
|
+
},
|
|
30
|
+
"globalGeoJSONSHA256": "22d0e3ad85eb3e27f17cabf8ba2d50e554fbc27a87796ff891d958185da62fb5",
|
|
31
|
+
"extractedGeoJSONSHA256": "bffad16acb24e384c0f2c431cec4710f111b54ed3b027c636b31fbe6500e2713",
|
|
32
|
+
"extractedGeoJSON": "east-turkistan.source.geojson",
|
|
33
|
+
"accessed": "2026-11-07"
|
|
34
|
+
},
|
|
35
|
+
"boundaryBasis": {
|
|
36
|
+
"en": "Natural Earth’s Xinjiang admin-1 polygon (CHN-1756 / CN-XJ), layer 5.1.1. This is the dataset’s modern administrative outline, not a reconstruction of historical boundaries.",
|
|
37
|
+
"ug": "Natural Earth نىڭ شىنجاڭ مەمۇرىي رايون پولىگونى (CHN-1756 / CN-XJ)، 5.1.1 نەشرى. بۇ سانلىق مەلۇماتتىكى ھازىرقى مەمۇرىي سىزىق؛ تارىخىي چېگرالارنى قايتا قۇرۇش ئەمەس."
|
|
38
|
+
},
|
|
39
|
+
"geometry": {
|
|
40
|
+
"type": "Polygon",
|
|
41
|
+
"coordinateReferenceSystem": "OGC:CRS84 (WGS 84 longitude, latitude)",
|
|
42
|
+
"bbox": [
|
|
43
|
+
73.602256,
|
|
44
|
+
34.339961,
|
|
45
|
+
96.36634,
|
|
46
|
+
49.165837
|
|
47
|
+
],
|
|
48
|
+
"polygonCount": 1,
|
|
49
|
+
"ringCount": 1,
|
|
50
|
+
"sourceVertexCount": 1835,
|
|
51
|
+
"renderedVertexCount": 1835,
|
|
52
|
+
"simplification": "None. All source vertices, rings and polygon components retained. Projected SVG coordinates rounded to 0.01 viewBox unit (maximum coordinate rounding error 0.005 unit per axis)."
|
|
53
|
+
},
|
|
54
|
+
"projection": {
|
|
55
|
+
"name": "Equirectangular",
|
|
56
|
+
"standardParallel": 42,
|
|
57
|
+
"units": "degrees, then uniformly scaled to the SVG viewBox",
|
|
58
|
+
"orientation": "North up; east right. Never mirror for right-to-left layouts.",
|
|
59
|
+
"viewBox": "0 0 1024 906",
|
|
60
|
+
"width": 1024,
|
|
61
|
+
"height": 906,
|
|
62
|
+
"padding": 32
|
|
63
|
+
},
|
|
64
|
+
"assets": {
|
|
65
|
+
"outline": "east-turkistan-outline.svg",
|
|
66
|
+
"filled": "east-turkistan-filled.svg"
|
|
67
|
+
}
|
|
68
|
+
});
|
package/src/maps.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface MapMetadata {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly name: { readonly ug: string; readonly en: string };
|
|
4
|
+
readonly boundaryBasis: { readonly ug: string; readonly en: string };
|
|
5
|
+
readonly source: { readonly provider: string; readonly dataset: string; readonly scale: string; readonly layerVersion: string; readonly repositoryRelease: string; readonly repositoryCommit: string; readonly url: string; readonly rawUrl: string; readonly datasetPage: string; readonly license: string; readonly licenseUrl: string; readonly credit: string; readonly sourceFeature: { readonly name: string; readonly adm1_code: string; readonly iso_3166_2: string; readonly ne_id: number }; readonly globalGeoJSONSHA256: string; readonly extractedGeoJSONSHA256: string; readonly extractedGeoJSON: string; readonly accessed: string };
|
|
6
|
+
readonly geometry: { readonly type: string; readonly coordinateReferenceSystem: string; readonly bbox: readonly number[]; readonly polygonCount: number; readonly ringCount: number; readonly sourceVertexCount: number; readonly renderedVertexCount: number; readonly simplification: string };
|
|
7
|
+
readonly projection: { readonly name: string; readonly standardParallel: number; readonly units: string; readonly orientation: string; readonly viewBox: string; readonly width: number; readonly height: number; readonly padding: number };
|
|
8
|
+
readonly assets: { readonly outline: string; readonly filled: string };
|
|
9
|
+
}
|
|
10
|
+
export declare const mapMetadata: MapMetadata;
|
|
11
|
+
export declare function mapSVG(options?: { width?: number; variant?: 'outline' | 'filled'; label?: string; color?: string; strokeWidth?: number }): string;
|
package/src/maps.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MAP_VIEWBOX, MAP_PATH, mapMetadata as sourceMetadata } from './map-data.js';
|
|
2
|
+
import { escapeMarkup } from './icons.js';
|
|
3
|
+
|
|
4
|
+
function freeze(value) { if (value && typeof value === 'object') { Object.values(value).forEach(freeze); Object.freeze(value); } return value; }
|
|
5
|
+
export const mapMetadata = freeze(JSON.parse(JSON.stringify(sourceMetadata)));
|
|
6
|
+
|
|
7
|
+
/** A north-up regional outline from the documented Natural Earth polygon. */
|
|
8
|
+
export function mapSVG({ width = 640, variant = 'outline', label = 'شەرقىي تۈركىستان خەرىتىسى / East Turkistan map', color = 'currentColor', strokeWidth = 4 } = {}) {
|
|
9
|
+
if (!Number.isInteger(width) || width < 64 || width > 2048) throw new RangeError('Map width must be an integer from 64 to 2048');
|
|
10
|
+
if (!['outline', 'filled'].includes(variant)) throw new RangeError('Map variant must be outline or filled');
|
|
11
|
+
if (typeof label !== 'string' || label.length > 160) throw new TypeError('Use a map label of at most 160 characters');
|
|
12
|
+
if (typeof color !== 'string' || !/^(?:currentColor|#[\da-fA-F]{3}|#[\da-fA-F]{6})$/.test(color)) throw new TypeError('Map color must be currentColor or a three/six-digit hex color');
|
|
13
|
+
if (!Number.isFinite(strokeWidth) || strokeWidth < .5 || strokeWidth > 12) throw new RangeError('Map stroke width must be from 0.5 to 12');
|
|
14
|
+
const [, , boxWidth, boxHeight] = MAP_VIEWBOX.split(' ').map(Number), height = Math.round(width * boxHeight / boxWidth * 1000) / 1000;
|
|
15
|
+
const description = `${mapMetadata.boundaryBasis.ug} ${mapMetadata.boundaryBasis.en} Made with Natural Earth. Public domain.`;
|
|
16
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="${MAP_VIEWBOX}" preserveAspectRatio="xMidYMid meet" focusable="false" ${label ? `role="img" aria-label="${escapeMarkup(label)}"` : 'aria-hidden="true"'}><desc>${escapeMarkup(description)}</desc><path d="${MAP_PATH}" fill="${variant === 'filled' ? color : 'none'}" fill-rule="evenodd" stroke="${color}" stroke-width="${strokeWidth}" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
17
|
+
}
|