proto-sudoku-wc 0.0.565 → 0.0.566

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.
Files changed (77) hide show
  1. package/dist/cjs/{index-e08d35fd.js → index-7e0298a3.js} +4 -0
  2. package/dist/cjs/index-7e0298a3.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/index.cjs.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +4 -2
  6. package/dist/cjs/loader.cjs.js.map +1 -0
  7. package/dist/cjs/proto-sudoku-wc.cjs.js +7 -2
  8. package/dist/cjs/proto-sudoku-wc.cjs.js.map +1 -0
  9. package/dist/cjs/proto-sudoku.cjs.entry.js +3 -1
  10. package/dist/cjs/proto-sudoku.cjs.entry.js.map +1 -0
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/proto-sudoku/alert.js +1 -0
  13. package/dist/collection/components/proto-sudoku/alert.js.map +1 -0
  14. package/dist/collection/components/proto-sudoku/alerts.js +1 -0
  15. package/dist/collection/components/proto-sudoku/alerts.js.map +1 -0
  16. package/dist/collection/components/proto-sudoku/alien.js +1 -0
  17. package/dist/collection/components/proto-sudoku/alien.js.map +1 -0
  18. package/dist/collection/components/proto-sudoku/button.js +1 -0
  19. package/dist/collection/components/proto-sudoku/button.js.map +1 -0
  20. package/dist/collection/components/proto-sudoku/cell.js +1 -0
  21. package/dist/collection/components/proto-sudoku/cell.js.map +1 -0
  22. package/dist/collection/components/proto-sudoku/eswat2-io.js +1 -0
  23. package/dist/collection/components/proto-sudoku/eswat2-io.js.map +1 -0
  24. package/dist/collection/components/proto-sudoku/fingerprint.js +1 -0
  25. package/dist/collection/components/proto-sudoku/fingerprint.js.map +1 -0
  26. package/dist/collection/components/proto-sudoku/header.js +1 -0
  27. package/dist/collection/components/proto-sudoku/header.js.map +1 -0
  28. package/dist/collection/components/proto-sudoku/keys.js +1 -0
  29. package/dist/collection/components/proto-sudoku/keys.js.map +1 -0
  30. package/dist/collection/components/proto-sudoku/proto-sudoku.js +1 -0
  31. package/dist/collection/components/proto-sudoku/proto-sudoku.js.map +1 -0
  32. package/dist/collection/components/proto-sudoku/spinner.js +1 -0
  33. package/dist/collection/components/proto-sudoku/spinner.js.map +1 -0
  34. package/dist/collection/components/proto-sudoku/sudoku-board.js +1 -0
  35. package/dist/collection/components/proto-sudoku/sudoku-board.js.map +1 -0
  36. package/dist/collection/components/proto-sudoku/tool-bar.js +1 -0
  37. package/dist/collection/components/proto-sudoku/tool-bar.js.map +1 -0
  38. package/dist/collection/components/proto-sudoku/tw-label.js +1 -0
  39. package/dist/collection/components/proto-sudoku/tw-label.js.map +1 -0
  40. package/dist/collection/index.js +1 -0
  41. package/dist/collection/index.js.map +1 -0
  42. package/dist/collection/utils/bag.js +1 -0
  43. package/dist/collection/utils/bag.js.map +1 -0
  44. package/dist/collection/utils/index.js +1 -0
  45. package/dist/collection/utils/index.js.map +1 -0
  46. package/dist/collection/utils/labels.js +1 -0
  47. package/dist/collection/utils/labels.js.map +1 -0
  48. package/dist/collection/utils/store.js +1 -0
  49. package/dist/collection/utils/store.js.map +1 -0
  50. package/dist/collection/utils/tw-version.js +1 -0
  51. package/dist/collection/utils/tw-version.js.map +1 -0
  52. package/dist/collection/utils/tw.js +1 -0
  53. package/dist/collection/utils/tw.js.map +1 -0
  54. package/dist/collection/utils/types.js +1 -0
  55. package/dist/collection/utils/types.js.map +1 -0
  56. package/dist/esm/{index-4738dac5.js → index-197f58ff.js} +4 -0
  57. package/dist/esm/index-197f58ff.js.map +1 -0
  58. package/dist/esm/index.js +2 -0
  59. package/dist/esm/index.js.map +1 -0
  60. package/dist/esm/loader.js +5 -3
  61. package/dist/esm/loader.js.map +1 -0
  62. package/dist/esm/proto-sudoku-wc.js +8 -3
  63. package/dist/esm/proto-sudoku-wc.js.map +1 -0
  64. package/dist/esm/proto-sudoku.entry.js +3 -1
  65. package/dist/esm/proto-sudoku.entry.js.map +1 -0
  66. package/dist/proto-sudoku-wc/index.esm.js +2 -0
  67. package/dist/proto-sudoku-wc/index.esm.js.map +1 -0
  68. package/dist/proto-sudoku-wc/p-21a020aa.entry.js +3 -0
  69. package/dist/proto-sudoku-wc/p-21a020aa.entry.js.map +1 -0
  70. package/dist/proto-sudoku-wc/p-490877ce.js +3 -0
  71. package/dist/proto-sudoku-wc/p-490877ce.js.map +1 -0
  72. package/dist/proto-sudoku-wc/proto-sudoku-wc.esm.js +2 -1
  73. package/dist/proto-sudoku-wc/proto-sudoku-wc.esm.js.map +1 -0
  74. package/dist/types/stencil-public-runtime.d.ts +12 -12
  75. package/package.json +2 -2
  76. package/dist/proto-sudoku-wc/p-182b370f.js +0 -2
  77. package/dist/proto-sudoku-wc/p-7e98df49.entry.js +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Alien","props","hex","klass","class","label","size","h","width","height","viewBox","role","fill","d","KEY","DATA","INPUTS","PICK","getForKey","key","json","localStorage","getItem","JSON","parse","undefined","storeForKey","value","stringify","setItem","bag","get","store","inputs","line","join","pick","CHECK","DELETE","NEW_PUZZLE","appendToMap","map","propName","items","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","HTTPError","Error","constructor","response","request","options","code","status","title","statusText","trim","reason","super","defineProperty","this","writable","name","TimeoutError","isObject","validateAndMerge","sources","source","isArray","TypeError","deepMerge","mergeHeaders","source1","source2","result","globalThis","Headers","isHeadersInstance","delete","returnValue","headers","supportsRequestStreams","duplexAccessed","hasContentType","supportsReadableStream","ReadableStream","Request","body","method","duplex","supportsAbortController","AbortController","supportsResponseStreams","supportsFormData","FormData","requestMethods","responseTypes","text","formData","arrayBuffer","blob","maxSafeTimeout","stop","Symbol","normalizeRequestMethod","input","toUpperCase","retryMethods","retryStatusCodes","retryAfterStatusCodes","defaultRetryOptions","limit","methods","statusCodes","afterStatusCodes","maxRetryAfter","Number","POSITIVE_INFINITY","backoffLimit","normalizeRetryOptions","retry","async","timeout","abortController","Promise","resolve","reject","abort","fetch","then","catch","isDomExceptionSupported","Boolean","DOMException","composeAbortError","signal","error","delay","aborted","addEventListener","handleAbort","once","removeEventListener","Ky","static","ky","_options","RangeError","_fetch","hook","hooks","afterResponse","modifiedResponse","_decorateResponse","clone","Response","ok","throwHttpErrors","beforeError","onDownloadProgress","_stream","isRetriableMethod","toLowerCase","_retry","type","mimeType","awaitedResult","responseSize","byteLength","parseJson","_input","credentials","beforeRequest","beforeRetry","prefixUrl","String","bind","URL","startsWith","endsWith","originalSignal","searchParams","textSearchParams","replace","URLSearchParams","toString","url","_calculateRetryDelay","_retryCount","retryAfter","after","isNaN","Date","now","BACKOFF_FACTOR","Math","min","hookResult","retryCount","totalBytes","transferredBytes","percent","Uint8Array","controller","reader","getReader","read","done","close","enqueue","createInstance","defaults","create","newDefaults","extend","storeDef","list","locs","loading","solved","data","geometry","keyValues","computeBox","row","column","computeLocs","box","Set","indx","add","computeKeys","found","updateGeometry","updateFromInputs","cell","isClue","processData","next","puzzle","ref","cells","atob","solution","floor","processPick","savePick","api","platformPrefix","netlify","vercel","getPrefixFor","platform","target","initApi","prefix","saveInputs","clearStore","updateStore","save","initApp","refresh","err","message","console","log","select","redraw","check","errors","clues","total","actions","TW_VERSION","tw","classes","Spinner","cx","cy","r","stroke","Alert","salute","spinner","Alerts","_props","play","Fingerprint","who","Eswat2Io","href","Header","children","Button","matched","onClick","Keys","genHandler","values","borderRight","borderLeft","borderBottom","borderTop","Cell","focus","selected","clue","SudokuBoard","TwLabel","handleRefresh","handleCheck","ToolBar","protoSudokuCss","ProtoSudoku","componentDidLoad","render","id"],"sources":["./src/components/proto-sudoku/alien.tsx","./src/utils/bag.ts","./src/utils/labels.ts","./node_modules/@stencil/store/dist/index.mjs","./node_modules/ky/distribution/errors/HTTPError.js","./node_modules/ky/distribution/errors/TimeoutError.js","./node_modules/ky/distribution/utils/is.js","./node_modules/ky/distribution/utils/merge.js","./node_modules/ky/distribution/core/constants.js","./node_modules/ky/distribution/utils/normalize.js","./node_modules/ky/distribution/utils/timeout.js","./node_modules/ky/distribution/errors/DOMException.js","./node_modules/ky/distribution/utils/delay.js","./node_modules/ky/distribution/core/Ky.js","./node_modules/ky/distribution/index.js","./src/utils/store.ts","./src/utils/tw-version.ts","./src/utils/tw.ts","./src/components/proto-sudoku/spinner.tsx","./src/components/proto-sudoku/alert.tsx","./src/components/proto-sudoku/alerts.tsx","./src/components/proto-sudoku/fingerprint.tsx","./src/components/proto-sudoku/eswat2-io.tsx","./src/components/proto-sudoku/header.tsx","./src/components/proto-sudoku/button.tsx","./src/components/proto-sudoku/keys.tsx","./src/components/proto-sudoku/cell.tsx","./src/components/proto-sudoku/sudoku-board.tsx","./src/components/proto-sudoku/tw-label.tsx","./src/components/proto-sudoku/tool-bar.tsx","./src/components/proto-sudoku/proto-sudoku.css?tag=proto-sudoku&encapsulation=shadow","./src/components/proto-sudoku/proto-sudoku.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { IconProps } from '../../utils';\n\nconst Alien: FunctionalComponent<IconProps> = props => {\n const hex = props.hex || 'currentColor';\n const klass = props.class;\n const label = props.label || 'alien';\n const size = props.size || 24;\n\n return (\n <svg\n class={klass}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n role=\"img\"\n aria-label=\"title\"\n >\n <title>{label}</title>\n <g fill={hex}>\n <path\n d=\"M10.31 10.93C11.33 12.57 11.18 14.5 9.96 15.28C8.74 16.04 6.92 15.33\n 5.89 13.69C4.87 12.05 5.03 10.1 6.25 9.34C7.47 8.58 9.29 9.29 10.31\n 10.93M12 17.75C14 17.75 14.5 17 14.5 17C14.5 17 14 19 12 19C10 19 9.5\n 17.03 9.5 17C9.5 17 10 17.75 12 17.75M17.75 9.34C18.97 10.1 19.13 12.05\n 18.11 13.69C17.08 15.33 15.26 16.04 14.04 15.28C12.82 14.5 12.67 12.57\n 13.69 10.93C14.71 9.29 16.53 8.58 17.75 9.34M12 20C14.5 20 20 14.86 20\n 11C20 7.14 16.41 4 12 4C7.59 4 4 7.14 4 11C4 14.86 9.5 20 12 20M12 2C17.5\n 2 22 6.04 22 11C22 15.08 16.32 22 12 22C7.68 22 2 15.08 2 11C2 6.04 6.5 2\n 12 2Z\"\n />\n </g>\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n );\n};\n\nexport { Alien };\nexport default Alien;\n","const KEY = 'proto-sudoku';\nconst DATA = `${KEY}::data`;\nconst INPUTS = `${KEY}::inputs`;\nconst PICK = `${KEY}::pick`;\n\nconst getForKey = (key: string) => {\n const json = localStorage.getItem(key);\n\n return json ? JSON.parse(json) : undefined;\n};\n\nconst storeForKey = (key: string, value: any) => {\n const json = JSON.stringify(value);\n\n localStorage.setItem(key, json);\n};\n\nconst bag = {\n get: () => {\n return getForKey(DATA);\n },\n store: value => {\n storeForKey(DATA, value);\n },\n inputs: {\n get: (): string[] => {\n const line = getForKey(INPUTS);\n return [...line];\n },\n store: (value: string[]) => {\n storeForKey(INPUTS, value.join(''));\n },\n },\n pick: {\n get: (): number => {\n const pick = getForKey(PICK);\n return pick !== null ? pick : undefined;\n },\n store: (value: number) => {\n storeForKey(PICK, value >= 0 && value < 81 ? value : null);\n },\n },\n};\n\nexport { bag };\nexport default bag;\n","const CHECK: string = 'Check ?';\nconst DELETE: string = 'x';\nconst NEW_PUZZLE: string = 'New Puzzle';\n\nexport { CHECK, DELETE, NEW_PUZZLE };\n","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// eslint-lint-disable-next-line @typescript-eslint/naming-convention\nexport class HTTPError extends Error {\n constructor(response, request, options) {\n const code = (response.status || response.status === 0) ? response.status : '';\n const title = response.statusText || '';\n const status = `${code} ${title}`.trim();\n const reason = status ? `status code ${status}` : 'an unknown error';\n super(`Request failed with ${reason}`);\n Object.defineProperty(this, \"response\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = 'HTTPError';\n this.response = response;\n this.request = request;\n this.options = options;\n }\n}\n//# sourceMappingURL=HTTPError.js.map","export class TimeoutError extends Error {\n constructor(request) {\n super('Request timed out');\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = 'TimeoutError';\n this.request = request;\n }\n}\n//# sourceMappingURL=TimeoutError.js.map","// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isObject = (value) => value !== null && typeof value === 'object';\n//# sourceMappingURL=is.js.map","import { isObject } from './is.js';\nexport const validateAndMerge = (...sources) => {\n for (const source of sources) {\n if ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n throw new TypeError('The `options` argument must be an object');\n }\n }\n return deepMerge({}, ...sources);\n};\nexport const mergeHeaders = (source1 = {}, source2 = {}) => {\n const result = new globalThis.Headers(source1);\n const isHeadersInstance = source2 instanceof globalThis.Headers;\n const source = new globalThis.Headers(source2);\n for (const [key, value] of source.entries()) {\n if ((isHeadersInstance && value === 'undefined') || value === undefined) {\n result.delete(key);\n }\n else {\n result.set(key, value);\n }\n }\n return result;\n};\n// TODO: Make this strongly-typed (no `any`).\nexport const deepMerge = (...sources) => {\n let returnValue = {};\n let headers = {};\n for (const source of sources) {\n if (Array.isArray(source)) {\n if (!Array.isArray(returnValue)) {\n returnValue = [];\n }\n returnValue = [...returnValue, ...source];\n }\n else if (isObject(source)) {\n for (let [key, value] of Object.entries(source)) {\n if (isObject(value) && key in returnValue) {\n value = deepMerge(returnValue[key], value);\n }\n returnValue = { ...returnValue, [key]: value };\n }\n if (isObject(source.headers)) {\n headers = mergeHeaders(headers, source.headers);\n returnValue.headers = headers;\n }\n }\n }\n return returnValue;\n};\n//# sourceMappingURL=merge.js.map","export const supportsRequestStreams = (() => {\n let duplexAccessed = false;\n let hasContentType = false;\n const supportsReadableStream = typeof globalThis.ReadableStream === 'function';\n if (supportsReadableStream) {\n hasContentType = new globalThis.Request('https://a.com', {\n body: new globalThis.ReadableStream(),\n method: 'POST',\n // @ts-expect-error - Types are outdated.\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n }\n return duplexAccessed && !hasContentType;\n})();\nexport const supportsAbortController = typeof globalThis.AbortController === 'function';\nexport const supportsResponseStreams = typeof globalThis.ReadableStream === 'function';\nexport const supportsFormData = typeof globalThis.FormData === 'function';\nexport const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'];\nconst validate = () => undefined;\nvalidate();\nexport const responseTypes = {\n json: 'application/json',\n text: 'text/*',\n formData: 'multipart/form-data',\n arrayBuffer: '*/*',\n blob: '*/*',\n};\n// The maximum value of a 32bit int (see issue #117)\nexport const maxSafeTimeout = 2147483647;\nexport const stop = Symbol('stop');\n//# sourceMappingURL=constants.js.map","import { requestMethods } from '../core/constants.js';\nexport const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;\nconst retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\nconst retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\nconst retryAfterStatusCodes = [413, 429, 503];\nconst defaultRetryOptions = {\n limit: 2,\n methods: retryMethods,\n statusCodes: retryStatusCodes,\n afterStatusCodes: retryAfterStatusCodes,\n maxRetryAfter: Number.POSITIVE_INFINITY,\n backoffLimit: Number.POSITIVE_INFINITY,\n};\nexport const normalizeRetryOptions = (retry = {}) => {\n if (typeof retry === 'number') {\n return {\n ...defaultRetryOptions,\n limit: retry,\n };\n }\n if (retry.methods && !Array.isArray(retry.methods)) {\n throw new Error('retry.methods must be an array');\n }\n if (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n throw new Error('retry.statusCodes must be an array');\n }\n return {\n ...defaultRetryOptions,\n ...retry,\n afterStatusCodes: retryAfterStatusCodes,\n };\n};\n//# sourceMappingURL=normalize.js.map","import { TimeoutError } from '../errors/TimeoutError.js';\n// `Promise.race()` workaround (#91)\nexport default async function timeout(request, abortController, options) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n if (abortController) {\n abortController.abort();\n }\n reject(new TimeoutError(request));\n }, options.timeout);\n void options\n .fetch(request)\n .then(resolve)\n .catch(reject)\n .then(() => {\n clearTimeout(timeoutId);\n });\n });\n}\n//# sourceMappingURL=timeout.js.map","// DOMException is supported on most modern browsers and Node.js 18+.\n// @see https://developer.mozilla.org/en-US/docs/Web/API/DOMException#browser_compatibility\nconst isDomExceptionSupported = Boolean(globalThis.DOMException);\n// TODO: When targeting Node.js 18, use `signal.throwIfAborted()` (https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/throwIfAborted)\nexport function composeAbortError(signal) {\n /*\n NOTE: Use DomException with AbortError name as specified in MDN docs (https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)\n > When abort() is called, the fetch() promise rejects with an Error of type DOMException, with name AbortError.\n */\n if (isDomExceptionSupported) {\n return new DOMException(signal?.reason ?? 'The operation was aborted.', 'AbortError');\n }\n // DOMException not supported. Fall back to use of error and override name.\n const error = new Error(signal?.reason ?? 'The operation was aborted.');\n error.name = 'AbortError';\n return error;\n}\n//# sourceMappingURL=DOMException.js.map","// https://github.com/sindresorhus/delay/tree/ab98ae8dfcb38e1593286c94d934e70d14a4e111\nimport { composeAbortError } from '../errors/DOMException.js';\nexport default async function delay(ms, { signal }) {\n return new Promise((resolve, reject) => {\n if (signal) {\n if (signal.aborted) {\n reject(composeAbortError(signal));\n return;\n }\n signal.addEventListener('abort', handleAbort, { once: true });\n }\n function handleAbort() {\n reject(composeAbortError(signal));\n clearTimeout(timeoutId);\n }\n const timeoutId = setTimeout(() => {\n signal?.removeEventListener('abort', handleAbort);\n resolve();\n }, ms);\n });\n}\n//# sourceMappingURL=delay.js.map","import { HTTPError } from '../errors/HTTPError.js';\nimport { TimeoutError } from '../errors/TimeoutError.js';\nimport { deepMerge, mergeHeaders } from '../utils/merge.js';\nimport { normalizeRequestMethod, normalizeRetryOptions } from '../utils/normalize.js';\nimport timeout from '../utils/timeout.js';\nimport delay from '../utils/delay.js';\nimport { maxSafeTimeout, responseTypes, stop, supportsAbortController, supportsFormData, supportsResponseStreams, supportsRequestStreams, } from './constants.js';\nexport class Ky {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n static create(input, options) {\n const ky = new Ky(input, options);\n const fn = async () => {\n if (ky._options.timeout > maxSafeTimeout) {\n throw new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n }\n // Delay the fetch so that body method shortcuts can set the Accept header\n await Promise.resolve();\n let response = await ky._fetch();\n for (const hook of ky._options.hooks.afterResponse) {\n // eslint-disable-next-line no-await-in-loop\n const modifiedResponse = await hook(ky.request, ky._options, ky._decorateResponse(response.clone()));\n if (modifiedResponse instanceof globalThis.Response) {\n response = modifiedResponse;\n }\n }\n ky._decorateResponse(response);\n if (!response.ok && ky._options.throwHttpErrors) {\n let error = new HTTPError(response, ky.request, ky._options);\n for (const hook of ky._options.hooks.beforeError) {\n // eslint-disable-next-line no-await-in-loop\n error = await hook(error);\n }\n throw error;\n }\n // If `onDownloadProgress` is passed, it uses the stream API internally\n /* istanbul ignore next */\n if (ky._options.onDownloadProgress) {\n if (typeof ky._options.onDownloadProgress !== 'function') {\n throw new TypeError('The `onDownloadProgress` option must be a function');\n }\n if (!supportsResponseStreams) {\n throw new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n }\n return ky._stream(response.clone(), ky._options.onDownloadProgress);\n }\n return response;\n };\n const isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n const result = (isRetriableMethod ? ky._retry(fn) : fn());\n for (const [type, mimeType] of Object.entries(responseTypes)) {\n result[type] = async () => {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n ky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n const awaitedResult = await result;\n const response = awaitedResult.clone();\n if (type === 'json') {\n if (response.status === 204) {\n return '';\n }\n const arrayBuffer = await response.clone().arrayBuffer();\n const responseSize = arrayBuffer.byteLength;\n if (responseSize === 0) {\n return '';\n }\n if (options.parseJson) {\n return options.parseJson(await response.text());\n }\n }\n return response[type]();\n };\n }\n return result;\n }\n // eslint-disable-next-line complexity\n constructor(input, options = {}) {\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"abortController\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_retryCount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"_input\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this._input = input;\n this._options = {\n // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n credentials: this._input.credentials || 'same-origin',\n ...options,\n headers: mergeHeaders(this._input.headers, options.headers),\n hooks: deepMerge({\n beforeRequest: [],\n beforeRetry: [],\n beforeError: [],\n afterResponse: [],\n }, options.hooks),\n method: normalizeRequestMethod(options.method ?? this._input.method),\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n prefixUrl: String(options.prefixUrl || ''),\n retry: normalizeRetryOptions(options.retry),\n throwHttpErrors: options.throwHttpErrors !== false,\n timeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n fetch: options.fetch ?? globalThis.fetch.bind(globalThis),\n };\n if (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n throw new TypeError('`input` must be a string, URL, or Request');\n }\n if (this._options.prefixUrl && typeof this._input === 'string') {\n if (this._input.startsWith('/')) {\n throw new Error('`input` must not begin with a slash when using `prefixUrl`');\n }\n if (!this._options.prefixUrl.endsWith('/')) {\n this._options.prefixUrl += '/';\n }\n this._input = this._options.prefixUrl + this._input;\n }\n if (supportsAbortController) {\n this.abortController = new globalThis.AbortController();\n if (this._options.signal) {\n const originalSignal = this._options.signal;\n this._options.signal.addEventListener('abort', () => {\n this.abortController.abort(originalSignal.reason);\n });\n }\n this._options.signal = this.abortController.signal;\n }\n if (supportsRequestStreams) {\n // @ts-expect-error - Types are outdated.\n this._options.duplex = 'half';\n }\n this.request = new globalThis.Request(this._input, this._options);\n if (this._options.searchParams) {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const textSearchParams = typeof this._options.searchParams === 'string'\n ? this._options.searchParams.replace(/^\\?/, '')\n : new URLSearchParams(this._options.searchParams).toString();\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const searchParams = '?' + textSearchParams;\n const url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n // To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n if (((supportsFormData && this._options.body instanceof globalThis.FormData)\n || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n this.request.headers.delete('content-type');\n }\n // The spread of `this.request` is required as otherwise it misses the `duplex` option for some reason and throws.\n this.request = new globalThis.Request(new globalThis.Request(url, { ...this.request }), this._options);\n }\n if (this._options.json !== undefined) {\n this._options.body = JSON.stringify(this._options.json);\n this.request.headers.set('content-type', this._options.headers.get('content-type') ?? 'application/json');\n this.request = new globalThis.Request(this.request, { body: this._options.body });\n }\n }\n _calculateRetryDelay(error) {\n this._retryCount++;\n if (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n if (error instanceof HTTPError) {\n if (!this._options.retry.statusCodes.includes(error.response.status)) {\n return 0;\n }\n const retryAfter = error.response.headers.get('Retry-After');\n if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n let after = Number(retryAfter);\n if (Number.isNaN(after)) {\n after = Date.parse(retryAfter) - Date.now();\n }\n else {\n after *= 1000;\n }\n if (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n return 0;\n }\n return after;\n }\n if (error.response.status === 413) {\n return 0;\n }\n }\n const BACKOFF_FACTOR = 0.3;\n return Math.min(this._options.retry.backoffLimit, BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000);\n }\n return 0;\n }\n _decorateResponse(response) {\n if (this._options.parseJson) {\n response.json = async () => this._options.parseJson(await response.text());\n }\n return response;\n }\n async _retry(fn) {\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-implicit-any-catch\n }\n catch (error) {\n const ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n if (ms !== 0 && this._retryCount > 0) {\n await delay(ms, { signal: this._options.signal });\n for (const hook of this._options.hooks.beforeRetry) {\n // eslint-disable-next-line no-await-in-loop\n const hookResult = await hook({\n request: this.request,\n options: this._options,\n error: error,\n retryCount: this._retryCount,\n });\n // If `stop` is returned from the hook, the retry process is stopped\n if (hookResult === stop) {\n return;\n }\n }\n return this._retry(fn);\n }\n throw error;\n }\n }\n async _fetch() {\n for (const hook of this._options.hooks.beforeRequest) {\n // eslint-disable-next-line no-await-in-loop\n const result = await hook(this.request, this._options);\n if (result instanceof Request) {\n this.request = result;\n break;\n }\n if (result instanceof Response) {\n return result;\n }\n }\n if (this._options.timeout === false) {\n return this._options.fetch(this.request.clone());\n }\n return timeout(this.request.clone(), this.abortController, this._options);\n }\n /* istanbul ignore next */\n _stream(response, onDownloadProgress) {\n const totalBytes = Number(response.headers.get('content-length')) || 0;\n let transferredBytes = 0;\n if (response.status === 204) {\n if (onDownloadProgress) {\n onDownloadProgress({ percent: 1, totalBytes, transferredBytes }, new Uint8Array());\n }\n return new globalThis.Response(null, {\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n });\n }\n return new globalThis.Response(new globalThis.ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n if (onDownloadProgress) {\n onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());\n }\n async function read() {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n return;\n }\n if (onDownloadProgress) {\n transferredBytes += value.byteLength;\n const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n onDownloadProgress({ percent, transferredBytes, totalBytes }, value);\n }\n controller.enqueue(value);\n await read();\n }\n await read();\n },\n }), {\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n });\n }\n}\n//# sourceMappingURL=Ky.js.map","/*! MIT License © Sindre Sorhus */\nimport { Ky } from './core/Ky.js';\nimport { requestMethods, stop } from './core/constants.js';\nimport { validateAndMerge } from './utils/merge.js';\nconst createInstance = (defaults) => {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const ky = (input, options) => Ky.create(input, validateAndMerge(defaults, options));\n for (const method of requestMethods) {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n ky[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));\n }\n ky.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));\n ky.extend = (newDefaults) => createInstance(validateAndMerge(defaults, newDefaults));\n ky.stop = stop;\n return ky;\n};\nconst ky = createInstance();\nexport default ky;\nexport { HTTPError } from './errors/HTTPError.js';\nexport { TimeoutError } from './errors/TimeoutError.js';\n//# sourceMappingURL=index.js.map","import { createStore } from '@stencil/store';\nimport ky from 'ky';\nimport { bag } from './bag';\nimport {\n AppStore,\n GeoMap,\n ComputeBoxFn,\n ComputeLocsFn,\n ComputeKeysFn,\n GeometryFn,\n InputsFn,\n PuzzleApiData,\n PuzzleCell,\n PuzzleData,\n} from './types';\n\n// --------------------------------------------------------[ mutable store ]\n\nconst storeDef: AppStore = {\n list: [],\n keys: [],\n locs: [],\n loading: false,\n solved: false,\n error: undefined,\n pick: undefined,\n data: undefined,\n};\n\nconst { state } = createStore(storeDef);\n\n// --------------------------------------------------------[ geometry ]\n\n// NOTE: by using Sets here, we don't have to worry about clearing geometry...\nconst geometry: GeoMap = new Map([\n ['row', new Map<number, Set<number>>()],\n ['column', new Map<number, Set<number>>()],\n ['box', new Map<number, Set<number>>()],\n]);\n\nconst keyValues: string[] = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];\n\nconst computeBox: ComputeBoxFn = (row, column) => {\n if (column < 3) {\n return row < 3 ? 0 : row < 6 ? 3 : 6;\n } else {\n if (column < 6) {\n return row < 3 ? 1 : row < 6 ? 4 : 7;\n } else {\n return row < 3 ? 2 : row < 6 ? 5 : 8;\n }\n }\n};\n\nconst computeLocs: ComputeLocsFn = (index, row, column, box) => {\n const data = new Map<string, number>([\n ['row', row],\n ['column', column],\n ['box', box],\n ]);\n const locs = new Set<number>();\n\n data.forEach((value, key) => {\n geometry\n .get(key)\n .get(value)\n .forEach(indx => {\n indx !== index && locs.add(indx);\n });\n });\n\n return Array.from(locs);\n};\n\nconst computeKeys: ComputeKeysFn = locs => {\n const { list } = state;\n const found = new Set<string>();\n\n locs.map(indx => {\n const { key } = list[indx];\n if (key != '.') {\n found.add(key);\n }\n });\n\n const keys = keyValues.filter(key => !found.has(key));\n\n return keys;\n};\n\nconst updateGeometry: GeometryFn = (index, row, column, box) => {\n const data = new Map<string, number>([\n ['row', row],\n ['column', column],\n ['box', box],\n ]);\n\n data.forEach((value, key) => {\n const map = geometry.get(key);\n\n if (map.has(value)) {\n // looking at the set specification, it should be sufficient to just call add\n // https://tc39.es/ecma262/#sec-set.prototype.add\n map.get(value).add(index);\n } else {\n map.set(value, new Set([index]));\n }\n });\n};\n\nconst updateFromInputs: InputsFn = list => {\n const inputs = bag.inputs.get();\n\n inputs.forEach((key, indx) => {\n const cell = list[indx];\n const { isClue } = cell;\n\n if (!isClue) {\n cell.key = key;\n }\n });\n};\n\n// --------------------------------------------------------[ process ]\n\nconst processData = (next: PuzzleData) => {\n if (next) {\n const { puzzle, ref } = next;\n const cells = puzzle ? [...puzzle] : [];\n const line = ref ? atob(ref) : undefined; // decrypt the solution... [ base64 ]\n const solution = line ? [...line] : [];\n\n const list = cells.map((key, indx) => {\n const value = solution[indx];\n const isClue = key === value;\n const row = Math.floor(indx / 9);\n const column = indx % 9;\n const box = computeBox(row, column);\n\n updateGeometry(indx, row, column, box);\n\n return { key, isClue, value, indx, row, column, box };\n });\n\n // NOTE: this only happens once on data change...\n updateFromInputs(list);\n\n state.data = next;\n state.list = list;\n } else {\n state.data = undefined;\n state.list = [];\n }\n};\n\nconst processPick = (next: PuzzleCell) => {\n if (next !== undefined && next.indx != state.pick) {\n const { isClue, indx, row, column, box } = next;\n const locs = computeLocs(indx, row, column, box);\n const keys = isClue ? [] : computeKeys(locs);\n\n state.pick = indx;\n state.keys = keys;\n state.locs = locs;\n // NOTE: we could auto-pick if there's only one key...\n // (keys.length === 1) && next.key = keys[0];\n } else {\n state.pick = undefined;\n state.keys = [];\n state.locs = [];\n }\n savePick(state.pick);\n};\n\n// --------------------------------------------------------[ utils ]\n\nlet api = undefined;\n\nconst platformPrefix = {\n netlify: '/.netlify/functions',\n vercel: 'https://sudoku-rust-api.vercel.app/api',\n};\n\nconst getPrefixFor = (platform: string) => {\n const keys = Object.keys(platformPrefix);\n const target = keys.includes(platform) ? platform : 'vercel';\n\n return platformPrefix[target];\n};\n\nconst initApi = (platform: string) => {\n const prefix = getPrefixFor(platform);\n\n api = ky.extend({\n hooks: {\n beforeRequest: [\n request => {\n request.headers.set('X-Requested-With', 'ky');\n request.headers.set('X-Custom-Header', 'foobar');\n },\n ],\n },\n prefixUrl: prefix,\n timeout: 10000,\n });\n};\n\nconst saveInputs = (inputs: string[]) => {\n bag.inputs.store(inputs);\n};\n\nconst savePick = (pick: number) => {\n bag.pick.store(pick);\n};\n\nconst clearStore = (loading = false) => {\n state.list = [];\n state.keys = [];\n state.locs = [];\n state.loading = loading;\n state.solved = false;\n state.error = undefined;\n state.pick = undefined;\n state.data = undefined;\n};\n\nconst updateStore = (data: PuzzleApiData, save: boolean = true) => {\n const { puzzle, ref } = data;\n\n if (save) {\n bag.inputs.store([]);\n bag.store(data);\n }\n\n processData({ puzzle, ref });\n};\n\n// --------------------------------------------------------[ actions ]\n\nconst initApp = (platform: string) => {\n initApi(platform);\n clearStore();\n // this retrieves the last data we stored in the bag...\n const data = bag.get();\n const pick = bag.pick.get();\n\n if (data) {\n updateStore(data, false);\n\n if (pick >= 0) {\n const { list } = state;\n const cell: PuzzleCell = list[pick];\n\n processPick(cell);\n }\n }\n};\n\nconst refresh = async () => {\n clearStore(true);\n\n saveInputs([]);\n savePick(state.pick);\n\n try {\n // fetch a new puzzle from the api...\n const data: PuzzleApiData = await api.get('puzzle').json();\n\n updateStore(data);\n } catch (err) {\n // handle error...\n const { message } = err;\n\n console.log('-- ', message);\n console.log(err);\n\n state.error = message;\n } finally {\n // always executed\n state.loading = false;\n }\n};\n\nconst select = (cell: PuzzleCell) => {\n processPick(cell);\n};\n\nconst redraw = (list: PuzzleCell[]) => {\n state.list = [...list];\n list.length = 0;\n};\n\nconst check = () => {\n const { list } = state;\n const inputs: string[] = [];\n\n let errors: number = 0;\n let found: number = 0;\n let clues: number = 0;\n\n list.forEach(cell => {\n const { key, value, isClue } = cell;\n\n if (!isClue) {\n if (key !== '.') {\n if (key !== value) {\n errors = errors + 1;\n cell.key = '.';\n } else {\n found = found + 1;\n }\n }\n } else {\n clues = clues + 1;\n }\n\n inputs.push(cell.key);\n });\n\n const total = clues + found;\n\n found ? saveInputs(inputs) : saveInputs([]);\n\n if (errors > 0) {\n redraw(list);\n } else {\n if (total === 81) {\n state.solved = true;\n }\n }\n};\n\nconst input = (key: string) => {\n const { pick, list } = state;\n const cell = list[pick];\n\n cell.key = key;\n\n redraw(list);\n};\n\nconst actions = {\n initApp,\n refresh,\n select,\n check,\n input,\n};\n\nexport { state, actions };\nexport default state;\n","// WARNING: generated file...\nconst TW_VERSION = '3.2.4';\n\nexport { TW_VERSION };\nexport default TW_VERSION;\n","const tw = (...classes: (false | null | undefined | string)[]): string => {\n return classes.filter(Boolean).join(' ');\n};\n\nexport { tw };\nexport default tw;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { tw, IconProps } from '../../utils';\n\nconst Spinner: FunctionalComponent<IconProps> = props => {\n const hex = props.hex || 'currentColor';\n const klass = props.class || '';\n const label = props.label || 'loading...';\n const size = props.size || 24;\n\n return (\n <svg\n class={tw(klass, 'animate-spin')}\n width={size}\n height={size}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n role=\"img\"\n aria-label=\"title\"\n >\n <title>{label}</title>\n <g>\n <circle\n class=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke={hex}\n stroke-width=\"4\"\n ></circle>\n <path\n class=\"opacity-75\"\n fill={hex}\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </g>\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n );\n};\n\nexport { Spinner };\nexport default Spinner;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { Alien } from './alien';\nimport { Spinner } from './spinner';\n\ninterface AlertProps {\n message: string;\n salute?: string;\n spinner?: boolean;\n}\n\nconst Alert: FunctionalComponent<AlertProps> = props => {\n const { message, salute, spinner = false } = props;\n\n return (\n <div class=\"mt-5 flex h-24px flex-row items-center\">\n {spinner ? <Spinner class=\"mr-2\" /> : <Alien class=\"mr-2\" />}\n {salute ? <label class=\"mr-1 font-bold\">{salute}:</label> : ''}\n <label class=\"italic\">{message}</label>\n </div>\n );\n};\n\nexport { Alert };\nexport default Alert;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { Alert } from './alert';\nimport { state } from '../../utils';\n\nconst Alerts: FunctionalComponent = _props => {\n const { solved, loading, error } = state;\n const play = !loading && !error && !solved;\n return (\n <div class=\"flex flex-col\">\n {play ? <Alert message=\"Welcome, are you ready to play?...\" /> : ''}\n {loading ? <Alert message=\"Loading...\" spinner={true} /> : ''}\n {error ? <Alert message={error} salute=\"ERROR\" /> : ''}\n {solved ? <Alert message=\"You solved the puzzle!!\" /> : ''}\n </div>\n );\n};\n\nexport { Alerts };\nexport default Alert;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { IconProps } from '../../utils';\n\nconst Fingerprint: FunctionalComponent<IconProps> = props => {\n const hex = props.hex || 'currentColor';\n const klass = props.class;\n const label = props.label || 'fingerprint';\n const size = props.size || 24;\n\n return (\n <svg\n class={klass}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n role=\"img\"\n aria-label=\"title\"\n >\n <title>{label}</title>\n <g fill={hex}>\n <path\n d=\"M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3\n 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97\n 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47\n 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47\n 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16\n 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03\n 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44\n 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23\n 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25\n 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74\n 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27\n 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69\n 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1\n 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24\n 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15\n 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79\n 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04\n 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1\n 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93\n 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96\n 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94\n 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95\n 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72\n 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6\n 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83\n 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62\n 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82\n 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16\n 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82\n 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59\n 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71\n 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96\n 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36\n 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z\"\n />\n </g>\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n );\n};\n\nexport { Fingerprint };\nexport default Fingerprint;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { Fingerprint } from './fingerprint';\n\nconst url: string = 'https://eswat2.dev';\nconst who: string = 'eswat2';\n\nconst Eswat2Io: FunctionalComponent = _props => {\n return (\n <a\n class=\"absolute top-0 right-0 text-clrs-gray hover:text-clrs-navy\"\n href={url}\n aria-label={who}\n title={who}\n >\n <Fingerprint label={who} />\n </a>\n );\n};\n\nexport { Eswat2Io };\nexport default Eswat2Io;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { tw } from '../../utils';\n\nconst Header: FunctionalComponent = (_props, children) => {\n return (\n <h1\n class={tw(\n 'text-center uppercase text-clrs-red',\n 'mr-0 ml-0 mt-11 mb-11',\n 'text-6xl font-thin',\n )}\n >\n {children}\n </h1>\n );\n};\n\nexport { Header };\nexport default Header;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { tw, VoidFn, CHECK, NEW_PUZZLE, DELETE } from '../../utils';\n\ninterface ButtonProps {\n label: string;\n callback: VoidFn;\n matched?: boolean;\n}\n\nconst Button: FunctionalComponent<ButtonProps> = props => {\n const { label, callback, matched = false } = props;\n\n return (\n <button\n class={tw(\n 'rounded-md border border-solid border-clrs-slate4 font-bold',\n label === CHECK\n ? 'mr-2 bg-clrs-yellow px-3 py-2 text-clrs-navy'\n : label === NEW_PUZZLE\n ? 'mr-2 bg-clrs-navy px-3 py-2 text-white'\n : label === DELETE\n ? 'mr-1 bg-clrs-red px-2 py-1 text-white'\n : matched\n ? 'mr-1 bg-clrs-slate4 px-2 py-1 text-white'\n : 'mr-1 bg-gray-50 px-2 py-1 text-clrs-navy',\n )}\n onClick={callback}\n >\n {label}\n </button>\n );\n};\n\nexport { Button };\nexport default Button;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { Button } from './button';\nimport { actions, state, DELETE } from '../../utils';\n\nconst Keys: FunctionalComponent = _props => {\n const { keys, list, pick, solved } = state;\n\n const genHandler = (key: string) => {\n return () => {\n actions.input(key);\n };\n };\n\n const values = solved ? [] : keys;\n const cell = pick != undefined ? list[pick] : undefined;\n\n return (\n <div class=\"mt-2 flex flex-row justify-end\">\n {!solved && cell && !cell.isClue && cell.key != '.' ? (\n <Button label={DELETE} callback={genHandler('.')} />\n ) : (\n ''\n )}\n {values.map((key: string) => {\n return (\n <Button\n label={key}\n callback={genHandler(key)}\n matched={cell.key === key}\n />\n );\n })}\n </div>\n );\n};\n\nexport { Keys };\nexport default Keys;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { actions, tw, PuzzleCell } from '../../utils';\n\n// NOTE: building indx mapping for the border highlighting...\nconst borderRight = [\n 2, 5, 11, 14, 20, 23, 29, 32, 38, 41, 47, 50, 56, 59, 65, 68, 74, 77,\n];\nconst borderLeft = borderRight.map(key => key + 1);\nconst borderBottom = [\n 18, 19, 20, 21, 22, 23, 24, 25, 26, 45, 46, 47, 48, 49, 50, 51, 52, 53,\n];\nconst borderTop = borderBottom.map(key => key + 9);\n\ninterface CellProps {\n cell: PuzzleCell;\n focus: boolean;\n selected: boolean;\n solved: boolean;\n}\n\n// Functional components return JSX...\nconst Cell: FunctionalComponent<CellProps> = props => {\n const { cell, focus, selected, solved } = props;\n const { key, isClue, indx } = cell;\n const clue: string = key != '.' ? key : '';\n\n const genHandler = (cell: PuzzleCell, solved: boolean) => {\n return () => {\n if (!solved) {\n actions.select(cell);\n }\n };\n };\n\n return (\n <label\n class={tw(\n `cell-${indx}`,\n borderRight.includes(indx) ? 'border-xbr-clrs-navy' : '',\n borderLeft.includes(indx) ? 'border-xbl-clrs-navy' : '',\n borderBottom.includes(indx) ? 'border-xbb-clrs-navy' : '',\n borderTop.includes(indx) ? 'border-xbt-clrs-navy' : '',\n 'h-8 w-8 border border-solid text-center leading-8',\n selected\n ? 'border-clrs-red bg-clrs-red-a50 text-clrs-red'\n : focus\n ? 'border-clrs-gray bg-clrs-green-a50 font-bold'\n : isClue\n ? 'border-clrs-gray bg-clrs-silver'\n : clue !== ''\n ? 'border-clrs-gray text-clrs-red'\n : 'border-clrs-gray',\n )}\n onClick={genHandler(cell, solved)}\n >\n {clue}\n </label>\n );\n};\n\nexport { Cell };\nexport default Cell;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { Cell } from './cell';\nimport { state, tw } from '../../utils';\n\nconst SudokuBoard: FunctionalComponent = _props => {\n const { list, pick, locs, solved } = state;\n\n return (\n <div\n class={tw(\n 'flex flex-row flex-wrap',\n 'border border-solid border-clrs-navy',\n 'h-76p5 w-76p5 text-lg',\n )}\n >\n {list.map((cell, index) => {\n const selected: boolean = solved ? false : index === pick;\n const focus: boolean = solved ? false : locs.includes(index);\n\n return (\n <Cell cell={cell} focus={focus} selected={selected} solved={solved} />\n );\n })}\n </div>\n );\n};\n\nexport { SudokuBoard };\nexport default SudokuBoard;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { TW_VERSION } from '../../utils';\n\nconst TwLabel: FunctionalComponent = _props => {\n return (\n <label class=\"ml-auto align-top text-xs italic text-clrs-slate4\">\n Tailwind {TW_VERSION}\n </label>\n );\n};\n\nexport { TwLabel };\nexport default TwLabel;\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { Button } from './button';\nimport { TwLabel } from './tw-label';\nimport { actions, state, VoidFn, CHECK, NEW_PUZZLE } from '../../utils';\n\nconst handleRefresh = (actions: any): VoidFn => {\n return () => {\n actions.refresh();\n };\n};\n\nconst handleCheck = (actions: any): VoidFn => {\n return () => {\n actions.check();\n };\n};\n\nconst ToolBar: FunctionalComponent = _props => {\n const { list, solved } = state;\n\n return (\n <div class=\"flex flex-row\">\n <Button label={NEW_PUZZLE} callback={handleRefresh(actions)} />\n {list.length === 81 && !solved ? (\n <Button label={CHECK} callback={handleCheck(actions)} />\n ) : (\n ''\n )}\n <TwLabel />\n </div>\n );\n};\n\nexport { ToolBar };\nexport default ToolBar;\n","*,\n::before,\n::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.ds1-main {\n margin: 1.5rem;\n display: flex;\n flex-direction: column;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n color: var(--clrs-navy, #001f3f);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.mt-5 {\n margin-top: 1.25rem;\n}\n\n.mr-2 {\n margin-right: 0.5rem;\n}\n\n.mr-1 {\n margin-right: 0.25rem;\n}\n\n.mr-0 {\n margin-right: 0px;\n}\n\n.ml-0 {\n margin-left: 0px;\n}\n\n.mt-11 {\n margin-top: 2.75rem;\n}\n\n.mb-11 {\n margin-bottom: 2.75rem;\n}\n\n.mt-2 {\n margin-top: 0.5rem;\n}\n\n.ml-auto {\n margin-left: auto;\n}\n\n.flex {\n display: flex;\n}\n\n.h-24px {\n height: 24px;\n}\n\n.h-8 {\n height: 2rem;\n}\n\n.h-76p5 {\n height: 19.125rem;\n}\n\n.w-8 {\n width: 2rem;\n}\n\n.w-76p5 {\n width: 19.125rem;\n}\n\n.max-w-min {\n max-width: -moz-min-content;\n max-width: min-content;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.rounded-md {\n border-radius: 0.375rem;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-solid {\n border-style: solid;\n}\n\n.border-clrs-slate4 {\n border-color: var(--clrs-slate4, #4e5964);\n}\n\n.border-clrs-red {\n border-color: var(--clrs-red, #ff4136);\n}\n\n.border-clrs-gray {\n border-color: var(--clrs-gray, #aaaaaa);\n}\n\n.border-clrs-navy {\n border-color: var(--clrs-navy, #001f3f);\n}\n\n.bg-clrs-yellow {\n background-color: var(--clrs-yellow, #ffdc00);\n}\n\n.bg-clrs-navy {\n background-color: var(--clrs-navy, #001f3f);\n}\n\n.bg-clrs-red {\n background-color: var(--clrs-red, #ff4136);\n}\n\n.bg-clrs-slate4 {\n background-color: var(--clrs-slate4, #4e5964);\n}\n\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n\n.bg-clrs-red-a50 {\n background-color: var(--clrs-red-a50, #ff413650);\n}\n\n.bg-clrs-green-a50 {\n background-color: var(--clrs-green-a50, #2ecc4050);\n}\n\n.bg-clrs-silver {\n background-color: var(--clrs-silver, #dddddd);\n}\n\n.p-0\\.5 {\n padding: 0.125rem;\n}\n\n.p-0 {\n padding: 0px;\n}\n\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.text-center {\n text-align: center;\n}\n\n.align-top {\n vertical-align: top;\n}\n\n.text-6xl {\n font-size: 3.75rem;\n line-height: 1;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-thin {\n font-weight: 100;\n}\n\n.uppercase {\n text-transform: uppercase;\n}\n\n.italic {\n font-style: italic;\n}\n\n.leading-8 {\n line-height: 2rem;\n}\n\n.text-clrs-navy {\n color: var(--clrs-navy, #001f3f);\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-clrs-red {\n color: var(--clrs-red, #ff4136);\n}\n\n.text-clrs-gray {\n color: var(--clrs-gray, #aaaaaa);\n}\n\n.text-clrs-slate4 {\n color: var(--clrs-slate4, #4e5964);\n}\n\n.opacity-25 {\n opacity: 0.25;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color),\n 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.border-xbb-clrs-navy {\n border-bottom: 1px solid var(--clrs-navy, #001f3f) !important;\n}\n\n.border-xbt-clrs-navy {\n border-top: 1px solid var(--clrs-navy, #001f3f) !important;\n}\n\n.border-xbl-clrs-navy {\n border-left: 1px solid var(--clrs-navy, #001f3f) !important;\n}\n\n.border-xbr-clrs-navy {\n border-right: 1px solid var(--clrs-navy, #001f3f) !important;\n}\n\n.hover\\:text-clrs-navy:hover {\n color: var(--clrs-navy, #001f3f);\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { Alerts } from './alerts';\nimport { Eswat2Io } from './eswat2-io';\nimport { Header } from './header';\nimport { Keys } from './keys';\nimport { SudokuBoard } from './sudoku-board';\nimport { ToolBar } from './tool-bar';\nimport { actions } from '../../utils';\n\n@Component({\n tag: 'proto-sudoku',\n styleUrl: 'proto-sudoku.css',\n shadow: true,\n})\nexport class ProtoSudoku {\n @Prop() tag: string = 'proto-sudoku';\n @Prop() platform: string = 'vercel';\n\n componentDidLoad() {\n actions.initApp(this.platform);\n }\n\n render() {\n return (\n <div id=\"app\" class=\"ds1-main relative max-w-min p-0.5\">\n <Eswat2Io />\n <Header>Sudoku</Header>\n <SudokuBoard />\n <Keys />\n <hr class=\"ml-0 mr-0\" />\n <ToolBar />\n <Alerts />\n </div>\n );\n }\n}\n"],"mappings":"yDAGA,MAAMA,EAAwCC,IAC5C,MAAMC,EAAMD,EAAMC,KAAO,eACzB,MAAMC,EAAQF,EAAMG,MACpB,MAAMC,EAAQJ,EAAMI,OAAS,QAC7B,MAAMC,EAAOL,EAAMK,MAAQ,GAE3B,OACEC,EAAA,OACEH,MAAOD,EACPK,MAAOF,EACPG,OAAQH,EACRI,QAAQ,YACRC,KAAK,MAAK,aACC,SAEXJ,EAAA,aAAQF,GACRE,EAAA,KAAGK,KAAMV,GACPK,EAAA,QACEM,EAAE,4nBAWN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C,GACd,KACLA,EAAQX,SAAS,EAIrB,MAAMiD,GAAetC,GACZ,KACLA,EAAQJ,OAAO,EAInB,MAAM2C,GAA+B1B,IACnC,MAAMrE,KAAEA,EAAIG,OAAEA,GAAW3M,EAEzB,OACE/E,EAAA,OAAKH,MAAM,iBACTG,EAACoW,GAAM,CAACtW,MAAOkC,EAAY2D,SAAUyR,GAAcrC,MAClDxD,EAAK5K,SAAW,KAAO+K,EACtB1R,EAACoW,GAAM,CAACtW,MAAOgC,EAAO6D,SAAU0R,GAAYtC,MAAY,GAI1D/U,EAACmX,GAAO,MACJ,EC7BV,MAAMI,GAAiB,yyI,MCcVC,GAAW,M,kCACA,e,cACK,Q,CAE3BC,mBACE1C,GAAQZ,QAAQxM,KAAKgM,S,CAGvB+D,SACE,OACE1X,EAAA,OAAK2X,GAAG,MAAM9X,MAAM,qCAClBG,EAACgW,GAAQ,MACThW,EAACkW,GAAM,eACPlW,EAACkX,GAAW,MACZlX,EAACuW,GAAI,MACLvW,EAAA,MAAIH,MAAM,cACVG,EAACsX,GAAO,MACRtX,EAAC2V,GAAM,M"}
