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
@@ -10,24 +10,24 @@ var $b2e1fd3e30ab1f5c$exports = {};
10
10
  *
11
11
  */ // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
12
12
  (function(undefined) {
13
- if (typeof window === "undefined") return; // don't run for server side render
14
- var autoResize = true, base = 10, bodyBackground = "", bodyMargin = 0, bodyMarginStr = "", bodyObserver = null, bodyPadding = "", calculateWidth = false, doubleEventList = {
13
+ if (typeof window === 'undefined') return; // don't run for server side render
14
+ var autoResize = true, base = 10, bodyBackground = '', bodyMargin = 0, bodyMarginStr = '', bodyObserver = null, bodyPadding = '', calculateWidth = false, doubleEventList = {
15
15
  resize: 1,
16
16
  click: 1
17
- }, eventCancelTimer = 128, firstRun = true, height = 1, heightCalcModeDefault = "bodyOffset", heightCalcMode = heightCalcModeDefault, initLock = true, initMsg = "", inPageLinks = {}, interval = 32, intervalTimer = null, logging = false, mouseEvents = false, msgID = "[iFrameSizer]", msgIdLen = msgID.length, myID = "", resetRequiredMethods = {
17
+ }, eventCancelTimer = 128, firstRun = true, height = 1, heightCalcModeDefault = 'bodyOffset', heightCalcMode = heightCalcModeDefault, initLock = true, initMsg = '', inPageLinks = {}, interval = 32, intervalTimer = null, logging = false, mouseEvents = false, msgID = '[iFrameSizer]', msgIdLen = msgID.length, myID = '', resetRequiredMethods = {
18
18
  max: 1,
19
19
  min: 1,
20
20
  bodyScroll: 1,
21
21
  documentElementScroll: 1
22
- }, resizeFrom = "child", sendPermit = true, target = window.parent, targetOriginDefault = "*", tolerance = 0, triggerLocked = false, triggerLockedTimer = null, throttledTimer = 16, width = 1, widthCalcModeDefault = "scroll", widthCalcMode = widthCalcModeDefault, win = window, onMessage = function() {
23
- warn("onMessage function not defined");
22
+ }, resizeFrom = 'child', sendPermit = true, target = window.parent, targetOriginDefault = '*', tolerance = 0, triggerLocked = false, triggerLockedTimer = null, throttledTimer = 16, width = 1, widthCalcModeDefault = 'scroll', widthCalcMode = widthCalcModeDefault, win = window, onMessage = function() {
23
+ warn('onMessage function not defined');
24
24
  }, onReady = function() {}, onPageInfo = function() {}, customCalcMethods = {
25
25
  height: function() {
26
- warn("Custom height calculation function not defined");
26
+ warn('Custom height calculation function not defined');
27
27
  return document.documentElement.offsetHeight;
28
28
  },
29
29
  width: function() {
30
- warn("Custom width calculation function not defined");
30
+ warn('Custom width calculation function not defined');
31
31
  return document.body.scrollWidth;
32
32
  }
33
33
  }, eventHandlersByName = {}, passiveSupported = false;
@@ -41,8 +41,8 @@ var $b2e1fd3e30ab1f5c$exports = {};
41
41
  }
42
42
  }
43
43
  });
44
- window.addEventListener("test", noop, options);
45
- window.removeEventListener("test", noop, options);
44
+ window.addEventListener('test', noop, options);
45
+ window.removeEventListener('test', noop, options);
46
46
  } catch (error) {
47
47
  /* */ }
48
48
  function addEventListener(el, evt, func, options) {
@@ -83,23 +83,23 @@ var $b2e1fd3e30ab1f5c$exports = {};
83
83
  };
84
84
  }
85
85
  function formatLogMsg(msg) {
86
- return msgID + "[" + myID + "] " + msg;
86
+ return msgID + '[' + myID + '] ' + msg;
87
87
  }
88
88
  function log(msg) {
89
- if (logging && "object" === typeof window.console) // eslint-disable-next-line no-console
89
+ if (logging && 'object' === typeof window.console) // eslint-disable-next-line no-console
90
90
  console.log(formatLogMsg(msg));
91
91
  }
92
92
  function warn(msg) {
93
- if ("object" === typeof window.console) // eslint-disable-next-line no-console
93
+ if ('object' === typeof window.console) // eslint-disable-next-line no-console
94
94
  console.warn(formatLogMsg(msg));
95
95
  }
96
96
  function init() {
97
97
  readDataFromParent();
98
- log("Initialising iFrame (" + window.location.href + ")");
98
+ log('Initialising iFrame (' + window.location.href + ')');
99
99
  readDataFromPage();
100
100
  setMargin();
101
- setBodyStyle("background", bodyBackground);
102
- setBodyStyle("padding", bodyPadding);
101
+ setBodyStyle('background', bodyBackground);
102
+ setBodyStyle('padding', bodyPadding);
103
103
  injectClearFixIntoBodyElement();
104
104
  checkHeightMode();
105
105
  checkWidthMode();
@@ -108,14 +108,14 @@ var $b2e1fd3e30ab1f5c$exports = {};
108
108
  setupMouseEvents();
109
109
  startEventListeners();
110
110
  inPageLinks = setupInPageLinks();
111
- sendSize("init", "Init message from host page");
111
+ sendSize('init', 'Init message from host page');
112
112
  onReady();
113
113
  }
