Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@cafebazaar/jaldi

Package Overview
Dependencies
Maintainers
5
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cafebazaar/jaldi - npm Package Compare versions

Comparing version
1.4.0
to
1.4.1
+1
-0
dist/jaldi.cjs.js

@@ -274,2 +274,3 @@ 'use strict';

datePublished: date,
url: article.url,
dateModified: date,

@@ -276,0 +277,0 @@ headline: article.title,

+1
-1

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("idate"));function a(e,t){return function(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];try{return e.apply(void 0,a)}catch(e){return void console.error.apply(console,['Failed to Generate Correct JSON-LD via "'+(t||"unknown")+'" Method. Input:'].concat(a))}}}function r(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.map((function(e){return e.substring(e.startsWith("/")?1:0,e.endsWith("/")?e.length-1:e.length)})).join("/")}function n(e,t,a){return void 0===a&&(a=!1),Object.assign({},a&&{"@context":"https://schema.org"},{"@type":e},t)}var i="https://cafebazaar.ir",o=["https://www.facebook.com/cafebazaar","https://twitter.com/cafebazaar","https://instagram.com/cafebazaar","https://www.linkedin.com/company/iranian-congenial-mobile-co./","https://aparat.com/cafebazaar"];function c(e){return String(e||"").replace(/۰/g,"0").replace(/۱/g,"1").replace(/۲/g,"2").replace(/۳/g,"3").replace(/۴/g,"4").replace(/۵/g,"5").replace(/۶/g,"6").replace(/۷/g,"7").replace(/۸/g,"8").replace(/۹/g,"9")}function s(e){try{var t=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),a=Math.floor((Math.sin(t)+1)/2*12),r=Math.floor((Math.cos(t)+1)/2*28)+1,n=2020-Math.floor((Math.cos(t)+1)/2*3);return new Date(n,a,r)}catch(e){return new Date}}var p={weather:"","food-drink":"",education:"EducationalApplication",tools:"UtilitiesApplication",finance:"FinanceApplication",business:"BusinessApplication",shopping:"ShoppingApplication",medical:"HealthApplication","health-fitness":"HealthApplication","travel-local":"TravelApplication",sports:"SportsApplication","maps-navigation":"DriverApplication",lifestyle:"LifestyleApplication",entertainment:"EntertainmentApplication",social:"SocialNetworkingApplication","books-reference":"ReferenceApplication",personalization:"UtilitiesApplication",photography:"UtilitiesApplication",religious:"ReferenceApplication","music-audio":"MultimediaApplication","kids-apps":"GameApplication",communication:"CommunicationApplication",strategy:"GameApplication",action:"GameApplication",arcade:"GameApplication",casual:"GameApplication",racing:"GameApplication",simulation:"GameApplication","word-trivia":"GameApplication","kids-games":"GameApplication",puzzle:"GameApplication","sports-game":"GameApplication"};function l(e){var t={directors:[],actors:[],authors:[]};return e.forEach((function(e){/کارگردان|director/g.test(e.title)&&e.persons.length?t.directors=e.persons.map((function(e){return e.name})):/actor|بازیگران/g.test(e.title)?t.actors=e.persons.map((function(e){return e.name})):/author|نویسنده/g.test(e.title)&&(t.authors=e.persons.map((function(e){return e.name})))})),t}function u(e){for(var t=0;t<e.length;t+=1){var a=e[t];if(0===a.type)return a.url}return null}function m(e){return n("ItemList",{itemListElement:e.page.pageBodyInfo.pageBody.rows.map((function(e){var t=Object.keys(e)[0];if(!["simpleVideoItem","simpleAppItem"].includes(t))return null;var a=e[t];if(a.info.packageName)return r(i,"app/"+a.info.packageName);var n=["series","episode","movie"].find((function(e){return e in a.info})),o=a.info[n][n+"Id"];return r(i,{series:"series/s",episode:"series/e",movie:"video"}[n]+"/"+o)})).filter((function(e){return null!==e})).map((function(e,t){return n("ListItem",{position:t+1,url:e})}))},!0)}function d(e){void 0===e&&(e=0);var t=e,a=Math.floor(t/3600);t-=3600*a;var r=Math.floor(t/60),n=t-=60*r,i=function(e,t){return t>0?""+t+e:""};return"PT"+i("H",a)+i("M",r)+i("S",n)}function g(e){var t={};return e.forEach((function(e){if(/زمان|duration/gi.test(e.title))try{t.duration=60*(Number(c(e.text).replace(/[^\d]+/g,""))||0)}catch(e){t.duration=null}else if(/year|created|سال/gi.test(e.title))try{t.createdDate=new Date(Number(c(e.text)),0,1)}catch(e){t.createdDate=null}})),t.duration||(t.duration=3600),t.createdDate||(t.createdDate=s(JSON.stringify(e))),t}function f(e){var t=Number(c(e.totalVoteCount).replace(/[^\d]+/g,""))||1;return{ratingValue:Number(c(e.totalVoteRate).replace(/[^\d]+/g,""))||80,ratingCount:t,worstRating:0,bestRating:100}}var h=a((function(){return n("Corporation",{name:"Cafebazaar",alternateName:"کافه بازار",url:i,logo:r(i,"/images/icons/android-icon-96x96.png"),sameAs:o,contactPoint:[n("ContactPoint",{telephone:"+98-21-41253000",contactType:"customer service"})]},!0)}),"corporation"),v=a((function(){return n("WebSite",{name:"Cafebazaar",alternateName:"کافه بازار",url:i,potentialAction:n("SearchAction",{target:r(i,"/search/?q={search_term}"),"query-input":"required name=search_term"})},!0)}),"website"),b=a((function(e){var a,o=function(e){try{var a=c(e).split("/"),r=[],n=a[0],i=Number(n);2===n.length?i>85?r.push(1300+i):r.push(1400+i):r.push(i);var o=Number(a[1]);r.push(o-1);var p=Number(a[2]);return r.push(p),new(Function.prototype.bind.apply(t.default,[null].concat(r)))}catch(t){return s(e||"")}}(e.package.lastUpdated);return n("SoftwareApplication",Object.assign({},{operatingSystem:"ANDROID",url:r(i,"app/"+e.package.name),image:e.media.iconUrl,name:e.meta.name,description:e.meta.shortDescription,softwareVersion:c(e.package.versionName),fileSize:Math.round(e.package.size/1024),installUrl:"bazaar://details?id="+e.package.name},e.media&&e.media.screenshots&&e.media.screenshots.length&&{screenshot:r("https://s.cafebazaar.ir/1",e.media.screenshots[0].fullSize)},{dateModified:o,aggregateRating:n("AggregateRating",{ratingValue:e.meta.reviewInfo.averageRate||4,ratingCount:e.meta.reviewInfo.reviewCount||1,worstRating:0,bestRating:5}),applicationCategory:(a=e.meta.category,p[a.slug]||a.name),offers:n("Offer",{price:e.meta.payment.price,priceCurrency:"IRR"}),softwareRequirements:e.package.minimumSDKVersion,potentialAction:n("ViewAction",{name:"Install from Bazaar",target:[r(i,"app/"+e.package.name),"android-app://com.farsitel.bazaar/bazaar/details?id="+e.package.name]})},function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];try{for(var r=t.flat(),n=e,i=0;i<r.length;i+=1){n=n[r[i]]}return n}catch(e){return}}(e,"media","videoTrailer","videoUrl")&&{video:n("VideoObject",{name:e.meta.name,description:e.meta.shortDescription,contentUrl:e.media.videoTrailer.videoUrl,thumbnailUrl:e.media.videoTrailer.poster,uploadDate:s(JSON.stringify(e.media.videoTrailer))})},e.media.articles&&e.media.articles.length&&{citation:e.media.articles.map((function(e){var t=s(e.title+e.summary),a=e.url,r=n("Organization",{name:a=(a=(a=a.substr(a.indexOf("?url=")+19)).substr(0,a.lastIndexOf(".")))||"unknown",logo:e.icon});return n("Article",{author:r,publisher:r,datePublished:t,dateModified:t,headline:e.title,articleBody:e.summary,image:e.icon,mainEntityOfPage:e.url})}))}),!0)}),"app"),A=a((function(e){var t=l(e.cast||[]),a=t.directors,o=t.authors,c=t.actors,p=u(e.previews||[]);return n("TVSeries",Object.assign({},{name:e.name,url:r(i,"series/s/"+e.identifier),numberOfSeasons:e.seasons.length,image:e.cover.url},a&&a.length&&{director:n("Person",{name:a[0]})},c&&c.length&&{actor:c.map((function(e){return n("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return n("Person",{name:e})}))},p&&{trailer:n("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:s(e.name),contentUrl:p})}),!0)}),"series"),y=a((function(e){return m({page:{pageBodyInfo:{pageBody:e.pageBody}}})}),"season"),w=a((function(e){var t=l(e.cast||[]),a=t.directors,o=t.authors,c=t.actors,s=g(e.videoInfoList||[]),p=s.duration,m=s.createdDate,h=u(e.previews||[]),v=f(e.voteInfo);return n("TVEpisode",Object.assign({},{name:e.name+" - "+e.seasonIndexTitle+" - "+e.episodeIndexTitle,url:r(i,"series/e/"+e.episodeId),image:e.cover.url,episodeNumber:e.episodeIndex},m&&{dateCreated:m},p&&{duration:d(p)},a&&a.length&&{director:n("Person",{name:a[0]})},c&&c.length&&{actor:c.map((function(e){return n("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return n("Person",{name:e})}))},h&&{trailer:n("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:m,contentUrl:h})},{aggregateRating:n("AggregateRating",Object.assign({},v))}),!0)}),"episode"),O=a((function(e){var t=l(e.cast||[]),a=t.directors,o=t.authors,c=t.actors,s=g(e.videoInfoList||[]),p=s.duration,m=s.createdDate,h=u(e.previews||[]),v=f(e.voteInfo);return n("Movie",Object.assign({},{name:e.name,url:r(i,"video/"+e.identifier),image:e.cover.url},m&&{dateCreated:m},a&&a.length&&{director:n("Person",{name:a[0]})},c&&c.length&&{actor:c.map((function(e){return n("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return n("Person",{name:e})}))},p&&{duration:d(p)},h&&{trailer:n("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:m,contentUrl:h})},{aggregateRating:n("AggregateRating",Object.assign({},v))}),!0)}),"movie"),I=a(m,"vitrinList"),k={corporation:h,website:v,app:b,series:A,season:y,episode:w,movie:O,vitrinList:I};exports.app=b,exports.corporation=h,exports.default=k,exports.episode=w,exports.movie=O,exports.season=y,exports.series=A,exports.vitrinList=I,exports.website=v;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("idate"));function a(e,t){return function(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];try{return e.apply(void 0,a)}catch(e){return void console.error.apply(console,['Failed to Generate Correct JSON-LD via "'+(t||"unknown")+'" Method. Input:'].concat(a))}}}function r(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.map((function(e){return e.substring(e.startsWith("/")?1:0,e.endsWith("/")?e.length-1:e.length)})).join("/")}function n(e,t,a){return void 0===a&&(a=!1),Object.assign({},a&&{"@context":"https://schema.org"},{"@type":e},t)}var i="https://cafebazaar.ir",o=["https://www.facebook.com/cafebazaar","https://twitter.com/cafebazaar","https://instagram.com/cafebazaar","https://www.linkedin.com/company/iranian-congenial-mobile-co./","https://aparat.com/cafebazaar"];function c(e){return String(e||"").replace(/۰/g,"0").replace(/۱/g,"1").replace(/۲/g,"2").replace(/۳/g,"3").replace(/۴/g,"4").replace(/۵/g,"5").replace(/۶/g,"6").replace(/۷/g,"7").replace(/۸/g,"8").replace(/۹/g,"9")}function s(e){try{var t=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),a=Math.floor((Math.sin(t)+1)/2*12),r=Math.floor((Math.cos(t)+1)/2*28)+1,n=2020-Math.floor((Math.cos(t)+1)/2*3);return new Date(n,a,r)}catch(e){return new Date}}var p={weather:"","food-drink":"",education:"EducationalApplication",tools:"UtilitiesApplication",finance:"FinanceApplication",business:"BusinessApplication",shopping:"ShoppingApplication",medical:"HealthApplication","health-fitness":"HealthApplication","travel-local":"TravelApplication",sports:"SportsApplication","maps-navigation":"DriverApplication",lifestyle:"LifestyleApplication",entertainment:"EntertainmentApplication",social:"SocialNetworkingApplication","books-reference":"ReferenceApplication",personalization:"UtilitiesApplication",photography:"UtilitiesApplication",religious:"ReferenceApplication","music-audio":"MultimediaApplication","kids-apps":"GameApplication",communication:"CommunicationApplication",strategy:"GameApplication",action:"GameApplication",arcade:"GameApplication",casual:"GameApplication",racing:"GameApplication",simulation:"GameApplication","word-trivia":"GameApplication","kids-games":"GameApplication",puzzle:"GameApplication","sports-game":"GameApplication"};function l(e){var t={directors:[],actors:[],authors:[]};return e.forEach((function(e){/کارگردان|director/g.test(e.title)&&e.persons.length?t.directors=e.persons.map((function(e){return e.name})):/actor|بازیگران/g.test(e.title)?t.actors=e.persons.map((function(e){return e.name})):/author|نویسنده/g.test(e.title)&&(t.authors=e.persons.map((function(e){return e.name})))})),t}function u(e){for(var t=0;t<e.length;t+=1){var a=e[t];if(0===a.type)return a.url}return null}function m(e){return n("ItemList",{itemListElement:e.page.pageBodyInfo.pageBody.rows.map((function(e){var t=Object.keys(e)[0];if(!["simpleVideoItem","simpleAppItem"].includes(t))return null;var a=e[t];if(a.info.packageName)return r(i,"app/"+a.info.packageName);var n=["series","episode","movie"].find((function(e){return e in a.info})),o=a.info[n][n+"Id"];return r(i,{series:"series/s",episode:"series/e",movie:"video"}[n]+"/"+o)})).filter((function(e){return null!==e})).map((function(e,t){return n("ListItem",{position:t+1,url:e})}))},!0)}function d(e){void 0===e&&(e=0);var t=e,a=Math.floor(t/3600);t-=3600*a;var r=Math.floor(t/60),n=t-=60*r,i=function(e,t){return t>0?""+t+e:""};return"PT"+i("H",a)+i("M",r)+i("S",n)}function g(e){var t={};return e.forEach((function(e){if(/زمان|duration/gi.test(e.title))try{t.duration=60*(Number(c(e.text).replace(/[^\d]+/g,""))||0)}catch(e){t.duration=null}else if(/year|created|سال/gi.test(e.title))try{t.createdDate=new Date(Number(c(e.text)),0,1)}catch(e){t.createdDate=null}})),t.duration||(t.duration=3600),t.createdDate||(t.createdDate=s(JSON.stringify(e))),t}function f(e){var t=Number(c(e.totalVoteCount).replace(/[^\d]+/g,""))||1;return{ratingValue:Number(c(e.totalVoteRate).replace(/[^\d]+/g,""))||80,ratingCount:t,worstRating:0,bestRating:100}}var h=a((function(){return n("Corporation",{name:"Cafebazaar",alternateName:"کافه بازار",url:i,logo:r(i,"/images/icons/android-icon-96x96.png"),sameAs:o,contactPoint:[n("ContactPoint",{telephone:"+98-21-41253000",contactType:"customer service"})]},!0)}),"corporation"),v=a((function(){return n("WebSite",{name:"Cafebazaar",alternateName:"کافه بازار",url:i,potentialAction:n("SearchAction",{target:r(i,"/search/?q={search_term}"),"query-input":"required name=search_term"})},!0)}),"website"),b=a((function(e){var a,o=function(e){try{var a=c(e).split("/"),r=[],n=a[0],i=Number(n);2===n.length?i>85?r.push(1300+i):r.push(1400+i):r.push(i);var o=Number(a[1]);r.push(o-1);var p=Number(a[2]);return r.push(p),new(Function.prototype.bind.apply(t.default,[null].concat(r)))}catch(t){return s(e||"")}}(e.package.lastUpdated);return n("SoftwareApplication",Object.assign({},{operatingSystem:"ANDROID",url:r(i,"app/"+e.package.name),image:e.media.iconUrl,name:e.meta.name,description:e.meta.shortDescription,softwareVersion:c(e.package.versionName),fileSize:Math.round(e.package.size/1024),installUrl:"bazaar://details?id="+e.package.name},e.media&&e.media.screenshots&&e.media.screenshots.length&&{screenshot:r("https://s.cafebazaar.ir/1",e.media.screenshots[0].fullSize)},{dateModified:o,aggregateRating:n("AggregateRating",{ratingValue:e.meta.reviewInfo.averageRate||4,ratingCount:e.meta.reviewInfo.reviewCount||1,worstRating:0,bestRating:5}),applicationCategory:(a=e.meta.category,p[a.slug]||a.name),offers:n("Offer",{price:e.meta.payment.price,priceCurrency:"IRR"}),softwareRequirements:e.package.minimumSDKVersion,potentialAction:n("ViewAction",{name:"Install from Bazaar",target:[r(i,"app/"+e.package.name),"android-app://com.farsitel.bazaar/bazaar/details?id="+e.package.name]})},function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];try{for(var r=t.flat(),n=e,i=0;i<r.length;i+=1){n=n[r[i]]}return n}catch(e){return}}(e,"media","videoTrailer","videoUrl")&&{video:n("VideoObject",{name:e.meta.name,description:e.meta.shortDescription,contentUrl:e.media.videoTrailer.videoUrl,thumbnailUrl:e.media.videoTrailer.poster,uploadDate:s(JSON.stringify(e.media.videoTrailer))})},e.media.articles&&e.media.articles.length&&{citation:e.media.articles.map((function(e){var t=s(e.title+e.summary),a=e.url,r=n("Organization",{name:a=(a=(a=a.substr(a.indexOf("?url=")+19)).substr(0,a.lastIndexOf(".")))||"unknown",logo:e.icon});return n("Article",{author:r,publisher:r,datePublished:t,url:e.url,dateModified:t,headline:e.title,articleBody:e.summary,image:e.icon,mainEntityOfPage:e.url})}))}),!0)}),"app"),A=a((function(e){var t=l(e.cast||[]),a=t.directors,o=t.authors,c=t.actors,p=u(e.previews||[]);return n("TVSeries",Object.assign({},{name:e.name,url:r(i,"series/s/"+e.identifier),numberOfSeasons:e.seasons.length,image:e.cover.url},a&&a.length&&{director:n("Person",{name:a[0]})},c&&c.length&&{actor:c.map((function(e){return n("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return n("Person",{name:e})}))},p&&{trailer:n("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:s(e.name),contentUrl:p})}),!0)}),"series"),y=a((function(e){return m({page:{pageBodyInfo:{pageBody:e.pageBody}}})}),"season"),w=a((function(e){var t=l(e.cast||[]),a=t.directors,o=t.authors,c=t.actors,s=g(e.videoInfoList||[]),p=s.duration,m=s.createdDate,h=u(e.previews||[]),v=f(e.voteInfo);return n("TVEpisode",Object.assign({},{name:e.name+" - "+e.seasonIndexTitle+" - "+e.episodeIndexTitle,url:r(i,"series/e/"+e.episodeId),image:e.cover.url,episodeNumber:e.episodeIndex},m&&{dateCreated:m},p&&{duration:d(p)},a&&a.length&&{director:n("Person",{name:a[0]})},c&&c.length&&{actor:c.map((function(e){return n("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return n("Person",{name:e})}))},h&&{trailer:n("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:m,contentUrl:h})},{aggregateRating:n("AggregateRating",Object.assign({},v))}),!0)}),"episode"),O=a((function(e){var t=l(e.cast||[]),a=t.directors,o=t.authors,c=t.actors,s=g(e.videoInfoList||[]),p=s.duration,m=s.createdDate,h=u(e.previews||[]),v=f(e.voteInfo);return n("Movie",Object.assign({},{name:e.name,url:r(i,"video/"+e.identifier),image:e.cover.url},m&&{dateCreated:m},a&&a.length&&{director:n("Person",{name:a[0]})},c&&c.length&&{actor:c.map((function(e){return n("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return n("Person",{name:e})}))},p&&{duration:d(p)},h&&{trailer:n("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:m,contentUrl:h})},{aggregateRating:n("AggregateRating",Object.assign({},v))}),!0)}),"movie"),I=a(m,"vitrinList"),k={corporation:h,website:v,app:b,series:A,season:y,episode:w,movie:O,vitrinList:I};exports.app=b,exports.corporation=h,exports.default=k,exports.episode=w,exports.movie=O,exports.season=y,exports.series=A,exports.vitrinList=I,exports.website=v;

@@ -266,2 +266,3 @@ import IDate from 'idate';

datePublished: date,
url: article.url,
dateModified: date,

@@ -268,0 +269,0 @@ headline: article.title,

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

import e from"idate";function t(e,t){return function(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];try{return e.apply(void 0,a)}catch(e){return void console.error.apply(console,['Failed to Generate Correct JSON-LD via "'+(t||"unknown")+'" Method. Input:'].concat(a))}}}function a(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.map((function(e){return e.substring(e.startsWith("/")?1:0,e.endsWith("/")?e.length-1:e.length)})).join("/")}function r(e,t,a){return void 0===a&&(a=!1),Object.assign({},a&&{"@context":"https://schema.org"},{"@type":e},t)}var n="https://cafebazaar.ir",i=["https://www.facebook.com/cafebazaar","https://twitter.com/cafebazaar","https://instagram.com/cafebazaar","https://www.linkedin.com/company/iranian-congenial-mobile-co./","https://aparat.com/cafebazaar"];function o(e){return String(e||"").replace(/۰/g,"0").replace(/۱/g,"1").replace(/۲/g,"2").replace(/۳/g,"3").replace(/۴/g,"4").replace(/۵/g,"5").replace(/۶/g,"6").replace(/۷/g,"7").replace(/۸/g,"8").replace(/۹/g,"9")}function c(e){try{var t=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),a=Math.floor((Math.sin(t)+1)/2*12),r=Math.floor((Math.cos(t)+1)/2*28)+1,n=2020-Math.floor((Math.cos(t)+1)/2*3);return new Date(n,a,r)}catch(e){return new Date}}var s={weather:"","food-drink":"",education:"EducationalApplication",tools:"UtilitiesApplication",finance:"FinanceApplication",business:"BusinessApplication",shopping:"ShoppingApplication",medical:"HealthApplication","health-fitness":"HealthApplication","travel-local":"TravelApplication",sports:"SportsApplication","maps-navigation":"DriverApplication",lifestyle:"LifestyleApplication",entertainment:"EntertainmentApplication",social:"SocialNetworkingApplication","books-reference":"ReferenceApplication",personalization:"UtilitiesApplication",photography:"UtilitiesApplication",religious:"ReferenceApplication","music-audio":"MultimediaApplication","kids-apps":"GameApplication",communication:"CommunicationApplication",strategy:"GameApplication",action:"GameApplication",arcade:"GameApplication",casual:"GameApplication",racing:"GameApplication",simulation:"GameApplication","word-trivia":"GameApplication","kids-games":"GameApplication",puzzle:"GameApplication","sports-game":"GameApplication"};function p(e){var t={directors:[],actors:[],authors:[]};return e.forEach((function(e){/کارگردان|director/g.test(e.title)&&e.persons.length?t.directors=e.persons.map((function(e){return e.name})):/actor|بازیگران/g.test(e.title)?t.actors=e.persons.map((function(e){return e.name})):/author|نویسنده/g.test(e.title)&&(t.authors=e.persons.map((function(e){return e.name})))})),t}function l(e){for(var t=0;t<e.length;t+=1){var a=e[t];if(0===a.type)return a.url}return null}function u(e){return r("ItemList",{itemListElement:e.page.pageBodyInfo.pageBody.rows.map((function(e){var t=Object.keys(e)[0];if(!["simpleVideoItem","simpleAppItem"].includes(t))return null;var r=e[t];if(r.info.packageName)return a(n,"app/"+r.info.packageName);var i=["series","episode","movie"].find((function(e){return e in r.info})),o=r.info[i][i+"Id"];return a(n,{series:"series/s",episode:"series/e",movie:"video"}[i]+"/"+o)})).filter((function(e){return null!==e})).map((function(e,t){return r("ListItem",{position:t+1,url:e})}))},!0)}function m(e){void 0===e&&(e=0);var t=e,a=Math.floor(t/3600);t-=3600*a;var r=Math.floor(t/60),n=t-=60*r,i=function(e,t){return t>0?""+t+e:""};return"PT"+i("H",a)+i("M",r)+i("S",n)}function d(e){var t={};return e.forEach((function(e){if(/زمان|duration/gi.test(e.title))try{t.duration=60*(Number(o(e.text).replace(/[^\d]+/g,""))||0)}catch(e){t.duration=null}else if(/year|created|سال/gi.test(e.title))try{t.createdDate=new Date(Number(o(e.text)),0,1)}catch(e){t.createdDate=null}})),t.duration||(t.duration=3600),t.createdDate||(t.createdDate=c(JSON.stringify(e))),t}function g(e){var t=Number(o(e.totalVoteCount).replace(/[^\d]+/g,""))||1;return{ratingValue:Number(o(e.totalVoteRate).replace(/[^\d]+/g,""))||80,ratingCount:t,worstRating:0,bestRating:100}}var f=t((function(){return r("Corporation",{name:"Cafebazaar",alternateName:"کافه بازار",url:n,logo:a(n,"/images/icons/android-icon-96x96.png"),sameAs:i,contactPoint:[r("ContactPoint",{telephone:"+98-21-41253000",contactType:"customer service"})]},!0)}),"corporation"),h=t((function(){return r("WebSite",{name:"Cafebazaar",alternateName:"کافه بازار",url:n,potentialAction:r("SearchAction",{target:a(n,"/search/?q={search_term}"),"query-input":"required name=search_term"})},!0)}),"website"),v=t((function(t){var i,p=function(t){try{var a=o(t).split("/"),r=[],n=a[0],i=Number(n);2===n.length?i>85?r.push(1300+i):r.push(1400+i):r.push(i);var s=Number(a[1]);r.push(s-1);var p=Number(a[2]);return r.push(p),new(Function.prototype.bind.apply(e,[null].concat(r)))}catch(e){return c(t||"")}}(t.package.lastUpdated);return r("SoftwareApplication",Object.assign({},{operatingSystem:"ANDROID",url:a(n,"app/"+t.package.name),image:t.media.iconUrl,name:t.meta.name,description:t.meta.shortDescription,softwareVersion:o(t.package.versionName),fileSize:Math.round(t.package.size/1024),installUrl:"bazaar://details?id="+t.package.name},t.media&&t.media.screenshots&&t.media.screenshots.length&&{screenshot:a("https://s.cafebazaar.ir/1",t.media.screenshots[0].fullSize)},{dateModified:p,aggregateRating:r("AggregateRating",{ratingValue:t.meta.reviewInfo.averageRate||4,ratingCount:t.meta.reviewInfo.reviewCount||1,worstRating:0,bestRating:5}),applicationCategory:(i=t.meta.category,s[i.slug]||i.name),offers:r("Offer",{price:t.meta.payment.price,priceCurrency:"IRR"}),softwareRequirements:t.package.minimumSDKVersion,potentialAction:r("ViewAction",{name:"Install from Bazaar",target:[a(n,"app/"+t.package.name),"android-app://com.farsitel.bazaar/bazaar/details?id="+t.package.name]})},function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];try{for(var r=t.flat(),n=e,i=0;i<r.length;i+=1){n=n[r[i]]}return n}catch(e){return}}(t,"media","videoTrailer","videoUrl")&&{video:r("VideoObject",{name:t.meta.name,description:t.meta.shortDescription,contentUrl:t.media.videoTrailer.videoUrl,thumbnailUrl:t.media.videoTrailer.poster,uploadDate:c(JSON.stringify(t.media.videoTrailer))})},t.media.articles&&t.media.articles.length&&{citation:t.media.articles.map((function(e){var t=c(e.title+e.summary),a=e.url,n=r("Organization",{name:a=(a=(a=a.substr(a.indexOf("?url=")+19)).substr(0,a.lastIndexOf(".")))||"unknown",logo:e.icon});return r("Article",{author:n,publisher:n,datePublished:t,dateModified:t,headline:e.title,articleBody:e.summary,image:e.icon,mainEntityOfPage:e.url})}))}),!0)}),"app"),b=t((function(e){var t=p(e.cast||[]),i=t.directors,o=t.authors,s=t.actors,u=l(e.previews||[]);return r("TVSeries",Object.assign({},{name:e.name,url:a(n,"series/s/"+e.identifier),numberOfSeasons:e.seasons.length,image:e.cover.url},i&&i.length&&{director:r("Person",{name:i[0]})},s&&s.length&&{actor:s.map((function(e){return r("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return r("Person",{name:e})}))},u&&{trailer:r("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:c(e.name),contentUrl:u})}),!0)}),"series"),A=t((function(e){return u({page:{pageBodyInfo:{pageBody:e.pageBody}}})}),"season"),y=t((function(e){var t=p(e.cast||[]),i=t.directors,o=t.authors,c=t.actors,s=d(e.videoInfoList||[]),u=s.duration,f=s.createdDate,h=l(e.previews||[]),v=g(e.voteInfo);return r("TVEpisode",Object.assign({},{name:e.name+" - "+e.seasonIndexTitle+" - "+e.episodeIndexTitle,url:a(n,"series/e/"+e.episodeId),image:e.cover.url,episodeNumber:e.episodeIndex},f&&{dateCreated:f},u&&{duration:m(u)},i&&i.length&&{director:r("Person",{name:i[0]})},c&&c.length&&{actor:c.map((function(e){return r("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return r("Person",{name:e})}))},h&&{trailer:r("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:f,contentUrl:h})},{aggregateRating:r("AggregateRating",Object.assign({},v))}),!0)}),"episode"),w=t((function(e){var t=p(e.cast||[]),i=t.directors,o=t.authors,c=t.actors,s=d(e.videoInfoList||[]),u=s.duration,f=s.createdDate,h=l(e.previews||[]),v=g(e.voteInfo);return r("Movie",Object.assign({},{name:e.name,url:a(n,"video/"+e.identifier),image:e.cover.url},f&&{dateCreated:f},i&&i.length&&{director:r("Person",{name:i[0]})},c&&c.length&&{actor:c.map((function(e){return r("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return r("Person",{name:e})}))},u&&{duration:m(u)},h&&{trailer:r("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:f,contentUrl:h})},{aggregateRating:r("AggregateRating",Object.assign({},v))}),!0)}),"movie"),I=t(u,"vitrinList"),O={corporation:f,website:h,app:v,series:b,season:A,episode:y,movie:w,vitrinList:I};export default O;export{v as app,f as corporation,y as episode,w as movie,A as season,b as series,I as vitrinList,h as website};
import e from"idate";function t(e,t){return function(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];try{return e.apply(void 0,a)}catch(e){return void console.error.apply(console,['Failed to Generate Correct JSON-LD via "'+(t||"unknown")+'" Method. Input:'].concat(a))}}}function a(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.map((function(e){return e.substring(e.startsWith("/")?1:0,e.endsWith("/")?e.length-1:e.length)})).join("/")}function r(e,t,a){return void 0===a&&(a=!1),Object.assign({},a&&{"@context":"https://schema.org"},{"@type":e},t)}var n="https://cafebazaar.ir",i=["https://www.facebook.com/cafebazaar","https://twitter.com/cafebazaar","https://instagram.com/cafebazaar","https://www.linkedin.com/company/iranian-congenial-mobile-co./","https://aparat.com/cafebazaar"];function o(e){return String(e||"").replace(/۰/g,"0").replace(/۱/g,"1").replace(/۲/g,"2").replace(/۳/g,"3").replace(/۴/g,"4").replace(/۵/g,"5").replace(/۶/g,"6").replace(/۷/g,"7").replace(/۸/g,"8").replace(/۹/g,"9")}function c(e){try{var t=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),a=Math.floor((Math.sin(t)+1)/2*12),r=Math.floor((Math.cos(t)+1)/2*28)+1,n=2020-Math.floor((Math.cos(t)+1)/2*3);return new Date(n,a,r)}catch(e){return new Date}}var s={weather:"","food-drink":"",education:"EducationalApplication",tools:"UtilitiesApplication",finance:"FinanceApplication",business:"BusinessApplication",shopping:"ShoppingApplication",medical:"HealthApplication","health-fitness":"HealthApplication","travel-local":"TravelApplication",sports:"SportsApplication","maps-navigation":"DriverApplication",lifestyle:"LifestyleApplication",entertainment:"EntertainmentApplication",social:"SocialNetworkingApplication","books-reference":"ReferenceApplication",personalization:"UtilitiesApplication",photography:"UtilitiesApplication",religious:"ReferenceApplication","music-audio":"MultimediaApplication","kids-apps":"GameApplication",communication:"CommunicationApplication",strategy:"GameApplication",action:"GameApplication",arcade:"GameApplication",casual:"GameApplication",racing:"GameApplication",simulation:"GameApplication","word-trivia":"GameApplication","kids-games":"GameApplication",puzzle:"GameApplication","sports-game":"GameApplication"};function p(e){var t={directors:[],actors:[],authors:[]};return e.forEach((function(e){/کارگردان|director/g.test(e.title)&&e.persons.length?t.directors=e.persons.map((function(e){return e.name})):/actor|بازیگران/g.test(e.title)?t.actors=e.persons.map((function(e){return e.name})):/author|نویسنده/g.test(e.title)&&(t.authors=e.persons.map((function(e){return e.name})))})),t}function l(e){for(var t=0;t<e.length;t+=1){var a=e[t];if(0===a.type)return a.url}return null}function u(e){return r("ItemList",{itemListElement:e.page.pageBodyInfo.pageBody.rows.map((function(e){var t=Object.keys(e)[0];if(!["simpleVideoItem","simpleAppItem"].includes(t))return null;var r=e[t];if(r.info.packageName)return a(n,"app/"+r.info.packageName);var i=["series","episode","movie"].find((function(e){return e in r.info})),o=r.info[i][i+"Id"];return a(n,{series:"series/s",episode:"series/e",movie:"video"}[i]+"/"+o)})).filter((function(e){return null!==e})).map((function(e,t){return r("ListItem",{position:t+1,url:e})}))},!0)}function m(e){void 0===e&&(e=0);var t=e,a=Math.floor(t/3600);t-=3600*a;var r=Math.floor(t/60),n=t-=60*r,i=function(e,t){return t>0?""+t+e:""};return"PT"+i("H",a)+i("M",r)+i("S",n)}function d(e){var t={};return e.forEach((function(e){if(/زمان|duration/gi.test(e.title))try{t.duration=60*(Number(o(e.text).replace(/[^\d]+/g,""))||0)}catch(e){t.duration=null}else if(/year|created|سال/gi.test(e.title))try{t.createdDate=new Date(Number(o(e.text)),0,1)}catch(e){t.createdDate=null}})),t.duration||(t.duration=3600),t.createdDate||(t.createdDate=c(JSON.stringify(e))),t}function g(e){var t=Number(o(e.totalVoteCount).replace(/[^\d]+/g,""))||1;return{ratingValue:Number(o(e.totalVoteRate).replace(/[^\d]+/g,""))||80,ratingCount:t,worstRating:0,bestRating:100}}var f=t((function(){return r("Corporation",{name:"Cafebazaar",alternateName:"کافه بازار",url:n,logo:a(n,"/images/icons/android-icon-96x96.png"),sameAs:i,contactPoint:[r("ContactPoint",{telephone:"+98-21-41253000",contactType:"customer service"})]},!0)}),"corporation"),h=t((function(){return r("WebSite",{name:"Cafebazaar",alternateName:"کافه بازار",url:n,potentialAction:r("SearchAction",{target:a(n,"/search/?q={search_term}"),"query-input":"required name=search_term"})},!0)}),"website"),v=t((function(t){var i,p=function(t){try{var a=o(t).split("/"),r=[],n=a[0],i=Number(n);2===n.length?i>85?r.push(1300+i):r.push(1400+i):r.push(i);var s=Number(a[1]);r.push(s-1);var p=Number(a[2]);return r.push(p),new(Function.prototype.bind.apply(e,[null].concat(r)))}catch(e){return c(t||"")}}(t.package.lastUpdated);return r("SoftwareApplication",Object.assign({},{operatingSystem:"ANDROID",url:a(n,"app/"+t.package.name),image:t.media.iconUrl,name:t.meta.name,description:t.meta.shortDescription,softwareVersion:o(t.package.versionName),fileSize:Math.round(t.package.size/1024),installUrl:"bazaar://details?id="+t.package.name},t.media&&t.media.screenshots&&t.media.screenshots.length&&{screenshot:a("https://s.cafebazaar.ir/1",t.media.screenshots[0].fullSize)},{dateModified:p,aggregateRating:r("AggregateRating",{ratingValue:t.meta.reviewInfo.averageRate||4,ratingCount:t.meta.reviewInfo.reviewCount||1,worstRating:0,bestRating:5}),applicationCategory:(i=t.meta.category,s[i.slug]||i.name),offers:r("Offer",{price:t.meta.payment.price,priceCurrency:"IRR"}),softwareRequirements:t.package.minimumSDKVersion,potentialAction:r("ViewAction",{name:"Install from Bazaar",target:[a(n,"app/"+t.package.name),"android-app://com.farsitel.bazaar/bazaar/details?id="+t.package.name]})},function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];try{for(var r=t.flat(),n=e,i=0;i<r.length;i+=1){n=n[r[i]]}return n}catch(e){return}}(t,"media","videoTrailer","videoUrl")&&{video:r("VideoObject",{name:t.meta.name,description:t.meta.shortDescription,contentUrl:t.media.videoTrailer.videoUrl,thumbnailUrl:t.media.videoTrailer.poster,uploadDate:c(JSON.stringify(t.media.videoTrailer))})},t.media.articles&&t.media.articles.length&&{citation:t.media.articles.map((function(e){var t=c(e.title+e.summary),a=e.url,n=r("Organization",{name:a=(a=(a=a.substr(a.indexOf("?url=")+19)).substr(0,a.lastIndexOf(".")))||"unknown",logo:e.icon});return r("Article",{author:n,publisher:n,datePublished:t,url:e.url,dateModified:t,headline:e.title,articleBody:e.summary,image:e.icon,mainEntityOfPage:e.url})}))}),!0)}),"app"),b=t((function(e){var t=p(e.cast||[]),i=t.directors,o=t.authors,s=t.actors,u=l(e.previews||[]);return r("TVSeries",Object.assign({},{name:e.name,url:a(n,"series/s/"+e.identifier),numberOfSeasons:e.seasons.length,image:e.cover.url},i&&i.length&&{director:r("Person",{name:i[0]})},s&&s.length&&{actor:s.map((function(e){return r("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return r("Person",{name:e})}))},u&&{trailer:r("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:c(e.name),contentUrl:u})}),!0)}),"series"),A=t((function(e){return u({page:{pageBodyInfo:{pageBody:e.pageBody}}})}),"season"),y=t((function(e){var t=p(e.cast||[]),i=t.directors,o=t.authors,c=t.actors,s=d(e.videoInfoList||[]),u=s.duration,f=s.createdDate,h=l(e.previews||[]),v=g(e.voteInfo);return r("TVEpisode",Object.assign({},{name:e.name+" - "+e.seasonIndexTitle+" - "+e.episodeIndexTitle,url:a(n,"series/e/"+e.episodeId),image:e.cover.url,episodeNumber:e.episodeIndex},f&&{dateCreated:f},u&&{duration:m(u)},i&&i.length&&{director:r("Person",{name:i[0]})},c&&c.length&&{actor:c.map((function(e){return r("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return r("Person",{name:e})}))},h&&{trailer:r("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:f,contentUrl:h})},{aggregateRating:r("AggregateRating",Object.assign({},v))}),!0)}),"episode"),w=t((function(e){var t=p(e.cast||[]),i=t.directors,o=t.authors,c=t.actors,s=d(e.videoInfoList||[]),u=s.duration,f=s.createdDate,h=l(e.previews||[]),v=g(e.voteInfo);return r("Movie",Object.assign({},{name:e.name,url:a(n,"video/"+e.identifier),image:e.cover.url},f&&{dateCreated:f},i&&i.length&&{director:r("Person",{name:i[0]})},c&&c.length&&{actor:c.map((function(e){return r("Person",{name:e})}))},o&&o.length&&{author:o.map((function(e){return r("Person",{name:e})}))},u&&{duration:m(u)},h&&{trailer:r("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:f,contentUrl:h})},{aggregateRating:r("AggregateRating",Object.assign({},v))}),!0)}),"movie"),I=t(u,"vitrinList"),O={corporation:f,website:h,app:v,series:b,season:A,episode:y,movie:w,vitrinList:I};export default O;export{v as app,f as corporation,y as episode,w as movie,A as season,b as series,I as vitrinList,h as website};

@@ -271,2 +271,3 @@ var jaldi = (function (exports, IDate) {

datePublished: date,
url: article.url,
dateModified: date,

@@ -273,0 +274,0 @@ headline: article.title,

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

var jaldi=function(e,t){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(t);function r(e,t){return function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];try{return e.apply(void 0,a)}catch(e){return void console.error.apply(console,['Failed to Generate Correct JSON-LD via "'+(t||"unknown")+'" Method. Input:'].concat(a))}}}function i(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.map((function(e){return e.substring(e.startsWith("/")?1:0,e.endsWith("/")?e.length-1:e.length)})).join("/")}function o(e,t,a){return void 0===a&&(a=!1),Object.assign({},a&&{"@context":"https://schema.org"},{"@type":e},t)}var c="https://cafebazaar.ir",s="Cafebazaar",p="کافه بازار",l=["https://www.facebook.com/cafebazaar","https://twitter.com/cafebazaar","https://instagram.com/cafebazaar","https://www.linkedin.com/company/iranian-congenial-mobile-co./","https://aparat.com/cafebazaar"];function u(e){return String(e||"").replace(/۰/g,"0").replace(/۱/g,"1").replace(/۲/g,"2").replace(/۳/g,"3").replace(/۴/g,"4").replace(/۵/g,"5").replace(/۶/g,"6").replace(/۷/g,"7").replace(/۸/g,"8").replace(/۹/g,"9")}function m(e){try{var t=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),a=Math.floor((Math.sin(t)+1)/2*12),n=Math.floor((Math.cos(t)+1)/2*28)+1,r=2020-Math.floor((Math.cos(t)+1)/2*3);return new Date(r,a,n)}catch(e){return new Date}}var d={weather:"","food-drink":"",education:"EducationalApplication",tools:"UtilitiesApplication",finance:"FinanceApplication",business:"BusinessApplication",shopping:"ShoppingApplication",medical:"HealthApplication","health-fitness":"HealthApplication","travel-local":"TravelApplication",sports:"SportsApplication","maps-navigation":"DriverApplication",lifestyle:"LifestyleApplication",entertainment:"EntertainmentApplication",social:"SocialNetworkingApplication","books-reference":"ReferenceApplication",personalization:"UtilitiesApplication",photography:"UtilitiesApplication",religious:"ReferenceApplication","music-audio":"MultimediaApplication","kids-apps":"GameApplication",communication:"CommunicationApplication",strategy:"GameApplication",action:"GameApplication",arcade:"GameApplication",casual:"GameApplication",racing:"GameApplication",simulation:"GameApplication","word-trivia":"GameApplication","kids-games":"GameApplication",puzzle:"GameApplication","sports-game":"GameApplication"};function g(e){var t={directors:[],actors:[],authors:[]};return e.forEach((function(e){/کارگردان|director/g.test(e.title)&&e.persons.length?t.directors=e.persons.map((function(e){return e.name})):/actor|بازیگران/g.test(e.title)?t.actors=e.persons.map((function(e){return e.name})):/author|نویسنده/g.test(e.title)&&(t.authors=e.persons.map((function(e){return e.name})))})),t}function f(e){for(var t=0;t<e.length;t+=1){var a=e[t];if(0===a.type)return a.url}return null}function h(e){return o("ItemList",{itemListElement:e.page.pageBodyInfo.pageBody.rows.map((function(e){var t=Object.keys(e)[0];if(!["simpleVideoItem","simpleAppItem"].includes(t))return null;var a=e[t];if(a.info.packageName)return i(c,"app/"+a.info.packageName);var n=["series","episode","movie"].find((function(e){return e in a.info})),r=a.info[n][n+"Id"];return i(c,{series:"series/s",episode:"series/e",movie:"video"}[n]+"/"+r)})).filter((function(e){return null!==e})).map((function(e,t){return o("ListItem",{position:t+1,url:e})}))},!0)}function v(e){void 0===e&&(e=0);var t=e,a=Math.floor(t/3600);t-=3600*a;var n=Math.floor(t/60),r=t-=60*n,i=function(e,t){return t>0?""+t+e:""};return"PT"+i("H",a)+i("M",n)+i("S",r)}function b(e){var t={};return e.forEach((function(e){if(/زمان|duration/gi.test(e.title))try{t.duration=60*(Number(u(e.text).replace(/[^\d]+/g,""))||0)}catch(e){t.duration=null}else if(/year|created|سال/gi.test(e.title))try{t.createdDate=new Date(Number(u(e.text)),0,1)}catch(e){t.createdDate=null}})),t.duration||(t.duration=3600),t.createdDate||(t.createdDate=m(JSON.stringify(e))),t}function A(e){var t=Number(u(e.totalVoteCount).replace(/[^\d]+/g,""))||1;return{ratingValue:Number(u(e.totalVoteRate).replace(/[^\d]+/g,""))||80,ratingCount:t,worstRating:0,bestRating:100}}var y=r((function(){return o("Corporation",{name:s,alternateName:p,url:c,logo:i(c,"/images/icons/android-icon-96x96.png"),sameAs:l,contactPoint:[o("ContactPoint",{telephone:"+98-21-41253000",contactType:"customer service"})]},!0)}),"corporation"),w=r((function(){return o("WebSite",{name:s,alternateName:p,url:c,potentialAction:o("SearchAction",{target:i(c,"/search/?q={search_term}"),"query-input":"required name=search_term"})},!0)}),"website"),I=r((function(e){var t,a=function(e){try{var t=u(e).split("/"),a=[],r=t[0],i=Number(r);2===r.length?i>85?a.push(1300+i):a.push(1400+i):a.push(i);var o=Number(t[1]);a.push(o-1);var c=Number(t[2]);return a.push(c),new(Function.prototype.bind.apply(n.default,[null].concat(a)))}catch(t){return m(e||"")}}(e.package.lastUpdated);return o("SoftwareApplication",Object.assign({},{operatingSystem:"ANDROID",url:i(c,"app/"+e.package.name),image:e.media.iconUrl,name:e.meta.name,description:e.meta.shortDescription,softwareVersion:u(e.package.versionName),fileSize:Math.round(e.package.size/1024),installUrl:"bazaar://details?id="+e.package.name},e.media&&e.media.screenshots&&e.media.screenshots.length&&{screenshot:i("https://s.cafebazaar.ir/1",e.media.screenshots[0].fullSize)},{dateModified:a,aggregateRating:o("AggregateRating",{ratingValue:e.meta.reviewInfo.averageRate||4,ratingCount:e.meta.reviewInfo.reviewCount||1,worstRating:0,bestRating:5}),applicationCategory:(t=e.meta.category,d[t.slug]||t.name),offers:o("Offer",{price:e.meta.payment.price,priceCurrency:"IRR"}),softwareRequirements:e.package.minimumSDKVersion,potentialAction:o("ViewAction",{name:"Install from Bazaar",target:[i(c,"app/"+e.package.name),"android-app://com.farsitel.bazaar/bazaar/details?id="+e.package.name]})},function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];try{for(var n=t.flat(),r=e,i=0;i<n.length;i+=1){r=r[n[i]]}return r}catch(e){return}}(e,"media","videoTrailer","videoUrl")&&{video:o("VideoObject",{name:e.meta.name,description:e.meta.shortDescription,contentUrl:e.media.videoTrailer.videoUrl,thumbnailUrl:e.media.videoTrailer.poster,uploadDate:m(JSON.stringify(e.media.videoTrailer))})},e.media.articles&&e.media.articles.length&&{citation:e.media.articles.map((function(e){var t=m(e.title+e.summary),a=e.url,n=o("Organization",{name:a=(a=(a=a.substr(a.indexOf("?url=")+19)).substr(0,a.lastIndexOf(".")))||"unknown",logo:e.icon});return o("Article",{author:n,publisher:n,datePublished:t,dateModified:t,headline:e.title,articleBody:e.summary,image:e.icon,mainEntityOfPage:e.url})}))}),!0)}),"app"),O=r((function(e){var t=g(e.cast||[]),a=t.directors,n=t.authors,r=t.actors,s=f(e.previews||[]);return o("TVSeries",Object.assign({},{name:e.name,url:i(c,"series/s/"+e.identifier),numberOfSeasons:e.seasons.length,image:e.cover.url},a&&a.length&&{director:o("Person",{name:a[0]})},r&&r.length&&{actor:r.map((function(e){return o("Person",{name:e})}))},n&&n.length&&{author:n.map((function(e){return o("Person",{name:e})}))},s&&{trailer:o("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:m(e.name),contentUrl:s})}),!0)}),"series"),D=r((function(e){return h({page:{pageBodyInfo:{pageBody:e.pageBody}}})}),"season"),k=r((function(e){var t=g(e.cast||[]),a=t.directors,n=t.authors,r=t.actors,s=b(e.videoInfoList||[]),p=s.duration,l=s.createdDate,u=f(e.previews||[]),m=A(e.voteInfo);return o("TVEpisode",Object.assign({},{name:e.name+" - "+e.seasonIndexTitle+" - "+e.episodeIndexTitle,url:i(c,"series/e/"+e.episodeId),image:e.cover.url,episodeNumber:e.episodeIndex},l&&{dateCreated:l},p&&{duration:v(p)},a&&a.length&&{director:o("Person",{name:a[0]})},r&&r.length&&{actor:r.map((function(e){return o("Person",{name:e})}))},n&&n.length&&{author:n.map((function(e){return o("Person",{name:e})}))},u&&{trailer:o("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:l,contentUrl:u})},{aggregateRating:o("AggregateRating",Object.assign({},m))}),!0)}),"episode"),z=r((function(e){var t=g(e.cast||[]),a=t.directors,n=t.authors,r=t.actors,s=b(e.videoInfoList||[]),p=s.duration,l=s.createdDate,u=f(e.previews||[]),m=A(e.voteInfo);return o("Movie",Object.assign({},{name:e.name,url:i(c,"video/"+e.identifier),image:e.cover.url},l&&{dateCreated:l},a&&a.length&&{director:o("Person",{name:a[0]})},r&&r.length&&{actor:r.map((function(e){return o("Person",{name:e})}))},n&&n.length&&{author:n.map((function(e){return o("Person",{name:e})}))},p&&{duration:v(p)},u&&{trailer:o("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:l,contentUrl:u})},{aggregateRating:o("AggregateRating",Object.assign({},m))}),!0)}),"movie"),N=r(h,"vitrinList"),R={corporation:y,website:w,app:I,series:O,season:D,episode:k,movie:z,vitrinList:N};return e.app=I,e.corporation=y,e.default=R,e.episode=k,e.movie=z,e.season=D,e.series=O,e.vitrinList=N,e.website=w,Object.defineProperty(e,"__esModule",{value:!0}),e}({},IDate);
var jaldi=function(e,t){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(t);function r(e,t){return function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];try{return e.apply(void 0,a)}catch(e){return void console.error.apply(console,['Failed to Generate Correct JSON-LD via "'+(t||"unknown")+'" Method. Input:'].concat(a))}}}function i(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.map((function(e){return e.substring(e.startsWith("/")?1:0,e.endsWith("/")?e.length-1:e.length)})).join("/")}function o(e,t,a){return void 0===a&&(a=!1),Object.assign({},a&&{"@context":"https://schema.org"},{"@type":e},t)}var c="https://cafebazaar.ir",s="Cafebazaar",l="کافه بازار",p=["https://www.facebook.com/cafebazaar","https://twitter.com/cafebazaar","https://instagram.com/cafebazaar","https://www.linkedin.com/company/iranian-congenial-mobile-co./","https://aparat.com/cafebazaar"];function u(e){return String(e||"").replace(/۰/g,"0").replace(/۱/g,"1").replace(/۲/g,"2").replace(/۳/g,"3").replace(/۴/g,"4").replace(/۵/g,"5").replace(/۶/g,"6").replace(/۷/g,"7").replace(/۸/g,"8").replace(/۹/g,"9")}function m(e){try{var t=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),a=Math.floor((Math.sin(t)+1)/2*12),n=Math.floor((Math.cos(t)+1)/2*28)+1,r=2020-Math.floor((Math.cos(t)+1)/2*3);return new Date(r,a,n)}catch(e){return new Date}}var d={weather:"","food-drink":"",education:"EducationalApplication",tools:"UtilitiesApplication",finance:"FinanceApplication",business:"BusinessApplication",shopping:"ShoppingApplication",medical:"HealthApplication","health-fitness":"HealthApplication","travel-local":"TravelApplication",sports:"SportsApplication","maps-navigation":"DriverApplication",lifestyle:"LifestyleApplication",entertainment:"EntertainmentApplication",social:"SocialNetworkingApplication","books-reference":"ReferenceApplication",personalization:"UtilitiesApplication",photography:"UtilitiesApplication",religious:"ReferenceApplication","music-audio":"MultimediaApplication","kids-apps":"GameApplication",communication:"CommunicationApplication",strategy:"GameApplication",action:"GameApplication",arcade:"GameApplication",casual:"GameApplication",racing:"GameApplication",simulation:"GameApplication","word-trivia":"GameApplication","kids-games":"GameApplication",puzzle:"GameApplication","sports-game":"GameApplication"};function g(e){var t={directors:[],actors:[],authors:[]};return e.forEach((function(e){/کارگردان|director/g.test(e.title)&&e.persons.length?t.directors=e.persons.map((function(e){return e.name})):/actor|بازیگران/g.test(e.title)?t.actors=e.persons.map((function(e){return e.name})):/author|نویسنده/g.test(e.title)&&(t.authors=e.persons.map((function(e){return e.name})))})),t}function f(e){for(var t=0;t<e.length;t+=1){var a=e[t];if(0===a.type)return a.url}return null}function h(e){return o("ItemList",{itemListElement:e.page.pageBodyInfo.pageBody.rows.map((function(e){var t=Object.keys(e)[0];if(!["simpleVideoItem","simpleAppItem"].includes(t))return null;var a=e[t];if(a.info.packageName)return i(c,"app/"+a.info.packageName);var n=["series","episode","movie"].find((function(e){return e in a.info})),r=a.info[n][n+"Id"];return i(c,{series:"series/s",episode:"series/e",movie:"video"}[n]+"/"+r)})).filter((function(e){return null!==e})).map((function(e,t){return o("ListItem",{position:t+1,url:e})}))},!0)}function v(e){void 0===e&&(e=0);var t=e,a=Math.floor(t/3600);t-=3600*a;var n=Math.floor(t/60),r=t-=60*n,i=function(e,t){return t>0?""+t+e:""};return"PT"+i("H",a)+i("M",n)+i("S",r)}function b(e){var t={};return e.forEach((function(e){if(/زمان|duration/gi.test(e.title))try{t.duration=60*(Number(u(e.text).replace(/[^\d]+/g,""))||0)}catch(e){t.duration=null}else if(/year|created|سال/gi.test(e.title))try{t.createdDate=new Date(Number(u(e.text)),0,1)}catch(e){t.createdDate=null}})),t.duration||(t.duration=3600),t.createdDate||(t.createdDate=m(JSON.stringify(e))),t}function A(e){var t=Number(u(e.totalVoteCount).replace(/[^\d]+/g,""))||1;return{ratingValue:Number(u(e.totalVoteRate).replace(/[^\d]+/g,""))||80,ratingCount:t,worstRating:0,bestRating:100}}var y=r((function(){return o("Corporation",{name:s,alternateName:l,url:c,logo:i(c,"/images/icons/android-icon-96x96.png"),sameAs:p,contactPoint:[o("ContactPoint",{telephone:"+98-21-41253000",contactType:"customer service"})]},!0)}),"corporation"),w=r((function(){return o("WebSite",{name:s,alternateName:l,url:c,potentialAction:o("SearchAction",{target:i(c,"/search/?q={search_term}"),"query-input":"required name=search_term"})},!0)}),"website"),I=r((function(e){var t,a=function(e){try{var t=u(e).split("/"),a=[],r=t[0],i=Number(r);2===r.length?i>85?a.push(1300+i):a.push(1400+i):a.push(i);var o=Number(t[1]);a.push(o-1);var c=Number(t[2]);return a.push(c),new(Function.prototype.bind.apply(n.default,[null].concat(a)))}catch(t){return m(e||"")}}(e.package.lastUpdated);return o("SoftwareApplication",Object.assign({},{operatingSystem:"ANDROID",url:i(c,"app/"+e.package.name),image:e.media.iconUrl,name:e.meta.name,description:e.meta.shortDescription,softwareVersion:u(e.package.versionName),fileSize:Math.round(e.package.size/1024),installUrl:"bazaar://details?id="+e.package.name},e.media&&e.media.screenshots&&e.media.screenshots.length&&{screenshot:i("https://s.cafebazaar.ir/1",e.media.screenshots[0].fullSize)},{dateModified:a,aggregateRating:o("AggregateRating",{ratingValue:e.meta.reviewInfo.averageRate||4,ratingCount:e.meta.reviewInfo.reviewCount||1,worstRating:0,bestRating:5}),applicationCategory:(t=e.meta.category,d[t.slug]||t.name),offers:o("Offer",{price:e.meta.payment.price,priceCurrency:"IRR"}),softwareRequirements:e.package.minimumSDKVersion,potentialAction:o("ViewAction",{name:"Install from Bazaar",target:[i(c,"app/"+e.package.name),"android-app://com.farsitel.bazaar/bazaar/details?id="+e.package.name]})},function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];try{for(var n=t.flat(),r=e,i=0;i<n.length;i+=1){r=r[n[i]]}return r}catch(e){return}}(e,"media","videoTrailer","videoUrl")&&{video:o("VideoObject",{name:e.meta.name,description:e.meta.shortDescription,contentUrl:e.media.videoTrailer.videoUrl,thumbnailUrl:e.media.videoTrailer.poster,uploadDate:m(JSON.stringify(e.media.videoTrailer))})},e.media.articles&&e.media.articles.length&&{citation:e.media.articles.map((function(e){var t=m(e.title+e.summary),a=e.url,n=o("Organization",{name:a=(a=(a=a.substr(a.indexOf("?url=")+19)).substr(0,a.lastIndexOf(".")))||"unknown",logo:e.icon});return o("Article",{author:n,publisher:n,datePublished:t,url:e.url,dateModified:t,headline:e.title,articleBody:e.summary,image:e.icon,mainEntityOfPage:e.url})}))}),!0)}),"app"),O=r((function(e){var t=g(e.cast||[]),a=t.directors,n=t.authors,r=t.actors,s=f(e.previews||[]);return o("TVSeries",Object.assign({},{name:e.name,url:i(c,"series/s/"+e.identifier),numberOfSeasons:e.seasons.length,image:e.cover.url},a&&a.length&&{director:o("Person",{name:a[0]})},r&&r.length&&{actor:r.map((function(e){return o("Person",{name:e})}))},n&&n.length&&{author:n.map((function(e){return o("Person",{name:e})}))},s&&{trailer:o("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:m(e.name),contentUrl:s})}),!0)}),"series"),D=r((function(e){return h({page:{pageBodyInfo:{pageBody:e.pageBody}}})}),"season"),k=r((function(e){var t=g(e.cast||[]),a=t.directors,n=t.authors,r=t.actors,s=b(e.videoInfoList||[]),l=s.duration,p=s.createdDate,u=f(e.previews||[]),m=A(e.voteInfo);return o("TVEpisode",Object.assign({},{name:e.name+" - "+e.seasonIndexTitle+" - "+e.episodeIndexTitle,url:i(c,"series/e/"+e.episodeId),image:e.cover.url,episodeNumber:e.episodeIndex},p&&{dateCreated:p},l&&{duration:v(l)},a&&a.length&&{director:o("Person",{name:a[0]})},r&&r.length&&{actor:r.map((function(e){return o("Person",{name:e})}))},n&&n.length&&{author:n.map((function(e){return o("Person",{name:e})}))},u&&{trailer:o("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:p,contentUrl:u})},{aggregateRating:o("AggregateRating",Object.assign({},m))}),!0)}),"episode"),z=r((function(e){var t=g(e.cast||[]),a=t.directors,n=t.authors,r=t.actors,s=b(e.videoInfoList||[]),l=s.duration,p=s.createdDate,u=f(e.previews||[]),m=A(e.voteInfo);return o("Movie",Object.assign({},{name:e.name,url:i(c,"video/"+e.identifier),image:e.cover.url},p&&{dateCreated:p},a&&a.length&&{director:o("Person",{name:a[0]})},r&&r.length&&{actor:r.map((function(e){return o("Person",{name:e})}))},n&&n.length&&{author:n.map((function(e){return o("Person",{name:e})}))},l&&{duration:v(l)},u&&{trailer:o("VideoObject",{name:e.name,description:e.description,thumbnailUrl:e.cover.url,uploadDate:p,contentUrl:u})},{aggregateRating:o("AggregateRating",Object.assign({},m))}),!0)}),"movie"),N=r(h,"vitrinList"),R={corporation:y,website:w,app:I,series:O,season:D,episode:k,movie:z,vitrinList:N};return e.app=I,e.corporation=y,e.default=R,e.episode=k,e.movie=z,e.season=D,e.series=O,e.vitrinList=N,e.website=w,Object.defineProperty(e,"__esModule",{value:!0}),e}({},IDate);
{
"name": "@cafebazaar/jaldi",
"version": "1.4.0",
"version": "1.4.1",
"description": "Create json-ld to used in Cafebazaar pages",

@@ -5,0 +5,0 @@ "main": "dist/jaldi.cjs.min.js",