1 line
48 KiB
Plaintext
1 line
48 KiB
Plaintext
|
{"version":3,"file":"venobox.min.js","sources":["../src/venobox.esm.js"],"sourcesContent":["/**\n * VenoBox 2.0.4\n * Copyright 2013-2021 Nicola Franchini\n * @license: https://github.com/nicolafranchini/VenoBox/blob/master/LICENSE\n */\nlet backdrop, blocknum, blockshare, blocktitle, core, container, content, current_item, current_index, diffX, diffY, endY, elPreloader, elPreloaderInner;\nlet gallIndex, images, infinigall, items, navigationDisabled, newcontent, numeratio, nextok, prevok, overlay;\nlet set_maxWidth, set_overlayColor, set_ratio, set_autoplay, set_href, set_customclass, startY, thenext, theprev, thisborder, thisgall, title, throttle;\n\nconst svgOpen = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 16 16\" fill=\"currentColor\">';\nconst svgClose = '</svg>';\nconst downloadIcon = svgOpen + '<path d=\"M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z\"/><path d=\"M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z\"/>' + svgClose;\nconst shareIcon = svgOpen + '<path fill-rule=\"evenodd\" d=\"M3.5 6a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 1 0-1h2A1.5 1.5 0 0 1 14 6.5v8a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 14.5v-8A1.5 1.5 0 0 1 3.5 5h2a.5.5 0 0 1 0 1h-2z\"/><path fill-rule=\"evenodd\" d=\"M7.646.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 1.707V10.5a.5.5 0 0 1-1 0V1.707L5.354 3.854a.5.5 0 1 1-.708-.708l3-3z\"/>' + svgClose;\nconst linkIcon = svgOpen + '<path fill-rule=\"evenodd\" d=\"M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z\"/><path d=\"M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z\"/><path d=\"M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z\"/>' + svgClose;\nconst imagesHolder = document.createElement('div');\n\nlet startX = 0;\nlet endX = 0;\nlet diff = 0;\nlet threshold = 50;\nlet startouch = false;\nlet imgLoader = new Image();\n\nconst spinners = {\n 'bounce': ['sk-bounce', 'sk-bounce-dot', 2],\n 'chase': ['sk-chase', 'sk-chase-dot', 6],\n 'circle': ['sk-circle', 'sk-circle-dot', 12],\n 'circle-fade': ['sk-circle-fade', 'sk-circle-fade-dot', 12],\n 'flow': ['sk-flow', 'sk-flow-dot', 3],\n 'fold': ['sk-fold', 'sk-fold-cube', 4],\n 'grid': ['sk-grid', 'sk-grid-cube', 9],\n 'plane': ['sk-plane', '', 0],\n 'pulse': ['sk-pulse', '', 5],\n 'swing': ['sk-swing', 'sk-swing-dot', 2],\n 'wander': ['sk-wander', 'sk-wander-cube', 3],\n 'wave': ['sk-wave', 'sk-wave-rec', 5]\n};\n\n// Default settings\nconst defaults = {\n selector: '.venobox',\n autoplay : false,\n bgcolor: '#fff',\n border: '0',\n customClass: false,\n infinigall: false,\n maxWidth: '100%',\n navigation: true,\n navKeyboard: true,\n navTouch: true,\n navSpeed: 300,\n numeration: false,\n overlayClose: true,\n overlayColor: 'rgba(23,23,23,0.95)',\n popup: false,\n ratio: '16x9', // '1x1' | '4x3' | '16x9' | '21x9'\n share: false,\n shareStyle: 'pill', // 'bar' | 'block' | 'pill' | 'transparent'\n spinner: 'bounce', // 'plane' | 'chase' | 'bounce' | 'wave' | 'pulse' | 'flow' | 'swing' | 'circle' | 'circle-fade' | 'grid' | 'fold' | 'wander'\n spinColor : '#d2d2d2',\n titleattr: 'title',\n titlePosition: 'top', // 'top' || 'bottom'\n titleStyle: 'bar', // 'bar' | 'block' | 'pill' | 'transparent'\n toolsBackground: '#1C1C1C', // 'transparent'\n toolsColor: '#d2d2d2',\n onPreOpen: function(){ return true; }, // Return the selected object - set return false to prevent opening\n onPostOpen: function(){}, // Return: current_item, gallIndex, thenext, theprev\n onPreClos
|