lookbook 2.3.6 → 2.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lookbook/version.rb +1 -1
  3. data/public/lookbook-assets/css/lookbook.css +31 -37
  4. data/public/lookbook-assets/css/lookbook.css.map +1 -1
  5. data/public/lookbook-assets/css/themes/blue.css +0 -1
  6. data/public/lookbook-assets/css/themes/green.css +0 -1
  7. data/public/lookbook-assets/css/themes/indigo.css +0 -1
  8. data/public/lookbook-assets/css/themes/rose.css +0 -1
  9. data/public/lookbook-assets/css/themes/zinc.css +0 -1
  10. data/public/lookbook-assets/js/iframe.js +193 -193
  11. data/public/lookbook-assets/js/index.js +821 -821
  12. data/public/lookbook-assets/js/index.js.map +1 -1
  13. data/public/lookbook-assets/js/lookbook-core.js +0 -37
  14. data/public/lookbook-assets/js/lookbook.js +252 -289
  15. metadata +2 -378
  16. data/assets/icons/activity-square.svg +0 -1
  17. data/assets/icons/ampersand.svg +0 -1
  18. data/assets/icons/ampersands.svg +0 -1
  19. data/assets/icons/antenna.svg +0 -1
  20. data/assets/icons/app-window.svg +0 -1
  21. data/assets/icons/archive-x.svg +0 -1
  22. data/assets/icons/area-chart.svg +0 -1
  23. data/assets/icons/arrow-big-down-dash.svg +0 -1
  24. data/assets/icons/arrow-big-left-dash.svg +0 -1
  25. data/assets/icons/arrow-big-right-dash.svg +0 -1
  26. data/assets/icons/arrow-big-up-dash.svg +0 -1
  27. data/assets/icons/arrow-down-0-1.svg +0 -1
  28. data/assets/icons/arrow-down-1-0.svg +0 -1
  29. data/assets/icons/arrow-down-a-z.svg +0 -1
  30. data/assets/icons/arrow-down-from-line.svg +0 -1
  31. data/assets/icons/arrow-down-left-from-circle.svg +0 -1
  32. data/assets/icons/arrow-down-left-square.svg +0 -1
  33. data/assets/icons/arrow-down-narrow-wide.svg +0 -1
  34. data/assets/icons/arrow-down-right-from-circle.svg +0 -1
  35. data/assets/icons/arrow-down-right-square.svg +0 -1
  36. data/assets/icons/arrow-down-square.svg +0 -1
  37. data/assets/icons/arrow-down-to-dot.svg +0 -1
  38. data/assets/icons/arrow-down-to-line.svg +0 -1
  39. data/assets/icons/arrow-down-up.svg +0 -1
  40. data/assets/icons/arrow-down-wide-narrow.svg +0 -1
  41. data/assets/icons/arrow-down-z-a.svg +0 -1
  42. data/assets/icons/arrow-left-from-line.svg +0 -1
  43. data/assets/icons/arrow-left-square.svg +0 -1
  44. data/assets/icons/arrow-left-to-line.svg +0 -1
  45. data/assets/icons/arrow-right-from-line.svg +0 -1
  46. data/assets/icons/arrow-right-left.svg +0 -1
  47. data/assets/icons/arrow-right-square.svg +0 -1
  48. data/assets/icons/arrow-right-to-line.svg +0 -1
  49. data/assets/icons/arrow-up-0-1.svg +0 -1
  50. data/assets/icons/arrow-up-1-0.svg +0 -1
  51. data/assets/icons/arrow-up-a-z.svg +0 -1
  52. data/assets/icons/arrow-up-from-dot.svg +0 -1
  53. data/assets/icons/arrow-up-from-line.svg +0 -1
  54. data/assets/icons/arrow-up-left-from-circle.svg +0 -1
  55. data/assets/icons/arrow-up-left-square.svg +0 -1
  56. data/assets/icons/arrow-up-narrow-wide.svg +0 -1
  57. data/assets/icons/arrow-up-right-from-circle.svg +0 -1
  58. data/assets/icons/arrow-up-right-square.svg +0 -1
  59. data/assets/icons/arrow-up-square.svg +0 -1
  60. data/assets/icons/arrow-up-to-line.svg +0 -1
  61. data/assets/icons/arrow-up-wide-narrow.svg +0 -1
  62. data/assets/icons/arrow-up-z-a.svg +0 -1
  63. data/assets/icons/arrows-up-from-line.svg +0 -1
  64. data/assets/icons/atom.svg +0 -1
  65. data/assets/icons/badge-alert.svg +0 -1
  66. data/assets/icons/badge-cent.svg +0 -1
  67. data/assets/icons/badge-check.svg +0 -1
  68. data/assets/icons/badge-dollar-sign.svg +0 -1
  69. data/assets/icons/badge-euro.svg +0 -1
  70. data/assets/icons/badge-help.svg +0 -1
  71. data/assets/icons/badge-indian-rupee.svg +0 -1
  72. data/assets/icons/badge-info.svg +0 -1
  73. data/assets/icons/badge-japanese-yen.svg +0 -1
  74. data/assets/icons/badge-minus.svg +0 -1
  75. data/assets/icons/badge-percent.svg +0 -1
  76. data/assets/icons/badge-plus.svg +0 -1
  77. data/assets/icons/badge-pound-sterling.svg +0 -1
  78. data/assets/icons/badge-russian-ruble.svg +0 -1
  79. data/assets/icons/badge-swiss-franc.svg +0 -1
  80. data/assets/icons/badge-x.svg +0 -1
  81. data/assets/icons/badge.svg +0 -1
  82. data/assets/icons/ban.svg +0 -1
  83. data/assets/icons/bar-chart-big.svg +0 -1
  84. data/assets/icons/bar-chart-horizontal-big.svg +0 -1
  85. data/assets/icons/bell-dot.svg +0 -1
  86. data/assets/icons/biohazard.svg +0 -1
  87. data/assets/icons/blocks.svg +0 -1
  88. data/assets/icons/book-copy.svg +0 -1
  89. data/assets/icons/book-down.svg +0 -1
  90. data/assets/icons/book-key.svg +0 -1
  91. data/assets/icons/book-lock.svg +0 -1
  92. data/assets/icons/book-marked.svg +0 -1
  93. data/assets/icons/book-minus.svg +0 -1
  94. data/assets/icons/book-plus.svg +0 -1
  95. data/assets/icons/book-template.svg +0 -1
  96. data/assets/icons/book-up-2.svg +0 -1
  97. data/assets/icons/book-up.svg +0 -1
  98. data/assets/icons/book-x.svg +0 -1
  99. data/assets/icons/bookmark-check.svg +0 -1
  100. data/assets/icons/bookmark-x.svg +0 -1
  101. data/assets/icons/boom-box.svg +0 -1
  102. data/assets/icons/braces.svg +0 -1
  103. data/assets/icons/brackets.svg +0 -1
  104. data/assets/icons/brain-circuit.svg +0 -1
  105. data/assets/icons/brain-cog.svg +0 -1
  106. data/assets/icons/brain.svg +0 -1
  107. data/assets/icons/bring-to-front.svg +0 -1
  108. data/assets/icons/bug-off.svg +0 -1
  109. data/assets/icons/bug-play.svg +0 -1
  110. data/assets/icons/bus-front.svg +0 -1
  111. data/assets/icons/cable-car.svg +0 -1
  112. data/assets/icons/cable.svg +0 -1
  113. data/assets/icons/cake-slice.svg +0 -1
  114. data/assets/icons/candlestick-chart.svg +0 -1
  115. data/assets/icons/candy-cane.svg +0 -1
  116. data/assets/icons/car-front.svg +0 -1
  117. data/assets/icons/car-taxi-front.svg +0 -1
  118. data/assets/icons/case-lower.svg +0 -1
  119. data/assets/icons/case-sensitive.svg +0 -1
  120. data/assets/icons/case-upper.svg +0 -1
  121. data/assets/icons/cassette-tape.svg +0 -1
  122. data/assets/icons/castle.svg +0 -1
  123. data/assets/icons/chevron-down-circle.svg +0 -1
  124. data/assets/icons/chevron-down-square.svg +0 -1
  125. data/assets/icons/chevron-left-circle.svg +0 -1
  126. data/assets/icons/chevron-left-square.svg +0 -1
  127. data/assets/icons/chevron-right-circle.svg +0 -1
  128. data/assets/icons/chevron-right-square.svg +0 -1
  129. data/assets/icons/chevron-up-circle.svg +0 -1
  130. data/assets/icons/chevron-up-square.svg +0 -1
  131. data/assets/icons/church.svg +0 -1
  132. data/assets/icons/circle-dashed.svg +0 -1
  133. data/assets/icons/circle-dollar-sign.svg +0 -1
  134. data/assets/icons/circle-dot-dashed.svg +0 -1
  135. data/assets/icons/circle-equal.svg +0 -1
  136. data/assets/icons/circle-off.svg +0 -1
  137. data/assets/icons/circle-slash-2.svg +0 -1
  138. data/assets/icons/circle-slash.svg +0 -1
  139. data/assets/icons/circuit-board.svg +0 -1
  140. data/assets/icons/clipboard-paste.svg +0 -1
  141. data/assets/icons/club.svg +0 -1
  142. data/assets/icons/combine.svg +0 -1
  143. data/assets/icons/computer.svg +0 -1
  144. data/assets/icons/contact-2.svg +0 -1
  145. data/assets/icons/container.svg +0 -1
  146. data/assets/icons/copy-check.svg +0 -1
  147. data/assets/icons/copy-minus.svg +0 -1
  148. data/assets/icons/copy-plus.svg +0 -1
  149. data/assets/icons/copy-slash.svg +0 -1
  150. data/assets/icons/copy-x.svg +0 -1
  151. data/assets/icons/database-zap.svg +0 -1
  152. data/assets/icons/dessert.svg +0 -1
  153. data/assets/icons/disc-2.svg +0 -1
  154. data/assets/icons/disc-3.svg +0 -1
  155. data/assets/icons/donut.svg +0 -1
  156. data/assets/icons/door-closed.svg +0 -1
  157. data/assets/icons/door-open.svg +0 -1
  158. data/assets/icons/dot.svg +0 -1
  159. data/assets/icons/drama.svg +0 -1
  160. data/assets/icons/ferris-wheel.svg +0 -1
  161. data/assets/icons/file-code-2.svg +0 -1
  162. data/assets/icons/file-stack.svg +0 -1
  163. data/assets/icons/fish-symbol.svg +0 -1
  164. data/assets/icons/fold-horizontal.svg +0 -1
  165. data/assets/icons/fold-vertical.svg +0 -1
  166. data/assets/icons/folder-dot.svg +0 -1
  167. data/assets/icons/folder-git-2.svg +0 -1
  168. data/assets/icons/folder-git.svg +0 -1
  169. data/assets/icons/folder-kanban.svg +0 -1
  170. data/assets/icons/folder-open-dot.svg +0 -1
  171. data/assets/icons/folder-root.svg +0 -1
  172. data/assets/icons/folder-sync.svg +0 -1
  173. data/assets/icons/gallery-horizontal-end.svg +0 -1
  174. data/assets/icons/gallery-horizontal.svg +0 -1
  175. data/assets/icons/gallery-thumbnails.svg +0 -1
  176. data/assets/icons/gallery-vertical-end.svg +0 -1
  177. data/assets/icons/gallery-vertical.svg +0 -1
  178. data/assets/icons/gantt-chart-square.svg +0 -1
  179. data/assets/icons/gantt-chart.svg +0 -1
  180. data/assets/icons/gauge-circle.svg +0 -1
  181. data/assets/icons/goal.svg +0 -1
  182. data/assets/icons/grid-2x2.svg +0 -1
  183. data/assets/icons/grid-3x3.svg +0 -1
  184. data/assets/icons/group.svg +0 -1
  185. data/assets/icons/hard-drive-download.svg +0 -1
  186. data/assets/icons/hard-drive-upload.svg +0 -1
  187. data/assets/icons/hdmi-port.svg +0 -1
  188. data/assets/icons/hotel.svg +0 -1
  189. data/assets/icons/iteration-ccw.svg +0 -1
  190. data/assets/icons/iteration-cw.svg +0 -1
  191. data/assets/icons/kanban-square-dashed.svg +0 -1
  192. data/assets/icons/kanban-square.svg +0 -1
  193. data/assets/icons/kanban.svg +0 -1
  194. data/assets/icons/key-round.svg +0 -1
  195. data/assets/icons/key-square.svg +0 -1
  196. data/assets/icons/layout-panel-left.svg +0 -1
  197. data/assets/icons/layout-panel-top.svg +0 -1
  198. data/assets/icons/leafy-green.svg +0 -1
  199. data/assets/icons/ligature.svg +0 -1
  200. data/assets/icons/list-filter.svg +0 -1
  201. data/assets/icons/list-restart.svg +0 -1
  202. data/assets/icons/list-todo.svg +0 -1
  203. data/assets/icons/list-tree.svg +0 -1
  204. data/assets/icons/lollipop.svg +0 -1
  205. data/assets/icons/m-square.svg +0 -1
  206. data/assets/icons/mailbox.svg +0 -1
  207. data/assets/icons/memory-stick.svg +0 -1
  208. data/assets/icons/menu-square.svg +0 -1
  209. data/assets/icons/merge.svg +0 -1
  210. data/assets/icons/message-square-dashed.svg +0 -1
  211. data/assets/icons/message-square-plus.svg +0 -1
  212. data/assets/icons/messages-square.svg +0 -1
  213. data/assets/icons/monitor-check.svg +0 -1
  214. data/assets/icons/monitor-dot.svg +0 -1
  215. data/assets/icons/monitor-down.svg +0 -1
  216. data/assets/icons/monitor-pause.svg +0 -1
  217. data/assets/icons/monitor-play.svg +0 -1
  218. data/assets/icons/monitor-stop.svg +0 -1
  219. data/assets/icons/monitor-up.svg +0 -1
  220. data/assets/icons/monitor-x.svg +0 -1
  221. data/assets/icons/moon-star.svg +0 -1
  222. data/assets/icons/mouse-pointer-square-dashed.svg +0 -1
  223. data/assets/icons/mouse-pointer-square.svg +0 -1
  224. data/assets/icons/move-down-left.svg +0 -1
  225. data/assets/icons/move-down-right.svg +0 -1
  226. data/assets/icons/move-down.svg +0 -1
  227. data/assets/icons/move-left.svg +0 -1
  228. data/assets/icons/move-right.svg +0 -1
  229. data/assets/icons/move-up-left.svg +0 -1
  230. data/assets/icons/move-up-right.svg +0 -1
  231. data/assets/icons/move-up.svg +0 -1
  232. data/assets/icons/orbit.svg +0 -1
  233. data/assets/icons/panel-bottom-close.svg +0 -1
  234. data/assets/icons/panel-bottom-inactive.svg +0 -1
  235. data/assets/icons/panel-bottom-open.svg +0 -1
  236. data/assets/icons/panel-bottom.svg +0 -1
  237. data/assets/icons/panel-left-close.svg +0 -1
  238. data/assets/icons/panel-left-inactive.svg +0 -1
  239. data/assets/icons/panel-left-open.svg +0 -1
  240. data/assets/icons/panel-left.svg +0 -1
  241. data/assets/icons/panel-right-close.svg +0 -1
  242. data/assets/icons/panel-right-inactive.svg +0 -1
  243. data/assets/icons/panel-right-open.svg +0 -1
  244. data/assets/icons/panel-right.svg +0 -1
  245. data/assets/icons/panel-top-close.svg +0 -1
  246. data/assets/icons/panel-top-inactive.svg +0 -1
  247. data/assets/icons/panel-top-open.svg +0 -1
  248. data/assets/icons/panel-top.svg +0 -1
  249. data/assets/icons/parentheses.svg +0 -1
  250. data/assets/icons/parking-circle-off.svg +0 -1
  251. data/assets/icons/parking-circle.svg +0 -1
  252. data/assets/icons/parking-meter.svg +0 -1
  253. data/assets/icons/parking-square-off.svg +0 -1
  254. data/assets/icons/parking-square.svg +0 -1
  255. data/assets/icons/paw-print.svg +0 -1
  256. data/assets/icons/pc-case.svg +0 -1
  257. data/assets/icons/pen-line.svg +0 -1
  258. data/assets/icons/pen-square.svg +0 -1
  259. data/assets/icons/pen.svg +0 -1
  260. data/assets/icons/pencil-line.svg +0 -1
  261. data/assets/icons/pencil-ruler.svg +0 -1
  262. data/assets/icons/percent-circle.svg +0 -1
  263. data/assets/icons/percent-diamond.svg +0 -1
  264. data/assets/icons/percent-square.svg +0 -1
  265. data/assets/icons/pi-square.svg +0 -1
  266. data/assets/icons/pi.svg +0 -1
  267. data/assets/icons/pilcrow-square.svg +0 -1
  268. data/assets/icons/plane-landing.svg +0 -1
  269. data/assets/icons/plane-takeoff.svg +0 -1
  270. data/assets/icons/play-square.svg +0 -1
  271. data/assets/icons/plug-zap-2.svg +0 -1
  272. data/assets/icons/pocket-knife.svg +0 -1
  273. data/assets/icons/popcorn.svg +0 -1
  274. data/assets/icons/popsicle.svg +0 -1
  275. data/assets/icons/presentation.svg +0 -1
  276. data/assets/icons/projector.svg +0 -1
  277. data/assets/icons/rabbit.svg +0 -1
  278. data/assets/icons/radar.svg +0 -1
  279. data/assets/icons/radiation.svg +0 -1
  280. data/assets/icons/radio-tower.svg +0 -1
  281. data/assets/icons/rail-symbol.svg +0 -1
  282. data/assets/icons/rainbow.svg +0 -1
  283. data/assets/icons/rat.svg +0 -1
  284. data/assets/icons/ratio.svg +0 -1
  285. data/assets/icons/receipt.svg +0 -1
  286. data/assets/icons/redo-dot.svg +0 -1
  287. data/assets/icons/refresh-ccw-dot.svg +0 -1
  288. data/assets/icons/refresh-cw-off.svg +0 -1
  289. data/assets/icons/repeat-2.svg +0 -1
  290. data/assets/icons/replace-all.svg +0 -1
  291. data/assets/icons/replace.svg +0 -1
  292. data/assets/icons/roller-coaster.svg +0 -1
  293. data/assets/icons/rows.svg +0 -1
  294. data/assets/icons/satellite-dish.svg +0 -1
  295. data/assets/icons/satellite.svg +0 -1
  296. data/assets/icons/save-all.svg +0 -1
  297. data/assets/icons/scatter-chart.svg +0 -1
  298. data/assets/icons/school-2.svg +0 -1
  299. data/assets/icons/school.svg +0 -1
  300. data/assets/icons/scissors-line-dashed.svg +0 -1
  301. data/assets/icons/scissors-square-dashed-bottom.svg +0 -1
  302. data/assets/icons/scissors-square.svg +0 -1
  303. data/assets/icons/scroll-text.svg +0 -1
  304. data/assets/icons/search-check.svg +0 -1
  305. data/assets/icons/search-code.svg +0 -1
  306. data/assets/icons/search-slash.svg +0 -1
  307. data/assets/icons/search-x.svg +0 -1
  308. data/assets/icons/send-horizontal.svg +0 -1
  309. data/assets/icons/send-to-back.svg +0 -1
  310. data/assets/icons/shapes.svg +0 -1
  311. data/assets/icons/shell.svg +0 -1
  312. data/assets/icons/shield-ban.svg +0 -1
  313. data/assets/icons/shield-ellipsis.svg +0 -1
  314. data/assets/icons/shield-half.svg +0 -1
  315. data/assets/icons/shield-minus.svg +0 -1
  316. data/assets/icons/shield-plus.svg +0 -1
  317. data/assets/icons/shield-question.svg +0 -1
  318. data/assets/icons/shield-x.svg +0 -1
  319. data/assets/icons/ship-wheel.svg +0 -1
  320. data/assets/icons/shopping-basket.svg +0 -1
  321. data/assets/icons/sigma-square.svg +0 -1
  322. data/assets/icons/snail.svg +0 -1
  323. data/assets/icons/space.svg +0 -1
  324. data/assets/icons/spade.svg +0 -1
  325. data/assets/icons/sparkle.svg +0 -1
  326. data/assets/icons/sparkles.svg +0 -1
  327. data/assets/icons/speech.svg +0 -1
  328. data/assets/icons/spell-check-2.svg +0 -1
  329. data/assets/icons/spell-check.svg +0 -1
  330. data/assets/icons/split.svg +0 -1
  331. data/assets/icons/spray-can.svg +0 -1
  332. data/assets/icons/square-asterisk.svg +0 -1
  333. data/assets/icons/square-code.svg +0 -1
  334. data/assets/icons/square-dashed-bottom-code.svg +0 -1
  335. data/assets/icons/square-dashed-bottom.svg +0 -1
  336. data/assets/icons/square-dot.svg +0 -1
  337. data/assets/icons/square-equal.svg +0 -1
  338. data/assets/icons/square-slash.svg +0 -1
  339. data/assets/icons/square-stack.svg +0 -1
  340. data/assets/icons/squirrel.svg +0 -1
  341. data/assets/icons/step-back.svg +0 -1
  342. data/assets/icons/step-forward.svg +0 -1
  343. data/assets/icons/store.svg +0 -1
  344. data/assets/icons/table-properties.svg +0 -1
  345. data/assets/icons/tablet-smartphone.svg +0 -1
  346. data/assets/icons/tally-1.svg +0 -1
  347. data/assets/icons/tally-2.svg +0 -1
  348. data/assets/icons/tally-3.svg +0 -1
  349. data/assets/icons/tally-4.svg +0 -1
  350. data/assets/icons/tally-5.svg +0 -1
  351. data/assets/icons/test-tube-2.svg +0 -1
  352. data/assets/icons/test-tube.svg +0 -1
  353. data/assets/icons/test-tubes.svg +0 -1
  354. data/assets/icons/text-quote.svg +0 -1
  355. data/assets/icons/text-select.svg +0 -1
  356. data/assets/icons/text.svg +0 -1
  357. data/assets/icons/theater.svg +0 -1
  358. data/assets/icons/touchpad-off.svg +0 -1
  359. data/assets/icons/touchpad.svg +0 -1
  360. data/assets/icons/tractor.svg +0 -1
  361. data/assets/icons/traffic-cone.svg +0 -1
  362. data/assets/icons/train-front-tunnel.svg +0 -1
  363. data/assets/icons/train-front.svg +0 -1
  364. data/assets/icons/train-track.svg +0 -1
  365. data/assets/icons/tram-front.svg +0 -1
  366. data/assets/icons/triangle-right.svg +0 -1
  367. data/assets/icons/turtle.svg +0 -1
  368. data/assets/icons/undo-dot.svg +0 -1
  369. data/assets/icons/unfold-horizontal.svg +0 -1
  370. data/assets/icons/unfold-vertical.svg +0 -1
  371. data/assets/icons/ungroup.svg +0 -1
  372. data/assets/icons/unplug.svg +0 -1
  373. data/assets/icons/user-2.svg +0 -1
  374. data/assets/icons/user-check-2.svg +0 -1
  375. data/assets/icons/user-circle-2.svg +0 -1
  376. data/assets/icons/user-circle.svg +0 -1
  377. data/assets/icons/user-cog-2.svg +0 -1
  378. data/assets/icons/user-minus-2.svg +0 -1
  379. data/assets/icons/user-plus-2.svg +0 -1
  380. data/assets/icons/user-square-2.svg +0 -1
  381. data/assets/icons/user-square.svg +0 -1
  382. data/assets/icons/user-x-2.svg +0 -1
  383. data/assets/icons/users-2.svg +0 -1
  384. data/assets/icons/variable.svg +0 -1
  385. data/assets/icons/videotape.svg +0 -1
  386. data/assets/icons/wallet-2.svg +0 -1
  387. data/assets/icons/wallet-cards.svg +0 -1
  388. data/assets/icons/wallpaper.svg +0 -1
  389. data/assets/icons/warehouse.svg +0 -1
  390. data/assets/icons/whole-word.svg +0 -1
  391. data/assets/icons/workflow.svg +0 -1