114
114
  function readDataFromParent() {
115
115
  function strBool(str) {
116
- return "true" === str;
116
+ return 'true' === str;
117
117
  }
118
- var data = initMsg.slice(msgIdLen).split(":");
118
+ var data = initMsg.slice(msgIdLen).split(':');
119
119
  myID = data[0];
120
120
  bodyMargin = undefined === data[1] ? bodyMargin : Number(data[1]) // For V1 compatibility
121
121
  ;
@@ -134,9 +134,9 @@ var $b2e1fd3e30ab1f5c$exports = {};
134
134
  mouseEvents = undefined === data[15] ? mouseEvents : strBool(data[15]);
135
135
  }
136
136
  function depricate(key) {
137
- var splitName = key.split("Callback");
137
+ var splitName = key.split('Callback');
138
138
  if (splitName.length === 2) {
139
- var name = "on" + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
139
+ var name = 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
140
140
  this[name] = this[key];
141
141
  delete this[key];
142
142
  warn("Deprecated: '" + key + "' has been renamed '" + name + "'. The old method will be removed in the next major version.");
@@ -145,50 +145,50 @@ var $b2e1fd3e30ab1f5c$exports = {};
145
145
  function readDataFromPage() {
146
146
  function readData() {
147
147
  var data = window.iFrameResizer;
148
- log("Reading data from page: " + JSON.stringify(data));
148
+ log('Reading data from page: ' + JSON.stringify(data));
149
149
  Object.keys(data).forEach(depricate, data);
150
- onMessage = "onMessage" in data ? data.onMessage : onMessage;
151
- onReady = "onReady" in data ? data.onReady : onReady;
152
- targetOriginDefault = "targetOrigin" in data ? data.targetOrigin : targetOriginDefault;
153
- heightCalcMode = "heightCalculationMethod" in data ? data.heightCalculationMethod : heightCalcMode;
154
- widthCalcMode = "widthCalculationMethod" in data ? data.widthCalculationMethod : widthCalcMode;
150
+ onMessage = 'onMessage' in data ? data.onMessage : onMessage;
151
+ onReady = 'onReady' in data ? data.onReady : onReady;
152
+ targetOriginDefault = 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault;
153
+ heightCalcMode = 'heightCalculationMethod' in data ? data.heightCalculationMethod : heightCalcMode;
154
+ widthCalcMode = 'widthCalculationMethod' in data ? data.widthCalculationMethod : widthCalcMode;
155
155
  }
156
156
  function setupCustomCalcMethods(calcMode, calcFunc) {
157
- if ("function" === typeof calcMode) {
158
- log("Setup custom " + calcFunc + "CalcMethod");
157
+ if ('function' === typeof calcMode) {
158
+ log('Setup custom ' + calcFunc + 'CalcMethod');
159
159
  customCalcMethods[calcFunc] = calcMode;
160
- calcMode = "custom";
160
+ calcMode = 'custom';
161
161
  }
162
162
  return calcMode;
163
163
  }
164
- if ("iFrameResizer" in window && Object === window.iFrameResizer.constructor) {
164
+ if ('iFrameResizer' in window && Object === window.iFrameResizer.constructor) {
165
165
  readData();
166
- heightCalcMode = setupCustomCalcMethods(heightCalcMode, "height");
167
- widthCalcMode = setupCustomCalcMethods(widthCalcMode, "width");
166
+ heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height');
167
+ widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width');
168
168
  }
169
- log("TargetOrigin for parent set to: " + targetOriginDefault);
169
+ log('TargetOrigin for parent set to: ' + targetOriginDefault);
170
170
  }
171
171
  function chkCSS(attr, value) {
172
- if (-1 !== value.indexOf("-")) {
173
- warn("Negative CSS value ignored for " + attr);
174
- value = "";
172
+ if (-1 !== value.indexOf('-')) {
173
+ warn('Negative CSS value ignored for ' + attr);
174
+ value = '';
175
175
  }
176
176
  return value;
177
177
  }
178
178
  function setBodyStyle(attr, value) {
179
- if (undefined !== value && "" !== value && "null" !== value) {
179
+ if (undefined !== value && '' !== value && 'null' !== value) {
180
180
  document.body.style[attr] = value;
181
- log("Body " + attr + ' set to "' + value + '"');
181
+ log('Body ' + attr + ' set to "' + value + '"');
182
182
  }
183
183
  }
184
184
  function setMargin() {
185
185
  // If called via V1 script, convert bodyMargin from int to str
186
- if (undefined === bodyMarginStr) bodyMarginStr = bodyMargin + "px";
187
- setBodyStyle("margin", chkCSS("margin", bodyMarginStr));
186
+ if (undefined === bodyMarginStr) bodyMarginStr = bodyMargin + 'px';
187
+ setBodyStyle('margin', chkCSS('margin', bodyMarginStr));
188
188
  }
189
189
  function stopInfiniteResizingOfIFrame() {
190
- document.documentElement.style.height = "";
191
- document.body.style.height = "";
190
+ document.documentElement.style.height = '';
191
+ document.body.style.height = '';
192
192
  log('HTML & body height set to "auto"');
193
193
  }
194
194
  function manageTriggerEvent(options) {
@@ -212,124 +212,124 @@ var $b2e1fd3e30ab1f5c$exports = {};
212
212
  options.eventName = options.eventNames[0];
213
213
  options.eventNames.map(listener[options.method]);
214
214
  } else listener[options.method](options.eventName);
215
- log(capitalizeFirstLetter(options.method) + " event listener: " + options.eventType);
215
+ log(capitalizeFirstLetter(options.method) + ' event listener: ' + options.eventType);
216
216
  }
217
217
  function manageEventListeners(method) {
218
218
  manageTriggerEvent({
219
219
  method: method,
220
- eventType: "Animation Start",
220
+ eventType: 'Animation Start',
221
221
  eventNames: [
222
- "animationstart",
223
- "webkitAnimationStart"
222
+ 'animationstart',
223
+ 'webkitAnimationStart'
224
224
  ]
225
225
  });
226
226
  manageTriggerEvent({
227
227
  method: method,
228
- eventType: "Animation Iteration",
228
+ eventType: 'Animation Iteration',
229
229
  eventNames: [
230
- "animationiteration",
231
- "webkitAnimationIteration"
230
+ 'animationiteration',
231
+ 'webkitAnimationIteration'
232
232
  ]
233
233
  });
234
234
  manageTriggerEvent({
235
235
  method: method,
236
- eventType: "Animation End",
236
+ eventType: 'Animation End',
237
237
  eventNames: [
238
- "animationend",
239
- "webkitAnimationEnd"
238
+ 'animationend',
239
+ 'webkitAnimationEnd'
240
240
  ]
241
241
  });
242
242
  manageTriggerEvent({
243
243
  method: method,
244
- eventType: "Input",
245
- eventName: "input"
244
+ eventType: 'Input',
245
+ eventName: 'input'
246
246
  });
247
247
  manageTriggerEvent({
248
248
  method: method,
249
- eventType: "Mouse Up",
250
- eventName: "mouseup"
249
+ eventType: 'Mouse Up',
250
+ eventName: 'mouseup'
251
251
  });
252
252
  manageTriggerEvent({
253
253
  method: method,
254
- eventType: "Mouse Down",
255
- eventName: "mousedown"
254
+ eventType: 'Mouse Down',
255
+ eventName: 'mousedown'
256
256
  });
257
257
  manageTriggerEvent({
258
258
  method: method,
259
- eventType: "Orientation Change",
260
- eventName: "orientationchange"
259
+ eventType: 'Orientation Change',
260
+ eventName: 'orientationchange'
261
261
  });
262
262
  manageTriggerEvent({
263
263
  method: method,
264
- eventType: "Print",
264
+ eventType: 'Print',
265
265
  eventNames: [
266
- "afterprint",
267
- "beforeprint"
266
+ 'afterprint',
267
+ 'beforeprint'
268
268
  ]
269
269
  });
270
270
  manageTriggerEvent({
271
271
  method: method,
272
- eventType: "Ready State Change",
273
- eventName: "readystatechange"
272
+ eventType: 'Ready State Change',
273
+ eventName: 'readystatechange'
274
274
  });
275
275
  manageTriggerEvent({
276
276
  method: method,
277
- eventType: "Touch Start",
278
- eventName: "touchstart"
277
+ eventType: 'Touch Start',
278
+ eventName: 'touchstart'
279
279
  });
280
280
  manageTriggerEvent({
281
281
  method: method,
282
- eventType: "Touch End",
283
- eventName: "touchend"
282
+ eventType: 'Touch End',
283
+ eventName: 'touchend'
284
284
  });
285
285
  manageTriggerEvent({
286
286
  method: method,
287
- eventType: "Touch Cancel",
288
- eventName: "touchcancel"
287
+ eventType: 'Touch Cancel',
288
+ eventName: 'touchcancel'
289
289
  });
290
290
  manageTriggerEvent({
291
291
  method: method,
292
- eventType: "Transition Start",
292
+ eventType: 'Transition Start',
293
293
  eventNames: [
294
- "transitionstart",
295
- "webkitTransitionStart",
296
- "MSTransitionStart",
297
- "oTransitionStart",
298
- "otransitionstart"
294
+ 'transitionstart',
295
+ 'webkitTransitionStart',
296
+ 'MSTransitionStart',
297
+ 'oTransitionStart',
298
+ 'otransitionstart'
299
299
  ]
300
300
  });
301
301
  manageTriggerEvent({
302
302
  method: method,
303
- eventType: "Transition Iteration",
303
+ eventType: 'Transition Iteration',
304
304
  eventNames: [
305
- "transitioniteration",
306
- "webkitTransitionIteration",
307
- "MSTransitionIteration",
308
- "oTransitionIteration",
309
- "otransitioniteration"
305
+ 'transitioniteration',
306
+ 'webkitTransitionIteration',
307
+ 'MSTransitionIteration',
308
+ 'oTransitionIteration',
309
+ 'otransitioniteration'
310
310
  ]
311
311
  });
312
312
  manageTriggerEvent({
313
313
  method: method,
314
- eventType: "Transition End",
314
+ eventType: 'Transition End',
315
315
  eventNames: [
316
- "transitionend",
317
- "webkitTransitionEnd",
318
- "MSTransitionEnd",
319
- "oTransitionEnd",
320
- "otransitionend"
316
+ 'transitionend',
317
+ 'webkitTransitionEnd',
318
+ 'MSTransitionEnd',
319
+ 'oTransitionEnd',
320
+ 'otransitionend'
321
321
  ]
322
322
  });
323
- if ("child" === resizeFrom) manageTriggerEvent({
323
+ if ('child' === resizeFrom) manageTriggerEvent({
324
324
  method: method,
325
- eventType: "IFrame Resized",
326
- eventName: "resize"
325
+ eventType: 'IFrame Resized',
326
+ eventName: 'resize'
327
327
  });
328
328
  }
329
329
  function checkCalcMode(calcMode, calcModeDefault, modes, type) {
330
330
  if (calcModeDefault !== calcMode) {
331
331
  if (!(calcMode in modes)) {
332
- warn(calcMode + " is not a valid option for " + type + "CalculationMethod.");
332
+ warn(calcMode + ' is not a valid option for ' + type + 'CalculationMethod.');
333
333
  calcMode = calcModeDefault;
334
334
  }
335
335
  log(type + ' calculation method set to "' + calcMode + '"');
@@ -337,16 +337,16 @@ var $b2e1fd3e30ab1f5c$exports = {};
337
337
  return calcMode;
338
338
  }
339
339
  function checkHeightMode() {
340
- heightCalcMode = checkCalcMode(heightCalcMode, heightCalcModeDefault, getHeight, "height");
340
+ heightCalcMode = checkCalcMode(heightCalcMode, heightCalcModeDefault, getHeight, 'height');
341
341
  }
342
342
  function checkWidthMode() {
343
- widthCalcMode = checkCalcMode(widthCalcMode, widthCalcModeDefault, getWidth, "width");
343
+ widthCalcMode = checkCalcMode(widthCalcMode, widthCalcModeDefault, getWidth, 'width');
344
344
  }
345
345
  function startEventListeners() {
346
346
  if (true === autoResize) {
347
- manageEventListeners("add");
347
+ manageEventListeners('add');
348
348
  setupMutationObserver();
349
- } else log("Auto Resize disabled");
349
+ } else log('Auto Resize disabled');
350
350
  }
351
351
  // function stopMsgsToParent() {
352
352
  // log('Disable outgoing messages')
@@ -361,7 +361,7 @@ var $b2e1fd3e30ab1f5c$exports = {};
361
361
  bodyObserver.disconnect();
362
362
  }
363
363
  function stopEventListeners() {
364
- manageEventListeners("remove");
364
+ manageEventListeners('remove');
365
365
  disconnectMutationObserver();
366
366
  clearInterval(intervalTimer);
367
367
  }
@@ -371,11 +371,11 @@ var $b2e1fd3e30ab1f5c$exports = {};
371
371
  // if (true === autoResize) stopEventListeners()
372
372
  // }
373
373
  function injectClearFixIntoBodyElement() {
374
- var clearFix = document.createElement("div");
375
- clearFix.style.clear = "both";
374
+ var clearFix = document.createElement('div');
375
+ clearFix.style.clear = 'both';
376
376
  // Guard against the following having been globally redefined in CSS.
377
- clearFix.style.display = "block";
378
- clearFix.style.height = "0";
377
+ clearFix.style.display = 'block';
378
+ clearFix.style.height = '0';
379
379
  document.body.appendChild(clearFix);
380
380
  }
381
381
  function setupInPageLinks() {
@@ -395,33 +395,33 @@ var $b2e1fd3e30ab1f5c$exports = {};
395
395
  function findTarget(location) {
396
396
  function jumpToTarget(target) {
397
397
  var jumpPosition = getElementPosition(target);
398
- log("Moving to in page link (#" + hash + ") at x: " + jumpPosition.x + " y: " + jumpPosition.y);
399
- sendMsg(jumpPosition.y, jumpPosition.x, "scrollToOffset") // X&Y reversed at sendMsg uses height/width
398
+ log('Moving to in page link (#' + hash + ') at x: ' + jumpPosition.x + ' y: ' + jumpPosition.y);
399
+ sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width
400
400
  ;
401
401
  }
402
- var hash = location.split("#")[1] || location, hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
402
+ var hash = location.split('#')[1] || location, hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
403
403
  if (undefined === target) {
404
- log("In page link (#" + hash + ") not found in iFrame, so sending to parent");
405
- sendMsg(0, 0, "inPageLink", "#" + hash);
404
+ log('In page link (#' + hash + ') not found in iFrame, so sending to parent');
405
+ sendMsg(0, 0, 'inPageLink', '#' + hash);
406
406
  } else jumpToTarget(target);
407
407
  }
408
408
  function checkLocationHash() {
409
409
  var hash = window.location.hash;
410
410
  var href = window.location.href;
411
- if ("" !== hash && "#" !== hash) findTarget(href);
411
+ if ('' !== hash && '#' !== hash) findTarget(href);
412
412
  }
413
413
  function bindAnchors() {
414
414
  function setupLink(el) {
415
415
  function linkClicked(e) {
416
416
  e.preventDefault();
417
- /* jshint validthis:true */ findTarget(this.getAttribute("href"));
417
+ /* jshint validthis:true */ findTarget(this.getAttribute('href'));
418
418
  }
419
- if ("#" !== el.getAttribute("href")) addEventListener(el, "click", linkClicked);
419
+ if ('#' !== el.getAttribute('href')) addEventListener(el, 'click', linkClicked);
420
420
  }
421
421
  Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'), setupLink);
422
422
  }
423
423
  function bindLocationHash() {
424
- addEventListener(window, "hashchange", checkLocationHash);
424
+ addEventListener(window, 'hashchange', checkLocationHash);
425
425
  }
426
426
  function initCheck() {
427
427
  // Check if page loaded with location hash after init resize
@@ -430,14 +430,14 @@ var $b2e1fd3e30ab1f5c$exports = {};
430
430
  function enableInPageLinks() {
431
431
  /* istanbul ignore else */ // Not testable in phantonJS
432
432
  if (Array.prototype.forEach && document.querySelectorAll) {
433
- log("Setting up location.hash handlers");
433
+ log('Setting up location.hash handlers');
434
434
  bindAnchors();
435
435
  bindLocationHash();
436
436
  initCheck();
437
- } else warn("In page linking not fully supported in this browser! (See README.md for IE8 workaround)");
437
+ } else warn('In page linking not fully supported in this browser! (See README.md for IE8 workaround)');
438
438
  }
439
439
  if (inPageLinks.enable) enableInPageLinks();
440
- else log("In page linking not enabled");
440
+ else log('In page linking not enabled');
441
441
  return {
442
442
  findTarget: findTarget
443
443
  };
@@ -445,17 +445,17 @@ var $b2e1fd3e30ab1f5c$exports = {};
445
445
  function setupMouseEvents() {
446
446
  if (mouseEvents !== true) return;
447
447
  function sendMouse(e) {
448
- sendMsg(0, 0, e.type, e.screenY + ":" + e.screenX);
448
+ sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX);
449
449
  }
450
450
  function addMouseListener(evt, name) {
451
- log("Add event listener: " + name);
451
+ log('Add event listener: ' + name);
452
452
  addEventListener(window.document, evt, sendMouse);
453
453
  }
454
- addMouseListener("mouseenter", "Mouse Enter");
455
- addMouseListener("mouseleave", "Mouse Leave");
454
+ addMouseListener('mouseenter', 'Mouse Enter');
455
+ addMouseListener('mouseleave', 'Mouse Leave');
456
456
  }
457
457
  function setupPublicMethods() {
458
- log("Enable public methods");
458
+ log('Enable public methods');
459
459
  win.parentIFrame = {
460
460
  autoResize: function autoResizeF(resize) {
461
461
  if (true === resize && false === autoResize) {
@@ -465,41 +465,41 @@ var $b2e1fd3e30ab1f5c$exports = {};
465
465
  autoResize = false;
466
466
  stopEventListeners();
467
467
  }
468
- sendMsg(0, 0, "autoResize", JSON.stringify(autoResize));
468
+ sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize));
469
469
  return autoResize;
470
470
  },
471
471
  close: function closeF() {
472
- sendMsg(0, 0, "close");
472
+ sendMsg(0, 0, 'close');
473
473
  // teardown()
474
474
  },
475
475
  getId: function getIdF() {
476
476
  return myID;
477
477
  },
478
478
  getPageInfo: function getPageInfoF(callback) {
479
- if ("function" === typeof callback) {
479
+ if ('function' === typeof callback) {
480
480
  onPageInfo = callback;
481
- sendMsg(0, 0, "pageInfo");
481
+ sendMsg(0, 0, 'pageInfo');
482
482
  } else {
483
483
  onPageInfo = function() {};
484
- sendMsg(0, 0, "pageInfoStop");
484
+ sendMsg(0, 0, 'pageInfoStop');
485
485
  }
486
486
  },
487
487
  moveToAnchor: function moveToAnchorF(hash) {
488
488
  inPageLinks.findTarget(hash);
489
489
  },
490
490
  reset: function resetF() {
491
- resetIFrame("parentIFrame.reset");
491
+ resetIFrame('parentIFrame.reset');
492
492
  },
493
493
  scrollTo: function scrollToF(x, y) {
494
- sendMsg(y, x, "scrollTo") // X&Y reversed at sendMsg uses height/width
494
+ sendMsg(y, x, 'scrollTo') // X&Y reversed at sendMsg uses height/width
495
495
  ;
496
496
  },
497
497
  scrollToOffset: function scrollToF(x, y) {
498
- sendMsg(y, x, "scrollToOffset") // X&Y reversed at sendMsg uses height/width
498
+ sendMsg(y, x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width
499
499
  ;
500
500
  },
501
501
  sendMessage: function sendMessageF(msg, targetOrigin) {
502
- sendMsg(0, 0, "message", JSON.stringify(msg), targetOrigin);
502
+ sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin);
503
503
  },
504
504
  setHeightCalculationMethod: function setHeightCalculationMethodF(heightCalculationMethod) {
505
505
  heightCalcMode = heightCalculationMethod;
@@ -510,20 +510,20 @@ var $b2e1fd3e30ab1f5c$exports = {};
510
510
  checkWidthMode();
511
511
  },
512
512
  setTargetOrigin: function setTargetOriginF(targetOrigin) {
513
- log("Set targetOrigin: " + targetOrigin);
513
+ log('Set targetOrigin: ' + targetOrigin);
514
514
  targetOriginDefault = targetOrigin;
515
515
  },
516
516
  size: function sizeF(customHeight, customWidth) {
517
- var valString = "" + (customHeight || "") + (customWidth ? "," + customWidth : "");
518
- sendSize("size", "parentIFrame.size(" + valString + ")", customHeight, customWidth);
517
+ var valString = '' + (customHeight || '') + (customWidth ? ',' + customWidth : '');
518
+ sendSize('size', 'parentIFrame.size(' + valString + ')', customHeight, customWidth);
519
519
  }
520
520
  };
521
521
  }
522
522
  function initInterval() {
523
523
  if (0 !== interval) {
524
- log("setInterval: " + interval + "ms");
524
+ log('setInterval: ' + interval + 'ms');
525
525
  intervalTimer = setInterval(function() {
526
- sendSize("interval", "setInterval: " + interval);
526
+ sendSize('interval', 'setInterval: ' + interval);
527
527
  }, Math.abs(interval));
528
528
  }
529
529
  }
@@ -532,41 +532,41 @@ var $b2e1fd3e30ab1f5c$exports = {};
532
532
  function addImageLoadListners(mutation) {
533
533
  function addImageLoadListener(element) {
534
534
  if (false === element.complete) {
535
- log("Attach listeners to " + element.src);
536
- element.addEventListener("load", imageLoaded, false);
537
- element.addEventListener("error", imageError, false);
535
+ log('Attach listeners to ' + element.src);
536
+ element.addEventListener('load', imageLoaded, false);
537
+ element.addEventListener('error', imageError, false);
538
538
  elements.push(element);
539
539
  }
540
540
  }
541
- if (mutation.type === "attributes" && mutation.attributeName === "src") addImageLoadListener(mutation.target);
542
- else if (mutation.type === "childList") Array.prototype.forEach.call(mutation.target.querySelectorAll("img"), addImageLoadListener);
541
+ if (mutation.type === 'attributes' && mutation.attributeName === 'src') addImageLoadListener(mutation.target);
542
+ else if (mutation.type === 'childList') Array.prototype.forEach.call(mutation.target.querySelectorAll('img'), addImageLoadListener);
543
543
  }
544
544
  function removeFromArray(element) {
545
545
  elements.splice(elements.indexOf(element), 1);
546
546
  }
547
547
  function removeImageLoadListener(element) {
548
- log("Remove listeners from " + element.src);
549
- element.removeEventListener("load", imageLoaded, false);
550
- element.removeEventListener("error", imageError, false);
548
+ log('Remove listeners from ' + element.src);
549
+ element.removeEventListener('load', imageLoaded, false);
550
+ element.removeEventListener('error', imageError, false);
551
551
  removeFromArray(element);
552
552
  }
553
553
  function imageEventTriggered(event, type, typeDesc) {
554
554
  removeImageLoadListener(event.target);
555
- sendSize(type, typeDesc + ": " + event.target.src);
555
+ sendSize(type, typeDesc + ': ' + event.target.src);
556
556
  }
557
557
  function imageLoaded(event) {
558
- imageEventTriggered(event, "imageLoad", "Image loaded");
558
+ imageEventTriggered(event, 'imageLoad', 'Image loaded');
559
559
  }
560
560
  function imageError(event) {
561
- imageEventTriggered(event, "imageLoadFailed", "Image load failed");
561
+ imageEventTriggered(event, 'imageLoadFailed', 'Image load failed');
562
562
  }
563
563
  function mutationObserved(mutations) {
564
- sendSize("mutationObserver", "mutationObserver: " + mutations[0].target + " " + mutations[0].type);
564
+ sendSize('mutationObserver', 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type);
565
565
  // Deal with WebKit / Blink asyncing image loading when tags are injected into the page
566
566
  mutations.forEach(addImageLoadListners);
567
567
  }
568
568
  function createMutationObserver() {
569
- var target = document.querySelector("body"), config = {
569
+ var target = document.querySelector('body'), config = {
570
570
  attributes: true,
571
571
  attributeOldValue: false,
572
572
  characterData: true,
@@ -575,15 +575,15 @@ var $b2e1fd3e30ab1f5c$exports = {};
575
575
  subtree: true
576
576
  };
577
577
  observer = new MutationObserver(mutationObserved);
578
- log("Create body MutationObserver");
578
+ log('Create body MutationObserver');
579
579
  observer.observe(target, config);
580
580
  return observer;
581
581
  }
582
582
  var elements = [], MutationObserver = window.MutationObserver || window.WebKitMutationObserver, observer = createMutationObserver();
583
583
  return {
584
584
  disconnect: function() {
585
- if ("disconnect" in observer) {
586
- log("Disconnect body MutationObserver");
585
+ if ('disconnect' in observer) {
586
+ log('Disconnect body MutationObserver');
587
587
  observer.disconnect();
588
588
  elements.forEach(removeImageLoadListener);
589
589
  }
@@ -597,7 +597,7 @@ var $b2e1fd3e30ab1f5c$exports = {};
597
597
  if (forceIntervalTimer) initInterval();
598
598
  else bodyObserver = setupBodyMutationObserver();
599
599
  } else {
600
- log("MutationObserver not supported in this browser!");
600
+ log('MutationObserver not supported in this browser!');
601
601
  initInterval();
602
602
  }
603
603
  }
@@ -614,19 +614,19 @@ var $b2e1fd3e30ab1f5c$exports = {};
614
614
  function chkEventThottle(timer) {
615
615
  if (timer > throttledTimer / 2) {
616
616
  throttledTimer = 2 * timer;
617
- log("Event throttle increased to " + throttledTimer + "ms");
617
+ log('Event throttle increased to ' + throttledTimer + 'ms');
618
618
  }
619
619
  }
620
620
  // Idea from https://github.com/guardian/iframe-messenger
621
621
  function getMaxElement(side, elements) {
622
622
  var elementsLength = elements.length, elVal = 0, maxVal = 0, Side = capitalizeFirstLetter(side), timer = Date.now();
623
623
  for(var i = 0; i < elementsLength; i++){
624
- elVal = elements[i].getBoundingClientRect()[side] + getComputedStyle("margin" + Side, elements[i]);
624
+ elVal = elements[i].getBoundingClientRect()[side] + getComputedStyle('margin' + Side, elements[i]);
625
625
  if (elVal > maxVal) maxVal = elVal;
626
626
  }
627
627
  timer = Date.now() - timer;
628
- log("Parsed " + elementsLength + " HTML elements");
629
- log("Element position calculated in " + timer + "ms");
628
+ log('Parsed ' + elementsLength + ' HTML elements');
629
+ log('Element position calculated in ' + timer + 'ms');
630
630
  chkEventThottle(timer);
631
631
  return maxVal;
632
632
  }
@@ -640,19 +640,19 @@ var $b2e1fd3e30ab1f5c$exports = {};
640
640
  }
641
641
  function getTaggedElements(side, tag) {
642
642
  function noTaggedElementsFound() {
643
- warn("No tagged elements (" + tag + ") found on page");
644
- return document.querySelectorAll("body *");
643
+ warn('No tagged elements (' + tag + ') found on page');
644
+ return document.querySelectorAll('body *');
645
645
  }
646
- var elements = document.querySelectorAll("[" + tag + "]");
646
+ var elements = document.querySelectorAll('[' + tag + ']');
647
647
  if (elements.length === 0) noTaggedElementsFound();
648
648
  return getMaxElement(side, elements);
649
649
  }
650
650
  function getAllElements() {
651
- return document.querySelectorAll("body *");
651
+ return document.querySelectorAll('body *');
652
652
  }
653
653
  var getHeight = {
654
654
  bodyOffset: function getBodyOffsetHeight() {
655
- return document.body.offsetHeight + getComputedStyle("marginTop") + getComputedStyle("marginBottom");
655
+ return document.body.offsetHeight + getComputedStyle('marginTop') + getComputedStyle('marginBottom');
656
656
  },
657
657
  offset: function() {
658
658
  return getHeight.bodyOffset() // Backwards compatibility
@@ -681,10 +681,10 @@ var $b2e1fd3e30ab1f5c$exports = {};
681
681
  ;
682
682
  },
683
683
  lowestElement: function getBestHeight() {
684
- return Math.max(getHeight.bodyOffset() || getHeight.documentElementOffset(), getMaxElement("bottom", getAllElements()));
684
+ return Math.max(getHeight.bodyOffset() || getHeight.documentElementOffset(), getMaxElement('bottom', getAllElements()));
685
685
  },
686
686
  taggedElement: function getTaggedElementsHeight() {
687
- return getTaggedElements("bottom", "data-iframe-height");
687
+ return getTaggedElements('bottom', 'data-iframe-height');
688
688
  }
689
689
  }, getWidth = {
690
690
  bodyScroll: function getBodyScrollWidth() {
@@ -712,10 +712,10 @@ var $b2e1fd3e30ab1f5c$exports = {};
712
712
  return Math.min.apply(null, getAllMeasurements(getWidth));
713
713
  },
714
714
  rightMostElement: function rightMostElement() {
715
- return getMaxElement("right", getAllElements());
715
+ return getMaxElement('right', getAllElements());
716
716
  },
717
717
  taggedElement: function getTaggedElementsWidth() {
718
- return getTaggedElements("right", "data-iframe-width");
718
+ return getTaggedElements('right', 'data-iframe-width');
719
719
  }
720
720
  };
721
721
  function sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth) {
@@ -744,7 +744,7 @@ var $b2e1fd3e30ab1f5c$exports = {};
744
744
  return heightCalcMode in resetRequiredMethods || calculateWidth && widthCalcMode in resetRequiredMethods;
745
745
  }
746
746
  function logIgnored() {
747
- log("No change in size detected");
747
+ log('No change in size detected');
748
748
  }
749
749
  function checkDownSizing() {
750
750
  if (isForceResizableEvent() && isForceResizableCalcMode()) resetIFrame(triggerEventDesc);
@@ -753,7 +753,7 @@ var $b2e1fd3e30ab1f5c$exports = {};
753
753
  })) logIgnored();
754
754
  }
755
755
  var currentHeight, currentWidth;
756
- if (isSizeChangeDetected() || "init" === triggerEvent) {
756
+ if (isSizeChangeDetected() || 'init' === triggerEvent) {
757
757
  lockTrigger();
758
758
  resizeIFrame();
759
759
  } else checkDownSizing();
@@ -765,28 +765,28 @@ var $b2e1fd3e30ab1f5c$exports = {};
765
765
  reset: 1,
766
766
  resetPage: 1,
767
767
  init: 1
768
- })) log("Trigger event: " + triggerEventDesc);
768
+ })) log('Trigger event: ' + triggerEventDesc);
769
769
  }
