{"version":3,"sources":["webpack://my-webpack-project/./node_modules/@babel/runtime/helpers/createClass/_index.mjs","webpack://my-webpack-project/./src/app/components/getAllNews.js","webpack://my-webpack-project/./src/app/app.js","webpack://my-webpack-project/./node_modules/@babel/runtime/helpers/classCallCheck/_index.mjs"],"names":["_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","news","instance","Constructor","TypeError","this","command","protoProps","type","fetch","method","then","response","json","data","root","info_items","info_item","item","Array","isArray","skupina","renderNewsBannerHomepage","renderActualities","console","error","block","document","getElementById","newsTemplate","newItem","datum","novinka_nadpis","novinka","innerHTML","home_page","homeSlick","getElementsByClassName","wrapper","createElement","setAttribute","appendChild","renderSlider","prototype","callApi"],"mappings":"mBAAA,SAASA,EAAkBC,EAAQC,GACjC,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CACrC,IAAIE,EAAaH,EAAMC,GACvBE,EAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,UAAWF,IAAYA,EAAWG,UAAW,GACjDC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,I,ogCCN3C,ICEHO,EAAO,IDFX,WAEI,cEFW,SAAyBC,EAAUC,GAChD,KAAMD,aAAoBC,GACxB,MAAM,IAAIC,UAAU,qCFAN,SACVC,KAAKC,QAAU,iDDOR,IAAsBH,EAAaI,ECVlD,ODUqCJ,ECVrC,GDUkDI,ECVlD,+BAMaC,GAAO,WACZC,MAAMJ,KAAKC,QAAS,CAChBI,OAAQ,QAEXC,MAAK,SAAAC,GAAQ,OAAIA,EAASC,UAC1BF,MAAK,SAAAG,GAAQ,UACSA,EAAKC,KAAKC,WAAWC,WAD9B,IACV,2BAAmD,KAAxCC,EAAwC,QAC3CJ,EAAOK,MAAMC,QAAQF,EAAKF,WAAWC,WAAaC,EAAKF,WAAWC,UAAY,CAACC,EAAKF,WAAWC,WAC9E,WAAhBC,EAAKG,QACM,QAARb,GACA,EAAKc,yBAAyBR,GAGV,aAAhBI,EAAKG,SACD,aAARb,GAAqB,EAAKe,kBAAkBT,IAT9C,kCAJd,MAiBOU,QAAQC,SAxBvB,iCA0BexB,GACP,IADY,EACRyB,EAAQC,SAASC,eAAe,QAChCC,EAAe,GAFP,IAIU5B,EAAKe,WAAWC,WAJ1B,IAIZ,2BAAiD,KAAtCa,EAAsC,QAC7CD,GAAiB,QAAUC,EAAQC,MAAQ,OAAUD,EAAQE,eAAiB,WAAYF,EAAQG,QAAU,cALpG,8BAQRP,IACAA,EAAMQ,UAAYL,KAnC9B,mCAuCiBC,GAET,GAAGA,EAAQK,UAAU,CACjB,IAAIC,EAAYT,SAASU,uBAAuB,cAAc,GAC1DC,EAAUX,SAASY,cAAc,OACrCD,EAAQE,aAAa,QAAS,iBAC9BF,EAAQJ,UAAYJ,EAAQG,QAC5BG,EAAUK,YAAYH,MA9ClC,+CAoD6BrC,GAAK,UAEVA,GAFU,IAE1B,2BAAqB,KAAbiB,EAAa,QACjBb,KAAKqC,aAAaxB,IAHI,iCApDlC,wCA2DsBA,GACd,IADmB,EACfQ,EAAQC,SAASC,eAAe,aAChCC,EAAe,GAFA,IAIGX,GAJH,IAInB,2BAA4B,KAAjBY,EAAiB,QACxBD,GACA,YAAcC,EAAQE,eAAiB,QAAUF,EAAQG,QACzD,UAPe,8BAUnBP,EAAMQ,UAAYL,OD1DRxC,EAAkBc,EAAYwC,UAAWpC,GCX3D,MCIkBoB,SAASC,eAAe,gBAGvC3B,EAAK2C,QAAQ,QAGCjB,SAASC,eAAe,cAGrC3B,EAAK2C,QAAQ,c","file":"app.bundle.js","sourcesContent":["function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export class GetAllNews {\n\n constructor() {\n this.command = \"/ZasShopServicePage.aspx/?n=1&command=GET_NEWS\"\n }\n\n callApi( type ) {\n fetch(this.command, {\n method: 'get'\n })\n .then(response => response.json())\n .then(data => {\n for (const item of data.root.info_items.info_item) {\n let data = Array.isArray(item.info_items.info_item) ? item.info_items.info_item : [item.info_items.info_item]\n if ( item.skupina == \"Novinky\") {\n if( type == \"news\") {\n this.renderNewsBannerHomepage(data)\n }\n\n } else if ( item.skupina == \"Aktuality\" ) {\n if( type == \"actuality\") this.renderActualities(data);\n }\n }\n })\n .catch(console.error);\n }\n renderNews(news){\n let block = document.getElementById(\"news\");\n let newsTemplate = \"\";\n\n for (const newItem of news.info_items.info_item) {\n newsTemplate += \"
\"+ newItem.novinka + \"