@@ -1,124 +1,4 @@
1
1
  (() => {
2
-
3
- var $parcel$global = globalThis;
4
-
5
- var $parcel$modules = {};
6
- var $parcel$inits = {};
7
-
8
- var parcelRequire = $parcel$global["parcelRequirea49c"];
9
-
10
- if (parcelRequire == null) {
11
- parcelRequire = function(id) {
12
- if (id in $parcel$modules) {
13
- return $parcel$modules[id].exports;
14
- }
15
- if (id in $parcel$inits) {
16
- var init = $parcel$inits[id];
17
- delete $parcel$inits[id];
18
- var module = {id: id, exports: {}};
19
- $parcel$modules[id] = module;
20
- init.call(module.exports, module, module.exports);
21
- return module.exports;
22
- }
23
- var err = new Error("Cannot find module '" + id + "'");
24
- err.code = 'MODULE_NOT_FOUND';
25
- throw err;
26
- };
27
-
28
- parcelRequire.register = function register(id, init) {
29
- $parcel$inits[id] = init;
30
- };
31
-
32
- $parcel$global["parcelRequirea49c"] = parcelRequire;
33
- }
34
-
35
- var parcelRegister = parcelRequire.register;
36
- parcelRegister("6RQZy", function(module, exports) {
37
- window.Lookbook = window.Lookbook || {};
38
- window.Lookbook.initEmbeds = $5000cc5d1e9e824a$var$initEmbeds;
39
- const $5000cc5d1e9e824a$var$embedUrlPrefix = "embed";
40
- const $5000cc5d1e9e824a$var$whiteListedAttributes = [
41
- "preview",
42
- "scenario",
43
- "panels",
44
- "actions",
45
- "param-*"
46
- ];
47
- function $5000cc5d1e9e824a$var$initEmbeds(root = document) {
48
- if (typeof window.iFrameResize !== "function") {
49
- console.error("Lookbook embeds require the 'iframe-resizer' library to be available. Skipping embed instantiation.");
50
- return;
51
- }
52
- if (typeof root === "string") root = document.querySelector(root);
53
- if (!root) return console.error("Could not initialize Lookbook embeds. Root node not found.");
54
- const embeds = Array.from(root.querySelectorAll("lookbook-embed"));
55
- embeds.forEach((embed)=>{
56
- const attrs = Array.from(embed.attributes);
57
- const wrapper = $5000cc5d1e9e824a$var$createWrapper();
58
- const iframe = $5000cc5d1e9e824a$var$createIframe(attrs);
59
- wrapper.appendChild(iframe);
60
- embed.replaceWith(wrapper);
61
- });
62
- window.iFrameResize({
63
- checkOrigin: false
64
- }, "[data-lookbook-embed-iframe]");
65
- }
66
- function $5000cc5d1e9e824a$var$createWrapper() {
67
- const wrapper = document.createElement("div");
68
- wrapper.setAttribute("data-lookbook-embed", "");
69
- wrapper.classList.add("lookbook-embed");
70
- return wrapper;
71
- }
72
- function $5000cc5d1e9e824a$var$createIframe(attrs) {
73
- const src = $5000cc5d1e9e824a$var$buildSrc(attrs);
74
- const id = $5000cc5d1e9e824a$var$attrValue(attrs, "id");
75
- const styles = $5000cc5d1e9e824a$var$attrValue(attrs, "style");
76
- const classes = $5000cc5d1e9e824a$var$attrValue(attrs, "class", "").split(" ").map((c)=>c.trim()).filter((c)=>c.length);
77
- const iframe = document.createElement("iframe");
78
- iframe.src = src;
79
- if (id) iframe.id = id;
80
- iframe.setAttribute("frameborder", 0);
81
- iframe.setAttribute("data-lookbook-embed-iframe", "");
82
- if (classes.length) iframe.classList.add(...classes);
83
- if (styles) iframe.style.cssText = styles;
84
- iframe.style.width = "100%";
85
- iframe.style.transition = "height 0.3s";
86
- return iframe;
87
- }
88
- function $5000cc5d1e9e824a$var$buildSrc(attrs) {
89
- const appPath = $5000cc5d1e9e824a$var$attrValue(attrs, "app") || $5000cc5d1e9e824a$var$guessBasePath();
90
- const props = {};
91
- $5000cc5d1e9e824a$var$permittedAttrs(attrs).forEach(({ name: name, value: value })=>{
92
- name = name.replace("-", "_").toLowerCase();
93
- props[name] = value;
94
- });
95
- return encodeURI([
96
- appPath,
97
- $5000cc5d1e9e824a$var$embedUrlPrefix
98
- ].join("/") + `?props=${JSON.stringify(props)}`);
99
- }
100
- function $5000cc5d1e9e824a$var$attrValue(attrs, name, fallback = null) {
101
- const attr = attrs.find((attr)=>attr.name === name);
102
- return attr ? attr.value : fallback;
103
- }
104
- function $5000cc5d1e9e824a$var$permittedAttrs(attrs) {
105
- return attrs.filter((attr)=>{
106
- return $5000cc5d1e9e824a$var$whiteListedAttributes.find((key)=>{
107
- const name = attr.name;
108
- return key === name || key.includes("*") && name.startsWith(key.replace("*", ""));
109
- });
110
- });
111
- }
112
- function $5000cc5d1e9e824a$var$guessBasePath() {
113
- const script = document.currentScript || document.querySelector('script[src*="lookbook.js"]');
114
- const scriptSrc = script.src;
115
- if (scriptSrc && scriptSrc.includes("lookbook-assets")) return scriptSrc.split("?")[0].replace("lookbook-assets/js/lookbook.js", "lookbook");
116
- return `//${location.host}/lookbook`;
117
- }
118
- document.addEventListener("DOMContentLoaded", ()=>$5000cc5d1e9e824a$var$initEmbeds());
119
-
120
- });
121
-
122
2
  var $5180433265c858be$exports = {};
123
3
  /*
124
4
  * File: iframeResizer.js
@@ -130,8 +10,8 @@ var $5180433265c858be$exports = {};
130
10
  * Contributor: Reed Dadoune - reed@dadoune.com
131
11
  */ // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
132
12
  (function(undefined) {
133
- if (typeof window === "undefined") return; // don't run for server side render
134
- var count = 0, logEnabled = false, hiddenCheckEnabled = false, msgHeader = "message", msgHeaderLen = msgHeader.length, msgId = "[iFrameSizer]", msgIdLen = msgId.length, pagePosition = null, requestAnimationFrame = window.requestAnimationFrame, resetRequiredMethods = Object.freeze({
13
+ if (typeof window === 'undefined') return; // don't run for server side render
14
+ var count = 0, logEnabled = false, hiddenCheckEnabled = false, msgHeader = 'message', msgHeaderLen = msgHeader.length, msgId = '[iFrameSizer]', msgIdLen = msgId.length, pagePosition = null, requestAnimationFrame = window.requestAnimationFrame, resetRequiredMethods = Object.freeze({
135
15
  max: 1,
136
16
  scroll: 1,
137
17
  bodyScroll: 1,
@@ -145,8 +25,8 @@ var $5180433265c858be$exports = {};
145
25
  checkOrigin: true,
146
26
  inPageLinks: false,
147
27
  enablePublicMethods: true,
148
- heightCalculationMethod: "bodyOffset",
149
- id: "iFrameResizer",
28
+ heightCalculationMethod: 'bodyOffset',
29
+ id: 'iFrameResizer',
150
30
  interval: 32,
151
31
  log: false,
152
32
  maxHeight: Infinity,
@@ -154,20 +34,20 @@ var $5180433265c858be$exports = {};
154
34
  minHeight: 0,
155
35
  minWidth: 0,
156
36
  mouseEvents: true,
157
- resizeFrom: "parent",
37
+ resizeFrom: 'parent',
158
38
  scrolling: false,
159
39
  sizeHeight: true,
160
40
  sizeWidth: false,
161
41
  warningTimeout: 5000,
162
42
  tolerance: 0,
163
- widthCalculationMethod: "scroll",
43
+ widthCalculationMethod: 'scroll',
164
44
  onClose: function() {
165
45
  return true;
166
46
  },
167
47
  onClosed: function() {},
168
48
  onInit: function() {},
169
49
  onMessage: function() {
170
- warn("onMessage function not defined");
50
+ warn('onMessage function not defined');
171
51
  },
172
52
  onMouseEnter: function() {},
173
53
  onMouseLeave: function() {},
@@ -187,42 +67,42 @@ var $5180433265c858be$exports = {};
187
67
  }
188
68
  function setupRequestAnimationFrame() {
189
69
  var vendors = [
190
- "moz",
191
- "webkit",
192
- "o",
193
- "ms"
70
+ 'moz',
71
+ 'webkit',
72
+ 'o',
73
+ 'ms'
194
74
  ];
195
75
  var x;
196
76
  // Remove vendor prefixing if prefixed and break early if not
197
- for(x = 0; x < vendors.length && !requestAnimationFrame; x += 1)requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"];
77
+ for(x = 0; x < vendors.length && !requestAnimationFrame; x += 1)requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
198
78
  if (requestAnimationFrame) // Firefox extension content-scripts have a globalThis object that is not the same as window.
199
79
  // Binding `requestAnimationFrame` to window allows the function to work and prevents errors
200
80
  // being thrown when run in that context, and should be a no-op in every other context.
201
81
  requestAnimationFrame = requestAnimationFrame.bind(window);
202
- else log("setup", "RequestAnimationFrame not supported");
82
+ else log('setup', 'RequestAnimationFrame not supported');
203
83
  }
204
84
  function getMyID(iframeId) {
205
- var retStr = "Host page: " + iframeId;
206
- if (window.top !== window.self) retStr = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + iframeId : "Nested host page: " + iframeId;
85
+ var retStr = 'Host page: ' + iframeId;
86
+ if (window.top !== window.self) retStr = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ': ' + iframeId : 'Nested host page: ' + iframeId;
207
87
  return retStr;
208
88
  }
209
89
  function formatLogHeader(iframeId) {
210
- return msgId + "[" + getMyID(iframeId) + "]";
90
+ return msgId + '[' + getMyID(iframeId) + ']';
211
91
  }
212
92
  function isLogEnabled(iframeId) {
213
93
  return settings[iframeId] ? settings[iframeId].log : logEnabled;
214
94
  }
215
95
  function log(iframeId, msg) {
216
- output("log", iframeId, msg, isLogEnabled(iframeId));
96
+ output('log', iframeId, msg, isLogEnabled(iframeId));
217
97
  }
218
98
  function info(iframeId, msg) {
219
- output("info", iframeId, msg, isLogEnabled(iframeId));
99
+ output('info', iframeId, msg, isLogEnabled(iframeId));
220
100
  }
221
101
  function warn(iframeId, msg) {
222
- output("warn", iframeId, msg, true);
102
+ output('warn', iframeId, msg, true);
223
103
  }
224
104
  function output(type, iframeId, msg, enabled) {
225
- if (true === enabled && "object" === typeof window.console) // eslint-disable-next-line no-console
105
+ if (true === enabled && 'object' === typeof window.console) // eslint-disable-next-line no-console
226
106
  console[type](formatLogHeader(iframeId), msg);
227
107
  }
228
108
  function iFrameListener(event) {
@@ -230,14 +110,14 @@ var $5180433265c858be$exports = {};
230
110
  function resize() {
231
111
  setSize(messageData);
232
112
  setPagePosition(iframeId);
233
- on("onResized", messageData);
113
+ on('onResized', messageData);
234
114
  }
235
- ensureInRange("Height");
236
- ensureInRange("Width");
237
- syncResize(resize, messageData, "init");
115
+ ensureInRange('Height');
116
+ ensureInRange('Width');
117
+ syncResize(resize, messageData, 'init');
238
118
  }
239
119
  function processMsg() {
240
- var data = msg.slice(msgIdLen).split(":");
120
+ var data = msg.slice(msgIdLen).split(':');
241
121
  var height = data[1] ? parseInt(data[1], 10) : 0;
242
122
  var iframe = settings[data[0]] && settings[data[0]].iframe;
243
123
  var compStyle = getComputedStyle(iframe);
@@ -250,35 +130,35 @@ var $5180433265c858be$exports = {};
250
130
  };
251
131
  }
252
132
  function getPaddingEnds(compStyle) {
253
- if (compStyle.boxSizing !== "border-box") return 0;
133
+ if (compStyle.boxSizing !== 'border-box') return 0;
254
134
  var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0;
255
135
  var bot = compStyle.paddingBottom ? parseInt(compStyle.paddingBottom, 10) : 0;
256
136
  return top + bot;
257
137
  }
258
138
  function getBorderEnds(compStyle) {
259
- if (compStyle.boxSizing !== "border-box") return 0;
139
+ if (compStyle.boxSizing !== 'border-box') return 0;
260
140
  var top = compStyle.borderTopWidth ? parseInt(compStyle.borderTopWidth, 10) : 0;
261
141
  var bot = compStyle.borderBottomWidth ? parseInt(compStyle.borderBottomWidth, 10) : 0;
262
142
  return top + bot;
263
143
  }
264
144
  function ensureInRange(Dimension) {
265
- var max = Number(settings[iframeId]["max" + Dimension]), min = Number(settings[iframeId]["min" + Dimension]), dimension = Dimension.toLowerCase(), size = Number(messageData[dimension]);
266
- log(iframeId, "Checking " + dimension + " is in range " + min + "-" + max);
145
+ var max = Number(settings[iframeId]['max' + Dimension]), min = Number(settings[iframeId]['min' + Dimension]), dimension = Dimension.toLowerCase(), size = Number(messageData[dimension]);
146
+ log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max);
267
147
  if (size < min) {
268
148
  size = min;
269
- log(iframeId, "Set " + dimension + " to min value");
149
+ log(iframeId, 'Set ' + dimension + ' to min value');
270
150
  }
271
151
  if (size > max) {
272
152
  size = max;
273
- log(iframeId, "Set " + dimension + " to max value");
153
+ log(iframeId, 'Set ' + dimension + ' to max value');
274
154
  }
275
- messageData[dimension] = "" + size;
155
+ messageData[dimension] = '' + size;
276
156
  }
277
157
  function isMessageFromIFrame() {
278
158
  function checkAllowedOrigin() {
279
159
  function checkList() {
280
160
  var i = 0, retCode = false;
281
- log(iframeId, "Checking connection is from allowed list of origins: " + checkOrigin);
161
+ log(iframeId, 'Checking connection is from allowed list of origins: ' + checkOrigin);
282
162
  for(; i < checkOrigin.length; i++)if (checkOrigin[i] === origin) {
283
163
  retCode = true;
284
164
  break;
@@ -287,17 +167,17 @@ var $5180433265c858be$exports = {};
287
167
  }
288
168
  function checkSingle() {
289
169
  var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
290
- log(iframeId, "Checking connection is from: " + remoteHost);
170
+ log(iframeId, 'Checking connection is from: ' + remoteHost);
291
171
  return origin === remoteHost;
292
172
  }
293
173
  return checkOrigin.constructor === Array ? checkList() : checkSingle();
294
174
  }
295
175
  var origin = event.origin, checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
296
- if (checkOrigin && "" + origin !== "null" && !checkAllowedOrigin()) throw new Error("Unexpected message received from: " + origin + " for " + messageData.iframe.id + ". Message was: " + event.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");
176
+ if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) throw new Error('Unexpected message received from: ' + origin + ' for ' + messageData.iframe.id + '. Message was: ' + event.data + '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.');
297
177
  return true;
298
178
  }
299
179
  function isMessageForUs() {
300
- return msgId === ("" + msg).slice(0, msgIdLen) && msg.slice(msgIdLen).split(":")[0] in settings // ''+Protects against non-string msg
180
+ return msgId === ('' + msg).slice(0, msgIdLen) && msg.slice(msgIdLen).split(':')[0] in settings // ''+Protects against non-string msg
301
181
  ;
302
182
  }
303
183
  function isMessageFromMetaParent() {
@@ -308,19 +188,19 @@ var $5180433265c858be$exports = {};
308
188
  false: 1,
309
189
  undefined: 1
310
190
  };
311
- if (retCode) log(iframeId, "Ignoring init message from meta parent page");
191
+ if (retCode) log(iframeId, 'Ignoring init message from meta parent page');
312
192
  return retCode;
313
193
  }
314
194
  function getMsgBody(offset) {
315
- return msg.slice(msg.indexOf(":") + msgHeaderLen + offset);
195
+ return msg.slice(msg.indexOf(':') + msgHeaderLen + offset);
316
196
  }
317
197
  function forwardMsgFromIFrame(msgBody) {
318
- log(iframeId, "onMessage passed: {iframe: " + messageData.iframe.id + ", message: " + msgBody + "}");
319
- on("onMessage", {
198
+ log(iframeId, 'onMessage passed: {iframe: ' + messageData.iframe.id + ', message: ' + msgBody + '}');
199
+ on('onMessage', {
320
200
  iframe: messageData.iframe,
321
201
  message: JSON.parse(msgBody)
322
202
  });
323
- log(iframeId, "--");
203
+ log(iframeId, '--');
324
204
  }
325
205
  function getPageInfo() {
326
206
  var bodyPosition = document.body.getBoundingClientRect(), iFramePosition = messageData.iframe.getBoundingClientRect();
@@ -341,7 +221,7 @@ var $5180433265c858be$exports = {};
341
221
  }
342
222
  function sendPageInfoToIframe(iframe, iframeId) {
343
223
  function debouncedTrigger() {
344
- trigger("Send Page Info", "pageInfo:" + getPageInfo(), iframe, iframeId);
224
+ trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId);
345
225
  }
346
226
  debounceFrameEvents(debouncedTrigger, 32, iframeId);
347
227
  }
@@ -352,18 +232,18 @@ var $5180433265c858be$exports = {};
352
232
  else stop();
353
233
  }
354
234
  [
355
- "scroll",
356
- "resize"
235
+ 'scroll',
236
+ 'resize'
357
237
  ].forEach(function(evt) {
358
- log(id, type + evt + " listener for sendPageInfo");
238
+ log(id, type + evt + ' listener for sendPageInfo');
359
239
  func(window, evt, sendPageInfo);
360
240
  });
361
241
  }
362
242
  function stop() {
363
- setListener("Remove ", removeEventListener);
243
+ setListener('Remove ', removeEventListener);
364
244
  }
365
245
  function start() {
366
- setListener("Add ", addEventListener);
246
+ setListener('Add ', addEventListener);
367
247
  }
368
248
  var id = iframeId // Create locally scoped copy of iFrame ID
369
249
  ;
@@ -379,7 +259,7 @@ var $5180433265c858be$exports = {};
379
259
  function checkIFrameExists() {
380
260
  var retBool = true;
381
261
  if (null === messageData.iframe) {
382
- warn(iframeId, "IFrame (" + messageData.id + ") not found");
262
+ warn(iframeId, 'IFrame (' + messageData.id + ') not found');
383
263
  retBool = false;
384
264
  }
385
265
  return retBool;
@@ -397,7 +277,7 @@ var $5180433265c858be$exports = {};
397
277
  function reposition() {
398
278
  pagePosition = newPosition;
399
279
  scrollTo();
400
- log(iframeId, "--");
280
+ log(iframeId, '--');
401
281
  }
402
282
  function calcOffset() {
403
283
  return {
@@ -406,45 +286,45 @@ var $5180433265c858be$exports = {};
406
286
  };
407
287
  }
408
288
  function scrollParent() {
409
- if (window.parentIFrame) window.parentIFrame["scrollTo" + (addOffset ? "Offset" : "")](newPosition.x, newPosition.y);
410
- else warn(iframeId, "Unable to scroll to requested position, window.parentIFrame not found");
289
+ if (window.parentIFrame) window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](newPosition.x, newPosition.y);
290
+ else warn(iframeId, 'Unable to scroll to requested position, window.parentIFrame not found');
411
291
  }
412
292
  var offset = addOffset ? getElementPosition(messageData.iframe) : {
413
293
  x: 0,
414
294
  y: 0
415
295
  }, newPosition = calcOffset();
416
- log(iframeId, "Reposition requested from iFrame (offset x:" + offset.x + " y:" + offset.y + ")");
296
+ log(iframeId, 'Reposition requested from iFrame (offset x:' + offset.x + ' y:' + offset.y + ')');
417
297
  if (window.top === window.self) reposition();
418
298
  else scrollParent();
419
299
  }
420
300
  function scrollTo() {
421
- if (false === on("onScroll", pagePosition)) unsetPagePosition();
301
+ if (false === on('onScroll', pagePosition)) unsetPagePosition();
422
302
  else setPagePosition(iframeId);
423
303
  }
424
304
  function findTarget(location) {
425
305
  function jumpToTarget() {
426
306
  var jumpPosition = getElementPosition(target);
427
- log(iframeId, "Moving to in page link (#" + hash + ") at x: " + jumpPosition.x + " y: " + jumpPosition.y);
307
+ log(iframeId, 'Moving to in page link (#' + hash + ') at x: ' + jumpPosition.x + ' y: ' + jumpPosition.y);
428
308
  pagePosition = {
429
309
  x: jumpPosition.x,
430
310
  y: jumpPosition.y
431
311
  };
432
312
  scrollTo();
433
- log(iframeId, "--");
313
+ log(iframeId, '--');
434
314
  }
435
315
  function jumpToParent() {
436
316
  if (window.parentIFrame) window.parentIFrame.moveToAnchor(hash);
437
- else log(iframeId, "In page link #" + hash + " not found and window.parentIFrame not found");
317
+ else log(iframeId, 'In page link #' + hash + ' not found and window.parentIFrame not found');
438
318
  }
439
- var hash = location.split("#")[1] || "", hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
319
+ var hash = location.split('#')[1] || '', hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
440
320
  if (target) jumpToTarget();
441
- else if (window.top === window.self) log(iframeId, "In page link #" + hash + " not found");
321
+ else if (window.top === window.self) log(iframeId, 'In page link #' + hash + ' not found');
442
322
  else jumpToParent();
443
323
  }
444
324
  function onMouse(event) {
445
325
  var mousePos = {};
446
326
  if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {
447
- var data = getMsgBody(9).split(":");
327
+ var data = getMsgBody(9).split(':');
448
328
  mousePos = {
449
329
  x: data[1],
450
330
  y: data[0]
@@ -466,46 +346,46 @@ var $5180433265c858be$exports = {};
466
346
  function actionMsg() {
467
347
  if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
468
348
  switch(messageData.type){
469
- case "close":
349
+ case 'close':
470
350
  closeIFrame(messageData.iframe);
471
351
  break;
472
- case "message":
352
+ case 'message':
473
353
  forwardMsgFromIFrame(getMsgBody(6));
474
354
  break;
475
- case "mouseenter":
476
- onMouse("onMouseEnter");
355
+ case 'mouseenter':
356
+ onMouse('onMouseEnter');
477
357
  break;
478
- case "mouseleave":
479
- onMouse("onMouseLeave");
358
+ case 'mouseleave':
359
+ onMouse('onMouseLeave');
480
360
  break;
481
- case "autoResize":
361
+ case 'autoResize':
482
362
  settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
483
363
  break;
484
- case "scrollTo":
364
+ case 'scrollTo':
485
365
  scrollRequestFromChild(false);
486
366
  break;
487
- case "scrollToOffset":
367
+ case 'scrollToOffset':
488
368
  scrollRequestFromChild(true);
489
369
  break;
490
- case "pageInfo":
370
+ case 'pageInfo':
491
371
  sendPageInfoToIframe(settings[iframeId] && settings[iframeId].iframe, iframeId);
492
372
  startPageInfoMonitor();
493
373
  break;
494
- case "pageInfoStop":
374
+ case 'pageInfoStop':
495
375
  stopPageInfoMonitor();
496
376
  break;
497
- case "inPageLink":
377
+ case 'inPageLink':
498
378
  findTarget(getMsgBody(9));
499
379
  break;
500
- case "reset":
380
+ case 'reset':
501
381
  resetIFrame(messageData);
502
382
  break;
503
- case "init":
383
+ case 'init':
504
384
  resizeIFrame();
505
- on("onInit", messageData.iframe);
385
+ on('onInit', messageData.iframe);
506
386
  break;
507
387
  default:
508
- if (Number(messageData.width) === 0 && Number(messageData.height) === 0) warn("Unsupported message received (" + messageData.type + "), this is likely due to the iframe containing a later " + "version of iframe-resizer than the parent page");
388
+ if (Number(messageData.width) === 0 && Number(messageData.height) === 0) warn('Unsupported message received (' + messageData.type + '), this is likely due to the iframe containing a later ' + 'version of iframe-resizer than the parent page');
509
389
  else resizeIFrame();
510
390
  }
511
391
  }
@@ -513,35 +393,35 @@ var $5180433265c858be$exports = {};
513
393
  var retBool = true;
514
394
  if (!settings[iframeId]) {
515
395
  retBool = false;
516
- warn(messageData.type + " No settings for " + iframeId + ". Message was: " + msg);
396
+ warn(messageData.type + ' No settings for ' + iframeId + '. Message was: ' + msg);
517
397
  }
518
398
  return retBool;
519
399
  }
520
400
  function iFrameReadyMsgReceived() {
521
401
  // eslint-disable-next-line no-restricted-syntax, guard-for-in
522
- for(var iframeId in settings)trigger("iFrame requested init", createOutgoingMsg(iframeId), settings[iframeId].iframe, iframeId);
402
+ for(var iframeId in settings)trigger('iFrame requested init', createOutgoingMsg(iframeId), settings[iframeId].iframe, iframeId);
523
403
  }
524
404
  function firstRun() {
525
405
  if (settings[iframeId]) settings[iframeId].firstRun = false;
526
406
  }
527
407
  var msg = event.data, messageData = {}, iframeId = null;
528
- if ("[iFrameResizerChild]Ready" === msg) iFrameReadyMsgReceived();
408
+ if ('[iFrameResizerChild]Ready' === msg) iFrameReadyMsgReceived();
529
409
  else if (isMessageForUs()) {
530
410
  messageData = processMsg();
531
411
  iframeId = messageData.id;
532
412
  if (settings[iframeId]) settings[iframeId].loaded = true;
533
413
  if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
534
- log(iframeId, "Received: " + msg);
414
+ log(iframeId, 'Received: ' + msg);
535
415
  if (checkIFrameExists() && isMessageFromIFrame()) actionMsg();
536
416
  }
537
- } else info(iframeId, "Ignored: " + msg);
417
+ } else info(iframeId, 'Ignored: ' + msg);
538
418
  }
539
419
  function chkEvent(iframeId, funcName, val) {
540
420
  var func = null, retVal = null;
541
421
  if (settings[iframeId]) {
542
422
  func = settings[iframeId][funcName];
543
- if ("function" === typeof func) retVal = func(val);
544
- else throw new TypeError(funcName + " on iFrame[" + iframeId + "] is not a function");
423
+ if ('function' === typeof func) retVal = func(val);
424
+ else throw new TypeError(funcName + ' on iFrame[' + iframeId + '] is not a function');
545
425
  }
546
426
  return retVal;
547
427
  }
@@ -551,19 +431,19 @@ var $5180433265c858be$exports = {};
551
431
  }
552
432
  function closeIFrame(iframe) {
553
433
  var iframeId = iframe.id;
554
- if (chkEvent(iframeId, "onClose", iframeId) === false) {
555
- log(iframeId, "Close iframe cancelled by onClose event");
434
+ if (chkEvent(iframeId, 'onClose', iframeId) === false) {
435
+ log(iframeId, 'Close iframe cancelled by onClose event');
556
436
  return;
557
437
  }
558
- log(iframeId, "Removing iFrame: " + iframeId);
438
+ log(iframeId, 'Removing iFrame: ' + iframeId);
559
439
  try {
560
440
  // Catch race condition error with React
561
441
  if (iframe.parentNode) iframe.parentNode.removeChild(iframe);
562
442
  } catch (error) {
563
443
  warn(error);
564
444
  }
565
- chkEvent(iframeId, "onClosed", iframeId);
566
- log(iframeId, "--");
445
+ chkEvent(iframeId, 'onClosed', iframeId);
446
+ log(iframeId, '--');
567
447
  removeIframeListeners(iframe);
568
448
  }
569
449
  function getPagePosition(iframeId) {
@@ -572,13 +452,13 @@ var $5180433265c858be$exports = {};
572
452
  x: window.pageXOffset === undefined ? document.documentElement.scrollLeft : window.pageXOffset,
573
453
  y: window.pageYOffset === undefined ? document.documentElement.scrollTop : window.pageYOffset
574
454
  };
575
- log(iframeId, "Get page position: " + pagePosition.x + "," + pagePosition.y);
455
+ log(iframeId, 'Get page position: ' + pagePosition.x + ',' + pagePosition.y);
576
456
  }
577
457
  }