770
770
  function isDoubleFiredEvent() {
771
771
  return triggerLocked && triggerEvent in doubleEventList;
772
772
  }
773
- if (isDoubleFiredEvent()) log("Trigger event cancelled: " + triggerEvent);
773
+ if (isDoubleFiredEvent()) log('Trigger event cancelled: ' + triggerEvent);
774
774
  else {
775
775
  recordTrigger();
776
- if (triggerEvent === "init") sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth);
776
+ if (triggerEvent === 'init') sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth);
777
777
  else sizeIFrameThrottled(triggerEvent, triggerEventDesc, customHeight, customWidth);
778
778
  }
779
779
  }
780
780
  function lockTrigger() {
781
781
  if (!triggerLocked) {
782
782
  triggerLocked = true;
783
- log("Trigger event lock on");
783
+ log('Trigger event lock on');
784
784
  }
785
785
  clearTimeout(triggerLockedTimer);
786
786
  triggerLockedTimer = setTimeout(function() {
787
787
  triggerLocked = false;
788
- log("Trigger event lock off");
789
- log("--");
788
+ log('Trigger event lock off');
789
+ log('--');
790
790
  }, eventCancelTimer);
791
791
  }
792
792
  function triggerReset(triggerEvent) {
@@ -797,19 +797,19 @@ var $b2e1fd3e30ab1f5c$exports = {};
797
797
  function resetIFrame(triggerEventDesc) {
798
798
  var hcm = heightCalcMode;
799
799
  heightCalcMode = heightCalcModeDefault;
800
- log("Reset trigger event: " + triggerEventDesc);
800
+ log('Reset trigger event: ' + triggerEventDesc);
801
801
  lockTrigger();
802
- triggerReset("reset");
802
+ triggerReset('reset');
803
803
  heightCalcMode = hcm;
804
804
  }
805
805
  function sendMsg(height, width, triggerEvent, msg, targetOrigin) {
806
806
  function setTargetOrigin() {
807
807
  if (undefined === targetOrigin) targetOrigin = targetOriginDefault;
808
- else log("Message targetOrigin: " + targetOrigin);
808
+ else log('Message targetOrigin: ' + targetOrigin);
809
809
  }
810
810
  function sendToParent() {
811
- var size = height + ":" + width, message = myID + ":" + size + ":" + triggerEvent + (undefined === msg ? "" : ":" + msg);
812
- log("Sending message to host page (" + message + ")");
811
+ var size = height + ':' + width, message = myID + ':' + size + ':' + triggerEvent + (undefined === msg ? '' : ':' + msg);
812
+ log('Sending message to host page (' + message + ')');
813
813
  target.postMessage(msgID + message, targetOrigin);
814
814
  }
815
815
  if (true === sendPermit) {
@@ -829,14 +829,14 @@ var $b2e1fd3e30ab1f5c$exports = {};
829
829
  }, eventCancelTimer);
830
830
  },
