Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng-cloudimage-responsive

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-cloudimage-responsive - npm Package Compare versions

Comparing version 0.0.4 to 1.0.0

esm2015/lib/config.model.js

331

bundles/ng-cloudimage-responsive.umd.js

@@ -7,2 +7,58 @@ (function (global, factory) {

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var __assign = function () {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
}
catch (error) {
e = { error: error };
}
finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
}
finally {
if (e)
throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/**

@@ -39,15 +95,14 @@ * @fileoverview added by tsickle

baseUrl: baseUrl,
presets: presets ? this.getPresets(presets, 'presets') :
presets: presets ? presets :
{
xs: 575,
// up to 576 PHONE
sm: 767,
// 577 - 768 PHABLET
md: 991,
// 769 - 992 TABLET
lg: 1199,
// 993 - 1200 SMALL_LAPTOP_SCREEN
xl: 3000 // from 1200 USUALSCREEN
xs: '(max-width: 575px)',
// to 575 PHONE
sm: '(min-width: 576px)',
// 576 - 767 PHABLET
md: '(min-width: 768px)',
// 768 - 991 TABLET
lg: '(min-width: 992px)',
// 992 - 1199 SMALL_LAPTOP_SCREEN
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
},
order: presets ? this.getPresets(presets, 'order') : ['xl', 'lg', 'md', 'sm', 'xs'],
queryString: queryString,

@@ -58,34 +113,2 @@ innerWidth: window.innerWidth,

/**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
CIService.prototype.getPresets = /**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
function (value, type) {
if (value === void 0) {
value = '';
}
/** @type {?} */
var splittedValues = value.split('|');
/** @type {?} */
var result = { presets: {}, order: [] };
for (var i = 0; i < splittedValues.length; i++) {
/** @type {?} */
var splittedParam = splittedValues[i] && splittedValues[i].split(':');
/** @type {?} */
var prop = splittedParam[0] && splittedParam[0].trim();
/** @type {?} */
var val = splittedParam[1] && splittedParam[1].trim();
if (prop && val) {
result.presets[prop] = val;
result.order.unshift(prop);
}
}
return result[type];
};
/**
* @param {?} img

@@ -137,3 +160,7 @@ * @param {?} config

} while (parentNode && !width);
return width;
/** @type {?} */
var letPadding = width && parentNode && parseInt(window.getComputedStyle(parentNode).paddingLeft, 10);
/** @type {?} */
var rightPadding = parseInt(window.getComputedStyle(parentNode).paddingRight, 10);
return width + (width ? (-letPadding - rightPadding) : 0);
};

@@ -149,26 +176,9 @@ /**

function (currentSize) {
return currentSize <= 25 ? '25' :
currentSize <= 50 ? '50' :
currentSize <= 100 ? '100'
: currentSize <= 200 ? '200'
: currentSize <= 300 ? '300'
: currentSize <= 400 ? '400'
: currentSize <= 500 ? '500'
: currentSize <= 600 ? '600'
: currentSize <= 700 ? '700'
: currentSize <= 800 ? '800'
: currentSize <= 900 ? '900'
: currentSize <= 1000 ? '1000'
: currentSize <= 1100 ? '1100'
: currentSize <= 1200 ? '1200'
: currentSize <= 1300 ? '1300'
: currentSize <= 1400 ? '1400'
: currentSize <= 1500 ? '1500'
: currentSize <= 1600 ? '1600'
: currentSize <= 1700 ? '1700'
: currentSize <= 1800 ? '1800'
: currentSize <= 1900 ? '1900'
: currentSize <= 2400 ? '2400'
: currentSize <= 2800 ? '2800'
: '3600';
if (currentSize <= 25) {
return '25';
}
if (currentSize <= 50) {
return '50';
}
return (Math.ceil(currentSize / 100) * 100).toString();
};

@@ -184,3 +194,10 @@ /**

function (size) {
return size && typeof size === 'object';
try {
/** @type {?} */
var array = size.split(',');
return array.length > 1;
}
catch (e) {
return false;
}
};

@@ -288,34 +305,22 @@ /**

function (operation, size, filters, imgSrc, isAdaptive, config, isPreview) {
var _this = this;
/** @type {?} */
var sources = [];
if (isAdaptive) {
/** @type {?} */
var orderFiltered = [];
for (var i = 0; i < config.order.length; i++) {
/** @type {?} */
var nextSize = size[config.order[i]];
if (nextSize) {
orderFiltered.unshift(config.order[i]);
}
}
for (var i = 0; i < orderFiltered.length; i++) {
/** @type {?} */
var isLast = !(i < orderFiltered.length - 1);
/** @type {?} */
var nextSizeType = isLast ? orderFiltered[i - 1] : orderFiltered[i];
/** @type {?} */
var nextSize = size[orderFiltered[i]];
size.forEach(function (_a) {
var nextSize = _a.size, mediaQuery = _a.media;
if (isPreview) {
nextSize = nextSize.split('x').map(function (item) { return item / 5; }).join('x');
nextSize = nextSize.split('x').map(function (sizeNext) { return sizeNext / 5; }).join('x');
filters = 'q10.foil1';
}
/** @type {?} */
var srcSet = this.generateSrcset(operation, nextSize, filters, imgSrc, config);
/** @type {?} */
var mediaQuery = '(' + (isLast ? 'min' : 'max') + '-width: ' + (config.presets[nextSizeType] + (isLast ? 1 : 0)) + 'px)';
sources.push({ mediaQuery: mediaQuery, srcSet: srcSet });
}
sources.push({ mediaQuery: mediaQuery, srcSet: _this.generateSrcset(operation, nextSize, filters, imgSrc, config) });
});
}
else {
if (isPreview) {
size = size.split('x').map(function (sizeNext) { return sizeNext / 5; }).join('x');
filters = 'q10.foil1';
}
sources.push({
srcSet: this.generateSrcset(operation, size.split('x').map(function (item) { return item / 5; }).join('x'), 'q10.foil1', imgSrc, config)
srcSet: this.generateSrcset(operation, size, filters, imgSrc, config)
});

@@ -326,2 +331,26 @@ }

/**
* @param {?} size
* @param {?} config
* @return {?}
*/
CIService.prototype.getAdaptiveSize = /**
* @param {?} size
* @param {?} config
* @return {?}
*/
function (size, config) {
/** @type {?} */
var arrayOfSizes = size.split(',');
/** @type {?} */
var sizes = [];
arrayOfSizes.forEach(function (string) {
/** @type {?} */
var groups = string.match(/((?<variable>[a-z_][a-z_]*)|(?<media>\([\S\s]*\)))\s*(?<size>[0-9xp]*)/).groups;
/** @type {?} */
var media = groups.media ? groups.media : config.presets[groups.variable];
sizes.push({ media: media, size: groups.size });
});
return sizes;
};
/**
* @param {?} operation

@@ -343,6 +372,3 @@ * @param {?} size

function (operation, size, filters, imgSrc, config) {
/** @type {?} */
var imgWidth = size.toString().split('x')[0];
/** @type {?} */
var imgHeight = size.toString().split('x')[1];
var _a = __read(size.toString().split('x'), 2), imgWidth = _a[0], imgHeight = _a[1];
return this.generateImgSrc(operation, filters, imgSrc, imgWidth, imgHeight, 1, config);

@@ -393,2 +419,3 @@ };

function (size, config) {
var _a, _b;
/** @type {?} */

@@ -400,29 +427,9 @@ var width;

/** @type {?} */
var breakPoint = this.getBreakPoint(config);
var breakPointSource = this.getBreakPoint(size);
/** @type {?} */
var orderIndex = config.order.indexOf(breakPoint);
/** @type {?} */
var breakPointSize = null;
do {
/** @type {?} */
var nextBreakpoint = config.order[orderIndex];
breakPointSize = size[nextBreakpoint];
orderIndex--;
} while (!breakPointSize && orderIndex >= 0);
if (!breakPointSize) {
/** @type {?} */
var orderIndexStepTwo = config.order.indexOf(breakPoint);
do {
/** @type {?} */
var nextBreakpoint = config.order[orderIndexStepTwo];
breakPointSize = size[nextBreakpoint];
orderIndexStepTwo++;
} while (!breakPointSize && orderIndexStepTwo <= config.order.length);
}
width = breakPointSize.toString().split('x')[0];
height = breakPointSize.toString().split('x')[1];
var breakPointSize = breakPointSource ? breakPointSource.size : size[0].size;
_a = __read(breakPointSize.toString().split('x'), 2), width = _a[0], height = _a[1];
}
else {
width = size.toString().split('x')[0];
height = size.toString().split('x')[1];
_b = __read(size.toString().split('x'), 2), width = _b[0], height = _b[1];
}

