3 lines
5.3 KiB
JavaScript
3 lines
5.3 KiB
JavaScript
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(t.contentLoaders={})}(this,function(t){"use strict";var r=/^(attrs|props|on|nativeOn|class|style|hook)$/,e=function(t){return t.reduce(function(t,e){var a,n,s,o,y;for(s in e)if(a=t[s],n=e[s],a&&r.test(s))if("class"===s&&("string"==typeof a&&(y=a,t[s]=a={},a[y]=!0),"string"==typeof n&&(y=n,e[s]=n={},n[y]=!0)),"on"===s||"nativeOn"===s||"hook"===s)for(o in n)a[o]=i(a[o],n[o]);else if(Array.isArray(a))t[s]=a.concat(n);else if(Array.isArray(n))t[s]=[a].concat(n);else for(o in n)a[o]=n[o];else t[s]=e[s];return t},{})};function i(t,r){return function(){t&&t.apply(this,arguments),r&&r.apply(this,arguments)}}var a=function(){return Math.random().toString(36).substring(2)},n={name:"ContentLoader",functional:!0,props:{width:{type:[Number,String],default:400},height:{type:[Number,String],default:130},speed:{type:Number,default:2},preserveAspectRatio:{type:String,default:"xMidYMid meet"},baseUrl:{type:String,default:""},primaryColor:{type:String,default:"#f9f9f9"},secondaryColor:{type:String,default:"#ecebeb"},primaryOpacity:{type:Number,default:1},secondaryOpacity:{type:Number,default:1},uniqueKey:{type:String},animate:{type:Boolean,default:!0}},render:function(t,r){var i=r.props,n=r.data,s=r.children,o=i.uniqueKey?i.uniqueKey+"-idClip":a(),y=i.uniqueKey?i.uniqueKey+"-idGradient":a();return t("svg",e([n,{attrs:{viewBox:"0 0 "+i.width+" "+i.height,version:"1.1",preserveAspectRatio:i.preserveAspectRatio}}]),[t("rect",{style:{fill:"url("+i.baseUrl+"#"+y+")"},attrs:{"clip-path":"url("+i.baseUrl+"#"+o+")",x:"0",y:"0",width:i.width,height:i.height}}),t("defs",[t("clipPath",{attrs:{id:o}},[s||t("rect",{attrs:{x:"0",y:"0",rx:"5",ry:"5",width:i.width,height:i.height}})]),t("linearGradient",{attrs:{id:y}},[t("stop",{attrs:{offset:"0%","stop-color":i.primaryColor,"stop-opacity":i.primaryOpacity}},[i.animate?t("animate",{attrs:{attributeName:"offset",values:"-2; 1",dur:i.speed+"s",repeatCount:"indefinite"}}):null]),t("stop",{attrs:{offset:"50%","stop-color":i.secondaryColor,"stop-opacity":i.secondaryOpacity}},[i.animate?t("animate",{attrs:{attributeName:"offset",values:"-1.5; 1.5",dur:i.speed+"s",repeatCount:"indefinite"}}):null]),t("stop",{attrs:{offset:"100%","stop-color":i.primaryColor,"stop-opacity":i.primaryOpacity}},[i.animate?t("animate",{attrs:{attributeName:"offset",values:"-1; 2",dur:i.speed+"s",repeatCount:"indefinite"}}):null])])])])}},s={name:"BulletListLoader",functional:!0,render:function(t,r){var e=r.data;return t(n,e,[t("circle",{attrs:{cx:"10",cy:"20",r:"8"}}),t("rect",{attrs:{x:"25",y:"15",rx:"5",ry:"5",width:"220",height:"10"}}),t("circle",{attrs:{cx:"10",cy:"50",r:"8"}}),t("rect",{attrs:{x:"25",y:"45",rx:"5",ry:"5",width:"220",height:"10"}}),t("circle",{attrs:{cx:"10",cy:"80",r:"8"}}),t("rect",{attrs:{x:"25",y:"75",rx:"5",ry:"5",width:"220",height:"10"}}),t("circle",{attrs:{cx:"10",cy:"110",r:"8"}}),t("rect",{attrs:{x:"25",y:"105",rx:"5",ry:"5",width:"220",height:"10"}})])}},o={name:"CodeLoader",functional:!0,render:function(t,r){var e=r.data;return t(n,e,[t("rect",{attrs:{x:"0",y:"0",rx:"3",ry:"3",width:"70",height:"10"}}),t("rect",{attrs:{x:"80",y:"0",rx:"3",ry:"3",width:"100",height:"10"}}),t("rect",{attrs:{x:"190",y:"0",rx:"3",ry:"3",width:"10",height:"10"}}),t("rect",{attrs:{x:"15",y:"20",rx:"3",ry:"3",width:"130",height:"10"}}),t("rect",{attrs:{x:"155",y:"20",rx:"3",ry:"3",width:"130",height:"10"}}),t("rect",{attrs:{x:"15",y:"40",rx:"3",ry:"3",width:"90",height:"10"}}),t("rect",{attrs:{x:"115",y:"40",rx:"3",ry:"3",width:"60",height:"10"}}),t("rect",{attrs:{x:"185",y:"40",rx:"3",ry:"3",width:"60",height:"10"}}),t("rect",{attrs:{x:"0",y:"60",rx:"3",ry:"3",width:"30",height:"10"}})])}},y={name:"FacebookLoader",functional:!0,render:function(t,r){var e=r.data;return t(n,e,[t("rect",{attrs:{x:"70",y:"15",rx:"4",ry:"4",width:"117",height:"6.4"}}),t("rect",{attrs:{x:"70",y:"35",rx:"3",ry:"3",width:"85",height:"6.4"}}),t("rect",{attrs:{x:"0",y:"80",rx:"3",ry:"3",width:"350",height:"6.4"}}),t("rect",{attrs:{x:"0",y:"100",rx:"3",ry:"3",width:"380",height:"6.4"}}),t("rect",{attrs:{x:"0",y:"120",rx:"3",ry:"3",width:"201",height:"6.4"}}),t("circle",{attrs:{cx:"30",cy:"30",r:"30"}})])}},h={name:"ListLoader",functional:!0,render:function(t,r){var e=r.data;return t(n,e,[t("rect",{attrs:{x:"0",y:"0",rx:"3",ry:"3",width:"250",height:"10"}}),t("rect",{attrs:{x:"20",y:"20",rx:"3",ry:"3",width:"220",height:"10"}}),t("rect",{attrs:{x:"20",y:"40",rx:"3",ry:"3",width:"170",height:"10"}}),t("rect",{attrs:{x:"0",y:"60",rx:"3",ry:"3",width:"250",height:"10"}}),t("rect",{attrs:{x:"20",y:"80",rx:"3",ry:"3",width:"200",height:"10"}}),t("rect",{attrs:{x:"20",y:"100",rx:"3",ry:"3",width:"80",height:"10"}})])}},c={name:"InstagramLoader",functional:!0,render:function(t,r){var i=r.data;return t(n,e([i,{attrs:{height:480}}]),[t("circle",{attrs:{cx:"30",cy:"30",r:"30"}}),t("rect",{attrs:{x:"75",y:"13",rx:"4",ry:"4",width:"100",height:"13"}}),t("rect",{attrs:{x:"75",y:"37",rx:"4",ry:"4",width:"50",height:"8"}}),t("rect",{attrs:{x:"0",y:"70",rx:"5",ry:"5",width:"400",height:"400"}})])}};t.ContentLoader=n,t.BulletListLoader=s,t.CodeLoader=o,t.FacebookLoader=y,t.ListLoader=h,t.InstagramLoader=c,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
//# sourceMappingURL=vue-content-loader.min.js.map
|