{"version":3,"file":"vendors-json2mq~CarouselBlock~GalleryBlock.chunk.f98460dba237eb4666a1.js","mappings":"qFAAA,IAAIA,EAAe,EAAQ,OAOvBC,EAAS,SAAUC,GACrB,IAAIC,EAAK,GACLC,EAAWC,OAAOC,KAAKJ,GAmB3B,OAlBAE,EAASG,SAAQ,SAAUC,EAASC,GAClC,IAAIC,EAAQR,EAAIM,IATF,SAAUA,GAE1B,MADS,kBACCG,KAAKH,EACjB,EASQI,CAFJJ,EAAUR,EAAaQ,KAEsB,iBAAVE,IACjCA,GAAgB,MAGhBP,IADY,IAAVO,EACIF,GACa,IAAVE,EACH,OAASF,EAET,IAAMA,EAAU,KAAOE,EAAQ,IAEnCD,EAAQL,EAASS,OAAO,IAC1BV,GAAM,QAEV,IACOA,CACT,EAqBAW,EAAOC,QAnBO,SAAUC,GACtB,IAAIb,EAAK,GACT,MAAqB,iBAAVa,EACFA,EAGLA,aAAiBC,OACnBD,EAAMT,SAAQ,SAAUW,EAAGT,GACzBN,GAAMF,EAAOiB,GACTT,EAAQO,EAAMH,OAAO,IACvBV,GAAM,KAEV,IACOA,GAGFF,EAAOe,EAChB,C","sources":["webpack://Kristiania.Web/./node_modules/json2mq/index.js"],"sourcesContent":["var camel2hyphen = require('string-convert/camel2hyphen');\n\nvar isDimension = function (feature) {\n var re = /[height|width]$/;\n return re.test(feature);\n};\n\nvar obj2mq = function (obj) {\n var mq = '';\n var features = Object.keys(obj);\n features.forEach(function (feature, index) {\n var value = obj[feature];\n feature = camel2hyphen(feature);\n // Add px to dimension features\n if (isDimension(feature) && typeof value === 'number') {\n value = value + 'px';\n }\n if (value === true) {\n mq += feature;\n } else if (value === false) {\n mq += 'not ' + feature;\n } else {\n mq += '(' + feature + ': ' + value + ')';\n }\n if (index < features.length-1) {\n mq += ' and '\n }\n });\n return mq;\n};\n\nvar json2mq = function (query) {\n var mq = '';\n if (typeof query === 'string') {\n return query;\n }\n // Handling array of media queries\n if (query instanceof Array) {\n query.forEach(function (q, index) {\n mq += obj2mq(q);\n if (index < query.length-1) {\n mq += ', '\n }\n });\n return mq;\n }\n // Handling single media query\n return obj2mq(query);\n};\n\nmodule.exports = json2mq;"],"names":["camel2hyphen","obj2mq","obj","mq","features","Object","keys","forEach","feature","index","value","test","isDimension","length","module","exports","query","Array","q"],"sourceRoot":""}