@@ -435,16 +442,11 @@ if (width && height) {

/**
* @param {?} config
* @param {?} size
* @return {?}
*/
CIService.prototype.getBreakPoint = /**
* @param {?} config
* @param {?} size
* @return {?}
*/
function (config) {
var presets = config.presets, order = config.order;
/** @type {?} */
var innerWidth = window.innerWidth;
/** @type {?} */
var prevBreakPointLimit = order.findIndex(function (item) { return presets[item] < innerWidth; });
return order[prevBreakPointLimit - 1] || order[prevBreakPointLimit] || order[order.length - 1];
function (size) {
return __spread(size).reverse().find(function (item) { return matchMedia(item.media).matches; });
};

@@ -466,29 +468,2 @@ CIService.decorators = [

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var __assign = function () {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
/**

@@ -502,5 +477,8 @@ * @fileoverview added by tsickle

this._sanitizer = _sanitizer;
this.class = '';
this.offset = 100;
this.cloudimageUrl = '';
this.sources = [];
this.firstSource = null;
this.restSources = [];
this.isLoaded = false;

@@ -530,8 +508,5 @@ this.isProcessed = false;

this.resizeSubscription$ = this.resizeObservable$.subscribe(function () {
if (_this.isAdaptive) {
if (_this.isAdaptive || _this.windowInnerWidth < window.innerWidth) {
_this.processImage();
}
else if (_this.windowInnerWidth < window.innerWidth) {
_this.processImage();
}
_this.windowInnerWidth = window.innerWidth;

@@ -570,2 +545,3 @@ });

var isAdaptive = this.ciService.checkOnMedia(size);
size = isAdaptive ? this.ciService.getAdaptiveSize(size, config) : size;
/** @type {?} */

@@ -579,3 +555,3 @@ var isRelativeUrlPath = this.ciService.checkIfRelativeUrlPath(this.src);

this.cloudimageUrl = isAdaptive ?
this.ciService.generateUrl('width', parentContainerWidth, filters, imgSrc, config) :
this.ciService.generateUrl('width', this.ciService.getSizeAccordingToPixelRatio(parentContainerWidth), filters, imgSrc, config) :
this.ciService.generateUrl(operation, resultSize, filters, imgSrc, config);

@@ -632,2 +608,25 @@ this.sources = isAdaptive ?

*/
ImgComponent.prototype.getRestSources = /**
* @return {?}
*/
function () {
/** @type {?} */
var resultSources = __spread((!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources)));
return resultSources.slice(1).reverse();
};
/**
* @return {?}
*/
ImgComponent.prototype.getFirstSource = /**
* @return {?}
*/
function () {
/** @type {?} */
var resultSources = __spread((!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources)));
this.firstSource = resultSources[0];
return resultSources[0];
};
/**
* @return {?}
*/
ImgComponent.prototype.getPositionStyle = /**

@@ -646,3 +645,5 @@ * @return {?}

function () {
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
// todo check if we need 100% height
// return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'auto' : 'auto');
};

@@ -724,3 +725,3 @@ /**

var result = 'transparent';
if (this.isRatio) {
if (this.isRatio && !this.isPreviewLoaded && !this.isLoaded) {
result = config.placeholderBackground;

@@ -733,3 +734,3 @@ }

selector: 'ci-img',
template: "\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "
template: "\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of getRestSources()\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"getFirstSource()\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of restSources\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"firstSource\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "
}] }

@@ -736,0 +737,0 @@ ];

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("ng-lazyload-image")):"function"==typeof define&&define.amd?define("ng-cloudimage-responsive",["exports","@angular/common","@angular/core","@angular/platform-browser","rxjs","rxjs/operators","ng-lazyload-image"],t):t(e["ng-cloudimage-responsive"]={},e.ng.common,e.ng.core,e.ng.platformBrowser,e.rxjs,e.rxjs.operators,e.ngLazyloadImage)}(this,function(e,t,i,r,n,o,s){"use strict";var a=function u(){},c=function(){function e(e){this.config={};var t=e.token,i=void 0===t?"":t,r=e.container,n=void 0===r?"cloudimg.io":r,o=e.ultraFast,s=void 0!==o&&o,a=e.lazyLoading,c=void 0===a||a,l=e.imgLoadingAnimation,d=void 0===l||l,u=e.lazyLoadOffset,g=void 0===u?100:u,p=e.width,h=void 0===p?"400":p,f=e.height,y=void 0===f?"300":f,m=e.operation,v=void 0===m?"width":m,S=e.filters,w=void 0===S?"n":S,I=e.placeholderBackground,P=void 0===I?"#f4f4f4":I,x=e.baseUrl,L=void 0===x?"/":x,b=e.presets,z=e.queryString,k=void 0===z?"":z;this.config={token:i,container:n,ultraFast:s,lazyLoading:c,imgLoadingAnimation:d,lazyLoadOffset:g,width:h,height:y,operation:v,filters:w,placeholderBackground:P,baseUrl:L,presets:b?this.getPresets(b,"presets"):{xs:575,sm:767,md:991,lg:1199,xl:3e3},order:b?this.getPresets(b,"order"):["xl","lg","md","sm","xs"],queryString:k,innerWidth:window.innerWidth}}return e.prototype.getPresets=function(e,t){void 0===e&&(e="");for(var i=e.split("|"),r={presets:{},order:[]},n=0;n<i.length;n++){var o=i[n]&&i[n].split(":"),s=o[0]&&o[0].trim(),a=o[1]&&o[1].trim();s&&a&&(r.presets[s]=a,r.order.unshift(s))}return r[t]},e.prototype.getParentWidth=function(e,t){if(!(e&&e.parentElement&&e.parentElement.getBoundingClientRect||e&&e.width))return t.width;var i=this.getParentContainerWithWidth(e),r=parseInt(""+i,10),n=Number(window.getComputedStyle(e).width);return n&&n<r&&15<n||!r?this.getSizeLimit(n):r?this.getSizeLimit(r):e.width||t.width},e.prototype.getParentContainerWithWidth=function(e){for(var t=null,i=0;i=(t=t&&t.parentNode||e.parentNode).getBoundingClientRect().width,t&&!i;);return i},e.prototype.getSizeLimit=function(e){return e<=25?"25":e<=50?"50":e<=100?"100":e<=200?"200":e<=300?"300":e<=400?"400":e<=500?"500":e<=600?"600":e<=700?"700":e<=800?"800":e<=900?"900":e<=1e3?"1000":e<=1100?"1100":e<=1200?"1200":e<=1300?"1300":e<=1400?"1400":e<=1500?"1500":e<=1600?"1600":e<=1700?"1700":e<=1800?"1800":e<=1900?"1900":e<=2400?"2400":e<=2800?"2800":"3600"},e.prototype.checkOnMedia=function(e){return e&&"object"==typeof e},e.prototype.checkIfRelativeUrlPath=function(e){return 0===e.indexOf("//")&&(e=window.location.protocol+e),0!==e.indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("//")},e.prototype.getImgSrc=function(e,t,i){return void 0===t&&(t=!1),void 0===i&&(i=""),t?i+e:e},e.prototype.getSizeAccordingToPixelRatio=function(e){var t=e.toString().split("x"),i=[];return[].forEach.call(t,function(e){i.push(e*Math.round(window.devicePixelRatio||1))}),i.join("x")},e.prototype.generateUrl=function(e,t,i,r,n){return(n.ultraFast?"https://scaleflex.ultrafast.io/":"https://")+n.token+"."+n.container+"/"+e+"/"+t+"/"+i+"/"+r+n.queryString},e.prototype.generateSources=function(e,t,i,r,n,o,s){var a=[];if(n){for(var c=[],l=0;l<o.order.length;l++){(g=t[o.order[l]])&&c.unshift(o.order[l])}for(l=0;l<c.length;l++){var d=!(l<c.length-1),u=d?c[l-1]:c[l],g=t[c[l]];s&&(g=g.split("x").map(function(e){return e/5}).join("x"));var p=this.generateSrcset(e,g,i,r,o),h="("+(d?"min":"max")+"-width: "+(o.presets[u]+(d?1:0))+"px)";a.push({mediaQuery:h,srcSet:p})}}else a.push({srcSet:this.generateSrcset(e,t.split("x").map(function(e){return e/5}).join("x"),"q10.foil1",r,o)});return a},e.prototype.generateSrcset=function(e,t,i,r,n){var o=t.toString().split("x")[0],s=t.toString().split("x")[1];return this.generateImgSrc(e,i,r,o,s,1,n)},e.prototype.generateImgSrc=function(e,t,i,r,n,o,s){var a=""+Math.trunc(r*o);return n&&(a+="x"+Math.trunc(n*o)),this.generateUrl(e,this.getSizeAccordingToPixelRatio(a),t,i,s).replace("http://scaleflex.ultrafast.io/","").replace("https://scaleflex.ultrafast.io/","").replace("//scaleflex.ultrafast.io/","").replace("///","/")},e.prototype.getRatioBySize=function(e,t){var i,r;if("object"==typeof e){var n=this.getBreakPoint(t),o=t.order.indexOf(n),s=null;do{s=e[t.order[o]],o--}while(!s&&0<=o);if(!s){var a=t.order.indexOf(n);do{s=e[t.order[a]],a++}while(!s&&a<=t.order.length)}i=s.toString().split("x")[0],r=s.toString().split("x")[1]}else i=e.toString().split("x")[0],r=e.toString().split("x")[1];return i&&r?i/r:null},e.prototype.getBreakPoint=function(e){var t=e.presets,i=e.order,r=window.innerWidth,n=i.findIndex(function(e){return t[e]<r});return i[n-1]||i[n]||i[i.length-1]},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:a}]},e.ngInjectableDef=i.defineInjectable({factory:function(){return new e(i.inject(a))},token:e,providedIn:"root"}),e}(),f=function(){return(f=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},l=function(){function e(e,t){this.ciService=e,this._sanitizer=t,this.offset=100,this.cloudimageUrl="",this.sources=[],this.isLoaded=!1,this.isProcessed=!1,this.windowInnerWidth=window.innerWidth,this.lazyLoading=e.config.lazyLoading}return e.prototype.ngOnDestroy=function(){this.resizeSubscription$.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.resizeObservable$=n.fromEvent(window,"resize").pipe(o.debounceTime(500)),this.resizeSubscription$=this.resizeObservable$.subscribe(function(){e.isAdaptive?e.processImage():e.windowInnerWidth<window.innerWidth&&e.processImage(),e.windowInnerWidth=window.innerWidth})},e.prototype.ngAfterViewInit=function(){this.processImage()},e.prototype.processImage=function(){var e,t,i=this,r=(this.imgElem||this.pictureElem).nativeElement,n=this.ciService.config,o=this.operation||this.o||n.operation,s=this.ciService.getParentWidth(r,n),a=this.size||this.s||n.size||s,c=this.filters||this.f||n.filters,l=this.ciService.checkOnMedia(a),d=this.ciService.checkIfRelativeUrlPath(this.src),u=this.ciService.getImgSrc(this.src,d,n.baseUrl),g=l?a:this.ciService.getSizeAccordingToPixelRatio(a);if(this.isPreview=!n.isChrome&&400<s&&n.lazyLoading,this.cloudimageUrl=l?this.ciService.generateUrl("width",s,c,u,n):this.ciService.generateUrl(o,g,c,u,n),this.sources=l?this.ciService.generateSources(o,g,c,u,l,n,!1):[],this.isPreview){var p=f({},n,{queryString:""});e=l?this.ciService.generateUrl("width",s/5,"q10.foil1",u,p):this.ciService.generateUrl(o,g.split("x").map(function(e){return e/5}).join("x"),"q10.foil1",u,p),t=l?this.ciService.generateSources(o,g,"q10.foil1",u,l,p,!0):[]}this.previewCloudimageUrl=e,this.previewSources=t,this.isAdaptive=l,this.actualSize=a,this.parentContainerWidth=s;var h=this.ciService.getRatioBySize(a,n);this.imageHeight=Math.floor(s/(h||this.ratio||1.5)),this.isRatio=!(!h&&!this.ratio),this.ratioBySize=h,setTimeout(function(){i.isProcessed=!0})},e.prototype.onImageLoad=function(){this.isPreview?this.isPreviewLoaded?this.isLoaded=!0:this.isPreviewLoaded=!0:(this.isPreviewLoaded=!0,this.isLoaded=!0)},e.prototype.getPositionStyle=function(){return this._sanitizer.bypassSecurityTrustStyle(this.isRatio?"absolute":"relative")},e.prototype.getImgHeight=function(){return this._sanitizer.bypassSecurityTrustStyle(this.isRatio?"100%":"auto")},e.prototype.getTransformStyle=function(){var e=this.ciService.config,t="none";return e.imgLoadingAnimation&&(t="scale3d(1.1, 1.1, 1)"),this.isLoaded&&e.imgLoadingAnimation&&(t="translateZ(0) scale3d(1, 1, 1)"),this._sanitizer.bypassSecurityTrustStyle(t)},e.prototype.getTransitionStyle=function(){var e=this.ciService.config,t="none";return this.isLoaded&&e.imgLoadingAnimation&&(t="all 0.3s ease-in-out"),this._sanitizer.bypassSecurityTrustStyle(t)},e.prototype.getFilterStyle=function(){var e=this.ciService.config,t="none";return e.imgLoadingAnimation&&(t="blur("+Math.floor(parseInt(this.parentContainerWidth,10)/100)+"px)"),this.isLoaded&&e.imgLoadingAnimation&&(t="blur(0px)"),this._sanitizer.bypassSecurityTrustStyle(t)},e.prototype.getPicturePaddingBottom=function(){var e="";return this.isRatio&&(e=100/(this.ratioBySize||this.ratio)+"%"),this._sanitizer.bypassSecurityTrustStyle(e)},e.prototype.getPictureBackground=function(){var e=this.ciService.config,t="transparent";return this.isRatio&&(t=e.placeholderBackground),this._sanitizer.bypassSecurityTrustStyle(t)},e.decorators=[{type:i.Component,args:[{selector:"ci-img",template:'\n <picture #pictureElem *ngIf="!isProcessed"></picture>\n\n <ng-container [ngSwitch]="lazyLoading">\n <ng-container *ngSwitchCase="true">\n <picture\n class="{{class + \' cloudimage-image-picture cloudimage-image-\' + (isLoaded ? \'loaded\' : \'loading\')}}"\n style="display:block;width:100%;overflow:hidden;position:relative;"\n [style.paddingBottom]="getPicturePaddingBottom()"\n [style.background]="getPictureBackground()"\n #imgElem\n *ngIf="isProcessed">\n <source\n *ngFor="let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))"\n [media]="source.mediaQuery || \'\'"\n [attr.lazyLoad]="source.srcSet || \'\'"\n [srcset]="source.srcSet || \'\'"\n (load)="onImageLoad()"\n />\n <img\n style="display:block;width:100%;opacity:1;top:0;left:0;"\n [style.position]="getPositionStyle()"\n [style.height]="getImgHeight()"\n [style.transform]="getTransformStyle()"\n [style.transition]="getTransitionStyle()"\n [style.filter]="getFilterStyle()"\n (load)="onImageLoad()"\n [lazyLoad]="!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)"\n [offset]="offset"\n [alt]="">\n </picture>\n </ng-container>\n <div *ngSwitchCase="false">\n <picture\n class="{{class + \' cloudimage-image-picture cloudimage-image-\' + (isLoaded ? \'loaded\' : \'loading\')}}"\n style="display:block;width:100%;overflow:hidden;position:relative;"\n [style.paddingBottom]="getPicturePaddingBottom()"\n [style.background]="getPictureBackground()"\n #imgElem\n *ngIf="isProcessed">\n <source\n *ngFor="let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))"\n [media]="source.mediaQuery || \'\'"\n [srcset]="source.srcSet || \'\'"\n (load)="onImageLoad()"\n />\n <img\n style="display:block;width:100%;opacity:1;top:0;left:0;"\n [style.position]="getPositionStyle()"\n [style.height]="getImgHeight()"\n [style.transform]="getTransformStyle()"\n [style.transition]="getTransitionStyle()"\n [style.filter]="getFilterStyle()"\n (load)="onImageLoad()"\n [src]="!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)"\n [alt]="">\n </picture>\n </div>\n </ng-container>\n '}]}],e.ctorParameters=function(){return[{type:c},{type:r.DomSanitizer}]},e.propDecorators={imgElem:[{type:i.ViewChild,args:["imgElem"]}],pictureElem:[{type:i.ViewChild,args:["pictureElem"]}],src:[{type:i.Input}],"class":[{type:i.Input}],alt:[{type:i.Input}],operation:[{type:i.Input}],o:[{type:i.Input}],size:[{type:i.Input}],s:[{type:i.Input}],filters:[{type:i.Input}],f:[{type:i.Input}],ratio:[{type:i.Input}],offset:[{type:i.Input}],ngSwitch:[{type:i.Input}]},e}(),d=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{declarations:[l],imports:[t.CommonModule,s.LazyLoadImageModule],exports:[l],providers:[]}]}],e}();e.CIService=c,e.CIConfig=a,e.CIModule=d,e.ImgComponent=l,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("ng-lazyload-image")):"function"==typeof define&&define.amd?define("ng-cloudimage-responsive",["exports","@angular/common","@angular/core","@angular/platform-browser","rxjs","rxjs/operators","ng-lazyload-image"],t):t(e["ng-cloudimage-responsive"]={},e.ng.common,e.ng.core,e.ng.platformBrowser,e.rxjs,e.rxjs.operators,e.ngLazyloadImage)}(this,function(e,t,i,r,n,o,s){"use strict";var f=function(){return(f=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function c(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,n,o=i.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)s.push(r.value)}catch(a){n={error:a}}finally{try{r&&!r.done&&(i=o["return"])&&i.call(o)}finally{if(n)throw n.error}}return s}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}var l=function g(){},u=function(){function e(e){this.config={};var t=e.token,i=void 0===t?"":t,r=e.container,n=void 0===r?"cloudimg.io":r,o=e.ultraFast,s=void 0!==o&&o,a=e.lazyLoading,c=void 0===a||a,l=e.imgLoadingAnimation,u=void 0===l||l,d=e.lazyLoadOffset,p=void 0===d?100:d,g=e.width,h=void 0===g?"400":g,f=e.height,y=void 0===f?"300":f,m=e.operation,S=void 0===m?"width":m,v=e.filters,w=void 0===v?"n":v,z=e.placeholderBackground,I=void 0===z?"#f4f4f4":z,L=e.baseUrl,P=void 0===L?"/":L,x=e.presets,b=e.queryString,C=void 0===b?"":b;this.config={token:i,container:n,ultraFast:s,lazyLoading:c,imgLoadingAnimation:u,lazyLoadOffset:p,width:h,height:y,operation:S,filters:w,placeholderBackground:I,baseUrl:P,presets:x||{xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"},queryString:C,innerWidth:window.innerWidth}}return e.prototype.getParentWidth=function(e,t){if(!(e&&e.parentElement&&e.parentElement.getBoundingClientRect||e&&e.width))return t.width;var i=this.getParentContainerWithWidth(e),r=parseInt(""+i,10),n=Number(window.getComputedStyle(e).width);return n&&n<r&&15<n||!r?this.getSizeLimit(n):r?this.getSizeLimit(r):e.width||t.width},e.prototype.getParentContainerWithWidth=function(e){for(var t=null,i=0;i=(t=t&&t.parentNode||e.parentNode).getBoundingClientRect().width,t&&!i;);var r=i&&t&&parseInt(window.getComputedStyle(t).paddingLeft,10),n=parseInt(window.getComputedStyle(t).paddingRight,10);return i+(i?-r-n:0)},e.prototype.getSizeLimit=function(e){return e<=25?"25":e<=50?"50":(100*Math.ceil(e/100)).toString()},e.prototype.checkOnMedia=function(e){try{return 1<e.split(",").length}catch(t){return!1}},e.prototype.checkIfRelativeUrlPath=function(e){return 0===e.indexOf("//")&&(e=window.location.protocol+e),0!==e.indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("//")},e.prototype.getImgSrc=function(e,t,i){return void 0===t&&(t=!1),void 0===i&&(i=""),t?i+e:e},e.prototype.getSizeAccordingToPixelRatio=function(e){var t=e.toString().split("x"),i=[];return[].forEach.call(t,function(e){i.push(e*Math.round(window.devicePixelRatio||1))}),i.join("x")},e.prototype.generateUrl=function(e,t,i,r,n){return(n.ultraFast?"https://scaleflex.ultrafast.io/":"https://")+n.token+"."+n.container+"/"+e+"/"+t+"/"+i+"/"+r+n.queryString},e.prototype.generateSources=function(r,e,n,o,t,s,a){var c=this,l=[];return t?e.forEach(function(e){var t=e.size,i=e.media;a&&(t=t.split("x").map(function(e){return e/5}).join("x"),n="q10.foil1"),l.push({mediaQuery:i,srcSet:c.generateSrcset(r,t,n,o,s)})}):(a&&(e=e.split("x").map(function(e){return e/5}).join("x"),n="q10.foil1"),l.push({srcSet:this.generateSrcset(r,e,n,o,s)})),l},e.prototype.getAdaptiveSize=function(e,r){var t=e.split(","),n=[];return t.forEach(function(e){var t=e.match(/((?<variable>[a-z_][a-z_]*)|(?<media>\([\S\s]*\)))\s*(?<size>[0-9xp]*)/).groups,i=t.media?t.media:r.presets[t.variable];n.push({media:i,size:t.size})}),n},e.prototype.generateSrcset=function(e,t,i,r,n){var o=c(t.toString().split("x"),2),s=o[0],a=o[1];return this.generateImgSrc(e,i,r,s,a,1,n)},e.prototype.generateImgSrc=function(e,t,i,r,n,o,s){var a=""+Math.trunc(r*o);return n&&(a+="x"+Math.trunc(n*o)),this.generateUrl(e,this.getSizeAccordingToPixelRatio(a),t,i,s).replace("http://scaleflex.ultrafast.io/","").replace("https://scaleflex.ultrafast.io/","").replace("//scaleflex.ultrafast.io/","").replace("///","/")},e.prototype.getRatioBySize=function(e,t){var i,r,n,o;if("object"==typeof e){var s=this.getBreakPoint(e);n=(i=c((s?s.size:e[0].size).toString().split("x"),2))[0],o=i[1]}else n=(r=c(e.toString().split("x"),2))[0],o=r[1];return n&&o?n/o:null},e.prototype.getBreakPoint=function(e){return a(e).reverse().find(function(e){return matchMedia(e.media).matches})},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:l}]},e.ngInjectableDef=i.defineInjectable({factory:function(){return new e(i.inject(l))},token:e,providedIn:"root"}),e}(),d=function(){function e(e,t){this.ciService=e,this._sanitizer=t,this["class"]="",this.offset=100,this.cloudimageUrl="",this.sources=[],this.firstSource=null,this.restSources=[],this.isLoaded=!1,this.isProcessed=!1,this.windowInnerWidth=window.innerWidth,this.lazyLoading=e.config.lazyLoading}return e.prototype.ngOnDestroy=function(){this.resizeSubscription$.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.resizeObservable$=n.fromEvent(window,"resize").pipe(o.debounceTime(500)),this.resizeSubscription$=this.resizeObservable$.subscribe(function(){(e.isAdaptive||e.windowInnerWidth<window.innerWidth)&&e.processImage(),e.windowInnerWidth=window.innerWidth})},e.prototype.ngAfterViewInit=function(){this.processImage()},e.prototype.processImage=function(){var e=this,t=(this.imgElem||this.pictureElem).nativeElement,i=this.ciService.config,r=this.operation||this.o||i.operation,n=this.ciService.getParentWidth(t,i),o=this.size||this.s||i.size||n,s=this.filters||this.f||i.filters,a=this.ciService.checkOnMedia(o);o=a?this.ciService.getAdaptiveSize(o,i):o;var c,l,u=this.ciService.checkIfRelativeUrlPath(this.src),d=this.ciService.getImgSrc(this.src,u,i.baseUrl),p=a?o:this.ciService.getSizeAccordingToPixelRatio(o);if(this.isPreview=!i.isChrome&&400<n&&i.lazyLoading,this.cloudimageUrl=a?this.ciService.generateUrl("width",this.ciService.getSizeAccordingToPixelRatio(n),s,d,i):this.ciService.generateUrl(r,p,s,d,i),this.sources=a?this.ciService.generateSources(r,p,s,d,a,i,!1):[],this.isPreview){var g=f({},i,{queryString:""});c=a?this.ciService.generateUrl("width",n/5,"q10.foil1",d,g):this.ciService.generateUrl(r,p.split("x").map(function(e){return e/5}).join("x"),"q10.foil1",d,g),l=a?this.ciService.generateSources(r,p,"q10.foil1",d,a,g,!0):[]}this.previewCloudimageUrl=c,this.previewSources=l,this.isAdaptive=a,this.actualSize=o,this.parentContainerWidth=n;var h=this.ciService.getRatioBySize(o,i);this.imageHeight=Math.floor(n/(h||this.ratio||1.5)),this.isRatio=!(!h&&!this.ratio),this.ratioBySize=h,setTimeout(function(){e.isProcessed=!0})},e.prototype.onImageLoad=function(){this.isPreview?this.isPreviewLoaded?this.isLoaded=!0:this.isPreviewLoaded=!0:(this.isPreviewLoaded=!0,this.isLoaded=!0)},e.prototype.getRestSources=function(){return a(this.isPreview?this.isPreviewLoaded?this.sources:this.previewSources:this.sources).slice(1).reverse()},e.prototype.getFirstSource=function(){var e=a(this.isPreview?this.isPreviewLoaded?this.sources:this.previewSources:this.sources);return this.firstSource=e[0],e[0]},e.prototype.getPositionStyle=function(){return this._sanitizer.bypassSecurityTrustStyle(this.isRatio?"absolute":"relative")},e.prototype.getImgHeight=function(){return this._sanitizer.bypassSecurityTrustStyle((this.isRatio,"auto"))},e.prototype.getTransformStyle=function(){var e=this.ciService.config,t="none";return e.imgLoadingAnimation&&(t="scale3d(1.1, 1.1, 1)"),this.isLoaded&&e.imgLoadingAnimation&&(t="translateZ(0) scale3d(1, 1, 1)"),this._sanitizer.bypassSecurityTrustStyle(t)},e.prototype.getTransitionStyle=function(){var e=this.ciService.config,t="none";return this.isLoaded&&e.imgLoadingAnimation&&(t="all 0.3s ease-in-out"),this._sanitizer.bypassSecurityTrustStyle(t)},e.prototype.getFilterStyle=function(){var e=this.ciService.config,t="none";return e.imgLoadingAnimation&&(t="blur("+Math.floor(parseInt(this.parentContainerWidth,10)/100)+"px)"),this.isLoaded&&e.imgLoadingAnimation&&(t="blur(0px)"),this._sanitizer.bypassSecurityTrustStyle(t)},e.prototype.getPicturePaddingBottom=function(){var e="";return this.isRatio&&(e=100/(this.ratioBySize||this.ratio)+"%"),this._sanitizer.bypassSecurityTrustStyle(e)},e.prototype.getPictureBackground=function(){var e=this.ciService.config,t="transparent";return!this.isRatio||this.isPreviewLoaded||this.isLoaded||(t=e.placeholderBackground),this._sanitizer.bypassSecurityTrustStyle(t)},e.decorators=[{type:i.Component,args:[{selector:"ci-img",template:'\n <picture #pictureElem *ngIf="!isProcessed"></picture>\n\n <ng-container [ngSwitch]="lazyLoading">\n <ng-container *ngSwitchCase="true">\n <picture\n [class]="class + \' cloudimage-image-picture cloudimage-image-\' + (isLoaded ? \'loaded\' : \'loading\')"\n style="display:block;width:100%;overflow:hidden;position:relative;"\n [style.paddingBottom]="getPicturePaddingBottom()"\n [style.background]="getPictureBackground()"\n #imgElem\n *ngIf="isProcessed">\n <source\n *ngFor="let source of getRestSources()"\n [media]="source.mediaQuery || \'\'"\n [attr.lazyLoad]="source.srcSet || \'\'"\n [srcset]="source.srcSet || \'\'"\n (load)="onImageLoad()"\n />\n <source\n *ngIf="getFirstSource()"\n [attr.lazyLoad]="firstSource.srcSet || \'\'"\n [srcset]="firstSource.srcSet || \'\'"\n (load)="onImageLoad()"\n />\n <img\n style="display:block;width:100%;opacity:1;top:0;left:0;"\n [style.position]="getPositionStyle()"\n [style.height]="getImgHeight()"\n [style.transform]="getTransformStyle()"\n [style.transition]="getTransitionStyle()"\n [style.filter]="getFilterStyle()"\n (load)="onImageLoad()"\n [lazyLoad]="!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)"\n [offset]="offset"\n [alt]="">\n </picture>\n </ng-container>\n <div *ngSwitchCase="false">\n <picture\n [class]="class + \' cloudimage-image-picture cloudimage-image-\' + (isLoaded ? \'loaded\' : \'loading\')"\n style="display:block;width:100%;overflow:hidden;position:relative;"\n [style.paddingBottom]="getPicturePaddingBottom()"\n [style.background]="getPictureBackground()"\n #imgElem\n *ngIf="isProcessed">\n <source\n *ngFor="let source of restSources"\n [media]="source.mediaQuery || \'\'"\n [attr.lazyLoad]="source.srcSet || \'\'"\n [srcset]="source.srcSet || \'\'"\n (load)="onImageLoad()"\n />\n <source\n *ngIf="firstSource"\n [attr.lazyLoad]="firstSource.srcSet || \'\'"\n [srcset]="firstSource.srcSet || \'\'"\n (load)="onImageLoad()"\n />\n <img\n style="display:block;width:100%;opacity:1;top:0;left:0;"\n [style.position]="getPositionStyle()"\n [style.height]="getImgHeight()"\n [style.transform]="getTransformStyle()"\n [style.transition]="getTransitionStyle()"\n [style.filter]="getFilterStyle()"\n (load)="onImageLoad()"\n [src]="!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)"\n [alt]="">\n </picture>\n </div>\n </ng-container>\n '}]}],e.ctorParameters=function(){return[{type:u},{type:r.DomSanitizer}]},e.propDecorators={imgElem:[{type:i.ViewChild,args:["imgElem"]}],pictureElem:[{type:i.ViewChild,args:["pictureElem"]}],src:[{type:i.Input}],"class":[{type:i.Input}],alt:[{type:i.Input}],operation:[{type:i.Input}],o:[{type:i.Input}],size:[{type:i.Input}],s:[{type:i.Input}],filters:[{type:i.Input}],f:[{type:i.Input}],ratio:[{type:i.Input}],offset:[{type:i.Input}],ngSwitch:[{type:i.Input}]},e}(),p=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{declarations:[d],imports:[t.CommonModule,s.LazyLoadImageModule],exports:[d],providers:[]}]}],e}();e.CIService=u,e.CIConfig=l,e.CIModule=p,e.ImgComponent=d,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-cloudimage-responsive.umd.min.js.map

@@ -18,5 +18,8 @@ /**

this._sanitizer = _sanitizer;
this.class = '';
this.offset = 100;
this.cloudimageUrl = '';
this.sources = [];
this.firstSource = null;
this.restSources = [];
this.isLoaded = false;

@@ -39,8 +42,5 @@ this.isProcessed = false;

this.resizeSubscription$ = this.resizeObservable$.subscribe(() => {
if (this.isAdaptive) {
if (this.isAdaptive || this.windowInnerWidth < window.innerWidth) {
this.processImage();
}
else if (this.windowInnerWidth < window.innerWidth) {
this.processImage();
}
this.windowInnerWidth = window.innerWidth;

@@ -67,3 +67,3 @@ });

/** @type {?} */
const size = this.size || this.s || config.size || parentContainerWidth;
let size = this.size || this.s || config.size || parentContainerWidth;
/** @type {?} */

@@ -73,2 +73,3 @@ const filters = this.filters || this.f || config.filters;

const isAdaptive = this.ciService.checkOnMedia(size);
size = isAdaptive ? this.ciService.getAdaptiveSize(size, config) : size;
/** @type {?} */

@@ -82,3 +83,3 @@ const isRelativeUrlPath = this.ciService.checkIfRelativeUrlPath(this.src);

this.cloudimageUrl = isAdaptive ?
this.ciService.generateUrl('width', parentContainerWidth, filters, imgSrc, config) :
this.ciService.generateUrl('width', this.ciService.getSizeAccordingToPixelRatio(parentContainerWidth), filters, imgSrc, config) :
this.ciService.generateUrl(operation, resultSize, filters, imgSrc, config);

@@ -132,2 +133,19 @@ this.sources = isAdaptive ?

*/
getRestSources() {
/** @type {?} */
const resultSources = [...(!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources))];
return resultSources.slice(1).reverse();
}
/**
* @return {?}
*/
getFirstSource() {
/** @type {?} */
const resultSources = [...(!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources))];
this.firstSource = resultSources[0];
return resultSources[0];
}
/**
* @return {?}
*/
getPositionStyle() {

@@ -140,3 +158,5 @@ return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'absolute' : 'relative');