@@ -0,0 +1,3 @@
1
+ const t="proto-sudoku-wc";let n;let e;let s=false;let o=null;let c=false;const l=(t,n="")=>{{return()=>{}}};const i=(t,n)=>{{return()=>{}}};const f="{visibility:hidden}.hydrated{visibility:inherit}";const r={};const u="http://www.w3.org/2000/svg";const a="http://www.w3.org/1999/xhtml";const d=t=>t!=null;const h=t=>{t=typeof t;return t==="object"||t==="function"};function p(t){var n,e,s;return(s=(e=(n=t.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&s!==void 0?s:undefined}const y=(t,n,...e)=>{let s=null;let o=false;let c=false;const l=[];const i=n=>{for(let e=0;e<n.length;e++){s=n[e];if(Array.isArray(s)){i(s)}else if(s!=null&&typeof s!=="boolean"){if(o=typeof t!=="function"&&!h(s)){s=String(s)}if(o&&c){l[l.length-1].t+=s}else{l.push(o?m(null,s):s)}c=o}}};i(e);if(n){{const t=n.className||n.class;if(t){n.class=typeof t!=="object"?t:Object.keys(t).filter((n=>t[n])).join(" ")}}}if(typeof t==="function"){return t(n===null?{}:n,l,b)}const f=m(t,null);f.o=n;if(l.length>0){f.l=l}return f};const m=(t,n)=>{const e={i:0,u:t,t:n,h:null,l:null};{e.o=null}return e};const $={};const w=t=>t&&t.u===$;const b={forEach:(t,n)=>t.map(g).forEach(n),map:(t,n)=>t.map(g).map(n).map(v)};const g=t=>({vattrs:t.o,vchildren:t.l,vkey:t.p,vname:t.m,vtag:t.u,vtext:t.t});const v=t=>{if(typeof t.vtag==="function"){const n=Object.assign({},t.vattrs);if(t.vkey){n.key=t.vkey}if(t.vname){n.name=t.vname}return y(t.vtag,n,...t.vchildren||[])}const n=m(t.vtag,t.vtext);n.o=t.vattrs;n.l=t.vchildren;n.p=t.vkey;n.m=t.vname;return n};const S=(t,n)=>{if(t!=null&&!h(t)){if(n&1){return String(t)}return t}return t};const j=(t,n,e)=>{const s=$t.ce(n,e);t.dispatchEvent(s);return s};const O=new WeakMap;const k=(t,n,e)=>{let s=pt.get(t);if(bt&&e){s=s||new CSSStyleSheet;if(typeof s==="string"){s=n}else{s.replaceSync(n)}}else{s=n}pt.set(t,s)};const M=(t,n,e,s)=>{var o;let c=x(n);const l=pt.get(c);t=t.nodeType===11?t:mt;if(l){if(typeof l==="string"){t=t.head||t;let n=O.get(t);let e;if(!n){O.set(t,n=new Set)}if(!n.has(c)){{{e=mt.createElement("style");e.innerHTML=l}const n=(o=$t.$)!==null&&o!==void 0?o:p(mt);if(n!=null){e.setAttribute("nonce",n)}t.insertBefore(e,t.querySelector("link"))}if(n){n.add(c)}}}else if(!t.adoptedStyleSheets.includes(l)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]}}return c};const C=t=>{const n=t.g;const e=t.v;const s=n.i;const o=l("attachStyles",n.S);const c=M(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);if(s&10){e["s-sc"]=c;e.classList.add(c+"-h")}o()};const x=(t,n)=>"sc-"+t.S;const E=(t,n,e,s,o,c)=>{if(e!==s){let l=ut(t,n);let i=n.toLowerCase();if(n==="class"){const n=t.classList;const o=U(e);const c=U(s);n.remove(...o.filter((t=>t&&!c.includes(t))));n.add(...c.filter((t=>t&&!o.includes(t))))}else if(!l&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(ut(yt,i)){n=i.slice(2)}else{n=i[2]+n.slice(3)}if(e){$t.rel(t,n,e,false)}if(s){$t.ael(t,n,s,false)}}else{const i=h(s);if((l||i&&s!==null)&&!o){try{if(!t.tagName.includes("-")){const o=s==null?"":s;if(n==="list"){l=false}else if(e==null||t[n]!=o){t[n]=o}}else{t[n]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(n)===""){{t.removeAttribute(n)}}}else if((!l||c&4||o)&&!i){s=s===true?"":s;{t.setAttribute(n,s)}}}}};const P=/\s/;const U=t=>!t?[]:t.split(P);const L=(t,n,e,s)=>{const o=n.h.nodeType===11&&n.h.host?n.h.host:n.h;const c=t&&t.o||r;const l=n.o||r;{for(s in c){if(!(s in l)){E(o,s,c[s],undefined,e,n.i)}}}for(s in l){E(o,s,c[s],l[s],e,n.i)}};const N=(t,e,o,c)=>{const l=e.l[o];let i=0;let f;let r;if(l.t!==null){f=l.h=mt.createTextNode(l.t)}else{if(!s){s=l.u==="svg"}f=l.h=mt.createElementNS(s?u:a,l.u);if(s&&l.u==="foreignObject"){s=false}{L(null,l,s)}if(d(n)&&f["s-si"]!==n){f.classList.add(f["s-si"]=n)}if(l.l){for(i=0;i<l.l.length;++i){r=N(t,l,i);if(r){f.appendChild(r)}}}{if(l.u==="svg"){s=false}else if(f.tagName==="foreignObject"){s=true}}}return f};const T=(t,n,s,o,c,l)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===e){i=i.shadowRoot}for(;c<=l;++c){if(o[c]){f=N(null,s,c);if(f){o[c].h=f;i.insertBefore(f,n)}}}};const A=(t,n,e,s,o)=>{for(;n<=e;++n){if(s=t[n]){o=s.h;o.remove()}}};const R=(t,n,e,s)=>{let o=0;let c=0;let l=n.length-1;let i=n[0];let f=n[l];let r=s.length-1;let u=s[0];let a=s[r];let d;while(o<=l&&c<=r){if(i==null){i=n[++o]}else if(f==null){f=n[--l]}else if(u==null){u=s[++c]}else if(a==null){a=s[--r]}else if(W(i,u)){q(i,u);i=n[++o];u=s[++c]}else if(W(f,a)){q(f,a);f=n[--l];a=s[--r]}else if(W(i,a)){q(i,a);t.insertBefore(i.h,f.h.nextSibling);i=n[++o];a=s[--r]}else if(W(f,u)){q(f,u);t.insertBefore(f.h,i.h);f=n[--l];u=s[++c]}else{{d=N(n&&n[c],e,c);u=s[++c]}if(d){{i.h.parentNode.insertBefore(d,i.h)}}}}if(o>l){T(t,s[r+1]==null?null:s[r+1].h,e,s,c,r)}else if(c>r){A(n,o,l)}};const W=(t,n)=>{if(t.u===n.u){return true}return false};const q=(t,n)=>{const e=n.h=t.h;const o=t.l;const c=n.l;const l=n.u;const i=n.t;if(i===null){{s=l==="svg"?true:l==="foreignObject"?false:s}{{L(t,n,s)}}if(o!==null&&c!==null){R(e,o,n,c)}else if(c!==null){if(t.t!==null){e.textContent=""}T(e,null,n,c,0,c.length-1)}else if(o!==null){A(o,0,o.length-1)}if(s&&l==="svg"){s=false}}else if(t.t!==i){e.data=i}};const D=(t,s)=>{const o=t.v;const c=t.j||m(null,null);const l=w(s)?s:y(null,null,s);e=o.tagName;l.u=null;l.i|=4;t.j=l;l.h=c.h=o.shadowRoot||o;{n=o["s-sc"]}q(c,l)};const F=(t,n)=>{if(n&&!t.O&&n["s-p"]){n["s-p"].push(new Promise((n=>t.O=n)))}};const H=(t,n)=>{{t.i|=16}if(t.i&4){t.i|=512;return}F(t,t.k);const e=()=>I(t,n);return Mt(e)};const I=(t,n)=>{const e=l("scheduleUpdate",t.g.S);const s=t.M;let o;e();return Q(o,(()=>V(t,s,n)))};const V=async(t,n,e)=>{const s=t.v;const o=l("update",t.g.S);const c=s["s-rc"];if(e){C(t)}const i=l("render",t.g.S);{_(t,n)}if(c){c.map((t=>t()));s["s-rc"]=undefined}i();o();{const n=s["s-p"];const e=()=>B(t);if(n.length===0){e()}else{Promise.all(n).then(e);t.i|=4;n.length=0}}};const _=(t,n,e)=>{try{o=n;n=n.render();{t.i&=~16}{t.i|=2}{{{D(t,n)}}}}catch(n){at(n,t.v)}o=null;return null};const z=()=>o;const B=t=>{const n=t.g.S;const e=t.v;const s=l("postUpdate",n);const o=t.M;const c=t.k;if(!(t.i&64)){t.i|=64;{X(e)}{K(o,"componentDidLoad")}s();{t.C(e);if(!c){J()}}}else{s()}{if(t.O){t.O();t.O=undefined}if(t.i&512){kt((()=>H(t,false)))}t.i&=~(4|512)}};const G=t=>{{const n=it(t);const e=n.v.isConnected;if(e&&(n.i&(2|16))===2){H(n,false)}return e}};const J=n=>{{X(mt.documentElement)}kt((()=>j(yt,"appload",{detail:{namespace:t}})))};const K=(t,n,e)=>{if(t&&t[n]){try{return t[n](e)}catch(t){at(t)}}return undefined};const Q=(t,n)=>t&&t.then?t.then(n):n();const X=t=>t.classList.add("hydrated");const Y=(t,n)=>it(t).P.get(n);const Z=(t,n,e,s)=>{const o=it(t);const c=o.P.get(n);const l=o.i;const i=o.M;e=S(e,s.U[n][0]);const f=Number.isNaN(c)&&Number.isNaN(e);const r=e!==c&&!f;if((!(l&8)||c===undefined)&&r){o.P.set(n,e);if(i){if((l&(2|16))===2){H(o,false)}}}};const tt=(t,n,e)=>{if(n.U){const s=Object.entries(n.U);const o=t.prototype;s.map((([t,[s]])=>{if(s&31||e&2&&s&32){Object.defineProperty(o,t,{get(){return Y(this,t)},set(e){Z(this,t,e,n)},configurable:true,enumerable:true})}}));if(e&1){const n=new Map;o.attributeChangedCallback=function(t,e,s){$t.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e)){s=this[e];delete this[e]}else if(o.hasOwnProperty(e)&&typeof this[e]==="number"&&this[e]==s){return}this[e]=s===null&&typeof this[e]==="boolean"?false:s}))};t.observedAttributes=s.filter((([t,n])=>n[0]&15)).map((([t,e])=>{const s=e[1]||t;n.set(s,t);return s}))}}return t};const nt=async(t,n,e,s,o)=>{if((n.i&32)===0){{n.i|=32;o=ht(e);if(o.then){const t=i();o=await o;t()}if(!o.isProxied){tt(o,e,2);o.isProxied=true}const t=l("createInstance",e.S);{n.i|=8}try{new o(n)}catch(t){at(t)}{n.i&=~8}t()}if(o.style){let t=o.style;const n=x(e);if(!pt.has(n)){const s=l("registerStyles",e.S);k(n,t,!!(e.i&1));s()}}}const c=n.k;const f=()=>H(n,true);if(c&&c["s-rc"]){c["s-rc"].push(f)}else{f()}};const et=t=>{if(($t.i&1)===0){const n=it(t);const e=n.g;const s=l("connectedCallback",e.S);if(!(n.i&1)){n.i|=1;{let e=t;while(e=e.parentNode||e.host){if(e["s-p"]){F(n,n.k=e);break}}}if(e.U){Object.entries(e.U).map((([n,[e]])=>{if(e&31&&t.hasOwnProperty(n)){const e=t[n];delete t[n];t[n]=e}}))}{nt(t,n,e)}}s()}};const st=t=>{if(($t.i&1)===0){it(t)}};const ot=(t,n={})=>{var e;const s=l();const o=[];const c=n.exclude||[];const i=yt.customElements;const r=mt.head;const u=r.querySelector("meta[charset]");const a=mt.createElement("style");const d=[];let h;let y=true;Object.assign($t,n);$t.L=new URL(n.resourcesUrl||"./",mt.baseURI).href;t.map((t=>{t[1].map((n=>{const e={i:n[0],S:n[1],U:n[2],N:n[3]};{e.U=n[2]}const s=e.S;const l=class extends HTMLElement{constructor(t){super(t);t=this;rt(t,e);if(e.i&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(h){clearTimeout(h);h=null}if(y){d.push(this)}else{$t.jmp((()=>et(this)))}}disconnectedCallback(){$t.jmp((()=>st(this)))}componentOnReady(){return it(this).T}};e.A=t[0];if(!c.includes(s)&&!i.get(s)){o.push(s);i.define(s,tt(l,e,1))}}))}));{a.innerHTML=o+f;a.setAttribute("data-styles","");const t=(e=$t.$)!==null&&e!==void 0?e:p(mt);if(t!=null){a.setAttribute("nonce",t)}r.insertBefore(a,u?u.nextSibling:r.firstChild)}y=false;if(d.length){d.map((t=>t.connectedCallback()))}else{{$t.jmp((()=>h=setTimeout(J,30)))}}s()};const ct=t=>$t.$=t;const lt=new WeakMap;const it=t=>lt.get(t);const ft=(t,n)=>lt.set(n.M=t,n);const rt=(t,n)=>{const e={i:0,v:t,g:n,P:new Map};{e.T=new Promise((t=>e.C=t));t["s-p"]=[];t["s-rc"]=[]}return lt.set(t,e)};const ut=(t,n)=>n in t;const at=(t,n)=>(0,console.error)(t,n);const dt=new Map;const ht=(t,n,e)=>{const s=t.S.replace(/-/g,"_");const o=t.A;const c=dt.get(o);if(c){return c[s]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{dt.set(o,t)}return t[s]}),at)};const pt=new Map;const yt=typeof window!=="undefined"?window:{};const mt=yt.document||{head:{}};const $t={i:0,L:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,s)=>t.addEventListener(n,e,s),rel:(t,n,e,s)=>t.removeEventListener(n,e,s),ce:(t,n)=>new CustomEvent(t,n)};const wt=t=>Promise.resolve(t);const bt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const gt=[];const vt=[];const St=(t,n)=>e=>{t.push(e);if(!c){c=true;if(n&&$t.i&4){kt(Ot)}else{$t.raf(Ot)}}};const jt=t=>{for(let n=0;n<t.length;n++){try{t[n](performance.now())}catch(t){at(t)}}t.length=0};const Ot=()=>{jt(gt);{jt(vt);if(c=gt.length>0){$t.raf(Ot)}}};const kt=t=>wt().then(t);const Mt=St(vt,true);export{ot as b,G as f,z as g,y as h,wt as p,ft as r,ct as s};
3
+ //# sourceMappingURL=p-490877ce.js.map