578
458
  function setPagePosition(iframeId) {
579
459
  if (null !== pagePosition) {
580
460
  window.scrollTo(pagePosition.x, pagePosition.y);
581
- log(iframeId, "Set page position: " + pagePosition.x + "," + pagePosition.y);
461
+ log(iframeId, 'Set page position: ' + pagePosition.x + ',' + pagePosition.y);
582
462
  unsetPagePosition();
583
463
  }
584
464
  }
@@ -588,29 +468,29 @@ var $5180433265c858be$exports = {};
588
468
  function resetIFrame(messageData) {
589
469
  function reset() {
590
470
  setSize(messageData);
591
- trigger("reset", "reset", messageData.iframe, messageData.id);
471
+ trigger('reset', 'reset', messageData.iframe, messageData.id);
592
472
  }
593
- log(messageData.id, "Size reset requested by " + ("init" === messageData.type ? "host page" : "iFrame"));
473
+ log(messageData.id, 'Size reset requested by ' + ('init' === messageData.type ? 'host page' : 'iFrame'));
594
474
  getPagePosition(messageData.id);
595
- syncResize(reset, messageData, "reset");
475
+ syncResize(reset, messageData, 'reset');
596
476
  }
597
477
  function setSize(messageData) {
598
478
  function setDimension(dimension) {
599
479
  if (!messageData.id) {
600
- log("undefined", "messageData id not set");
480
+ log('undefined', 'messageData id not set');
601
481
  return;
602
482
  }
603
- messageData.iframe.style[dimension] = messageData[dimension] + "px";
604
- log(messageData.id, "IFrame (" + iframeId + ") " + dimension + " set to " + messageData[dimension] + "px");
483
+ messageData.iframe.style[dimension] = messageData[dimension] + 'px';
484
+ log(messageData.id, 'IFrame (' + iframeId + ') ' + dimension + ' set to ' + messageData[dimension] + 'px');
605
485
  }
606
486
  function chkZero(dimension) {
607
487
  // FireFox sets dimension of hidden iFrames to zero.
608
488
  // So if we detect that set up an event to check for
609
489
  // when iFrame becomes visible.
610
490
  /* istanbul ignore next */ // Not testable in PhantomJS
611
- if (!hiddenCheckEnabled && "0" === messageData[dimension]) {
491
+ if (!hiddenCheckEnabled && '0' === messageData[dimension]) {
612
492
  hiddenCheckEnabled = true;
613
- log(iframeId, "Hidden iFrame detected, creating visibility listener");
493
+ log(iframeId, 'Hidden iFrame detected, creating visibility listener');
614
494
  fixHiddenIFrames();
615
495
  }
616
496
  }
@@ -620,29 +500,29 @@ var $5180433265c858be$exports = {};
620
500
  }
621
501
  var iframeId = messageData.iframe.id;
622
502
  if (settings[iframeId]) {
623
- if (settings[iframeId].sizeHeight) processDimension("height");
624
- if (settings[iframeId].sizeWidth) processDimension("width");
503
+ if (settings[iframeId].sizeHeight) processDimension('height');
504
+ if (settings[iframeId].sizeWidth) processDimension('width');
625
505
  }
626
506
  }