getImgHeight() {
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
// todo check if we need 100% height
// return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'auto' : 'auto');
}

@@ -203,3 +223,3 @@ /**

let result = 'transparent';
if (this.isRatio) {
if (this.isRatio && !this.isPreviewLoaded && !this.isLoaded) {
result = config.placeholderBackground;

@@ -219,3 +239,3 @@ }

<picture
class="{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}"
[class]="class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')"
style="display:block;width:100%;overflow:hidden;position:relative;"

@@ -227,3 +247,3 @@ [style.paddingBottom]="getPicturePaddingBottom()"

<source
*ngFor="let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))"
*ngFor="let source of getRestSources()"
[media]="source.mediaQuery || ''"

@@ -234,2 +254,8 @@ [attr.lazyLoad]="source.srcSet || ''"

/>
<source
*ngIf="getFirstSource()"
[attr.lazyLoad]="firstSource.srcSet || ''"
[srcset]="firstSource.srcSet || ''"
(load)="onImageLoad()"
/>
<img

@@ -250,3 +276,3 @@ style="display:block;width:100%;opacity:1;top:0;left:0;"

<picture
class="{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}"
[class]="class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')"
style="display:block;width:100%;overflow:hidden;position:relative;"

@@ -258,7 +284,14 @@ [style.paddingBottom]="getPicturePaddingBottom()"

<source
*ngFor="let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))"
*ngFor="let source of restSources"
[media]="source.mediaQuery || ''"
[attr.lazyLoad]="source.srcSet || ''"
[srcset]="source.srcSet || ''"
(load)="onImageLoad()"
/>
<source
*ngIf="firstSource"
[attr.lazyLoad]="firstSource.srcSet || ''"
[srcset]="firstSource.srcSet || ''"
(load)="onImageLoad()"
/>
<img

@@ -339,2 +372,6 @@ style="display:block;width:100%;opacity:1;top:0;left:0;"

/** @type {?} */
ImgComponent.prototype.firstSource;
/** @type {?} */
ImgComponent.prototype.restSources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VNlcnZpY2U7XG4gICAgbGV0IHJlc3VsdCA9ICd0cmFuc3BhcmVudCc7XG5cbiAgICBpZiAodGhpcy5pc1JhdGlvICYmICF0aGlzLmlzUHJldmlld0xvYWRlZCAmJiAhdGhpcy5pc0xvYWRlZCkge1xuICAgICAgcmVzdWx0ID0gY29uZmlnLnBsYWNlaG9sZGVyQmFja2dyb3VuZDtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy5fc2FuaXRpemVyLmJ5cGFzc1NlY3VyaXR5VHJ1c3RTdHlsZShyZXN1bHQpO1xuICB9XG59XG4iXX0=

@@ -6,5 +6,5 @@ /**

import { Injectable } from '@angular/core';
import { CIConfig } from './config.service';
import { CIConfig } from './config.model';
import * as i0 from "@angular/core";
import * as i1 from "./config.service";
import * as i1 from "./config.model";
export class CIService {

@@ -30,15 +30,14 @@ /**

baseUrl,
presets: presets ? this.getPresets(presets, 'presets') :
presets: presets ? presets :
{
xs: 575,
// up to 576 PHONE
sm: 767,
// 577 - 768 PHABLET
md: 991,
// 769 - 992 TABLET
lg: 1199,
// 993 - 1200 SMALL_LAPTOP_SCREEN
xl: 3000 // from 1200 USUALSCREEN
xs: '(max-width: 575px)',
// to 575 PHONE
sm: '(min-width: 576px)',
// 576 - 767 PHABLET
md: '(min-width: 768px)',
// 768 - 991 TABLET
lg: '(min-width: 992px)',
// 992 - 1199 SMALL_LAPTOP_SCREEN
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
},
order: presets ? this.getPresets(presets, 'order') : ['xl', 'lg', 'md', 'sm', 'xs'],
queryString,

@@ -49,26 +48,2 @@ innerWidth: window.innerWidth,

/**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
getPresets(value = '', type) {
/** @type {?} */
const splittedValues = value.split('|');
/** @type {?} */
const result = { presets: {}, order: [] };
for (let i = 0; i < splittedValues.length; i++) {
/** @type {?} */
const splittedParam = splittedValues[i] && splittedValues[i].split(':');
/** @type {?} */
const prop = splittedParam[0] && splittedParam[0].trim();
/** @type {?} */
const val = splittedParam[1] && splittedParam[1].trim();
if (prop && val) {
result.presets[prop] = val;
result.order.unshift(prop);
}
}
return result[type];
}
/**
* @param {?} img

@@ -111,3 +86,7 @@ * @param {?} config

} while (parentNode && !width);
return width;
/** @type {?} */
const letPadding = width && parentNode && parseInt(window.getComputedStyle(parentNode).paddingLeft, 10);
/** @type {?} */
const rightPadding = parseInt(window.getComputedStyle(parentNode).paddingRight, 10);
return width + (width ? (-letPadding - rightPadding) : 0);
}

@@ -119,26 +98,9 @@ /**

getSizeLimit(currentSize) {
return currentSize <= 25 ? '25' :
currentSize <= 50 ? '50' :
currentSize <= 100 ? '100'
: currentSize <= 200 ? '200'
: currentSize <= 300 ? '300'
: currentSize <= 400 ? '400'
: currentSize <= 500 ? '500'
: currentSize <= 600 ? '600'
: currentSize <= 700 ? '700'
: currentSize <= 800 ? '800'
: currentSize <= 900 ? '900'
: currentSize <= 1000 ? '1000'
: currentSize <= 1100 ? '1100'
: currentSize <= 1200 ? '1200'
: currentSize <= 1300 ? '1300'
: currentSize <= 1400 ? '1400'
: currentSize <= 1500 ? '1500'
: currentSize <= 1600 ? '1600'
: currentSize <= 1700 ? '1700'
: currentSize <= 1800 ? '1800'
: currentSize <= 1900 ? '1900'
: currentSize <= 2400 ? '2400'
: currentSize <= 2800 ? '2800'
: '3600';
if (currentSize <= 25) {
return '25';
}
if (currentSize <= 50) {
return '50';
}
return (Math.ceil(currentSize / 100) * 100).toString();
}

@@ -150,3 +112,10 @@ /**

checkOnMedia(size) {
return size && typeof size === 'object';
try {
/** @type {?} */
const array = size.split(',');
return array.length > 1;
}
catch (e) {
return false;
}
}

