This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.85c6fb82.js
6 lines (6 loc) · 4.64 KB
/
main.85c6fb82.js
1
2
3
4
5
6
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Q13x":[function(require,module,exports) {
"use strict";function t(t,n){return a(t)||o(t,n)||r(t,n)||e()}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=t[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(c){o=!0,a=c}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}}function a(t){if(Array.isArray(t))return t}function i(e,r){var n=r.sprinkleElements,o=r.colors;console.log(e),n||(n=l());var a=2*(e.clientWidth+e.clientHeight),i=Math.ceil(a/500);console.log(i),console.log(n);for(var s=0;s<i;s++){var u=f(n).cloneNode(!0);u.style.stroke=f(o);var d=t(c(e),2),p=d[0],y=d[1];u.style.left="".concat(p,"px"),u.style.top="".concat(y,"px"),u.animate([{transform:"rotate(0deg) translateY(0px) rotate(0deg)"},{transform:"rotate(".concat(360*Math.random(),"deg) translateY(").concat(30+100*Math.random(),"px) rotate(").concat(1e3*Math.random(),"deg)")},{transform:"rotate(".concat(720*Math.random(),"deg) translateY(0px) rotate(").concat(1e3*Math.random(),"deg)")}],{duration:8e3,direction:"alternate",iterationStart:Math.random(),easing:"linear",iterations:1/0}),document.querySelector("body").append(u)}}function l(){return[s(),u()]}function c(t){return[t.offsetLeft+Math.random()*t.clientWidth,t.offsetTop+Math.random()*t.clientHeight]}function s(){var t=d(),e=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return e.setAttribute("cx","20"),e.setAttribute("cy","20"),e.setAttribute("rx","15"),e.setAttribute("ry","15"),t.appendChild(e),t}function u(){var t=d(),e=document.createElementNS("http://www.w3.org/2000/svg","line"),r=document.createElementNS("http://www.w3.org/2000/svg","line");return e.setAttribute("x1","5"),e.setAttribute("y1","5"),e.setAttribute("x2","35"),e.setAttribute("y2","35"),r.setAttribute("x1","35"),r.setAttribute("y1","5"),r.setAttribute("x2","5"),r.setAttribute("y2","35"),t.append(e),t.append(r),t}function d(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 40 40"),t.style.position="absolute",t.style["z-index"]="0",t.style.strokeWidth="5px",t.style.stroke="black",t.style.height="1.5em",t.style.fill="none",t}function f(t){return t[Math.floor(Math.random()*t.length)]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.sprinkle=i;
},{}],"d6sW":[function(require,module,exports) {
"use strict";var e=require("./sprinkle.js");function n(){(0,e.sprinkle)(document.querySelector("h1"),{sprinkleElements:null,colors:["#10305f","#ebf1f4"]}),(0,e.sprinkle)(document.querySelector("#sekcja2 img"),{sprinkleElements:null,colors:["#ef420c","#10305f","#9dabbc"]}),(0,e.sprinkle)(document.querySelector("#sekcja4"),{sprinkleElements:null,colors:["#ef420c","#10305f","#9dabbc"]})}function r(){document.querySelectorAll('a[href^="#"]').forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),document.querySelector(this.getAttribute("href")).scrollIntoView({behavior:"smooth"})})})}window.onload=function(){r()};
},{"./sprinkle.js":"Q13x"}]},{},["d6sW"], null)
//# sourceMappingURL=main.85c6fb82.js.map