627
507
  function syncResize(func, messageData, doNotSync) {
628
508
  /* istanbul ignore if */ // Not testable in PhantomJS
629
509
  if (doNotSync !== messageData.type && requestAnimationFrame && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
630
510
  !window.jasmine) {
631
- log(messageData.id, "Requesting animation frame");
511
+ log(messageData.id, 'Requesting animation frame');
632
512
  requestAnimationFrame(func);
633
513
  } else func();
634
514
  }
635
515
  function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
636
516
  function postMessageToIFrame() {
637
517
  var target = settings[id] && settings[id].targetOrigin;
638
- log(id, "[" + calleeMsg + "] Sending msg to iframe[" + id + "] (" + msg + ") targetOrigin: " + target);
518
+ log(id, '[' + calleeMsg + '] Sending msg to iframe[' + id + '] (' + msg + ') targetOrigin: ' + target);
639
519
  iframe.contentWindow.postMessage(msgId + msg, target);
640
520
  }
641
521
  function iFrameNotFound() {
642
- warn(id, "[" + calleeMsg + "] IFrame(" + id + ") not found");
522
+ warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found');
643
523
  }
644
524
  function chkAndSend() {
645
- if (iframe && "contentWindow" in iframe && null !== iframe.contentWindow) // Null test for PhantomJS
525
+ if (iframe && 'contentWindow' in iframe && null !== iframe.contentWindow) // Null test for PhantomJS
646
526
  postMessageToIFrame();
647
527
  else iFrameNotFound();
648
528
  }