@@ -219,31 +188,17 @@ /**

if (isAdaptive) {
/** @type {?} */
const orderFiltered = [];
for (let i = 0; i < config.order.length; i++) {
/** @type {?} */
const nextSize = size[config.order[i]];
if (nextSize) {
orderFiltered.unshift(config.order[i]);
}
}
for (let i = 0; i < orderFiltered.length; i++) {
/** @type {?} */
const isLast = !(i < orderFiltered.length - 1);
/** @type {?} */
const nextSizeType = isLast ? orderFiltered[i - 1] : orderFiltered[i];
/** @type {?} */
let nextSize = size[orderFiltered[i]];
size.forEach(({ size: nextSize, media: mediaQuery }) => {
if (isPreview) {
nextSize = nextSize.split('x').map(item => item / 5).join('x');
nextSize = nextSize.split('x').map(sizeNext => sizeNext / 5).join('x');
filters = 'q10.foil1';
}
/** @type {?} */
const srcSet = this.generateSrcset(operation, nextSize, filters, imgSrc, config);
/** @type {?} */
const mediaQuery = '(' + (isLast ? 'min' : 'max') + '-width: ' + (config.presets[nextSizeType] + (isLast ? 1 : 0)) + 'px)';
sources.push({ mediaQuery, srcSet });
}
sources.push({ mediaQuery, srcSet: this.generateSrcset(operation, nextSize, filters, imgSrc, config) });
});
}
else {
if (isPreview) {
size = size.split('x').map(sizeNext => sizeNext / 5).join('x');
filters = 'q10.foil1';
}
sources.push({
srcSet: this.generateSrcset(operation, size.split('x').map(item => item / 5).join('x'), 'q10.foil1', imgSrc, config)
srcSet: this.generateSrcset(operation, size, filters, imgSrc, config)
});

@@ -254,2 +209,21 @@ }

/**
* @param {?} size
* @param {?} config
* @return {?}
*/
getAdaptiveSize(size, config) {
/** @type {?} */
const arrayOfSizes = size.split(',');
/** @type {?} */
const sizes = [];
arrayOfSizes.forEach(string => {
/** @type {?} */
const groups = string.match(/((?<variable>[a-z_][a-z_]*)|(?<media>\([\S\s]*\)))\s*(?<size>[0-9xp]*)/).groups;
/** @type {?} */
const media = groups.media ? groups.media : config.presets[groups.variable];
sizes.push({ media, size: groups.size });
});
return sizes;
}
/**
* @param {?} operation

@@ -263,6 +237,3 @@ * @param {?} size

generateSrcset(operation, size, filters, imgSrc, config) {
/** @type {?} */
const imgWidth = size.toString().split('x')[0];
/** @type {?} */
const imgHeight = size.toString().split('x')[1];
const [imgWidth, imgHeight] = size.toString().split('x');
return this.generateImgSrc(operation, filters, imgSrc, imgWidth, imgHeight, 1, config);

@@ -304,29 +275,9 @@ }

/** @type {?} */
const breakPoint = this.getBreakPoint(config);
const breakPointSource = this.getBreakPoint(size);
/** @type {?} */
let orderIndex = config.order.indexOf(breakPoint);
/** @type {?} */
let breakPointSize = null;
do {
/** @type {?} */
const nextBreakpoint = config.order[orderIndex];
breakPointSize = size[nextBreakpoint];
orderIndex--;
} while (!breakPointSize && orderIndex >= 0);
if (!breakPointSize) {
/** @type {?} */
let orderIndexStepTwo = config.order.indexOf(breakPoint);
do {
/** @type {?} */
const nextBreakpoint = config.order[orderIndexStepTwo];
breakPointSize = size[nextBreakpoint];
orderIndexStepTwo++;
} while (!breakPointSize && orderIndexStepTwo <= config.order.length);
}
width = breakPointSize.toString().split('x')[0];
height = breakPointSize.toString().split('x')[1];
const breakPointSize = breakPointSource ? breakPointSource.size : size[0].size;
[width, height] = breakPointSize.toString().split('x');
}
else {
width = size.toString().split('x')[0];
height = size.toString().split('x')[1];
[width, height] = size.toString().split('x');
}

@@ -339,12 +290,7 @@ if (width && height) {

/**
* @param {?} config
* @param {?} size
* @return {?}
*/
getBreakPoint(config) {
const { presets, order } = config;
/** @type {?} */
const innerWidth = window.innerWidth;
/** @type {?} */
const prevBreakPointLimit = order.findIndex(item => presets[item] < innerWidth);
return order[prevBreakPointLimit - 1] || order[prevBreakPointLimit] || order[order.length - 1];
getBreakPoint(size) {
return [...size].reverse().find(item => matchMedia(item.media).matches);
}

@@ -366,2 +312,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGliLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1jbG91ZGltYWdlLXJlc3BvbnNpdmUvIiwic291cmNlcyI6WyJsaWIvbGliLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLGtCQUFrQixDQUFDOzs7QUFL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ggPSBwYXJlbnROb2RlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoO1xuICAgIH0gd2hpbGUgKHBhcmVudE5vZGUgJiYgIXdpZHRoKTtcblxuICAgIHJldHVybiB3aWR0aDtcbiAgfVxuXG4gIGdldFNpemVMaW1pdChjdXJyZW50U2l6ZSkge1xuICAgIHJldHVybiBjdXJyZW50U2l6ZSA8PSAyNSA/ICcyNScgOlxuICAgICAgY3VycmVudFNpemUgPD0gNTAgPyAnNTAnIDpcbiAgICAgICAgY3VycmVudFNpemUgPD0gMTAwID8gJzEwMCdcbiAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDIwMCA/ICcyMDAnXG4gICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAzMDAgPyAnMzAwJ1xuICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSA0MDAgPyAnNDAwJ1xuICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDUwMCA/ICc1MDAnXG4gICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSA2MDAgPyAnNjAwJ1xuICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSA3MDAgPyAnNzAwJ1xuICAgICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDgwMCA/ICc4MDAnXG4gICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSA5MDAgPyAnOTAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxMDAwID8gJzEwMDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMTEwMCA/ICcxMTAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMTIwMCA/ICcxMjAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxMzAwID8gJzEzMDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMTQwMCA/ICcxNDAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMTUwMCA/ICcxNTAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxNjAwID8gJzE2MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMTcwMCA/ICcxNzAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMTgwMCA/ICcxODAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxOTAwID8gJzE5MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMjQwMCA/ICcyNDAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMjgwMCA/ICcyODAwJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAnMzYwMCc7XG4gIH1cblxuICBwdWJsaWMgY2hlY2tPbk1lZGlhKHNpemUpIHtcbiAgICByZXR1cm4gc2l6ZSAmJiB0eXBlb2Ygc2l6ZSA9PT0gJ29iamVjdCc7XG4gIH1cblxuICBwdWJsaWMgY2hlY2tJZlJlbGF0aXZlVXJsUGF0aChzcmMpIHtcbiAgICBpZiAoc3JjLmluZGV4T2YoJy8vJykgPT09IDApIHtcbiAgICAgIHNyYyA9IHdpbmRvdy5sb2NhdGlvbi5wcm90b2NvbCArIHNyYztcbiAgICB9XG4gICAgcmV0dXJuIChzcmMuaW5kZXhPZignaHR0cDovLycpICE9PSAwICYmIHN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leHRCcmVha3BvaW50XTtcbiAgICAgICAgb3JkZXJJbmRleC0tO1xuICAgICAgfSB3aGlsZSAoIWJyZWFrUG9pbnRTaXplICYmIG9yZGVySW5kZXggPj0gMCk7XG5cbiAgICAgIGlmICghYnJlYWtQb2ludFNpemUpIHtcbiAgICAgICAgbGV0IG9yZGVySW5kZXhTdGVwVHdvID0gY29uZmlnLm9yZGVyLmluZGV4T2YoYnJlYWtQb2ludCk7XG5cbiAgICAgICAgZG8ge1xuICAgICAgICAgIGNvbnN0IG5leHRCcmVha3BvaW50ID0gY29uZmlnLm9yZGVyW29yZGVySW5kZXhTdGVwVHdvXTtcbiAgICAgICAgICBicmVha1BvaW50U2l6ZSA9IHNpemVbbmV4dEJyZWFrcG9pbnRdO1xuICAgICAgICAgIG9yZGVySW5kZXhTdGVwVHdvKys7XG4gICAgICAgIH0gd2hpbGUgKCFicmVha1BvaW50U2l6ZSAmJiBvcmRlckluZGV4U3RlcFR3byA8PSBjb25maWcub3JkZXIubGVuZ3RoKTtcbiAgICAgIH1cblxuICAgICAgd2lkdGggPSBicmVha1BvaW50U2l6ZS50b1N0cmluZygpLnNwbGl0KCd4JylbMF07XG4gICAgICBoZWlnaHQgPSBicmVha1BvaW50U2l6ZS50b1N0cmluZygpLnNwbGl0KCd4JylbMV07XG4gICAgfSBlbHNlIHtcbiAgICAgIHdpZHRoID0gc2l6ZS50b1N0cmluZygpLnNwbGl0KCd4JylbMF07XG4gICAgICBoZWlnaHQgPSBzaXplLnRvU3RyaW5nKCkuc3BsaXQoJ3gnKVsxXTtcbiAgICB9XG5cbiAgICBpZiAod2lkdGggJiYgaGVpZ2h0KSB7XG4gICAgICByZXR1cm4gd2lkdGggLyBoZWlnaHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIG51bGw7XG4gIH1cblxuICBnZXRCcmVha1BvaW50KGNvbmZpZykge1xuICAgIGNvbnN0IHtwcmVzZXRzLCBvcmRlcn0gPSBjb25maWc7XG4gICAgY29uc3QgaW5uZ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uZmluZChpdGVtID0+IG1hdGNoTWVkaWEoaXRlbS5tZWRpYSkubWF0Y2hlcyk7XG4gIH1cbn1cbiJdfQ==

@@ -9,5 +9,5 @@ /**

export { CIService } from './lib/lib.service';
export { CIConfig } from './lib/config.service';
export { CIConfig } from './lib/config.model';
export { CIModule } from './lib/lib.module';
export { ImgComponent } from './lib/img/img.component';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWNsb3VkaW1hZ2UtcmVzcG9uc2l2ZS8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLDBCQUFjLG1CQUFtQixDQUFDO0FBQ2xDLHlCQUFjLHNCQUFzQixDQUFDO0FBQ3JDLHlCQUFjLGtCQUFrQixDQUFDO0FBQ2pDLDZCQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBsaWJcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9saWIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maWcuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9saWIubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ltZy9pbWcuY29tcG9uZW50JztcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWNsb3VkaW1hZ2UtcmVzcG9uc2l2ZS8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLDBCQUFjLG1CQUFtQixDQUFDO0FBQ2xDLHlCQUFjLG9CQUFvQixDQUFDO0FBQ25DLHlCQUFjLGtCQUFrQixDQUFDO0FBQ2pDLDZCQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBsaWJcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9saWIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maWcubW9kZWwnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbGliLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9pbWcvaW1nLmNvbXBvbmVudCc7XG4iXX0=

@@ -15,5 +15,8 @@ /**

this._sanitizer = _sanitizer;
this.class = '';
this.offset = 100;
this.cloudimageUrl = '';
this.sources = [];
this.firstSource = null;
this.restSources = [];
this.isLoaded = false;

@@ -43,8 +46,5 @@ this.isProcessed = false;

this.resizeSubscription$ = this.resizeObservable$.subscribe(function () {
if (_this.isAdaptive) {
if (_this.isAdaptive || _this.windowInnerWidth < window.innerWidth) {
_this.processImage();
}
else if (_this.windowInnerWidth < window.innerWidth) {
_this.processImage();
}
_this.windowInnerWidth = window.innerWidth;

@@ -83,2 +83,3 @@ });

var isAdaptive = this.ciService.checkOnMedia(size);
size = isAdaptive ? this.ciService.getAdaptiveSize(size, config) : size;
/** @type {?} */

@@ -92,3 +93,3 @@ var isRelativeUrlPath = this.ciService.checkIfRelativeUrlPath(this.src);

this.cloudimageUrl = isAdaptive ?
this.ciService.generateUrl('width', parentContainerWidth, filters, imgSrc, config) :
this.ciService.generateUrl('width', this.ciService.getSizeAccordingToPixelRatio(parentContainerWidth), filters, imgSrc, config) :
this.ciService.generateUrl(operation, resultSize, filters, imgSrc, config);

@@ -145,2 +146,25 @@ this.sources = isAdaptive ?

*/
ImgComponent.prototype.getRestSources = /**
* @return {?}
*/
function () {
/** @type {?} */
var resultSources = tslib_1.__spread((!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources)));
return resultSources.slice(1).reverse();
};
/**
* @return {?}
*/
ImgComponent.prototype.getFirstSource = /**
* @return {?}
*/
function () {
/** @type {?} */
var resultSources = tslib_1.__spread((!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources)));
this.firstSource = resultSources[0];
return resultSources[0];
};
/**
* @return {?}
*/
ImgComponent.prototype.getPositionStyle = /**

@@ -159,3 +183,5 @@ * @return {?}

function () {
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
// todo check if we need 100% height
// return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'auto' : 'auto');
};

@@ -237,3 +263,3 @@ /**

var result = 'transparent';
if (this.isRatio) {
if (this.isRatio && !this.isPreviewLoaded && !this.isLoaded) {
result = config.placeholderBackground;

@@ -246,3 +272,3 @@ }

selector: 'ci-img',
template: "\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "
template: "\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of getRestSources()\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"getFirstSource()\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of restSources\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"firstSource\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "
}] }

@@ -312,2 +338,6 @@ ];

/** @type {?} */
ImgComponent.prototype.firstSource;
/** @type {?} */
ImgComponent.prototype.restSources;
/** @type {?} */
ImgComponent.prototype.isLoaded;