831
831
  reset: function resetFromParent() {
832
- if (initLock) log("Page reset ignored by init");
832
+ if (initLock) log('Page reset ignored by init');
833
833
  else {
834
- log("Page size reset by host page");
835
- triggerReset("resetPage");
834
+ log('Page size reset by host page');
835
+ triggerReset('resetPage');
836
836
  }
837
837
  },
838
838
  resize: function resizeFromParent() {
839
- sendSize("resizeParent", "Parent window requested size check");
839
+ sendSize('resizeParent', 'Parent window requested size check');
840
840
  },
841
841
  moveToAnchor: function moveToAnchorF() {
842
842
  inPageLinks.findTarget(getData());
@@ -846,35 +846,35 @@ var $b2e1fd3e30ab1f5c$exports = {};
846
846
  },
847
847
  pageInfo: function pageInfoFromParent() {
848
848
  var msgBody = getData();
849
- log("PageInfoFromParent called from parent: " + msgBody);
849
+ log('PageInfoFromParent called from parent: ' + msgBody);
850
850
  onPageInfo(JSON.parse(msgBody));
851
- log(" --");
851
+ log(' --');
852
852
  },
853
853
  message: function messageFromParent() {
854
854
  var msgBody = getData();
855
- log("onMessage called from parent: " + msgBody);
855
+ log('onMessage called from parent: ' + msgBody);
856
856
  // eslint-disable-next-line sonarjs/no-extra-arguments
857
857
  onMessage(JSON.parse(msgBody));
858
- log(" --");
858
+ log(' --');
859
859
  }