@@ -650,7 +530,7 @@ var $5180433265c858be$exports = {};
650
530
  function warning() {
651
531
  if (settings[id] && !settings[id].loaded && !errorShown) {
652
532
  errorShown = true;
653
- warn(id, "IFrame has not responded within " + settings[id].warningTimeout / 1000 + " seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.");
533
+ warn(id, 'IFrame has not responded within ' + settings[id].warningTimeout / 1000 + ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.');
654
534
  }
655
535
  }
656
536
  if (!!noResponseWarning && settings[id] && !!settings[id].warningTimeout) settings[id].msgTimeout = setTimeout(warning, settings[id].warningTimeout);
@@ -663,29 +543,29 @@ var $5180433265c858be$exports = {};
663
543
  }
664
544
  }
665
545
  function createOutgoingMsg(iframeId) {
666
- return iframeId + ":" + settings[iframeId].bodyMarginV1 + ":" + settings[iframeId].sizeWidth + ":" + settings[iframeId].log + ":" + settings[iframeId].interval + ":" + settings[iframeId].enablePublicMethods + ":" + settings[iframeId].autoResize + ":" + settings[iframeId].bodyMargin + ":" + settings[iframeId].heightCalculationMethod + ":" + settings[iframeId].bodyBackground + ":" + settings[iframeId].bodyPadding + ":" + settings[iframeId].tolerance + ":" + settings[iframeId].inPageLinks + ":" + settings[iframeId].resizeFrom + ":" + settings[iframeId].widthCalculationMethod + ":" + settings[iframeId].mouseEvents;
546
+ return iframeId + ':' + settings[iframeId].bodyMarginV1 + ':' + settings[iframeId].sizeWidth + ':' + settings[iframeId].log + ':' + settings[iframeId].interval + ':' + settings[iframeId].enablePublicMethods + ':' + settings[iframeId].autoResize + ':' + settings[iframeId].bodyMargin + ':' + settings[iframeId].heightCalculationMethod + ':' + settings[iframeId].bodyBackground + ':' + settings[iframeId].bodyPadding + ':' + settings[iframeId].tolerance + ':' + settings[iframeId].inPageLinks + ':' + settings[iframeId].resizeFrom + ':' + settings[iframeId].widthCalculationMethod + ':' + settings[iframeId].mouseEvents;
667
547
  }