@@ -351,2 +381,2 @@ /** @type {?} */

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWNsb3VkaW1hZ2UtcmVzcG9uc2l2ZS8iLCJzb3VyY2VzIjpbImxpYi9pbWcvaW1nLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQXlCLEtBQUssRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFZLE1BQU0sZUFBZSxDQUFDO0FBQ3hHLE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUN6QyxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sMkJBQTJCLENBQUM7QUFDdkQsT0FBTyxFQUFDLFNBQVMsRUFBMkIsTUFBTSxNQUFNLENBQUM7QUFDekQsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBRTVDO0lBa0dFLHNCQUFvQixTQUFvQixFQUFVLFVBQXdCO1FBQXRELGNBQVMsR0FBVCxTQUFTLENBQVc7UUFBVSxlQUFVLEdBQVYsVUFBVSxDQUFjO1FBdEJqRSxXQUFNLEdBQUcsR0FBRyxDQUFDO1FBS3RCLGtCQUFhLEdBQUcsRUFBRSxDQUFDO1FBQ25CLFlBQU8sR0FBRyxFQUFFLENBQUM7UUFDYixhQUFRLEdBQUcsS0FBSyxDQUFDO1FBQ2pCLGdCQUFXLEdBQUcsS0FBSyxDQUFDO1FBWXBCLHFCQUFnQixHQUFXLE1BQU0sQ0FBQyxVQUFVLENBQUM7UUFHM0MsSUFBSSxDQUFDLFdBQVcsR0FBRyxTQUFTLENBQUMsTUFBTSxDQUFDLFdBQVcs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ybClcIlxuICAgICAgICAgICAgW29mZnNldF09XCJvZmZzZXRcIlxuICAgICAgICAgICAgW2FsdF09XCJcIj5cbiAgICAgICAgPC9waWN0dXJlPlxuICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICA8ZGl2ICpuZ1N3aXRjaENhc2U9XCJmYWxzZVwiPlxuICAgICAgICA8cGljdHVyZVxuICAgICAgICAgIFtjbGFzc109XCJjbGFzcyArICcgY2xvdWRpbWFnZS1pbWFnZS1waWN0dXJlIGNsb3VkaW1hZ2UtaW1hZ2UtJyArIChpc0xvYWRlZCA/ICdsb2FkZWQnIDogJ2xvYWRpbmcnKVwiXG4gICAgICAgICAgc3R5bGU9XCJkaXNwbGF5OmJsb2NrO3dpZHRoOjEwMCU7b3ZlcmZsb3c6aGlkZGVuO3Bvc2l0aW9uOnJlbGF0aXZlO1wiXG4gICAgICAgICAgW3N0eWxlLnBhZGRpbmdCb3R0b21dPVwiZ2V0UGljdHVyZVBhZGRpbmdCb3R0b20oKVwiXG4gICAgICAgICAgW3N0eWxlLmJhY2tncm91bmRdPVwiZ2V0UGljdHVyZUJhY2tncm91bmQoKVwiXG4gICAgICAgICAgI2ltZ0VsZW1cbiAgICAgICAgICAqbmdJZj1cImlzUHJvY2Vzc2VkXCI+XG4gICAgICAgICAgPHNvdXJjZVxuICAgICAgICAgICAgKm5nRm9yPVwibGV0IHNvdXJjZSBvZiByZXN0U291cmNlc1wiXG4gICAgICAgICAgICBbbWVkaWFdPVwic291cmNlLm1lZGlhUXVlcnkgfHwgJydcIlxuICAgICAgICAgICAgW2F0dHIubGF6eUxvYWRdPVwic291cmNlLnNyY1NldCB8fCAnJ1wiXG4gICAgICAgICAgICBbc3Jjc2V0XT1cInNvdXJjZS5zcmNTZXQgfHwgJydcIlxuICAgICAgICAgICAgKGxvYWQpPVwib25JbWFnZUxvYWQoKVwiXG4gICAgICAgICAgLz5cbiAgICAgICAgICA8c291cmNlXG4gICAgICAgICAgICAqbmdJZj1cImZpcnN0U291c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biAgICAgIHJlc3VsdCA9IGNvbmZpZy5wbGFjZWhvbGRlckJhY2tncm91bmQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX3Nhbml0aXplci5ieXBhc3NTZWN1cml0eVRydXN0U3R5bGUocmVzdWx0KTtcbiAgfVxufVxuIl19

@@ -5,6 +5,7 @@ /**

*/
import * as tslib_1 from "tslib";
import { Injectable } from '@angular/core';
import { CIConfig } from './config.service';
import { CIConfig } from './config.model';
import * as i0 from "@angular/core";
import * as i1 from "./config.service";
import * as i1 from "./config.model";
var CIService = /** @class */ (function () {

@@ -27,15 +28,14 @@ function CIService(ciConfig) {

baseUrl: baseUrl,
presets: presets ? this.getPresets(presets, 'presets') :
presets: presets ? presets :
{
xs: 575,
// up to 576 PHONE
sm: 767,
// 577 - 768 PHABLET
md: 991,
// 769 - 992 TABLET
lg: 1199,
// 993 - 1200 SMALL_LAPTOP_SCREEN
xl: 3000 // from 1200 USUALSCREEN
xs: '(max-width: 575px)',
// to 575 PHONE
sm: '(min-width: 576px)',
// 576 - 767 PHABLET
md: '(min-width: 768px)',
// 768 - 991 TABLET
lg: '(min-width: 992px)',
// 992 - 1199 SMALL_LAPTOP_SCREEN
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
},
order: presets ? this.getPresets(presets, 'order') : ['xl', 'lg', 'md', 'sm', 'xs'],
queryString: queryString,

@@ -46,32 +46,2 @@ innerWidth: window.innerWidth,

/**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
CIService.prototype.getPresets = /**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
function (value, type) {
if (value === void 0) { value = ''; }
/** @type {?} */
var splittedValues = value.split('|');
/** @type {?} */
var result = { presets: {}, order: [] };
for (var i = 0; i < splittedValues.length; i++) {
/** @type {?} */
var splittedParam = splittedValues[i] && splittedValues[i].split(':');
/** @type {?} */
var prop = splittedParam[0] && splittedParam[0].trim();
/** @type {?} */
var val = splittedParam[1] && splittedParam[1].trim();
if (prop && val) {
result.presets[prop] = val;
result.order.unshift(prop);
}
}
return result[type];
};
/**
* @param {?} img

@@ -123,3 +93,7 @@ * @param {?} config

} while (parentNode && !width);
return width;
/** @type {?} */
var letPadding = width && parentNode && parseInt(window.getComputedStyle(parentNode).paddingLeft, 10);
/** @type {?} */
var rightPadding = parseInt(window.getComputedStyle(parentNode).paddingRight, 10);
return width + (width ? (-letPadding - rightPadding) : 0);
};

@@ -135,26 +109,9 @@ /**

function (currentSize) {
return currentSize <= 25 ? '25' :
currentSize <= 50 ? '50' :
currentSize <= 100 ? '100'
: currentSize <= 200 ? '200'
: currentSize <= 300 ? '300'
: currentSize <= 400 ? '400'
: currentSize <= 500 ? '500'
: currentSize <= 600 ? '600'
: currentSize <= 700 ? '700'
: currentSize <= 800 ? '800'
: currentSize <= 900 ? '900'
: currentSize <= 1000 ? '1000'
: currentSize <= 1100 ? '1100'
: currentSize <= 1200 ? '1200'
: currentSize <= 1300 ? '1300'
: currentSize <= 1400 ? '1400'
: currentSize <= 1500 ? '1500'
: currentSize <= 1600 ? '1600'
: currentSize <= 1700 ? '1700'
: currentSize <= 1800 ? '1800'
: currentSize <= 1900 ? '1900'
: currentSize <= 2400 ? '2400'
: currentSize <= 2800 ? '2800'
: '3600';
if (currentSize <= 25) {
return '25';
}
if (currentSize <= 50) {
return '50';
}
return (Math.ceil(currentSize / 100) * 100).toString();
};

@@ -170,3 +127,10 @@ /**

function (size) {
return size && typeof size === 'object';
try {
/** @type {?} */
var array = size.split(',');
return array.length > 1;
}
catch (e) {
return false;
}
};

@@ -270,34 +234,22 @@ /**

function (operation, size, filters, imgSrc, isAdaptive, config, isPreview) {
var _this = this;
/** @type {?} */
var sources = [];
if (isAdaptive) {
/** @type {?} */
var orderFiltered = [];
for (var i = 0; i < config.order.length; i++) {
/** @type {?} */
var nextSize = size[config.order[i]];
if (nextSize) {
orderFiltered.unshift(config.order[i]);
}
}
for (var i = 0; i < orderFiltered.length; i++) {
/** @type {?} */
var isLast = !(i < orderFiltered.length - 1);
/** @type {?} */
var nextSizeType = isLast ? orderFiltered[i - 1] : orderFiltered[i];
/** @type {?} */
var nextSize = size[orderFiltered[i]];
size.forEach(function (_a) {
var nextSize = _a.size, mediaQuery = _a.media;
if (isPreview) {
nextSize = nextSize.split('x').map(function (item) { return item / 5; }).join('x');
nextSize = nextSize.split('x').map(function (sizeNext) { return sizeNext / 5; }).join('x');
filters = 'q10.foil1';
}
/** @type {?} */
var srcSet = this.generateSrcset(operation, nextSize, filters, imgSrc, config);
/** @type {?} */
var mediaQuery = '(' + (isLast ? 'min' : 'max') + '-width: ' + (config.presets[nextSizeType] + (isLast ? 1 : 0)) + 'px)';
sources.push({ mediaQuery: mediaQuery, srcSet: srcSet });
}
sources.push({ mediaQuery: mediaQuery, srcSet: _this.generateSrcset(operation, nextSize, filters, imgSrc, config) });
});
}
else {
if (isPreview) {
size = size.split('x').map(function (sizeNext) { return sizeNext / 5; }).join('x');
filters = 'q10.foil1';
}
sources.push({
srcSet: this.generateSrcset(operation, size.split('x').map(function (item) { return item / 5; }).join('x'), 'q10.foil1', imgSrc, config)
srcSet: this.generateSrcset(operation, size, filters, imgSrc, config)
});

@@ -308,2 +260,26 @@ }

/**
* @param {?} size
* @param {?} config
* @return {?}
*/
CIService.prototype.getAdaptiveSize = /**
* @param {?} size
* @param {?} config
* @return {?}
*/
function (size, config) {
/** @type {?} */
var arrayOfSizes = size.split(',');
/** @type {?} */
var sizes = [];
arrayOfSizes.forEach(function (string) {
/** @type {?} */
var groups = string.match(/((?<variable>[a-z_][a-z_]*)|(?<media>\([\S\s]*\)))\s*(?<size>[0-9xp]*)/).groups;
/** @type {?} */
var media = groups.media ? groups.media : config.presets[groups.variable];
sizes.push({ media: media, size: groups.size });
});
return sizes;
};
/**
* @param {?} operation

@@ -325,6 +301,3 @@ * @param {?} size

function (operation, size, filters, imgSrc, config) {
/** @type {?} */
var imgWidth = size.toString().split('x')[0];
/** @type {?} */
var imgHeight = size.toString().split('x')[1];
var _a = tslib_1.__read(size.toString().split('x'), 2), imgWidth = _a[0], imgHeight = _a[1];
return this.generateImgSrc(operation, filters, imgSrc, imgWidth, imgHeight, 1, config);

@@ -375,2 +348,3 @@ };

function (size, config) {
var _a, _b;
/** @type {?} */

@@ -382,29 +356,9 @@ var width;

/** @type {?} */
var breakPoint = this.getBreakPoint(config);
var breakPointSource = this.getBreakPoint(size);
/** @type {?} */
var orderIndex = config.order.indexOf(breakPoint);
/** @type {?} */
var breakPointSize = null;
do {
/** @type {?} */
var nextBreakpoint = config.order[orderIndex];
breakPointSize = size[nextBreakpoint];
orderIndex--;
} while (!breakPointSize && orderIndex >= 0);
if (!breakPointSize) {
/** @type {?} */
var orderIndexStepTwo = config.order.indexOf(breakPoint);
do {
/** @type {?} */
var nextBreakpoint = config.order[orderIndexStepTwo];
breakPointSize = size[nextBreakpoint];
orderIndexStepTwo++;
} while (!breakPointSize && orderIndexStepTwo <= config.order.length);
}
width = breakPointSize.toString().split('x')[0];
height = breakPointSize.toString().split('x')[1];
var breakPointSize = breakPointSource ? breakPointSource.size : size[0].size;
_a = tslib_1.__read(breakPointSize.toString().split('x'), 2), width = _a[0], height = _a[1];
}
else {
width = size.toString().split('x')[0];
height = size.toString().split('x')[1];
_b = tslib_1.__read(size.toString().split('x'), 2), width = _b[0], height = _b[1];
}

@@ -417,16 +371,11 @@ if (width && height) {

/**
* @param {?} config
* @param {?} size
* @return {?}
*/
CIService.prototype.getBreakPoint = /**
* @param {?} config
* @param {?} size
* @return {?}
*/
function (config) {
var presets = config.presets, order = config.order;
/** @type {?} */
var innerWidth = window.innerWidth;
/** @type {?} */
var prevBreakPointLimit = order.findIndex(function (item) { return presets[item] < innerWidth; });
return order[prevBreakPointLimit - 1] || order[prevBreakPointLimit] || order[order.length - 1];
function (size) {
return tslib_1.__spread(size).reverse().find(function (item) { return matchMedia(item.media).matches; });
};

@@ -450,2 +399,2 @@ CIService.decorators = [

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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gOlxuICAgICAgICBjdXJyZW50U2l6ZSA8PSAxMDAgPyAnMTAwJ1xuICAgICAgICAgIDogY3VycmVudFNpemUgPD0gMjAwID8gJzIwMCdcbiAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDMwMCA/ICczMDAnXG4gICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDQwMCA/ICc0MDAnXG4gICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gNTAwID8gJzUwMCdcbiAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDYwMCA/ICc2MDAnXG4gICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDcwMCA/ICc3MDAnXG4gICAgICAgICAgICAgICAgICAgIDogY3VycmVudFNpemUgPD0gODAwID8gJzgwMCdcbiAgICAgICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDkwMCA/ICc5MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDEwMDAgPyAnMTAwMCdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxMTAwID8gJzExMDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxMjAwID8gJzEyMDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDEzMDAgPyAnMTMwMCdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxNDAwID8gJzE0MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxNTAwID8gJzE1MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDE2MDAgPyAnMTYwMCdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxNzAwID8gJzE3MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAxODAwID8gJzE4MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnJlbnRTaXplIDw9IDE5MDAgPyAnMTkwMCdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAyNDAwID8gJzI0MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJyZW50U2l6ZSA8PSAyODAwID8gJzI4MDAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICczNjAwJztcbiAgfVxuXG4gIHB1YmxpYyBjaGVja09uTWVkaWEoc2l6ZSkge1xuICAgIHJldHVybiBzaXplICYmIHR5cGVvZiBzaXplID09PSAnb2JqZWN0JztcbiAgfVxuXG4gIHB1YmxpYyBjaGVja0lmUmVsYXRpdmVVcmxQYXRoKHNyYykge1xuICAgIGlmIChzcmMuaW5kZXhPZignLy8nKSA9PT0gMCkge1xuICAgICAgc3JjID0gd2luZG93LmxvY2F0aW9uLnByb3RvY29sICsgc3JjO1xuICAgIH1cbiAgICByZXR1cm4gKHNyYy5pbmRleE9mKCdodHRwOi8vJykgIT09IDAgJiYgc3JjLmluZGV4T2YoJ2h0dHBzOi8vJykgIT09IDAgJiYgc3JjLmluZGV4T2YoJy8vJykgIT09IDApO1xuICB9XG5cbiAgcHVibGljIGdldEltZ1NyYyhzcmMsIGlzUmVsYXRpdmVVcmxQYXRoID0gZmFsc2UsIGJhc2VVcmwgPSAnJykge1xuICAgIGlmIChpc1JlbGF0aXZlVXJsUGF0aCkge1xuICAgICAgcmV0dXJuIGJhc2VVcmwgKyBzcmM7XG4gICAgfVxuXG4gICAgcmV0dXJuIHNyYztcbiAgf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bS5tZWRpYSkubWF0Y2hlcyk7XG4gIH1cbn1cbiJdfQ==

@@ -9,5 +9,5 @@ /**

export { CIService } from './lib/lib.service';
export { CIConfig } from './lib/config.service';
export { CIConfig } from './lib/config.model';
export { CIModule } from './lib/lib.module';
export { ImgComponent } from './lib/img/img.component';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWNsb3VkaW1hZ2UtcmVzcG9uc2l2ZS8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLDBCQUFjLG1CQUFtQixDQUFDO0FBQ2xDLHlCQUFjLHNCQUFzQixDQUFDO0FBQ3JDLHlCQUFjLGtCQUFrQixDQUFDO0FBQ2pDLDZCQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBsaWJcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9saWIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maWcuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9saWIubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ltZy9pbWcuY29tcG9uZW50JztcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWNsb3VkaW1hZ2UtcmVzcG9uc2l2ZS8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLDBCQUFjLG1CQUFtQixDQUFDO0FBQ2xDLHlCQUFjLG9CQUFvQixDQUFDO0FBQ25DLHlCQUFjLGtCQUFrQixDQUFDO0FBQ2pDLDZCQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBsaWJcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9saWIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maWcubW9kZWwnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbGliLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9pbWcvaW1nLmNvbXBvbmVudCc7XG4iXX0=

@@ -39,15 +39,14 @@ import { CommonModule } from '@angular/common';

baseUrl,
presets: presets ? this.getPresets(presets, 'presets') :
presets: presets ? presets :
{
xs: 575,
// up to 576 PHONE
sm: 767,
// 577 - 768 PHABLET
md: 991,
// 769 - 992 TABLET
lg: 1199,
// 993 - 1200 SMALL_LAPTOP_SCREEN
xl: 3000 // from 1200 USUALSCREEN
xs: '(max-width: 575px)',
// to 575 PHONE
sm: '(min-width: 576px)',
// 576 - 767 PHABLET
md: '(min-width: 768px)',
// 768 - 991 TABLET
lg: '(min-width: 992px)',
// 992 - 1199 SMALL_LAPTOP_SCREEN
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
},
order: presets ? this.getPresets(presets, 'order') : ['xl', 'lg', 'md', 'sm', 'xs'],
queryString,

@@ -58,26 +57,2 @@ innerWidth: window.innerWidth,

/**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
getPresets(value = '', type) {
/** @type {?} */
const splittedValues = value.split('|');
/** @type {?} */
const result = { presets: {}, order: [] };
for (let i = 0; i < splittedValues.length; i++) {
/** @type {?} */
const splittedParam = splittedValues[i] && splittedValues[i].split(':');
/** @type {?} */
const prop = splittedParam[0] && splittedParam[0].trim();
/** @type {?} */
const val = splittedParam[1] && splittedParam[1].trim();
if (prop && val) {
result.presets[prop] = val;
result.order.unshift(prop);
}
}
return result[type];
}
/**
* @param {?} img

@@ -120,3 +95,7 @@ * @param {?} config

} while (parentNode && !width);
return width;
/** @type {?} */
const letPadding = width && parentNode && parseInt(window.getComputedStyle(parentNode).paddingLeft, 10);
/** @type {?} */
const rightPadding = parseInt(window.getComputedStyle(parentNode).paddingRight, 10);
return width + (width ? (-letPadding - rightPadding) : 0);
}

@@ -128,26 +107,9 @@ /**

getSizeLimit(currentSize) {
return currentSize <= 25 ? '25' :
currentSize <= 50 ? '50' :
currentSize <= 100 ? '100'
: currentSize <= 200 ? '200'
: currentSize <= 300 ? '300'
: currentSize <= 400 ? '400'
: currentSize <= 500 ? '500'
: currentSize <= 600 ? '600'
: currentSize <= 700 ? '700'
: currentSize <= 800 ? '800'
: currentSize <= 900 ? '900'
: currentSize <= 1000 ? '1000'
: currentSize <= 1100 ? '1100'
: currentSize <= 1200 ? '1200'
: currentSize <= 1300 ? '1300'
: currentSize <= 1400 ? '1400'
: currentSize <= 1500 ? '1500'
: currentSize <= 1600 ? '1600'
: currentSize <= 1700 ? '1700'
: currentSize <= 1800 ? '1800'
: currentSize <= 1900 ? '1900'
: currentSize <= 2400 ? '2400'
: currentSize <= 2800 ? '2800'
: '3600';
if (currentSize <= 25) {
return '25';
}
if (currentSize <= 50) {
return '50';
}
return (Math.ceil(currentSize / 100) * 100).toString();
}

@@ -159,3 +121,10 @@ /**

checkOnMedia(size) {
return size && typeof size === 'object';
try {
/** @type {?} */
const array = size.split(',');
return array.length > 1;
}
catch (e) {
return false;
}
}