860
860
  };
861
861
  function isMessageForUs() {
862
- return msgID === ("" + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages
862
+ return msgID === ('' + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages
863
863
  ;
864
864
  }
865
865
  function getMessageType() {
866
- return event.data.split("]")[1].split(":")[0];
866
+ return event.data.split(']')[1].split(':')[0];
867
867
  }
868
868
  function getData() {
869
- return event.data.slice(event.data.indexOf(":") + 1);
869
+ return event.data.slice(event.data.indexOf(':') + 1);
870
870
  }
871
871
  function isMiddleTier() {
872
- return !(0, $b2e1fd3e30ab1f5c$exports) && "iFrameResize" in window || window.jQuery !== undefined && "iFrameResize" in window.jQuery.prototype;
872
+ return !(0, $b2e1fd3e30ab1f5c$exports) && 'iFrameResize' in window || window.jQuery !== undefined && 'iFrameResize' in window.jQuery.prototype;
873
873
  }
874
874
  function isInitMsg() {
875
875
  // Test if this message is from a child below us. This is an ugly test, however, updating
876
876
  // the message format would break backwards compatibility.
877
- return event.data.split(":")[2] in {
877
+ return event.data.split(':')[2] in {
878
878
  true: 1,
879
879
  false: 1
880
880
  };
@@ -882,7 +882,7 @@ var $b2e1fd3e30ab1f5c$exports = {};
882
882
  function callFromParent() {
883
883
  var messageType = getMessageType();
884
884
  if (messageType in processRequestFromParent) processRequestFromParent[messageType]();
885
- else if (!isMiddleTier() && !isInitMsg()) warn("Unexpected message (" + event.data + ")");
885
+ else if (!isMiddleTier() && !isInitMsg()) warn('Unexpected message (' + event.data + ')');
886
886
  }
887
887
  function processMessage() {
888
888
  if (false === firstRun) callFromParent();
@@ -894,10 +894,10 @@ var $b2e1fd3e30ab1f5c$exports = {};
894
894
  // Normally the parent kicks things off when it detects the iFrame has loaded.
895
895
  // If this script is async-loaded, then tell parent page to retry init.
896
896
  function chkLateLoaded() {
897
- if ("loading" !== document.readyState) window.parent.postMessage("[iFrameResizerChild]Ready", "*");
897
+ if ('loading' !== document.readyState) window.parent.postMessage('[iFrameResizerChild]Ready', '*');
898
898
  }
899
- addEventListener(window, "message", receiver);
900
- addEventListener(window, "readystatechange", chkLateLoaded);
899
+ addEventListener(window, 'message', receiver);
900
+ addEventListener(window, 'readystatechange', chkLateLoaded);
901
901
  chkLateLoaded();
902
902
  })();
903
903