@f-office/docs-react 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,26 +4,26 @@ import { DEFAULT_COMPATIFONT_CDN as oe, canReadInstalledFonts as se, compatifont
4
4
  import { clsx as me } from "clsx";
5
5
  import { twMerge as S } from "tailwind-merge";
6
6
  import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
7
- import { CheckIcon as E, ChevronRightIcon as D, CircleIcon as he, FileUpIcon as ge, ListIcon as O, MonitorIcon as _e, MoonIcon as ve, SunIcon as k, XIcon as ye } from "lucide-react";
8
- import { ContextMenu as A, Dialog as j, Menubar as M } from "radix-ui";
7
+ import { CheckIcon as E, ChevronRightIcon as he, CircleIcon as D, FileUpIcon as ge, ListIcon as O, MonitorIcon as k, MoonIcon as _e, SunIcon as ve, XIcon as A } from "lucide-react";
8
+ import { ContextMenu as j, Dialog as M, Menubar as N } from "radix-ui";
9
9
  // src/assets/logo-mark-dark.svg
10
- var be = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%202346%20512'%20width='2346'%20height='512'%3e%3ctitle%3eF-Office%20logo%3c/title%3e%3cdefs%3e%3c!--%20One%20puzzle%20piece%20(the%20top-left%20one),%20origin%20at%20the%20puzzle%20center.%20The%20other%20three%20pieces%20are%20this%20outline%20rotated%20by%2090,%20180,%20270.%20--%3e%3cpath%20id='piece'%20d='M-134%20-256%20H-3%20A2.5%202.5%200%200%201%20-0.5%20-253.5%20V-185.97%20A17.5%2017.5%200%200%200%2022.45%20-169.34%20A43.5%2043.5%200%201%201%2022.45%20-86.66%20A17.5%2017.5%200%200%200%20-0.5%20-70.03%20V-0.5%20H-70.03%20A16.5%2016.5%200%200%201%20-85.71%20-22.14%20A44.5%2044.5%200%201%200%20-170.29%20-22.14%20A16.5%2016.5%200%200%201%20-185.97%20-0.5%20H-253.5%20A2.5%202.5%200%200%201%20-256%20-3%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20The%20whole%20puzzle%20square:%20drawn%20in%20the%20seam%20color%20under%20the%20pieces,%20and%20used%20to%20keep%20the%20edge%20shading%20inside%20the%20puzzle.%20--%3e%3cpath%20id='plate'%20d='M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3cclipPath%20id='plate-clip'%3e%3cuse%20xlink:href='%23plate'/%3e%3c/clipPath%3e%3cpath%20id='outside'%20fill-rule='evenodd'%20d='M-320%20-320%20H320%20V320%20H-320%20Z%20M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20Piece%20fills:%20light%20at%20the%20top%20left%20of%20every%20piece,%20so%20each%20gradient%20is%20turned%20back%20by%20the%20rotation%20of%20its%20piece.%20--%3e%3clinearGradient%20id='fill-purple'%20x1='-170.31'%20y1='-254.74'%20x2='-1.36'%20y2='5.42'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23D697FF'/%3e%3cstop%20offset='0.5'%20stop-color='%237E5AF4'/%3e%3cstop%20offset='1'%20stop-color='%234137C8'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-pink'%20x1='40.82'%20y1='-222.24'%20x2='219.77'%20y2='53.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-90)'%3e%3cstop%20offset='0'%20stop-color='%23FFB0D8'/%3e%3cstop%20offset='0.5'%20stop-color='%23FB5D99'/%3e%3cstop%20offset='1'%20stop-color='%23C71878'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-cyan'%20x1='5.69'%20y1='1.26'%20x2='174.64'%20y2='261.42'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-180)'%3e%3cstop%20offset='0'%20stop-color='%238EF1FC'/%3e%3cstop%20offset='0.5'%20stop-color='%2300CEE7'/%3e%3cstop%20offset='1'%20stop-color='%23009DB7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-orange'%20x1='-215.18'%20y1='-46.24'%20x2='-36.23'%20y2='229.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-270)'%3e%3cstop%20offset='0'%20stop-color='%23FCDD64'/%3e%3cstop%20offset='0.5'%20stop-color='%23FF9525'/%3e%3cstop%20offset='1'%20stop-color='%23F57B20'/%3e%3c/linearGradient%3e%3c!--%20Edge%20shading%20of%20the%20pieces.%20'shade':%20a%20crisp%20dark%20rim%20inside%20the%20edges%20that%20face%20down%20and%20right,%20a%20soft%20band%20behind%20it,%20and%20a%20tight%20shadow%20cast%20onto%20the%20neighbors.%20'light':%20a%20crisp%20light%20rim%20inside%20the%20edges%20that%20face%20up%20and%20left,%20and%20a%20soft%20band%20behind%20it;%20the%20outside%20of%20the%20puzzle%20counts%20as%20filled%20there,%20so%20only%20the%20seams%20get%20it.%20--%3e%3cfilter%20id='shade'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='-1'%20dy='-1'%20result='up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='up'%20operator='out'%20result='dark-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='2'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='-5'%20dy='-5'%20result='soft-up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-up'%20operator='out'%20result='dark-band'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='0.7'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dx='0.8'%20dy='1.2'%20result='tight-off'/%3e%3cfeComposite%20in='tight-off'%20in2='SourceAlpha'%20operator='out'%20result='cast'/%3e%3cfeFlood%20flood-color='%23120C3A'%20flood-opacity='0.15'/%3e%3cfeComposite%20in2='cast'%20operator='in'%20result='cast-shadow'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.1'/%3e%3cfeComposite%20in2='dark-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.4'/%3e%3cfeComposite%20in2='dark-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='cast-shadow'/%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3cfilter%20id='light'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='1'%20dy='1'%20result='down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='down'%20operator='out'%20result='light-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='1.5'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='4'%20dy='4'%20result='soft-down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-down'%20operator='out'%20result='light-band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.38'/%3e%3cfeComposite%20in2='light-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.45'/%3e%3cfeComposite%20in2='light-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3c!--%20Colored%20glow%20and%20contact%20shadow%20under%20the%20pieces%20--%3e%3cfilter%20id='glow'%20x='-40%25'%20y='-40%25'%20width='180%25'%20height='180%25'%20color-interpolation-filters='sRGB'%3e%3cfeGaussianBlur%20in='SourceGraphic'%20stdDeviation='34'%20result='wide'/%3e%3cfeOffset%20in='wide'%20dy='16'%20result='wide-off'/%3e%3cfeComponentTransfer%20in='wide-off'%20result='color-glow'%3e%3cfeFuncA%20type='linear'%20slope='0.5'/%3e%3c/feComponentTransfer%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='9'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dy='10'%20result='tight-off'/%3e%3cfeFlood%20flood-color='%23202848'%20flood-opacity='0.07'/%3e%3cfeComposite%20in2='tight-off'%20operator='in'%20result='contact'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='color-glow'/%3e%3cfeMergeNode%20in='contact'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3cg%20id='puzzle'%20transform='translate(256%20256)'%3e%3cg%20id='puzzle-glow'%20filter='url(%23glow)'%20clip-path='url(%23plate-clip)'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='pieces'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='edge-shade'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3c/g%3e%3c/g%3e%3cg%20id='edge-light'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cpath%20id='wordmark'%20fill='%23FFFFFF'%20transform='translate(662.00%20421)%20scale(0.46348)'%20d='M1241%20-729%20C1135%20-729%201050%20-693%20984%20-623%20C918%20-552%20886%20-463%20886%20-356%20C886%20-246%20918%20-156%20983%20-87%20C1047%20-17%201134%2017%201243%2017%20C1348%2017%201432%20-18%201495%20-88%20C1558%20-158%201590%20-247%201590%20-355%20C1590%20-469%201558%20-559%201495%20-627%20C1431%20-695%201347%20-729%201241%20-729Z%20M1896.7%20-713%20C1827.7%20-713%201777.7%20-700%201746.7%20-674%20C1714.7%20-648%201699.7%20-603%201699.7%20-539%20V-516%20H1617.7%20V-404%20H1699.7%20V0%20H1869.7%20V-404%20H1923.6%20H1969.7%20H2005.6%20V0%20H2175.6%20V-404%20H2275.6%20V-516%20H2173.6%20V-547%20C2173.6%20-565%202177.6%20-577%202185.6%20-583%20C2193.6%20-589%202210.6%20-592%202235.6%20-592%20C2251.6%20-592%202267.6%20-591%202281.6%20-590%20L2282.6%20-711%20C2246.6%20-712%202219.6%20-713%202202.6%20-713%20C2133.6%20-713%202083.6%20-700%202052.6%20-674%20C2020.6%20-648%202005.6%20-603%202005.6%20-539%20V-516%20H1969.7%20H1923.6%20H1867.7%20V-547%20C1867.7%20-565%201871.7%20-577%201879.7%20-583%20C1887.7%20-589%201904.7%20-592%201929.7%20-592%20C1945.7%20-592%201961.7%20-591%201975.7%20-590%20L1976.7%20-711%20C1940.7%20-712%201913.7%20-713%201896.7%20-713Z%20M0%20-712%20V0%20H187%20V-274%20H481%20V-420%20H187%20V-557%20H526%20V-712Z%20M2316.6%20-712%20V-584%20H2486.6%20V-712Z%20M1239%20-577%20C1289%20-577%201328%20-558%201357%20-519%20C1385%20-481%201400%20-428%201400%20-360%20C1400%20-289%201386%20-234%201358%20-195%20C1330%20-155%201290%20-136%201240%20-136%20C1188%20-136%201148%20-155%201119%20-195%20C1090%20-234%201076%20-288%201076%20-357%20C1076%20-425%201090%20-478%201120%20-518%20C1149%20-558%201189%20-577%201239%20-577Z%20M2795.6%20-530%20C2713.6%20-530%202647.6%20-504%202597.6%20-454%20C2547.6%20-403%202522.6%20-336%202522.6%20-253%20C2522.6%20-173%202547.6%20-109%202597.6%20-60%20C2647.6%20-11%202712.6%2014%202792.6%2014%20C2867.6%2014%202927.6%20-5%202972.6%20-42%20C3017.6%20-80%203044.6%20-133%203053.6%20-202%20L2891.6%20-203%20C2880.6%20-143%202849.6%20-113%202797.6%20-113%20C2763.6%20-113%202738.6%20-125%202720.6%20-150%20C2702.6%20-174%202693.6%20-209%202693.6%20-255%20C2693.6%20-303%202702.6%20-340%202720.6%20-367%20C2738.6%20-393%202764.6%20-407%202797.6%20-407%20C2821.6%20-407%202840.6%20-400%202856.6%20-386%20C2872.6%20-372%202881.6%20-353%202885.6%20-328%20H3049.6%20C3045.6%20-389%203019.6%20-438%202973.6%20-475%20C2927.6%20-511%202867.6%20-530%202795.6%20-530Z%20M3358.1%20-529%20C3276.1%20-529%203210.1%20-503%203159.1%20-451%20C3107.1%20-399%203082.1%20-333%203082.1%20-252%20C3082.1%20-170%203108.1%20-104%203161.1%20-56%20C3214.1%20-8%203282.1%2016%203364.1%2016%20C3429.1%2016%203484.1%201%203529.1%20-29%20C3574.1%20-59%203605.1%20-101%203622.1%20-157%20H3463.1%20C3441.1%20-117%203408.1%20-97%203366.1%20-97%20C3330.1%20-97%203301.1%20-107%203280.1%20-128%20C3259.1%20-149%203248.1%20-179%203248.1%20-217%20H3632.1%20V-232%20C3632.1%20-324%203607.1%20-396%203558.1%20-449%20C3509.1%20-502%203442.1%20-529%203358.1%20-529Z%20M2316.6%20-516%20V0%20H2486.6%20V-516Z%20M537%20-420%20V-274%20H848%20V-420Z%20M3359.1%20-415%20C3390.1%20-415%203415.1%20-405%203433.1%20-387%20C3451.1%20-369%203462.1%20-344%203465.1%20-314%20H3250.1%20C3260.1%20-381%203297.1%20-415%203359.1%20-415Z'/%3e%3c/svg%3e", N = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%202346%20512'%20width='2346'%20height='512'%3e%3ctitle%3eF-Office%20logo%3c/title%3e%3cdefs%3e%3c!--%20One%20puzzle%20piece%20(the%20top-left%20one),%20origin%20at%20the%20puzzle%20center.%20The%20other%20three%20pieces%20are%20this%20outline%20rotated%20by%2090,%20180,%20270.%20--%3e%3cpath%20id='piece'%20d='M-134%20-256%20H-3%20A2.5%202.5%200%200%201%20-0.5%20-253.5%20V-185.97%20A17.5%2017.5%200%200%200%2022.45%20-169.34%20A43.5%2043.5%200%201%201%2022.45%20-86.66%20A17.5%2017.5%200%200%200%20-0.5%20-70.03%20V-0.5%20H-70.03%20A16.5%2016.5%200%200%201%20-85.71%20-22.14%20A44.5%2044.5%200%201%200%20-170.29%20-22.14%20A16.5%2016.5%200%200%201%20-185.97%20-0.5%20H-253.5%20A2.5%202.5%200%200%201%20-256%20-3%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20The%20whole%20puzzle%20square:%20drawn%20in%20the%20seam%20color%20under%20the%20pieces,%20and%20used%20to%20keep%20the%20edge%20shading%20inside%20the%20puzzle.%20--%3e%3cpath%20id='plate'%20d='M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3cclipPath%20id='plate-clip'%3e%3cuse%20xlink:href='%23plate'/%3e%3c/clipPath%3e%3cpath%20id='outside'%20fill-rule='evenodd'%20d='M-320%20-320%20H320%20V320%20H-320%20Z%20M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20Piece%20fills:%20light%20at%20the%20top%20left%20of%20every%20piece,%20so%20each%20gradient%20is%20turned%20back%20by%20the%20rotation%20of%20its%20piece.%20--%3e%3clinearGradient%20id='fill-purple'%20x1='-170.31'%20y1='-254.74'%20x2='-1.36'%20y2='5.42'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23D697FF'/%3e%3cstop%20offset='0.5'%20stop-color='%237E5AF4'/%3e%3cstop%20offset='1'%20stop-color='%234137C8'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-pink'%20x1='40.82'%20y1='-222.24'%20x2='219.77'%20y2='53.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-90)'%3e%3cstop%20offset='0'%20stop-color='%23FFB0D8'/%3e%3cstop%20offset='0.5'%20stop-color='%23FB5D99'/%3e%3cstop%20offset='1'%20stop-color='%23C71878'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-cyan'%20x1='5.69'%20y1='1.26'%20x2='174.64'%20y2='261.42'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-180)'%3e%3cstop%20offset='0'%20stop-color='%238EF1FC'/%3e%3cstop%20offset='0.5'%20stop-color='%2300CEE7'/%3e%3cstop%20offset='1'%20stop-color='%23009DB7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-orange'%20x1='-215.18'%20y1='-46.24'%20x2='-36.23'%20y2='229.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-270)'%3e%3cstop%20offset='0'%20stop-color='%23FCDD64'/%3e%3cstop%20offset='0.5'%20stop-color='%23FF9525'/%3e%3cstop%20offset='1'%20stop-color='%23F57B20'/%3e%3c/linearGradient%3e%3c!--%20Edge%20shading%20of%20the%20pieces.%20'shade':%20a%20crisp%20dark%20rim%20inside%20the%20edges%20that%20face%20down%20and%20right,%20a%20soft%20band%20behind%20it,%20and%20a%20tight%20shadow%20cast%20onto%20the%20neighbors.%20'light':%20a%20crisp%20light%20rim%20inside%20the%20edges%20that%20face%20up%20and%20left,%20and%20a%20soft%20band%20behind%20it;%20the%20outside%20of%20the%20puzzle%20counts%20as%20filled%20there,%20so%20only%20the%20seams%20get%20it.%20--%3e%3cfilter%20id='shade'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='-1'%20dy='-1'%20result='up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='up'%20operator='out'%20result='dark-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='2'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='-5'%20dy='-5'%20result='soft-up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-up'%20operator='out'%20result='dark-band'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='0.7'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dx='0.8'%20dy='1.2'%20result='tight-off'/%3e%3cfeComposite%20in='tight-off'%20in2='SourceAlpha'%20operator='out'%20result='cast'/%3e%3cfeFlood%20flood-color='%23120C3A'%20flood-opacity='0.15'/%3e%3cfeComposite%20in2='cast'%20operator='in'%20result='cast-shadow'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.1'/%3e%3cfeComposite%20in2='dark-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.4'/%3e%3cfeComposite%20in2='dark-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='cast-shadow'/%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3cfilter%20id='light'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='1'%20dy='1'%20result='down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='down'%20operator='out'%20result='light-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='1.5'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='4'%20dy='4'%20result='soft-down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-down'%20operator='out'%20result='light-band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.38'/%3e%3cfeComposite%20in2='light-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.45'/%3e%3cfeComposite%20in2='light-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3c!--%20Colored%20glow%20and%20contact%20shadow%20under%20the%20pieces%20--%3e%3cfilter%20id='glow'%20x='-40%25'%20y='-40%25'%20width='180%25'%20height='180%25'%20color-interpolation-filters='sRGB'%3e%3cfeGaussianBlur%20in='SourceGraphic'%20stdDeviation='34'%20result='wide'/%3e%3cfeOffset%20in='wide'%20dy='16'%20result='wide-off'/%3e%3cfeComponentTransfer%20in='wide-off'%20result='color-glow'%3e%3cfeFuncA%20type='linear'%20slope='0.5'/%3e%3c/feComponentTransfer%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='9'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dy='10'%20result='tight-off'/%3e%3cfeFlood%20flood-color='%23202848'%20flood-opacity='0.07'/%3e%3cfeComposite%20in2='tight-off'%20operator='in'%20result='contact'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='color-glow'/%3e%3cfeMergeNode%20in='contact'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3cg%20id='puzzle'%20transform='translate(256%20256)'%3e%3cg%20id='puzzle-glow'%20filter='url(%23glow)'%20clip-path='url(%23plate-clip)'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='pieces'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='edge-shade'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3c/g%3e%3c/g%3e%3cg%20id='edge-light'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cpath%20id='wordmark'%20fill='%231D1D1F'%20transform='translate(662.00%20421)%20scale(0.46348)'%20d='M1241%20-729%20C1135%20-729%201050%20-693%20984%20-623%20C918%20-552%20886%20-463%20886%20-356%20C886%20-246%20918%20-156%20983%20-87%20C1047%20-17%201134%2017%201243%2017%20C1348%2017%201432%20-18%201495%20-88%20C1558%20-158%201590%20-247%201590%20-355%20C1590%20-469%201558%20-559%201495%20-627%20C1431%20-695%201347%20-729%201241%20-729Z%20M1896.7%20-713%20C1827.7%20-713%201777.7%20-700%201746.7%20-674%20C1714.7%20-648%201699.7%20-603%201699.7%20-539%20V-516%20H1617.7%20V-404%20H1699.7%20V0%20H1869.7%20V-404%20H1923.6%20H1969.7%20H2005.6%20V0%20H2175.6%20V-404%20H2275.6%20V-516%20H2173.6%20V-547%20C2173.6%20-565%202177.6%20-577%202185.6%20-583%20C2193.6%20-589%202210.6%20-592%202235.6%20-592%20C2251.6%20-592%202267.6%20-591%202281.6%20-590%20L2282.6%20-711%20C2246.6%20-712%202219.6%20-713%202202.6%20-713%20C2133.6%20-713%202083.6%20-700%202052.6%20-674%20C2020.6%20-648%202005.6%20-603%202005.6%20-539%20V-516%20H1969.7%20H1923.6%20H1867.7%20V-547%20C1867.7%20-565%201871.7%20-577%201879.7%20-583%20C1887.7%20-589%201904.7%20-592%201929.7%20-592%20C1945.7%20-592%201961.7%20-591%201975.7%20-590%20L1976.7%20-711%20C1940.7%20-712%201913.7%20-713%201896.7%20-713Z%20M0%20-712%20V0%20H187%20V-274%20H481%20V-420%20H187%20V-557%20H526%20V-712Z%20M2316.6%20-712%20V-584%20H2486.6%20V-712Z%20M1239%20-577%20C1289%20-577%201328%20-558%201357%20-519%20C1385%20-481%201400%20-428%201400%20-360%20C1400%20-289%201386%20-234%201358%20-195%20C1330%20-155%201290%20-136%201240%20-136%20C1188%20-136%201148%20-155%201119%20-195%20C1090%20-234%201076%20-288%201076%20-357%20C1076%20-425%201090%20-478%201120%20-518%20C1149%20-558%201189%20-577%201239%20-577Z%20M2795.6%20-530%20C2713.6%20-530%202647.6%20-504%202597.6%20-454%20C2547.6%20-403%202522.6%20-336%202522.6%20-253%20C2522.6%20-173%202547.6%20-109%202597.6%20-60%20C2647.6%20-11%202712.6%2014%202792.6%2014%20C2867.6%2014%202927.6%20-5%202972.6%20-42%20C3017.6%20-80%203044.6%20-133%203053.6%20-202%20L2891.6%20-203%20C2880.6%20-143%202849.6%20-113%202797.6%20-113%20C2763.6%20-113%202738.6%20-125%202720.6%20-150%20C2702.6%20-174%202693.6%20-209%202693.6%20-255%20C2693.6%20-303%202702.6%20-340%202720.6%20-367%20C2738.6%20-393%202764.6%20-407%202797.6%20-407%20C2821.6%20-407%202840.6%20-400%202856.6%20-386%20C2872.6%20-372%202881.6%20-353%202885.6%20-328%20H3049.6%20C3045.6%20-389%203019.6%20-438%202973.6%20-475%20C2927.6%20-511%202867.6%20-530%202795.6%20-530Z%20M3358.1%20-529%20C3276.1%20-529%203210.1%20-503%203159.1%20-451%20C3107.1%20-399%203082.1%20-333%203082.1%20-252%20C3082.1%20-170%203108.1%20-104%203161.1%20-56%20C3214.1%20-8%203282.1%2016%203364.1%2016%20C3429.1%2016%203484.1%201%203529.1%20-29%20C3574.1%20-59%203605.1%20-101%203622.1%20-157%20H3463.1%20C3441.1%20-117%203408.1%20-97%203366.1%20-97%20C3330.1%20-97%203301.1%20-107%203280.1%20-128%20C3259.1%20-149%203248.1%20-179%203248.1%20-217%20H3632.1%20V-232%20C3632.1%20-324%203607.1%20-396%203558.1%20-449%20C3509.1%20-502%203442.1%20-529%203358.1%20-529Z%20M2316.6%20-516%20V0%20H2486.6%20V-516Z%20M537%20-420%20V-274%20H848%20V-420Z%20M3359.1%20-415%20C3390.1%20-415%203415.1%20-405%203433.1%20-387%20C3451.1%20-369%203462.1%20-344%203465.1%20-314%20H3250.1%20C3260.1%20-381%203297.1%20-415%203359.1%20-415Z'/%3e%3c/svg%3e", xe = 5e7, Se = 400, Ce = {
10
+ var ye = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%202346%20512'%20width='2346'%20height='512'%3e%3ctitle%3eF-Office%20logo%3c/title%3e%3cdefs%3e%3c!--%20One%20puzzle%20piece%20(the%20top-left%20one),%20origin%20at%20the%20puzzle%20center.%20The%20other%20three%20pieces%20are%20this%20outline%20rotated%20by%2090,%20180,%20270.%20--%3e%3cpath%20id='piece'%20d='M-134%20-256%20H-3%20A2.5%202.5%200%200%201%20-0.5%20-253.5%20V-185.97%20A17.5%2017.5%200%200%200%2022.45%20-169.34%20A43.5%2043.5%200%201%201%2022.45%20-86.66%20A17.5%2017.5%200%200%200%20-0.5%20-70.03%20V-0.5%20H-70.03%20A16.5%2016.5%200%200%201%20-85.71%20-22.14%20A44.5%2044.5%200%201%200%20-170.29%20-22.14%20A16.5%2016.5%200%200%201%20-185.97%20-0.5%20H-253.5%20A2.5%202.5%200%200%201%20-256%20-3%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20The%20whole%20puzzle%20square:%20drawn%20in%20the%20seam%20color%20under%20the%20pieces,%20and%20used%20to%20keep%20the%20edge%20shading%20inside%20the%20puzzle.%20--%3e%3cpath%20id='plate'%20d='M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3cclipPath%20id='plate-clip'%3e%3cuse%20xlink:href='%23plate'/%3e%3c/clipPath%3e%3cpath%20id='outside'%20fill-rule='evenodd'%20d='M-320%20-320%20H320%20V320%20H-320%20Z%20M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20Piece%20fills:%20light%20at%20the%20top%20left%20of%20every%20piece,%20so%20each%20gradient%20is%20turned%20back%20by%20the%20rotation%20of%20its%20piece.%20--%3e%3clinearGradient%20id='fill-purple'%20x1='-170.31'%20y1='-254.74'%20x2='-1.36'%20y2='5.42'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23D697FF'/%3e%3cstop%20offset='0.5'%20stop-color='%237E5AF4'/%3e%3cstop%20offset='1'%20stop-color='%234137C8'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-pink'%20x1='40.82'%20y1='-222.24'%20x2='219.77'%20y2='53.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-90)'%3e%3cstop%20offset='0'%20stop-color='%23FFB0D8'/%3e%3cstop%20offset='0.5'%20stop-color='%23FB5D99'/%3e%3cstop%20offset='1'%20stop-color='%23C71878'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-cyan'%20x1='5.69'%20y1='1.26'%20x2='174.64'%20y2='261.42'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-180)'%3e%3cstop%20offset='0'%20stop-color='%238EF1FC'/%3e%3cstop%20offset='0.5'%20stop-color='%2300CEE7'/%3e%3cstop%20offset='1'%20stop-color='%23009DB7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-orange'%20x1='-215.18'%20y1='-46.24'%20x2='-36.23'%20y2='229.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-270)'%3e%3cstop%20offset='0'%20stop-color='%23FCDD64'/%3e%3cstop%20offset='0.5'%20stop-color='%23FF9525'/%3e%3cstop%20offset='1'%20stop-color='%23F57B20'/%3e%3c/linearGradient%3e%3c!--%20Edge%20shading%20of%20the%20pieces.%20'shade':%20a%20crisp%20dark%20rim%20inside%20the%20edges%20that%20face%20down%20and%20right,%20a%20soft%20band%20behind%20it,%20and%20a%20tight%20shadow%20cast%20onto%20the%20neighbors.%20'light':%20a%20crisp%20light%20rim%20inside%20the%20edges%20that%20face%20up%20and%20left,%20and%20a%20soft%20band%20behind%20it;%20the%20outside%20of%20the%20puzzle%20counts%20as%20filled%20there,%20so%20only%20the%20seams%20get%20it.%20--%3e%3cfilter%20id='shade'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='-1'%20dy='-1'%20result='up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='up'%20operator='out'%20result='dark-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='2'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='-5'%20dy='-5'%20result='soft-up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-up'%20operator='out'%20result='dark-band'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='0.7'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dx='0.8'%20dy='1.2'%20result='tight-off'/%3e%3cfeComposite%20in='tight-off'%20in2='SourceAlpha'%20operator='out'%20result='cast'/%3e%3cfeFlood%20flood-color='%23120C3A'%20flood-opacity='0.15'/%3e%3cfeComposite%20in2='cast'%20operator='in'%20result='cast-shadow'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.1'/%3e%3cfeComposite%20in2='dark-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.4'/%3e%3cfeComposite%20in2='dark-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='cast-shadow'/%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3cfilter%20id='light'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='1'%20dy='1'%20result='down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='down'%20operator='out'%20result='light-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='1.5'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='4'%20dy='4'%20result='soft-down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-down'%20operator='out'%20result='light-band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.38'/%3e%3cfeComposite%20in2='light-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.45'/%3e%3cfeComposite%20in2='light-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3c!--%20Colored%20glow%20and%20contact%20shadow%20under%20the%20pieces%20--%3e%3cfilter%20id='glow'%20x='-40%25'%20y='-40%25'%20width='180%25'%20height='180%25'%20color-interpolation-filters='sRGB'%3e%3cfeGaussianBlur%20in='SourceGraphic'%20stdDeviation='34'%20result='wide'/%3e%3cfeOffset%20in='wide'%20dy='16'%20result='wide-off'/%3e%3cfeComponentTransfer%20in='wide-off'%20result='color-glow'%3e%3cfeFuncA%20type='linear'%20slope='0.5'/%3e%3c/feComponentTransfer%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='9'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dy='10'%20result='tight-off'/%3e%3cfeFlood%20flood-color='%23202848'%20flood-opacity='0.07'/%3e%3cfeComposite%20in2='tight-off'%20operator='in'%20result='contact'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='color-glow'/%3e%3cfeMergeNode%20in='contact'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3cg%20id='puzzle'%20transform='translate(256%20256)'%3e%3cg%20id='puzzle-glow'%20filter='url(%23glow)'%20clip-path='url(%23plate-clip)'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='pieces'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='edge-shade'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3c/g%3e%3c/g%3e%3cg%20id='edge-light'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cpath%20id='wordmark'%20fill='%23FFFFFF'%20transform='translate(662.00%20421)%20scale(0.46348)'%20d='M1241%20-729%20C1135%20-729%201050%20-693%20984%20-623%20C918%20-552%20886%20-463%20886%20-356%20C886%20-246%20918%20-156%20983%20-87%20C1047%20-17%201134%2017%201243%2017%20C1348%2017%201432%20-18%201495%20-88%20C1558%20-158%201590%20-247%201590%20-355%20C1590%20-469%201558%20-559%201495%20-627%20C1431%20-695%201347%20-729%201241%20-729Z%20M1896.7%20-713%20C1827.7%20-713%201777.7%20-700%201746.7%20-674%20C1714.7%20-648%201699.7%20-603%201699.7%20-539%20V-516%20H1617.7%20V-404%20H1699.7%20V0%20H1869.7%20V-404%20H1923.6%20H1969.7%20H2005.6%20V0%20H2175.6%20V-404%20H2275.6%20V-516%20H2173.6%20V-547%20C2173.6%20-565%202177.6%20-577%202185.6%20-583%20C2193.6%20-589%202210.6%20-592%202235.6%20-592%20C2251.6%20-592%202267.6%20-591%202281.6%20-590%20L2282.6%20-711%20C2246.6%20-712%202219.6%20-713%202202.6%20-713%20C2133.6%20-713%202083.6%20-700%202052.6%20-674%20C2020.6%20-648%202005.6%20-603%202005.6%20-539%20V-516%20H1969.7%20H1923.6%20H1867.7%20V-547%20C1867.7%20-565%201871.7%20-577%201879.7%20-583%20C1887.7%20-589%201904.7%20-592%201929.7%20-592%20C1945.7%20-592%201961.7%20-591%201975.7%20-590%20L1976.7%20-711%20C1940.7%20-712%201913.7%20-713%201896.7%20-713Z%20M0%20-712%20V0%20H187%20V-274%20H481%20V-420%20H187%20V-557%20H526%20V-712Z%20M2316.6%20-712%20V-584%20H2486.6%20V-712Z%20M1239%20-577%20C1289%20-577%201328%20-558%201357%20-519%20C1385%20-481%201400%20-428%201400%20-360%20C1400%20-289%201386%20-234%201358%20-195%20C1330%20-155%201290%20-136%201240%20-136%20C1188%20-136%201148%20-155%201119%20-195%20C1090%20-234%201076%20-288%201076%20-357%20C1076%20-425%201090%20-478%201120%20-518%20C1149%20-558%201189%20-577%201239%20-577Z%20M2795.6%20-530%20C2713.6%20-530%202647.6%20-504%202597.6%20-454%20C2547.6%20-403%202522.6%20-336%202522.6%20-253%20C2522.6%20-173%202547.6%20-109%202597.6%20-60%20C2647.6%20-11%202712.6%2014%202792.6%2014%20C2867.6%2014%202927.6%20-5%202972.6%20-42%20C3017.6%20-80%203044.6%20-133%203053.6%20-202%20L2891.6%20-203%20C2880.6%20-143%202849.6%20-113%202797.6%20-113%20C2763.6%20-113%202738.6%20-125%202720.6%20-150%20C2702.6%20-174%202693.6%20-209%202693.6%20-255%20C2693.6%20-303%202702.6%20-340%202720.6%20-367%20C2738.6%20-393%202764.6%20-407%202797.6%20-407%20C2821.6%20-407%202840.6%20-400%202856.6%20-386%20C2872.6%20-372%202881.6%20-353%202885.6%20-328%20H3049.6%20C3045.6%20-389%203019.6%20-438%202973.6%20-475%20C2927.6%20-511%202867.6%20-530%202795.6%20-530Z%20M3358.1%20-529%20C3276.1%20-529%203210.1%20-503%203159.1%20-451%20C3107.1%20-399%203082.1%20-333%203082.1%20-252%20C3082.1%20-170%203108.1%20-104%203161.1%20-56%20C3214.1%20-8%203282.1%2016%203364.1%2016%20C3429.1%2016%203484.1%201%203529.1%20-29%20C3574.1%20-59%203605.1%20-101%203622.1%20-157%20H3463.1%20C3441.1%20-117%203408.1%20-97%203366.1%20-97%20C3330.1%20-97%203301.1%20-107%203280.1%20-128%20C3259.1%20-149%203248.1%20-179%203248.1%20-217%20H3632.1%20V-232%20C3632.1%20-324%203607.1%20-396%203558.1%20-449%20C3509.1%20-502%203442.1%20-529%203358.1%20-529Z%20M2316.6%20-516%20V0%20H2486.6%20V-516Z%20M537%20-420%20V-274%20H848%20V-420Z%20M3359.1%20-415%20C3390.1%20-415%203415.1%20-405%203433.1%20-387%20C3451.1%20-369%203462.1%20-344%203465.1%20-314%20H3250.1%20C3260.1%20-381%203297.1%20-415%203359.1%20-415Z'/%3e%3c/svg%3e", be = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%202346%20512'%20width='2346'%20height='512'%3e%3ctitle%3eF-Office%20logo%3c/title%3e%3cdefs%3e%3c!--%20One%20puzzle%20piece%20(the%20top-left%20one),%20origin%20at%20the%20puzzle%20center.%20The%20other%20three%20pieces%20are%20this%20outline%20rotated%20by%2090,%20180,%20270.%20--%3e%3cpath%20id='piece'%20d='M-134%20-256%20H-3%20A2.5%202.5%200%200%201%20-0.5%20-253.5%20V-185.97%20A17.5%2017.5%200%200%200%2022.45%20-169.34%20A43.5%2043.5%200%201%201%2022.45%20-86.66%20A17.5%2017.5%200%200%200%20-0.5%20-70.03%20V-0.5%20H-70.03%20A16.5%2016.5%200%200%201%20-85.71%20-22.14%20A44.5%2044.5%200%201%200%20-170.29%20-22.14%20A16.5%2016.5%200%200%201%20-185.97%20-0.5%20H-253.5%20A2.5%202.5%200%200%201%20-256%20-3%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20The%20whole%20puzzle%20square:%20drawn%20in%20the%20seam%20color%20under%20the%20pieces,%20and%20used%20to%20keep%20the%20edge%20shading%20inside%20the%20puzzle.%20--%3e%3cpath%20id='plate'%20d='M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3cclipPath%20id='plate-clip'%3e%3cuse%20xlink:href='%23plate'/%3e%3c/clipPath%3e%3cpath%20id='outside'%20fill-rule='evenodd'%20d='M-320%20-320%20H320%20V320%20H-320%20Z%20M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20Piece%20fills:%20light%20at%20the%20top%20left%20of%20every%20piece,%20so%20each%20gradient%20is%20turned%20back%20by%20the%20rotation%20of%20its%20piece.%20--%3e%3clinearGradient%20id='fill-purple'%20x1='-170.31'%20y1='-254.74'%20x2='-1.36'%20y2='5.42'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23D697FF'/%3e%3cstop%20offset='0.5'%20stop-color='%237E5AF4'/%3e%3cstop%20offset='1'%20stop-color='%234137C8'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-pink'%20x1='40.82'%20y1='-222.24'%20x2='219.77'%20y2='53.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-90)'%3e%3cstop%20offset='0'%20stop-color='%23FFB0D8'/%3e%3cstop%20offset='0.5'%20stop-color='%23FB5D99'/%3e%3cstop%20offset='1'%20stop-color='%23C71878'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-cyan'%20x1='5.69'%20y1='1.26'%20x2='174.64'%20y2='261.42'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-180)'%3e%3cstop%20offset='0'%20stop-color='%238EF1FC'/%3e%3cstop%20offset='0.5'%20stop-color='%2300CEE7'/%3e%3cstop%20offset='1'%20stop-color='%23009DB7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-orange'%20x1='-215.18'%20y1='-46.24'%20x2='-36.23'%20y2='229.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-270)'%3e%3cstop%20offset='0'%20stop-color='%23FCDD64'/%3e%3cstop%20offset='0.5'%20stop-color='%23FF9525'/%3e%3cstop%20offset='1'%20stop-color='%23F57B20'/%3e%3c/linearGradient%3e%3c!--%20Edge%20shading%20of%20the%20pieces.%20'shade':%20a%20crisp%20dark%20rim%20inside%20the%20edges%20that%20face%20down%20and%20right,%20a%20soft%20band%20behind%20it,%20and%20a%20tight%20shadow%20cast%20onto%20the%20neighbors.%20'light':%20a%20crisp%20light%20rim%20inside%20the%20edges%20that%20face%20up%20and%20left,%20and%20a%20soft%20band%20behind%20it;%20the%20outside%20of%20the%20puzzle%20counts%20as%20filled%20there,%20so%20only%20the%20seams%20get%20it.%20--%3e%3cfilter%20id='shade'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='-1'%20dy='-1'%20result='up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='up'%20operator='out'%20result='dark-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='2'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='-5'%20dy='-5'%20result='soft-up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-up'%20operator='out'%20result='dark-band'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='0.7'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dx='0.8'%20dy='1.2'%20result='tight-off'/%3e%3cfeComposite%20in='tight-off'%20in2='SourceAlpha'%20operator='out'%20result='cast'/%3e%3cfeFlood%20flood-color='%23120C3A'%20flood-opacity='0.15'/%3e%3cfeComposite%20in2='cast'%20operator='in'%20result='cast-shadow'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.1'/%3e%3cfeComposite%20in2='dark-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.4'/%3e%3cfeComposite%20in2='dark-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='cast-shadow'/%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3cfilter%20id='light'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='1'%20dy='1'%20result='down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='down'%20operator='out'%20result='light-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='1.5'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='4'%20dy='4'%20result='soft-down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-down'%20operator='out'%20result='light-band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.38'/%3e%3cfeComposite%20in2='light-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.45'/%3e%3cfeComposite%20in2='light-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3c!--%20Colored%20glow%20and%20contact%20shadow%20under%20the%20pieces%20--%3e%3cfilter%20id='glow'%20x='-40%25'%20y='-40%25'%20width='180%25'%20height='180%25'%20color-interpolation-filters='sRGB'%3e%3cfeGaussianBlur%20in='SourceGraphic'%20stdDeviation='34'%20result='wide'/%3e%3cfeOffset%20in='wide'%20dy='16'%20result='wide-off'/%3e%3cfeComponentTransfer%20in='wide-off'%20result='color-glow'%3e%3cfeFuncA%20type='linear'%20slope='0.5'/%3e%3c/feComponentTransfer%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='9'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dy='10'%20result='tight-off'/%3e%3cfeFlood%20flood-color='%23202848'%20flood-opacity='0.07'/%3e%3cfeComposite%20in2='tight-off'%20operator='in'%20result='contact'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='color-glow'/%3e%3cfeMergeNode%20in='contact'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3cg%20id='puzzle'%20transform='translate(256%20256)'%3e%3cg%20id='puzzle-glow'%20filter='url(%23glow)'%20clip-path='url(%23plate-clip)'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='pieces'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='edge-shade'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3c/g%3e%3c/g%3e%3cg%20id='edge-light'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cpath%20id='wordmark'%20fill='%231D1D1F'%20transform='translate(662.00%20421)%20scale(0.46348)'%20d='M1241%20-729%20C1135%20-729%201050%20-693%20984%20-623%20C918%20-552%20886%20-463%20886%20-356%20C886%20-246%20918%20-156%20983%20-87%20C1047%20-17%201134%2017%201243%2017%20C1348%2017%201432%20-18%201495%20-88%20C1558%20-158%201590%20-247%201590%20-355%20C1590%20-469%201558%20-559%201495%20-627%20C1431%20-695%201347%20-729%201241%20-729Z%20M1896.7%20-713%20C1827.7%20-713%201777.7%20-700%201746.7%20-674%20C1714.7%20-648%201699.7%20-603%201699.7%20-539%20V-516%20H1617.7%20V-404%20H1699.7%20V0%20H1869.7%20V-404%20H1923.6%20H1969.7%20H2005.6%20V0%20H2175.6%20V-404%20H2275.6%20V-516%20H2173.6%20V-547%20C2173.6%20-565%202177.6%20-577%202185.6%20-583%20C2193.6%20-589%202210.6%20-592%202235.6%20-592%20C2251.6%20-592%202267.6%20-591%202281.6%20-590%20L2282.6%20-711%20C2246.6%20-712%202219.6%20-713%202202.6%20-713%20C2133.6%20-713%202083.6%20-700%202052.6%20-674%20C2020.6%20-648%202005.6%20-603%202005.6%20-539%20V-516%20H1969.7%20H1923.6%20H1867.7%20V-547%20C1867.7%20-565%201871.7%20-577%201879.7%20-583%20C1887.7%20-589%201904.7%20-592%201929.7%20-592%20C1945.7%20-592%201961.7%20-591%201975.7%20-590%20L1976.7%20-711%20C1940.7%20-712%201913.7%20-713%201896.7%20-713Z%20M0%20-712%20V0%20H187%20V-274%20H481%20V-420%20H187%20V-557%20H526%20V-712Z%20M2316.6%20-712%20V-584%20H2486.6%20V-712Z%20M1239%20-577%20C1289%20-577%201328%20-558%201357%20-519%20C1385%20-481%201400%20-428%201400%20-360%20C1400%20-289%201386%20-234%201358%20-195%20C1330%20-155%201290%20-136%201240%20-136%20C1188%20-136%201148%20-155%201119%20-195%20C1090%20-234%201076%20-288%201076%20-357%20C1076%20-425%201090%20-478%201120%20-518%20C1149%20-558%201189%20-577%201239%20-577Z%20M2795.6%20-530%20C2713.6%20-530%202647.6%20-504%202597.6%20-454%20C2547.6%20-403%202522.6%20-336%202522.6%20-253%20C2522.6%20-173%202547.6%20-109%202597.6%20-60%20C2647.6%20-11%202712.6%2014%202792.6%2014%20C2867.6%2014%202927.6%20-5%202972.6%20-42%20C3017.6%20-80%203044.6%20-133%203053.6%20-202%20L2891.6%20-203%20C2880.6%20-143%202849.6%20-113%202797.6%20-113%20C2763.6%20-113%202738.6%20-125%202720.6%20-150%20C2702.6%20-174%202693.6%20-209%202693.6%20-255%20C2693.6%20-303%202702.6%20-340%202720.6%20-367%20C2738.6%20-393%202764.6%20-407%202797.6%20-407%20C2821.6%20-407%202840.6%20-400%202856.6%20-386%20C2872.6%20-372%202881.6%20-353%202885.6%20-328%20H3049.6%20C3045.6%20-389%203019.6%20-438%202973.6%20-475%20C2927.6%20-511%202867.6%20-530%202795.6%20-530Z%20M3358.1%20-529%20C3276.1%20-529%203210.1%20-503%203159.1%20-451%20C3107.1%20-399%203082.1%20-333%203082.1%20-252%20C3082.1%20-170%203108.1%20-104%203161.1%20-56%20C3214.1%20-8%203282.1%2016%203364.1%2016%20C3429.1%2016%203484.1%201%203529.1%20-29%20C3574.1%20-59%203605.1%20-101%203622.1%20-157%20H3463.1%20C3441.1%20-117%203408.1%20-97%203366.1%20-97%20C3330.1%20-97%203301.1%20-107%203280.1%20-128%20C3259.1%20-149%203248.1%20-179%203248.1%20-217%20H3632.1%20V-232%20C3632.1%20-324%203607.1%20-396%203558.1%20-449%20C3509.1%20-502%203442.1%20-529%203358.1%20-529Z%20M2316.6%20-516%20V0%20H2486.6%20V-516Z%20M537%20-420%20V-274%20H848%20V-420Z%20M3359.1%20-415%20C3390.1%20-415%203415.1%20-405%203433.1%20-387%20C3451.1%20-369%203462.1%20-344%203465.1%20-314%20H3250.1%20C3260.1%20-381%203297.1%20-415%203359.1%20-415Z'/%3e%3c/svg%3e", P = 5e7, xe = 400, Se = {
11
11
  kept: "Kept in this browser until you close it",