@@ -228,31 +197,17 @@ /**

if (isAdaptive) {
/** @type {?} */
const orderFiltered = [];
for (let i = 0; i < config.order.length; i++) {
/** @type {?} */
const nextSize = size[config.order[i]];
if (nextSize) {
orderFiltered.unshift(config.order[i]);
}
}
for (let i = 0; i < orderFiltered.length; i++) {
/** @type {?} */
const isLast = !(i < orderFiltered.length - 1);
/** @type {?} */
const nextSizeType = isLast ? orderFiltered[i - 1] : orderFiltered[i];
/** @type {?} */
let nextSize = size[orderFiltered[i]];
size.forEach(({ size: nextSize, media: mediaQuery }) => {
if (isPreview) {
nextSize = nextSize.split('x').map(item => item / 5).join('x');
nextSize = nextSize.split('x').map(sizeNext => sizeNext / 5).join('x');
filters = 'q10.foil1';
}
/** @type {?} */
const srcSet = this.generateSrcset(operation, nextSize, filters, imgSrc, config);
/** @type {?} */
const mediaQuery = '(' + (isLast ? 'min' : 'max') + '-width: ' + (config.presets[nextSizeType] + (isLast ? 1 : 0)) + 'px)';
sources.push({ mediaQuery, srcSet });
}
sources.push({ mediaQuery, srcSet: this.generateSrcset(operation, nextSize, filters, imgSrc, config) });
});
}
else {
if (isPreview) {
size = size.split('x').map(sizeNext => sizeNext / 5).join('x');
filters = 'q10.foil1';
}
sources.push({
srcSet: this.generateSrcset(operation, size.split('x').map(item => item / 5).join('x'), 'q10.foil1', imgSrc, config)
srcSet: this.generateSrcset(operation, size, filters, imgSrc, config)
});

@@ -263,2 +218,21 @@ }

/**
* @param {?} size
* @param {?} config
* @return {?}
*/
getAdaptiveSize(size, config) {
/** @type {?} */
const arrayOfSizes = size.split(',');
/** @type {?} */
const sizes = [];
arrayOfSizes.forEach(string => {
/** @type {?} */
const groups = string.match(/((?<variable>[a-z_][a-z_]*)|(?<media>\([\S\s]*\)))\s*(?<size>[0-9xp]*)/).groups;
/** @type {?} */
const media = groups.media ? groups.media : config.presets[groups.variable];
sizes.push({ media, size: groups.size });
});
return sizes;
}
/**
* @param {?} operation

@@ -272,6 +246,3 @@ * @param {?} size

generateSrcset(operation, size, filters, imgSrc, config) {
/** @type {?} */
const imgWidth = size.toString().split('x')[0];
/** @type {?} */
const imgHeight = size.toString().split('x')[1];
const [imgWidth, imgHeight] = size.toString().split('x');
return this.generateImgSrc(operation, filters, imgSrc, imgWidth, imgHeight, 1, config);

@@ -313,29 +284,9 @@ }

/** @type {?} */
const breakPoint = this.getBreakPoint(config);
const breakPointSource = this.getBreakPoint(size);
/** @type {?} */
let orderIndex = config.order.indexOf(breakPoint);
/** @type {?} */
let breakPointSize = null;
do {
/** @type {?} */
const nextBreakpoint = config.order[orderIndex];
breakPointSize = size[nextBreakpoint];
orderIndex--;
} while (!breakPointSize && orderIndex >= 0);
if (!breakPointSize) {
/** @type {?} */
let orderIndexStepTwo = config.order.indexOf(breakPoint);
do {
/** @type {?} */
const nextBreakpoint = config.order[orderIndexStepTwo];
breakPointSize = size[nextBreakpoint];
orderIndexStepTwo++;
} while (!breakPointSize && orderIndexStepTwo <= config.order.length);
}
width = breakPointSize.toString().split('x')[0];
height = breakPointSize.toString().split('x')[1];
const breakPointSize = breakPointSource ? breakPointSource.size : size[0].size;
[width, height] = breakPointSize.toString().split('x');
}
else {
width = size.toString().split('x')[0];
height = size.toString().split('x')[1];
[width, height] = size.toString().split('x');
}

@@ -348,12 +299,7 @@ if (width && height) {

/**
* @param {?} config
* @param {?} size
* @return {?}
*/
getBreakPoint(config) {
const { presets, order } = config;
/** @type {?} */
const innerWidth = window.innerWidth;
/** @type {?} */
const prevBreakPointLimit = order.findIndex(item => presets[item] < innerWidth);
return order[prevBreakPointLimit - 1] || order[prevBreakPointLimit] || order[order.length - 1];
getBreakPoint(size) {
return [...size].reverse().find(item => matchMedia(item.media).matches);
}

@@ -384,5 +330,8 @@ }

this._sanitizer = _sanitizer;
this.class = '';
this.offset = 100;
this.cloudimageUrl = '';
this.sources = [];
this.firstSource = null;
this.restSources = [];
this.isLoaded = false;

@@ -405,8 +354,5 @@ this.isProcessed = false;

this.resizeSubscription$ = this.resizeObservable$.subscribe(() => {
if (this.isAdaptive) {
if (this.isAdaptive || this.windowInnerWidth < window.innerWidth) {
this.processImage();
}
else if (this.windowInnerWidth < window.innerWidth) {
this.processImage();
}
this.windowInnerWidth = window.innerWidth;

@@ -433,3 +379,3 @@ });

/** @type {?} */
const size = this.size || this.s || config.size || parentContainerWidth;
let size = this.size || this.s || config.size || parentContainerWidth;
/** @type {?} */

@@ -439,2 +385,3 @@ const filters = this.filters || this.f || config.filters;

const isAdaptive = this.ciService.checkOnMedia(size);
size = isAdaptive ? this.ciService.getAdaptiveSize(size, config) : size;
/** @type {?} */

@@ -448,3 +395,3 @@ const isRelativeUrlPath = this.ciService.checkIfRelativeUrlPath(this.src);

this.cloudimageUrl = isAdaptive ?
this.ciService.generateUrl('width', parentContainerWidth, filters, imgSrc, config) :
this.ciService.generateUrl('width', this.ciService.getSizeAccordingToPixelRatio(parentContainerWidth), filters, imgSrc, config) :
this.ciService.generateUrl(operation, resultSize, filters, imgSrc, config);

@@ -498,2 +445,19 @@ this.sources = isAdaptive ?

*/
getRestSources() {
/** @type {?} */
const resultSources = [...(!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources))];
return resultSources.slice(1).reverse();
}
/**
* @return {?}
*/
getFirstSource() {
/** @type {?} */
const resultSources = [...(!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources))];
this.firstSource = resultSources[0];
return resultSources[0];
}
/**
* @return {?}
*/
getPositionStyle() {

@@ -506,3 +470,5 @@ return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'absolute' : 'relative');

getImgHeight() {
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
// todo check if we need 100% height
// return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'auto' : 'auto');
}

@@ -569,3 +535,3 @@ /**

let result = 'transparent';
if (this.isRatio) {
if (this.isRatio && !this.isPreviewLoaded && !this.isLoaded) {
result = config.placeholderBackground;

@@ -585,3 +551,3 @@ }

<picture
class="{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}"
[class]="class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')"
style="display:block;width:100%;overflow:hidden;position:relative;"

@@ -593,3 +559,3 @@ [style.paddingBottom]="getPicturePaddingBottom()"

<source
*ngFor="let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))"
*ngFor="let source of getRestSources()"
[media]="source.mediaQuery || ''"

@@ -600,2 +566,8 @@ [attr.lazyLoad]="source.srcSet || ''"

/>
<source
*ngIf="getFirstSource()"
[attr.lazyLoad]="firstSource.srcSet || ''"
[srcset]="firstSource.srcSet || ''"
(load)="onImageLoad()"
/>
<img

@@ -616,3 +588,3 @@ style="display:block;width:100%;opacity:1;top:0;left:0;"

<picture
class="{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}"
[class]="class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')"
style="display:block;width:100%;overflow:hidden;position:relative;"

@@ -624,7 +596,14 @@ [style.paddingBottom]="getPicturePaddingBottom()"

<source
*ngFor="let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))"
*ngFor="let source of restSources"
[media]="source.mediaQuery || ''"
[attr.lazyLoad]="source.srcSet || ''"
[srcset]="source.srcSet || ''"
(load)="onImageLoad()"
/>
<source
*ngIf="firstSource"
[attr.lazyLoad]="firstSource.srcSet || ''"
[srcset]="firstSource.srcSet || ''"
(load)="onImageLoad()"
/>
<img

@@ -631,0 +610,0 @@ style="display:block;width:100%;opacity:1;top:0;left:0;"

import { CommonModule } from '@angular/common';
import { __assign } from 'tslib';
import { __read, __spread, __assign } from 'tslib';
import { Injectable, NgModule, defineInjectable, inject, Component, ViewChild, Input } from '@angular/core';

@@ -40,15 +40,14 @@ import { DomSanitizer } from '@angular/platform-browser';

baseUrl: baseUrl,
presets: presets ? this.getPresets(presets, 'presets') :
presets: presets ? presets :
{
xs: 575,
// up to 576 PHONE
sm: 767,
// 577 - 768 PHABLET
md: 991,
// 769 - 992 TABLET
lg: 1199,
// 993 - 1200 SMALL_LAPTOP_SCREEN
xl: 3000 // from 1200 USUALSCREEN
xs: '(max-width: 575px)',
// to 575 PHONE
sm: '(min-width: 576px)',
// 576 - 767 PHABLET
md: '(min-width: 768px)',
// 768 - 991 TABLET
lg: '(min-width: 992px)',
// 992 - 1199 SMALL_LAPTOP_SCREEN
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
},
order: presets ? this.getPresets(presets, 'order') : ['xl', 'lg', 'md', 'sm', 'xs'],
queryString: queryString,

@@ -59,32 +58,2 @@ innerWidth: window.innerWidth,

/**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
CIService.prototype.getPresets = /**
* @param {?=} value
* @param {?=} type
* @return {?}
*/
function (value, type) {
if (value === void 0) { value = ''; }
/** @type {?} */
var splittedValues = value.split('|');
/** @type {?} */
var result = { presets: {}, order: [] };
for (var i = 0; i < splittedValues.length; i++) {
/** @type {?} */
var splittedParam = splittedValues[i] && splittedValues[i].split(':');
/** @type {?} */
var prop = splittedParam[0] && splittedParam[0].trim();
/** @type {?} */
var val = splittedParam[1] && splittedParam[1].trim();
if (prop && val) {
result.presets[prop] = val;
result.order.unshift(prop);
}
}
return result[type];
};
/**
* @param {?} img

@@ -136,3 +105,7 @@ * @param {?} config

} while (parentNode && !width);
return width;
/** @type {?} */
var letPadding = width && parentNode && parseInt(window.getComputedStyle(parentNode).paddingLeft, 10);
/** @type {?} */
var rightPadding = parseInt(window.getComputedStyle(parentNode).paddingRight, 10);
return width + (width ? (-letPadding - rightPadding) : 0);
};

@@ -148,26 +121,9 @@ /**

function (currentSize) {
return currentSize <= 25 ? '25' :
currentSize <= 50 ? '50' :
currentSize <= 100 ? '100'
: currentSize <= 200 ? '200'
: currentSize <= 300 ? '300'
: currentSize <= 400 ? '400'
: currentSize <= 500 ? '500'
: currentSize <= 600 ? '600'
: currentSize <= 700 ? '700'
: currentSize <= 800 ? '800'
: currentSize <= 900 ? '900'
: currentSize <= 1000 ? '1000'
: currentSize <= 1100 ? '1100'
: currentSize <= 1200 ? '1200'
: currentSize <= 1300 ? '1300'
: currentSize <= 1400 ? '1400'
: currentSize <= 1500 ? '1500'
: currentSize <= 1600 ? '1600'
: currentSize <= 1700 ? '1700'
: currentSize <= 1800 ? '1800'
: currentSize <= 1900 ? '1900'
: currentSize <= 2400 ? '2400'
: currentSize <= 2800 ? '2800'
: '3600';
if (currentSize <= 25) {
return '25';
}
if (currentSize <= 50) {
return '50';
}
return (Math.ceil(currentSize / 100) * 100).toString();
};

@@ -183,3 +139,10 @@ /**

function (size) {
return size && typeof size === 'object';
try {
/** @type {?} */
var array = size.split(',');
return array.length > 1;
}
catch (e) {
return false;
}
};