668
548
  function isNumber(value) {
669
- return typeof value === "number";
549
+ return typeof value === 'number';
670
550
  }
671
551
  function setupIFrame(iframe, options) {
672
552
  function setLimits() {
673
553
  function addStyle(style) {
674
554
  var styleValue = settings[iframeId][style];
675
555
  if (Infinity !== styleValue && 0 !== styleValue) {
676
- iframe.style[style] = isNumber(styleValue) ? styleValue + "px" : styleValue;
677
- log(iframeId, "Set " + style + " = " + iframe.style[style]);
556
+ iframe.style[style] = isNumber(styleValue) ? styleValue + 'px' : styleValue;
557
+ log(iframeId, 'Set ' + style + ' = ' + iframe.style[style]);
678
558
  }
679
559
  }
680
560
  function chkMinMax(dimension) {
681
- if (settings[iframeId]["min" + dimension] > settings[iframeId]["max" + dimension]) throw new Error("Value for min" + dimension + " can not be greater than max" + dimension);
561
+ if (settings[iframeId]['min' + dimension] > settings[iframeId]['max' + dimension]) throw new Error('Value for min' + dimension + ' can not be greater than max' + dimension);
682
562
  }
683
- chkMinMax("Height");
684
- chkMinMax("Width");
685
- addStyle("maxHeight");
686
- addStyle("minHeight");
687
- addStyle("maxWidth");
688
- addStyle("minWidth");
563
+ chkMinMax('Height');
564
+ chkMinMax('Width');
565
+ addStyle('maxHeight');
566
+ addStyle('minHeight');
567
+ addStyle('maxWidth');
568
+ addStyle('minWidth');
689
569
  }
690
570
  function newId() {
691
571
  var id = options && options.id || defaults.id + count++;
@@ -693,38 +573,38 @@ var $5180433265c858be$exports = {};
693
573
  return id;
694
574
  }
695
575
  function ensureHasId(iframeId) {
696
- if (typeof iframeId !== "string") throw new TypeError("Invaild id for iFrame. Expected String");
697
- if ("" === iframeId) {
576
+ if (typeof iframeId !== 'string') throw new TypeError('Invaild id for iFrame. Expected String');
577
+ if ('' === iframeId) {
698
578
  // eslint-disable-next-line no-multi-assign
699
579
  iframe.id = iframeId = newId();
700
580
  logEnabled = (options || {}).log;
701
- log(iframeId, "Added missing iframe ID: " + iframeId + " (" + iframe.src + ")");
581
+ log(iframeId, 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')');
702
582
  }
703
583
  return iframeId;
704
584
  }
705
585
  function setScrolling() {
706
- log(iframeId, "IFrame scrolling " + (settings[iframeId] && settings[iframeId].scrolling ? "enabled" : "disabled") + " for " + iframeId);
707
- iframe.style.overflow = false === (settings[iframeId] && settings[iframeId].scrolling) ? "hidden" : "auto";
586
+ log(iframeId, 'IFrame scrolling ' + (settings[iframeId] && settings[iframeId].scrolling ? 'enabled' : 'disabled') + ' for ' + iframeId);
587
+ iframe.style.overflow = false === (settings[iframeId] && settings[iframeId].scrolling) ? 'hidden' : 'auto';
708
588
  switch(settings[iframeId] && settings[iframeId].scrolling){
709
- case "omit":
589
+ case 'omit':
710
590
  break;
711
591
  case true:
712
- iframe.scrolling = "yes";
592
+ iframe.scrolling = 'yes';
713
593
  break;
714
594
  case false:
715
- iframe.scrolling = "no";
595
+ iframe.scrolling = 'no';
716
596
  break;
717
597
  default:
718
- iframe.scrolling = settings[iframeId] ? settings[iframeId].scrolling : "no";
598
+ iframe.scrolling = settings[iframeId] ? settings[iframeId].scrolling : 'no';
719
599
  }
720
600
  }
721
601
  // The V1 iFrame script expects an int, where as in V2 expects a CSS
722
602
  // string value such as '1px 3em', so if we have an int for V2, set V1=V2
723
603
  // and then convert V2 to a string PX value.
724
604
  function setupBodyMarginValues() {
725
- if ("number" === typeof (settings[iframeId] && settings[iframeId].bodyMargin) || "0" === (settings[iframeId] && settings[iframeId].bodyMargin)) {
605
+ if ('number' === typeof (settings[iframeId] && settings[iframeId].bodyMargin) || '0' === (settings[iframeId] && settings[iframeId].bodyMargin)) {
726
606
  settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
727
- settings[iframeId].bodyMargin = "" + settings[iframeId].bodyMargin + "px";
607
+ settings[iframeId].bodyMargin = '' + settings[iframeId].bodyMargin + 'px';
728
608
  }
729
609
  }
730
610
  function checkReset() {
@@ -736,20 +616,20 @@ var $5180433265c858be$exports = {};
736
616
  iframe: iframe,
737
617
  height: 0,
738
618
  width: 0,
739
- type: "init"
619
+ type: 'init'
740
620
  });
741
621
  }
742
622
  function setupIFrameObject() {
743
623
  if (settings[iframeId]) settings[iframeId].iframe.iFrameResizer = {
744
624
  close: closeIFrame.bind(null, settings[iframeId].iframe),
745
625
  removeListeners: removeIframeListeners.bind(null, settings[iframeId].iframe),
746
- resize: trigger.bind(null, "Window resize", "resize", settings[iframeId].iframe),
626
+ resize: trigger.bind(null, 'Window resize', 'resize', settings[iframeId].iframe),
747
627
  moveToAnchor: function(anchor) {
748
- trigger("Move to anchor", "moveToAnchor:" + anchor, settings[iframeId].iframe, iframeId);
628
+ trigger('Move to anchor', 'moveToAnchor:' + anchor, settings[iframeId].iframe, iframeId);
749
629
  },
750
630
  sendMessage: function(message) {
751
631
  message = JSON.stringify(message);
752
- trigger("Send Message", "message:" + message, settings[iframeId].iframe, iframeId);
632
+ trigger('Send Message', 'message:' + message, settings[iframeId].iframe, iframeId);
753
633
  }
754
634
  };
755
635
  }
@@ -758,7 +638,7 @@ var $5180433265c858be$exports = {};
758
638
  // event listener also catches the page changing in the iFrame.
759
639
  function init(msg) {
760
640
  function iFrameLoaded() {
761
- trigger("iFrame.onload", msg, iframe, undefined, true);
641
+ trigger('iFrame.onload', msg, iframe, undefined, true);
762
642
  checkReset();
763
643
  }
764
644
  function createDestroyObserver(MutationObserver) {
@@ -778,23 +658,23 @@ var $5180433265c858be$exports = {};
778
658
  }
779
659
  var MutationObserver = getMutationObserver();
780
660
  if (MutationObserver) createDestroyObserver(MutationObserver);
781
- addEventListener(iframe, "load", iFrameLoaded);
782
- trigger("init", msg, iframe, undefined, true);
661
+ addEventListener(iframe, 'load', iFrameLoaded);
662
+ trigger('init', msg, iframe, undefined, true);
783
663
  }
784
664
  function checkOptions(options) {
785
- if ("object" !== typeof options) throw new TypeError("Options is not an object");
665
+ if ('object' !== typeof options) throw new TypeError('Options is not an object');
786
666
  }
787
667
  function copyOptions(options) {
788
668
  // eslint-disable-next-line no-restricted-syntax
789
669
  for(var option in defaults)if (Object.prototype.hasOwnProperty.call(defaults, option)) settings[iframeId][option] = Object.prototype.hasOwnProperty.call(options, option) ? options[option] : defaults[option];
790
670
  }
791
671
  function getTargetOrigin(remoteHost) {
792
- return "" === remoteHost || null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/) ? "*" : remoteHost;
672
+ return '' === remoteHost || null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/) ? '*' : remoteHost;
793
673
  }