12
- "too-large": `Not kept across a reload: larger than ${String(xe / 1e6)} MB`,
12
+ "too-large": `Not kept across a reload: larger than ${String(P / 1e6)} MB`,
13
13
  failed: "Not kept across a reload: the browser's storage is blocked or full"
14
14
  };
15
- function P(e) {
15
+ function Ce(e) {
16
16
  return new TextEncoder().encode(JSON.stringify(e)).slice().buffer;
17
17
  }
18
- function we(e) {
18
+ function F(e) {
19
19
  return e === null ? null : JSON.parse(new TextDecoder().decode(e));
20
20
  }
21
- function F(e) {
22
- let t = we(e);
21
+ function we(e) {
22
+ let t = F(e);
23
23
  return typeof t == "string" ? t : null;
24
24
  }
25
25
  function I(e) {
26
- let t = we(e);
26
+ let t = F(e);
27
27
  return t === null ? null : ee(t);
28
28
  }
29
29
  var L = class {
@@ -38,7 +38,7 @@ var L = class {
38
38
  }
39
39
  load() {
40
40
  return this.#s(null, async (e) => {
41
- let t = F(await e.read("name")), n = await e.read("bytes");
41
+ let t = we(await e.read("name")), n = await e.read("bytes");
42
42
  return t === null || n === null ? null : (this.#r = !0, {
43
43
  name: t,
44
44
  bytes: n,
@@ -47,7 +47,7 @@ var L = class {
47
47
  });
48
48
  }
49
49
  keep(e, t) {
50
- return this.#o(), this.#r = !1, t.byteLength > 5e7 ? this.forget().then(() => "too-large") : this.#s("failed", async (n) => (await n.remove("name"), await n.remove("view"), await n.write("bytes", t.slice(0)), await n.write("name", P(e)), this.#r = !0, "kept"));
50
+ return this.#o(), this.#r = !1, t.byteLength > 5e7 ? this.forget().then(() => "too-large") : this.#s("failed", async (n) => (await n.remove("name"), await n.remove("view"), await n.write("bytes", t.slice(0)), await n.write("name", Ce(e)), this.#r = !0, "kept"));
51
51
  }
52
52
  keepView(e) {
53
53
  this.#o(), this.#i = e, this.#a = setTimeout(() => void this.flush(), this.#t);
@@ -55,7 +55,7 @@ var L = class {
55
55
  flush() {
56
56
  let e = this.#i;
57
57
  return this.#o(), this.#s(void 0, async (t) => {
58
- e && this.#r && await t.write("view", P(e));
58
+ e && this.#r && await t.write("view", Ce(e));
59
59
  });
60
60
  }
61
61
  forget() {
@@ -104,7 +104,7 @@ function z(e) {
104
104
  };
105
105
  }
106
106
  var B = "f-office-viewer", V = "kept";
107
- function Te(e) {
107
+ function H(e) {
108
108
  let t = (t, n) => new Promise((r, i) => {
109
109
  let a = e.transaction(V, t), o = n(a.objectStore(V));
110
110
  a.oncomplete = () => {
@@ -126,7 +126,7 @@ function Te(e) {
126
126
  }
127
127
  };
128
128
  }
129
- function H(e) {
129
+ function Te(e) {
130
130
  return new Promise((t) => {
131
131
  let n = e.open(B, 1);
132
132
  n.onupgradeneeded = () => {
@@ -138,14 +138,14 @@ function H(e) {
138
138
  };
139
139
  });
140
140
  }
141
- async function U() {
141
+ async function Ee() {
142
142
  try {
143
143
  if (typeof FileSystemFileHandle < "u" && "createWritable" in FileSystemFileHandle.prototype) return z(await (await navigator.storage.getDirectory()).getDirectoryHandle(B, { create: !0 }));
144
144
  } catch {}
145
145
  try {
146
146
  if (typeof indexedDB < "u") {
147
- let e = await H(indexedDB);
148
- return e && Te(e);
147
+ let e = await Te(indexedDB);
148
+ return e && H(e);
149
149
  }
150
150
  } catch {
151
151
  return null;
@@ -153,7 +153,7 @@ async function U() {
153
153
  return null;
154
154
  }
155
155
  // src/page-keys.ts
156
- function Ee(e, t) {
156
+ function U(e, t) {
157
157
  let n = e.composedPath(), r = n[0];
158
158
  return {
159
159
  inViewer: t !== null && n.includes(t),
@@ -173,7 +173,7 @@ function Oe(e, t) {
173
173
  n.preventDefault();
174
174
  return;
175
175
  }
176
- let i = f(n, Ee(n, r));
176
+ let i = f(n, U(n, r));
177
177
  i !== null && e.takes(i) && (n.preventDefault(), e.run(i));
178
178
  });
179
179
  _(() => (window.addEventListener("keydown", n), () => {
@@ -189,40 +189,45 @@ var W = [
189
189
  system: "System",
190
190
  light: "Light",
191
191
  dark: "Dark"
192
- }, K = "f-office-viewer:theme", q = () => window.localStorage;
193
- function ke(e) {
192
+ }, ke = "f-office-viewer:theme", Ae = () => window.localStorage;
193
+ function je(e) {
194
194
  return W.includes(e);
195
195
  }
196
- function Ae(e = q, t = K) {
196
+ function Me(e = Ae, t = ke) {
197
197
  try {
198
198
  let n = e().getItem(t);
199
- return ke(n) ? n : "system";
199
+ return je(n) ? n : "system";
200
200
  } catch {
201
201
  return "system";
202
202
  }
203
203
  }
204
- function je(e, t = q, n = K) {
204
+ function Ne(e, t = Ae, n = ke) {
205
205
  try {
206
206
  t().setItem(n, e);
207
207
  } catch {}
208
208
  }
209
- function Me(e, t = document.documentElement) {
209
+ function Pe(e, t = document.documentElement) {
210
210
  e === "system" ? delete t.dataset.theme : t.dataset.theme = e;
211
211
  }
212
- function Ne(e) {
212
+ function Fe(e) {
213
213
  return W[(W.indexOf(e) + 1) % W.length] ?? "system";
214
214
  }
215
215
  // src/ui/utils.ts
216
- function J(...e) {
216
+ function K(...e) {
217
217
  return S(me(e));
218
218
  }
219
+ // src/ui/portal-theme.ts
220
+ var Ie = m(void 0);
221
+ function q() {
222
+ return h(Ie);
223
+ }
219
224
  // src/url-file.ts
220
- var Pe = "file";
221
- function Fe(e, t) {
225
+ var Le = "file";
226
+ function Re(e, t) {
222
227
  return `The address names a file on ${e.origin}. F-Office Docs opens files only from ${t.origin}, the site of this page.`;
223
228
  }
224
- function Ie(e, t) {
225
- let n = new URLSearchParams(e).get(Pe);
229
+ function ze(e, t) {
230
+ let n = new URLSearchParams(e).get(Le);
226
231
  if (n === null || n === "") return null;
227
232
  let r = new URL(t), i;
228
233
  try {
@@ -238,117 +243,119 @@ function Ie(e, t) {
238
243
  address: i
239
244
  } : {
240
245
  kind: "refused",
241
- why: Fe(i, r)
246
+ why: Re(i, r)
242
247
  };
243
248
  }
244
- function Y(e) {
249
+ function J(e) {
245
250
  let t = e.pathname.split("/").pop() ?? "", n = t;
246
251
  try {
247
252
  n = decodeURIComponent(t);
248
253
  } catch {}
249
254
  return n || "document.docx";
250
255
  }
251
- async function X(e, t, n = fetch) {
256
+ async function Be(e, t, n = fetch) {
252
257
  let r = await n(e.href, t ? { signal: t } : {}), i = r.url ? new URL(r.url) : e;
253
- if (i.origin !== e.origin) throw Error(Fe(i, e));
254
- if (!r.ok) throw Error(`The file ${Y(e)} cannot be read: the server answered HTTP ${String(r.status)}.`);
258
+ if (i.origin !== e.origin) throw Error(Re(i, e));
259
+ if (!r.ok) throw Error(`The file ${J(e)} cannot be read: the server answered HTTP ${String(r.status)}.`);
255
260
  return {
256
- name: Y(e),
261
+ name: J(e),
257
262
  bytes: await r.arrayBuffer()
258
263
  };
259
264
  }
260
- function Le() {
265
+ function Ve() {
261
266
  let e = new URLSearchParams(window.location.search);
262
267
  if (!e.has("file")) return;
263
- e.delete(Pe);
268
+ e.delete(Le);
264
269
  let t = e.toString();
265
270
  window.history.replaceState(null, "", t ? `?${t}` : window.location.pathname);
266
271
  }
267
- function Re(e) {
272
+ function He(e) {
268
273
  return e instanceof Error ? e.message : String(e);
269
274
  }
270
- function ze(e, t, n) {
275
+ function Ue(e, t, n) {
271
276
  let r = v(t), i = v(n);
272
277
  _(() => {
273
278
  if (e?.kind === "refused" && i(e.why), e?.kind !== "address") return;
274
279
  let t = new AbortController();
275
- return X(e.address, t.signal).then((e) => {
280
+ return Be(e.address, t.signal).then((e) => {
276
281
  r(e);
277
282
  }, (e) => {
278
- t.signal.aborted || i(Re(e));
283
+ t.signal.aborted || i(He(e));
279
284
  }), () => {
280
285
  t.abort();
281
286
  };
282
287
  }, [e]);
283
288
  }
284
289
  // src/docs-provider.tsx
285
- var Be = null;
286
- function Ve() {
287
- return Be ||= new L(U()), Be;
290
+ var We = null;
291
+ function Ge() {
292
+ return We ||= new L(Ee()), We;
288
293
  }
289
- var He = {
294
+ var Ke = {
290
295
  selected: !1,
291
296
  outline: !1,
292
297
  zoom: "fixed:1",
293
298
  zoomSteps: [],
294
299
  page: 0,
295
- pageCount: 0
300
+ pageCount: 0,
301
+ layoutComplete: !0,
302
+ progress: null
296
303
  };
297
- function Ue(e) {
304
+ function qe(e) {
298
305
  return e.zoom === "fixed" ? c(e.factor) : e.zoom;
299
306
  }
300
- function We(e) {
307
+ function Je(e) {
301
308
  return `The installed fonts cannot be read (${e instanceof Error ? e.message : String(e)}), so the pages use the open fonts.`;
302
309
  }
303
- function Ge(e) {
310
+ function Ye(e) {
304
311
  let t = URL.createObjectURL(new Blob([e.bytes])), n = document.createElement("a");
305
312
  n.href = t, n.download = e.name, n.click(), URL.revokeObjectURL(t);
306
313
  }
307
- var Ke = m(null);
308
- function qe() {
309
- let e = h(Ke);
314
+ var Xe = m(null);
315
+ function Y() {
316
+ let e = h(Xe);
310
317
  if (!e) throw Error("useDocs must be used inside a <DocsProvider>");
311
318
  return e;
312
319
  }
313
- function Z() {
314
- return qe().publicValue;
320
+ function X() {
321
+ return Y().publicValue;
315
322
  }
316
- function Je() {
317
- return qe().internal;
323
+ function Ze() {
324
+ return Y().internal;
318
325
  }
319
- function Ye({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, fontSource: o, moduleUrls: c, theme: l, onThemeChange: u, applyDocumentTheme: d = !0, themeStorageKey: f = K, syncDocumentTitle: ee = !1, readUrlParams: p = !0, initialFile: m, initialUrl: h, className: me }) {
326
+ function Qe({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, fontSource: o, moduleUrls: c, theme: l, onThemeChange: u, applyDocumentTheme: d = !0, themeStorageKey: f = ke, syncDocumentTitle: ee = !1, readUrlParams: p = !0, initialFile: m, initialUrl: h, className: me }) {
320
327
  le();
321
- let S = n === void 0 ? Ve() : n, C = b(null), E = b(null), [D, he] = x(() => p ? ae(window.location.search) : "word-win"), [ge] = x(() => h ? Ie(`?${Pe}=${encodeURIComponent(h)}`, window.location.href) : p ? Ie(window.location.search, window.location.href) : null), [O, _e] = x(null), [ve, k] = x(null), [ye, A] = x(0), [j, M] = x(!1), [be, N] = x(null), [xe, Se] = x(() => Ae(void 0, f)), P = l ?? xe, we = g((e) => {
322
- l === void 0 && (je(e, void 0, f), Se(e)), u?.(e);
328
+ let S = n === void 0 ? Ge() : n, C = b(null), E = b(null), he = b(0), [D, ge] = x(() => p ? ae(window.location.search) : "word-win"), [O] = x(() => h ? ze(`?${Le}=${encodeURIComponent(h)}`, window.location.href) : p ? ze(window.location.search, window.location.href) : null), [k, _e] = x(null), [ve, A] = x(null), [j, M] = x(0), [N, ye] = x(!1), [be, P] = x(null), [xe, Ce] = x(() => Me(void 0, f)), F = l ?? xe, we = g((e) => {
329
+ l === void 0 && (Ne(e, void 0, f), Ce(e)), u?.(e);
323
330
  }, [
324
331
  l,
325
332
  u,
326
333
  f
327
334
  ]);
328
335
  _(() => {
329
- d && Me(P);
330
- }, [P, d]);
331
- let [F, I] = x(() => p ? pe(window.location.search) : "open"), [L, R] = x(null), [z, B] = x(He), [V, Te] = x(null), H = y(() => {
336
+ d && Pe(F);
337
+ }, [F, d]);
338
+ let [I, L] = x(() => p ? pe(window.location.search) : "open"), [R, z] = x(null), [B, V] = x(Ke), [H, Te] = x(null), Ee = y(() => {
332
339
  if (o) return o;
333
- let e = a ? ue(typeof a == "string" ? new URL(a, document.baseURI) : a, F === "installed" ? "installed" : "open") : ce(r);
334
- return F === "installed" && L ? fe(L, e) : e;
340
+ let e = a ? ue(typeof a == "string" ? new URL(a, document.baseURI) : a, I === "installed" ? "installed" : "open") : ce(r);
341
+ return I === "installed" && R ? fe(R, e) : e;
335
342
  }, [
336
343
  o,
337
344
  a,
338
345
  r,
339
- F,
340
- L
346
+ I,
347
+ R
341
348
  ]), U = g(({ name: e, bytes: t }) => {
342
349
  _e({
343
350
  name: e,
344
351
  bytes: t,
345
352
  view: null
346
- }), k(null), S && S.keep(e, t).then((e) => {
347
- k(Ce[e]);
353
+ }), A(null), S && S.keep(e, t).then((e) => {
354
+ A(Se[e]);
348
355
  });
349
356
  }, [S]);
350
- ze(ge, U, g((e) => {
351
- N({ problem: e });
357
+ Ue(O, U, g((e) => {
358
+ P({ problem: e });
352
359
  }, [])), _(() => {
353
360
  if (!m) return;
354
361
  let e = !0;
@@ -363,7 +370,7 @@ function Ye({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, font
363
370
  }, [m, U]), _(() => {
364
371
  if (!S) return;
365
372
  S.load().then((e) => {
366
- e && ge?.kind !== "address" && !m && (_e((t) => t ?? e), k((e) => e ?? Ce.kept));
373
+ e && O?.kind !== "address" && !m && (_e((t) => t ?? e), A((e) => e ?? Se.kept));
367
374
  });
368
375
  let e = () => void S.flush();
369
376
  return window.addEventListener("pagehide", e), () => {
@@ -371,82 +378,106 @@ function Ye({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, font
371
378
  };
372
379
  }, [
373
380
  S,
374
- ge,
381
+ O,
375
382
  m
376
383
  ]), _(() => {
377
- F !== "installed" || L || de().then(R, (e) => {
378
- I("open"), k(We(e));
384
+ I !== "installed" || R || de().then(z, (e) => {
385
+ L("open"), A(Je(e));
379
386
  });
380
- }, [F, L]);
381
- let [Ee, De] = x(0), W = v((e) => {
387
+ }, [I, R]);
388
+ let [De, W] = x(0), G = v((e) => {
382
389
  let t = e.detail;
383
- S?.keepView(t), B((e) => ({
390
+ S?.keepView(t), V((e) => ({
384
391
  ...e,
385
- zoom: Ue(t)
392
+ zoom: qe(t)
386
393
  }));
387
- }), G = v((e) => {
388
- let { pageCount: t, zoomSteps: n } = e.detail;
389
- B((e) => ({
394
+ }), Ae = v((e) => {
395
+ let { pageCount: t, zoomSteps: n, complete: r } = e.detail, i = r ?? !0;
396
+ V((e) => ({
390
397
  ...e,
391
398
  pageCount: t,
392
399
  zoomSteps: n,
393
- page: 0
400
+ page: 0,
401
+ layoutComplete: i,
402
+ progress: i ? null : e.progress
403
+ }));
404
+ }), je = v((e) => {
405
+ let { pageCount: t, complete: n } = e.detail;
406
+ V((e) => ({
407
+ ...e,
408
+ pageCount: t,
409
+ layoutComplete: n,
410
+ progress: n ? null : e.progress
394
411
  }));
395
- }), q = v((e) => {
412
+ }), Fe = v((e) => {
413
+ let t = e.detail;
414
+ V((e) => ({
415
+ ...e,
416
+ progress: t.complete ? null : t
417
+ }));
418
+ }), q = v(() => {
419
+ V((e) => e.progress === null ? e : {
420
+ ...e,
421
+ progress: null
422
+ });
423
+ }), Re = v((e) => {
396
424
  let { page: t } = e.detail;
397
- B((e) => ({
425
+ V((e) => ({
398
426
  ...e,
399
427
  page: t
400
428
  }));
401
- }), ke = v((e) => {
429
+ }), J = v((e) => {
402
430
  let { open: t } = e.detail;
403
- B((e) => ({
431
+ V((e) => ({
404
432
  ...e,
405
433
  outline: t
406
434
  }));
407
- }), Ne = v((e) => {
435
+ }), Be = v((e) => {
408
436
  let { selected: t } = e.detail;
409
- B((e) => ({
437
+ V((e) => ({
410
438
  ...e,
411
439
  selected: t
412
440
  }));
413
- }), Fe = v((e) => {
441
+ }), He = v((e) => {
414
442
  e.preventDefault(), Te(e.detail);
415
- }), Y = g((e) => (E.current = e, De((e) => e + 1), () => {
416
- E.current = null, B(He);
443
+ }), We = g((e) => (E.current = e, W((e) => e + 1), () => {
444
+ E.current = null, V(Ke);
417
445
  }), []);
418
446
  _(() => {
419
447
  let e = E.current;
420
- if (e) return e.addEventListener("viewchange", W), e.addEventListener("open", G), e.addEventListener("pagechange", q), e.addEventListener("outlinechange", ke), e.addEventListener("selectionchange", Ne), e.addEventListener("menu", Fe), () => {
421
- e.removeEventListener("viewchange", W), e.removeEventListener("open", G), e.removeEventListener("pagechange", q), e.removeEventListener("outlinechange", ke), e.removeEventListener("selectionchange", Ne), e.removeEventListener("menu", Fe);
448
+ if (e) return e.addEventListener("viewchange", G), e.addEventListener("open", Ae), e.addEventListener("pageschange", je), e.addEventListener("progress", Fe), e.addEventListener("error", q), e.addEventListener("pagechange", Re), e.addEventListener("outlinechange", J), e.addEventListener("selectionchange", Be), e.addEventListener("menu", He), () => {
449
+ e.removeEventListener("viewchange", G), e.removeEventListener("open", Ae), e.removeEventListener("pageschange", je), e.removeEventListener("progress", Fe), e.removeEventListener("error", q), e.removeEventListener("pagechange", Re), e.removeEventListener("outlinechange", J), e.removeEventListener("selectionchange", Be), e.removeEventListener("menu", He);
422
450
  };
423
- }, [Ee]), _(() => {
451
+ }, [De]), _(() => {
424
452
  let e = E.current;
425
- if (e && (F !== "installed" || L) && (e.target = D, e.fontSource = H, O)) {
426
- let { view: n } = O;
427
- e.open(O.bytes, O.name).then(() => {
428
- n ? e.showView(n) : e.clientWidth < t && e.setZoom("fit-width");
429
- }, () => void 0);
430
- }
453
+ if (!e || I === "installed" && !R || (e.target = D, e.fontSource = Ee, !k)) return;
454
+ let n = !1, { view: r } = k;
455
+ return e.open(k.bytes, k.name).then(() => {
456
+ n || (r ? e.showView(r) : e.clientWidth < t && e.setZoom("fit-width"));
457
+ }, () => void 0), () => {
458
+ n = !0;
459
+ };
431
460
  }, [
432
- Ee,
461
+ De,
433
462
  D,
434
- O,
435
- ye,
436
- F,
437
- L,
438
- H
463
+ k,
464
+ j,
465
+ I,
466
+ R,
467
+ Ee
439
468
  ]), _(() => {
440
- ee && (document.title = O ? `${O.name} — F-Office Docs` : "F-Office Docs");
441
- }, [O, ee]);
442
- let X = g((e) => {
443
- e && e.arrayBuffer().then((t) => {
444
- p && Le(), U({
469
+ ee && (document.title = k ? `${k.name} — F-Office Docs` : "F-Office Docs");
470
+ }, [k, ee]);
471
+ let Y = g((e) => {
472
+ if (!e) return;
473
+ let t = ++he.current;
474
+ e.arrayBuffer().then((n) => {
475
+ t === he.current && (p && Ve(), U({
445
476
  name: e.name,
446
- bytes: t
447
- });
477
+ bytes: n
478
+ }));
448
479
  });
449
- }, [p, U]), Re = g((e) => {
480
+ }, [p, U]), X = g((e) => {
450
481
  let t = E.current;
451
482
  switch (e) {
452
483
  case "open":
@@ -459,10 +490,10 @@ function Ye({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, font
459
490
  }
460
491
  return;
461
492
  case "download":
462
- O && Ge(O);
493
+ k && Ye(k);
463
494
  return;
464
495
  case "close":
465
- p && Le(), S?.forget(), _e(null), k(null), A((e) => e + 1);
496
+ p && Ve(), S?.forget(), _e(null), A(null), M((e) => e + 1);
466
497
  return;
467
498
  case "copy":
468
499
  t?.copyText(null);
@@ -483,31 +514,31 @@ function Ye({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, font
483
514
  t?.setZoom("fixed", 1);
484
515
  return;
485
516
  case "advanced":
486
- N("advanced");
517
+ P("advanced");
487
518
  return;
488
519
  case "shortcuts":
489
- N("shortcuts");
520
+ P("shortcuts");
490
521
  return;
491
522
  case "about":
492
- N("about");
523
+ P("about");
493
524
  return;
494
525
  default: return;
495
526
  }
496
527
  }, [
497
- O,
528
+ k,
498
529
  S,
499
530
  p
500
531
  ]);
501
532
  Oe({
502
- takes: (e) => i(e, O !== null, z.selected),
503
- run: Re
533
+ takes: (e) => i(e, k !== null, B.selected),
534
+ run: X
504
535
  }, E);
505
- let Be = g((e) => {
506
- he(e), p && re(e);
507
- }, [p]), qe = g(() => {
508
- N(null);
509
- }, []), Z = y(() => ({
510
- run: Re,
536
+ let Ze = g((e) => {
537
+ ge(e), p && re(e);
538
+ }, [p]), Qe = g(() => {
539
+ P(null);
540
+ }, []), $e = y(() => ({
541
+ run: X,
511
542
  setOutline: (e) => {
512
543
  E.current && (E.current.outlineOpen = e);
513
544
  },
@@ -517,138 +548,143 @@ function Ye({ children: e, keeper: n, fontCdnUrl: r = oe, fontFolderUrl: a, font
517
548
  },
518
549
  setTheme: we,
519
550
  setFonts: (e) => {
520
- e === "open" ? (p && ie("fonts", e), I(e)) : de().then((t) => {
521
- p && ie("fonts", e), R(t), I(e);
551
+ e === "open" ? (p && ie("fonts", e), L(e)) : de().then((t) => {
552
+ p && ie("fonts", e), z(t), L(e);
522
553
  }, (e) => {
523
- k(We(e));
554
+ A(Je(e));
524
555
  });
525
556
  },
526
557
  focusPages: () => {
527
558
  E.current?.focus();
528
559
  }
529
560
  }), [
530
- Re,
561
+ X,
531
562
  we,
532
563
  p
533
- ]), Je = y(() => ({
534
- ...z,
535
- name: O?.name ?? null,
564
+ ]), et = y(() => ({
565
+ ...B,
566
+ name: k?.name ?? null,
536
567
  note: ve,
537
- theme: P,
538
- fonts: F,
568
+ theme: F,
569
+ fonts: I,
539
570
  installedFonts: se()
540
571
  }), [
541
- z,
542
- O,
572
+ B,
573
+ k,
543
574
  ve,
544
- P,
545
- F
546
- ]), Ye = y(() => ({
575
+ F,
576
+ I
577
+ ]), Z = y(() => ({
547
578
  publicValue: {
548
- state: Je,
549
- calls: Z,
550
- openFile: X,
579
+ state: et,
580
+ calls: $e,
581
+ openFile: Y,
551
582
  elementRef: E,
552
583
  target: D,
553
- setTarget: Be,
584
+ setTarget: Ze,
554
585
  dialog: be,
555
- closeDialog: qe
586
+ closeDialog: Qe
556
587
  },
557
588
  internal: {
558
- file: O,
559
- dragging: j,
560
- generation: ye,
561
- menu: V,
589
+ file: k,
590
+ dragging: N,
591
+ generation: j,
592
+ menu: H,
562
593
  moduleUrls: c,
563
- attachElement: Y
594
+ attachElement: We
564
595
  }
565
596
  }), [
566
- Je,
567
- Z,
568
- X,
597
+ et,
598
+ $e,
599
+ Y,
569
600
  D,
570
- Be,
601
+ Ze,
571
602
  be,
572
- qe,
573
- O,
603
+ Qe,
604
+ k,
605
+ N,
574
606
  j,
575
- ye,
576
- V,
607
+ H,
577
608
  c,
578
- Y
609
+ We
579
610
  ]);
580
- return /* @__PURE__ */ w(Ke, {
581
- value: Ye,
582
- children: /* @__PURE__ */ T("div", {
583
- "data-f-office-theme": P,
584
- className: J("f-office-docs-root flex h-full min-h-0 flex-col bg-background text-foreground", me),
585
- onDragOver: (e) => {
586
- e.preventDefault(), M(!0);
587
- },
588
- onDragLeave: () => {
589
- M(!1);
590
- },
591
- onDrop: (e) => {
592
- e.preventDefault(), M(!1), X(s(e.dataTransfer.files));
593
- },
594
- children: [e, /* @__PURE__ */ w("input", {
595
- ref: C,
596
- className: "hidden",
597
- type: "file",
598
- accept: ".docx",
599
- "aria-label": "DOCX file",
600
- onChange: (e) => {
601
- X(s(e.target.files)), e.target.value = "";
602
- }
603
- })]
611
+ return /* @__PURE__ */ w(Xe, {
612
+ value: Z,
613
+ children: /* @__PURE__ */ w(Ie, {
614
+ value: F,
615
+ children: /* @__PURE__ */ T("div", {
616
+ "data-f-office-theme": F,
617
+ className: K("f-office-docs-root flex h-full min-h-0 flex-col bg-background text-foreground", me),
618
+ onDragOver: (e) => {
619
+ e.preventDefault(), ye(!0);
620
+ },
621
+ onDragLeave: () => {
622
+ ye(!1);
623
+ },
624
+ onDrop: (e) => {
625
+ e.preventDefault(), ye(!1), Y(s(e.dataTransfer.files));
626
+ },
627
+ children: [e, /* @__PURE__ */ w("input", {
628
+ ref: C,
629
+ className: "hidden",
630
+ type: "file",
631
+ accept: ".docx",
632
+ "aria-label": "DOCX file",
633
+ onChange: (e) => {
634
+ Y(s(e.target.files)), e.target.value = "";
635
+ }
636
+ })]
637
+ })
604
638
  })
605
639
  });
606
640
  }
607
641
  // src/ui/dialog.tsx
608
- var Xe = j.Root;
609
- function Ze({ className: e, children: t, ...n }) {
610
- return /* @__PURE__ */ T(j.Portal, { children: [/* @__PURE__ */ w(j.Overlay, { className: "fixed inset-0 z-50 bg-black/40" }), /* @__PURE__ */ T(j.Content, {
642
+ var $e = M.Root;
643
+ function et({ className: e, children: t, ...n }) {
644
+ let r = q();
645
+ return /* @__PURE__ */ T(M.Portal, { children: [/* @__PURE__ */ w(M.Overlay, { className: "fixed inset-0 z-50 bg-black/40" }), /* @__PURE__ */ T(M.Content, {
611
646
  "data-slot": "dialog-content",
612
- className: J("fixed top-1/2 left-1/2 z-50 grid w-[min(28rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover p-6 text-popover-foreground shadow-xl", e),
647
+ "data-f-office-theme": r,
648
+ className: K("f-office-docs-portal fixed top-1/2 left-1/2 z-50 grid w-[min(28rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover p-6 text-popover-foreground shadow-xl", e),
613
649
  ...n,
614
- children: [t, /* @__PURE__ */ w(j.Close, {
650
+ children: [t, /* @__PURE__ */ w(M.Close, {
615
651
  className: "absolute top-4 right-4 rounded-full p-1 text-muted-foreground hover:bg-accent",
616
652
  "aria-label": "Close",
617
- children: /* @__PURE__ */ w(ye, { className: "size-4" })
653
+ children: /* @__PURE__ */ w(A, { className: "size-4" })
618
654
  })]
619
655
  })] });
620
656
  }
621
- function Qe({ className: e, ...t }) {
622
- return /* @__PURE__ */ w(j.Title, {
657
+ function Z({ className: e, ...t }) {
658
+ return /* @__PURE__ */ w(M.Title, {
623
659
  "data-slot": "dialog-title",
624
- className: J("text-lg font-medium", e),
660
+ className: K("text-lg font-medium", e),
625
661
  ...t
626
662
  });
627
663
  }
628
- function $e({ className: e, ...t }) {
629
- return /* @__PURE__ */ w(j.Description, {
664
+ function tt({ className: e, ...t }) {
665
+ return /* @__PURE__ */ w(M.Description, {
630
666
  "data-slot": "dialog-description",
631
- className: J("text-sm text-muted-foreground", e),
667
+ className: K("text-sm text-muted-foreground", e),
632
668
  ...t
633
669
  });
634
670
  }
635
671
  // src/dialogs.tsx
636
- function et({ className: e }) {
672
+ function nt({ className: e }) {
637
673
  return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("img", {
638
- src: N,
674
+ src: be,
639
675
  alt: "F-Office",
640
676
  className: `f-office-logo-light ${e}`
641
677
  }), /* @__PURE__ */ w("img", {
642
- src: be,
678
+ src: ye,
643
679
  alt: "F-Office",
644
680
  className: `f-office-logo-dark ${e}`
645
681
  })] });
646
682
  }
647
- function tt() {
683
+ function rt() {
648
684
  let e = a(navigator.userAgent);
649
685
  return /* @__PURE__ */ T(C, { children: [
650
- /* @__PURE__ */ w(Qe, { children: "Keyboard shortcuts" }),
651
- /* @__PURE__ */ w($e, { children: "Click the pages first, so that the keys of the text reach the document." }),
686
+ /* @__PURE__ */ w(Z, { children: "Keyboard shortcuts" }),
687
+ /* @__PURE__ */ w(tt, { children: "Click the pages first, so that the keys of the text reach the document." }),
652
688
  /* @__PURE__ */ w("table", {
653
689
  className: "text-sm",
654
690
  children: /* @__PURE__ */ w("tbody", { children: p(e).map(([e, t]) => /* @__PURE__ */ T("tr", {
@@ -664,23 +700,23 @@ function tt() {
664
700
  })
665
701
  ] });
666
702
  }
667
- function nt() {
703
+ function it() {
668
704
  return /* @__PURE__ */ T(C, { children: [
669
- /* @__PURE__ */ w(Qe, {
705
+ /* @__PURE__ */ w(Z, {
670
706
  className: "sr-only",
671
707
  children: "About F-Office"
672
708
  }),
673
- /* @__PURE__ */ w(et, { className: "h-8 w-auto self-start" }),
674
- /* @__PURE__ */ w($e, { children: "F-Office draws the pages of DOCX files as Word lays them out, in your browser. The file that you open stays in this browser." })
709
+ /* @__PURE__ */ w(nt, { className: "h-8 w-auto self-start" }),
710
+ /* @__PURE__ */ w(tt, { children: "F-Office draws the pages of DOCX files as Word lays them out, in your browser. The file that you open stays in this browser." })
675
711
  ] });
676
712
  }
677
- function rt({ why: e }) {
678
- return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Qe, { children: "The file cannot be opened" }), /* @__PURE__ */ w($e, { children: e })] });
713
+ function at({ why: e }) {
714
+ return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Z, { children: "The file cannot be opened" }), /* @__PURE__ */ w(tt, { children: e })] });
679
715
  }
680
- function it({ target: e, setTarget: t }) {
716
+ function ot({ target: e, setTarget: t }) {
681
717
  return /* @__PURE__ */ T(C, { children: [
682
- /* @__PURE__ */ w(Qe, { children: "Advanced settings" }),
683
- /* @__PURE__ */ w($e, { children: "Target: which Word the layout copies. Not ready yet: this setting exists only for testing." }),
718
+ /* @__PURE__ */ w(Z, { children: "Advanced settings" }),
719
+ /* @__PURE__ */ w(tt, { children: "Target: which Word the layout copies. Not ready yet: this setting exists only for testing." }),
684
720
  /* @__PURE__ */ T("label", {
685
721
  className: "flex items-center gap-3 text-sm",
686
722
  children: ["Target", /* @__PURE__ */ w("select", {
@@ -697,63 +733,65 @@ function it({ target: e, setTarget: t }) {
697
733
  })
698
734
  ] });
699
735
  }
700
- function at() {
701
- let { dialog: e, closeDialog: t, calls: n, target: r, setTarget: i } = Z();
702
- return /* @__PURE__ */ w(Xe, {
736
+ function st() {
737
+ let { dialog: e, closeDialog: t, calls: n, target: r, setTarget: i } = X();
738
+ return /* @__PURE__ */ w($e, {
703
739
  open: e !== null,
704
740
  onOpenChange: (e) => {
705
741
  e || t();
706
742
  },
707
- children: /* @__PURE__ */ T(Ze, {
743
+ children: /* @__PURE__ */ T(et, {
708
744
  onCloseAutoFocus: (e) => {
709
745
  e.preventDefault(), n.focusPages();
710
746
  },
711
747
  children: [
712
- e === "shortcuts" && /* @__PURE__ */ w(tt, {}),
713
- e === "about" && /* @__PURE__ */ w(nt, {}),
714
- e === "advanced" && /* @__PURE__ */ w(it, {
748
+ e === "shortcuts" && /* @__PURE__ */ w(rt, {}),
749
+ e === "about" && /* @__PURE__ */ w(it, {}),
750
+ e === "advanced" && /* @__PURE__ */ w(ot, {
715
751
  target: r,
716
752
  setTarget: i
717
753
  }),
718
- typeof e == "object" && !!e && /* @__PURE__ */ w(rt, { why: e.problem })
754
+ typeof e == "object" && !!e && /* @__PURE__ */ w(at, { why: e.problem })
719
755
  ]
720
756
  })
721
757
  });
722
758
  }
723
759
  // src/ui/context-menu.tsx
724
- var ot = "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", st = "z-50 min-w-48 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg", ct = A.Root, lt = A.Trigger;
725
- function ut({ className: e, ...t }) {
726
- return /* @__PURE__ */ w(A.Portal, { children: /* @__PURE__ */ w(A.Content, {
760
+ var ct = "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", lt = "f-office-docs-portal z-50 min-w-48 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg", ut = j.Root, dt = j.Trigger;
761
+ function ft({ className: e, ...t }) {
762
+ let n = q();
763
+ return /* @__PURE__ */ w(j.Portal, { children: /* @__PURE__ */ w(j.Content, {
727
764
  "data-slot": "context-menu-content",
728
- className: J(st, e),
765
+ "data-f-office-theme": n,
766
+ className: K(lt, e),
729
767
  ...t
730
768
  }) });
731
769
  }
732
- function dt({ className: e, ...t }) {
733
- return /* @__PURE__ */ w(A.Item, {
770
+ function pt({ className: e, ...t }) {
771
+ return /* @__PURE__ */ w(j.Item, {
734
772
  "data-slot": "context-menu-item",
735
- className: J(ot, e),
773
+ className: K(ct, e),
736
774
  ...t
737
775
  });
738
776
  }
739
- function ft({ className: e, ...t }) {
740
- return /* @__PURE__ */ w(A.Separator, {
777
+ function mt({ className: e, ...t }) {
778
+ return /* @__PURE__ */ w(j.Separator, {
741
779
  "data-slot": "context-menu-separator",
742
- className: J("-mx-1 my-1 h-px bg-border", e),
780
+ className: K("-mx-1 my-1 h-px bg-border", e),
743
781
  ...t
744
782
  });
745
783
  }
746
784
  // src/ui/menu-shortcut.tsx
747
- function pt({ className: e, ...t }) {
785
+ function ht({ className: e, ...t }) {
748
786
  return /* @__PURE__ */ w("span", {
749
787
  "data-slot": "menu-shortcut",
750
788
  "aria-hidden": "true",
751
- className: J("ml-auto pl-6 text-xs tracking-widest text-muted-foreground", e),
789
+ className: K("ml-auto pl-6 text-xs tracking-widest text-muted-foreground", e),
752
790
  ...t
753
791
  });
754
792
  }
755
793
  // src/page-menu.tsx
756
- function mt(t, n, i) {
794
+ function gt(t, n, i) {
757
795
  let o = a(navigator.userAgent), s = l(t, o)[0];
758
796
  return {
759
797
  name: e[t].name,
@@ -763,7 +801,7 @@ function mt(t, n, i) {
763
801
  run: i
764
802
  };
765
803
  }
766
- function ht(e) {
804
+ function _t(e) {
767
805
  let t = e?.link ?? null, n = t && o(t), r = [];
768
806
  return t && r.push({
769
807
  name: "Open link",
@@ -784,15 +822,15 @@ function ht(e) {
784
822
  }), [
785
823
  ...r,
786
824
  ...t ? [null] : [],
787
- mt("copy", !e?.selected, (e) => {
825
+ gt("copy", !e?.selected, (e) => {
788
826
  e.copyText(null);
789
827
  }),
790
- mt("select-all", !1, (e) => {
828
+ gt("select-all", !1, (e) => {
791
829
  e.selectAll();
792
830
  })
793
831
  ];
794
832
  }
795
- function gt({ request: e, elementRef: t }) {
833
+ function vt({ request: e, elementRef: t }) {
796
834
  let n = b(null), r = b(null), i = b(null);
797
835
  return _(() => {
798
836
  if (e) {
@@ -804,10 +842,10 @@ function gt({ request: e, elementRef: t }) {
804
842
  clientY: e.y
805
843
  }));
806
844
  }
807
- }, [e, t]), /* @__PURE__ */ T(ct, { children: [/* @__PURE__ */ w(lt, {
845
+ }, [e, t]), /* @__PURE__ */ T(ut, { children: [/* @__PURE__ */ w(dt, {
808
846
  ref: n,
809
847
  className: "hidden"
810
- }), /* @__PURE__ */ w(ut, {
848
+ }), /* @__PURE__ */ w(ft, {
811
849
  "aria-label": "Page",
812
850
  onContextMenu: (e) => {
813
851
  e.preventDefault();
@@ -819,24 +857,24 @@ function gt({ request: e, elementRef: t }) {
819
857
  let o = i.current;
820
858
  i.current = null, o?.isConnected ? o.focus() : n?.focus(), n && a?.(n);
821
859
  },
822
- children: ht(e).map((e) => e === null ? /* @__PURE__ */ w(ft, {}, "separator") : /* @__PURE__ */ T(dt, {
860
+ children: _t(e).map((e) => e === null ? /* @__PURE__ */ w(mt, {}, "separator") : /* @__PURE__ */ T(pt, {
823
861
  disabled: e.disabled,
824
862
  "aria-keyshortcuts": e.aria,
825
863
  onSelect: () => {
826
864
  r.current = e.run;
827
865
  },
828
- children: [e.name, e.key !== void 0 && /* @__PURE__ */ w(pt, { children: e.key })]
866
+ children: [e.name, e.key !== void 0 && /* @__PURE__ */ w(ht, { children: e.key })]
829
867
  }, e.name))
830
868
  })] });
831
869
  }
832
870
  // src/start.tsx
833
- function _t() {
834
- let { calls: e } = Z();
871
+ function yt() {
872
+ let { calls: e } = X();
835
873
  return /* @__PURE__ */ T("div", {
836
874
  className: "flex h-full flex-col items-center justify-center gap-10 overflow-auto p-6",
837
- children: [/* @__PURE__ */ w(et, { className: "h-10 w-auto sm:h-14" }), /* @__PURE__ */ T("button", {
875
+ children: [/* @__PURE__ */ w(nt, { className: "h-10 w-auto sm:h-14" }), /* @__PURE__ */ T("button", {
838
876
  type: "button",
839
- className: "flex w-full max-w-xl flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-border bg-[var(--drop)] px-6 py-14 text-center hover:border-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
877
+ className: "flex w-full max-w-xl flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-border bg-[var(--f-office-drop)] px-6 py-14 text-center hover:border-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
840
878
  onClick: () => {
841
879
  e.run("open");
842
880
  },
@@ -858,28 +896,41 @@ function _t() {
858
896
  });
859
897
  }
860
898
  // src/docs-canvas.tsx
861
- function vt({ emptyState: e, className: t }) {
862
- let { elementRef: n } = Z(), { file: r, dragging: i, generation: a, menu: o, moduleUrls: s, attachElement: c } = Je();
899
+ function bt({ emptyState: e, className: t }) {
900
+ let { state: n, elementRef: r } = X(), { file: i, dragging: a, generation: o, menu: s, moduleUrls: c, attachElement: l } = Ze(), u = n.progress, d = u?.fraction !== null && u?.fraction !== void 0 ? Math.max(4, Math.min(100, Math.round(u.fraction * 100))) : null;
863
901
  return /* @__PURE__ */ T("main", {
864
- className: J("relative min-h-0 flex-1", t),
902
+ className: K("relative min-h-0 flex-1", t),
865
903
  children: [
904
+ i !== null && u !== null && !u.complete && /* @__PURE__ */ w("div", {
905
+ role: "progressbar",
906
+ "aria-label": "Document loading progress",
907
+ "aria-valuemin": 0,
908
+ "aria-valuemax": 100,
909
+ "aria-valuenow": d ?? void 0,
910
+ className: "pointer-events-none absolute inset-x-0 top-0 z-10 h-0.5 overflow-hidden bg-border",
911
+ children: /* @__PURE__ */ w("div", {
912
+ className: K("h-full bg-primary transition-[width] duration-150 ease-out", d === null && "w-1/3 animate-pulse"),
913
+ style: d === null ? void 0 : { width: `${String(d)}%` }
914
+ })
915
+ }),
866
916
  /* @__PURE__ */ w("div", {
867
- className: r === null ? "hidden" : "f-office-docs-holder h-full",
917
+ className: i === null ? "hidden" : "f-office-docs-holder h-full",
868
918
  children: /* @__PURE__ */ w("f-office-docs", {
869
- ref: c,
919
+ ref: l,
870
920
  chrome: "none",
921
+ "outline-button": "true",
871
922
  className: "h-full",
872
- ...s?.module ? { module: s.module } : {},
873
- ...s?.wasm ? { wasm: s.wasm } : {},
874
- ...s?.dictionaries ? { dictionaries: s.dictionaries } : {}
875
- }, a)
923
+ ...c?.module ? { module: c.module } : {},
924
+ ...c?.wasm ? { wasm: c.wasm } : {},
925
+ ...c?.dictionaries ? { dictionaries: c.dictionaries } : {}
926
+ }, o)
876
927
  }),
877
- /* @__PURE__ */ w(gt, {
878
- request: o,
879
- elementRef: n
928
+ /* @__PURE__ */ w(vt, {
929
+ request: s,
930
+ elementRef: r
880
931
  }),
881
- r === null && (e ?? /* @__PURE__ */ w(_t, {})),
882
- i && /* @__PURE__ */ w("div", {
932
+ i === null && (e ?? /* @__PURE__ */ w(yt, {})),
933
+ a && /* @__PURE__ */ w("div", {
883
934
  className: "pointer-events-none absolute inset-0 grid place-items-center bg-background/85 text-lg font-medium",
884
935
  children: "Drop the file to open it"
885
936
  })
@@ -887,12 +938,12 @@ function vt({ emptyState: e, className: t }) {
887
938
  });
888
939
  }
889
940
  // src/assets/mark.svg
890
- var yt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='-256%20-256%20512%20512'%20width='512'%20height='512'%3e%3ctitle%3eF-Office%20mark%3c/title%3e%3cdefs%3e%3c!--%20One%20puzzle%20piece%20(the%20top-left%20one),%20origin%20at%20the%20puzzle%20center.%20The%20other%20three%20pieces%20are%20this%20outline%20rotated%20by%2090,%20180,%20270.%20--%3e%3cpath%20id='piece'%20d='M-134%20-256%20H-3%20A2.5%202.5%200%200%201%20-0.5%20-253.5%20V-185.97%20A17.5%2017.5%200%200%200%2022.45%20-169.34%20A43.5%2043.5%200%201%201%2022.45%20-86.66%20A17.5%2017.5%200%200%200%20-0.5%20-70.03%20V-0.5%20H-70.03%20A16.5%2016.5%200%200%201%20-85.71%20-22.14%20A44.5%2044.5%200%201%200%20-170.29%20-22.14%20A16.5%2016.5%200%200%201%20-185.97%20-0.5%20H-253.5%20A2.5%202.5%200%200%201%20-256%20-3%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20The%20whole%20puzzle%20square:%20drawn%20in%20the%20seam%20color%20under%20the%20pieces,%20and%20used%20to%20keep%20the%20edge%20shading%20inside%20the%20puzzle.%20--%3e%3cpath%20id='plate'%20d='M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3cclipPath%20id='plate-clip'%3e%3cuse%20xlink:href='%23plate'/%3e%3c/clipPath%3e%3cpath%20id='outside'%20fill-rule='evenodd'%20d='M-320%20-320%20H320%20V320%20H-320%20Z%20M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20Piece%20fills:%20light%20at%20the%20top%20left%20of%20every%20piece,%20so%20each%20gradient%20is%20turned%20back%20by%20the%20rotation%20of%20its%20piece.%20--%3e%3clinearGradient%20id='fill-purple'%20x1='-170.31'%20y1='-254.74'%20x2='-1.36'%20y2='5.42'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23D697FF'/%3e%3cstop%20offset='0.5'%20stop-color='%237E5AF4'/%3e%3cstop%20offset='1'%20stop-color='%234137C8'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-pink'%20x1='40.82'%20y1='-222.24'%20x2='219.77'%20y2='53.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-90)'%3e%3cstop%20offset='0'%20stop-color='%23FFB0D8'/%3e%3cstop%20offset='0.5'%20stop-color='%23FB5D99'/%3e%3cstop%20offset='1'%20stop-color='%23C71878'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-cyan'%20x1='5.69'%20y1='1.26'%20x2='174.64'%20y2='261.42'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-180)'%3e%3cstop%20offset='0'%20stop-color='%238EF1FC'/%3e%3cstop%20offset='0.5'%20stop-color='%2300CEE7'/%3e%3cstop%20offset='1'%20stop-color='%23009DB7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-orange'%20x1='-215.18'%20y1='-46.24'%20x2='-36.23'%20y2='229.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-270)'%3e%3cstop%20offset='0'%20stop-color='%23FCDD64'/%3e%3cstop%20offset='0.5'%20stop-color='%23FF9525'/%3e%3cstop%20offset='1'%20stop-color='%23F57B20'/%3e%3c/linearGradient%3e%3c!--%20Edge%20shading%20of%20the%20pieces.%20'shade':%20a%20crisp%20dark%20rim%20inside%20the%20edges%20that%20face%20down%20and%20right,%20a%20soft%20band%20behind%20it,%20and%20a%20tight%20shadow%20cast%20onto%20the%20neighbors.%20'light':%20a%20crisp%20light%20rim%20inside%20the%20edges%20that%20face%20up%20and%20left,%20and%20a%20soft%20band%20behind%20it;%20the%20outside%20of%20the%20puzzle%20counts%20as%20filled%20there,%20so%20only%20the%20seams%20get%20it.%20--%3e%3cfilter%20id='shade'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='-1'%20dy='-1'%20result='up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='up'%20operator='out'%20result='dark-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='2'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='-5'%20dy='-5'%20result='soft-up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-up'%20operator='out'%20result='dark-band'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='0.7'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dx='0.8'%20dy='1.2'%20result='tight-off'/%3e%3cfeComposite%20in='tight-off'%20in2='SourceAlpha'%20operator='out'%20result='cast'/%3e%3cfeFlood%20flood-color='%23120C3A'%20flood-opacity='0.15'/%3e%3cfeComposite%20in2='cast'%20operator='in'%20result='cast-shadow'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.1'/%3e%3cfeComposite%20in2='dark-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.4'/%3e%3cfeComposite%20in2='dark-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='cast-shadow'/%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3cfilter%20id='light'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='1'%20dy='1'%20result='down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='down'%20operator='out'%20result='light-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='1.5'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='4'%20dy='4'%20result='soft-down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-down'%20operator='out'%20result='light-band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.38'/%3e%3cfeComposite%20in2='light-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.45'/%3e%3cfeComposite%20in2='light-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3c!--%20Colored%20glow%20and%20contact%20shadow%20under%20the%20pieces%20--%3e%3cfilter%20id='glow'%20x='-40%25'%20y='-40%25'%20width='180%25'%20height='180%25'%20color-interpolation-filters='sRGB'%3e%3cfeGaussianBlur%20in='SourceGraphic'%20stdDeviation='34'%20result='wide'/%3e%3cfeOffset%20in='wide'%20dy='16'%20result='wide-off'/%3e%3cfeComponentTransfer%20in='wide-off'%20result='color-glow'%3e%3cfeFuncA%20type='linear'%20slope='0.5'/%3e%3c/feComponentTransfer%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='9'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dy='10'%20result='tight-off'/%3e%3cfeFlood%20flood-color='%23202848'%20flood-opacity='0.07'/%3e%3cfeComposite%20in2='tight-off'%20operator='in'%20result='contact'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='color-glow'/%3e%3cfeMergeNode%20in='contact'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3cg%20id='puzzle'%3e%3cg%20id='puzzle-glow'%20filter='url(%23glow)'%20clip-path='url(%23plate-clip)'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='pieces'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='edge-shade'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3c/g%3e%3c/g%3e%3cg%20id='edge-light'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
941
+ var xt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='-256%20-256%20512%20512'%20width='512'%20height='512'%3e%3ctitle%3eF-Office%20mark%3c/title%3e%3cdefs%3e%3c!--%20One%20puzzle%20piece%20(the%20top-left%20one),%20origin%20at%20the%20puzzle%20center.%20The%20other%20three%20pieces%20are%20this%20outline%20rotated%20by%2090,%20180,%20270.%20--%3e%3cpath%20id='piece'%20d='M-134%20-256%20H-3%20A2.5%202.5%200%200%201%20-0.5%20-253.5%20V-185.97%20A17.5%2017.5%200%200%200%2022.45%20-169.34%20A43.5%2043.5%200%201%201%2022.45%20-86.66%20A17.5%2017.5%200%200%200%20-0.5%20-70.03%20V-0.5%20H-70.03%20A16.5%2016.5%200%200%201%20-85.71%20-22.14%20A44.5%2044.5%200%201%200%20-170.29%20-22.14%20A16.5%2016.5%200%200%201%20-185.97%20-0.5%20H-253.5%20A2.5%202.5%200%200%201%20-256%20-3%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20The%20whole%20puzzle%20square:%20drawn%20in%20the%20seam%20color%20under%20the%20pieces,%20and%20used%20to%20keep%20the%20edge%20shading%20inside%20the%20puzzle.%20--%3e%3cpath%20id='plate'%20d='M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3cclipPath%20id='plate-clip'%3e%3cuse%20xlink:href='%23plate'/%3e%3c/clipPath%3e%3cpath%20id='outside'%20fill-rule='evenodd'%20d='M-320%20-320%20H320%20V320%20H-320%20Z%20M-134%20-256%20H134%20C158%20-256%20194%20-256%20225%20-225%20C256%20-194%20256%20-158%20256%20-134%20V134%20C256%20158%20256%20194%20225%20225%20C194%20256%20158%20256%20134%20256%20H-134%20C-158%20256%20-194%20256%20-225%20225%20C-256%20194%20-256%20158%20-256%20134%20V-134%20C-256%20-158%20-256%20-194%20-225%20-225%20C-194%20-256%20-158%20-256%20-134%20-256%20Z'/%3e%3c!--%20Piece%20fills:%20light%20at%20the%20top%20left%20of%20every%20piece,%20so%20each%20gradient%20is%20turned%20back%20by%20the%20rotation%20of%20its%20piece.%20--%3e%3clinearGradient%20id='fill-purple'%20x1='-170.31'%20y1='-254.74'%20x2='-1.36'%20y2='5.42'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23D697FF'/%3e%3cstop%20offset='0.5'%20stop-color='%237E5AF4'/%3e%3cstop%20offset='1'%20stop-color='%234137C8'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-pink'%20x1='40.82'%20y1='-222.24'%20x2='219.77'%20y2='53.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-90)'%3e%3cstop%20offset='0'%20stop-color='%23FFB0D8'/%3e%3cstop%20offset='0.5'%20stop-color='%23FB5D99'/%3e%3cstop%20offset='1'%20stop-color='%23C71878'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-cyan'%20x1='5.69'%20y1='1.26'%20x2='174.64'%20y2='261.42'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-180)'%3e%3cstop%20offset='0'%20stop-color='%238EF1FC'/%3e%3cstop%20offset='0.5'%20stop-color='%2300CEE7'/%3e%3cstop%20offset='1'%20stop-color='%23009DB7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='fill-orange'%20x1='-215.18'%20y1='-46.24'%20x2='-36.23'%20y2='229.31'%20gradientUnits='userSpaceOnUse'%20gradientTransform='rotate(-270)'%3e%3cstop%20offset='0'%20stop-color='%23FCDD64'/%3e%3cstop%20offset='0.5'%20stop-color='%23FF9525'/%3e%3cstop%20offset='1'%20stop-color='%23F57B20'/%3e%3c/linearGradient%3e%3c!--%20Edge%20shading%20of%20the%20pieces.%20'shade':%20a%20crisp%20dark%20rim%20inside%20the%20edges%20that%20face%20down%20and%20right,%20a%20soft%20band%20behind%20it,%20and%20a%20tight%20shadow%20cast%20onto%20the%20neighbors.%20'light':%20a%20crisp%20light%20rim%20inside%20the%20edges%20that%20face%20up%20and%20left,%20and%20a%20soft%20band%20behind%20it;%20the%20outside%20of%20the%20puzzle%20counts%20as%20filled%20there,%20so%20only%20the%20seams%20get%20it.%20--%3e%3cfilter%20id='shade'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='-1'%20dy='-1'%20result='up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='up'%20operator='out'%20result='dark-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='2'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='-5'%20dy='-5'%20result='soft-up'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-up'%20operator='out'%20result='dark-band'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='0.7'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dx='0.8'%20dy='1.2'%20result='tight-off'/%3e%3cfeComposite%20in='tight-off'%20in2='SourceAlpha'%20operator='out'%20result='cast'/%3e%3cfeFlood%20flood-color='%23120C3A'%20flood-opacity='0.15'/%3e%3cfeComposite%20in2='cast'%20operator='in'%20result='cast-shadow'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.1'/%3e%3cfeComposite%20in2='dark-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23140A50'%20flood-opacity='0.4'/%3e%3cfeComposite%20in2='dark-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='cast-shadow'/%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3cfilter%20id='light'%20x='-5%25'%20y='-5%25'%20width='110%25'%20height='110%25'%20color-interpolation-filters='sRGB'%3e%3cfeOffset%20in='SourceAlpha'%20dx='1'%20dy='1'%20result='down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='down'%20operator='out'%20result='light-line'/%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='1.5'%20result='soft'/%3e%3cfeOffset%20in='soft'%20dx='4'%20dy='4'%20result='soft-down'/%3e%3cfeComposite%20in='SourceAlpha'%20in2='soft-down'%20operator='out'%20result='light-band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.38'/%3e%3cfeComposite%20in2='light-band'%20operator='in'%20result='band'/%3e%3cfeFlood%20flood-color='%23FFFFFF'%20flood-opacity='0.45'/%3e%3cfeComposite%20in2='light-line'%20operator='in'%20result='line'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='band'/%3e%3cfeMergeNode%20in='line'/%3e%3c/feMerge%3e%3c/filter%3e%3c!--%20Colored%20glow%20and%20contact%20shadow%20under%20the%20pieces%20--%3e%3cfilter%20id='glow'%20x='-40%25'%20y='-40%25'%20width='180%25'%20height='180%25'%20color-interpolation-filters='sRGB'%3e%3cfeGaussianBlur%20in='SourceGraphic'%20stdDeviation='34'%20result='wide'/%3e%3cfeOffset%20in='wide'%20dy='16'%20result='wide-off'/%3e%3cfeComponentTransfer%20in='wide-off'%20result='color-glow'%3e%3cfeFuncA%20type='linear'%20slope='0.5'/%3e%3c/feComponentTransfer%3e%3cfeGaussianBlur%20in='SourceAlpha'%20stdDeviation='9'%20result='tight'/%3e%3cfeOffset%20in='tight'%20dy='10'%20result='tight-off'/%3e%3cfeFlood%20flood-color='%23202848'%20flood-opacity='0.07'/%3e%3cfeComposite%20in2='tight-off'%20operator='in'%20result='contact'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='color-glow'/%3e%3cfeMergeNode%20in='contact'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3cg%20id='puzzle'%3e%3cg%20id='puzzle-glow'%20filter='url(%23glow)'%20clip-path='url(%23plate-clip)'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='pieces'%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-purple)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-pink)'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-cyan)'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23piece'%20fill='url(%23fill-orange)'%20transform='rotate(270)'/%3e%3c/g%3e%3cg%20id='edge-shade'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3c/g%3e%3cg%20filter='url(%23shade)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3c/g%3e%3c/g%3e%3cg%20id='edge-light'%20clip-path='url(%23plate-clip)'%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(90)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(180)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3cg%20filter='url(%23light)'%3e%3cuse%20xlink:href='%23piece'%20transform='rotate(270)'/%3e%3cuse%20xlink:href='%23outside'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
891
942
  // src/chrome.ts
892
- function bt(e) {
943
+ function St(e) {
893
944
  return `${String(Math.round(e * 100))}%`;
894
945
  }
895
- function xt(e, t) {
946
+ function Ct(e, t) {
896
947
  let n = [
897
948
  {
898
949
  value: "fit-width",
@@ -904,110 +955,114 @@ function xt(e, t) {
904
955
  },
905
956
  ...e.map((e) => ({
906
957
  value: c(e),
907
- label: bt(e)
958
+ label: St(e)
908
959
  }))
909
960
  ];
910
961
  return t.startsWith("fixed:") && !n.some((e) => e.value === t) && n.push({
911
962
  value: t,
912
- label: bt(Number(t.slice(6)))
963
+ label: St(Number(t.slice(6)))
913
964
  }), n;
914
965
  }
915
966
  // src/ui/menubar.tsx
916
- var St = "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", Ct = "z-50 min-w-48 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg";
917
- function wt(e) {
918
- return /* @__PURE__ */ w(M.Menu, { ...e });
967
+ var wt = "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", Tt = "f-office-docs-portal z-50 min-w-48 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg";
968
+ function Et(e) {
969
+ return /* @__PURE__ */ w(N.Menu, { ...e });
919
970
  }
920
- function Tt(e) {
921
- return /* @__PURE__ */ w(M.Sub, { ...e });
971
+ function Dt(e) {
972
+ return /* @__PURE__ */ w(N.Sub, { ...e });
922
973
  }
923
- function Et(e) {
924
- return /* @__PURE__ */ w(M.RadioGroup, { ...e });
974
+ function Ot(e) {
975
+ return /* @__PURE__ */ w(N.RadioGroup, { ...e });
925
976
  }
926
- function Dt({ className: e, ...t }) {
927
- return /* @__PURE__ */ w(M.Root, {
977
+ function kt({ className: e, ...t }) {
978
+ return /* @__PURE__ */ w(N.Root, {
928
979
  "data-slot": "menubar",
929
- className: J("flex items-center gap-0.5", e),
980
+ className: K("flex items-center gap-0.5", e),
930
981
  ...t
931
982
  });
932
983
  }
933
- function Ot({ className: e, ...t }) {
934
- return /* @__PURE__ */ w(M.Trigger, {
984
+ function At({ className: e, ...t }) {
985
+ return /* @__PURE__ */ w(N.Trigger, {
935
986
  "data-slot": "menubar-trigger",
936
- className: J("rounded px-1.5 py-0.5 text-sm outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-[highlighted]:bg-accent data-[state=open]:bg-accent", e),
987
+ className: K("rounded px-1.5 py-0.5 text-sm outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-[highlighted]:bg-accent data-[state=open]:bg-accent", e),
937
988
  ...t
938
989
  });
939
990
  }
940
- function kt({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
941
- return /* @__PURE__ */ w(M.Portal, { children: /* @__PURE__ */ w(M.Content, {
991
+ function jt({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
992
+ let i = q();
993
+ return /* @__PURE__ */ w(N.Portal, { children: /* @__PURE__ */ w(N.Content, {
942
994
  "data-slot": "menubar-content",
995
+ "data-f-office-theme": i,
943
996
  align: t,
944
997
  sideOffset: n,
945
- className: J(Ct, e),
998
+ className: K(Tt, e),
946
999
  ...r
947
1000
  }) });
948
1001
  }
949
- function At({ className: e, ...t }) {
950
- return /* @__PURE__ */ w(M.Item, {
1002
+ function Mt({ className: e, ...t }) {
1003
+ return /* @__PURE__ */ w(N.Item, {
951
1004
  "data-slot": "menubar-item",
952
- className: J(St, e),
1005
+ className: K(wt, e),
953
1006
  ...t
954
1007
  });
955
1008
  }
956
- function jt({ className: e, children: t, ...n }) {
957
- return /* @__PURE__ */ T(M.CheckboxItem, {
1009
+ function Nt({ className: e, children: t, ...n }) {
1010
+ return /* @__PURE__ */ T(N.CheckboxItem, {
958
1011
  "data-slot": "menubar-checkbox-item",
959
- className: J(St, "pl-8", e),
1012
+ className: K(wt, "pl-8", e),
960
1013
  ...n,
961
1014
  children: [/* @__PURE__ */ w("span", {
962
1015
  className: "absolute left-2 flex size-4 items-center justify-center",
963
- children: /* @__PURE__ */ w(M.ItemIndicator, { children: /* @__PURE__ */ w(E, { className: "size-4" }) })
1016
+ children: /* @__PURE__ */ w(N.ItemIndicator, { children: /* @__PURE__ */ w(E, { className: "size-4" }) })
964
1017
  }), t]
965
1018
  });
966
1019
  }
967
- function Mt({ className: e, children: t, ...n }) {
968
- return /* @__PURE__ */ T(M.RadioItem, {
1020
+ function Pt({ className: e, children: t, ...n }) {
1021
+ return /* @__PURE__ */ T(N.RadioItem, {
969
1022
  "data-slot": "menubar-radio-item",
970
- className: J(St, "pl-8", e),
1023
+ className: K(wt, "pl-8", e),
971
1024
  ...n,
972
1025
  children: [/* @__PURE__ */ w("span", {
973
1026
  className: "absolute left-2 flex size-4 items-center justify-center",
974
- children: /* @__PURE__ */ w(M.ItemIndicator, { children: /* @__PURE__ */ w(he, { className: "size-2 fill-current" }) })
1027
+ children: /* @__PURE__ */ w(N.ItemIndicator, { children: /* @__PURE__ */ w(D, { className: "size-2 fill-current" }) })
975
1028
  }), t]
976
1029
  });
977
1030
  }
978
- function Nt({ className: e, children: t, ...n }) {
979
- return /* @__PURE__ */ T(M.SubTrigger, {
1031
+ function Ft({ className: e, children: t, ...n }) {
1032
+ return /* @__PURE__ */ T(N.SubTrigger, {
980
1033
  "data-slot": "menubar-sub-trigger",
981
- className: J(St, "data-[state=open]:bg-accent", e),
1034
+ className: K(wt, "data-[state=open]:bg-accent", e),
982
1035
  ...n,
983
- children: [t, /* @__PURE__ */ w(D, { className: "ml-auto size-4" })]
1036
+ children: [t, /* @__PURE__ */ w(he, { className: "ml-auto size-4" })]
984
1037
  });
985
1038
  }
986
- function Pt({ className: e, ...t }) {
987
- return /* @__PURE__ */ w(M.Portal, { children: /* @__PURE__ */ w(M.SubContent, {
1039
+ function It({ className: e, ...t }) {
1040
+ let n = q();
1041
+ return /* @__PURE__ */ w(N.Portal, { children: /* @__PURE__ */ w(N.SubContent, {
988
1042
  "data-slot": "menubar-sub-content",
989
- className: J(Ct, "min-w-36", e),
1043
+ "data-f-office-theme": n,
1044
+ className: K(Tt, "min-w-36", e),
990
1045
  ...t
991
1046
  }) });
992
1047
  }
993
- function Ft({ className: e, ...t }) {
994
- return /* @__PURE__ */ w(M.Separator, {
1048
+ function Lt({ className: e, ...t }) {
1049
+ return /* @__PURE__ */ w(N.Separator, {
995
1050
  "data-slot": "menubar-separator",
996
- className: J("-mx-1 my-1 h-px bg-border", e),
1051
+ className: K("-mx-1 my-1 h-px bg-border", e),
997
1052
  ...t
998
1053
  });
999
1054
  }
1000
- function It({ className: e, ...t }) {
1001
- return /* @__PURE__ */ w(M.Label, {
1055
+ function Rt({ className: e, ...t }) {
1056
+ return /* @__PURE__ */ w(N.Label, {
1002
1057
  "data-slot": "menubar-label",
1003
- className: J("px-2 py-1.5 text-xs text-muted-foreground", e),
1058
+ className: K("px-2 py-1.5 text-xs text-muted-foreground", e),
1004
1059
  ...t
1005
1060
  });
1006
1061
  }
1007
1062
  // src/menus.tsx
1008
1063
  function Q({ id: t, state: n, calls: o, choice: s }) {
1009
1064
  let c = a(navigator.userAgent), u = l(t, c)[0], d = !i(t, n.name !== null, n.selected);
1010
- return /* @__PURE__ */ T(At, {
1065
+ return /* @__PURE__ */ T(Mt, {
1011
1066
  disabled: d,
1012
1067
  "aria-keyshortcuts": r(t, c),
1013
1068
  onSelect: () => {
@@ -1015,11 +1070,11 @@ function Q({ id: t, state: n, calls: o, choice: s }) {
1015
1070
  o.run(t);
1016
1071
  });
1017
1072
  },
1018
- children: [e[t].name, u !== void 0 && /* @__PURE__ */ w(pt, { children: u })]
1073
+ children: [e[t].name, u !== void 0 && /* @__PURE__ */ w(ht, { children: u })]
1019
1074
  });
1020
1075
  }
1021
1076
  function $({ title: e, calls: t, choice: n, children: r }) {
1022
- return /* @__PURE__ */ T(wt, { children: [/* @__PURE__ */ w(Ot, { children: e }), /* @__PURE__ */ w(kt, {
1077
+ return /* @__PURE__ */ T(Et, { children: [/* @__PURE__ */ w(At, { children: e }), /* @__PURE__ */ w(jt, {
1023
1078
  onCloseAutoFocus: (e) => {
1024
1079
  let r = n.take();
1025
1080
  r && (e.preventDefault(), t.focusPages(), r());
@@ -1027,7 +1082,7 @@ function $({ title: e, calls: t, choice: n, children: r }) {
1027
1082
  children: r
1028
1083
  })] });
1029
1084
  }
1030
- function Lt(e) {
1085
+ function zt(e) {
1031
1086
  let { state: t } = e;
1032
1087
  return /* @__PURE__ */ T($, {
1033
1088
  title: "File",
@@ -1050,14 +1105,14 @@ function Lt(e) {
1050
1105
  id: "close",
1051
1106
  ...e
1052
1107
  }),
1053
- t.note && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Ft, {}), /* @__PURE__ */ w(It, {
1108
+ t.note && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Lt, {}), /* @__PURE__ */ w(Rt, {
1054
1109
  className: "max-w-64",
1055
1110
  children: t.note
1056
1111
  })] })
1057
1112
  ]
1058
1113
  });
1059
1114
  }
1060
- function Rt(e) {
1115
+ function Bt(e) {
1061
1116
  return /* @__PURE__ */ T($, {
1062
1117
  title: "Edit",
1063
1118
  calls: e.calls,
@@ -1071,7 +1126,7 @@ function Rt(e) {
1071
1126
  id: "select-all",
1072
1127
  ...e
1073
1128
  }),
1074
- /* @__PURE__ */ w(Ft, {}),
1129
+ /* @__PURE__ */ w(Lt, {}),
1075
1130
  /* @__PURE__ */ w(Q, {
1076
1131
  id: "find",
1077
1132
  ...e
@@ -1079,12 +1134,12 @@ function Rt(e) {
1079
1134
  ]
1080
1135
  });
1081
1136
  }
1082
- function zt(e) {
1137
+ function Vt(e) {
1083
1138
  let { state: t, calls: n } = e;
1084
- return /* @__PURE__ */ T(Tt, { children: [/* @__PURE__ */ w(Nt, {
1139
+ return /* @__PURE__ */ T(Dt, { children: [/* @__PURE__ */ w(Ft, {
1085
1140
  disabled: t.name === null,
1086
1141
  children: "Zoom"
1087
- }), /* @__PURE__ */ T(Pt, { children: [
1142
+ }), /* @__PURE__ */ T(It, { children: [
1088
1143
  /* @__PURE__ */ w(Q, {
1089
1144
  id: "zoom-in",
1090
1145
  ...e
@@ -1097,54 +1152,54 @@ function zt(e) {
1097
1152
  id: "actual-size",
1098
1153
  ...e
1099
1154
  }),
1100
- /* @__PURE__ */ w(Ft, {}),
1101
- /* @__PURE__ */ w(Et, {
1155
+ /* @__PURE__ */ w(Lt, {}),
1156
+ /* @__PURE__ */ w(Ot, {
1102
1157
  value: t.zoom,
1103
1158
  onValueChange: (t) => {
1104
1159
  e.choice.choose(() => {
1105
1160
  n.setZoom(t);
1106
1161
  });
1107
1162
  },
1108
- children: xt(t.zoomSteps, t.zoom).map((e) => /* @__PURE__ */ w(Mt, {
1163
+ children: Ct(t.zoomSteps, t.zoom).map((e) => /* @__PURE__ */ w(Pt, {
1109
1164
  value: e.value,
1110
1165
  children: e.label
1111
1166
  }, e.value))
1112
1167
  })
1113
1168
  ] })] });
1114
1169
  }
1115
- var Bt = {
1170
+ var Ht = {
1116
1171
  open: "Open fonts",
1117
1172
  installed: "Installed fonts"
1118
1173
  };
1119
- function Vt({ state: e, calls: t, choice: n }) {
1120
- return /* @__PURE__ */ T(Tt, { children: [/* @__PURE__ */ w(Nt, { children: "Fonts" }), /* @__PURE__ */ T(Pt, { children: [/* @__PURE__ */ T(Et, {
1174
+ function Ut({ state: e, calls: t, choice: n }) {
1175
+ return /* @__PURE__ */ T(Dt, { children: [/* @__PURE__ */ w(Ft, { children: "Fonts" }), /* @__PURE__ */ T(It, { children: [/* @__PURE__ */ T(Ot, {
1121
1176
  value: e.fonts,
1122
1177
  onValueChange: (e) => {
1123
1178
  n.choose(() => {
1124
1179
  t.setFonts(e);
1125
1180
  });
1126
1181
  },
1127
- children: [/* @__PURE__ */ w(Mt, {
1182
+ children: [/* @__PURE__ */ w(Pt, {
1128
1183
  value: "open",
1129
- children: Bt.open
1130
- }), /* @__PURE__ */ w(Mt, {
1184
+ children: Ht.open
1185
+ }), /* @__PURE__ */ w(Pt, {
1131
1186
  value: "installed",
1132
1187
  disabled: !e.installedFonts,
1133
- children: Bt.installed
1188
+ children: Ht.installed
1134
1189
  })]
1135
- }), !e.installedFonts && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Ft, {}), /* @__PURE__ */ w(It, {
1190
+ }), !e.installedFonts && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Lt, {}), /* @__PURE__ */ w(Rt, {
1136
1191
  className: "max-w-64 font-normal text-muted-foreground",
1137
1192
  children: d()
1138
1193
  })] })] })] });
1139
1194
  }
1140
- function Ht(e) {
1195
+ function Wt(e) {
1141
1196
  let { state: t, calls: n } = e;
1142
1197
  return /* @__PURE__ */ T($, {
1143
1198
  title: "View",
1144
1199
  calls: n,
1145
1200
  choice: e.choice,
1146
1201
  children: [
1147
- /* @__PURE__ */ w(jt, {
1202
+ /* @__PURE__ */ w(Nt, {
1148
1203
  disabled: t.name === null,
1149
1204
  checked: t.outline,
1150
1205
  onCheckedChange: (t) => {
@@ -1154,16 +1209,16 @@ function Ht(e) {
1154
1209
  },
1155
1210
  children: "Outline"
1156
1211
  }),
1157
- /* @__PURE__ */ w(zt, { ...e }),
1158
1212
  /* @__PURE__ */ w(Vt, { ...e }),
1159
- /* @__PURE__ */ T(Tt, { children: [/* @__PURE__ */ w(Nt, { children: "Theme" }), /* @__PURE__ */ w(Pt, { children: /* @__PURE__ */ w(Et, {
1213
+ /* @__PURE__ */ w(Ut, { ...e }),
1214
+ /* @__PURE__ */ T(Dt, { children: [/* @__PURE__ */ w(Ft, { children: "Theme" }), /* @__PURE__ */ w(It, { children: /* @__PURE__ */ w(Ot, {
1160
1215
  value: t.theme,
1161
1216
  onValueChange: (t) => {
1162
1217
  e.choice.choose(() => {
1163
1218
  n.setTheme(t);
1164
1219
  });
1165
1220
  },
1166
- children: W.map((e) => /* @__PURE__ */ w(Mt, {
1221
+ children: W.map((e) => /* @__PURE__ */ w(Pt, {
1167
1222
  value: e,
1168
1223
  children: G[e]
1169
1224
  }, e))
@@ -1171,8 +1226,8 @@ function Ht(e) {
1171
1226
  ]
1172
1227
  });
1173
1228
  }
1174
- function Ut({ className: e }) {
1175
- let { state: t, calls: n } = Z(), r = b(null), i = {
1229
+ function Gt({ className: e }) {
1230
+ let { state: t, calls: n } = X(), r = b(null), i = {
1176
1231
  choose: (e) => {
1177
1232
  r.current = e;
1178
1233
  },
@@ -1185,13 +1240,13 @@ function Ut({ className: e }) {
1185
1240
  calls: n,
1186
1241
  choice: i
1187
1242
  };
1188
- return /* @__PURE__ */ T(Dt, {
1243
+ return /* @__PURE__ */ T(kt, {
1189
1244
  "aria-label": "Menus",
1190
1245
  className: e ?? "-ml-1.5",
1191
1246
  children: [
1192
- /* @__PURE__ */ w(Lt, { ...a }),
1193
- /* @__PURE__ */ w(Rt, { ...a }),
1194
- /* @__PURE__ */ w(Ht, { ...a }),
1247
+ /* @__PURE__ */ w(zt, { ...a }),
1248
+ /* @__PURE__ */ w(Bt, { ...a }),
1249
+ /* @__PURE__ */ w(Wt, { ...a }),
1195
1250
  /* @__PURE__ */ w($, {
1196
1251
  title: "Tools",
1197
1252
  calls: n,
@@ -1217,23 +1272,23 @@ function Ut({ className: e }) {
1217
1272
  });
1218
1273
  }
1219
1274
  // src/header.tsx
1220
- var Wt = {
1221
- system: _e,
1222
- light: k,
1223
- dark: ve
1275
+ var Kt = {
1276
+ system: k,
1277
+ light: ve,
1278
+ dark: _e
1224
1279
  };
1225
- function Gt({ className: e, alt: t = "" }) {
1280
+ function qt({ className: e, alt: t = "" }) {
1226
1281
  return /* @__PURE__ */ w("img", {
1227
- src: yt,
1282
+ src: xt,
1228
1283
  alt: t,
1229
- className: J("size-10 p-1", e)
1284
+ className: K("size-10 p-1", e)
1230
1285
  });
1231
1286
  }
1232
- function Kt({ className: e }) {
1233
- let { state: t, calls: n } = Z();
1287
+ function Jt({ className: e }) {
1288
+ let { state: t, calls: n } = X();
1234
1289
  return t.name === null || t.outline ? null : /* @__PURE__ */ w("button", {
1235
1290
  type: "button",
1236
- className: J("grid size-10 shrink-0 place-items-center rounded-full text-muted-foreground hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring sm:hidden", e),
1291
+ className: K("grid size-10 shrink-0 place-items-center rounded-full text-muted-foreground hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring sm:hidden", e),
1237
1292
  "aria-label": "Show outline",
1238
1293
  title: "Show outline",
1239
1294
  onClick: () => {
@@ -1242,25 +1297,26 @@ function Kt({ className: e }) {
1242
1297
  children: /* @__PURE__ */ w(O, { className: "size-5" })
1243
1298
  });
1244
1299
  }
1245
- function qt({ fallback: e = "F-Office Docs", className: t }) {
1246
- let { state: n } = Z();
1300
+ function Yt({ fallback: e = "F-Office Docs", className: t }) {
1301
+ let { state: n } = X();
1247
1302
  return /* @__PURE__ */ T("div", {
1248
- className: J("min-w-0 flex-1", t),
1303
+ className: K("min-w-0 flex-1", t),
1249
1304
  children: [/* @__PURE__ */ w("h1", {
1250
1305
  className: "truncate text-lg leading-6",
1251
1306
  children: n.name ?? e
1252
- }), /* @__PURE__ */ w(Ut, {})]
1307
+ }), /* @__PURE__ */ w(Gt, {})]
1253
1308
  });
1254
1309
  }
1255
- function Jt({ className: e }) {
1256
- let { state: t, calls: n } = Z();
1310
+ function Xt({ className: e }) {
1311
+ let { state: t, calls: n } = X();
1257
1312
  return t.name === null ? null : /* @__PURE__ */ T("div", {
1258
- className: J("hidden shrink-0 items-center gap-3 text-sm text-muted-foreground md:flex", e),
1313
+ className: K("hidden shrink-0 items-center gap-3 text-sm text-muted-foreground md:flex", e),
1259
1314
  children: [/* @__PURE__ */ T("span", { children: [
1260
1315
  "Page ",
1261
1316
  t.page + 1,
1262
1317
  " of ",
1263
- t.pageCount
1318
+ t.pageCount,
1319
+ t.layoutComplete ? "" : "…"
1264
1320
  ] }), /* @__PURE__ */ w("select", {
1265
1321
  "aria-label": "Zoom",
1266
1322
  className: "h-8 rounded-md border border-border bg-transparent px-2 text-foreground",
@@ -1268,31 +1324,31 @@ function Jt({ className: e }) {
1268
1324
  onChange: (e) => {
1269
1325
  n.setZoom(e.target.value);
1270
1326
  },
1271
- children: xt(t.zoomSteps, t.zoom).map((e) => /* @__PURE__ */ w("option", {
1327
+ children: Ct(t.zoomSteps, t.zoom).map((e) => /* @__PURE__ */ w("option", {
1272
1328
  value: e.value,
1273
1329
  children: e.label
1274
1330
  }, e.value))
1275
1331
  })]
1276
1332
  });
1277
1333
  }
1278
- function Yt({ className: e }) {
1279
- let { state: t, calls: n } = Z(), r = Wt[t.theme], i = `Theme: ${G[t.theme]}`;
1334
+ function Zt({ className: e }) {
1335
+ let { state: t, calls: n } = X(), r = Kt[t.theme], i = `Theme: ${G[t.theme]}`;
1280
1336
  return /* @__PURE__ */ w("button", {
1281
1337
  type: "button",
1282
- className: J("grid size-10 shrink-0 place-items-center rounded-full text-muted-foreground hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring", e),
1338
+ className: K("grid size-10 shrink-0 place-items-center rounded-full text-muted-foreground hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring", e),
1283
1339
  "aria-label": i,
1284
1340
  title: i,
1285
1341
  onClick: () => {
1286
- n.setTheme(Ne(t.theme));
1342
+ n.setTheme(Fe(t.theme));
1287
1343
  },
1288
1344
  children: /* @__PURE__ */ w(r, { className: "size-5" })
1289
1345
  });
1290
1346
  }
1291
- function Xt({ className: e }) {
1292
- let { calls: t } = Z();
1347
+ function Qt({ className: e }) {
1348
+ let { calls: t } = X();
1293
1349
  return /* @__PURE__ */ T("button", {
1294
1350
  type: "button",
1295
- className: J("h-10 shrink-0 rounded-full bg-primary px-4 text-sm font-medium text-primary-foreground hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring sm:px-5", e),
1351
+ className: K("h-10 shrink-0 rounded-full bg-primary px-4 text-sm font-medium text-primary-foreground hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring sm:px-5", e),
1296
1352
  "aria-label": "Open a DOCX file",
1297
1353
  onClick: () => {
1298
1354
  t.run("open");
@@ -1306,101 +1362,116 @@ function Xt({ className: e }) {
1306
1362
  })]
1307
1363
  });
1308
1364
  }
1309
- function Zt({ className: e }) {
1365
+ function $t({ className: e }) {
1310
1366
  return /* @__PURE__ */ T("header", {
1311
- className: J("flex h-16 shrink-0 items-center gap-2 px-3 sm:gap-3 sm:px-4", e),
1367
+ className: K("flex h-16 shrink-0 items-center gap-2 px-3 sm:gap-3 sm:px-4", e),
1312
1368
  children: [
1313
- /* @__PURE__ */ w(Gt, { className: "shrink-0" }),
1314
- /* @__PURE__ */ w(Kt, {}),
1315
- /* @__PURE__ */ w(qt, {}),
1369
+ /* @__PURE__ */ w(qt, { className: "shrink-0" }),
1316
1370
  /* @__PURE__ */ w(Jt, {}),
1317
1371
  /* @__PURE__ */ w(Yt, {}),
1318
- /* @__PURE__ */ w(Xt, {})
1372
+ /* @__PURE__ */ w(Xt, {}),
1373
+ /* @__PURE__ */ w(Zt, {}),
1374
+ /* @__PURE__ */ w(Qt, {})
1319
1375
  ]
1320
1376
  });
1321
1377
  }
1322
1378
  // src/docs-app.tsx
1323
- function Qt(e) {
1324
- return /* @__PURE__ */ T(Ye, {
1379
+ function en(e) {
1380
+ return /* @__PURE__ */ T(Qe, {
1325
1381
  ...e,
1326
1382
  children: [
1327
- /* @__PURE__ */ w(Zt, {}),
1328
- /* @__PURE__ */ w(vt, {}),
1329
- /* @__PURE__ */ w(at, {})
1383
+ /* @__PURE__ */ w($t, {}),
1384
+ /* @__PURE__ */ w(bt, {}),
1385
+ /* @__PURE__ */ w(st, {})
1330
1386
  ]
1331
1387
  });
1332
1388
  }
1333
1389
  // src/f-office-docs.tsx
1334
- function $t(e, t) {
1390
+ function tn(e, t) {
1335
1391
  if (e) {
1336
1392
  if (typeof e == "function") return e(t) ?? void 0;
1337
1393
  e.current = t;
1338
1394
  }
1339
1395
  }
1340
- function en({ ref: e, source: t, name: n, zoom: r, target: i, chrome: a = "none", readOnly: o = !0, outlineOpen: s, fontSource: c, highlights: l, moduleUrls: u, className: d, style: f, onOpen: ee, onViewChange: te, onPageChange: ne, onOutlineChange: re, onSelectionChange: ie, onMenu: p, onError: ae }) {
1396
+ function nn({ ref: e, source: t, name: n, zoom: r, target: i, chrome: a = "none", outlineButton: o, readOnly: s = !0, outlineOpen: c, fontSource: l, highlights: u, moduleUrls: d, className: f, style: ee, onOpen: te, onPagesChange: ne, onProgress: re, onViewChange: ie, onPageChange: p, onOutlineChange: ae, onSelectionChange: m, onMenu: h, onError: y }) {
1341
1397
  le();
1342
- let m = b(null), h = v((e) => {
1343
- ee?.(e.detail);
1344
- }), y = v((e) => {
1398
+ let x = b(null), oe = v((e) => {
1345
1399
  te?.(e.detail);
1346
- }), x = v((e) => {
1347
- ne?.(e.detail);
1348
- }), oe = v((e) => {
1349
- re?.(e.detail);
1350
1400
  }), se = v((e) => {
1351
- ie?.(e.detail);
1401
+ ne?.(e.detail);
1352
1402
  }), ce = v((e) => {
1353
- p && (e.preventDefault(), p(e.detail));
1403
+ re?.(e.detail);
1354
1404
  }), ue = v((e) => {
1405
+ ie?.(e.detail);
1406
+ }), de = v((e) => {
1407
+ p?.(e.detail);
1408
+ }), fe = v((e) => {
1355
1409
  ae?.(e.detail);
1356
- }), de = g((t) => {
1357
- m.current = t;
1358
- let n = $t(e, t);
1410
+ }), pe = v((e) => {
1411
+ m?.(e.detail);
1412
+ }), me = v((e) => {
1413
+ h && (e.preventDefault(), h(e.detail));
1414
+ }), S = v((e) => {
1415
+ y?.(e.detail);
1416
+ }), C = v((e) => {
1417
+ c !== void 0 && (e.outlineOpen = c), u !== void 0 && e.setDocsHighlights(u);
1418
+ }), T = g((t) => {
1419
+ x.current = t;
1420
+ let n = tn(e, t);
1359
1421
  return () => {
1360
- m.current = null, typeof n == "function" ? n() : $t(e, null);
1422
+ x.current = null, typeof n == "function" ? n() : tn(e, null);
1361
1423
  };
1362
1424
  }, [e]);
1363
1425
  return _(() => {
1364
- let e = m.current;
1365
- if (e) return e.addEventListener("open", h), e.addEventListener("viewchange", y), e.addEventListener("pagechange", x), e.addEventListener("outlinechange", oe), e.addEventListener("selectionchange", se), e.addEventListener("menu", ce), e.addEventListener("error", ue), () => {
1366
- e.removeEventListener("open", h), e.removeEventListener("viewchange", y), e.removeEventListener("pagechange", x), e.removeEventListener("outlinechange", oe), e.removeEventListener("selectionchange", se), e.removeEventListener("menu", ce), e.removeEventListener("error", ue);
1426
+ let e = x.current;
1427
+ if (e) return e.addEventListener("open", oe), e.addEventListener("pageschange", se), e.addEventListener("progress", ce), e.addEventListener("viewchange", ue), e.addEventListener("pagechange", de), e.addEventListener("outlinechange", fe), e.addEventListener("selectionchange", pe), e.addEventListener("menu", me), e.addEventListener("error", S), () => {
1428
+ e.removeEventListener("open", oe), e.removeEventListener("pageschange", se), e.removeEventListener("progress", ce), e.removeEventListener("viewchange", ue), e.removeEventListener("pagechange", de), e.removeEventListener("outlinechange", fe), e.removeEventListener("selectionchange", pe), e.removeEventListener("menu", me), e.removeEventListener("error", S);
1367
1429
  };
1368
1430
  }, []), _(() => {
1369
- let e = m.current;
1370
- e && (e.readOnly = o);
1371
- }, [o]), _(() => {
1372
- let e = m.current;
1373
- e && c !== void 0 && (e.fontSource = c);
1374
- }, [c]), _(() => {
1375
- let e = m.current;
1376
- e && s !== void 0 && (e.outlineOpen = s);
1431
+ let e = x.current;
1432
+ e && (e.readOnly = s);
1377
1433
  }, [s]), _(() => {
1378
- let e = m.current;
1434
+ let e = x.current;
1435
+ e && l !== void 0 && (e.fontSource = l);
1436
+ }, [l]), _(() => {
1437
+ let e = x.current;
1438
+ e && c !== void 0 && (e.outlineOpen = c);
1439
+ }, [c]), _(() => {
1440
+ let e = x.current;
1379
1441
  e && i !== void 0 && (e.target = i);
1380
1442
  }, [i]), _(() => {
1381
- let e = m.current;
1382
- e && r !== void 0 && e.applyZoomSetting(r);
1383
- }, [r]), _(() => {
1384
- let e = m.current;
1385
- e && l !== void 0 && e.setDocsHighlights(l);
1386
- }, [l]), _(() => {
1387
- let e = m.current;
1388
- e && t && e.openSource(t, n).catch(() => void 0);
1443
+ let e = x.current;
1444
+ e && u !== void 0 && e.setDocsHighlights(u);
1445
+ }, [u]), _(() => {
1446
+ let e = x.current;
1447
+ if (!e) return;
1448
+ if (!t) {
1449
+ e.close().catch(() => void 0);
1450
+ return;
1451
+ }
1452
+ let r = !1;
1453
+ return e.openSource(t, n).then(() => {
1454
+ r || C(e);
1455
+ }).catch(() => void 0), () => {
1456
+ r = !0;
1457
+ };
1389
1458
  }, [t, n]), /* @__PURE__ */ w("f-office-docs", {
1390
- ref: de,
1459
+ ref: T,
1391
1460
  chrome: a,
1392
- "read-only": o ? "true" : "false",
1461
+ "read-only": s ? "true" : "false",
1462
+ ...r === void 0 ? {} : { zoom: String(r) },
1463
+ ...o === void 0 ? {} : { "outline-button": o ? "true" : "false" },
1393
1464
  ...i ? { target: i } : {},
1394
- ...u?.module ? { module: u.module } : {},
1395
- ...u?.wasm ? { wasm: u.wasm } : {},
1396
- ...u?.dictionaries ? { dictionaries: u.dictionaries } : {},
1397
- className: d,
1465
+ ...d?.module ? { module: d.module } : {},
1466
+ ...d?.wasm ? { wasm: d.wasm } : {},
1467
+ ...d?.dictionaries ? { dictionaries: d.dictionaries } : {},
1468
+ className: f,
1398
1469
  style: {
1399
1470
  display: "block",
1400
1471
  width: "100%",
1401
1472
  height: "100%",
1402
- ...f
1473
+ ...ee
1403
1474
  }
1404
1475
  });
1405
1476
  }
1406
- export { K as DEFAULT_THEME_STORAGE_KEY, Qt as DocsApp, vt as DocsCanvas, at as DocsDialogs, Zt as DocsHeader, Gt as DocsMark, Ut as DocsMenuBar, Xt as DocsOpenButton, Kt as DocsOutlineButton, Jt as DocsPageControls, Ye as DocsProvider, _t as DocsStart, Yt as DocsThemeButton, qt as DocsTitle, et as DocsWordmark, Pe as FILE_PARAMETER, en as FOfficeDocs, xe as KEEP_LIMIT, Ce as KEEP_NOTES, L as Keeper, W as THEMES, G as THEME_NAMES, Se as VIEW_DELAY, Me as applyTheme, Ie as askedFile, U as browserSlots, Te as databaseSlots, Le as dropFileParameter, X as fetchAskedFile, Y as fileName, z as folderSlots, Ae as loadTheme, Ne as nextTheme, H as openDatabase, je as saveTheme, Z as useDocs, xt as zoomOptions };
1477
+ export { ke as DEFAULT_THEME_STORAGE_KEY, en as DocsApp, bt as DocsCanvas, st as DocsDialogs, $t as DocsHeader, qt as DocsMark, Gt as DocsMenuBar, Qt as DocsOpenButton, Jt as DocsOutlineButton, Xt as DocsPageControls, Qe as DocsProvider, yt as DocsStart, Zt as DocsThemeButton, Yt as DocsTitle, nt as DocsWordmark, Le as FILE_PARAMETER, nn as FOfficeDocs, P as KEEP_LIMIT, Se as KEEP_NOTES, L as Keeper, W as THEMES, G as THEME_NAMES, xe as VIEW_DELAY, Pe as applyTheme, ze as askedFile, Ee as browserSlots, H as databaseSlots, Ve as dropFileParameter, Be as fetchAskedFile, J as fileName, z as folderSlots, Me as loadTheme, Fe as nextTheme, Te as openDatabase, Ne as saveTheme, X as useDocs, Ct as zoomOptions };