@@ -283,34 +246,22 @@ /**

function (operation, size, filters, imgSrc, isAdaptive, config, isPreview) {
var _this = this;
/** @type {?} */
var sources = [];
if (isAdaptive) {
/** @type {?} */
var orderFiltered = [];
for (var i = 0; i < config.order.length; i++) {
/** @type {?} */
var nextSize = size[config.order[i]];
if (nextSize) {
orderFiltered.unshift(config.order[i]);
}
}
for (var i = 0; i < orderFiltered.length; i++) {
/** @type {?} */
var isLast = !(i < orderFiltered.length - 1);
/** @type {?} */
var nextSizeType = isLast ? orderFiltered[i - 1] : orderFiltered[i];
/** @type {?} */
var nextSize = size[orderFiltered[i]];
size.forEach(function (_a) {
var nextSize = _a.size, mediaQuery = _a.media;
if (isPreview) {
nextSize = nextSize.split('x').map(function (item) { return item / 5; }).join('x');
nextSize = nextSize.split('x').map(function (sizeNext) { return sizeNext / 5; }).join('x');
filters = 'q10.foil1';
}
/** @type {?} */
var srcSet = this.generateSrcset(operation, nextSize, filters, imgSrc, config);
/** @type {?} */
var mediaQuery = '(' + (isLast ? 'min' : 'max') + '-width: ' + (config.presets[nextSizeType] + (isLast ? 1 : 0)) + 'px)';
sources.push({ mediaQuery: mediaQuery, srcSet: srcSet });
}
sources.push({ mediaQuery: mediaQuery, srcSet: _this.generateSrcset(operation, nextSize, filters, imgSrc, config) });
});
}
else {
if (isPreview) {
size = size.split('x').map(function (sizeNext) { return sizeNext / 5; }).join('x');
filters = 'q10.foil1';
}
sources.push({
srcSet: this.generateSrcset(operation, size.split('x').map(function (item) { return item / 5; }).join('x'), 'q10.foil1', imgSrc, config)
srcSet: this.generateSrcset(operation, size, filters, imgSrc, config)
});

@@ -321,2 +272,26 @@ }

/**
* @param {?} size
* @param {?} config
* @return {?}
*/
CIService.prototype.getAdaptiveSize = /**
* @param {?} size
* @param {?} config
* @return {?}
*/
function (size, config) {
/** @type {?} */
var arrayOfSizes = size.split(',');
/** @type {?} */
var sizes = [];
arrayOfSizes.forEach(function (string) {
/** @type {?} */
var groups = string.match(/((?<variable>[a-z_][a-z_]*)|(?<media>\([\S\s]*\)))\s*(?<size>[0-9xp]*)/).groups;
/** @type {?} */
var media = groups.media ? groups.media : config.presets[groups.variable];
sizes.push({ media: media, size: groups.size });
});
return sizes;
};
/**
* @param {?} operation

@@ -338,6 +313,3 @@ * @param {?} size

function (operation, size, filters, imgSrc, config) {
/** @type {?} */
var imgWidth = size.toString().split('x')[0];
/** @type {?} */
var imgHeight = size.toString().split('x')[1];
var _a = __read(size.toString().split('x'), 2), imgWidth = _a[0], imgHeight = _a[1];
return this.generateImgSrc(operation, filters, imgSrc, imgWidth, imgHeight, 1, config);

@@ -388,2 +360,3 @@ };

function (size, config) {
var _a, _b;
/** @type {?} */

@@ -395,29 +368,9 @@ var width;

/** @type {?} */
var breakPoint = this.getBreakPoint(config);
var breakPointSource = this.getBreakPoint(size);
/** @type {?} */
var orderIndex = config.order.indexOf(breakPoint);
/** @type {?} */
var breakPointSize = null;
do {
/** @type {?} */
var nextBreakpoint = config.order[orderIndex];
breakPointSize = size[nextBreakpoint];
orderIndex--;
} while (!breakPointSize && orderIndex >= 0);
if (!breakPointSize) {
/** @type {?} */
var orderIndexStepTwo = config.order.indexOf(breakPoint);
do {
/** @type {?} */
var nextBreakpoint = config.order[orderIndexStepTwo];
breakPointSize = size[nextBreakpoint];
orderIndexStepTwo++;
} while (!breakPointSize && orderIndexStepTwo <= config.order.length);
}
width = breakPointSize.toString().split('x')[0];
height = breakPointSize.toString().split('x')[1];
var breakPointSize = breakPointSource ? breakPointSource.size : size[0].size;
_a = __read(breakPointSize.toString().split('x'), 2), width = _a[0], height = _a[1];
}
else {
width = size.toString().split('x')[0];
height = size.toString().split('x')[1];
_b = __read(size.toString().split('x'), 2), width = _b[0], height = _b[1];
}