794
674
  function depricate(key) {
795
- var splitName = key.split("Callback");
675
+ var splitName = key.split('Callback');
796
676
  if (splitName.length === 2) {
797
- var name = "on" + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
677
+ var name = 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
798
678
  this[name] = this[key];
799
679
  delete this[key];
800
680
  warn(iframeId, "Deprecated: '" + key + "' has been renamed '" + name + "'. The old method will be removed in the next major version.");
@@ -806,17 +686,17 @@ var $5180433265c858be$exports = {};
806
686
  ;
807
687
  settings[iframeId].iframe = iframe;
808
688
  settings[iframeId].firstRun = true;
809
- settings[iframeId].remoteHost = iframe.src && iframe.src.split("/").slice(0, 3).join("/");
689
+ settings[iframeId].remoteHost = iframe.src && iframe.src.split('/').slice(0, 3).join('/');
810
690
  checkOptions(options);
811
691
  Object.keys(options).forEach(depricate, options);
812
692
  copyOptions(options);
813
- if (settings[iframeId]) settings[iframeId].targetOrigin = true === settings[iframeId].checkOrigin ? getTargetOrigin(settings[iframeId].remoteHost) : "*";
693
+ if (settings[iframeId]) settings[iframeId].targetOrigin = true === settings[iframeId].checkOrigin ? getTargetOrigin(settings[iframeId].remoteHost) : '*';
814
694
  }
815
695
  function beenHere() {
816
- return iframeId in settings && "iFrameResizer" in iframe;
696
+ return iframeId in settings && 'iFrameResizer' in iframe;
817
697
  }
818
698
  var iframeId = ensureHasId(iframe.id);
819
- if (beenHere()) warn(iframeId, "Ignored iFrame, already setup.");
699
+ if (beenHere()) warn(iframeId, 'Ignored iFrame, already setup.');
820
700
  else {
821
701
  processOptions(options);
822
702
  setScrolling();
@@ -844,23 +724,23 @@ var $5180433265c858be$exports = {};
844
724
  function checkIFrames() {
845
725
  function checkIFrame(settingId) {
846
726
  function chkDimension(dimension) {
847
- return "0px" === (settings[settingId] && settings[settingId].iframe.style[dimension]);
727
+ return '0px' === (settings[settingId] && settings[settingId].iframe.style[dimension]);
848
728
  }
849
729
  function isVisible(el) {
850
730
  return null !== el.offsetParent;
851
731
  }
852
- if (settings[settingId] && isVisible(settings[settingId].iframe) && (chkDimension("height") || chkDimension("width"))) trigger("Visibility change", "resize", settings[settingId].iframe, settingId);
732
+ if (settings[settingId] && isVisible(settings[settingId].iframe) && (chkDimension('height') || chkDimension('width'))) trigger('Visibility change', 'resize', settings[settingId].iframe, settingId);
853
733
  }
854
734
  Object.keys(settings).forEach(function(key) {
855
735
  checkIFrame(key);
856
736
  });
857
737
  }
858
738
  function mutationObserved(mutations) {
859
- log("window", "Mutation observed: " + mutations[0].target + " " + mutations[0].type);
739
+ log('window', 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type);
860
740
  debouce(checkIFrames, 16);
861
741
  }
862
742
  function createMutationObserver() {
863
- var target = document.querySelector("body"), config = {
743
+ var target = document.querySelector('body'), config = {
864
744
  attributes: true,
865
745
  attributeOldValue: false,
866
746
  characterData: true,
@@ -875,42 +755,42 @@ var $5180433265c858be$exports = {};
875
755
  }
876
756
  function resizeIFrames(event) {
877
757
  function resize() {
878
- sendTriggerMsg("Window " + event, "resize");
758
+ sendTriggerMsg('Window ' + event, 'resize');
879
759
  }
880
- log("window", "Trigger event: " + event);
760
+ log('window', 'Trigger event: ' + event);
881
761
  debouce(resize, 16);
882
762
  }
883
763
  // Not testable in PhantomJS
884
764
  /* istanbul ignore next */ function tabVisible() {
885
765
  function resize() {
886
- sendTriggerMsg("Tab Visible", "resize");
766
+ sendTriggerMsg('Tab Visible', 'resize');
887
767
  }
888
- if ("hidden" !== document.visibilityState) {
889
- log("document", "Trigger event: Visibility change");
768
+ if ('hidden' !== document.visibilityState) {
769
+ log('document', 'Trigger event: Visibility change');
890
770
  debouce(resize, 16);
891
771
  }
892
772
  }
893
773
  function sendTriggerMsg(eventName, event) {
894
774
  function isIFrameResizeEnabled(iframeId) {
895
- return settings[iframeId] && "parent" === settings[iframeId].resizeFrom && settings[iframeId].autoResize && !settings[iframeId].firstRun;
775
+ return settings[iframeId] && 'parent' === settings[iframeId].resizeFrom && settings[iframeId].autoResize && !settings[iframeId].firstRun;
896
776
  }
897
777
  Object.keys(settings).forEach(function(iframeId) {
898
778
  if (isIFrameResizeEnabled(iframeId)) trigger(eventName, event, settings[iframeId].iframe, iframeId);
899
779
  });
900
780
  }
901
781
  function setupEventListeners() {
902
- addEventListener(window, "message", iFrameListener);
903
- addEventListener(window, "resize", function() {
904
- resizeIFrames("resize");
782
+ addEventListener(window, 'message', iFrameListener);
783
+ addEventListener(window, 'resize', function() {
784
+ resizeIFrames('resize');
905
785
  });
906
- addEventListener(document, "visibilitychange", tabVisible);
907
- addEventListener(document, "-webkit-visibilitychange", tabVisible);
786
+ addEventListener(document, 'visibilitychange', tabVisible);
787
+ addEventListener(document, '-webkit-visibilitychange', tabVisible);
908
788
  }
909
789
  function factory() {
910
790
  function init(options, element) {
911
791
  function chkType() {
912
- if (!element.tagName) throw new TypeError("Object is not a valid DOM element");
913
- else if ("IFRAME" !== element.tagName.toUpperCase()) throw new TypeError("Expected <IFRAME> tag, found <" + element.tagName + ">");
792
+ if (!element.tagName) throw new TypeError('Object is not a valid DOM element');
793
+ else if ('IFRAME' !== element.tagName.toUpperCase()) throw new TypeError('Expected <IFRAME> tag, found <' + element.tagName + '>');
914
794
  }
915
795
  if (element) {
916
796
  chkType();
@@ -919,7 +799,7 @@ var $5180433265c858be$exports = {};
919
799
  }
920
800
  }
921
801
  function warnDeprecatedOptions(options) {
922
- if (options && options.enablePublicMethods) warn("enablePublicMethods option has been removed, public methods are now always available in the iFrame");
802
+ if (options && options.enablePublicMethods) warn('enablePublicMethods option has been removed, public methods are now always available in the iFrame');
923
803
  }
924
804
  var iFrames;
925
805
  setupRequestAnimationFrame();
@@ -929,36 +809,119 @@ var $5180433265c858be$exports = {};
929
809
  ;
930
810
  warnDeprecatedOptions(options);
931
811
  switch(typeof target){
932
- case "undefined":
933
- case "string":
934
- Array.prototype.forEach.call(document.querySelectorAll(target || "iframe"), init.bind(undefined, options));
812
+ case 'undefined':
813
+ case 'string':
814
+ Array.prototype.forEach.call(document.querySelectorAll(target || 'iframe'), init.bind(undefined, options));
935
815
  break;
936
- case "object":
816
+ case 'object':
937
817
  init(options, target);
938
818
  break;
939
819
  default:
940
- throw new TypeError("Unexpected data type (" + typeof target + ")");
820
+ throw new TypeError('Unexpected data type (' + typeof target + ')');
941
821
  }
942
822
  return iFrames;
943
823
  };
944
824
  }
945
825
  function createJQueryPublicMethod($) {
946
- if (!$.fn) info("", "Unable to bind to jQuery, it is not fully loaded.");
826
+ if (!$.fn) info('', 'Unable to bind to jQuery, it is not fully loaded.');
947
827
  else if (!$.fn.iFrameResize) $.fn.iFrameResize = function $iFrameResizeF(options) {
948
828
  function init(index, element) {
949
829
  setupIFrame(element, options);
950
830
  }
951
- return this.filter("iframe").each(init).end();
831
+ return this.filter('iframe').each(init).end();
952
832
  };
953
833
  }
954
834
  if (window.jQuery !== undefined) createJQueryPublicMethod(window.jQuery);
955
- if (typeof define === "function" && define.amd) define([], factory);
956
- else if (typeof $5180433265c858be$exports === "object") // Node for browserfy
835
+ if (typeof define === 'function' && define.amd) define([], factory);
836
+ else if (typeof $5180433265c858be$exports === 'object') // Node for browserfy
957
837
  $5180433265c858be$exports = factory();
958
838
  window.iFrameResize = window.iFrameResize || factory();
959
839
  })();
960
840
 
961
841
 
962
- parcelRequire("6RQZy");
842
+ window.Lookbook = window.Lookbook || {};
843
+ window.Lookbook.initEmbeds = $5000cc5d1e9e824a$var$initEmbeds;
844
+ const $5000cc5d1e9e824a$var$embedUrlPrefix = "embed";
845
+ const $5000cc5d1e9e824a$var$whiteListedAttributes = [
846
+ "preview",
847
+ "scenario",
848
+ "panels",
849
+ "actions",
850
+ "param-*"
851
+ ];
852
+ function $5000cc5d1e9e824a$var$initEmbeds(root = document) {
853
+ if (typeof window.iFrameResize !== "function") {
854
+ console.error("Lookbook embeds require the 'iframe-resizer' library to be available. Skipping embed instantiation.");
855
+ return;
856
+ }
857
+ if (typeof root === "string") root = document.querySelector(root);
858
+ if (!root) return console.error("Could not initialize Lookbook embeds. Root node not found.");
859
+ const embeds = Array.from(root.querySelectorAll("lookbook-embed"));
860
+ embeds.forEach((embed)=>{
861
+ const attrs = Array.from(embed.attributes);
862
+ const wrapper = $5000cc5d1e9e824a$var$createWrapper();
863
+ const iframe = $5000cc5d1e9e824a$var$createIframe(attrs);
864
+ wrapper.appendChild(iframe);
865
+ embed.replaceWith(wrapper);
866
+ });
867
+ window.iFrameResize({
868
+ checkOrigin: false
869
+ }, "[data-lookbook-embed-iframe]");
870
+ }
871
+ function $5000cc5d1e9e824a$var$createWrapper() {
872
+ const wrapper = document.createElement("div");
873
+ wrapper.setAttribute("data-lookbook-embed", "");
874
+ wrapper.classList.add("lookbook-embed");
875
+ return wrapper;
876
+ }
877
+ function $5000cc5d1e9e824a$var$createIframe(attrs) {
878
+ const src = $5000cc5d1e9e824a$var$buildSrc(attrs);
879
+ const id = $5000cc5d1e9e824a$var$attrValue(attrs, "id");
880
+ const styles = $5000cc5d1e9e824a$var$attrValue(attrs, "style");
881
+ const classes = $5000cc5d1e9e824a$var$attrValue(attrs, "class", "").split(" ").map((c)=>c.trim()).filter((c)=>c.length);
882
+ const iframe = document.createElement("iframe");
883
+ iframe.src = src;
884
+ if (id) iframe.id = id;
885
+ iframe.setAttribute("frameborder", 0);
886
+ iframe.setAttribute("data-lookbook-embed-iframe", "");
887
+ if (classes.length) iframe.classList.add(...classes);
888
+ if (styles) iframe.style.cssText = styles;
889
+ iframe.style.width = "100%";
890
+ iframe.style.transition = "height 0.3s";
891
+ return iframe;
892
+ }
893
+ function $5000cc5d1e9e824a$var$buildSrc(attrs) {
894
+ const appPath = $5000cc5d1e9e824a$var$attrValue(attrs, "app") || $5000cc5d1e9e824a$var$guessBasePath();
895
+ const props = {};
896
+ $5000cc5d1e9e824a$var$permittedAttrs(attrs).forEach(({ name: name, value: value })=>{
897
+ name = name.replace("-", "_").toLowerCase();
898
+ props[name] = value;
899
+ });
900
+ return encodeURI([
901
+ appPath,
902
+ $5000cc5d1e9e824a$var$embedUrlPrefix
903
+ ].join("/") + `?props=${JSON.stringify(props)}`);
904
+ }
905
+ function $5000cc5d1e9e824a$var$attrValue(attrs, name, fallback = null) {
906
+ const attr = attrs.find((attr)=>attr.name === name);
907
+ return attr ? attr.value : fallback;
908
+ }
909
+ function $5000cc5d1e9e824a$var$permittedAttrs(attrs) {
910
+ return attrs.filter((attr)=>{
911
+ return $5000cc5d1e9e824a$var$whiteListedAttributes.find((key)=>{
912
+ const name = attr.name;
913
+ return key === name || key.includes("*") && name.startsWith(key.replace("*", ""));
914
+ });
915
+ });
916
+ }
917
+ function $5000cc5d1e9e824a$var$guessBasePath() {
918
+ const script = document.currentScript || document.querySelector('script[src*="lookbook.js"]');
919
+ const scriptSrc = script.src;
920
+ if (scriptSrc && scriptSrc.includes("lookbook-assets")) return scriptSrc.split("?")[0].replace("lookbook-assets/js/lookbook.js", "lookbook");
921
+ return `//${location.host}/lookbook`;
922
+ }
923
+ document.addEventListener("DOMContentLoaded", ()=>$5000cc5d1e9e824a$var$initEmbeds());
924
+
925
+
963
926
 
964
927
  })();