@@ -430,16 +383,11 @@ if (width && height) {

/**
* @param {?} config
* @param {?} size
* @return {?}
*/
CIService.prototype.getBreakPoint = /**
* @param {?} config
* @param {?} size
* @return {?}
*/
function (config) {
var presets = config.presets, order = config.order;
/** @type {?} */
var innerWidth = window.innerWidth;
/** @type {?} */
var prevBreakPointLimit = order.findIndex(function (item) { return presets[item] < innerWidth; });
return order[prevBreakPointLimit - 1] || order[prevBreakPointLimit] || order[order.length - 1];
function (size) {
return __spread(size).reverse().find(function (item) { return matchMedia(item.media).matches; });
};

@@ -467,5 +415,8 @@ CIService.decorators = [

this._sanitizer = _sanitizer;
this.class = '';
this.offset = 100;
this.cloudimageUrl = '';
this.sources = [];
this.firstSource = null;
this.restSources = [];
this.isLoaded = false;

@@ -495,8 +446,5 @@ this.isProcessed = false;

this.resizeSubscription$ = this.resizeObservable$.subscribe(function () {
if (_this.isAdaptive) {
if (_this.isAdaptive || _this.windowInnerWidth < window.innerWidth) {
_this.processImage();
}
else if (_this.windowInnerWidth < window.innerWidth) {
_this.processImage();
}
_this.windowInnerWidth = window.innerWidth;

@@ -535,2 +483,3 @@ });

var isAdaptive = this.ciService.checkOnMedia(size);
size = isAdaptive ? this.ciService.getAdaptiveSize(size, config) : size;
/** @type {?} */

@@ -544,3 +493,3 @@ var isRelativeUrlPath = this.ciService.checkIfRelativeUrlPath(this.src);

this.cloudimageUrl = isAdaptive ?
this.ciService.generateUrl('width', parentContainerWidth, filters, imgSrc, config) :
this.ciService.generateUrl('width', this.ciService.getSizeAccordingToPixelRatio(parentContainerWidth), filters, imgSrc, config) :
this.ciService.generateUrl(operation, resultSize, filters, imgSrc, config);

@@ -597,2 +546,25 @@ this.sources = isAdaptive ?

*/
ImgComponent.prototype.getRestSources = /**
* @return {?}
*/
function () {
/** @type {?} */
var resultSources = __spread((!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources)));
return resultSources.slice(1).reverse();
};
/**
* @return {?}
*/
ImgComponent.prototype.getFirstSource = /**
* @return {?}
*/
function () {
/** @type {?} */
var resultSources = __spread((!this.isPreview ? this.sources : (this.isPreviewLoaded ? this.sources : this.previewSources)));
this.firstSource = resultSources[0];
return resultSources[0];
};
/**
* @return {?}
*/
ImgComponent.prototype.getPositionStyle = /**

@@ -611,3 +583,5 @@ * @return {?}

function () {
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
// todo check if we need 100% height
// return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? '100%' : 'auto');
return this._sanitizer.bypassSecurityTrustStyle(this.isRatio ? 'auto' : 'auto');
};

@@ -689,3 +663,3 @@ /**

var result = 'transparent';
if (this.isRatio) {
if (this.isRatio && !this.isPreviewLoaded && !this.isLoaded) {
result = config.placeholderBackground;

@@ -698,3 +672,3 @@ }

selector: 'ci-img',
template: "\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "
template: "\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of getRestSources()\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"getFirstSource()\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of restSources\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"firstSource\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "
}] }

@@ -701,0 +675,0 @@ ];

@@ -26,2 +26,4 @@ import { OnInit, AfterViewInit, ElementRef, OnDestroy } from '@angular/core';

sources: any[];
firstSource: any;
restSources: any[];
isLoaded: boolean;

@@ -47,2 +49,4 @@ isProcessed: boolean;

onImageLoad(): void;
getRestSources(): any[];
getFirstSource(): any;
getPositionStyle(): import("@angular/platform-browser/src/security/dom_sanitization_service").SafeStyle;

@@ -49,0 +53,0 @@ getImgHeight(): import("@angular/platform-browser/src/security/dom_sanitization_service").SafeStyle;

@@ -1,9 +0,8 @@

import { CIConfig } from './config.service';
import { CIConfig } from './config.model';
export declare class CIService {
config: any;
constructor(ciConfig: CIConfig);
getPresets(value: string, type: any): any;
getParentWidth(img: any, config: any): any;
getParentContainerWithWidth(img: any): number;
getSizeLimit(currentSize: any): "400" | "300" | "25" | "50" | "100" | "200" | "500" | "600" | "700" | "800" | "900" | "1000" | "1100" | "1200" | "1300" | "1400" | "1500" | "1600" | "1700" | "1800" | "1900" | "2400" | "2800" | "3600";
getSizeLimit(currentSize: any): string;
checkOnMedia(size: any): boolean;

@@ -15,6 +14,7 @@ checkIfRelativeUrlPath(src: any): boolean;

generateSources(operation: any, size: any, filters: any, imgSrc: any, isAdaptive: any, config: any, isPreview: any): any[];
getAdaptiveSize(size: any, config: any): any[];
generateSrcset(operation: any, size: any, filters: any, imgSrc: any, config: any): string;
generateImgSrc(operation: any, filters: any, imgSrc: any, imgWidth: any, imgHeight: any, factor: any, config: any): string;
getRatioBySize(size: any, config: any): number;
getBreakPoint(config: any): any;
getBreakPoint(size: any): any;
}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"CIService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"CIConfig"}]}],"getPresets":[{"__symbolic":"method"}],"getParentWidth":[{"__symbolic":"method"}],"getParentContainerWithWidth":[{"__symbolic":"method"}],"getSizeLimit":[{"__symbolic":"method"}],"checkOnMedia":[{"__symbolic":"method"}],"checkIfRelativeUrlPath":[{"__symbolic":"method"}],"getImgSrc":[{"__symbolic":"method"}],"getSizeAccordingToPixelRatio":[{"__symbolic":"method"}],"generateUrl":[{"__symbolic":"method"}],"generateSources":[{"__symbolic":"method"}],"generateSrcset":[{"__symbolic":"method"}],"generateImgSrc":[{"__symbolic":"method"}],"getRatioBySize":[{"__symbolic":"method"}],"getBreakPoint":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"CIConfig":{"__symbolic":"class","members":{}},"CIModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ImgComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":12},{"__symbolic":"reference","module":"ng-lazyload-image","name":"LazyLoadImageModule","line":7,"character":26}],"exports":[{"__symbolic":"reference","name":"ImgComponent"}],"providers":[]}]}],"members":{}},"ImgComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"ci-img","template":"\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n class=\"{{class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')}}\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of (!isPreview ? sources : (isPreviewLoaded ? sources : previewSources))\"\n [media]=\"source.mediaQuery || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "}]}],"members":{"imgElem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":70,"character":3},"arguments":["imgElem"]}]}],"pictureElem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":71,"character":3},"arguments":["pictureElem"]}]}],"src":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}}]}],"class":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":73,"character":3}}]}],"alt":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":74,"character":3}}]}],"operation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":75,"character":3}}]}],"o":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}}]}],"s":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":3}}]}],"filters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":3}}]}],"f":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":80,"character":3}}]}],"ratio":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":81,"character":3}}]}],"offset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":82,"character":3}}]}],"ngSwitch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"CIService"},{"__symbolic":"reference","module":"@angular/platform-browser","name":"DomSanitizer","line":104,"character":64}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"processImage":[{"__symbolic":"method"}],"onImageLoad":[{"__symbolic":"method"}],"getPositionStyle":[{"__symbolic":"method"}],"getImgHeight":[{"__symbolic":"method"}],"getTransformStyle":[{"__symbolic":"method"}],"getTransitionStyle":[{"__symbolic":"method"}],"getFilterStyle":[{"__symbolic":"method"}],"getPicturePaddingBottom":[{"__symbolic":"method"}],"getPictureBackground":[{"__symbolic":"method"}]}}},"origins":{"CIService":"./lib/lib.service","CIConfig":"./lib/config.service","CIModule":"./lib/lib.module","ImgComponent":"./lib/img/img.component"},"importAs":"ng-cloudimage-responsive"}
{"__symbolic":"module","version":4,"metadata":{"CIService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"CIConfig"}]}],"getParentWidth":[{"__symbolic":"method"}],"getParentContainerWithWidth":[{"__symbolic":"method"}],"getSizeLimit":[{"__symbolic":"method"}],"checkOnMedia":[{"__symbolic":"method"}],"checkIfRelativeUrlPath":[{"__symbolic":"method"}],"getImgSrc":[{"__symbolic":"method"}],"getSizeAccordingToPixelRatio":[{"__symbolic":"method"}],"generateUrl":[{"__symbolic":"method"}],"generateSources":[{"__symbolic":"method"}],"getAdaptiveSize":[{"__symbolic":"method"}],"generateSrcset":[{"__symbolic":"method"}],"generateImgSrc":[{"__symbolic":"method"}],"getRatioBySize":[{"__symbolic":"method"}],"getBreakPoint":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"CIConfig":{"__symbolic":"class","members":{}},"CIModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ImgComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":12},{"__symbolic":"reference","module":"ng-lazyload-image","name":"LazyLoadImageModule","line":7,"character":26}],"exports":[{"__symbolic":"reference","name":"ImgComponent"}],"providers":[]}]}],"members":{}},"ImgComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"ci-img","template":"\n <picture #pictureElem *ngIf=\"!isProcessed\"></picture>\n\n <ng-container [ngSwitch]=\"lazyLoading\">\n <ng-container *ngSwitchCase=\"true\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of getRestSources()\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"getFirstSource()\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [lazyLoad]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [offset]=\"offset\"\n [alt]=\"\">\n </picture>\n </ng-container>\n <div *ngSwitchCase=\"false\">\n <picture\n [class]=\"class + ' cloudimage-image-picture cloudimage-image-' + (isLoaded ? 'loaded' : 'loading')\"\n style=\"display:block;width:100%;overflow:hidden;position:relative;\"\n [style.paddingBottom]=\"getPicturePaddingBottom()\"\n [style.background]=\"getPictureBackground()\"\n #imgElem\n *ngIf=\"isProcessed\">\n <source\n *ngFor=\"let source of restSources\"\n [media]=\"source.mediaQuery || ''\"\n [attr.lazyLoad]=\"source.srcSet || ''\"\n [srcset]=\"source.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <source\n *ngIf=\"firstSource\"\n [attr.lazyLoad]=\"firstSource.srcSet || ''\"\n [srcset]=\"firstSource.srcSet || ''\"\n (load)=\"onImageLoad()\"\n />\n <img\n style=\"display:block;width:100%;opacity:1;top:0;left:0;\"\n [style.position]=\"getPositionStyle()\"\n [style.height]=\"getImgHeight()\"\n [style.transform]=\"getTransformStyle()\"\n [style.transition]=\"getTransitionStyle()\"\n [style.filter]=\"getFilterStyle()\"\n (load)=\"onImageLoad()\"\n [src]=\"!isPreview ? cloudimageUrl : (isPreviewLoaded ? cloudimageUrl : previewCloudimageUrl)\"\n [alt]=\"\">\n </picture>\n </div>\n </ng-container>\n "}]}],"members":{"imgElem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":83,"character":3},"arguments":["imgElem"]}]}],"pictureElem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":84,"character":3},"arguments":["pictureElem"]}]}],"src":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":85,"character":3}}]}],"class":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":3}}]}],"alt":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":87,"character":3}}]}],"operation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3}}]}],"o":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":89,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":90,"character":3}}]}],"s":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3}}]}],"filters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3}}]}],"f":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":3}}]}],"ratio":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3}}]}],"offset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3}}]}],"ngSwitch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"CIService"},{"__symbolic":"reference","module":"@angular/platform-browser","name":"DomSanitizer","line":119,"character":64}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"processImage":[{"__symbolic":"method"}],"onImageLoad":[{"__symbolic":"method"}],"getRestSources":[{"__symbolic":"method"}],"getFirstSource":[{"__symbolic":"method"}],"getPositionStyle":[{"__symbolic":"method"}],"getImgHeight":[{"__symbolic":"method"}],"getTransformStyle":[{"__symbolic":"method"}],"getTransitionStyle":[{"__symbolic":"method"}],"getFilterStyle":[{"__symbolic":"method"}],"getPicturePaddingBottom":[{"__symbolic":"method"}],"getPictureBackground":[{"__symbolic":"method"}]}}},"origins":{"CIService":"./lib/lib.service","CIConfig":"./lib/config.model","CIModule":"./lib/lib.module","ImgComponent":"./lib/img/img.component"},"importAs":"ng-cloudimage-responsive"}
{
"name": "ng-cloudimage-responsive",
"version": "0.0.4",
"description": "Cloudimage responsive plugin will make your website load the exact image size you need depending on your user's screen size. Multiple pixel ratios are supported.",
"peerDependencies": {
"@angular/common": "^7.0.0",
"@angular/core": "^7.0.0",
"rxjs": "^6.0.0"
},
"version": "1.0.0",
"description": "Cloudimage Responsive will smartly resize, compress and accelerate images across the World in your site for all devices. The plugin supports lazy loading technique with fancy animation on image load.",
"author": "scaleflex",
"license": "MIT",
"repository": {

@@ -15,6 +12,2 @@ "type": "git",

"homepage": "https://github.com/scaleflex/ng-cloudimage-responsive#readme",
"dependencies": {
"ng-lazyload-image": "^5.0.0",
"tslib": "^1.9.0"
},
"keywords": [

@@ -41,4 +34,11 @@ "angular",

],
"author": "scaleflex",
"license": "MIT",
"peerDependencies": {
"@angular/common": "^7.0.0",
"@angular/core": "^7.0.0",
"rxjs": "^6.0.0"
},
"dependencies": {
"ng-lazyload-image": "^5.0.0",
"tslib": "^1.9.0"
},
"main": "bundles/ng-cloudimage-responsive.umd.js",

@@ -45,0 +45,0 @@ "module": "fesm5/ng-cloudimage-responsive.js",

export * from './lib/lib.service';
export * from './lib/config.service';
export * from './lib/config.model';
export * from './lib/lib.module';
export * from './lib/img/img.component';

@@ -1,19 +0,93 @@

![](https://demo.cloudimg.io/width/800/none/sample.li/Cloudimage_diagram.jpeg)
[![Release](https://img.shields.io/badge/release-v1.0.0-blue.svg)](https://github.com/scaleflex/ng-cloudimage-responsive/releases)
[![Free plan](https://img.shields.io/badge/price-includes%20free%20plan-green.svg)](https://www.cloudimage.io/en/home#b38181a6-b9c8-4015-9742-7b1a1ad382d5)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Scaleflex team](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg)](https://www.scaleflex.it/en/home)
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Responsive%20images,%20now%20easier%20than%20ever&url=https://scaleflex.github.io/ng-cloudimage-responsive/&via=cloudimage&hashtags=react,images,cloudimage,responsive_images,lazy_loading,web_acceleration,image_optimization,image_CDN,image_CDNwebp,jpeg_xr,jpg_optimization,image_resizing_and_CDN,angular)
<p align="center">
<img
height="175"
alt="The Lounge"
src="https://demo.cloudimg.io/height/350/n/https://scaleflex.airstore.io/filerobot/filerobot-cloudimage.png?sanitize=true">
</p>
<h1 align="center">
Angular Cloudimage Responsive
</h1>
<p align="center">
<strong>
<a href="#table_of_contents">Docs</a>
<a href="https://scaleflex.github.io/ng-cloudimage-responsive/" target="_blank">Demo</a>
<a href="#" target="_blank">Why?</a>
</strong>
</p>
This plugin detects the width of any image container as well as the device pixel ratio
density to load the optimal image size needed.
Images are resized on-the-fly via the <a href="https://cloudimage.io" target="_blank">Cloudimage service</a>, thus offering a comprehensive
automated image optimization service.
When an image is first loaded on your website or mobile app,
Cloudimage's resizing servers will download the origin image from
the source, resize it for the client's screen size and deliver to your users through one or multiple
Content Delivery Networks (CDNs). The generated image formats are cached in the CDN and will be delivered rocket fast on any subsequent request.
**NOTE:** Your original (master) images should be stored on a server
or storage bucket (S3, Google Cloud, Azure Blob...) reachable over
HTTP or HTTPS by Cloudimage. If you want to upload your master images to
Cloudimage, contact us at
[hello@cloudimage.io](mailto:hello@cloudimage.io).
<p align="center">
<img
alt="The Lounge"
src="https://demo.cloudimg.io/width/1400/n/https://demo.cloudimg.io/width/800/none/sample.li/Cloudimage_diagram.jpeg?sanitize=true">
</p>
powered by [Cloudimage](https://www.cloudimage.io/)
([Watch the video here](https://www.youtube.com/watch?time_continue=2&v=JFZSE1vYb0k))
## Cloudimage Angular Plugin
## Table of contents
Cloudimage Responsive plugin will resize, compress and accelerate images across the World in your Angular application. It leverages the HTML5 `<picture>` and `srcset` elements to deliver the right image size based on the client's screen size and pixel ratio (retina or non-retina).
* [Demo](#demo)
* [Requirements](#requirements)
* [Step 1: Installation](#installation)
* [Step 2: Initialize](#initialize)
* [Step 3: Implement](#implement)
* [Configuration](#configuration)
* [Image properties](#image_properties)
* [Lazy loading](#lazy_loading)
* [Browser support](#browser_support)
* [Filerobot UI Family](#ui_family)
* [Contributing](#contributing)
* [License](#license)
**NOTE:** Your original (master) images should be stored on a server or storage bucket (S3, Google Cloud, Azure Blob...) reachable over HTTP or HTTPS by Cloudimage. If you want to upload your master images to Cloudimage, contact us at [hello@cloudimage.io](mailto:hello@cloudimage.io).
## <a name="demo"></a> Demo
## Demo
To see the Cloudimage Responsive plugin in action, please check out the
[Demo page](https://scaleflex.github.io/ng-cloudimage-responsive/).
Play with your browser's window size and observe your
Inspector's Network tab to see how Cloudimage delivers the optimal
image size to your browser, hence accelerating the overall page
loading time.
To see the Cloudimage Responsive plugin in action, please check out the [Demo page](https://scaleflex.github.io/ng-cloudimage-responsive/). Play with your browser's viewport size and observe your Inspector's Network tab to see how Cloudimage delivers the optimal image size to your browser, hence accelerating the overall page loading time.
## <a name="requirements"/> Requirements
## Installation
To use the Cloudimage Responsive plugin, you will need a
Cloudimage token to deliver your images over CDN. Don't worry, it only takes seconds to get one by
registering [here](https://www.cloudimage.io/en/register_page).
Once your token is created, you can configure it as described below.
This token allows you to use 25GB of image cache and 25GB of worldwide
CDN traffic per month for free.
## <a name="installation"></a>Step 1: Installation
using npm
```

@@ -23,8 +97,11 @@ $ npm install --save ng-cloudimage-responsive

And then include it in your module (see app.module.ts):
## <a name="initialize"></a>Step 2: Initialize
After installing the ng-cloudimage-responsive lib, simply initialize it with your **token** and the **baseUrl**
of your image storage:
```javascript
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { CIModule, CIService, CIConfig } from 'ng-cloudimage-responsive';
import { CIModule, CIConfig } from 'ng-cloudimage-responsive';
import { AppComponent } from './app.component';

@@ -41,4 +118,3 @@

providers: [
{provide: CIConfig, useValue: ciConfig},
CIService
{provide: CIConfig, useValue: ciConfig}
],

@@ -50,15 +126,15 @@ bootstrap: [ AppComponent ]

## Simple Usage
## <a name="implement"></a>Step 3: Implement it
Finally, just use the ci-img component:
```html
<ci-img src="img.jpg" alt="Demo image" ratio="1.5"></ci-img>
```
Note: as you see, using the Cloudimage plugin is very easy - just use the `ci-img` instead of the `img` tag.
## Requirements
NOTE: "ratio" is recommended to prevent page layout jumping. The parameter is used to calculate image height to hold
the image position while image is loading.
To use the Cloudimage Responsive plugin, you will need a Cloudimage token. Don't worry, it only takes seconds to get one by registering [here](https://www.cloudimage.io/en/register_page). Once your token is created, you can configure it as described below. This token allows you to use 25GB of image cache and 25GB of worldwide CDN traffic per month for free.
## <a name="configuration"></a> Config
## Config
### token

@@ -68,15 +144,19 @@

Your Cloudimage customer token. [Subscribe](https://www.cloudimage.io/en/register_page) for a Cloudimage account to get one. The subscription takes less than a minute and is totally free
Your Cloudimage customer token.
[Subscribe](https://www.cloudimage.io/en/register_page) for a
Cloudimage account to get one. The subscription takes less than a
minute and is totally free.
### lazyLoading
### baseUrl
###### Type: **Bool** | Default: **true** | _required_
###### Type: **String** | Default: **"/"** | _optional_
Only load images close to the viewport
Your image folder on server, this alows to shorten your origin image URLs.
### imgLoadingAnimation
### lazyLoading
###### Type: **Bool** | Default: **true** | _required_
###### Type: **Bool** | Default: **true** | _optional_
Nice effect for preview transition
Only images close to the client's viewport will be loaded, hence accelerating the page loading time. The plugin uses
[ng-lazyload-image](https://github.com/tjoskar/ng-lazyload-image) library to achieve it.

@@ -90,2 +170,8 @@ ### lazyLoadOffset

### imgLoadingAnimation
###### Type: **Bool** | Default: **true** | _optional_
Applies a nice interlacing effect for preview transition
### filters

@@ -95,5 +181,8 @@

Parameters like fcontrast, fpixelate, fgaussian, backtransparent,
rotation to apply filters on your image by default
Applies default Cloudimage filters to your image, e.g. fcontrast, fpixelate, fgaussian, backtransparent,
rotation... Multiple filters can be applied, separated by "```.```" (dot).
[Full documentaiton here.](https://docs.cloudimage.io/go/cloudimage-documentation/en/filters/)
### placeholderBackground

@@ -103,32 +192,53 @@

Parameters like fcontrast, fpixelate, fgaussian, backtransparent,
rotation to apply filters on your image by default
Placeholder colored background while the image is loading
### baseUrl
### presets
###### Type: **String** | Default: **"/"** | _optional_
###### Type: **Object**
Your image folder on server.
Default:
```javascript
const ciConfig = {
token: 'demo',
baseUrl: 'https://jolipage.airstore.io/',
...
presets: {
xs: '(max-width: 575px)', // up to 575 PHONE
sm: '(min-width: 576px)', // 576 - 767 PHABLET
md: '(min-width: 768px)', // 768 - 991 TABLET
lg: '(min-width: 992px)', // 992 - 1199 SMALL_LAPTOP_SCREEN
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
}
};
```
## Image properties
Breakpoints shortcuts to use in image size property, can be overwridden.
## <a name="image_properties"></a> Image properties
### src
###### Type: **String** | _required_
###### Type: **String** | Default: **undefined** | _required_
Original image hosted on your web server.
Original image hosted on your web server. You can use absolute path or
relative to baseUrl in your config.
### operation/o
**NOTES:**
[see doc](https://docs.cloudimage.io/go/cloudimage-documentation/en/operations/)
The plugin uses a special algorithm to detect the width of image container and set the image size accordingly.
This is the recommended way of using the Cloudimage Responsive plugin.
### operation (or o)
###### Type: **String** | Default: **width** | _optional_
**width** - to resize with a specific width
Operation allows to customize the behaviour of the plugin for specific images:
**height** - to resize with a specific height
**width** - to resize with a specific width. This is useful when you want to have a fixed width, regardless of screen size.
**crop** - to crop the image at the center
**height** - to resize with a specific height. This is useful when you want to have a fixed height, regardless of screen size.
**crop** - to crop the image around the center
**fit** - to resize the image in a box and keeping the proportions of the source image

@@ -138,6 +248,12 @@

### size/s
**NOTES:**
###### Type: **String/Object** | _optional_
When you use an operation, you must specify the size for each screen size, see below
Full documentation of all operations available [here](https://docs.cloudimage.io/go/cloudimage-documentation/en/operations/)
### size (or s)
###### Type: **String** | Default: **undefined** | _optional_ but _required_ when using operation
Size of an image which is used as a base for creating retina ready and responsive image element.

@@ -147,20 +263,59 @@

**[width]**: s="250" => width: 250 * PR (px); height: auto;
**[width]**:
**[width x height]**: s="125x200" => width: 125 * PR (px); height: 200 * PR (px);
```html
<ci-img
src="dino-reichmuth-1.jpg"
operation="width"
size="250"/>
```
=> width: 250 * PR (px); height: auto;
**[width x height]**:
```html
<ci-img
src="dino-reichmuth-1.jpg"
operation="width"
size="125x200"/>
```
=> width: 125 * PR (px); height: 200 * PR (px);
**[Width and height for different screen resolutions]**:
s={{ xs: '50x100', sm:'100x125', md: '150x150', lg:'200x175', xl:'300x200' }}
```html
<ci-img
src="dino-reichmuth-1.jpg"
operation="crop"
size="
sm 800x400,
(min-width: 620px) 200x20,
md 1000x1350,
lg 1400x1200,
xl 1600x1000
"/>
```
*You can drop some breakpoints, for example s={{ sm:'100x125', xl:'300x200' }}
You can drop some breakpoints, for example:
**NOTE:** if size is set to **undefined**, Cloudimage uses a special
algorithm to detect the width of image container and set the image size
accordingly.
```html
<ci-img
src="dino-reichmuth-1.jpg"
operation="crop"
size="md 1000x1350, lg 1400x1200"/>
```
### filters/f
**NOTE:** if size is not set, the plugin uses a special algorithm to
detect the width of image container and set the image size accordingly. This is the recommended way of using
the Cloudimage Responsive plugin.
[see doc](https://docs.cloudimage.io/go/cloudimage-documentation/en/filters/)
For example:
```html
<ci-img src="dino-reichmuth-1.jpg"/>
```
### filters (or f)
###### Type: **String** | Default: **none** | _optional_

@@ -182,5 +337,30 @@

Full documentation of all filters available [here](https://docs.cloudimage.io/go/cloudimage-documentation/en/filters/)
***
### ratio (or r)
###### Type: **Number** | _optional_
It is recommended to prevent page layout jumping. The parameter is used to calculate image height to hold
the image position while image is loading.
To see the full cloudimage documentation [click here](https://docs.cloudimage.io/go/cloudimage-documentation)
## <a name="browser_support"></a>Browser support
Tested in all modern browsers and IE 11.
## <a name="ui_family"></a>Filerobot UI Familiy
* [JS Cloudimage Responsive](https://github.com/scaleflex/js-cloudimage-responsive)
* [React Cloudimage Responsive](https://github.com/scaleflex/react-cloudimage-responsive)
* [Image Editor](https://github.com/scaleflex/filerobot-image-editor)
* [Uploader](https://github.com/scaleflex/filerobot-uploader)
## <a name="contributing"></a>Contributing!
All contributions are super welcome!
## <a name="license"></a>License
Angular Cloudimage Responsive is provided under the [MIT License](https://opensource.org/licenses/MIT)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc